From 13daee251ddacd6836c44def8093373d6654f4bb Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 2 Aug 2024 09:08:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=89=93=E5=8D=B0=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../package/job/overPackageJobDetail.vue | 137 ++++++++---------- .../package/record/overPackageRecord.vue | 127 ++++++++-------- .../purchaseReceipt/job/receiptDetail.vue | 51 ++++++- 3 files changed, 174 insertions(+), 141 deletions(-) diff --git a/src/pages/package/job/overPackageJobDetail.vue b/src/pages/package/job/overPackageJobDetail.vue index eb4bb261..24b8f1d0 100644 --- a/src/pages/package/job/overPackageJobDetail.vue +++ b/src/pages/package/job/overPackageJobDetail.vue @@ -42,7 +42,7 @@ 打印设置 - + @@ -106,7 +106,7 @@ import comScanPackagePack from '@/pages/package/coms/comScanPackagePack.vue' import jobTop from '@/mycomponents/job/jobTop.vue' import workStation from '@/mycomponents/workStation/workStation.vue' - import print from '@/mycomponents/print/print.vue' + // import print from '@/mycomponents/print/print.vue' export default { name: 'issueDetail', @@ -117,7 +117,7 @@ comScanPackagePack, jobTop, workStation, - print + // print }, data() { return { @@ -129,8 +129,8 @@ scanOptions: [], jobStatus: "", - printDeafult: {}, //默认打印机 - templateDeafult: {} //默认的模板 + // printDeafult: {}, //默认打印机 + // templateDeafult: {} //默认的模板 }; }, @@ -229,18 +229,18 @@ that.jobStatus = res.data.status that.subList = res.data.subList; that.detailSource = getDataSource(that.detailSource, that.subList) - this.$nextTick(() => { - if (uni.getStorageSync('overPackageJobDetailPointParams')) { - const overPackageJobDetailPointParams = uni.getStorageSync( - 'overPackageJobDetailPointParams') - this.jobContent.printerUuid = overPackageJobDetailPointParams - .printDeafult.value; - this.jobContent.modelCode = overPackageJobDetailPointParams - .templateDeafult.value; - this.$refs.printService.setDefaultData(overPackageJobDetailPointParams - .printDeafult, overPackageJobDetailPointParams.templateDeafult) - } - }) + // this.$nextTick(() => { + // if (uni.getStorageSync('overPackageJobDetailPointParams')) { + // const overPackageJobDetailPointParams = uni.getStorageSync( + // 'overPackageJobDetailPointParams') + // this.jobContent.printerUuid = overPackageJobDetailPointParams + // .printDeafult.value; + // this.jobContent.modelCode = overPackageJobDetailPointParams + // .templateDeafult.value; + // this.$refs.printService.setDefaultData(overPackageJobDetailPointParams + // .printDeafult, overPackageJobDetailPointParams.templateDeafult) + // } + // }) setTimeout(r => { that.resizeCollapse(); }, 100) @@ -290,14 +290,14 @@ // }, submit() { - if(!this.jobContent.printerUuid){ - this.showErrorMessage("请选择打印机") - return; - } - if(!this.jobContent.modelCode){ - this.showErrorMessage("请选择打印模板") - return; - } + // if(!this.jobContent.printerUuid){ + // this.showErrorMessage("请选择打印机") + // return; + // } + // if(!this.jobContent.modelCode){ + // this.showErrorMessage("请选择打印模板") + // return; + // } //目前任务只到一个库位 var itemCodes = [] let locationCode = this.detailSource[0].toLocationCode @@ -364,52 +364,41 @@ console.log(params); overPageSubmit(params).then(res => { uni.hideLoading() - if (res.data == '打印任务已发送,等待打印机处理!') { - this.showCommitSuccessMessage(res.data) - const overPackageJobDetailPointParams = { - printDeafult: this.printDeafult, - templateDeafult: this.templateDeafult, - } - uni.setStorageSync('overPackageJobDetailPointParams', overPackageJobDetailPointParams) - } else { - this.showErrorMessage(res.data) - } - // if(res.data){ + // if (res.data == '打印任务已发送,等待打印机处理!') { // this.showCommitSuccessMessage(res.data) // const overPackageJobDetailPointParams = { - // printDeafult:this.printDeafult, - // templateDeafult:this.templateDeafult, + // printDeafult: this.printDeafult, + // templateDeafult: this.templateDeafult, // } - // uni.setStorageSync('overPackageJobDetailPointParams',overPackageJobDetailPointParams) - - // }else{ - // this.showErrorMessage("提交失败[" + res.msg + "]") - // } - // if (res.data) { - // let list = []; - // res.data.forEach(item => { - // list.push({ - // itemCode: item.itemCode, // 物品代码 - // itemName: item.itemName, // 物品名称 - // packName: item.packName, // 包装名称 - // packageCode: item.number, // 包装号 - // batch: item.batch, //批次 - // parentNumber: item.parentNumber, //父包装号 - // itemType: item.itemType, //物料类型 - // asnNumber: item.asnNumber, //ASN - // supplierCode: item.supplierCode, // 供应商 - // qty: item.qty, // 数量 - // printTimes: getCurrDateTime(), // 打印时间 - // productionLineCode: item.productionLineCode, //生产线 - // barcodeString: item.barcodeString, // 标签信息 - // barcodeBase64: '', - // }) - // }) - // this.showCommitSuccessMessage("提交成功
生成翻包记录
", list) - + // uni.setStorageSync('overPackageJobDetailPointParams', overPackageJobDetailPointParams) // } else { - // this.showErrorMessage("提交失败[" + res.msg + "]") + // this.showErrorMessage(res.data) // } + if (res.data) { + let list = []; + res.data.forEach(item => { + list.push({ + itemCode: item.itemCode, // 物品代码 + itemName: item.itemName, // 物品名称 + packName: item.packName, // 包装名称 + packageCode: item.number, // 包装号 + batch: item.batch, //批次 + parentNumber: item.parentNumber, //父包装号 + itemType: item.itemType, //物料类型 + asnNumber: item.asnNumber, //ASN + supplierCode: item.supplierCode, // 供应商 + qty: item.qty, // 数量 + printTimes: getCurrDateTime(), // 打印时间 + productionLineCode: item.productionLineCode, //生产线 + barcodeString: item.barcodeString, // 标签信息 + barcodeBase64: '', + }) + }) + this.showCommitSuccessMessage("提交成功
生成翻包记录
", list) + + } else { + this.showErrorMessage("提交失败[" + res.msg + "]") + } }).catch(error => { uni.hideLoading() this.showErrorMessage(error) @@ -498,14 +487,14 @@ this.jobContent.creator = creator; return this.jobContent; }, - printCode(e) { - this.jobContent.printerUuid = e.value; - this.printDeafult = e - }, - templateCode(e) { - this.jobContent.modelCode = e.value; - this.templateDeafult = e - }, + // printCode(e) { + // this.jobContent.printerUuid = e.value; + // this.printDeafult = e + // }, + // templateCode(e) { + // this.jobContent.modelCode = e.value; + // this.templateDeafult = e + // }, cancel() { let that = this; this.$refs.comMessage.showQuestionMessage('是否要清空已扫描的物料和目标库位信息?', res => { diff --git a/src/pages/package/record/overPackageRecord.vue b/src/pages/package/record/overPackageRecord.vue index 21dd76bb..2b904d94 100644 --- a/src/pages/package/record/overPackageRecord.vue +++ b/src/pages/package/record/overPackageRecord.vue @@ -5,7 +5,7 @@ - + @@ -112,7 +112,7 @@ import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import packUnit from '@/mycomponents/qty/packUnit.vue' import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' - import print from '@/mycomponents/print/print.vue' + // import print from '@/mycomponents/print/print.vue' import { getCurrDateTime @@ -131,7 +131,7 @@ recordComDetailCard, packUnit, winComScanBalance, - print + // print }, onLoad(option){ uni.setNavigationBarTitle({ @@ -160,22 +160,21 @@ itemCode: "", resultData: {}, - printDeafult:{},//默认打印机 - templateDeafult:{}//默认的模板 + // printDeafult:{},//默认打印机 + // templateDeafult:{}//默认的模板 }; }, onLoad() { this.getBusinessType(); - this.$nextTick(()=>{ - if(uni.getStorageSync('overPackageRecordPointParams')){ - const overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams') - this.dataContent.printerUuid = overPackageRecordPointParams.printDeafult.value; - this.dataContent.modelCode = overPackageRecordPointParams.templateDeafult.value; - this.$refs.printService.setDefaultData(overPackageRecordPointParams.printDeafult,overPackageRecordPointParams.templateDeafult) - } - - }) + // this.$nextTick(()=>{ + // if(uni.getStorageSync('overPackageRecordPointParams')){ + // const overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams') + // this.dataContent.printerUuid = overPackageRecordPointParams.printDeafult.value; + // this.dataContent.modelCode = overPackageRecordPointParams.templateDeafult.value; + // this.$refs.printService.setDefaultData(overPackageRecordPointParams.printDeafult,overPackageRecordPointParams.templateDeafult) + // } + // }) }, //返回首页 onNavigationBarButtonTap(e) { @@ -359,14 +358,14 @@ } }, commit() { - if(!this.dataContent.printerUuid){ - this.showErrorMessage("请选择打印机") - return; - } - if(!this.dataContent.modelCode){ - this.showErrorMessage("请选择打印模板") - return; - } + // if(!this.dataContent.printerUuid){ + // this.showErrorMessage("请选择打印机") + // return; + // } + // if(!this.dataContent.modelCode){ + // this.showErrorMessage("请选择打印模板") + // return; + // } if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { if (!this.toPackUnit || this.toPackUnit == "包装规格") { this.showErrorMessage("请选择目标包装规格") @@ -412,41 +411,41 @@ overPackageRecordSubmit(params).then(res => { uni.hideLoading() - if (res.data == '打印任务已发送,等待打印机处理!') { - this.showCommitSuccessMessage(res.data) - const overPackageRecordPointParams = { - printDeafult:this.printDeafult, - templateDeafult:this.templateDeafult, - } - uni.setStorageSync('overPackageRecordPointParams',overPackageRecordPointParams) - this.detailSource = [] - }else { - this.showErrorMessage(res.data) - } - // if (res.data) { - // // let list = [] - // // res.data.forEach(item => { - // // list.push({ - // // itemCode: item.itemCode, // 物品代码 - // // itemName: item.itemName, // 物品名称 - // // packName: item.packName, // 包装名称 - // // packageCode: item.toPackingNumber, // 包装号 - // // batch: item.toBatch, //批次 - // // parentNumber: item.parentNumber, //父包装号 - // // itemType: item.itemType, //物料类型 - // // asnNumber: item.asnNumber, //ASN - // // supplierCode: item.supplierCode, // 供应商 - // // qty: item.qty, // 数量 - // // printTimes: getCurrDateTime(), // 打印时间 - // // productionLineCode: item.productionLineCode, //生产线 - // // barcodeString: item.barcodeString, // 标签信息 - // // barcodeBase64: '', - // // }) - // // }) - // this.showCommitSuccessMessage(res.msg) - // } else { - // this.showErrorMessage("提交失败[" + res.msg + "]") + // if (res.data == '打印任务已发送,等待打印机处理!') { + // this.showCommitSuccessMessage(res.data) + // const overPackageRecordPointParams = { + // printDeafult:this.printDeafult, + // templateDeafult:this.templateDeafult, + // } + // uni.setStorageSync('overPackageRecordPointParams',overPackageRecordPointParams) + // this.detailSource = [] + // }else { + // this.showErrorMessage(res.data) // } + if (res.data) { + let list = [] + res.data.forEach(item => { + list.push({ + itemCode: item.itemCode, // 物品代码 + itemName: item.itemName, // 物品名称 + packName: item.packName, // 包装名称 + packageCode: item.toPackingNumber, // 包装号 + batch: item.toBatch, //批次 + parentNumber: item.parentNumber, //父包装号 + itemType: item.itemType, //物料类型 + asnNumber: item.asnNumber, //ASN + supplierCode: item.supplierCode, // 供应商 + qty: item.qty, // 数量 + printTimes: getCurrDateTime(), // 打印时间 + productionLineCode: item.productionLineCode, //生产线 + barcodeString: item.barcodeString, // 标签信息 + barcodeBase64: '', + }) + }) + this.showCommitSuccessMessage(res.msg) + } else { + this.showErrorMessage("提交失败[" + res.msg + "]") + } }).catch(error => { uni.hideLoading() this.showErrorMessage(error) @@ -487,14 +486,14 @@ this.dataContent.creator = creator; return this.dataContent; }, - printCode(e){ - this.dataContent.printerUuid = e.value; - this.printDeafult = e - }, - templateCode(e){ - this.dataContent.modelCode = e.value; - this.templateDeafult = e - }, + // printCode(e){ + // this.dataContent.printerUuid = e.value; + // this.printDeafult = e + // }, + // templateCode(e){ + // this.dataContent.modelCode = e.value; + // this.templateDeafult = e + // }, showMessage(message) { this.$refs.comMessage.showMessage(message, res => { if (res) {} diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index 8bd0d8f2..f133e82c 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -38,7 +38,18 @@ - + @@ -106,6 +117,7 @@ import locationCompare from '@/mycomponents/location/locationCompare.vue' import comReceiptDetailCard from '@/pages/purchaseReceipt/coms/comReceiptDetailCard.vue' import jobTopAsn from '@/mycomponents/job/jobTopAsn.vue' + // import print from '@/mycomponents/print/print.vue' import { productDismantleJobClose } from '@/api/request2.js'; @@ -121,7 +133,8 @@ winScanPack, comReceiptDetailCard, locationCompare, - jobTopAsn + jobTopAsn, + // print }, data() { return { @@ -145,6 +158,10 @@ switchCode: "", isCheckLocation: 'purchaseReceiptLocationCodeValidate', //校验收货库位 reasonText: "", + + + // printDeafult: {}, //默认打印机 + // templateDeafult: {} //默认的模板 }; }, @@ -247,10 +264,21 @@ that.toLocationCode = that.jobToLocationCode; } that.isAllReceived = false; + // if (uni.getStorageSync('purchaseReceiptDetailPointParams')) { + // const purchaseReceiptDetailPointParams = uni.getStorageSync( + // 'purchaseReceiptDetailPointParams') + // this.jobContent.printerUuid = purchaseReceiptDetailPointParams + // .printDeafult.value; + // this.jobContent.modelCode = purchaseReceiptDetailPointParams + // .templateDeafult.value; + // this.$refs.printService.setDefaultData(purchaseReceiptDetailPointParams + // .printDeafult, purchaseReceiptDetailPointParams.templateDeafult) + // } //如果箱码扫描自动扫描,ASN不自动扫描 if (this.scanMessage) { this.$refs.scanPopup.simulateScan(this.scanMessage); } + } else { that.showMessage('列表数据为0'); @@ -495,6 +523,16 @@ this.showCommitSuccessMessage("提交成功
生成采购收货记录
" + res.data.number) } else { + // if (res.data == '打印任务已发送,等待打印机处理!') { + // this.showCommitSuccessMessage(res.data) + // const purchaseReceiptDetailPointParams = { + // printDeafult: this.printDeafult, + // templateDeafult: this.templateDeafult, + // } + // uni.setStorageSync('purchaseReceiptDetailPointParams', purchaseReceiptDetailPointParams) + // } else { + // this.showErrorMessage(res.data) + // } uni.showLoading({ title: "提交成功,将跳转到打印页面", mask: true @@ -593,7 +631,14 @@ this.jobContent.creator = creator; return this.jobContent; }, - +// printCode(e) { +// this.jobContent.printerUuid = e.value; +// this.printDeafult = e +// }, +// templateCode(e) { +// this.jobContent.modelCode = e.value; +// this.templateDeafult = e +// }, checkLocation() { var isPass = true; if (this.toLocationCode == "" || this.toLocationCode == null) { From f196c2c4e8b1a8c7171703fd37ea22f92d33dcb4 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 2 Aug 2024 09:25:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?PDA=E9=A2=84=E7=94=9F=E4=BA=A7=E6=8A=A5?= =?UTF-8?q?=E5=B7=A5=E5=92=8C=E8=A3=85=E9=85=8D=E6=8A=A5=E5=B7=A5=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E7=AE=B1=E7=A0=81=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8C=85=E8=A3=85=E4=B8=AA=E6=95=B0=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/qty/recommendQtyEdit.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mycomponents/qty/recommendQtyEdit.vue b/src/mycomponents/qty/recommendQtyEdit.vue index ef5ce407..db2ad1e1 100644 --- a/src/mycomponents/qty/recommendQtyEdit.vue +++ b/src/mycomponents/qty/recommendQtyEdit.vue @@ -62,6 +62,7 @@ import uom from '@/mycomponents/qty/uom.vue' import stdUom from '@/mycomponents/qty/stdUom.vue' import packUnit from '@/mycomponents/qty/packUnit.vue' +import { nextTick } from 'vue'; export default { components: { uom, @@ -136,8 +137,12 @@ this.recommendQty = Number(recommendQty); this.labelQty = Number(labelQty); this.allQty = Number(handleQty) + // this.dataContent = item + // console.log(333,this.allQty) + // console.log(222,this.dataContent.packQty) setTimeout(res => { this.$refs.popup.open('bottom') + this.stdCount = Math.ceil(this.allQty / this.dataContent.packQty); }, 500) }, openRecordEditPopup(labelQty) { From 720ccb7be8f0cad1f021035980f6aaccb70bae38 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 2 Aug 2024 09:43:46 +0800 Subject: [PATCH 3/3] =?UTF-8?q?PDA=E7=BA=BF=E8=BE=B9=E5=8F=91=E6=96=99?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=AF=A6=E6=83=85=E4=B8=AD=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E4=B8=AD=E7=8A=B6=E6=80=81=E5=8E=8B=E5=88=B0=E4=BA=86=E5=8E=9F?= =?UTF-8?q?=E6=96=99=E5=BA=93=E4=BD=8D=EF=BC=8C=E4=B8=94=E5=8E=9F=E6=96=99?= =?UTF-8?q?=E5=BA=93=E4=BD=8D=E4=B8=8D=E5=BA=94=E8=AF=A5=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/job/jobTop.vue | 2 +- src/pages/issue/job/issueDetail.vue | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mycomponents/job/jobTop.vue b/src/mycomponents/job/jobTop.vue index 7aab393c..c6c84c24 100644 --- a/src/mycomponents/job/jobTop.vue +++ b/src/mycomponents/job/jobTop.vue @@ -1,6 +1,6 @@