Commit e750f4ab by LJM

标签打印

parent 1e28a8b1
......@@ -342,7 +342,8 @@
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 => {
if (res.err_code === 0) {
this.printLabelChange();
......@@ -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() {
this.request(API.printLabel, 'POST', this.form, true).then(res => {
......
......@@ -53,11 +53,11 @@
</template>
<script>
import { API } from '@/util/api.js';
import { getPlatform } from '@/util/util.js';
const ToBase64 = require('../../util/base64gb2312.js');
import { API } from '@/util/api.js';
import { getPlatform } from '@/util/util.js';
const ToBase64 = require('../../util/base64gb2312.js');
export default {
export default {
data() {
return {
print_number: 0,
......@@ -180,6 +180,8 @@ export default {
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 => {
if (res.err_code === 0) {
this.printLabelData = res.data;
......@@ -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 {
},
delErpOrderSnCodeManage() {
this.request(API.delWstyptllIdErpOrderSnCodeManage, 'POST', { wstyptll_id: this.wstyptll_id }, true).then(res => {
if (res.err_code === 0) {
} else {
if (res.err_code === 0) {} else {
uni.showModal({
title: '提示',
content: res.err_msg,
......@@ -359,9 +388,9 @@ export default {
}
}
}
};
};
</script>
<style scoped lang="scss">
@import '../../assets/css/tag/print.scss';
@import '../../assets/css/tag/print.scss';
</style>
\ No newline at end of file
const API_BASE = 'https://api.ichunt.com';
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API_BASE_WMS = 'https://wms.ichunt.net'; //WMS系统
// const API_BASE = 'https://api.ichunt.com';
// const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
// const API_BASE_WMS = 'https://wms.ichunt.net'; //WMS系统
// const API_BASE = 'http://api.liexin.com';
// const API_BASE_OSS = 'http://image.liexindev.net';
// const API_BASE_WMS = 'http://wms.liexindev.net'; //WMS系统
const API_BASE = 'http://api.liexin.com';
const API_BASE_OSS = 'http://image.liexindev.net';
const API_BASE_WMS = 'http://wms.liexindev.net'; //WMS系统
const API = {
/**
......@@ -132,6 +132,10 @@ const API = {
*/
checkRepeatPrintLabel: API_BASE + '/supplywechatwms/checkRepeatPrintLabel',
/**
* 入仓号是否理货
*/
checkIsTallyGoods: API_BASE + '/supplywechatwms/checkIsTallyGoods',
/**
* 扫描入库
*/
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