Commit bd2b4f76 by LJM

bug

parent 9e8ac006
......@@ -714,6 +714,7 @@
goods_check_pic: item.goods_check_pic, // 商检的必须上传图片
wstydl_id: item.wstydl_id, // 理货明细ID
erp_order_sn: this.erp_order_sn, // 入仓号
box_sn: item.box_sn,
wsty_id: this.wsty_id, // 箱子id
is_goods_check: item.is_goods_check //是否商检
}));
......@@ -870,10 +871,14 @@
* 关单封箱
*/
closeBox() {
this.net_weight_total = this.form
.filter(item => item.tally_status === 3) // 筛选出 tally_status 等于 3 的数据
.reduce((acc, curr) => acc + parseFloat(curr.net_weight), 0); // 将 net_weight 转换为数字并计算总和
this.title = `入仓号${this.erp_order_sn}已经全部验货完毕是否更换新的箱子?\n\n总净重:${this.net_weight_total}`;
this.net_weight_total = this.form.reduce((total, item) => {
// 如果 tally_status 等于 3 并且 box_sn 等于 box_sn 变量,则累加 net_weight 到总和中
if (item.tally_status === 3 && item.box_sn === this.box_sn) {
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();
},
/**
......
......@@ -310,7 +310,18 @@
});
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 = {
*/
closeBox: API_BASE + '/supplywechatwms/closeBox',
/**
* 重新开箱
*/
reOpenBox: API_BASE + '/supplywechatwms/reOpenBox',
/**
* 理货明细撤销
*/
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