Commit e750f4ab by LJM

标签打印

parent 1e28a8b1
...@@ -342,7 +342,8 @@ ...@@ -342,7 +342,8 @@
is_add: 0 is_add: 0
}); });
this.request(API.checkIsTallyGoods, 'POST', params, true).then(res => {
if (res.err_code === 0) {
this.request(API.checkRepeatPrintLabel, 'POST', params, true).then(res => { this.request(API.checkRepeatPrintLabel, 'POST', params, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.printLabelChange(); this.printLabelChange();
...@@ -361,6 +362,39 @@ ...@@ -361,6 +362,39 @@
}); });
} }
}); });
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
confirmText: '继续打印',
success: res => {
if (res.confirm) {
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('用户点击取消');
}
}
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
});
}, },
printLabelChange() { printLabelChange() {
this.request(API.printLabel, 'POST', this.form, true).then(res => { this.request(API.printLabel, 'POST', this.form, true).then(res => {
......
...@@ -53,11 +53,11 @@ ...@@ -53,11 +53,11 @@
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
import { getPlatform } from '@/util/util.js'; import { getPlatform } from '@/util/util.js';
const ToBase64 = require('../../util/base64gb2312.js'); const ToBase64 = require('../../util/base64gb2312.js');
export default { export default {
data() { data() {
return { return {
print_number: 0, print_number: 0,
...@@ -180,6 +180,8 @@ export default { ...@@ -180,6 +180,8 @@ export default {
return false; return false;
} }
this.request(API.checkIsTallyGoods, 'POST', { erp_order_sn: this.form.erp_order_sn, batch: this.form.batch }, true).then(res => {
if (res.err_code === 0) {
this.request(API.printLabel, 'POST', { erp_order_sn: this.form.erp_order_sn, batch: this.form.batch, label_num: this.form.label_num, is_add: 1, print_type: this.form.print_type }, true).then(res => { this.request(API.printLabel, 'POST', { erp_order_sn: this.form.erp_order_sn, batch: this.form.batch, label_num: this.form.label_num, is_add: 1, print_type: this.form.print_type }, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.printLabelData = res.data; this.printLabelData = res.data;
...@@ -194,6 +196,34 @@ export default { ...@@ -194,6 +196,34 @@ export default {
}); });
} }
}); });
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
confirmText: '继续打印',
success: res => {
if (res.confirm) {
this.request(API.printLabel, 'POST', { erp_order_sn: this.form.erp_order_sn, batch: this.form.batch, label_num: this.form.label_num, is_add: 1, print_type: this.form.print_type }, true).then(res => {
if (res.err_code === 0) {
this.printLabelData = res.data;
this.wstyptll_id = res.data[0].wstyptll_id;
this.sendDataChange(); //发送数据
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false,
confirmText: '关闭'
});
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
});
}, },
/** /**
* 向蓝牙发送数据 * 向蓝牙发送数据
...@@ -324,8 +354,7 @@ export default { ...@@ -324,8 +354,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 }, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {} else {
} else {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: res.err_msg, content: res.err_msg,
...@@ -359,9 +388,9 @@ export default { ...@@ -359,9 +388,9 @@ export default {
} }
} }
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '../../assets/css/tag/print.scss'; @import '../../assets/css/tag/print.scss';
</style> </style>
\ No newline at end of file
const API_BASE = 'https://api.ichunt.com'; // const API_BASE = 'https://api.ichunt.com';
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统 // const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API_BASE_WMS = 'https://wms.ichunt.net'; //WMS系统 // const API_BASE_WMS = 'https://wms.ichunt.net'; //WMS系统
// const API_BASE = 'http://api.liexin.com'; const API_BASE = 'http://api.liexin.com';
// const API_BASE_OSS = 'http://image.liexindev.net'; const API_BASE_OSS = 'http://image.liexindev.net';
// const API_BASE_WMS = 'http://wms.liexindev.net'; //WMS系统 const API_BASE_WMS = 'http://wms.liexindev.net'; //WMS系统
const API = { const API = {
/** /**
...@@ -132,6 +132,10 @@ const API = { ...@@ -132,6 +132,10 @@ const API = {
*/ */
checkRepeatPrintLabel: API_BASE + '/supplywechatwms/checkRepeatPrintLabel', checkRepeatPrintLabel: API_BASE + '/supplywechatwms/checkRepeatPrintLabel',
/** /**
* 入仓号是否理货
*/
checkIsTallyGoods: API_BASE + '/supplywechatwms/checkIsTallyGoods',
/**
* 扫描入库 * 扫描入库
*/ */
szScanIn: API_BASE + '/supplywechatwms/szScanIn', szScanIn: API_BASE + '/supplywechatwms/szScanIn',
......
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