From 33b47f3fa98e4ddc5726b180358b43ff4335c9ca Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Fri, 13 Dec 2024 16:11:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BD=A6=E8=BE=86?= =?UTF-8?q?=E9=85=8D=E8=BD=BD=E5=92=8C=E4=B8=89=E6=96=B9=E4=B8=AD=E8=BD=AC?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../distribution/artery/AddVehicleStowage.vue | 13 ++++++ .../artery/addTripartiteTransfer.vue | 41 ++++++++++++++----- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/src/views/distribution/artery/AddVehicleStowage.vue b/src/views/distribution/artery/AddVehicleStowage.vue index 2b8480bb..d769cbe2 100644 --- a/src/views/distribution/artery/AddVehicleStowage.vue +++ b/src/views/distribution/artery/AddVehicleStowage.vue @@ -1902,6 +1902,19 @@ const handleAddWaybill = async (index: number) => { item.totalNum = item.totalNum || 20; item.planNum = item.stockNum; item.loadingNum = 0; + + let isContinue = false; + + for (let i = 0; i < details.orderCodeList.length; i++) { + const val = details.orderCodeList[i]; + + if (item.orderCode + ',' + item.waybillNo !== val) continue; + isContinue = true; + break; + } + + if (isContinue) continue; + _orderMap.push(item.orderCode + ',' + item.waybillNo); _node.lineCarsOrderList.push(item); } diff --git a/src/views/distribution/artery/addTripartiteTransfer.vue b/src/views/distribution/artery/addTripartiteTransfer.vue index 730349ed..07c9c458 100644 --- a/src/views/distribution/artery/addTripartiteTransfer.vue +++ b/src/views/distribution/artery/addTripartiteTransfer.vue @@ -1080,17 +1080,36 @@ const currentChange = pageNum => { /** 加入调度池 */ const handleAddWaybill = () => { - details.selectionList.forEach(val => { - val.planNum = val.stockNum; - val.loadingNum = 0; - details.newData.push(val); - }); - details.orderCodeList = [ - ...new Set([ - ...details.orderCodeList, - ...details.selectionList.map(val => val.orderCode + ',' + val.waybillNo), - ]), - ]; + const _orderMap = []; + + for (let i = 0; i < details.selectionList.length; i++) { + const item = details.selectionList[i]; + + item.planNum = item.stockNum; + item.loadingNum = 0; + + let isContinue = false; + + for (let i = 0; i < details.orderCodeList.length; i++) { + const val = details.orderCodeList[i]; + + if (item.orderCode + ',' + item.waybillNo !== val) continue; + isContinue = true; + break; + } + + if (isContinue) continue; + + _orderMap.push(item.orderCode + ',' + item.waybillNo); + details.newData.push(item); + } + + // details.selectionList.forEach(val => { + // val.planNum = val.stockNum; + // val.loadingNum = 0; + // details.newData.push(val); + // }); + details.orderCodeList = [...new Set([...details.orderCodeList, ..._orderMap])]; console.log('details.orderCodeList :>> ', details.orderCodeList); const orderCodes = details.selectionList.map(val => val.orderCode); From 0b8feb5d7b0ecfc7cdb485d8cb67db7af52599e8 Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Fri, 13 Dec 2024 17:54:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basicdata/brand/basicdataCategory.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/basicdata/brand/basicdataCategory.vue b/src/views/basicdata/brand/basicdataCategory.vue index 112a2476..5630edcb 100644 --- a/src/views/basicdata/brand/basicdataCategory.vue +++ b/src/views/basicdata/brand/basicdataCategory.vue @@ -333,7 +333,7 @@ export default { onLoad(page, params = {}) { console.log(this.query,';this.query'); - this.loading = false; + this.loading = true; const { name, type } = this.query; let values = { name_like: name,