From e6ad23863e3aa314ba78f5923a2693ce0ed88f12 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 8 Oct 2024 15:37:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=85=E8=A3=85=E6=8D=A2=E6=89=B9=E6=AC=A120?= =?UTF-8?q?24/9/13=2020:16:09?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coms/comProductDetailCardBatch.vue | 16 +- .../productReceipt/job/scrapReceiptDetail.vue | 34 +++- .../job/productionReceiptDetail.vue | 4 +- .../coms/comRepleishDetailCardBatch.vue | 178 ++++++++++++++++++ src/pages/repleinsh/job/repleinshDetail.vue | 110 ++++++----- .../coms/comStockUpDetailCardBatch.vue | 173 +++++++++++++++++ 6 files changed, 457 insertions(+), 58 deletions(-) create mode 100644 src/pages/repleinsh/coms/comRepleishDetailCardBatch.vue create mode 100644 src/pages/stockUp/coms/comStockUpDetailCardBatch.vue diff --git a/src/pages/productReceipt/coms/comProductDetailCardBatch.vue b/src/pages/productReceipt/coms/comProductDetailCardBatch.vue index 2b950cba..2fc2be38 100644 --- a/src/pages/productReceipt/coms/comProductDetailCardBatch.vue +++ b/src/pages/productReceipt/coms/comProductDetailCardBatch.vue @@ -2,18 +2,20 @@ - + -
+ :right-options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options" + @click="swipeClick($event,item,'parent')"> + + import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' - import recommend from '@/mycomponents/recommend/recommend.vue' + import recommendBatch from '@/mycomponents/recommend/recommendBatch.vue' import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue' import productDetailInfoPopup from '@/pages/productReceipt/coms/productDetailInfoPopup.vue' @@ -54,7 +56,7 @@ export default { components: { itemCompareQty, - recommend, + recommendBatch, recommendQtyEdit, jobDetailPopup, productDetailInfoPopup, diff --git a/src/pages/productReceipt/job/scrapReceiptDetail.vue b/src/pages/productReceipt/job/scrapReceiptDetail.vue index 8970a98b..bb833c59 100644 --- a/src/pages/productReceipt/job/scrapReceiptDetail.vue +++ b/src/pages/productReceipt/job/scrapReceiptDetail.vue @@ -12,8 +12,11 @@ + + + @remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList' v-else> @@ -77,8 +80,8 @@ import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import jobTop from '@/mycomponents/job/jobTop.vue' import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue" - - + import comProductDetailCardBatch from "@/pages/productReceipt/coms/comProductDetailCardBatch.vue" + export default { name: 'receipt_detail', components: { @@ -87,7 +90,8 @@ locationCompare, winScanPack, jobTop, - comProductDetailCard + comProductDetailCard, + comProductDetailCardBatch }, data() { return { @@ -102,7 +106,8 @@ toLocationTypeList: [], managementList: [], jobStatus: "", - jobToLocationCode: "" + jobToLocationCode: "", + managementType:'' }; }, @@ -175,7 +180,7 @@ title: "加载中....", mask: true }); - getProductReceiptJobDetail(that.id).then(res => { + getProductReceiptJobDetail(that.id).then(async res => { uni.hideLoading(); if (res.data == null) { that.showMessage('未获取到详情'); @@ -186,7 +191,20 @@ that.jobStatus = res.data.status that.jobToLocationCode = that.subList[0].toLocationCode that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) - that.detailSource = getDataSource(that.subList) + that.detailSource =await getDataSource(that.subList) + //获取管理模式,封装参数 + var itemCodes = [] + this.detailSource.forEach(item => { + itemCodes.push(item.itemCode) + item.scaned = false + }) + await getManagementPrecisions(itemCodes, that.jobToLocationCode, res => { + if (res.success) { + this.managementList = res.list; + this.managementType = this.managementList.some(item => item.ManagementPrecision == + 'BY_BATCH') ? 'BY_BATCH' : '' + } + }) } else { that.showMessage('列表数据为0'); } @@ -381,6 +399,8 @@ var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, detail.packingNumber, detail.batch); detail.toPackingNumber = info.packingNumber; + detail.packingNumber = info.packingNumber; + detail.fromPackingNumber = info.packingNumber; detail.toBatch = info.batch; detail.toContainerNumber = ''; detail.toInventoryStatus = detail.inventoryStatus diff --git a/src/pages/productionReceipt/job/productionReceiptDetail.vue b/src/pages/productionReceipt/job/productionReceiptDetail.vue index 79e685ad..a9dc3875 100644 --- a/src/pages/productionReceipt/job/productionReceiptDetail.vue +++ b/src/pages/productionReceipt/job/productionReceiptDetail.vue @@ -18,10 +18,10 @@ @remove="updateData" @updateData="updateData" @openDetail="openDetail" :locationAreaTypeList='toLocationAreaTypeList'> - - + --> diff --git a/src/pages/repleinsh/coms/comRepleishDetailCardBatch.vue b/src/pages/repleinsh/coms/comRepleishDetailCardBatch.vue new file mode 100644 index 00000000..98a4efa0 --- /dev/null +++ b/src/pages/repleinsh/coms/comRepleishDetailCardBatch.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/src/pages/repleinsh/job/repleinshDetail.vue b/src/pages/repleinsh/job/repleinshDetail.vue index 80d3bb6d..4dcba9aa 100644 --- a/src/pages/repleinsh/job/repleinshDetail.vue +++ b/src/pages/repleinsh/job/repleinshDetail.vue @@ -14,8 +14,10 @@ + + @updateData='updateData' v-else> @@ -76,6 +78,7 @@ import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue' import comRepleishDetailCard from '@/pages/repleinsh/coms/comRepleishDetailCard.vue' + import comRepleishDetailCardBatch from '@/pages/repleinsh/coms/comRepleishDetailCardBatch.vue' import comScanReplishPack from '@/pages/repleinsh/coms/comScanReplishPack.vue' import jobTop from '@/mycomponents/job/jobTop.vue' @@ -87,7 +90,8 @@ comRepleishDetailCard, comScanReplishPack, requiredLocation, - jobTop + jobTop, + comRepleishDetailCardBatch, }, data() { return { @@ -100,7 +104,9 @@ toLocationCode: '', toLocationAreaTypeList: [], jobStatus: "", - scanMessage: "" + scanMessage: "", + managementList:[], + managementType:'' }; }, @@ -179,7 +185,7 @@ title: "加载中....", mask: true }); - getRepleinshJobDetail(that.id).then(res => { + getRepleinshJobDetail(that.id).then(async res => { uni.hideLoading(); if (res.data == null) { that.showMessage('未获取到详情'); @@ -191,12 +197,24 @@ that.toLocationCode = that.subList[0].toLocationCode that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) - that.detailSource = getDataSource(that.detailSource, that.subList) + that.detailSource =await getDataSource(that.detailSource, that.subList) if (that.scanMessage) { this.$refs.comScanIssuePack.openScanPopupForJobSimulate(this.detailSource, this .jobContent, that.scanMessage); } - + //获取管理模式,封装参数 + var itemCodes = [] + this.detailSource.forEach(item => { + itemCodes.push(item.itemCode) + item.scaned = false + }) + await getManagementPrecisions(itemCodes, that.toLocationCode, res => { + if (res.success) { + this.managementList = res.list; + this.managementType = this.managementList.some(item => item.ManagementPrecision == + 'BY_BATCH') ? 'BY_BATCH' : '' + } + }) let timer = setTimeout(r => { that.resizeCollapse(); if (timer) { @@ -329,23 +347,37 @@ title: "提交中....", mask: true }); - var params = this.setParams() - if (!params.subList || params.subList.length == 0) { - uni.hideLoading() - this.showErrorMessage("请扫描您需要提交的补料任务") - return - } - console.log("提交参数", JSON.stringify(params)); - repleinshJobSubmit(params).then(res => { - uni.hideLoading() - if (res.data) { - this.showCommitSuccessMessage("提交成功\n生成补料记录\n" + res.data) - } else { - this.showErrorMessage("提交失败[" + res.msg + "]") + var itemCodes = [] + this.detailSource.forEach(item => { + item.Items.forEach(cur=>{ + itemCodes.push(cur.itemCode) + }) + }) + //获取管理模式,封装参数 + getManagementPrecisions(itemCodes, this.toLocationCode, res => { + if (res.success) { + this.managementList = res.list; + this.managementType = this.managementList.some(item => item.ManagementPrecision == + 'BY_BATCH') ? 'BY_BATCH' : '' + var params = this.setParams() + if (!params.subList || params.subList.length == 0) { + uni.hideLoading() + this.showErrorMessage("请扫描您需要提交的补料任务") + return + } + console.log("提交参数", JSON.stringify(params)); + repleinshJobSubmit(params).then(res => { + uni.hideLoading() + if (res.data) { + this.showCommitSuccessMessage("提交成功\n生成补料记录\n" + res.data) + } else { + this.showErrorMessage("提交失败[" + res.msg + "]") + } + }).catch(error => { + uni.hideLoading() + this.showErrorMessage(error) + }) } - }).catch(error => { - uni.hideLoading() - this.showErrorMessage(error) }) }, @@ -365,31 +397,25 @@ batch.Records.forEach(r => { let record = {}; record.handleQty = r.qty; - - // record.fromPackingNumber = r - // .packingNumber; record.fromBatch = r.batch; - record.fromContainerNumber = r - .containerNumber; - - record.toContainerNumber = r - .containerNumber; - record.toInventoryStatus = r - .inventoryStatus; - record.toLocationCode = this - .toLocationCode; - record.supplierCode = r.supplierCode; + record.fromContainerNumber = r.containerNumber; - record.fromParentPackingNumber = r - .parentPackingNumber; + record.toContainerNumber = r.containerNumber; + record.toInventoryStatus = r.inventoryStatus; + record.toLocationCode = this.toLocationCode; + record.supplierCode = r.supplierCode; + + record.fromParentPackingNumber = r.parentPackingNumber; - record.fromPackingNumber = r - .packingNumber; - record.toPackingNumber = r - .packingNumber; + record.fromPackingNumber = r.packingNumber; + record.toPackingNumber = r.packingNumber; record.toPackUnit = r.packUnit; record.toBatch = r.batch; - + if(this.managementType == 'BY_BATCH'){ + record.toPackingNumber = ''; + record.packingNumber = ''; + record.fromPackingNumber = ''; + } subItem.recordList.push(record); }) commitSubList.push(deepCopyData(subItem)); diff --git a/src/pages/stockUp/coms/comStockUpDetailCardBatch.vue b/src/pages/stockUp/coms/comStockUpDetailCardBatch.vue new file mode 100644 index 00000000..cc579071 --- /dev/null +++ b/src/pages/stockUp/coms/comStockUpDetailCardBatch.vue @@ -0,0 +1,173 @@ + + + + +