diff --git a/src/views/distribution/deliverylist/distributionDeliveryListdis.vue b/src/views/distribution/deliverylist/distributionDeliveryListdis.vue index 7ce6ab55..8e7554b7 100644 --- a/src/views/distribution/deliverylist/distributionDeliveryListdis.vue +++ b/src/views/distribution/deliverylist/distributionDeliveryListdis.vue @@ -408,6 +408,17 @@ export default { sortable: true, hide: true, }, + { + prop: 'orderCode', + label: '订单自编号', + type: 2, + values: '', + width: '180', + checkarr: [], + fixed: false, + sortable: true, + hide: true, + }, { prop: 'kindName', label: '配送种类', diff --git a/src/views/distribution/deliverylist/distributionDeliveryListedt.vue b/src/views/distribution/deliverylist/distributionDeliveryListedt.vue index 10d04cc2..a402f8ac 100644 --- a/src/views/distribution/deliverylist/distributionDeliveryListedt.vue +++ b/src/views/distribution/deliverylist/distributionDeliveryListedt.vue @@ -128,11 +128,9 @@ - 导 出 - + 导 出 + 批量签收 - 批量计划取消 + > --> { - // if (res.data.code === 200){ - // this.$message.success(res.data.msg); - // this.getWrapdetails(this.page); - // } - // }) + this.$confirm('是否计划取消?') + .then(() => { + this.loading = true; //开启加载 + let data = { + deliveryId: this.deliveryId, + reservationId: this.wid, + type: 2, + packageIds: row.id, + }; + this.loading = true; + cancelReservationPackage(data) + .then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.msg); + this.getReservationInventoryPackageListInfo(this.page); + } + }) + .catch(res => { + + }).finally(()=>{ + this.loading = false; + }); + }) + .catch(() => {}); }, signingReservationPackage(row) { console.log('row', row); @@ -4486,26 +4505,50 @@ export default { }, // 批量计划取消 Batchcancellation() { - 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 => { - this.selectionList = []; //清空选择 - this.loading = false; + if (!this.selectionList.length) { + ElMessage({ + message: '请勾选需要计划取消的数据', + type: 'warning', }); + return; + } + let result = this.selectionList.every(item => item.stockSignfoStatus == 10 && item.stockLockingStatus==10); + if(!result){ + ElMessage({ + message: '有已经存在签收的订单,不满足批量签收条件', + type: 'warning', + }); + return + } + this.$confirm('是否进行批量计划取消?') + .then(() => { + this.loading = true; //开启加载 + let data = { + deliveryId: this.deliveryId, + reservationId: this.wid, + type: 2, + 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.getReservationInventoryPackageListInfo(this.page); + } + this.selectionList = []; //清空选择 + this.loading = false; + }) + .catch(res => { + this.selectionList = []; //清空选择 + this.loading = false; + }); + }) + .catch(() => {}); + + + + }, /**printTemplate * 打印 diff --git a/src/views/distribution/deliverylist/distributionDeliveryListmar.vue b/src/views/distribution/deliverylist/distributionDeliveryListmar.vue index 13e6da8f..4aa33085 100644 --- a/src/views/distribution/deliverylist/distributionDeliveryListmar.vue +++ b/src/views/distribution/deliverylist/distributionDeliveryListmar.vue @@ -8,7 +8,7 @@ - + @@ -318,7 +318,17 @@ export default { fixed: false, sortable: true, }, - + { + prop: 'orderCode', + label: '订单自编号', + type: 2, + type: 2, + values: '', + width: '140', + checkarr: [], + fixed: false, + sortable: true, + }, { prop: 'kindName', label: '配送种类', diff --git a/src/views/distribution/inventory/distributionStockListDetails.vue b/src/views/distribution/inventory/distributionStockListDetails.vue index 764c07a3..59742423 100644 --- a/src/views/distribution/inventory/distributionStockListDetails.vue +++ b/src/views/distribution/inventory/distributionStockListDetails.vue @@ -1,32 +1,66 @@