From 633f81727de11bdee397f9ae7213a6162b03a465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Tue, 22 Jul 2025 11:49:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=A1=AB=E5=85=A5?= =?UTF-8?q?=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../KLPService/RawMaterialSelect/index.vue | 18 +- .../views/wms/purchasePlan/panels/clac.vue | 308 +++++++++++------- .../views/wms/purchasePlan/panels/detail.vue | 13 +- .../src/views/wms/stockIo/panels/detail.vue | 28 +- 4 files changed, 226 insertions(+), 141 deletions(-) diff --git a/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue b/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue index 6ff4e014..2d02f930 100644 --- a/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue +++ b/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue @@ -4,8 +4,6 @@ :placeholder="placeholder" filterable clearable - remote - :remote-method="debouncedRemoteMethod" :loading="loading" @change="onChange" style="width: 100%" @@ -67,25 +65,19 @@ export default { this.fetchOptions(""); }, methods: { - fetchOptions(keyword) { + fetchOptions() { this.loading = true; - listRawMaterial({ pageNum: 1, pageSize: 10, rawMaterialName: keyword }).then(res => { + listRawMaterial({ pageNum: 1, pageSize: 9999 }).then(res => { this.options = res.rows || []; this.loading = false; }).catch(() => { this.loading = false; }); }, - remoteMethod(keyword) { - this.fetchOptions(keyword); + async onChange(val) { + const rawMaterial = this.options.find(p => p.rawMaterialId === val); + this.$emit('change', rawMaterial); }, - debouncedRemoteMethod: debounce(function(keyword) { - this.remoteMethod(keyword); - }, 400), - onChange(val) { - this.$emit("input", val); - this.$emit("change", val); - } } }; diff --git a/klp-ui/src/views/wms/purchasePlan/panels/clac.vue b/klp-ui/src/views/wms/purchasePlan/panels/clac.vue index 44ed7d89..96b27bd0 100644 --- a/klp-ui/src/views/wms/purchasePlan/panels/clac.vue +++ b/klp-ui/src/views/wms/purchasePlan/panels/clac.vue @@ -1,68 +1,102 @@ diff --git a/klp-ui/src/views/wms/purchasePlan/index.vue b/klp-ui/src/views/wms/purchasePlan/index.vue index cd09f7ff..4f8cdd0a 100644 --- a/klp-ui/src/views/wms/purchasePlan/index.vue +++ b/klp-ui/src/views/wms/purchasePlan/index.vue @@ -239,6 +239,25 @@ 关 闭 + + + + + @@ -247,13 +266,15 @@ import { listPurchasePlan, getPurchasePlan, delPurchasePlan, addPurchasePlan, up import { listOrder } from "@/api/wms/order"; import PurchasePlanClac from "./panels/clac.vue"; import PurchasePlanDetail from "./panels/detail.vue"; +import CreatePurchasePanel from "./panels/CreatePurchasePanel.vue"; import { EOrderStatus } from "../../../utils/enums"; export default { name: "PurchasePlan", components: { PurchasePlanClac, - PurchasePlanDetail + PurchasePlanDetail, + CreatePurchasePanel }, dicts: ['order_status'], data() { @@ -327,7 +348,8 @@ export default { status: [ { required: true, message: "状态不能为空", trigger: "change" } ], - } + }, + addDrawerOpen: false, }; }, mounted() { @@ -383,9 +405,7 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - this.reset(); - this.open = true; - this.title = "添加采购计划主"; + this.addDrawerOpen = true; }, /** 修改按钮操作 */ handleUpdate(row) { @@ -498,7 +518,19 @@ export default { handleDetail(row) { this.selectedPlanId = row.planId; this.detailOpen = true; + }, + onAddConfirm() { + this.addDrawerOpen = false; + this.getList(); } } }; + + diff --git a/klp-ui/src/views/wms/purchasePlan/panels/CreatePurchasePanel.vue b/klp-ui/src/views/wms/purchasePlan/panels/CreatePurchasePanel.vue new file mode 100644 index 00000000..0ab03932 --- /dev/null +++ b/klp-ui/src/views/wms/purchasePlan/panels/CreatePurchasePanel.vue @@ -0,0 +1,280 @@ + + + + + \ No newline at end of file diff --git a/klp-ui/src/views/wms/purchasePlan/panels/RecommendPurchasePanel.vue b/klp-ui/src/views/wms/purchasePlan/panels/RecommendPurchasePanel.vue new file mode 100644 index 00000000..aa364459 --- /dev/null +++ b/klp-ui/src/views/wms/purchasePlan/panels/RecommendPurchasePanel.vue @@ -0,0 +1,50 @@ + + + \ No newline at end of file diff --git a/klp-ui/src/views/wms/purchasePlan/panels/clac.vue b/klp-ui/src/views/wms/purchasePlan/panels/clac.vue index 96b27bd0..e22db312 100644 --- a/klp-ui/src/views/wms/purchasePlan/panels/clac.vue +++ b/klp-ui/src/views/wms/purchasePlan/panels/clac.vue @@ -1,122 +1,27 @@