From 411c88bf12bb19a6ab2ca6b02dbe44d05f89c1f5 Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Thu, 28 Mar 2024 10:18:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=8C=85=E4=BB=B6=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../distributionDeliveryListedt.vue | 52 ++++++++++++++++++- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/src/views/distribution/deliverylist/distributionDeliveryListedt.vue b/src/views/distribution/deliverylist/distributionDeliveryListedt.vue index a402f8ac..bb8ea629 100644 --- a/src/views/distribution/deliverylist/distributionDeliveryListedt.vue +++ b/src/views/distribution/deliverylist/distributionDeliveryListedt.vue @@ -478,13 +478,13 @@ --> - + 批量签收 - 批量计划取消 {}); }, + +// 客户包件批量取消 +PackBatchcancellation(){ + if (!this.selectionList.length) { + ElMessage({ + message: '请勾选需要计划取消的数据', + type: 'warning', + }); + return; + } + let result = this.selectionList.every(item => item.orderPackageStatus == !70 || item.orderPackageLoadingStatus !=20); + console.log(result,'result'); + if(!result){ + ElMessage({ + message: '有已经存在签收的订单或已装车,不满足批量签收条件', + type: 'warning', + }); + return + } + this.$confirm('是否进行批量计划取消?') + .then(() => { + this.loading = true; //开启加载 + let data = { + deliveryId: this.deliveryId, + reservationId: this.wid, + type: 1, + packageIds: this.selectionList.map(item => item.id).join(','), + }; + this.loading = true; + cancelReservationPackage(data) + .then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.msg); + this.getWrapdetails(this.page); + } + this.selectionList = []; //清空选择 + this.loading = false; + }) + .catch(res => { + + }).finally(()=>{ + this.loading = false; + }); + }) + .catch(() => {}); +}, + + // 批量签收 Batchsigning() { console.log(this.selectionList, 'this.selectionList');