Commit 968b30c4 by liangjianmin

检测标签重复打印

parent 413f8e65
Showing with 30 additions and 5 deletions
...@@ -187,7 +187,30 @@ export default { ...@@ -187,7 +187,30 @@ export default {
return false; return false;
} }
this.request(API.printLabel, 'POST', this.form, false).then(res => { let params = Object.assign(this.form, {
is_add: 0
});
this.request(API.checkRepeatPrintLabel, 'POST', params, true).then(res => {
if (res.err_code === 0) {
this.printLabelChange();
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
confirmText: '继续打印',
success: res => {
if (res.confirm) {
this.printLabelChange();
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
});
},
printLabelChange() {
this.request(API.printLabel, 'POST', this.form, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.printLabelData = res.data; this.printLabelData = res.data;
this.wstyptll_id = res.data[0].wstyptll_id; this.wstyptll_id = res.data[0].wstyptll_id;
...@@ -196,7 +219,6 @@ export default { ...@@ -196,7 +219,6 @@ export default {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: res.err_msg, content: res.err_msg,
showCancel: false,
confirmText: '关闭' confirmText: '关闭'
}); });
} }
...@@ -331,7 +353,7 @@ export default { ...@@ -331,7 +353,7 @@ export default {
} }
}, },
delErpOrderSnCodeManage() { delErpOrderSnCodeManage() {
this.request(API.delWstyptllIdErpOrderSnCodeManage, 'POST', { wstyptll_id: this.wstyptll_id }, true).then(res => { this.request(API.delWstyptllIdErpOrderSnCodeManage, 'POST', { wstyptll_id: this.wstyptll_id }, false).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
} else { } else {
uni.showModal({ uni.showModal({
......
...@@ -104,13 +104,16 @@ const API = { ...@@ -104,13 +104,16 @@ const API = {
/** /**
* 作废条码 * 作废条码
*/ */
delErpOrderSnCodeManage: API_BASE + '/supplywechatwms/delErpOrderSnCodeManage' delErpOrderSnCodeManage: API_BASE + '/supplywechatwms/delErpOrderSnCodeManage',
/**
* 检测标签重复打印
*/
checkRepeatPrintLabel: API_BASE + '/supplywechatwms/checkRepeatPrintLabel'
} }
module.exports = { module.exports = {
API API
} }
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