Commit bd2b4f76 by LJM

bug

parent 9e8ac006
...@@ -714,6 +714,7 @@ ...@@ -714,6 +714,7 @@
goods_check_pic: item.goods_check_pic, // 商检的必须上传图片 goods_check_pic: item.goods_check_pic, // 商检的必须上传图片
wstydl_id: item.wstydl_id, // 理货明细ID wstydl_id: item.wstydl_id, // 理货明细ID
erp_order_sn: this.erp_order_sn, // 入仓号 erp_order_sn: this.erp_order_sn, // 入仓号
box_sn: item.box_sn,
wsty_id: this.wsty_id, // 箱子id wsty_id: this.wsty_id, // 箱子id
is_goods_check: item.is_goods_check //是否商检 is_goods_check: item.is_goods_check //是否商检
})); }));
...@@ -870,10 +871,14 @@ ...@@ -870,10 +871,14 @@
* 关单封箱 * 关单封箱
*/ */
closeBox() { closeBox() {
this.net_weight_total = this.form this.net_weight_total = this.form.reduce((total, item) => {
.filter(item => item.tally_status === 3) // 筛选出 tally_status 等于 3 的数据 // 如果 tally_status 等于 3 并且 box_sn 等于 box_sn 变量,则累加 net_weight 到总和中
.reduce((acc, curr) => acc + parseFloat(curr.net_weight), 0); // 将 net_weight 转换为数字并计算总和 if (item.tally_status === 3 && item.box_sn === this.box_sn) {
this.title = `入仓号${this.erp_order_sn}已经全部验货完毕是否更换新的箱子?\n\n总净重:${this.net_weight_total}`; total += parseFloat(item.net_weight);
}
return total;
}, 0);
this.title = `入仓号${this.erp_order_sn}已经全部验货完毕是否更换新的箱子?\n\n 箱子:${this.box_sn} 总净重:${this.net_weight_total}`;
this.$refs.inputDialog.open(); this.$refs.inputDialog.open();
}, },
/** /**
......
...@@ -310,7 +310,18 @@ ...@@ -310,7 +310,18 @@
}); });
return false; return false;
} }
this.getTallyData(); this.request(API.reOpenBox, 'POST', { box_sn: this.box_sn }, true).then(res => {
if (res.err_code === 0) {
this.getTallyData();
} else {
this.form = [];
uni.showModal({
title: '',
content: res.err_msg,
showCancel: false
});
}
});
}, },
/** /**
* 打开弹窗 * 打开弹窗
......
...@@ -283,6 +283,10 @@ const API = { ...@@ -283,6 +283,10 @@ const API = {
*/ */
closeBox: API_BASE + '/supplywechatwms/closeBox', closeBox: API_BASE + '/supplywechatwms/closeBox',
/** /**
* 重新开箱
*/
reOpenBox: API_BASE + '/supplywechatwms/reOpenBox',
/**
* 理货明细撤销 * 理货明细撤销
*/ */
cancelTallyDetail: API_BASE + '/supplywechatwms/cancelTallyDetail', cancelTallyDetail: API_BASE + '/supplywechatwms/cancelTallyDetail',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment