From b6bad7f48ed116523bb4af7ca4fa3906b520b74a Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Tue, 26 Nov 2024 15:11:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A2=84=E7=BA=A6=E5=8D=95?= =?UTF-8?q?=E9=A2=84=E7=BA=A6=E6=95=B0=E9=87=8F=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/aftersales/aftersalesWorkOrder.vue | 35 +++++++++---------- .../aftersales/aftersalesWorkOrderAdd.vue | 2 +- .../inventory/distrilbutionBillLading.vue | 6 ++++ .../distributionStockArticle.vue | 2 +- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/views/aftersales/aftersalesWorkOrder.vue b/src/views/aftersales/aftersalesWorkOrder.vue index 99f64aa5..04641871 100644 --- a/src/views/aftersales/aftersalesWorkOrder.vue +++ b/src/views/aftersales/aftersalesWorkOrder.vue @@ -2741,28 +2741,25 @@ const dialogSearchSubmit = () => { console.log(details.query, 'details.query'); }; -const ProcessSearch = async () => { - if (TopQuery.value.CreateTiem?.length) { - details.query.startCreateTime = await dayjs(TopQuery.value.CreateTiem[0]).format( - 'YYYY-MM-DD HH:mm:ss' - ); - details.query.endCreateTime = await dayjs(TopQuery.value.CreateTiem[1]).format( - 'YYYY-MM-DD HH:mm:ss' - ); +const ProcessSearch = () => { + const { CreateTiem, workOrderNumbers, orderCodes } = TopQuery.value; + + const queryKeys = ['workOrderNumbers', 'orderCodes']; + queryKeys.forEach(key => { + if (TopQuery.value[key]) { + details.query[key] = TopQuery.value[key]; + } else { + delete details.query[key]; + } + }); + + if (CreateTiem?.length) { + details.query.startCreateTime = dayjs(CreateTiem[0]).format('YYYY-MM-DD HH:mm:ss'); + details.query.endCreateTime = dayjs(CreateTiem[1]).format('YYYY-MM-DD HH:mm:ss'); delete details.query.CreateTiem; } - if (TopQuery.value.workOrderNumbers) { - details.query.workOrderNumbers = TopQuery.value.workOrderNumbers; - } else { - delete details.query.workOrderNumbers; - } - if (TopQuery.value.orderCodes) { - details.query.orderCodes = TopQuery.value.orderCodes; - } else { - delete details.query.orderCodes; - } - console.log(TopQuery.value, 'TopQuery.value'); + console.log(TopQuery.value, 'TopQuery.value'); console.log(details.query, 'details.query'); delete details.query.inputAll; diff --git a/src/views/aftersales/aftersalesWorkOrderAdd.vue b/src/views/aftersales/aftersalesWorkOrderAdd.vue index e25f8529..f81cb350 100644 --- a/src/views/aftersales/aftersalesWorkOrderAdd.vue +++ b/src/views/aftersales/aftersalesWorkOrderAdd.vue @@ -1328,7 +1328,7 @@ const ChangePackageInfo = async item => { console.log(res, '查询包条'); let packageData = {}; - if (res.data.code == 200 && res.data && res.data.data.length) { + if (res.data.code == 200 && res.data && res.data.data?.length) { form.value.Pageloading = false; //关闭页面加载 packageData = res.data.data[0]; //取第一个值,内容相同 // 判断输入的是否为同一批货 diff --git a/src/views/distribution/inventory/distrilbutionBillLading.vue b/src/views/distribution/inventory/distrilbutionBillLading.vue index 355a6b9f..a1d31bb7 100644 --- a/src/views/distribution/inventory/distrilbutionBillLading.vue +++ b/src/views/distribution/inventory/distrilbutionBillLading.vue @@ -3530,6 +3530,12 @@ export default { console.log('执行了二次操作'); const data = res.data.data; this.dataList = data.records; + if(this.dataList?.length){ + this.dataList.forEach(i => { + i.reservationNum = i.handQuantity; + }) + } + this.loading = false; this.selectionClear(); }); diff --git a/src/views/warehouse/warehousesignedorder/distributionStockArticle.vue b/src/views/warehouse/warehousesignedorder/distributionStockArticle.vue index 7ea163c0..45db94a7 100644 --- a/src/views/warehouse/warehousesignedorder/distributionStockArticle.vue +++ b/src/views/warehouse/warehousesignedorder/distributionStockArticle.vue @@ -59,7 +59,7 @@