From 212472f6281e14b195167dfd58e460ae376f6743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E5=9B=BD?= <854933521@qq.com> Date: Wed, 30 Oct 2024 18:50:13 +0800 Subject: [PATCH] =?UTF-8?q?page/pointPutawayJob=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=208/8-10/25?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/pointPutawayJob/index.vue | 359 +++++++++++++--------------- 1 file changed, 169 insertions(+), 190 deletions(-) diff --git a/src/pages/pointPutawayJob/index.vue b/src/pages/pointPutawayJob/index.vue index c68ab836..47c0b190 100644 --- a/src/pages/pointPutawayJob/index.vue +++ b/src/pages/pointPutawayJob/index.vue @@ -5,38 +5,50 @@ 检验指引单 上架指引单 - + - + Q - - - - - - - - - - - - - - - - - - - - - - - - - - - -
物料代码:{{item.itemCode}}
物料名称{{item.itemName}}发货单号{{data1.asnNumber}}
供应商{{item.supplierCode}}批次{{item.supplierBatch}}
到货数量{{item.quantityQty}}抽检数量{{item.sampleQty}}
+ + + 发货单号 + {{ data1.asnNumber }} + + + 物料代码 + {{ item.itemCode }} + + + 物料名称 + {{ item.itemName }} + + + 供应商 + {{ item.supplierCode }} + + + 供应商批次 + {{ item.supplierBatch }} + + + 到货数量 + {{ item.quantityQty }} + + + 抽检数量 + {{ item.sampleQty }} + + + 未生成检验申请 + + + 没有检验方案 + + + 检验阶段不存在 + +
@@ -46,20 +58,24 @@ - 目标库位:{{item.toLocationCode}} + 目标库位: + {{ item.toLocationCode }} - 物料号:{{item.itemCode}} + 物料号: + {{ item.itemCode }} - 托包装号:{{item.packingNumber}} + 托包装号: + {{ item.packingNumber }} - 数量:{{item.qty}}{{item.uom}} + 数量: + {{ item.qty }}{{ item.uom }} @@ -75,7 +91,9 @@ style='background:rgb(60, 156, 255) !important ;color: white;margin-top: 80rpx;'> 打印上架指引单 - + + @@ -119,23 +137,25 @@ export default { currentPage1: 1, pageSize1: 20, number: '', - isHaveOn: false,//显示上架指引单 + isHaveOn: false, //显示上架指引单 // isHaveInspect:false,//显示检验指引单 } }, methods: { - // #ifdef APP // 打印 printImage() { + // #ifdef APP if (this.tabIndex == 1) { testModule.doHTMLPrint(this.newHtmlContent1) } else { testModule.doHTMLPrint(this.newHtmlContent) } + // #endif }, // 读取html文件 readFile(path, callback) { + // #ifdef APP plus.io.resolveLocalFileSystemURL(path, function (entry) { entry.file(function (file) { var reader = new plus.io.FileReader(); @@ -149,8 +169,8 @@ export default { }, function (e) { console.log("获取图片资源失败:" + e.message); }); + // #endif }, - // #endif formatDate(val) { return dateFormat(val) }, @@ -158,6 +178,7 @@ export default { getPointPutawayJobHtml() { this.$nextTick(async () => { let str = '' + // #ifdef APP-PLUS this.readFile(htmlFileUrl, (htmlContent) => { this.newHtmlContent = htmlContent this.data.sublist.forEach(item => { @@ -187,56 +208,79 @@ export default { this.newHtmlContent = this.newHtmlContent.replace( "mainBody", str); //替换物品代码 }); - + // #endif }) }, // 获取采购收货指引单html getPurchaseReceiptJobHtml() { this.$nextTick(async () => { let str = '' + // #ifdef APP-PLUS this.readFile(htmlFileUrl1, (htmlContent) => { this.newHtmlContent1 = htmlContent this.data1.inspectDTOList.forEach(item => { - str += ` -

-
-
Q
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
物料代码:${item.itemCode}
物料名称${item.itemName}发货单号${this.data1.asnNumber}
供应商${item.supplierCode}批次${item.supplierBatch}
到货数量${item.quantityQty}抽检数量${item.sampleQty}
+ let str1 = ` +

+
+
Q
+
+
+
发货单号
+
${this.data1.asnNumber}
+
+
+
物料代码
+
${item.itemCode}
+
+
物料名称
+
${item.itemName}
+
+
+
供应商
+
${item.supplierCode}
+
+
+
供应商批次
+
${item.supplierBatch}
+
+
+
到货数量
+
${item.quantityQty}
+
+
+
抽检数量
+
${item.sampleQty}
+
+ ` + let str2 = `` + if (item.haveInspectionRequest === '0') { + str2 = ` +
+
未生成检验申请
+
` + } else if (item.haveInspectionRequest === '2') { + str2 = ` +
+
没有检验方案
+
` + } else if (item.haveInspectionRequest === '3') { + str2 = ` +
+
检验阶段不存在
+
` + } + let str3 = `
- ` +
+
+ ` + str += str1 + str2 + str3 }) this.newHtmlContent1 = this.newHtmlContent1.replace( "mainBody", str); //替换物品代码 }); - + // #endif }) }, getTableSubList() { @@ -252,7 +296,6 @@ export default { } else { this.showTableSubList = this.data.sublist } - // console.log(233,this.showTableSubList) }, getTableInspectDTOList() { if (this.data1.inspectDTOList.length > this.pageSize1) { @@ -267,8 +310,14 @@ export default { } else { this.showTableInspectDTOList = this.data1.inspectDTOList } - console.log(233, this.showTableInspectDTOList) - } + }, + showMessage(message) { + this.$refs.comMessage.showMessage(message, res => { + if (res) { + + } + }); + }, }, watch: { isLoadFinish: { @@ -301,19 +350,30 @@ export default { this.getTableSubList() }) } - // 获取采购收货指引单 + + if (this.data.ids && !this.number) { + this.tabIndex = 2 + } + // 获取采购收货检验指引单 if (this.number) { await queryInspectionFreeFlag({ number: this.number }).then(async res1 => { this.data1 = res1.data - this.data1.inspectDTOList = this.data1.inspectDTOList.filter(item => item.sampleQty > 0) - // this.data1.inspectDTOList=[] - if (this.data1 && this.data1.inspectDTOList && this.data1.inspectDTOList.length == 0) { + this.data1.inspectDTOList = this.data1.inspectDTOList.filter(item => item.sampleQty > + 0) + if (this.data1 && this.data1.inspectDTOList && this.data1.inspectDTOList.length == 0 && this.data.ids) { this.tabIndex = 2 } this.getTableInspectDTOList() }) + .catch(error => { + this.$refs.comMessage.showMessage(error, res => { + if (res) { + + } + }); + }) } this.getPointPutawayJobHtml() @@ -338,61 +398,51 @@ export default { \ No newline at end of file