|
|
|
@ -2494,17 +2494,17 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
async handleSubmit() { |
|
|
|
|
const zeroOrderList = this.dataList.filter(val => val.isZero === '1'); |
|
|
|
|
// 当有零担订单物料数量没操作时 |
|
|
|
|
const wrongZeroOrder = zeroOrderList.find(val => !val.ParcelLisList); |
|
|
|
|
console.log('zeroOrderList :>> ', zeroOrderList); |
|
|
|
|
console.log('wrongZeroOrder :>> ', wrongZeroOrder); |
|
|
|
|
if (wrongZeroOrder) { |
|
|
|
|
return this.$message({ |
|
|
|
|
type: 'error', |
|
|
|
|
message: `订单自编号为${wrongZeroOrder.orderCode}的物料数量未编辑`, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (this.$route.query.type !== '2') { |
|
|
|
|
// 当有零担订单物料数量没操作时 |
|
|
|
|
const wrongZeroOrder = zeroOrderList.find(val => !val.ParcelLisList); |
|
|
|
|
console.log('zeroOrderList :>> ', zeroOrderList); |
|
|
|
|
console.log('wrongZeroOrder :>> ', wrongZeroOrder); |
|
|
|
|
if (wrongZeroOrder) { |
|
|
|
|
return this.$message({ |
|
|
|
|
type: 'error', |
|
|
|
|
message: `订单自编号为${wrongZeroOrder.orderCode}的物料数量未编辑`, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (zeroOrderList) { |
|
|
|
|
// 双层循环查看每一个物料数量是否被填写 |
|
|
|
|
const isSubmit = zeroOrderList.every(item => { |
|
|
|
@ -2663,7 +2663,9 @@ export default {
|
|
|
|
|
up.parcelLisList = []; |
|
|
|
|
up.zeroType = '2'; |
|
|
|
|
zeroOrderList.forEach(val => { |
|
|
|
|
up.parcelLisList = [...up.parcelLisList, ...val.ParcelLisList]; |
|
|
|
|
if (val.ParcelLisList) { |
|
|
|
|
up.parcelLisList = [...up.parcelLisList, ...val.ParcelLisList]; |
|
|
|
|
} |
|
|
|
|
// val.ParcelLisList.forEach(item => { |
|
|
|
|
// up.parcelLisList.push(item); |
|
|
|
|
// }); |
|
|
|
@ -2704,12 +2706,12 @@ export default {
|
|
|
|
|
up.unBillPackageEntityList = _unBillPackageEntityList; |
|
|
|
|
|
|
|
|
|
update(up).then(() => { |
|
|
|
|
// this.$message({ |
|
|
|
|
// type: 'success', |
|
|
|
|
// message: '操作成功!', |
|
|
|
|
// }); |
|
|
|
|
// this.$store.commit('DEL_TAG_CURRENT'); |
|
|
|
|
// this.$router.push(this.tagWel); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
this.$store.commit('DEL_TAG_CURRENT'); |
|
|
|
|
this.$router.push(this.tagWel); |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -3012,7 +3014,6 @@ export default {
|
|
|
|
|
} |
|
|
|
|
return zeroOrder; |
|
|
|
|
}); |
|
|
|
|
console.log('this.zeroOrderFormList :>> ', this.zeroOrderFormList); |
|
|
|
|
} |
|
|
|
|
// 开启零担蒙层弹窗 |
|
|
|
|
this.dialogFormZeroOrderVisible = true; |
|
|
|
@ -3079,7 +3080,7 @@ export default {
|
|
|
|
|
val.TiQuantity = val.tiQuantity; |
|
|
|
|
return val; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const res = await zeroUpdateMaterial(submitData); |
|
|
|
|
const { code } = res.data; |
|
|
|
|
if (code === 200) { |
|
|
|
|