diff --git a/klp-ui/src/api/system/ocr.js b/klp-ui/src/api/system/ocr.js
new file mode 100644
index 00000000..586c2196
--- /dev/null
+++ b/klp-ui/src/api/system/ocr.js
@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+export function recognizeText({ imgUrl }) {
+ return request({
+ url: '/wms/purchasePlan/recognizeText',
+ method: 'post',
+ data: { imgUrl }
+ })
+}
\ No newline at end of file
diff --git a/klp-ui/src/api/wms/productSalesScript.js b/klp-ui/src/api/wms/productSalesScript.js
index e4f16ae8..ab00d2c5 100644
--- a/klp-ui/src/api/wms/productSalesScript.js
+++ b/klp-ui/src/api/wms/productSalesScript.js
@@ -52,23 +52,6 @@ export function delProductSalesScript(scriptId) {
})
}
-// // 记录话术访问频率
-// export function recordVisit(productId) {
-// return request({
-// url: '/klp/productSalesScript/recordVisit/' + productId,
-// method: 'post'
-// })
-// }
-
-// // 获取热门产品排行
-// export function getHotProducts(limit = 10) {
-// return request({
-// url: '/klp/productSalesScript/hotProducts',
-// method: 'get',
-// params: { limit }
-// })
-// }
-
// 获取产品咨询热度排行
export function getProductRanking() {
return request({
@@ -76,3 +59,18 @@ export function getProductRanking() {
method: 'get'
})
}
+
+/**
+ * 根据产品生成话术
+ * @param {*} data.productId 产品id
+ * @param {*} data.scriptCount 生成话术数量
+ * @returns
+ */
+export function generateForProduct(data) {
+ return request({
+ url: '/wms/salesScriptGenerator/generateForProduct',
+ method: 'post',
+ data,
+ timeout: 1000000
+ })
+}
diff --git a/klp-ui/src/api/wms/stockIo.js b/klp-ui/src/api/wms/stockIo.js
index da2545d3..1ee00b98 100644
--- a/klp-ui/src/api/wms/stockIo.js
+++ b/klp-ui/src/api/wms/stockIo.js
@@ -82,7 +82,25 @@ export function updateStockIoStatus(stockIoId, status) {
})
}
-
+/**
+ * 创建入库单,含明细
+ * 入库单主表:
+ * 单号:stockIoCode
+ * 类型: ioType,
+ * 业务类型:bizType,
+ * 状态:status,
+ * 备注:remark,
+ *
+ * 入库单明细:
+ * warehouseId: 仓库ID,
+ * itemType: 物料类型,
+ * itemId: 物料ID,
+ * quantity: 数量,
+ * unit: 单位,
+ * batchNo: 批次号,
+ * remark: 备注
+ *
+ */
export function addStockIoWithDetail(data) {
return request({
url: '/wms/stockIo/withDetail',
diff --git a/klp-ui/src/components/FileUpload/index.vue b/klp-ui/src/components/FileUpload/index.vue
index 2e33c1b7..0583419f 100644
--- a/klp-ui/src/components/FileUpload/index.vue
+++ b/klp-ui/src/components/FileUpload/index.vue
@@ -1,5 +1,5 @@
-
+
["doc", "xls", "ppt", "txt", "pdf"],
+ default: () => ["doc", "xls", "ppt", "txt", "pdf", 'png', 'jpg', 'jpeg', 'bmp', 'webp'],
},
// 是否显示提示
isShowTip: {
@@ -79,6 +79,7 @@ export default {
Authorization: "Bearer " + getToken(),
},
fileList: [],
+ loading: false,
};
},
watch: {
@@ -91,11 +92,15 @@ export default {
if (Array.isArray(val)) {
list = val;
} else {
+ this.loading = true;
await listByIds(val).then(res => {
list = res.data.map(oss => {
oss = { name: oss.originalName, url: oss.url, ossId: oss.ossId };
return oss;
});
+
+ }).finally(() => {
+ this.loading = false;
})
}
// 然后将数组转为对象数组
diff --git a/klp-ui/src/components/KLPService/Renderer/BomInfo.vue b/klp-ui/src/components/KLPService/Renderer/BomInfo.vue
index cf67c39b..3387f47d 100644
--- a/klp-ui/src/components/KLPService/Renderer/BomInfo.vue
+++ b/klp-ui/src/components/KLPService/Renderer/BomInfo.vue
@@ -78,7 +78,6 @@ export default {
this.bomInfo = res.rows;
})
}
- console.log(this.bomInfo, bomId, bomMap)
}
}
}
diff --git a/klp-ui/src/components/KLPService/WarehouseTree/index.vue b/klp-ui/src/components/KLPService/WarehouseTree/index.vue
new file mode 100644
index 00000000..0d4a2eca
--- /dev/null
+++ b/klp-ui/src/components/KLPService/WarehouseTree/index.vue
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
diff --git a/klp-ui/src/components/KLPService/index.js b/klp-ui/src/components/KLPService/index.js
index 7ffcd09b..36aeed07 100644
--- a/klp-ui/src/components/KLPService/index.js
+++ b/klp-ui/src/components/KLPService/index.js
@@ -7,3 +7,5 @@ export { default as UserSelect } from './UserSelect/index.vue';
export { default as WarehouseSelect } from './WarehouseSelect/index.vue';
export { default as ProductInfo } from './Renderer/ProductInfo.vue';
export { default as RawMaterialInfo } from './Renderer/RawMaterialInfo.vue';
+export { default as BomInfoMini } from './Renderer/BomInfoMini.vue';
+export { default as WarehouseTree } from './WarehouseTree/index.vue';
diff --git a/klp-ui/src/store/modules/category.js b/klp-ui/src/store/modules/category.js
index 923e118d..0b03a749 100644
--- a/klp-ui/src/store/modules/category.js
+++ b/klp-ui/src/store/modules/category.js
@@ -3,6 +3,9 @@ import { listProduct } from '@/api/wms/product';
import { listRawMaterial } from '@/api/wms/rawMaterial';
import { listBomItem } from '@/api/wms/bomItem';
+// 目前存在一个问题,当新增或删除,修改分类、产品、物料时,需要刷新整个页面,才能看到最新的数据
+// 需要优化,当新增或删除,修改分类、产品、物料时,只刷新相关的数据,而不是整个页面,修改和删除可以解决,新增由于没有返回id,所以需要重新获取整个列表
+
const state = {
categoryList: [],
productMap: {},
@@ -16,6 +19,7 @@ const mutations = {
SET_CATEGORY_LIST(state, list) {
state.categoryList = list;
},
+
SET_PRODUCT_MAP(state, map) {
state.productMap = map;
},
@@ -89,6 +93,7 @@ const actions = {
})
}
};
+
export default {
namespaced: true,
state,
diff --git a/klp-ui/src/views/wms/productSalesScript/index.vue b/klp-ui/src/views/wms/productSalesScript/index.vue
index 241752ba..97a3b1d1 100644
--- a/klp-ui/src/views/wms/productSalesScript/index.vue
+++ b/klp-ui/src/views/wms/productSalesScript/index.vue
@@ -93,7 +93,23 @@
-
+
+
+ 生成话术
+
+
+
+
@@ -120,7 +136,7 @@
+
+
\ No newline at end of file
diff --git a/klp-ui/src/views/wms/stock/box.vue b/klp-ui/src/views/wms/stock/box.vue
index 8c988edd..fbd5b16b 100644
--- a/klp-ui/src/views/wms/stock/box.vue
+++ b/klp-ui/src/views/wms/stock/box.vue
@@ -308,8 +308,8 @@ export default {
handleTreeNodeClick(node) {
this.currentTreeNode = node;
// 图表高亮并聚焦对应节点
- if (node && node.id) {
- this.highlightChartNode(node.id);
+ if (node && node.warehouseId) {
+ this.highlightChartNode(node.warehouseId);
}
},
// 高亮并聚焦图表节点
@@ -323,7 +323,7 @@ export default {
});
// 聚焦节点(自动缩放到该节点)
this.chart.dispatchAction({
- type: 'zoomToNode',
+ type: 'treemapRootToNode',
seriesIndex: 0,
targetNodeId: id
});
diff --git a/klp-ui/src/views/wms/stock/index.vue b/klp-ui/src/views/wms/stock/index.vue
index afc21f17..1acbcdc9 100644
--- a/klp-ui/src/views/wms/stock/index.vue
+++ b/klp-ui/src/views/wms/stock/index.vue
@@ -4,8 +4,7 @@
@@ -35,31 +34,21 @@
-
-
- 导出
+ 查看暂存单据
-
-
+
@@ -138,13 +127,17 @@
取 消
+
+
+
+
\ No newline at end of file