Commit 094a0da5 by LJM

优化

parent 0c715b03
......@@ -381,7 +381,7 @@
this.request(API.getBoxNumByDetailId, 'POST', { wstydl_id: wstydl_id }, true).then(json => {
if (json.err_code === 0) {
if (json.data > 1) {
let text = `${item.erp_order_sn}货物分部在${this.box_sn}${json.data.length}个子箱,请确认是否全部取消`;
let text = `${item.erp_order_sn}货物分部在${this.box_sn}${json.data}个子箱,请确认是否全部取消`;
uni.showModal({
title: '提示',
content: text,
......@@ -543,10 +543,10 @@
this.request(API.addSCTallyData, 'POST', params, true).then(res => {
if (res.code === 0) {
uni.showModal({
title: '',
content: '打印成功,请查看打印机',
showCancel: false
});
this.updateTagPrintTimes(this.box_sn);
} else {
uni.showToast({
title: res.err_msg,
......@@ -556,6 +556,14 @@
});
},
/**
* 更新统计打印标签次数
*/
updateTagPrintTimes(tag_no) {
this.request(API.updateTagPrintTimes, 'POST', { tag_no: tag_no }, true).then(res => {
});
},
/**
* 取消装箱
*/
canel() {
......
......@@ -339,6 +339,8 @@
this.printConfirm(res.data);
} else {
//多个时候
this.allChecked = false;
this.checkboxItems = [];
res.data.forEach(item => {
this.checkboxItems.push({
value: item,
......@@ -377,6 +379,7 @@
title: '打印箱号成功',
icon: 'success'
})
this.updateTagPrintTimes(data.join(','));
setTimeout(() => {
this.close();
this.flag = false;
......@@ -393,6 +396,14 @@
});
},
/**
* 更新统计打印标签次数
*/
updateTagPrintTimes(tag_no) {
this.request(API.updateTagPrintTimes, 'POST', { tag_no: tag_no }, true).then(res => {
});
},
/**
* 全选复选框状态变化
* @param {Object} e
*/
......
......@@ -1037,7 +1037,7 @@
this.request(API.getBoxNumByDetailId, 'POST', { wstydl_id: this.form[index].wstydl_id }, true).then(json => {
if (json.err_code === 0) {
if (json.data > 1) {
let text = `${this.erp_order_sn}货物分部在${this.box_sn}${json.data.length}个子箱,请确认是否全部取消`;
let text = `${this.erp_order_sn}货物分部在${this.box_sn}${json.data}个子箱,请确认是否全部取消`;
uni.showModal({
title: '提示',
content: text,
......@@ -1210,6 +1210,8 @@
this.printConfirm(res.data);
} else {
//多个时候
this.allChecked = false;
this.checkboxItems = [];
res.data.forEach(item => {
this.checkboxItems.push({
value: item,
......@@ -1248,6 +1250,7 @@
title: '打印箱号成功',
icon: 'success'
})
this.updateTagPrintTimes(data.join(','));
setTimeout(() => {
this.close();
}, 2000)
......@@ -1260,6 +1263,14 @@
});
},
/**
* 更新统计打印标签次数
*/
updateTagPrintTimes(tag_no) {
this.request(API.updateTagPrintTimes, 'POST', { tag_no: tag_no }, true).then(res => {
});
},
/**
* 全选复选框状态变化
* @param {Object} e
*/
......
......@@ -39,10 +39,10 @@
this.request(API.addSCTallyData, 'POST', params, true).then(res => {
if (res.code === 0) {
uni.showModal({
title: '',
content: '打印成功,请查看打印机',
showCancel: false
});
this.updateTagPrintTimes(this.box_sn);
} else {
uni.showToast({
title: res.err_msg,
......@@ -52,6 +52,14 @@
});
},
/**
* 更新统计打印标签次数
*/
updateTagPrintTimes(tag_no) {
this.request(API.updateTagPrintTimes, 'POST', { tag_no: tag_no }, true).then(res => {
});
},
/**
* 清空数据
*/
clearInput() {
......
......@@ -917,7 +917,7 @@
this.request(API.getBoxNumByDetailId, 'POST', { wstydl_id: this.form[index].wstydl_id }, true).then(json => {
if (json.err_code === 0) {
if (json.data > 1) {
let text = `${this.form[this.formIndex].erp_order_sn}货物分部在${this.box_sn}${json.data.length}个子箱,请确认是否全部取消`;
let text = `${this.form[this.formIndex].erp_order_sn}货物分部在${this.box_sn}${json.data}个子箱,请确认是否全部取消`;
uni.showModal({
title: '提示',
content: text,
......
......@@ -341,7 +341,11 @@ const API = {
/**
* app 根据理货明细获取箱数
*/
getBoxNumByDetailId: API_BASE + '/supplywechatwms/getBoxNumByDetailId'
getBoxNumByDetailId: API_BASE + '/supplywechatwms/getBoxNumByDetailId',
/**
* 更新统计打印标签次数
*/
updateTagPrintTimes: API_BASE + '/supplywechatwms/updateTagPrintTimes'
}
......
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