Commit 094a0da5 by LJM

优化

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