diff --git a/src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js b/src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js index 89ddc04..69ce7a0 100644 --- a/src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js +++ b/src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js @@ -97,7 +97,7 @@ export function printTCPPackageLabelNoPreview(printList) { LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); LODOP.SET_PRINT_STYLEA(0,"FontSize",12); LODOP.SET_PRINT_STYLEA(0,"Bold",1); - LODOP.ADD_PRINT_TEXT(115,274,99,25,"MFG:"+printData.tcpValue); + LODOP.ADD_PRINT_TEXT(115,274,99,25,"MFG:"+printData.tcpValue+"g"); LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); LODOP.SET_PRINT_STYLEA(0,"FontSize",12); LODOP.SET_PRINT_STYLEA(0,"Bold",1); @@ -114,8 +114,8 @@ export function printTCPPackageLabelNoPreview(printList) { } // LODOP.PRINT_DESIGN(); - LODOP.PREVIEW(); - // LODOP.PRINT(); + // LODOP.PREVIEW(); + LODOP.PRINT(); console.log("操作成功!") } } diff --git a/src/views/modules/production/bagLabelsTCP.vue b/src/views/modules/production/bagLabelsTCP.vue index 9d7da0e..cf08d36 100644 --- a/src/views/modules/production/bagLabelsTCP.vue +++ b/src/views/modules/production/bagLabelsTCP.vue @@ -40,6 +40,7 @@ export default { scanTime:'', scheduleJob:'', nowTime:'', + weight:undefined, } }, mounted() { @@ -59,7 +60,14 @@ export default { return this.searchData.seqNo; } }, - watch: {}, + watch: { + flag(newVal,oldVal){ + if (newVal === false){ + this.number = undefined + this.weight = undefined + } + } + }, methods: { handleBeforeUnload() { this.closeWeighTPC(); @@ -203,7 +211,7 @@ export default { this.fileTitle = "文件名 (" + 0 + "/" + 0 + ")"; this.photoUrl = null; // this.scanTime= ''; - this.closeWeighTPC(); + // this.closeWeighTPC(); this.nowTime=''; this.stopSchedule() }, @@ -215,6 +223,8 @@ export default { closeWeighTPC(data).then(({data}) => { }) + this.cleanAll() + this.searchData.seqNo=undefined; }, checkIsPacking() { let params = { @@ -242,17 +252,32 @@ export default { this.soScheduleRouting = {}; }) }, - - printPackageLabelNoPreview(params) { - if (!params) { - this.$message.warning("参数为空") + printLabel() { + if (!this.soScheduleRouting.site) { + this.$message.warning("请先扫描派工单号") + return + } + this.searchData.flag = 'Y' + this.flag = true + }, + printPackageLabelNoPreview() { + let params = { + previousSeqNo: this.soScheduleRouting.previousSeqNo, + site: this.soScheduleRouting.site, + orderNo: this.soScheduleRouting.orderNo + } + if (!this.number || !this.weight){ + this.$message.warning("请先输入数量和重量") return } + params.number = this.number; // 发起请求 getPackagePrintDataList(params).then(({data}) => { if (data && data.code === 0) { + data.rows[0].tcpValue=this.weight printTCPPackageLabelNoPreview(data.rows); this.searchData.flag = ''; + this.flag = false } else { this.$message.warning(data.msg) } @@ -336,8 +361,10 @@ export default { - 重连设备 + 取消连接 + 手工打印零数标签 +
@@ -491,25 +518,29 @@ export default {
- - - - - - - - - - - - - - - - - - - + + + + + + + + + +
+
+ 确定 +
+
+
diff --git a/src/views/modules/production/scanForm.vue b/src/views/modules/production/scanForm.vue index f49e57e..ba8668b 100644 --- a/src/views/modules/production/scanForm.vue +++ b/src/views/modules/production/scanForm.vue @@ -136,7 +136,7 @@ export default { return; } let arr = this.model.label.split(";"); - if (arr.length < 5){ + if (arr.length < 5){//site;partNo;qty;seqNo;printId if (!arr[3]){ this.$message.warning("标签jobNo为空") return;