diff --git a/src/api/production/generateReport.js b/src/api/production/generateReport.js index d32a666..171372f 100644 --- a/src/api/production/generateReport.js +++ b/src/api/production/generateReport.js @@ -12,6 +12,8 @@ export const getSOScheduleRoutingData = data => createAPI(`dailyPlan/getSOSchedu export const getSOScheduleRoutingDataPrint = data => createAPI(`dailyPlan/getSOScheduleRoutingDataPrint`, 'post', data); export const linkWeighTPC = data => createAPI(`dailyPlan/linkWeighTPC`, 'post', data); +export const reLinkWeighTPC = data => createAPI(`dailyPlan/reLinkWeighTPC`, 'post', data); +export const closeWeighTPC = data => createAPI(`dailyPlan/closeWeighTPC`, 'post', data); // 获取生产报告信息 export const saveGenerateReportForSchedule = data => createAPI(`dailyPlan/saveGenerateReportForSchedule`, 'post', data); diff --git a/src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js b/src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js index 597d0a4..ebce542 100644 --- a/src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js +++ b/src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js @@ -111,8 +111,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 997646a..0271606 100644 --- a/src/views/modules/production/bagLabelsTCP.vue +++ b/src/views/modules/production/bagLabelsTCP.vue @@ -4,6 +4,8 @@ import { getPackagePrintDataList, getSOScheduleRoutingDataPrint, linkWeighTPC, + closeWeighTPC, + reLinkWeighTPC, } from "../../../api/production/generateReport"; import { getPhotoAddressData @@ -33,14 +35,21 @@ export default { showviewer: false, url: '', photoUrl: '', + scanTime:'', + scheduleJob:'', } }, mounted() { this.$refs.focusInput.focus() + window.addEventListener('beforeunload', this.handleBeforeUnload); }, activated() { this.$refs.focusInput.focus() }, + beforeDestroy(){ + this.closeWeighTPC(); + window.removeEventListener('beforeunload', this.handleBeforeUnload); + }, computed: { seqNo: function () { return this.searchData.seqNo; @@ -48,6 +57,9 @@ export default { }, watch: {}, methods: { + handleBeforeUnload() { + this.closeWeighTPC(); + }, selectBySeqNo() { // 查询数据 this.getSOScheduleRoutingData(); @@ -115,6 +127,17 @@ export default { this.fileName = null; this.fileTitle = "文件名 (" + 0 + "/" + 0 + ")"; this.photoUrl = null; + // this.scanTime= ''; + this.closeWeighTPC(); + }, + closeWeighTPC(){ + this.scanTime= ''; + let data={ + site:'1' + } + closeWeighTPC(data).then(({data}) => { + + }) }, checkIsPacking() { let params = {