Browse Source

修复编辑零担提交问题

fix_bug_pro20231227
qb 1 year ago
parent
commit
5433e9e457
  1. 39
      src/views/distribution/inventory/distrilbutionBillLading.vue

39
src/views/distribution/inventory/distrilbutionBillLading.vue

@ -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) {

Loading…
Cancel
Save