From 9618599207dc155eda041158e072b2229684e050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Tue, 12 Aug 2025 13:46:50 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20perf:=20=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E5=92=8C=E5=90=88=E5=90=8C=E6=94=B9=E4=B8=BA=E8=BF=9C?= =?UTF-8?q?=E7=A8=8B=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/wms/purchasePlan/panels/detail.vue | 41 +++++++++++++++---- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/klp-ui/src/views/wms/purchasePlan/panels/detail.vue b/klp-ui/src/views/wms/purchasePlan/panels/detail.vue index 938bc3d6..31e6fbe9 100644 --- a/klp-ui/src/views/wms/purchasePlan/panels/detail.vue +++ b/klp-ui/src/views/wms/purchasePlan/panels/detail.vue @@ -156,13 +156,15 @@ + - + + - + @@ -284,7 +286,9 @@ export default { uploadQualityCertificateInfo: undefined, vendorList: [], - contractList: [] + vendorLoading: false, + contractList: [], + contractLoading: false }; }, computed: { @@ -295,8 +299,10 @@ export default { }, created() { this.getList(); - this.getVendorList(); - this.getContractList(); + this.remoteSearchVendor(''); + this.remoteSearchContract(''); + // this.getVendorList(); + // this.getContractList(); }, watch: { planId: { @@ -310,16 +316,33 @@ export default { } }, methods: { - getVendorList() { - listSupplier().then(response => { + // 默认执行一次 + remoteSearchVendor(query) { + this.vendorLoading = true; + listSupplier({ name: query, pageNum: 1, pageSize: 10 }).then(response => { this.vendorList = response.rows; + }).finally(() => { + this.vendorLoading = false; }); }, - getContractList() { - listContract({ type: 'purchase' }).then(response => { + remoteSearchContract(query) { + this.contractLoading = true; + listContract({ contractNo: query, pageNum: 1, pageSize: 10 }).then(response => { this.contractList = response.rows; + }).finally(() => { + this.contractLoading = false; }); }, + // getVendorList() { + // listSupplier().then(response => { + // this.vendorList = response.rows; + // }); + // }, + // getContractList() { + // listContract({ type: 'purchase' }).then(response => { + // this.contractList = response.rows; + // }); + // }, /** 查询采购计划明细列表 */ getList() { this.loading = true;