From 44ad86519e81033a6f1f382c778e2b3b6e7c217f Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 15 Oct 2024 14:17:01 +0800 Subject: [PATCH 001/201] =?UTF-8?q?YT-386pda=E8=A3=85=E9=85=8D=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E4=B8=8A=E6=9E=B6=EF=BC=8C=E6=89=AB=E6=8F=8F=E7=AE=B1?= =?UTF-8?q?=E7=A0=81=E6=8A=A5=E9=94=99=20HPQ;V1.0;I399.973-085;P;B20241014?= =?UTF-8?q?;Q1;UPC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/scan/winComScanFg.vue | 4 +--- src/pages/productPutaway/record/productPutawayRecord.vue | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/mycomponents/scan/winComScanFg.vue b/src/mycomponents/scan/winComScanFg.vue index e0f91a60..736a3f47 100644 --- a/src/mycomponents/scan/winComScanFg.vue +++ b/src/mycomponents/scan/winComScanFg.vue @@ -58,9 +58,7 @@ import { getMesPackInfo } from '@/api/request2.js'; - import { - Exception - } from 'sass'; + export default { name: "winComScan", diff --git a/src/pages/productPutaway/record/productPutawayRecord.vue b/src/pages/productPutaway/record/productPutawayRecord.vue index a00f1372..adec98a1 100644 --- a/src/pages/productPutaway/record/productPutawayRecord.vue +++ b/src/pages/productPutaway/record/productPutawayRecord.vue @@ -288,15 +288,13 @@ getrecommendLocationExpectin(param).then(result => { uni.hideLoading(); let item = this.detailSource.find(res => { - if (res.itemCode == balance.itemCode && res.containerNumber == balance - .packingNumber) { + if (res.itemCode == balance.itemCode) { return res } }) item.toLocationCode = result.data.code; item.expectinNumber = result.data.expectinNumber; this.$forceUpdate(); - }).catch(error => { uni.hideLoading() this.showErrorMessage(error); From da92619f9a115715942ec0f2b218355dfdd3d820 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 15 Oct 2024 15:37:07 +0800 Subject: [PATCH 002/201] =?UTF-8?q?YT-403pda=20=E6=89=AB=E6=8F=8F2?= =?UTF-8?q?=E4=B8=AA=E6=89=B9=E6=AC=A1=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E6=89=B9=E6=AC=A1=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../balance/recommendBalanceBatch.vue | 4 +- .../coms/comDeliverDetailCardBatch.vue | 5 +- .../deliver/coms/comScanDeliverPackBatch.vue | 54 ++++++++++++------- src/pages/deliver/job/deliverDetailBatch.vue | 3 +- 4 files changed, 40 insertions(+), 26 deletions(-) diff --git a/src/mycomponents/balance/recommendBalanceBatch.vue b/src/mycomponents/balance/recommendBalanceBatch.vue index 10acdfd1..b682d4d2 100644 --- a/src/mycomponents/balance/recommendBalanceBatch.vue +++ b/src/mycomponents/balance/recommendBalanceBatch.vue @@ -6,8 +6,8 @@ 推荐 - - + + diff --git a/src/pages/deliver/coms/comDeliverDetailCardBatch.vue b/src/pages/deliver/coms/comDeliverDetailCardBatch.vue index 76008fbb..f8138715 100644 --- a/src/pages/deliver/coms/comDeliverDetailCardBatch.vue +++ b/src/pages/deliver/coms/comDeliverDetailCardBatch.vue @@ -3,11 +3,11 @@ - + + @click="swipeClick($event,item,index)" style='padding:20rpx 0px 5px 0px;align-items: center;'> r.itemCode == itemCode); - item.scaned =true + // item.scaned =true let fromLocation = that.toLocation.find(l => l.fromLocationCode == that.fromLocationCode); // 成品发货任务--同一物料,可以扫描提交不在任务中的库位 if(!fromLocation){ @@ -334,7 +334,6 @@ item.Locations.push(fromLocation) } if (fromLocation != undefined) { - console.log(34444) let batch = fromLocation.batch; if (batch != undefined) { that.addRecord(item.batch, label, balance, packageInfo) @@ -402,27 +401,30 @@ balance.packQty = packageInfo.packQty balance.packUnit = packageInfo.packUnit let record = { - scaned: true, - itemCode: label.itemCode, - packingNumber: label.packingNumber, - batch: label.batch, - qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty), - uom: balance.uom, - inventoryStatus: balance.inventoryStatus, - balance: balance, - toLocationCode: this.toLocationCode, - supplierCode: label.supplierCode, - packUnit: packageInfo.packUnit, - packQty: packageInfo.packQty, - singlePrice:balance.singlePrice, - amount:balance.amount + scaned: true, + itemCode: label.itemCode, + packingNumber: label.packingNumber, + parentPackingNumber: packageInfo.parentNumber, + batch: label.batch, + // qty: Number(balance.qty), + // qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty), + qty: Number(balance.qty), + handleQty:0, + uom: balance.uom, + inventoryStatus: balance.inventoryStatus, + balance: balance, + toLocationCode: this.toLocationCode, + supplierCode: label.supplierCode, + packUnit: packageInfo.packUnit, + packQty: packageInfo.packQty, + fromLocationCode:balance.locationCode, } return record; }, calcBatchHandleQty(batch,label,balance) { this.dataContent.subList.forEach(item => { - if(item.itemCode == balance.itemCode&&item.batch == batch){ + if(item.itemCode == label.itemCode&&item.batch == label.batch){ item.handleQty = item.handleQty || 0 item.handleQty = calc.add(item.handleQty, label.qty); } @@ -430,8 +432,22 @@ }, addRecord(batch, label, balance, packageInfo) { - this.calcBatchHandleQty(batch,label,balance); - this.getfocus(); + var checkData = this.dataContent.subList.find(r => { + if (r.batch == balance.batch) { + return r; + } + }) + if (checkData) { + checkData.scaned = true + this.calcBatchHandleQty(batch,label,balance); + this.getfocus(); + } else { + let record = this.creatRecord(label, balance, packageInfo); + this.dataContent.subList.push(record); + this.calcBatchHandleQty(batch,label,balance); + this.getfocus(); + this.$emit("afterScan"); + } }, getfocus() { diff --git a/src/pages/deliver/job/deliverDetailBatch.vue b/src/pages/deliver/job/deliverDetailBatch.vue index 0ae33379..ef0be975 100644 --- a/src/pages/deliver/job/deliverDetailBatch.vue +++ b/src/pages/deliver/job/deliverDetailBatch.vue @@ -312,7 +312,7 @@ } subItem.recordList = [] let record = {}; - record.handleQty = r.qty; + record.handleQty = r.handleQty; record.toContainerNumber = r.ContainerNumber; record.toInventoryStatus = r.inventoryStatus; record.toLocationCode = subItem.toLocationCode; @@ -438,7 +438,6 @@ var datacontent = {} //克隆对象,深度克隆,防止双向绑定同一个变量 // Object.assign(datacontent, this.detailSource); - console.log(2323) this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent); }, closeScanPopup() { From 227c5f86876dfdc197d262b3b5af128b9cab6af9 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 15 Oct 2024 16:47:22 +0800 Subject: [PATCH 003/201] =?UTF-8?q?YT-410=E5=8F=91=E6=96=99=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C=E6=89=AB=E6=8F=8F=E6=95=B0=E9=87=8F=E4=B8=8E?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=95=B0=E9=87=8F=E4=B8=8D=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E7=82=B9=E5=87=BB=E5=8F=96=E6=B6=88=EF=BC=8C?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=B7=BB=E5=8A=A0=E5=88=B0=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=B8=8A=EF=BC=8C=E5=86=8D=E6=AC=A1=E6=89=AB=E6=8F=8F=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=B8=80=E6=89=AB=E6=8F=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/coms/comScanIssuePack.vue | 7 ++++--- src/pages/issue/job/issueDetail.vue | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue index c7994f2d..e4e88005 100644 --- a/src/pages/issue/coms/comScanIssuePack.vue +++ b/src/pages/issue/coms/comScanIssuePack.vue @@ -916,9 +916,8 @@ if (item != undefined) { item.Locations.forEach(l => { - let batch = l.Batchs.find(b => b.packingNumber == record.packingNumber && b + let batch = l.Batchs.find(b => b .batch == record.batch); - if (batch && batch.Records && batch.Records.length > 0) { let rIndex = batch.Records.findIndex(r => r.packingNumber == record .packingNumber && r.batch == record.batch); @@ -931,7 +930,9 @@ } }); }, - + clearList(){ + this.issueRecord=[] + }, packGetFocus() { if (this.$refs.comscan) { this.$refs.comscan.getfocus(); diff --git a/src/pages/issue/job/issueDetail.vue b/src/pages/issue/job/issueDetail.vue index 0c10e75f..06d17c2f 100644 --- a/src/pages/issue/job/issueDetail.vue +++ b/src/pages/issue/job/issueDetail.vue @@ -475,6 +475,24 @@ //防止重复点击 this.$throttle(this.submit, 2000, this)() } else { + // let record = this.creatRecord(label, balance, packageInfo); + // batch.Records.push(record); + // this.issueRecord.unshift(record) + // this.calcBatchHandleQty(batch); + // this.getfocus(); + // this.$emit("afterScan"); + this.detailSource.forEach(detail => { + detail.Items.forEach(item => { + taskQty =calc.add(taskQty,item.qty) + item.Locations.forEach(lco => { + lco.Batchs.forEach(batch => { + batch.Records = [] + }) + }) + }) + }) + this.$refs.comScanIssuePack.clearList() + this.scanPopupGetFocus() } }); From bcae9a345264fcc94081497023cf1034c4491934 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 16 Oct 2024 10:40:26 +0800 Subject: [PATCH 004/201] =?UTF-8?q?YT-408pda=E6=8C=89=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E6=8A=A5=E5=B7=A5=E3=80=81=E6=97=A0=E8=AE=A1=E5=88=92=E6=8A=A5?= =?UTF-8?q?=E5=B7=A5=EF=BC=8C=E5=8E=BB=E6=8E=89=E5=88=9B=E5=BB=BA=E6=A3=80?= =?UTF-8?q?=E9=AA=8C=E7=94=B3=E8=AF=B7=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/fg/coms/comNoReceiptPopup.vue | 16 +++++++++++++--- src/pages/fg/coms/comReceiptPopup.vue | 17 +++++++++++++---- src/pages/fg/receiptByPlan.vue | 4 +--- src/pages/fg/receiptNoPlan.vue | 4 +--- src/pages/index/index.vue | 2 +- 5 files changed, 29 insertions(+), 14 deletions(-) diff --git a/src/pages/fg/coms/comNoReceiptPopup.vue b/src/pages/fg/coms/comNoReceiptPopup.vue index 7014a8da..84bb8a81 100644 --- a/src/pages/fg/coms/comNoReceiptPopup.vue +++ b/src/pages/fg/coms/comNoReceiptPopup.vue @@ -112,7 +112,7 @@ - + 创建检验申请 @@ -156,6 +156,10 @@ import { calc } from '@/common/calc.js'; + + import { + getSwitchInfoByCode + } from '@/common/basic.js'; import uom from '@/mycomponents/qty/uom.vue' import packQty from '@/mycomponents/qty/packQty.vue' @@ -200,7 +204,8 @@ workshop: "", bomVersion: "", putAwayRequestSwitch:true, - putAwayInspectSwitch:true + putAwayInspectSwitch:true, + EnableQms:true } }, props: { @@ -213,6 +218,9 @@ default: [] }, }, + mounted() { + this.EnableQms = getSwitchInfoByCode('EnableQms') + }, methods: { openRequestPopup() { @@ -291,7 +299,9 @@ this.showErrorMessage("请选择包装规格") return } - + if (!this.EnableQms) { + this.putAwayInspectSwitch = false + } this.callback(); }, diff --git a/src/pages/fg/coms/comReceiptPopup.vue b/src/pages/fg/coms/comReceiptPopup.vue index 4f7bf20a..dff4d848 100644 --- a/src/pages/fg/coms/comReceiptPopup.vue +++ b/src/pages/fg/coms/comReceiptPopup.vue @@ -107,7 +107,7 @@ - + 创建检验申请 @@ -151,7 +151,9 @@ import { calc } from '@/common/calc.js'; - +import { + getSwitchInfoByCode + } from '@/common/basic.js'; import uom from '@/mycomponents/qty/uom.vue' import packQty from '@/mycomponents/qty/packQty.vue' import balanceStatus from '@/mycomponents/status/balanceStatus.vue' @@ -193,7 +195,8 @@ fgLocationCode: "", rawLocationCode: "", putAwayRequestSwitch:true, - putAwayInspectSwitch:true + putAwayInspectSwitch:true, + EnableQms:true } }, props: { @@ -206,6 +209,10 @@ default: [] }, }, + mounted() { + this.EnableQms = getSwitchInfoByCode('EnableQms') + console.log(777,this.EnableQms) + }, methods: { openRequestPopup() { this.initData(); @@ -279,7 +286,9 @@ this.showErrorMessage("请选择包装规格") return } - + if (!this.EnableQms) { + this.putAwayInspectSwitch = false + } this.callback(); }, diff --git a/src/pages/fg/receiptByPlan.vue b/src/pages/fg/receiptByPlan.vue index a112d5c4..44b65e22 100644 --- a/src/pages/fg/receiptByPlan.vue +++ b/src/pages/fg/receiptByPlan.vue @@ -130,9 +130,7 @@ import winScanFgLabel from "@/mycomponents/scan/winScanFgLabel.vue" import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue" import light from '@/mycomponents/balance/light.vue' - import { - Exception - } from 'sass'; + import { nextTick } from 'vue'; diff --git a/src/pages/fg/receiptNoPlan.vue b/src/pages/fg/receiptNoPlan.vue index d4625d95..3fd09b51 100644 --- a/src/pages/fg/receiptNoPlan.vue +++ b/src/pages/fg/receiptNoPlan.vue @@ -124,9 +124,7 @@ import winScanFgLabel from "@/mycomponents/scan/winScanFgLabel.vue" import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue" import light from '@/mycomponents/balance/light.vue' - import { - Exception - } from 'sass'; + export default { components: { diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 0fb9ea53..bde4f960 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -388,7 +388,7 @@ console.log("包装规格获取失败", res) }) - var switchCode="FgPutawayLocationCodeValidate,SemiPutawayLocationCodeValidate,PurchasePutawayToLocationCodeValidate,IssueToLocationCodeValidate,fgProductReceipCommitValidate,semiProductReceipCommitValidate,purchasereceiptPrintPDA,purchaseReceiptLocationCodeValidate,CreateProductputawayRequestAfterProductreceiptRecordCreated"; + var switchCode="EnableQms,FgPutawayLocationCodeValidate,SemiPutawayLocationCodeValidate,PurchasePutawayToLocationCodeValidate,IssueToLocationCodeValidate,fgProductReceipCommitValidate,semiProductReceipCommitValidate,purchasereceiptPrintPDA,purchaseReceiptLocationCodeValidate,CreateProductputawayRequestAfterProductreceiptRecordCreated"; getSwitchByCode(switchCode).then(res=>{ uni.setStorageSync("switch", res.data) From b6b3888d74f9f4c02e37b75d1045a41f9b75946f Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 16 Oct 2024 15:16:47 +0800 Subject: [PATCH 005/201] =?UTF-8?q?YT-406=E8=A3=85=E9=85=8D=E5=88=B6?= =?UTF-8?q?=E5=93=81=E4=B8=8A=E6=9E=B6=EF=BC=8Cpc=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E7=89=A9=E6=96=99=E4=B8=8D=E5=90=8C=E6=89=B9?= =?UTF-8?q?=E6=AC=A1=EF=BC=8Cpda=E6=98=BE=E7=A4=BA=E6=88=90=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E6=89=B9=E6=AC=A1=E4=B8=80=E5=85=B1=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E9=87=8F=EF=BC=8C=E5=BA=94=E4=B8=8D=E5=90=8C=E6=89=B9=E6=AC=A1?= =?UTF-8?q?=E5=88=86=E5=BC=80=E6=98=BE=E7=A4=BA=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/detail.js | 2 +- .../job/productPutawayDetail.vue | 22 ++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/common/detail.js b/src/common/detail.js index ac1b3ed2..47e53bb7 100644 --- a/src/common/detail.js +++ b/src/common/detail.js @@ -49,7 +49,7 @@ export function getDataSource(subList) { let items = []; subList.forEach(detail => { var item = items.find(r => - r.itemCode == detail.itemCode) + r.itemCode == detail.itemCode && r.batch == detail.batch ) if (item == undefined) { item = createItemInfo(detail); let newDetail = createDetailInfo(detail); // diff --git a/src/pages/productPutaway/job/productPutawayDetail.vue b/src/pages/productPutaway/job/productPutawayDetail.vue index bc151e08..22479ff0 100644 --- a/src/pages/productPutaway/job/productPutawayDetail.vue +++ b/src/pages/productPutaway/job/productPutawayDetail.vue @@ -334,15 +334,24 @@ var locationCode = result.balance.locationCode; var inventoryStatus = result.balance.inventoryStatus; var detail = this.detailSource.find(r => r.itemCode == itemCode); - if (detail == undefined) { this.showErrorMessage("物料号【" + itemCode + "】不在列表中") } else { - var itemDetail = detail.subList.find(r => { - return r.batch == batch && - r.fromLocationCode == result.fromLocationCode - }) - if (itemDetail == undefined) { + // var itemDetail = detail.subList.find(r => { + // return r.batch == result.label.batch && + // r.fromLocationCode == result.fromLocationCode + // }) + let itemDetail = '' + this.detailSource.find(item => { + const itemDetail1 = item.subList.find(r => { + return r.batch == result.label.batch && r.fromLocationCode == result.fromLocationCode + }) + if(itemDetail1){ + itemDetail = itemDetail1 + } + console.log(99,itemDetail1) + }); + if (!itemDetail) { this.showErrorMessage("批次【" + batch + "】库位【" + result .fromLocationCode + "】不在列表中") } else { @@ -379,6 +388,7 @@ } } } catch (e) { + console.log(2333,e) this.showMessage(e.message) } }, From 1e30932d085cbb92b89c12d757fcabc53296f295 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 16 Oct 2024 15:33:07 +0800 Subject: [PATCH 006/201] =?UTF-8?q?YT-425pda=E5=88=B6=E5=93=81=E5=9B=9E?= =?UTF-8?q?=E6=94=B6=E4=BB=BB=E5=8A=A1=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E4=B8=8D=E6=88=90=E5=8A=9FYT-418pda=E9=A2=84=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E6=94=B6=E8=B4=A7=EF=BC=8C=E6=89=AB=E6=8F=8F=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/productPutaway/job/productPutawayDetail.vue | 4 ---- src/pages/productReceipt/job/productReceiptDetail.vue | 5 ++--- src/pages/productRecycle/job/productRecycleJobDetail.vue | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/pages/productPutaway/job/productPutawayDetail.vue b/src/pages/productPutaway/job/productPutawayDetail.vue index 22479ff0..a88b3e31 100644 --- a/src/pages/productPutaway/job/productPutawayDetail.vue +++ b/src/pages/productPutaway/job/productPutawayDetail.vue @@ -337,10 +337,6 @@ if (detail == undefined) { this.showErrorMessage("物料号【" + itemCode + "】不在列表中") } else { - // var itemDetail = detail.subList.find(r => { - // return r.batch == result.label.batch && - // r.fromLocationCode == result.fromLocationCode - // }) let itemDetail = '' this.detailSource.find(item => { const itemDetail1 = item.subList.find(r => { diff --git a/src/pages/productReceipt/job/productReceiptDetail.vue b/src/pages/productReceipt/job/productReceiptDetail.vue index 2d8887dc..0eb850ba 100644 --- a/src/pages/productReceipt/job/productReceiptDetail.vue +++ b/src/pages/productReceipt/job/productReceiptDetail.vue @@ -285,13 +285,12 @@ } else { detail.scaned = true var itemDetail = detail.subList.find(r => - r.packingNumber == packingNumber && r.batch == batch); if (itemDetail == undefined) { - this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中") + this.showErrorMessage("批次[" + batch + "]不在任务列表中") } else { if (itemDetail.scaned) { - this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") + this.showErrorMessage("批次[" + batch + "]已经扫描") } else { itemDetail.scaned = true; itemDetail.handleQty = Number(result.label.qty); diff --git a/src/pages/productRecycle/job/productRecycleJobDetail.vue b/src/pages/productRecycle/job/productRecycleJobDetail.vue index 0eed8fb0..9507254e 100644 --- a/src/pages/productRecycle/job/productRecycleJobDetail.vue +++ b/src/pages/productRecycle/job/productRecycleJobDetail.vue @@ -244,7 +244,7 @@ }, updateData() { - // this.calcHandleQty(); + this.calcHandleQty(); }, getScanResult(result) { From 84bda516e1ba6558ecfd0c354e074268c8ea6822 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 17 Oct 2024 11:48:18 +0800 Subject: [PATCH 007/201] =?UTF-8?q?YT-441pda=E9=A2=84=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E4=B8=8A=E6=9E=B6=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E4=B8=8D=E6=88=90=E5=8A=9F=EF=BC=8C=E5=BA=94=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/productPutaway/job/productPutawayDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/productPutaway/job/productPutawayDetail.vue b/src/pages/productPutaway/job/productPutawayDetail.vue index a88b3e31..7c42f58a 100644 --- a/src/pages/productPutaway/job/productPutawayDetail.vue +++ b/src/pages/productPutaway/job/productPutawayDetail.vue @@ -271,7 +271,7 @@ }, updateData() { - // this.calcHandleQty(); + this.calcHandleQty(); }, openDetail(item) { From e45cdec8a9547006e6d67a307590624686c9e814 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 17 Oct 2024 17:09:35 +0800 Subject: [PATCH 008/201] =?UTF-8?q?YT-262=E6=89=80=E6=9C=89=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8Cpc=E3=80=81pda=E5=BA=94=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=8C=85=E8=A3=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/balance/pack.vue | 13 +- src/pages/index/index.vue | 2 +- .../record/productPutawayRecord.vue | 141 +++++++++++++++++- 3 files changed, 149 insertions(+), 7 deletions(-) diff --git a/src/mycomponents/balance/pack.vue b/src/mycomponents/balance/pack.vue index 05d4be77..9b61b156 100644 --- a/src/mycomponents/balance/pack.vue +++ b/src/mycomponents/balance/pack.vue @@ -1,19 +1,22 @@ + + \ No newline at end of file diff --git a/src/mycomponents/scan/winComScan.vue b/src/mycomponents/scan/winComScan.vue index 0a55bf5f..979ae50c 100644 --- a/src/mycomponents/scan/winComScan.vue +++ b/src/mycomponents/scan/winComScan.vue @@ -58,6 +58,11 @@ import { getLabelInfo } from '../../common/label.js'; + + import { + getManagementPrecisions + } from '@/common/balance.js'; + export default { name: "winComScan", @@ -83,6 +88,10 @@ headerType: { type: String, default: 'HPQ' //HLB HMQ HCQ HPQ + }, + locationCode:{ + type: String, + default: '' } }, data() { @@ -99,7 +108,6 @@ } }, mounted() { - }, watch: { placeholder() { @@ -170,6 +178,7 @@ if (that.isShowHistory) { that.scanList.unshift(content); } + getLabelInfo(content, this.headerType, callback => { // uni.hideLoading(); let scanResult = callback; @@ -187,7 +196,7 @@ } }) } - }); + },this.locationCode); }, 200); } }, diff --git a/src/mycomponents/scan/winScanPack.vue b/src/mycomponents/scan/winScanPack.vue index 7da05b49..2da925c1 100644 --- a/src/mycomponents/scan/winScanPack.vue +++ b/src/mycomponents/scan/winScanPack.vue @@ -15,7 +15,7 @@ + :isShowHistory="isShowHistory" :clearResult="true" :locationCode='locationCode'> @@ -48,11 +48,13 @@ headerType:{ type: String, default: 'HPQ' - } + }, + }, data() { return { show: false, + locationCode:'' } }, created() { @@ -69,8 +71,9 @@ }) }, - openScanPopup() { + openScanPopup(locationCode1) { this.$refs.popup.open('bottom') + this.locationCode = locationCode1 setTimeout(res => { this.getfocus() }, 500) diff --git a/src/pages/inventoryMove/record/okToHoldRecord.vue b/src/pages/inventoryMove/record/okToHoldRecord.vue index e025da9a..bac77279 100644 --- a/src/pages/inventoryMove/record/okToHoldRecord.vue +++ b/src/pages/inventoryMove/record/okToHoldRecord.vue @@ -1,11 +1,11 @@ + \ No newline at end of file diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index 2aa4839d..d0474dc2 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -76,7 +76,7 @@ - + @@ -117,7 +117,14 @@ calcTreeHandleQty } from '@/common/detail.js'; - + import { + Decimal + } from 'decimal.js'; //引入 + + import { + calc + } from '@/common/calc' + import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanPackAndCont from '@/mycomponents/scan/winScanPackAndCont.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue' @@ -169,8 +176,7 @@ switchCode1: "", isCheckLocation: 'purchaseReceiptLocationCodeValidate', //校验收货库位 reasonText: "", - - + packingNumberList:[], // printDeafult: {}, //默认打印机 // templateDeafult: {} //默认的模板 }; @@ -275,18 +281,18 @@ } that.isAllReceived = false; - //获取管理模式,封装参数 - var itemCodes = [] - this.detailSource.forEach(item => { - itemCodes.push(item.itemCode) - }) - getManagementPrecisions(itemCodes, that.jobToLocationCode, res => { - if (res.success) { - this.managementList = res.list; - this.managementType = this.managementList.some(item => item.ManagementPrecision == - 'BY_BATCH') ? 'BY_BATCH' : '' - } - }) + //获取管理模式,封装参数 + var itemCodes = [] + this.detailSource.forEach(item => { + itemCodes.push(item.itemCode) + }) + getManagementPrecisions(itemCodes, that.jobToLocationCode, res => { + if (res.success) { + this.managementList = res.list; + this.managementType = this.managementList.some(item => item.ManagementPrecision == + 'BY_BATCH') ? 'BY_BATCH' : '' + } + }) // if (uni.getStorageSync('purchaseReceiptDetailPointParams')) { // const purchaseReceiptDetailPointParams = uni.getStorageSync( // 'purchaseReceiptDetailPointParams') @@ -450,10 +456,10 @@ itemDetail.forEach(item => { item.scaned = true; itemDetail.scanDate = new Date(); - item.handleQty = item.qty; + item.handleQty = calc.add(item.handleQty,result.label.qty) item.toLocationCode = this.toLocationCode; }) - calcHandleQty(this.detailSource); + // calcHandleQty(this.detailSource); this.detailSource[0].subList.sort(compareDesc('scanDate')); //按扫描信息排序 this.continueScan() this.$forceUpdate() @@ -483,10 +489,17 @@ if (pack == undefined) { this.showMessage("批次【" + batch + "】不在列表中") } else { - if (pack.scaned) { + let isScan = false + if(packingNumber){ + isScan = this.packingNumberList.some(item=>item == packingNumber) + }else{ + isScan = false + } + if (isScan) { pack.scanDate = new Date(); - this.showMessage("批次【" + batch + "】已经扫描"); + this.showMessage("箱码【" + packingNumber + "】已经扫描"); } else { + this.packingNumberList.push(packingNumber) pack.scaned = true pack.scanDate = new Date(); pack.handleQty = Number(result.label.qty); @@ -507,24 +520,31 @@ scanedLength++; } }) - if (itemDetail.scaned && scanedLength == itemDetail - .packList.length) { + let isScan = false + if(packingNumber){ + isScan = this.packingNumberList.some(item=>item == packingNumber) + }else{ + isScan = false + } + if (isScan) { itemDetail.scanDate = new Date(); - this.showMessage("批次【" + batch + "】已经扫描") + this.showMessage("箱码【" + packingNumber + "】已经扫描") } else { + this.packingNumberList.push(packingNumber) itemDetail.scaned = true; itemDetail.scanDate = new Date(); - itemDetail.handleQty = Number(result.label.qty); + itemDetail.handleQty =itemDetail.handleQty ?itemDetail.handleQty:0 + itemDetail.handleQty = calc.add(itemDetail.handleQty,result.label.qty) + console.log(itemDetail.handleQty) itemDetail.toLocationCode = this.toLocationCode; itemDetail.labelQty = Number(result.label.qty); itemDetail.packList.forEach(pac => { pac.scaned = true pac.scanDate = new Date(); - pac.handleQty = Number(pac.qty); + pac.handleQty = calc.add(pac.handleQty,result.label.qty); pac.toLocationCode = this.toLocationCode; }) - - calcTreeHandleQty(this.detailSource); + detail.handleQty = itemDetail.handleQty this.detailSource[0].subList.sort(compareDesc('scanDate')); //按扫描信息排序 this.continueScan() this.$forceUpdate() @@ -598,7 +618,7 @@ //不允许部分提交,提示 this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { if (res) { - this.openScanPopup(); + this.openScanPopup(this.jobToLocationCode); } }); } @@ -634,7 +654,6 @@ } }) }, - submitJob() { uni.showLoading({ title: "提交中....", @@ -644,8 +663,6 @@ this.detailSource.forEach(item => { itemCodes.push(item.itemCode) }) - - //获取管理模式,封装参数 getManagementPrecisions(itemCodes, this.toLocationCode, res => { if (res.success) { @@ -888,7 +905,7 @@ }, openScanPopup() { - this.$refs.scanPopup.openScanPopup(); + this.$refs.scanPopup.openScanPopup(this.jobToLocationCode); }, closeScanPopup() { From ab9d82426df331df6a156f3620ef789775f403e3 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Sat, 26 Oct 2024 10:09:40 +0800 Subject: [PATCH 022/201] =?UTF-8?q?YT-501=E6=88=90=E5=93=81=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E6=8F=90=E7=A4=BA=E9=94=99=E8=AF=AF=EF=BC=8C=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E6=98=AF=EF=BC=9A=E4=B8=8D=E5=85=81=E8=AE=B8=E5=A4=A7?= =?UTF-8?q?=E4=BA=8E=E4=BB=BB=E5=8A=A1=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/qty/qtyEdit.vue | 2 +- src/pages/purchaseReceipt/job/receiptDetail.vue | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mycomponents/qty/qtyEdit.vue b/src/mycomponents/qty/qtyEdit.vue index c787a4d2..c8c7e11f 100644 --- a/src/mycomponents/qty/qtyEdit.vue +++ b/src/mycomponents/qty/qtyEdit.vue @@ -120,7 +120,7 @@ this.allQty = balanceQty; }) } else if (this.allQty > balanceQty) { - this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于库存数量[' + balanceQty + ']', + this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于任务数量[' + balanceQty + ']', res => { this.allQty = balanceQty; }) diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index d0474dc2..cca90c6a 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -669,6 +669,8 @@ this.managementList = res.list; var params = this.setParams(); let that = this + console.log(params) + // return purchaseReceiptJobSubmit(params).then(res => { if (res.data) { let isCheckPrint = getSwitchInfoByCode(this.switchCode)//是否显示上架指引单 @@ -790,6 +792,7 @@ pack.handleQty = 0 } }) + detail.toLocationCode = this.toLocationCode var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, detail.packingNumber, detail.batch); detail.toPackingNumber = info.packingNumber; @@ -863,6 +866,7 @@ }) }) + this.scanCount = getScanCount(this.detailSource); calcHandleQty(this.detailSource); } else { this.$refs.comMessage.showQuestionMessage("是否要关闭整单收货?", res => { From b4f703fe9b1ec43add07abd3327047245fc2e26d Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Sat, 26 Oct 2024 11:47:10 +0800 Subject: [PATCH 023/201] =?UTF-8?q?YT-506PDA=E7=AB=AF=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E9=A2=84=E7=94=9F=E4=BA=A7=E6=94=B6=E8=B4=A7=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=95=B0=E9=87=8F=E6=97=B6=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E6=A0=87=E7=AD=BE=E6=95=B0=E9=87=8F=E7=9A=84=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/qty/recommendQtyEdit.vue | 6 +++++- src/pages/productReceipt/coms/comProductDetailCardBatch.vue | 2 +- src/pages/purchaseReceipt/job/receiptDetail.vue | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mycomponents/qty/recommendQtyEdit.vue b/src/mycomponents/qty/recommendQtyEdit.vue index db2ad1e1..9510cb05 100644 --- a/src/mycomponents/qty/recommendQtyEdit.vue +++ b/src/mycomponents/qty/recommendQtyEdit.vue @@ -108,6 +108,10 @@ import { nextTick } from 'vue'; type: Object, default: null }, + isNumTips: { + type: Boolean, + default: true + }, }, methods: { getPackUnitName(packUnit) { @@ -170,7 +174,7 @@ import { nextTick } from 'vue'; setValue() { // var recommendQty = Number(this.dataContent.qty); // var labelQty = Number(this.dataContent.record.label.qty); - if (this.allQty > this.labelQty) { + if (this.allQty > this.labelQty && this.isNumTips) { this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于标签数量[' + this.labelQty + ']', diff --git a/src/pages/productReceipt/coms/comProductDetailCardBatch.vue b/src/pages/productReceipt/coms/comProductDetailCardBatch.vue index 2fc2be38..900c0057 100644 --- a/src/pages/productReceipt/coms/comProductDetailCardBatch.vue +++ b/src/pages/productReceipt/coms/comProductDetailCardBatch.vue @@ -25,7 +25,7 @@ - + diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index cca90c6a..0ba7c527 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -792,7 +792,7 @@ pack.handleQty = 0 } }) - detail.toLocationCode = this.toLocationCode + detail.toLocationCode = this.toLocationCode ? this.toLocationCode :this.jobToLocationCode var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, detail.packingNumber, detail.batch); detail.toPackingNumber = info.packingNumber; From 05913111a3d085994aa699da969934094d62b938 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 28 Oct 2024 08:54:54 +0800 Subject: [PATCH 024/201] =?UTF-8?q?YT-505=E6=88=90=E5=93=81=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=EF=BC=9A=E6=89=AB=E6=8F=8F=E6=95=B0=E9=87=8F=E5=A4=A7?= =?UTF-8?q?=E4=BA=8E=E4=BB=BB=E5=8A=A1=E6=95=B0=E9=87=8F=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E9=85=8D=E7=BD=AE=E4=BA=86=E4=B8=8D=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E5=A4=A7=E4=BA=8E=E6=8E=A8=E8=8D=90=E6=95=B0=E9=87=8F?= =?UTF-8?q?=EF=BC=8C=E5=88=99=E4=B8=8D=E5=8F=AF=E6=8F=90=E4=BA=A4=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/qty/qtyEdit.vue | 8 +- .../coms/comDeliverDetailCardBatch.vue | 6 +- src/pages/deliver/job/deliverDetailBatch.vue | 23 +- .../purchaseReceipt/job/receiptDetail.vue | 259 ++++++++++-------- 4 files changed, 176 insertions(+), 120 deletions(-) diff --git a/src/mycomponents/qty/qtyEdit.vue b/src/mycomponents/qty/qtyEdit.vue index c8c7e11f..fccc8b47 100644 --- a/src/mycomponents/qty/qtyEdit.vue +++ b/src/mycomponents/qty/qtyEdit.vue @@ -89,7 +89,11 @@ allowEditStatus: { type: Boolean, default: false - } + }, + allowBiggerQty: { + type: String, + default: 'TRUE' + }, }, methods: { openEditPopup(item, handleQty) { @@ -119,7 +123,7 @@ res => { this.allQty = balanceQty; }) - } else if (this.allQty > balanceQty) { + } else if (this.allQty > balanceQty && this.allowBiggerQty == 'TRUE') { this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于任务数量[' + balanceQty + ']', res => { this.allQty = balanceQty; diff --git a/src/pages/deliver/coms/comDeliverDetailCardBatch.vue b/src/pages/deliver/coms/comDeliverDetailCardBatch.vue index f8138715..f8284f15 100644 --- a/src/pages/deliver/coms/comDeliverDetailCardBatch.vue +++ b/src/pages/deliver/coms/comDeliverDetailCardBatch.vue @@ -17,7 +17,7 @@ - + @@ -67,6 +67,10 @@ import { type: Boolean, default: true }, + allowBiggerQty: { + type: Boolean, + default: false + }, }, watch: { diff --git a/src/pages/deliver/job/deliverDetailBatch.vue b/src/pages/deliver/job/deliverDetailBatch.vue index ef0be975..8a1bb006 100644 --- a/src/pages/deliver/job/deliverDetailBatch.vue +++ b/src/pages/deliver/job/deliverDetailBatch.vue @@ -30,7 +30,7 @@ + @updateData='updateData' :allowBiggerQty='allowBiggerQty'> @@ -109,7 +109,8 @@ scanOptions: [], status: "", toLocationCode: "", - jobStatus: "" + jobStatus: "", + allowBiggerQty:true,//开启数量校验提示 }; }, @@ -186,6 +187,7 @@ that.subList = res.data.subList; that.detailSource = res.data; that.toLocationCode = that.subList[0].toLocationCode + that.allowBiggerQty = res.data.allowBiggerQty; that.resizeCollapse(); } else { that.showMessage('未获取到详情'); @@ -247,6 +249,7 @@ checkCount() { let str = "" + let str1 = "" var taskQty = 0; var totalQty = 0; this.detailSource.subList.forEach(item => { @@ -260,8 +263,13 @@ //如果允许部分提交任务有扫描记录就可以直接提交;如果不允许部分执行,任务数量和提交数量不一致给出提示 this.detailSource.subList.forEach(detail => { if (this.jobContent.allowPartialComplete == "FALSE") { - if (item.taskQty != item.totalQty) { - str += `物料号【${item.itemCode}】任务数量【${item.taskQty}】与实际提交数量【${item.totalQty}】不一致\n` + if (taskQty != totalQty) { + str += `物料号【${detail.itemCode}】任务数量【${taskQty}】与实际提交数量【${totalQty}】不一致\n` + } + } + if (this.allowBiggerQty) { + if (taskQty > totalQty) { + str1 += '数量[' + totalQty + ']不允许大于任务数量[' + taskQty + ']' } } }) @@ -270,8 +278,12 @@ str = '不允许提交\n' + str this.showErrorMessage(str) } + if (str1) { + str = '不允许提交\n' + str + this.showErrorMessage(str) + } - return str ? false : true + return str || str1 ? false : true }, @@ -291,6 +303,7 @@ deliverJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { + this.showCommitSuccessMessage("提交成功\n生成发货记录\n" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index 0ba7c527..9f86cf61 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -601,7 +601,29 @@ if (!this.checkLocation()) { return } - + var itemCodes = [] + this.detailSource.forEach(item => { + itemCodes.push(item.itemCode) + }) + + //获取管理模式,封装参数 + getManagementPrecisions(itemCodes, this.toLocationCode, res => { + if (res.success) { + this.managementList = res.list; + this.managementType = this.managementList&&this.managementList[0]&&this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING' + if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY'){ + this.checkBatch() + }else{ + this.check() + } + } else { + uni.hideLoading(); + this.showErrorMessage(res.message); + } + }) + }, + // 校验 + check(){ //扫描数量和任务数量相等,直接提交 if (this.scanCount == this.subList.length) { this.submitJob(); @@ -623,9 +645,34 @@ }); } } - + + }, + //按批次的校验 + checkBatch(){ + //扫描数量和任务数量相等,直接提交 + const scanCount1 = this.detailSource + const current = this.detailSource.find(item=> item.handleQty { + if (res) { + this.submitJob() + } + }); + } else { + //不允许部分提交,提示 + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { + if (res) { + this.openScanPopup(this.jobToLocationCode); + } + }); + } + }else{ + this.submitJob(); + } }, - reject() { if (!this.reasonText) { this.showMessage("请输入拒收原因") @@ -659,121 +706,109 @@ title: "提交中....", mask: true }); - var itemCodes = [] - this.detailSource.forEach(item => { - itemCodes.push(item.itemCode) - }) - //获取管理模式,封装参数 - getManagementPrecisions(itemCodes, this.toLocationCode, res => { - if (res.success) { - this.managementList = res.list; - var params = this.setParams(); - let that = this - console.log(params) - // return - purchaseReceiptJobSubmit(params).then(res => { - if (res.data) { - let isCheckPrint = getSwitchInfoByCode(this.switchCode)//是否显示上架指引单 - let isCheckPrint1 = getSwitchInfoByCode(this.switchCode1)//是否显示采购收货检验指引单 - if (isCheckPrint1 && !isCheckPrint) { + + var params = this.setParams(); + let that = this + console.log(params) + purchaseReceiptJobSubmit(params).then(res => { + if (res.data) { + let isCheckPrint = getSwitchInfoByCode(this.switchCode)//是否显示上架指引单 + let isCheckPrint1 = getSwitchInfoByCode(this.switchCode1)//是否显示采购收货检验指引单 + if (isCheckPrint1 && !isCheckPrint) { + uni.hideLoading() + // this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number) + uni.redirectTo({ + url: '/pages/pointPutawayJob/index?number=' + that.jobContent.number + }) + }else if(!isCheckPrint1 && !isCheckPrint){ + this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + 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 + }); + + // 获取上架任务 + let timerCount = 0 + const timer1 = setInterval(async () => { + if (timerCount == 15) { + clearInterval(timer1) uni.hideLoading() - // this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number) - uni.redirectTo({ - url: '/pages/pointPutawayJob/index?number=' + that.jobContent.number - }) - }else if(!isCheckPrint1 && !isCheckPrint){ - this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + 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 - }); - - // 获取上架任务 - let timerCount = 0 - const timer1 = setInterval(async () => { - if (timerCount == 15) { - clearInterval(timer1) - uni.hideLoading() - this.showErrorMessage("上架任务生成异常,请到收货记录里重新生成上架申请") - return; + this.showErrorMessage("上架任务生成异常,请到收货记录里重新生成上架申请") + return; + } + await getPutawayJobList({ + filters: [{ + column: "purchaseReceiptRecordNumber", + action: "in", + value: res.data.number + }], + pageNo: 1, + pageSize: 1000, + }).then(res1 => { + timerCount = timerCount + 1 + if (res1.data && res1.data.list && res1 + .data + .list.length && (res1.data.total >= res + .data.detailCount)) { + uni.hideLoading() + clearInterval(timer1) + const dataParams = { + toLocationCode: res1.data.list[ + 0] + .toLocationCode, + number: res1.data.list[0] + .number, + creator: res1.data.list[0] + .creator, + createTime: res1.data.list[0] + .createTime, + ids: res1.data.list.map(item => + item.masterId).join( + ',') } - await getPutawayJobList({ - filters: [{ - column: "purchaseReceiptRecordNumber", - action: "in", - value: res.data.number - }], - pageNo: 1, - pageSize: 1000, - }).then(res1 => { - timerCount = timerCount + 1 - if (res1.data && res1.data.list && res1 - .data - .list.length && (res1.data.total >= res - .data.detailCount)) { - uni.hideLoading() - clearInterval(timer1) - const dataParams = { - toLocationCode: res1.data.list[ - 0] - .toLocationCode, - number: res1.data.list[0] - .number, - creator: res1.data.list[0] - .creator, - createTime: res1.data.list[0] - .createTime, - ids: res1.data.list.map(item => - item.masterId).join( - ',') - } - uni.hideLoading() - if(!isCheckPrint1 && isCheckPrint){ - uni.redirectTo({ - url: '/pages/pointPutawayJob/index?data=' + - encodeURIComponent(JSON.stringify(dataParams)) - }) - }else if(isCheckPrint1 && isCheckPrint){ - uni.redirectTo({ - url: '/pages/pointPutawayJob/index?number=' + that.jobContent.number + - '&data=' + - encodeURIComponent(JSON.stringify(dataParams)) - }) - } - - } - }) - }, 2000) + uni.hideLoading() + if(!isCheckPrint1 && isCheckPrint){ + uni.redirectTo({ + url: '/pages/pointPutawayJob/index?data=' + + encodeURIComponent(JSON.stringify(dataParams)) + }) + }else if(isCheckPrint1 && isCheckPrint){ + uni.redirectTo({ + url: '/pages/pointPutawayJob/index?number=' + that.jobContent.number + + '&data=' + + encodeURIComponent(JSON.stringify(dataParams)) + }) + } + + } + }) + }, 2000) - } + } - } else { - this.showErrorMessage("提交失败[" + res.msg + "]") - } - }).catch(error => { - uni.hideLoading() - this.$refs.comMessage.showErrorMessage(error, res => { - if (res) { - navigateBack(1) - } - }); - }) } else { - uni.hideLoading(); - this.showErrorMessage(res.message); + this.showErrorMessage("提交失败[" + res.msg + "]") } - }); + }).catch(error => { + uni.hideLoading() + this.$refs.comMessage.showErrorMessage(error, res => { + if (res) { + navigateBack(1) + } + }); + }) + }, From 5a250bce8e3a64d524ec4f8115d9e38d2bfcecd1 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 28 Oct 2024 13:42:55 +0800 Subject: [PATCH 025/201] =?UTF-8?q?YT-505=E6=88=90=E5=93=81=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=EF=BC=9A=E6=89=AB=E6=8F=8F=E6=95=B0=E9=87=8F=E5=A4=A7?= =?UTF-8?q?=E4=BA=8E=E4=BB=BB=E5=8A=A1=E6=95=B0=E9=87=8F=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E9=85=8D=E7=BD=AE=E4=BA=86=E4=B8=8D=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E5=A4=A7=E4=BA=8E=E6=8E=A8=E8=8D=90=E6=95=B0=E9=87=8F?= =?UTF-8?q?=EF=BC=8C=E5=88=99=E4=B8=8D=E5=8F=AF=E6=8F=90=E4=BA=A4=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/qty/qtyEdit.vue | 3 ++- src/pages/deliver/job/deliverDetailBatch.vue | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mycomponents/qty/qtyEdit.vue b/src/mycomponents/qty/qtyEdit.vue index fccc8b47..68542672 100644 --- a/src/mycomponents/qty/qtyEdit.vue +++ b/src/mycomponents/qty/qtyEdit.vue @@ -117,13 +117,14 @@ this.allQty = val * Number(this.dataContent.packQty); }, setValue() { + console.log(344,this.allowBiggerQty) var balanceQty = Number(this.dataContent.qty); if (this.allQty == 0) { this.$refs.comMessage.showConfirmWarningModal('数量必须大于0', res => { this.allQty = balanceQty; }) - } else if (this.allQty > balanceQty && this.allowBiggerQty == 'TRUE') { + } else if (this.allQty > balanceQty && this.allowBiggerQty == 'FALSE') { this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于任务数量[' + balanceQty + ']', res => { this.allQty = balanceQty; diff --git a/src/pages/deliver/job/deliverDetailBatch.vue b/src/pages/deliver/job/deliverDetailBatch.vue index 8a1bb006..17800ee6 100644 --- a/src/pages/deliver/job/deliverDetailBatch.vue +++ b/src/pages/deliver/job/deliverDetailBatch.vue @@ -110,7 +110,7 @@ status: "", toLocationCode: "", jobStatus: "", - allowBiggerQty:true,//开启数量校验提示 + allowBiggerQty:"TRUE",//开启数量校验提示 }; }, @@ -267,7 +267,7 @@ str += `物料号【${detail.itemCode}】任务数量【${taskQty}】与实际提交数量【${totalQty}】不一致\n` } } - if (this.allowBiggerQty) { + if (this.allowBiggerQty == 'FALSE') { if (taskQty > totalQty) { str1 += '数量[' + totalQty + ']不允许大于任务数量[' + taskQty + ']' } From 340c92cd05a7092f2dbcda797e99c3eaf86a8231 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 28 Oct 2024 14:01:23 +0800 Subject: [PATCH 026/201] =?UTF-8?q?YT-508=E5=90=88=E6=A0=BC=E8=BD=AC?= =?UTF-8?q?=E6=8A=A5=E5=BA=9F=E8=BF=98=E6=98=AF=E6=8C=89=E5=8D=95=E7=AE=B1?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=A0=A1=E9=AA=8C=E6=89=AB=E6=8F=8F=E6=95=B0?= =?UTF-8?q?=E9=87=8F=EF=BC=9B=E6=8F=90=E4=BA=A4=E5=90=8E=E7=94=9F=E6=88=90?= =?UTF-8?q?=E7=9A=84=E5=BA=93=E5=AD=98=E4=BA=8B=E5=8A=A1=E4=B8=AD=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E4=B8=BA0=EF=BC=8C=E5=BA=94=E8=AF=A5=E6=98=AF?= =?UTF-8?q?=E5=AE=9E=E9=99=85=E6=89=AB=E6=8F=8F=E7=9A=84=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventoryMove/job/inventoryMoveDetail.vue | 99 ++++++++++++------- 1 file changed, 65 insertions(+), 34 deletions(-) diff --git a/src/pages/inventoryMove/job/inventoryMoveDetail.vue b/src/pages/inventoryMove/job/inventoryMoveDetail.vue index 1b3324c1..c17ae97c 100644 --- a/src/pages/inventoryMove/job/inventoryMoveDetail.vue +++ b/src/pages/inventoryMove/job/inventoryMoveDetail.vue @@ -389,22 +389,41 @@ }, - commit() { + async commit() { this.scanCount = getScanCount(this.subList); if (this.scanCount == 0) { this.showErrorMessage("扫描数为0,请先扫描") return; } - +//查询管理模式 + this.managementList = []; + var precisionStrategParams = this.setPrecisionStrategParams() + await getPrecisionStrategyList(precisionStrategParams, res => { + if (res.success) { + this.managementList = res.list; + this.managementType = this.managementList&& this.managementList[0]&& this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING' + } else { + uni.hideLoading(); + this.showErrorMessage(res.message); + } + }) //允许部分提交 //扫描数量和任务数量相等,直接提交 if (this.scanCount == this.subList.length) { - this.checkCount(); + if(this.managementType == 'BY_BATCH'){ + this.checkCount(); + }else{ + this.checkCountBatch(); + } } else if (this.scanCount < this.subList.length) { //扫描数量小于任务数量,判断是否允许部分提交 if (this.jobContent.allowPartialComplete == "TRUE") { //提交 - this.checkCount(); + if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY' ){ + this.checkCountBatch(); + }else{ + this.checkCount(); + } } else { //不允许部分提交,提示 this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { @@ -443,44 +462,56 @@ this.submitJob() } }, - + checkCountBatch(){ + // 提交的数量和任务数量不一致提示 + let str = '' + this.detailSource.forEach((item) => { + item.subList.forEach(cur => { + if (cur.qty != cur.handleQty) { + var tempHandleQty = 0 + if (cur.handleQty) { + tempHandleQty = cur.handleQty + } else { + tempHandleQty = 0 + } + str += + `提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n` + } + }) + }) + if (str) { + str = '任务明细未全部完成,是否提交?\n' + str + this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { + if (res) { + this.submitJob() + } + }); + } else { + this.submitJob() + } + }, submitJob() { uni.showLoading({ title: "提交中....", mask: true }); - - //查询管理模式 - this.managementList = []; - var precisionStrategParams = this.setPrecisionStrategParams() - getPrecisionStrategyList(precisionStrategParams, res => { - if (res.success) { - this.managementList = res.list; - - var params = this.setParams() - console.log("提交" + JSON.stringify(params)) - inventoryMoveSubmit(params).then(res => { - uni.hideLoading() - if (res.data) { - let showTitle = this.title - if (this.title.indexOf('任务') == this.title.length - 2) { - showTitle = this.title.replace('任务', '') - } - this.showCommitSuccessMessage("提交成功\n生成" + showTitle + "记录\n" + res.data) - } else { - this.showErrorMessage("提交失败[" + res.msg + "]") - } - }).catch(error => { - uni.hideLoading() - this.showErrorMessage(error) - }) + var params = this.setParams() + console.log("提交" + JSON.stringify(params)) + inventoryMoveSubmit(params).then(res => { + uni.hideLoading() + if (res.data) { + let showTitle = this.title + if (this.title.indexOf('任务') == this.title.length - 2) { + showTitle = this.title.replace('任务', '') + } + this.showCommitSuccessMessage("提交成功\n生成" + showTitle + "记录\n" + res.data) } else { - uni.hideLoading(); - this.showErrorMessage(res.message); + this.showErrorMessage("提交失败[" + res.msg + "]") } - + }).catch(error => { + uni.hideLoading() + this.showErrorMessage(error) }) - }, setPrecisionStrategParams() { From a9541bae06044e724996162c90b91100fc585924 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 28 Oct 2024 14:02:29 +0800 Subject: [PATCH 027/201] 11 --- src/common/balance.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/balance.js b/src/common/balance.js index 8fa38a44..7e682098 100644 --- a/src/common/balance.js +++ b/src/common/balance.js @@ -75,7 +75,7 @@ export function getPrecisionStrategyParamsByLocation(detailSource, toLocationCod * @param {*} * */ -export function getPrecisionStrategyList(itemList, callback) { +export async function getPrecisionStrategyList(itemList, callback) { // let jsonParem = JSON.stringify(param) let result = { list: [], @@ -83,7 +83,7 @@ export function getPrecisionStrategyList(itemList, callback) { message: '' }; - getPrecisionStrategy(itemList).then(res => { + await getPrecisionStrategy(itemList).then(res => { if (res.data == null) { result.success = false result.message = '未查询到管理精度信息' From 7ec4a339116ef44c7d9f80516f4d4cac75ccfb5b Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 28 Oct 2024 14:55:57 +0800 Subject: [PATCH 028/201] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/request2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/request2.js b/src/api/request2.js index 184b1780..cca0a80b 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -4370,8 +4370,8 @@ export function getTransactionByFilter(param) { * @param {*} * */ -export function getPrecisionStrategy(param) { - return request({ +export async function getPrecisionStrategy(param) { + return await request({ url: baseApi + "/wms/rule/getPrecisionStrategy", method: "post", data: param, From d5b0ae0c5c32d2e0519dbe56a09c3bb6d269e1a6 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 28 Oct 2024 15:19:55 +0800 Subject: [PATCH 029/201] =?UTF-8?q?=E5=90=88=E6=A0=BC=E8=BD=AC=E9=9A=94?= =?UTF-8?q?=E7=A6=BB=E9=A1=B5=E9=9D=A2=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventoryMove/coms/okToHoldRecordScan.vue | 327 ++++++++++++++++++ .../inventoryMove/record/okToHoldRecord.vue | 43 ++- 2 files changed, 347 insertions(+), 23 deletions(-) create mode 100644 src/pages/inventoryMove/coms/okToHoldRecordScan.vue diff --git a/src/pages/inventoryMove/coms/okToHoldRecordScan.vue b/src/pages/inventoryMove/coms/okToHoldRecordScan.vue new file mode 100644 index 00000000..73acab6f --- /dev/null +++ b/src/pages/inventoryMove/coms/okToHoldRecordScan.vue @@ -0,0 +1,327 @@ + + + + + \ No newline at end of file diff --git a/src/pages/inventoryMove/record/okToHoldRecord.vue b/src/pages/inventoryMove/record/okToHoldRecord.vue index bac77279..e3b0a138 100644 --- a/src/pages/inventoryMove/record/okToHoldRecord.vue +++ b/src/pages/inventoryMove/record/okToHoldRecord.vue @@ -1,59 +1,56 @@ + + \ No newline at end of file diff --git a/src/pages/putaway/record/putawayRecord.vue b/src/pages/putaway/record/putawayRecord.vue index 23d62c41..ab989921 100644 --- a/src/pages/putaway/record/putawayRecord.vue +++ b/src/pages/putaway/record/putawayRecord.vue @@ -15,12 +15,21 @@ + + + @removePack="removePack" + v-else> @@ -81,7 +90,8 @@ getBusinessType, createItemInfo, createDetailInfo, - calcHandleQty + calcHandleQty, + calcHandleQtyAdd } from '@/common/record.js'; import { @@ -97,6 +107,7 @@ import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' + import recordComDetailCardBatch from '@/mycomponents/record/recordComDetailCardBatch.vue' export default { components: { @@ -106,7 +117,8 @@ comBlankView, winScanLocation, winScanPackAndLocation, - recordComDetailCard + recordComDetailCard, + recordComDetailCardBatch }, data() { return { @@ -125,6 +137,7 @@ fromWarehouseCode: '', //来源仓库 businessTypeCode: "PurchasePutaway", editItem:{}, + managementType:'' }; }, onLoad(option) { @@ -157,7 +170,88 @@ mounted() {}, methods: { - getScanResult(result) { + getScanResult(result,managementType) { + this.managementType = managementType + if(managementType == "BY_BATCH" ||managementType == "BY_QUANTITY" ){ + this. getScanResultAfterBatch(result) + }else{ + this. getScanResultAfter(result) + } + + }, + getScanResultAfterBatch(result){ + let balance = result.balance; + let label = result.label; + let pack = result.package; + let poLine =label.poLine; + let poNumber =label.poNumber; + let supplierCode=label.supplierCode; + var item = this.detailSource.find(res => { + if (res.itemCode == balance.itemCode) { + return res + } + }) + if (this.fromWarehouseCode == '') { + this.fromWarehouseCode = balance.warehouseCode; + } + if (item == undefined) { + // 获取推荐库位 + this.getRecommendLocation(balance, pack, toLocation => { + var itemp = createItemInfo(balance, pack); + itemp.toLocationCode = toLocation.locationCode; + let newDetail = createDetailInfo(balance, pack); // + newDetail.toLocationCode = toLocation.locationCode; + newDetail.toWarehouseCode = toLocation.toWarehouseCode; + newDetail.poLine=poLine; + newDetail.poNumber=poNumber; + newDetail.supplierCode=supplierCode; + newDetail.fromInventoryStatus = balance.inventoryStatus; + newDetail.handleQty =0; + newDetail.balanceQty =result.balance.qty; + itemp.subList.push(newDetail); + this.detailSource.push(itemp) + calcHandleQtyAdd(this.detailSource,result.label); + }) + + } else { + var detail = item.subList.find(r => { + if ( + r.batch == balance.batch && + r.locationCode == balance.locationCode && + r.inventoryStatus == balance.inventoryStatus) { + return r; + } + }) + if (detail == undefined) { + this.getRecommendLocation(balance, pack, toLocation => { + let newDetail = createDetailInfo(balance, pack); + newDetail.toLocationCode = toLocation.locationCode; + newDetail.toWarehouseCode = toLocation.toWarehouseCode; + newDetail.poLine=poLine; + newDetail.poNumber=poNumber; + newDetail.supplierCode=supplierCode; + newDetail.fromInventoryStatus = balance.inventoryStatus; + newDetail.handleQty =0; + newDetail.balanceQty =result.balance.qty; + if(item.subList&&item.subList.length>0){ + if(item.subList[0].batch!=newDetail.batch){ + this.showErrorMessage("扫描的批次是["+newDetail.batch+"],请扫描["+item.subList[0].batch+"的批次的箱码") + } + }else { + item.subList.push(newDetail); + calcHandleQtyAdd(this.detailSource,result.label); + } + }); + } else { + if (detail.scaned == true) { + calcHandleQtyAdd(this.detailSource,result.label); + // this.showErrorMessage( "批次[" + balance.batch + "]重复扫描") + } + } + } + + }, + getScanResultAfter(result){ let balance = result.balance; let label = result.label; let pack = result.package; @@ -189,7 +283,7 @@ this.detailSource.push(itemp) calcHandleQty(this.detailSource); }) - + } else { var detail = item.subList.find(r => { if (r.packingNumber == balance.packingNumber && @@ -225,7 +319,6 @@ } }, - //获取推荐库位 getRecommendLocation(balance, pack, callback) { uni.showLoading({ @@ -344,8 +437,14 @@ if (res.success) { this.managementList = res.list; var params = this.setRecordParams() - console.log("提交参数", JSON.stringify(params)); - + console.log("提交参数", params); + const isHaveItem =params.subList.find(item=>item.handleQty > item.balanceQty) + if(isHaveItem){ + this.showErrorMessage(`物料号${isHaveItem.itemCode}`) + this.$refs.comMessage.showConfirmWarningModal('物料号'+isHaveItem.itemCode+'数量[' + isHaveItem.handleQty + ']不允许大于库存数量[' + isHaveItem.balanceQty + ']') + uni.hideLoading() + return + } putawayRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { @@ -415,6 +514,8 @@ submitItem.fromLocationCode = detail.locationCode; submitItem.toLocationCode = detail.toLocationCode; + submitItem.balanceQty = detail.balanceQty; + submitItem.itemName = item.itemName; // detail.toInventoryStatus = detail.inventoryStatus From 89fed1d271053cde889e883535069cfb001bf6b3 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 29 Oct 2024 15:03:11 +0800 Subject: [PATCH 035/201] =?UTF-8?q?YT-483=E7=9B=B4=E6=8E=A5=E5=8F=91?= =?UTF-8?q?=E6=96=99=E6=8C=89=E7=85=A7=E6=89=B9=E6=AC=A1=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=B2=BE=E5=BA=A6=EF=BC=8C=E9=87=8D=E5=A4=8D=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=E7=AE=B1=E7=AD=BE=E5=BA=94=E8=AF=A5=E7=B4=AF=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E9=87=8F=EF=BC=8C=E8=80=8C=E4=B8=8D=E4=BC=9A=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=89=AB=E6=8F=8F=E3=80=82=E4=B8=8D=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E6=9F=A5=E5=BA=93=E5=AD=98=E6=95=B0=E9=87=8F=EF=BC=8C?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E6=89=AB=E6=8F=8F=E6=8F=90=E4=BA=A4=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E7=AE=B1=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/record/directIssue.vue | 68 +++++++++++++++------- src/pages/putaway/record/putawayRecord.vue | 4 +- 2 files changed, 49 insertions(+), 23 deletions(-) diff --git a/src/pages/issue/record/directIssue.vue b/src/pages/issue/record/directIssue.vue index 92624f75..fffd929f 100644 --- a/src/pages/issue/record/directIssue.vue +++ b/src/pages/issue/record/directIssue.vue @@ -9,10 +9,18 @@ + + + @removePack="removePack" v-else> @@ -77,7 +85,8 @@ getBusinessType, createItemInfo, createDetailInfo, - calcHandleQty + calcHandleQty, + calcHandleQtyAdd } from '@/common/record.js'; import { @@ -97,6 +106,7 @@ import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' + import recordComDetailCardBatch from '@/mycomponents/record/recordComDetailCardBatch.vue' import recordDetailCard from '@/mycomponents/record/recordDetailCard.vue' import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' @@ -112,6 +122,7 @@ winScanLocation, winScanPackAndLocation, recordComDetailCard, + recordComDetailCardBatch, recordDetailCard, balanceSelect, winComScanBalance, @@ -137,7 +148,8 @@ show: false, positionInfo: "请选择生产线", resultData: {}, - itemCode: "" + itemCode: "", + managementType:'' }; }, onLoad(option) { @@ -192,8 +204,9 @@ }); }, - async getScanResult(result,managementType) { - if(managementType == "BY_BATCH" ||managementType == "BY_QUANTITY" ){ + async getScanResult(result,managementTypeParams) { + this.managementType = managementTypeParams + if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ this.setDataBatch(result); }else{ this.setData(result); @@ -356,11 +369,12 @@ newDetail.packUnit = pack.packUnit; newDetail.packQty = pack.packQty; newDetail.handleQty = 0 + newDetail.balanceQty =result.balance.qty; itemp.subList.push(newDetail); this.detailSource.push(itemp) this.itemCode = balance.itemCode; this.fromLocationCode = balance.locationCode - this.scanPopupGetFocus() + // this.scanPopupGetFocus() } else { var detail = item.subList.find(r => { @@ -418,6 +432,7 @@ newDetail.packQty = pack.packQty; newDetail.fromLocationCode=balance.locationCode newDetail.handleQty = 0 + newDetail.balanceQty =result.balance.qty; item.subList.push(newDetail); } }) @@ -430,32 +445,35 @@ newDetail.packUnit = pack.packUnit; newDetail.packQty = pack.packQty; newDetail.handleQty = 0 + newDetail.balanceQty =result.balance.qty; item.subList.push(newDetail); } } - this.scanPopupGetFocus() + // this.scanPopupGetFocus() } else { if (detail.scaned == true) { // this.showErrorMessage("箱码[" + detail.packingNumber + "批次[" + balance.batch + "]重复扫描") } } } - // calcHandleQty(this.detailSource); console.log(this.detailSource) - for (let item of this.detailSource) { - item.handleQty = new Decimal(0).toNumber(); - item.qty = new Decimal(0).toNumber(); - for (let detail of item.subList) { - if (detail != undefined) { - if (detail.scaned) { - item.handleQty = calc.add(result.label.qty, detail.handleQty) - detail.handleQty = calc.add(result.label.qty, detail.handleQty); - } - item.qty = calc.add(item.qty, detail.qty); - } - } - } + console.log(result.label) + calcHandleQtyAdd(this.detailSource, result.label); + // console.log(this.detailSource) + // for (let item of this.detailSource) { + // item.handleQty = new Decimal(0).toNumber(); + // item.qty = new Decimal(0).toNumber(); + // for (let detail of item.subList) { + // if (detail != undefined) { + // if (detail.scaned) { + // item.handleQty = calc.add(result.label.qty, detail.handleQty) + // detail.handleQty = calc.add(result.label.qty, detail.handleQty); + // } + // item.qty = calc.add(item.qty, detail.qty); + // } + // } + // } }, showErrorMessage(message) { @@ -595,6 +613,13 @@ ...this.setRecordParams() } console.log("提交参数", JSON.stringify(params)); + const isHaveItem =params.subList.find(item=>item.handleQty > item.balanceQty) + if(isHaveItem){ + this.showErrorMessage(`物料号${isHaveItem.itemCode}`) + this.$refs.comMessage.showConfirmWarningModal('物料号'+isHaveItem.itemCode+'数量[' + isHaveItem.handleQty + ']不允许大于库存数量[' + isHaveItem.balanceQty + ']') + uni.hideLoading() + return + } issueRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { @@ -637,6 +662,7 @@ // detail.toLocationCode = detail.toLocationCode submitItem.qty = detail.handleQty; submitItem.package = ""; + submitItem.balanceQty = detail.balanceQty; submitItem.recordList = [{ toInventoryStatus: detail.inventoryStatus, fromParentPackingNumber: detail.parentNumber, diff --git a/src/pages/putaway/record/putawayRecord.vue b/src/pages/putaway/record/putawayRecord.vue index ab989921..69841f91 100644 --- a/src/pages/putaway/record/putawayRecord.vue +++ b/src/pages/putaway/record/putawayRecord.vue @@ -171,8 +171,8 @@ methods: { getScanResult(result,managementType) { - this.managementType = managementType - if(managementType == "BY_BATCH" ||managementType == "BY_QUANTITY" ){ + this.managementType = managementTypeParams + if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ this. getScanResultAfterBatch(result) }else{ this. getScanResultAfter(result) From 01a215bfd9c915f1f0330e14b4fe14020c1ecfab Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 29 Oct 2024 17:31:08 +0800 Subject: [PATCH 036/201] =?UTF-8?q?YT-552=E6=89=80=E6=9C=89=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5xxx=E4=BB=BB=E5=8A=A1=EF=BC=8C=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=AB=E7=A0=81=E5=BA=93=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/login/index.vue | 2 +- .../record/productPutawayRecord.vue | 196 +++++++++++++++++- src/pages/putaway/record/putawayRecord.vue | 8 +- 3 files changed, 192 insertions(+), 14 deletions(-) diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index f6c8f562..852a5f19 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -132,7 +132,7 @@ storage.clearStorage() if (process.env.NODE_ENV === 'development') { this.username = "admin" - this.password = "win123456"; + this.password = "CD_win09"; } uni.setNavigationBarColor({ frontColor: '#ffffff', diff --git a/src/pages/productPutaway/record/productPutawayRecord.vue b/src/pages/productPutaway/record/productPutawayRecord.vue index 9d78225b..28c0a642 100644 --- a/src/pages/productPutaway/record/productPutawayRecord.vue +++ b/src/pages/productPutaway/record/productPutawayRecord.vue @@ -8,10 +8,17 @@ + + + @updateData="updateData" @removePack="removePack" @editLocation="showScanToLocation" + v-else> @@ -42,6 +49,12 @@ + + + + + @@ -72,7 +85,8 @@ getBusinessType, createItemInfo, createDetailInfo, - calcHandleQty + calcHandleQty, + calcHandleQtyAdd } from '@/common/record.js'; import { @@ -87,6 +101,8 @@ import winScanPackage from '@/mycomponents/scan/winScanPackage.vue' import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' + import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" + import recordComDetailCardBatch from '@/mycomponents/record/recordComDetailCardBatch.vue' import { updateTitle } from '@/common/basic.js'; @@ -100,7 +116,9 @@ recordComDetailCard, winScanPackage, winScanLocation, - winComScanBalance + winComScanBalance, + winScanPackAndLocation, + recordComDetailCardBatch }, data() { return { @@ -120,7 +138,8 @@ businessType: {}, managementList: [], type: '', - editItem: null + editItem: null, + managementType:'' }; }, // 装配收货:type = 'assemble' @@ -154,8 +173,140 @@ }, methods: { - getScanResult(result) { - this.setData(result); + getScanResult(result,managementTypeParams) { + this.managementType = managementTypeParams + if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ + this.setDataBatch(result) + }else{ + this.setData(result) + } + }, + async setDataBatch(result) { + let balance = result.balance; + let label = result.label; + let pack = result.package; + + var item = this.detailSource.find(res => { + if (res.itemCode == balance.itemCode) { + return res + } + }) + if (item == undefined) { + var itemp = createItemInfo(balance, pack); + // itemp.containerNumber="" + let newDetail = createDetailInfo(balance, pack); // + newDetail.fromLocationCode=balance.locationCode + + newDetail.parentNumber = pack.parentNumber; + newDetail.packingNumber = pack.number + newDetail.packUnit = pack.packUnit; + newDetail.packQty = pack.packQty; + if (balance.lableQty) { + newDetail.handleQty = balance.lableQty + } + newDetail.handleQty =0; + newDetail.balanceQty =result.balance.qty; + itemp.subList.push(newDetail); + this.detailSource.push(itemp) + this.itemCode = balance.itemCode; + this.fromLocationCode = balance.locationCode + await this.getRecommendLocation(balance,result) + await this.scanPopupGetFocus() + } else { + var detail = item.subList.find(r => { + if (r.batch == balance.batch && + r.fromLocationCode == balance.locationCode && + r.inventoryStatus == balance.inventoryStatus) { + return r; + } + }) + if (detail == undefined) { + //如果最开始扫父,在扫子,提示已经扫描父包装 + //如果扫子在扫父,提示扫描的是父包装,是否移除子包装,是移除子包装,显示父包装 + //扫描的是子包装, + if (pack.parentNumber) { + var checkData = item.subList.find(r => { + if (r.packingNumber == pack.parentNumber && + r.batch == balance.batch&& + r.fromLocationCode == balance.locationCode) { + return r; + } + }) + if (checkData) { + //提示已经扫描 + this.showErrorMessage("扫描箱码[" + pack.number + "]批次[" + balance.batch + + "]的父包装已经扫描") + console.log("父包装已经扫描") + } else { + let newDetail = createDetailInfo(balance, pack); + newDetail.parentNumber = pack.parentNumber; + newDetail.packingNumber = pack.number + newDetail.packUnit = pack.packUnit; + newDetail.packQty = pack.packQty; + newDetail.fromLocationCode=balance.locationCode + if (balance.lableQty) { + newDetail.handleQty = balance.lableQty + } + newDetail.handleQty =0; + newDetail.balanceQty =result.balance.qty; + item.subList.push(newDetail); + } + } else { + //扫描的是父包装 + var checkData = item.subList.find(r => { + if (r.parentNumber == pack.number && + r.batch == balance.batch&& + r.fromLocationCode == balance.locationCode) { + return r; + } + }) + if (checkData) { + //是否移除 + this.$refs.comMessage.showQuestionMessage("箱码[" + checkData.parentNumber+"]" + "批次[" + balance + .batch + "]是父包装,是否移除子包装", res => { + if (res) { + item.subList = []; + let newDetail = createDetailInfo(balance, pack); + newDetail.parentNumber = pack.parentNumber; + newDetail.packingNumber = pack.number + newDetail.packUnit = pack.packUnit; + newDetail.packQty = pack.packQty; + newDetail.fromLocationCode=balance.locationCode + if (balance.lableQty) { + newDetail.handleQty = balance.lableQty + } + newDetail.handleQty =0; + newDetail.balanceQty =result.balance.qty; + item.subList.push(newDetail); + calcHandleQtyAdd(this.detailSource,result.label); + } + }) + console.log("扫描的是父包装,是否移除子包装") + } else { + let newDetail = createDetailInfo(balance, pack); + newDetail.fromLocationCode=balance.locationCode + newDetail.parentNumber = pack.parentNumber; + newDetail.packingNumber = pack.number + newDetail.packUnit = pack.packUnit; + newDetail.packQty = pack.packQty; + if (balance.lableQty) { + newDetail.handleQty = balance.lableQty + } + newDetail.handleQty =0; + newDetail.balanceQty =result.balance.qty; + item.subList.push(newDetail); + } + } + + this.scanPopupGetFocus() + } else { + if (detail.scaned == true) { + // detail.handleQty = calc.add(detail.handleQty,result.label.qty) + // this.showErrorMessage("箱码[" + detail.packingNumber + "批次[" + balance.batch + "]重复扫描") + } + } + } + calcHandleQtyAdd(this.detailSource,result.label); }, async setData(result) { @@ -421,7 +572,8 @@ openScanPopup() { if (this.businessType) { this.toLocationAreaTypeList = getDirectoryItemArray(this.businessType.inAreaTypes) - this.$refs.scanPopup.openScanPopup(this.businessType); + // this.$refs.scanPopup.openScanPopup(this.businessType); + this.openFromLocationScanPopup() } else { this.getBusinessType() } @@ -444,7 +596,18 @@ this.$refs.scanPopup.losefocus(); } }, - + openFromLocationScanPopup() { + if (this.fromLocationCode == "") { + this.showFromLocationPopup(); + return + } + this.$refs.winScanPackAndLocationRef.openScanPopupForType(this.fromLocationCode, this.businessType); + }, + showFromLocationPopup() { + this.$nextTick(() => { + this.$refs.winScanFromLocation.openScanPopup(); + }) + }, scanLocationCode(location, code) { this.toLocationCode = code this.detailSource.forEach(item => { @@ -463,7 +626,15 @@ }); var params = this.setParams() + console.log("提交" + JSON.stringify(params)) + const isHaveItem =params.subList.find(item=>item.handleQty > item.balanceQty) + if(isHaveItem){ + this.showErrorMessage(`物料号${isHaveItem.itemCode}`) + this.$refs.comMessage.showConfirmWarningModal('物料号'+isHaveItem.itemCode+'数量[' + isHaveItem.handleQty + ']不允许大于库存数量[' + isHaveItem.balanceQty + ']') + uni.hideLoading() + return + } productPutawayRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { @@ -574,7 +745,14 @@ getToLocationCode(location, code) { this.editItem.toLocationCode = code; }, - + getLocation(location, code) { + this.getFromLocationCode(location, code) + }, + getFromLocationCode(location, code) { + this.fromLocationInfo = location; + this.fromLocationCode = code; + this.openScanPopup(); + }, showCommitSuccessMessage(hint) { this.$refs.comMessage.showSuccessMessage(hint, res => { this.clearData(); diff --git a/src/pages/putaway/record/putawayRecord.vue b/src/pages/putaway/record/putawayRecord.vue index 69841f91..1ea5eab1 100644 --- a/src/pages/putaway/record/putawayRecord.vue +++ b/src/pages/putaway/record/putawayRecord.vue @@ -173,13 +173,13 @@ getScanResult(result,managementType) { this.managementType = managementTypeParams if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ - this. getScanResultAfterBatch(result) + this.setDataBatch(result) }else{ - this. getScanResultAfter(result) + this.setData(result) } }, - getScanResultAfterBatch(result){ + setDataBatch(result){ let balance = result.balance; let label = result.label; let pack = result.package; @@ -251,7 +251,7 @@ } }, - getScanResultAfter(result){ + setData(result){ let balance = result.balance; let label = result.label; let pack = result.package; From 1d37a83b02215208c03f27c7918c0fa9be2e66bf Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 30 Oct 2024 09:55:01 +0800 Subject: [PATCH 037/201] =?UTF-8?q?YT-565=E5=8F=91=E6=96=99=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C=E6=89=93=E5=8D=B0=E5=BA=93=E5=AD=98=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=EF=BC=8C=E6=89=AB=E6=8F=8F=E6=8F=90=E7=A4=BA=E5=B8=A6?= =?UTF-8?q?=E5=8C=85=E8=A3=85HPQ;V1.0;UKG;E;L;O;Sdefault;LB017020;B2024102?= =?UTF-8?q?9;A;Q5.000000;IQPLP1-20200-00;PPN20241029-0000000002;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/coms/comScanIssuePack.vue | 25 +++++++++++++++-------- src/pages/issue/job/issueDetail.vue | 7 ++++--- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue index e4e88005..ecf674cf 100644 --- a/src/pages/issue/coms/comScanIssuePack.vue +++ b/src/pages/issue/coms/comScanIssuePack.vue @@ -55,7 +55,7 @@ + headerType="HPQ,HMQ" :isShowHistory="false" :locationCode='locationCode'> @@ -152,6 +152,10 @@ type: String, default: '' }, + locationCode:{ + type: String, + default: '' + } }, data() { return { @@ -179,7 +183,7 @@ fontSize: "100rpx" }, bussinessCode: 'Issue', - toLocationAreaTypeList: [] + toLocationAreaTypeList: [], } }, created() { @@ -270,7 +274,7 @@ } }, - queryBalance(result) { + queryBalance(result , managementType ) { try { let that = this; // if (that.fromLocationCode == '') { @@ -281,7 +285,12 @@ // } let packageInfo = result.package; let itemCode = result.label.itemCode; - let packingCode = result.label.packingNumber; + let packingCode = ''; + if(managementType == 'BY_BATCH' || managementType == 'BY_QUANTITY'){ + packingCode = '' + } else{ + packingCode = result.label.packingNumber; + } let lot = result.label.batch; let item = that.toLocation.Items.find(r => r.itemCode == itemCode); if (item == undefined) { @@ -401,7 +410,7 @@ }, - onScan(result) { + onScan(result, managementType) { if (!result.package) { this.showErrorMessage('扫描数据错误[' + result.label.code + "]", res => { @@ -427,12 +436,12 @@ this.getToLocationBalance(result) } }else{ - this.queryBalance(result) + this.queryBalance(result, managementType) } }, //查询到目标库位的库存余额 - getToLocationBalance(result) { + getToLocationBalance(result, managementType) { uni.showLoading({ title: '查询中', mask: true @@ -470,7 +479,7 @@ // value: this.toLocationAreaTypeList.join(',') // }) - this.queryBalance(result); + this.queryBalance(result, managementType); // var params = { // filters: filters, // pageNo: 1, diff --git a/src/pages/issue/job/issueDetail.vue b/src/pages/issue/job/issueDetail.vue index 06d17c2f..e171f0ed 100644 --- a/src/pages/issue/job/issueDetail.vue +++ b/src/pages/issue/job/issueDetail.vue @@ -46,7 +46,7 @@ + @afterScan='afterScan' :locationCode='fromLocationCode'> @@ -115,7 +115,8 @@ jobStatus: "", scanMessage: '', managementList: [], - managementType: "" + managementType: "", + fromLocationCode:'' }; }, @@ -300,7 +301,7 @@ this.showErrorMessage("请扫描您需要提交的发料任务") return } - console.log("提交参数", JSON.stringify(params)); + console.log("提交参数", params); issueJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { From a79acbce07af3f2bf4269d4340befba0749fa9bd Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 30 Oct 2024 09:55:40 +0800 Subject: [PATCH 038/201] =?UTF-8?q?YT-565=E5=8F=91=E6=96=99=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C=E6=89=93=E5=8D=B0=E5=BA=93=E5=AD=98=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=EF=BC=8C=E6=89=AB=E6=8F=8F=E6=8F=90=E7=A4=BA=E5=B8=A6?= =?UTF-8?q?=E5=8C=85=E8=A3=85HPQ;V1.0;UKG;E;L;O;Sdefault;LB017020;B2024102?= =?UTF-8?q?9;A;Q5.000000;IQPLP1-20200-00;PPN20241029-0000000002;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/label.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/label.js b/src/common/label.js index f17c0113..9e3a4c8c 100644 --- a/src/common/label.js +++ b/src/common/label.js @@ -137,9 +137,11 @@ export async function getLabelItems(labelItem, scanMsg, callBack,locationCode) { callBack(labelResult); }) } else { + console.log(999,labelResult) //线边的物料可能没有箱码 labelResult.package = labelResult.label; labelResult.package.number = packingNumber1 ? packingNumber1 : '' + labelResult.package.packingNumber='' callBack(labelResult); // labelResult.success = false; // labelResult.message = '在条码中未解析到箱码'; From d97952e14bd6a6f81e92555f77c18f12d821908d Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 30 Oct 2024 16:04:02 +0800 Subject: [PATCH 039/201] =?UTF-8?q?YT-571=E9=87=87=E8=B4=AD=E6=94=B6?= =?UTF-8?q?=E8=B4=A7=EF=BC=8C=E4=BB=BB=E5=8A=A1=E5=A6=82=E6=9E=9C=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E7=BC=96=E8=BE=91=EF=BC=8C=E5=B7=A6=E6=BB=91=E8=A6=81?= =?UTF-8?q?=E6=9C=89=E7=BC=96=E8=BE=91=E6=8C=89=E9=92=AE=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E4=B8=94=E5=AE=9E=E7=8E=B0=E7=BC=96=E8=BE=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchaseReceipt/job/receiptDetail.vue | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index 9f86cf61..7db13922 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -307,8 +307,6 @@ if (this.scanMessage) { this.$refs.scanPopup.simulateScan(this.scanMessage); } - - } else { that.showMessage('列表数据为0'); } @@ -319,11 +317,12 @@ }) }, getScanResult(result) { - if(this.managementType == 'BY_BATCH'){ - this.getScanResultAfterBatch(result) - }else{ - this.getScanResultAfter(result) - } + this.balanceInfo = result.balance + if(this.managementType == 'BY_BATCH'){ + this.getScanResultAfterBatch(result) + }else{ + this.getScanResultAfter(result) + } }, // 包装扫码之后逻辑 getScanResultAfter(result){ @@ -457,6 +456,7 @@ item.scaned = true; itemDetail.scanDate = new Date(); item.handleQty = calc.add(item.handleQty,result.label.qty) + item.balanceQty = balanceInfo.qty; item.toLocationCode = this.toLocationCode; }) // calcHandleQty(this.detailSource); @@ -507,6 +507,7 @@ pack.labelQty = Number(result.label.qty); } } + itemDetail.balanceQty = balanceInfo.qty; calcTreeHandleQty(this.detailSource); itemDetail.packList.sort(compareDesc('scanDate')); //按扫描信息排序 this.$forceUpdate() @@ -538,6 +539,7 @@ console.log(itemDetail.handleQty) itemDetail.toLocationCode = this.toLocationCode; itemDetail.labelQty = Number(result.label.qty); + itemDetail.balanceQty = balanceInfo.qty; itemDetail.packList.forEach(pac => { pac.scaned = true pac.scanDate = new Date(); @@ -568,7 +570,10 @@ }, updateData() { + if(this.managementType == 'BY_BATCH'){ + }else{ calcTreeHandleQty(this.detailSource) + } // calcHandleQty(this.detailSource); }, @@ -710,6 +715,7 @@ var params = this.setParams(); let that = this console.log(params) + return purchaseReceiptJobSubmit(params).then(res => { if (res.data) { let isCheckPrint = getSwitchInfoByCode(this.switchCode)//是否显示上架指引单 @@ -816,7 +822,7 @@ var subList = [] var createTime = getCurrDateTime(); var creator = this.$store.state.user.id - +console.log(8787,this.detailSource) this.detailSource.forEach(item => { item.subList.forEach(detail => { // if (!detail.scaned) { @@ -828,8 +834,7 @@ } }) detail.toLocationCode = this.toLocationCode ? this.toLocationCode :this.jobToLocationCode - var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, - detail.packingNumber, detail.batch); + var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,detail.packingNumber, detail.batch); detail.toPackingNumber = info.packingNumber; detail.packingNumber = info.packingNumber; detail.formPackingNumber = info.packingNumber; From c04bad89e0523bd30e67a1af2b99ba3d1055c6fc Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 30 Oct 2024 16:07:02 +0800 Subject: [PATCH 040/201] =?UTF-8?q?YT-571=E9=87=87=E8=B4=AD=E6=94=B6?= =?UTF-8?q?=E8=B4=A7=EF=BC=8C=E4=BB=BB=E5=8A=A1=E5=A6=82=E6=9E=9C=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E7=BC=96=E8=BE=91=EF=BC=8C=E5=B7=A6=E6=BB=91=E8=A6=81?= =?UTF-8?q?=E6=9C=89=E7=BC=96=E8=BE=91=E6=8C=89=E9=92=AE=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E4=B8=94=E5=AE=9E=E7=8E=B0=E7=BC=96=E8=BE=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchaseReceipt/coms/comReceiptDetailCardBacth.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue index 1266e56f..95e4da69 100644 --- a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue +++ b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue @@ -4,7 +4,7 @@ @@ -79,14 +88,20 @@ import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue' import comProductRecord from '@/pages/productReceipt/coms/comProductRecord.vue' + import comProductRecordBatch from '@/pages/productReceipt/coms/comProductRecordBatch.vue' import comBlankView from '@/mycomponents/common/comBlankView.vue' + import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" + import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" export default { components: { winScanButton, winScanPack, comProductRecord, + comProductRecordBatch, comBlankView, + winScanLocation, + winScanPackAndLocation, }, data() { return { @@ -108,6 +123,7 @@ workShopName: "", productionLineName: "", workStationName: "", + managementType:'' }; }, onLoad(option) { @@ -142,7 +158,53 @@ mounted() {}, methods: { - getScanResult(result) { + getScanResult(result,managementTypeParams ) { + this.managementType = managementTypeParams + if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ + this.setDataBatch(result) + }else{ + this.setData(result) + } + }, + async setDataBatch(result) { + let label = result.label; + let pack = result.package; + + var item = this.detailSource.find(res => { + if (res.itemCode == label.itemCode) { + return res + } + }) + + if (item == undefined) { + var itemp = this.createItemInfo(label, pack); + let newDetail = this.createDetailInfo(label, pack); + newDetail.handleQty =0; + newDetail.balanceQty =result.balance.qty; + itemp.subList.push(newDetail); + this.detailSource.push(itemp) + } else { + var detail = item.subList.find(r => { + if (r.packingNumber == label.packingNumber && + r.batch == label.batch) { + return r; + } + }) + + if (detail == undefined) { + let newDetail = this.createDetailInfo(label, pack); + newDetail.handleQty =0; + newDetail.balanceQty =result.balance.qty; + item.subList.push(newDetail); + } else { + if (detail.scaned == true) { + // this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + label.batch + "]重复扫描") + } + } + } + this.calcHandleQtyAdd(result.label); + }, + async setData(result) { let label = result.label; let pack = result.package; @@ -218,14 +280,40 @@ this.$forceUpdate(); }, + calcHandleQtyAdd(label) { + for (let item of this.detailSource) { + item.handleQty = item.handleQty || new Decimal(0).toNumber(); + for (let detail of item.subList) { + if (detail != undefined) { + item.handleQty = calc.add(item.handleQty,label.qty) + detail.handleQty = calc.add(detail.handleQty,label.qty) + } + } + } + console.log(this.detailSource) + this.scanPopupGetFocus(); + this.$forceUpdate(); + }, updateData() { this.calcHandleQty(); }, openScanPopup() { - this.$refs.scanPopup.openScanPopup(); + // this.$refs.scanPopup.openScanPopup(); + this.openFromLocationScanPopup() + }, + openFromLocationScanPopup() { + if (this.fromLocationCode == "") { + this.showFromLocationPopup(); + return + } + this.$refs.winScanPackAndLocationRef.openScanPopupForType(this.fromLocationCode, this.businessType); + }, + showFromLocationPopup() { + this.$nextTick(() => { + this.$refs.winScanFromLocation.openScanPopup(); + }) }, - commit() { if (this.positionInfo == "请选择位置") { this.showMessage("请先选择位置") @@ -240,12 +328,21 @@ }); this.managementList = []; var precisionStrategParams = this.setPrecisionStrategParams() - + getPrecisionStrategyList(precisionStrategParams, res => { if (res.success) { this.managementList = res.list; var params = this.setParams() - console.log("提交" + JSON.stringify(params)) + + console.log("提交",params) + const isHaveItem =params.subList.find(item=>item.handleQty > item.balanceQty) + if(isHaveItem){ + this.showErrorMessage(`物料号${isHaveItem.itemCode}`) + this.$refs.comMessage.showConfirmWarningModal('物料号'+isHaveItem.itemCode+'数量[' + isHaveItem.handleQty + ']不允许大于库存数量[' + isHaveItem.balanceQty + ']') + uni.hideLoading() + return + } + return productionReceiptRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { @@ -379,7 +476,14 @@ this.$refs.scanPopup.losefocus(); } }, - + getLocation(location, code) { + this.getFromLocationCode(location, code) + }, + getFromLocationCode(location, code) { + this.fromLocationInfo = location; + this.fromLocationCode = code; + this.openScanPopup(); + }, afterCloseMessage() { this.scanPopupGetFocus(); }, From 9b29cfce5986cbee87b51a14dfef475c9e2374a6 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 31 Oct 2024 14:34:27 +0800 Subject: [PATCH 043/201] =?UTF-8?q?YT-562=E5=8F=91=E6=96=99=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C=E6=89=AB=E6=8F=8F=E6=95=B0=E9=87=8F=E4=B8=8E?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=B8=8D=E4=B8=80=E8=87=B4=EF=BC=8C=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E7=82=B9=E5=87=BB=E5=8F=96=E6=B6=88=EF=BC=8C=E5=BA=94?= =?UTF-8?q?=E6=8A=8A=E6=89=AB=E6=8F=8F=E7=9A=84=E6=89=AB=E5=88=B0=E4=B8=8B?= =?UTF-8?q?=E6=96=B9YT-575=E5=8F=91=E6=96=99=E4=BB=BB=E5=8A=A1=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=89=AB=E6=8F=8F=E8=83=8C=E6=99=AF=E8=89=B2=EF=BC=8C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=89=AB=E6=8F=8F=E7=9A=84=E5=8C=85=E8=A3=85?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E5=92=8C=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/job/issueDetailBatch.vue | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue index 4ebb2c30..47a504d3 100644 --- a/src/pages/issue/job/issueDetailBatch.vue +++ b/src/pages/issue/job/issueDetailBatch.vue @@ -503,7 +503,8 @@ var creator = this.$store.state.user.id console.log(2343,this.detailSource) this.detailSource.forEach(toLocationCode => { - let obj = toLocationCode + let obj = {...toLocationCode} + delete obj.subList obj.recordList = [] let obj1 ={} let arr = toLocationCode.subList.filter(item=>item.scaned) @@ -520,14 +521,18 @@ obj1.packingNumber =record.packingNumber; obj1.qty =record.qty; obj1.scaned =record.scaned; - obj1.inventoryStatus =record.fromInventoryStatus; - obj1.inventoryStatus =record.fromInventoryStatus; obj1.toLocationCode =record.toLocationCode; + obj1.fromPackingNumber =''; + obj1.fromBatch = record.batch; + obj1.toBatch = record.batch; + obj1.toInventoryStatus = record.inventoryStatus; + obj1.toPackingNumber =""; + obj1.packingNumber = ""; let single_price = record.balance.singlePrice == null ? 0 : record.balance.singlePrice; - record.singlePrice = single_price; - record.amount = single_price *record.qty; + obj1.singlePrice = single_price; + obj1.amount = single_price *record.qty; obj.recordList.push(obj1) }) subList.push(obj) From 25dc13f1f52280e8054e895aea0a91c9933e8fc2 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 31 Oct 2024 15:45:41 +0800 Subject: [PATCH 044/201] =?UTF-8?q?YT-581=E9=87=87=E8=B4=AD=E6=94=B6?= =?UTF-8?q?=E8=B4=A7=E4=BB=BB=E5=8A=A1PDA=E6=89=AB=E6=8F=8F=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/qty/recommendQtyEdit.vue | 6 +++- .../coms/comReceiptDetailCard.vue | 2 +- .../coms/comReceiptDetailCardBacth.vue | 33 ++++++------------- .../purchaseReceipt/job/receiptDetail.vue | 26 +++++++-------- 4 files changed, 29 insertions(+), 38 deletions(-) diff --git a/src/mycomponents/qty/recommendQtyEdit.vue b/src/mycomponents/qty/recommendQtyEdit.vue index 56b6ccb1..29b5316a 100644 --- a/src/mycomponents/qty/recommendQtyEdit.vue +++ b/src/mycomponents/qty/recommendQtyEdit.vue @@ -41,7 +41,7 @@ - + 库存数量 : {{Number(dataContent.balanceQty)}} @@ -119,6 +119,10 @@ import { nextTick } from 'vue'; type: Boolean, default: true }, + showBalanceQty: { + type: Boolean, + default: false + }, }, methods: { getPackUnitName(packUnit) { diff --git a/src/pages/purchaseReceipt/coms/comReceiptDetailCard.vue b/src/pages/purchaseReceipt/coms/comReceiptDetailCard.vue index bd31d00b..0756ec5d 100644 --- a/src/pages/purchaseReceipt/coms/comReceiptDetailCard.vue +++ b/src/pages/purchaseReceipt/coms/comReceiptDetailCard.vue @@ -12,7 +12,7 @@ diff --git a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue index 95e4da69..bd31d00b 100644 --- a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue +++ b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue @@ -4,17 +4,16 @@ + @@ -34,13 +33,9 @@ import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue' import receiptDetailInfoPopup from '@/pages/purchaseReceipt/coms/receiptDetailInfoPopup.vue' import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" + import pack from '@/mycomponents/balance/pack.vue' import detailList from '@/mycomponents/detail/detailList.vue' import packageList from '@/mycomponents/package/packageList.vue' - - import pack from '@/mycomponents/balance/pack.vue' - import location from '@/mycomponents/balance/location.vue' - import toLocation from '@/mycomponents/balance/toLocation.vue' - import batch from '@/mycomponents/balance/batch.vue' import { getDetailOption, @@ -58,11 +53,7 @@ receiptDetailInfoPopup, winScanLocation, detailList, - packageList, - pack, - location, - toLocation, - batch + packageList }, props: { dataContent: { @@ -77,6 +68,8 @@ type: Object, default: null }, + + }, watch: { @@ -99,9 +92,6 @@ }, mounted() { - this.$nextTick(()=>{ - console.log(this.dataContent) - }) if (this.detailOptions.length == 0) { this.detailOptions = getDetailOption(); } @@ -109,7 +99,6 @@ this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam .allowModifyLocation) } - console.log(111,this.scanOptions) if (this.removeOptions.length == 0) { this.removeOptions = getRemoveOption(); @@ -208,14 +197,12 @@ // }); // }, confirm(qty) { - console.log(qty) this.editItem.handleQty = qty; this.$emit('updateData') }, updateData() { this.$emit('updateData') - }, - + } } } diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index 7db13922..4dace67f 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/src/pages/purchaseReceipt/job/receiptDetail.vue @@ -390,7 +390,7 @@ pack.labelQty = Number(result.label.qty); } } - calcTreeHandleQty(this.detailSource); + calcHandleQty(this.detailSource); itemDetail.packList.sort(compareDesc('scanDate')); //按扫描信息排序 this.$forceUpdate() } @@ -456,7 +456,6 @@ item.scaned = true; itemDetail.scanDate = new Date(); item.handleQty = calc.add(item.handleQty,result.label.qty) - item.balanceQty = balanceInfo.qty; item.toLocationCode = this.toLocationCode; }) // calcHandleQty(this.detailSource); @@ -497,7 +496,9 @@ } if (isScan) { pack.scanDate = new Date(); - this.showMessage("箱码【" + packingNumber + "】已经扫描"); + // this.showMessage("箱码【" + packingNumber + "】已经扫描"); + + pack.handleQty = calc.add(pack.handleQty,result.label.qty) } else { this.packingNumberList.push(packingNumber) pack.scaned = true @@ -507,8 +508,7 @@ pack.labelQty = Number(result.label.qty); } } - itemDetail.balanceQty = balanceInfo.qty; - calcTreeHandleQty(this.detailSource); + calcHandleQty(this.detailSource); itemDetail.packList.sort(compareDesc('scanDate')); //按扫描信息排序 this.$forceUpdate() } @@ -529,7 +529,8 @@ } if (isScan) { itemDetail.scanDate = new Date(); - this.showMessage("箱码【" + packingNumber + "】已经扫描") + // this.showMessage("箱码【" + packingNumber + "】已经扫描") + itemDetail.handleQty = calc.add(itemDetail.handleQty,result.label.qty) } else { this.packingNumberList.push(packingNumber) itemDetail.scaned = true; @@ -539,7 +540,6 @@ console.log(itemDetail.handleQty) itemDetail.toLocationCode = this.toLocationCode; itemDetail.labelQty = Number(result.label.qty); - itemDetail.balanceQty = balanceInfo.qty; itemDetail.packList.forEach(pac => { pac.scaned = true pac.scanDate = new Date(); @@ -551,6 +551,7 @@ this.continueScan() this.$forceUpdate() } + calcHandleQty(this.detailSource); } } } @@ -570,11 +571,11 @@ }, updateData() { - if(this.managementType == 'BY_BATCH'){ - }else{ - calcTreeHandleQty(this.detailSource) - } - // calcHandleQty(this.detailSource); + // if(this.managementType == 'BY_BATCH'){ + // }else{ + // calcTreeHandleQty(this.detailSource) + // } + calcHandleQty(this.detailSource); }, scanLocationCode(location, code) { @@ -715,7 +716,6 @@ var params = this.setParams(); let that = this console.log(params) - return purchaseReceiptJobSubmit(params).then(res => { if (res.data) { let isCheckPrint = getSwitchInfoByCode(this.switchCode)//是否显示上架指引单 From 0bf1a072152205a83ab8b022782a82d92c1af458 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Thu, 31 Oct 2024 17:27:03 +0800 Subject: [PATCH 045/201] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E4=B8=8A=E6=9E=B6,=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=A4=96=E5=87=BA=E5=85=A5=E5=BA=93=EF=BC=8C=E7=89=A9=E6=96=99?= =?UTF-8?q?=E8=BD=AC=E9=9A=94=E7=A6=BB=EF=BC=8C=E5=BA=93=E5=AD=98=E8=BD=AC?= =?UTF-8?q?=E7=A7=BB=EF=BC=8C=20=E6=8A=A5=E5=BA=9F=E5=87=BA=E5=BA=93?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=8B=A8=E5=87=BA=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 8 +- .env.hella13 | 3 + .env.hella14 | 3 + .env.hella15 | 3 + .env.hella16 | 3 + .env.hella8 | 5 +- .env.hella9 | 3 + .env.production | 3 + .../record/recordComDetailCard.vue | 9 +- .../inventoryMove/coms/comMoveRecord.vue | 11 +- .../inventoryMove/record/okToHoldRecord.vue | 50 ++----- src/pages/putaway/record/putawayRecord.vue | 19 +-- src/pages/scrap/record/scrapRecord.vue | 66 +++++++- src/pages/transfer/record/deliverRecord.vue | 80 +++++++++- src/pages/transfer/record/receiptRecord.vue | 55 ++++++- src/pages/unPlanned/record/issueRecord.vue | 141 ++++++++++++------ src/pages/unPlanned/record/receiptRecord.vue | 63 +++++++- 17 files changed, 397 insertions(+), 128 deletions(-) diff --git a/.env.development b/.env.development index 9bf7280a..faacbb33 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,15 @@ -VITE_BASE_URL=http://172.22.32.9:81/api/admin-api +# VITE_BASE_URL=http://localhost:12080/admin-api +VITE_BASE_URL=http://dev.ccwin-in.com:28051/api/admin-api VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api # 租户配置 -VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' +VITE_TENANT='[{"text":"英泰","value":1},{"text":"长春2379","value":3}]' # 是否是测试环境 VITE_isDevelopment=true # 积木报表请求路径 VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.hella13 b/.env.hella13 index 9a603299..97e83b15 100644 --- a/.env.hella13 +++ b/.env.hella13 @@ -9,3 +9,6 @@ VITE_isDevelopment=false # 积木报表请求路径 VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.hella14 b/.env.hella14 index 91cea3ff..441178e5 100644 --- a/.env.hella14 +++ b/.env.hella14 @@ -9,3 +9,6 @@ VITE_isDevelopment=true # 积木报表请求路径 VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.hella15 b/.env.hella15 index b40ff86e..f7c9ff07 100644 --- a/.env.hella15 +++ b/.env.hella15 @@ -9,3 +9,6 @@ VITE_isDevelopment=true # 积木报表请求路径 VITE_JMREPORT_BASE_URL='https://scp.faway-hella.com' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.hella16 b/.env.hella16 index 406618cf..c84efd8f 100644 --- a/.env.hella16 +++ b/.env.hella16 @@ -9,3 +9,6 @@ VITE_isDevelopment=true # 积木报表请求路径 VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.hella8 b/.env.hella8 index f6803774..8851bd7c 100644 --- a/.env.hella8 +++ b/.env.hella8 @@ -9,4 +9,7 @@ VITE_isDevelopment=false # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' +VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.hella9 b/.env.hella9 index fc674a67..36f3d239 100644 --- a/.env.hella9 +++ b/.env.hella9 @@ -9,3 +9,6 @@ VITE_isDevelopment=true # 积木报表请求路径 VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.production b/.env.production index f6803774..49336718 100644 --- a/.env.production +++ b/.env.production @@ -10,3 +10,6 @@ VITE_isDevelopment=false # 积木报表请求路径 VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/src/mycomponents/record/recordComDetailCard.vue b/src/mycomponents/record/recordComDetailCard.vue index d0144453..c712871e 100644 --- a/src/mycomponents/record/recordComDetailCard.vue +++ b/src/mycomponents/record/recordComDetailCard.vue @@ -32,7 +32,7 @@ - + @@ -121,7 +121,12 @@ allowModifyLocation: { type: Boolean, default: false - } + }, + queryBalance: { + type: Boolean, + default: true + }, + }, watch: { diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue index 9fa42e5e..fb0f46e9 100644 --- a/src/pages/inventoryMove/coms/comMoveRecord.vue +++ b/src/pages/inventoryMove/coms/comMoveRecord.vue @@ -76,8 +76,11 @@ createItemInfo, createDetailInfo, calcHandleQty, - calcHandleQtyAdd } from '@/common/record.js'; + + import { + calc + } from '@/common/calc.js'; export default { components: { @@ -330,7 +333,6 @@ } newDetail.toLocationCode = this.toLocationCode; newDetail.fromLocationCode = result.fromLocationCode - newDetail.handleQty = 0 itemp.subList.push(newDetail); this.detailSource.push(itemp) } else { @@ -355,15 +357,14 @@ if (newDetail.packingNumber == '') { newDetail.packingNumber = pack.number; } - newDetail.handleQty = 0 newDetail.toLocationCode = this.toLocationCode; newDetail.fromLocationCode = result.fromLocationCode item.subList.push(newDetail); } else { - + detail.handleQty =calc.add(detail.handleQty, result.label.qty) } } - calcHandleQtyAdd(this.detailSource,result.label); + calcHandleQty(this.detailSource); }, showErrorMessage(message) { if (this.$refs.scanPopup) { diff --git a/src/pages/inventoryMove/record/okToHoldRecord.vue b/src/pages/inventoryMove/record/okToHoldRecord.vue index e3b0a138..e025da9a 100644 --- a/src/pages/inventoryMove/record/okToHoldRecord.vue +++ b/src/pages/inventoryMove/record/okToHoldRecord.vue @@ -1,60 +1,28 @@ \ No newline at end of file + diff --git a/src/pages/putaway/record/putawayRecord.vue b/src/pages/putaway/record/putawayRecord.vue index 1ea5eab1..9ca0a5ce 100644 --- a/src/pages/putaway/record/putawayRecord.vue +++ b/src/pages/putaway/record/putawayRecord.vue @@ -91,7 +91,6 @@ createItemInfo, createDetailInfo, calcHandleQty, - calcHandleQtyAdd } from '@/common/record.js'; import { @@ -99,6 +98,10 @@ getPrecisionStrategyList, getPrecisionStrategyParams } from '@/common/balance.js'; + + import { + calc + } from '@/common/calc' import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue' @@ -170,7 +173,7 @@ mounted() {}, methods: { - getScanResult(result,managementType) { + getScanResult(result,managementTypeParams) { this.managementType = managementTypeParams if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ this.setDataBatch(result) @@ -206,11 +209,8 @@ newDetail.poNumber=poNumber; newDetail.supplierCode=supplierCode; newDetail.fromInventoryStatus = balance.inventoryStatus; - newDetail.handleQty =0; - newDetail.balanceQty =result.balance.qty; itemp.subList.push(newDetail); this.detailSource.push(itemp) - calcHandleQtyAdd(this.detailSource,result.label); }) } else { @@ -231,24 +231,19 @@ newDetail.poNumber=poNumber; newDetail.supplierCode=supplierCode; newDetail.fromInventoryStatus = balance.inventoryStatus; - newDetail.handleQty =0; - newDetail.balanceQty =result.balance.qty; if(item.subList&&item.subList.length>0){ if(item.subList[0].batch!=newDetail.batch){ this.showErrorMessage("扫描的批次是["+newDetail.batch+"],请扫描["+item.subList[0].batch+"的批次的箱码") } }else { item.subList.push(newDetail); - calcHandleQtyAdd(this.detailSource,result.label); } }); } else { - if (detail.scaned == true) { - calcHandleQtyAdd(this.detailSource,result.label); - // this.showErrorMessage( "批次[" + balance.batch + "]重复扫描") - } + detail.handleQty =calc.add(detail.handleQty, result.label.handleQty) } } + this.calcHandleQty(this.detailSource) }, setData(result){ diff --git a/src/pages/scrap/record/scrapRecord.vue b/src/pages/scrap/record/scrapRecord.vue index a5b8f7c9..1c1eba10 100644 --- a/src/pages/scrap/record/scrapRecord.vue +++ b/src/pages/scrap/record/scrapRecord.vue @@ -17,7 +17,13 @@ - + + @@ -59,6 +65,10 @@ deepCopyData } from '@/common/basic.js'; + import { + calc + } from '@/common/calc' + import { getInventoryStatusDesc, getDirectoryItemArray, @@ -69,7 +79,8 @@ getBusinessType, createItemInfo, createDetailInfo, - calcHandleQty + calcHandleQty, + calcHandleQtyAdd } from '@/common/record.js'; import winScanButton from '@/mycomponents/scan/winScanButton.vue' @@ -78,6 +89,7 @@ import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' + import recordComDetailCardBatch from '@/mycomponents/record/recordComDetailCardBatch.vue' export default { components: { @@ -86,7 +98,8 @@ comBlankView, winScanLocation, winScanPackAndLocation, - recordComDetailCard + recordComDetailCard, + recordComDetailCardBatch }, data() { return { @@ -102,6 +115,7 @@ businessType: {}, reasonList: [], reasonText: "", + managementType:"" }; }, onLoad(option) { @@ -137,7 +151,50 @@ }, methods: { - getScanResult(result) { + getScanResult(result,managementTypeParams) { + this.managementType = managementTypeParams + console.log("模式"+managementTypeParams) + if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") { + this.setDataBatch(result) + } else { + this.setData(result) + } + }, + + setDataBatch(result){ + let balance = result.balance; + let label = result.label; + let pack = result.package; + var item = this.detailSource.find(res => { + if (res.itemCode == balance.itemCode) { + return res + } + }) + if (item == undefined) { + var itemp = createItemInfo(balance, pack); + let newDetail = createDetailInfo(balance, pack); // + itemp.subList.push(newDetail); + this.detailSource.push(itemp) + } else { + var detail = item.subList.find(r => { + if (r.batch == balance.batch && + r.locationCode == balance.locationCode && + r.inventoryStatus == balance.inventoryStatus) { + return r; + } + }) + if (detail == undefined) { + let newDetail = createDetailInfo(balance, pack); + item.subList.push(newDetail); + } else { + detail.handleQty =calc.add(detail.handleQty, result.label.qty) + } + } + + this.calcHandleQty(this.detailSource) + }, + + setData(result){ let balance = result.balance; let label = result.label; let pack = result.package; @@ -170,7 +227,6 @@ } } this.calcHandleQty(); - }, showErrorMessage(message) { diff --git a/src/pages/transfer/record/deliverRecord.vue b/src/pages/transfer/record/deliverRecord.vue index 6fe03d5a..f2374fe7 100644 --- a/src/pages/transfer/record/deliverRecord.vue +++ b/src/pages/transfer/record/deliverRecord.vue @@ -8,7 +8,17 @@ - + + + @@ -32,7 +42,7 @@ - + @@ -63,8 +73,11 @@ getBusinessType, createItemInfo, createDetailInfo, - calcHandleQty + calcHandleQty, } from '@/common/record.js'; + import { + calc + } from '@/common/calc' import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue' @@ -73,7 +86,8 @@ import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' - + import recordComDetailCardBatch from '@/mycomponents/record/recordComDetailCardBatch.vue' + export default { components: { winScanButton, @@ -82,7 +96,8 @@ comBlankView, winScanLocation, winScanPackAndLocation, - recordComDetailCard + recordComDetailCard, + recordComDetailCardBatch }, data() { return { @@ -98,7 +113,8 @@ businessType: {}, managementList: [], dataContent: {}, - toWarehouseCode: '' + toWarehouseCode: '', + managementType:"" }; }, @@ -131,7 +147,17 @@ onPullDownRefresh() {}, methods: { - getScanResult(result) { + getScanResult(result,managementTypeParams) { + this.managementType = managementTypeParams + if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ + this.setDataBatch(result) + }else{ + this.setData(result) + } + + }, + + setData(result){ let balance = result.balance; let label = result.label; let pack = result.package; @@ -166,6 +192,46 @@ } this.calcHandleQty(); }, + setDataBatch(result){ + let balance = result.balance; + let label = result.label; + let pack = result.package; + var item = this.detailSource.find(res => { + if (res.itemCode == balance.itemCode) { + return res + } + }) + if (item == undefined) { + var itemp = createItemInfo(balance, pack); + let newDetail = createDetailInfo(balance, pack); // + newDetail.inventoryStatus = "OK" + itemp.subList.push(newDetail); + this.detailSource.push(itemp) + } else { + var detail = item.subList.find(r => { + if (r.batch == balance.batch && + r.locationCode == balance.locationCode && + r.inventoryStatus == balance.inventoryStatus) { + return r; + } + }) + if (detail == undefined) { + let newDetail = createDetailInfo(balance, pack); + item.subList.push(newDetail); + }else { + detail.handleQty =calc.add(detail.handleQty, result.label.qty) + } + } + this.calcHandleQty(this.detailSource) + }, + + showScanToLocation(item) { + this.editItem = item; + setTimeout(r => { + this.$refs.scanToLocationCode.openScanPopup(); + }) + }, + showErrorMessage(message) { this.$refs.comMessage.showErrorMessage(message, res => { diff --git a/src/pages/transfer/record/receiptRecord.vue b/src/pages/transfer/record/receiptRecord.vue index 61b9ee37..7f33326b 100644 --- a/src/pages/transfer/record/receiptRecord.vue +++ b/src/pages/transfer/record/receiptRecord.vue @@ -10,6 +10,9 @@ @@ -63,6 +66,10 @@ createDetailInfo, calcHandleQty } from '@/common/record.js'; + + import { + calc + } from '@/common/calc' import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue' @@ -90,7 +97,8 @@ businessType: {}, managementList: [], dataContent: {}, - toWarehouseCode: '' + toWarehouseCode: '', + managementType:import.meta.env.VITE_MANAGE_MODEL }; }, @@ -124,6 +132,17 @@ methods: { getScanResult(result) { + var managementTypeParams =this.managementType + if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") { + this.setDataBatch(result) + } else { + this.setData(result) + } + + + }, + + setData(result){ let label = result.label; let pack = result.package; var item = this.detailSource.find(res => { @@ -155,6 +174,37 @@ } this.calcHandleQty(); }, + + setDataBatch(result){ + let label = result.label; + let pack = result.package; + var item = this.detailSource.find(res => { + if (res.itemCode == label.itemCode) { + return res + } + }) + if (item == undefined) { + var itemp = createItemInfo(label, pack); + let newDetail = createDetailInfo(label, pack); // + newDetail.inventoryStatus = "OK" + itemp.subList.push(newDetail); + this.detailSource.push(itemp) + } else { + var detail = item.subList.find(r => { + if (r.packingNumber == label.packingNumber && + r.batch == label.batch) { + return r; + } + }) + if (detail == undefined) { + let newDetail = createDetailInfo(label, pack); + item.subList.push(newDetail); + } else { + detail.handleQty =calc.add(detail.handleQty, result.label.qty) + } + } + this.calcHandleQty(); + }, showErrorMessage(message) { this.$refs.comMessage.showErrorMessage(message, res => { @@ -339,9 +389,6 @@ }); }, - showScanMessage(message) { - this.$refs.comMessage.showScanMessage(message); - }, afterCloseMessage() { this.scanPopupGetFocus(); diff --git a/src/pages/unPlanned/record/issueRecord.vue b/src/pages/unPlanned/record/issueRecord.vue index 42ea5f8e..27f0d6a9 100644 --- a/src/pages/unPlanned/record/issueRecord.vue +++ b/src/pages/unPlanned/record/issueRecord.vue @@ -7,11 +7,17 @@ + placeholder="请选择出库原因" popup-title="出库原因" :localdata="reasonList" @change="reasonChange"> - + + @@ -48,6 +54,7 @@ import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' + import recordComDetailCardBatch from '@/mycomponents/record/recordComDetailCardBatch.vue' import { unPlannedIssueRecordSubmit } from '@/api/request2.js'; @@ -64,8 +71,12 @@ import { createItemInfo, createDetailInfo, - calcHandleQty + calcHandleQty, } from '@/common/record.js'; + + import { + calc + } from '@/common/calc.js'; import { goHome, @@ -79,7 +90,8 @@ comBlankView, winScanLocation, winScanPackAndLocation, - recordComDetailCard + recordComDetailCard, + recordComDetailCardBatch }, props: {}, data() { @@ -91,9 +103,11 @@ businessType: {}, //业务类型 detailSource: [], //绑定在页面上的数据源 reasonText: "", - reasonCode:"", + reasonCode: "", reasonList: [], - dataContent:{} + dataContent: {}, + managementType:"" + } }, @@ -111,8 +125,7 @@ }); }, - onLoad(option) { - }, + onLoad(option) {}, methods: { openScanPopup() { @@ -135,11 +148,55 @@ this.fromLocationCode = location.code; this.openScanPopup(); }, - getScanResult(result) { - this.getDataSource(result) + getScanResult(result,managementTypeParams) { + this.managementType = managementTypeParams + console.log(managementTypeParams) + if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") { + this.setDataBatch(result) + } else { + this.setData(result) + } }, - getDataSource(result) { + setDataBatch(result) { + let balance = result.balance; + let label = result.label; + let pack = result.package; + var item = this.detailSource.find(res => { + if (res.itemCode == label.itemCode) { + return res + } + }) + if (item == undefined) { + var itemp = createItemInfo(balance, pack); + let newDetail = createDetailInfo(balance, pack); // + // newDetail.inventoryStatus ="OK"; + itemp.subList.push(newDetail); + this.detailSource.push(itemp) + this.packGetFocus() + } else { + var detail = item.subList.find(r => { + if (r.batch == balance.batch && + r.locationCode == balance.locationCode && + r.inventoryStatus == balance.inventoryStatus && + r.scaned == true) { + return r; + } + }) + + if (detail == undefined) { + let newDetail = createDetailInfo(balance, pack); + item.subList.push(newDetail); + this.packGetFocus() + }else { + detail.handleQty =calc.add(detail.handleQty, result.label.qty) + } + } + this.calcHandleQty(this.detailSource) + + }, + + setData(result) { let balance = result.balance; let label = result.label; let pack = result.package; @@ -177,9 +234,9 @@ this.calcHandleQty(); }, - - packGetFocus(){ - if(this.$refs.scanPopup){ + + packGetFocus() { + if (this.$refs.scanPopup) { this.$refs.scanPopup.packGetFocus() } }, @@ -216,20 +273,20 @@ this.showErrorMessage("请选择出库原因") return; } - var params =this.setParams() - console.log("提交" + JSON.stringify(params)) - unPlannedIssueRecordSubmit(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) - }) - + var params = this.setParams() + console.log("提交" + JSON.stringify(params)) + unPlannedIssueRecordSubmit(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) + }) + }, setParams() { var subList = [] @@ -242,24 +299,24 @@ submitItem.itemName = detail.package.itemName; submitItem.itemDesc1 = detail.package.itemDesc1; submitItem.itemDesc2 = detail.package.itemDesc2; - + submitItem.inventoryStatus = detail.inventoryStatus; - + submitItem.fromPackingNumber = detail.packingNumber; submitItem.toPackingNumber = detail.packingNumber; - + submitItem.fromContainerNumber = detail.containerNumber; submitItem.toContainerNumber = detail.containerNumber - + submitItem.fromBatch = detail.batch; submitItem.toBatch = detail.batch; - + submitItem.fromLocationCode = detail.locationCode; submitItem.toLocationCode = ""; - + submitItem.reason = this.reasonCode; submitItem.qty = detail.handleQty; - submitItem.package =""; + submitItem.package = ""; submitItem.detailDataType = 1; subList.push(submitItem) } @@ -270,7 +327,7 @@ this.dataContent.creator = creator; return this.dataContent; }, - + reasonChange(e) { if (e.detail.value.length == 0) { this.reasonCode = "" @@ -282,20 +339,20 @@ }, showCommitSuccessMessage(hint) { this.$refs.comMessage.showSuccessMessage(hint, res => { - this.clearData(); + this.clearData(); }) }, - clearData(){ + clearData() { this.reasonCode = "" this.reasonText = ""; this.detailSource = []; - this.managementList =[]; - this.dataContent ={} + this.managementList = []; + this.dataContent = {} } - + } } + \ No newline at end of file diff --git a/src/pages/unPlanned/record/receiptRecord.vue b/src/pages/unPlanned/record/receiptRecord.vue index 8529bcd0..efeaf748 100644 --- a/src/pages/unPlanned/record/receiptRecord.vue +++ b/src/pages/unPlanned/record/receiptRecord.vue @@ -14,8 +14,11 @@ - + @@ -105,7 +108,8 @@ reasonList: [], dataContent: {}, managementList: [], - toLocationAreaTypeList:[] + toLocationAreaTypeList:[], + managementType:import.meta.env.VITE_MANAGE_MODEL } }, @@ -122,7 +126,8 @@ }); }, - onLoad(option) {}, + onLoad(option) { + }, methods: { openScanPopup() { @@ -132,6 +137,16 @@ this.toLocationCode = code; }, getScanResult(result) { + var managementTypeParams =this.managementType + if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") { + this.setDataBatch(result) + } else { + this.setData(result) + } + + }, + + setData(result){ let label = result.label; let pack = result.package; var item = this.detailSource.find(res => { @@ -153,7 +168,7 @@ return r; } }) - + if (detail == undefined) { let newDetail = this.createDetailInfo(label, pack); item.subList.push(newDetail); @@ -162,11 +177,45 @@ if (detail.scaned) { this.showErrorMessage("箱码[" + pack.number + "]批次[" + pack.batch + "]已经扫描") } - + + } + } + this.calcHandleQty(); + }, + + setDataBatch(result){ + let label = result.label; + let pack = result.package; + var item = this.detailSource.find(res => { + if (res.itemCode == label.itemCode) { + return res + } + }) + if (item == undefined) { + var itemp = this.createItemInfo(label, pack); + let newDetail = this.createDetailInfo(label, pack); + itemp.subList.push(newDetail); + this.detailSource.push(itemp) + this.getfocus() + + } else { + var detail = item.subList.find(r => { + if (r.packingNumber == pack.number && + r.batch == pack.batch) { + return r; + } + }) + + if (detail == undefined) { + let newDetail = this.createDetailInfo(label, pack); + item.subList.push(newDetail); + this.getfocus() + } else { + detail.handleQty =calc.add(detail.handleQty, result.label.qty) + } } this.calcHandleQty(); - }, getfocus(){ From 529b470e43b0d857cea20aa7d1ebeea1e0a3a1df Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 31 Oct 2024 19:58:27 +0800 Subject: [PATCH 046/201] =?UTF-8?q?YT-575=E6=89=80=E6=9C=89pda=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C=E6=89=AB=E6=8F=8F=E5=AE=8C=E6=88=90=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=AB=E6=8F=8F=E8=83=8C=E6=99=AF=E8=89=B2?= =?UTF-8?q?=EF=BC=8C=E6=98=BE=E7=A4=BA=E6=89=AB=E6=8F=8F=E7=9A=84=E5=8C=85?= =?UTF-8?q?=E8=A3=85=E6=95=B0=E9=87=8F=E5=92=8C=E5=8D=95=E4=BD=8D=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/comJobDetailCardBatch.vue | 73 +- .../coms/comDeliverDetailCardBatch.vue | 128 +- .../deliver/coms/comScanDeliverPackBatch.vue | 785 +++++++--- src/pages/deliver/job/deliverDetailBatch.vue | 1322 ++++++++++------- .../inventoryMove/job/inventoryMoveDetail.vue | 87 +- src/pages/issue/job/issueDetailBatch.vue | 1 - src/pages/issue/job/issueJob.vue | 2 +- .../coms/comProductDetailCardBatch.vue | 117 +- .../job/productReceiptDetail.vue | 5 +- src/pages/putaway/job/putawayDetail.vue | 14 +- 10 files changed, 1630 insertions(+), 904 deletions(-) diff --git a/src/mycomponents/detail/comJobDetailCardBatch.vue b/src/mycomponents/detail/comJobDetailCardBatch.vue index 1a6be7a4..bb2be74f 100644 --- a/src/mycomponents/detail/comJobDetailCardBatch.vue +++ b/src/mycomponents/detail/comJobDetailCardBatch.vue @@ -1,22 +1,23 @@ - @@ -74,13 +80,19 @@ getRemoveOption, getCurrDateTime, getPackingNumberAndBatch, - deepCopyData + deepCopyData, + compareAsc, } from '@/common/basic.js'; - import { - getDataSource - } from '@/pages/issue/js/issue.js'; + import { + getTreeDataSource, + calcTreeHandleQty, + getScanCount, + getThreeDataSource, + getDataSource, + calcHandleQty, + } from '@/common/detail.js'; import { getManagementPrecisions } from '@/common/balance.js'; @@ -88,10 +100,10 @@ import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue' - import comDeliverDetailCard from '@/pages/deliver/coms/comDeliverDetailCard.vue' import comDeliverDetailCardBatch from '@/pages/deliver/coms/comDeliverDetailCardBatch.vue' import comScanDeliverPackBatch from '@/pages/deliver/coms/comScanDeliverPackBatch.vue' import jobTop from '@/mycomponents/job/jobTop.vue' + import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" export default { name: 'issueDetail', @@ -99,8 +111,9 @@ jobDetailPopup, winScanButton, comDeliverDetailCardBatch, + comScanDeliverPackBatch, jobTop, - comScanDeliverPackBatch + winScanPackAndLocation }, data() { return { @@ -113,7 +126,7 @@ status: "", toLocationCode: "", jobStatus: "", - fromLocationCode:'' + allowBiggerQty:"TRUE",//开启数量校验提示 }; }, @@ -184,13 +197,16 @@ }); getDeliverDetail(that.id).then(res => { uni.hideLoading(); - if (res.data &&res.data.subList.length > 0) { + if (res.data && res.data.subList.length > 0) { that.jobContent = res.data; that.jobStatus = res.data.status; that.subList = res.data.subList; - that.detailSource = getDataSource(that.detailSource, that.subList) - that.fromLocationCode = that.subList[0].fromLocationCode + // that.detailSource = res.data; + that.detailSource = getThreeDataSource(that.jobContent) + console.log(999,that.detailSource) + that.toLocationCode = that.subList[0].toLocationCode + that.allowBiggerQty = res.data.allowBiggerQty; that.resizeCollapse(); } else { that.showMessage('未获取到详情'); @@ -207,14 +223,201 @@ resizeCollapse() { this.$nextTick(r => { - this.$refs.comIssueDetailCard.forEach(r => { + this.$refs.comIssueDetailCardBatch.forEach(r => { r.resizeCollapse(); }) }); }, - + getScanResult(result, managementTypeParams) { + console.log(222,result) + this.managementType = managementTypeParams + if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ + this.setDataBatch(result) + }else{ + this.setData(result) + } + }, + setDataBatch(result) { + try { + let that = this + this.balanceinfo = result.balance + var packingNumber = result.label.packingNumber; + var batch = result.label.batch; + var qty = result.label.qty; + var itemCode = result.label.itemCode; + var locationCode = result.fromLocationCode; + + if (!result.balance) { + this.showMessage("没有库存余额") + return; + } + console.log(9558,result) + // var inventoryStatus = "OK"; + var detail = this.detailSource.find(r => r.itemCode == itemCode); + + if (detail == undefined) { + this.showErrorMessage("物料号【" + itemCode + "】不在列表中") + } else { + + var itemDetail = detail.subList.find(r => { + return r.batch == batch && + r.fromLocationCode == result.fromLocationCode + }) + if (itemDetail == undefined) { + var isExit; + for (let subItem of detail.subList) { + var item; + // for (let pack of subItem.packList) { + // if (pack.batch == batch) { + // item = pack; + // isExit = pack; + // break; + // } + // } + // if (item != undefined) { + // subItem.scaned = true + // subItem.handleQty = 0; + // item = undefined + // } + } + if (isExit == undefined) { + // this.showErrorMessage("批次【" + batch + "】库位【" + result + // .fromLocationCode + "】不在列表中") + console.log(222,this.fromLocationCode) + detail.subList.push({ + scaned:true, + fromLocationCode:this.fromLocationCode, + toLocationCode:this.toLocationCode, + batch:result.label.batch, + handleQty:result.label.qty, + qty:result.balance.qty, + inventoryStatus:result.balance.inventoryStatus, + toLocation:result.balance.toLocation, + balance:result.balance, + balanceQty:result.balance.qty, + packQty:result.package.packQty, + packUnit:result.package.packUnit, + uom:result.balance.uom, + // packList:[{ + // scaned : true, + // handleQty : Number(result.label.qty), + // toLocationCode : result.balance.toLocationCode, + // }] + }) + console.log(999,detail) + detail.handleQty = 0 + detail.qty = 0 + detail.subList.forEach(item=>{ + detail.handleQty = calc.add(detail.handleQty,item.handleQty) + detail.qty = calc.add(detail.qty,item.qty) + // item.packList.forEach(cur=>{ + // cur.handleQty = calc.add(detail.handleQty,item.handleQty) + // }) + }) + setTimeout(r => { + that.resizeCollapse(); + that.$forceUpdate() + }, 100) + } else { + if (!isExit.cancleScanedHiht && isExit.scaned) { + // this.showMessage("批次【" + batch + "】已经扫描") + } else { + isExit.scaned = true + let qty = 0; + if (result.balance != null) { + qty = Number(result.balance.qty); + } else { + qty = Number(result.label.qty); + } + isExit.handleQty = Number(result.label.qty); + isExit.toLocationCode = this.toLocationCode; + } + itemDetail.handleQty = calc.add(itemDetail.handleQty,result.label.qty); + detail.handleQty = 0 + detail.balance = result.balance, + detail.subList.forEach(item=>{ + detail.handleQty = calc.add(detail.handleQty,item.handleQty) + // item.packList.forEach(cur=>{ + // cur.handleQty = calc.add(detail.handleQty,item.handleQty) + // }) + }) + // calcHandleQtyAdd(this.detailSource, result.label); + } + this.continueScan() + this.$forceUpdate() + } else { + var scanedLength = 0; + // itemDetail.packList.forEach(res => { + // if (res.scaned) { + // scanedLength++; + // } + // }) + //大哥让加的 + itemDetail.fromInventoryStatus = result.balance.inventoryStatus; + + if (itemDetail.scaned ) { + // this.showMessage("箱码【" + packingNumber + "】已经扫描") + // calcHandleQtyAdd(this.detailSource, result.label); + itemDetail.balance=result.balance + itemDetail.balanceQty=result.balance.qty + itemDetail.uom=result.balance.uom, + itemDetail.handleQty = calc.add(itemDetail.handleQty,result.label.qty); + detail.handleQty = 0 + detail.subList.forEach(item=>{ + detail.handleQty = calc.add(detail.handleQty,item.handleQty) + }) + } else { + debugger + itemDetail.scaned = true; + this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序 + itemDetail.handleQty = result.label.qty; + itemDetail.scaned = true + itemDetail.balance=result.balance + itemDetail.balanceQty=result.balance.qty + itemDetail.uom=result.balance.uom + itemDetail.packQty=result.package.packQty + itemDetail.packUnit=result.package.packUnit + itemDetail.fromlocationCode=this.fromLocationCode + itemDetail.toLocationCode=this.toLocationCode + // itemDetail.toInventoryStatus = "OK" + // itemDetail.packList.forEach(pac => { + // pac.scaned = true + // pac.handleQty = Number(result.label.qty); + // pac.toLocationCode = result.balance.toLocationCode; + // }) + detail.handleQty = 0 + detail.subList.forEach(item=>{ + detail.handleQty = calc.add(detail.handleQty,item.handleQty) + // item.packList.forEach(cur=>{ + // cur.handleQty = calc.add(detail.handleQty,item.handleQty) + // }) + }) + // calcTreeHandleQty(this.detailSource); + this.continueScan() + this.$forceUpdate() + } + } + } + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.packingNumber = '' + }) + }) + } catch (e) { + this.showMessage(e.message) + } + }, + //继续扫描 + continueScan() { + this.scanCount = getScanCount(this.subList); + if (this.scanCount == this.subList.length) { + this.closeScanPopup(); + } else { + this.scanPopupGetFocus(); + } + }, submit() { uni.showLoading({ title: "提交中....", @@ -223,103 +426,168 @@ //目前任务只到一个库位 var itemCodes = [] - let locationCode = this.detailSource[0].toLocationCode - this.detailSource.forEach(toLocationCode => { - toLocationCode.Items.forEach(item => { - itemCodes.push(item.itemCode) - }) + //目前任务只到一个库位 + var itemCodes = [] + let locationCode = this.detailSource[0].subList[0].toLocationCode + this.detailSource.forEach(toLocation => { + itemCodes.push(toLocation.itemCode) }) - - //使用在途库,不查询管理模式 - if (locationCode == null) { - this.submitJob(); - } else { - //获取管理模式,封装参数 - getManagementPrecisions(itemCodes, locationCode, res => { - if (res.success) { - this.managementList = res.list; - this.submitJob(); - } else { - uni.hideLoading(); - this.showErrorMessage(res.message); - } - }); - } + console.log( this.detailSource) + + //获取管理模式,封装参数 + getManagementPrecisions(itemCodes, locationCode, res => { + if (res.success) { + this.managementList = res.list; + console.log(res) + this.managementType = this.managementList && this.managementList[0] ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING' + + this.submitJob(); + } else { + uni.hideLoading(); + // this.showErrorMessage(res.message); + } + }); + // //使用在途库,不查询管理模式 + // if (locationCode == null) { + // this.submitJob(); + // } else { + // //获取管理模式,封装参数 + // getManagementPrecisions(itemCodes, locationCode, res => { + // if (res.success) { + // this.managementList = res.list; + // this.submitJob(); + // } else { + // uni.hideLoading(); + // this.showErrorMessage(res.message); + // } + // }); + // } }, - - checkCount(){ - let str="" - this.detailSource.forEach(detail => { - detail.Items.forEach(item => { - var taskQty =0; - item.taskQty =calc.add(taskQty,item.qty) - var totalQty =0; - item.Locations.forEach(lco => { - lco.Batchs.forEach(batch => { - batch.Records.forEach(record => { - // if (batch.qty != record.qty) { - // var tempHandleQty = 0 - // if (record.qty) { - // tempHandleQty = record.qty - // } else { - // tempHandleQty = 0 - // } - // if (batch.qty != 0) { - // str += - // `包装号【${record.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${batch.qty}】不一致\n` - // } - // } - if(record){ - var hanleQty =record.qty?record.qty:0 - totalQty = calc.add(totalQty,hanleQty) - } - - }) + + checkCount() { + let str="" + this.detailSource.forEach(detail => { + detail.Items.forEach(item => { + var taskQty =0; + item.taskQty =calc.add(taskQty,item.qty) + var totalQty =0; + item.Locations.forEach(lco => { + lco.Batchs.forEach(batch => { + batch.Records.forEach(record => { + if(record){ + var hanleQty =record.qty?record.qty:0 + totalQty = calc.add(totalQty,hanleQty) + } + }) }) - //实际扫描的数量 - item.totalQty =totalQty - }) + //实际扫描的数量 + item.totalQty =totalQty + }) - //如果允许部分提交任务有扫描记录就可以直接提交;如果不允许部分执行,任务数量和提交数量不一致给出提示 - this.detailSource.forEach(detail=>{ - detail.Items.forEach(item=>{ - if(this.jobContent.allowPartialComplete=="FALSE"){ - if(item.taskQty!=item.totalQty){ - str += `物料号【${item.itemCode}】任务数量【${item.taskQty}】与实际提交数量【${item.totalQty}】不一致\n` - } + }) + //如果允许部分提交任务有扫描记录就可以直接提交;如果不允许部分执行,任务数量和提交数量不一致给出提示 + this.detailSource.forEach(detail=>{ + detail.Items.forEach(item=>{ + if(this.jobContent.allowPartialComplete=="FALSE"){ + if(item.taskQty!=item.totalQty){ + str += `物料号【${item.itemCode}】任务数量【${item.taskQty}】与实际提交数量【${item.totalQty}】不一致\n` } + } + }) + }) + + if(str){ + str = '不允许提交\n' + str + this.showErrorMessage(str) + } + + return str?false:true + }, + checkCountBatch() { + let str = "" + let str1 = "" + let str2 = "" + this.detailSource.forEach(detail => { + var taskQty = 0; + var totalQty = 0; + detail.subList.forEach(item => { + if(item.scaned){ + item.taskQty=0 + item.totalQty=0 + item.taskQty =calc.add(item.taskQty,item.qty) + item.totalQty =calc.add(item.totalQty,item.handleQty) + if (this.jobContent.allowPartialComplete == "FALSE") { + if(item.handleQty!=item.taskQty){ + str += `批次【${item.batch}】提交数量【${item.handleQty}】与任务物料数量【${item.taskQty}】不一致\n` + } + } + if (this.allowBiggerQty == 'FALSE') { + if ( item.taskQty < item.totalQty) { + str1 += '数量[' + item.totalQty + ']不允许大于任务数量[' + item.taskQty + ']' + } + } + if(item.handleQty>item.balance.qty){ + str2 += `批次【${item.batch}】提交数量【${item.handleQty}】不可以大于库存数量【${item.balance.qty}】` + } + } + }) }) - - if(str){ + + + if (str) { str = '不允许提交\n' + str this.showErrorMessage(str) } - - return str?false:true - + if (str1) { + str1 = '不允许提交\n' + str1 + this.showErrorMessage(str1) + } + if (str2) { + str2 = '不允许提交\n' + str2 + this.showErrorMessage(str2) + } + return str || str1 || str2 ? false : true + }, submitJob() { var params = this.setParams() - console.log("提交参数", JSON.stringify(params)); - - if (params.subList.length == 0) { - uni.hideLoading() - this.$refs.comMessage.showConfirmMessageModal('请扫描箱码') - return + console.log("提交参数", params); + const isTrue = params.subList.some(item=>{ + console.log(item.recordList.some(cur=>cur.scaned)) + return item.recordList.some(cur=>cur.scaned) == true + }) + if(!isTrue){ + uni.hideLoading() + this.showErrorMessage("请扫描您需要提交的发货任务") + return } - - if(!this.checkCount()){ - uni.hideLoading() - return ; + // return; + // if (params.subList.length == 0) { + // uni.hideLoading() + // this.$refs.comMessage.showConfirmMessageModal('请扫描箱码') + // return + // } + if(this.managementType == "BY_BATCH" ||this.managementType == "BY_QUANTITY" ){ + if (!this.checkCountBatch()) { + uni.hideLoading() + return; + } + }else{ + if (!this.checkCount()) { + uni.hideLoading() + return; + } } - + debugger + deliverJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { + this.showCommitSuccessMessage("提交成功\n生成发货记录\n" + res.data) } else { this.showErrorMessage("提交失败[" + res.msg + "]") @@ -334,55 +602,34 @@ var subList = [] var createTime = getCurrDateTime(); var creator = this.$store.state.user.id + console.log(222,this.detailSource) this.detailSource.forEach(toLocationCode => { - toLocationCode.Items.forEach(item => { - item.Locations.forEach(fromLocation => { - fromLocation.Batchs.forEach(batch => { - let subItem = batch.detail; - subItem.recordList = []; - if (batch.Records.length > 0) { - batch.Records.forEach(r => { - let record = {}; - record.handleQty = r.qty; - record.fromPackingNumber = r - .packingNumber; - record.toContainerNumber = r - .ContainerNumber; - record.toInventoryStatus = r - .inventoryStatus; - // record.toLocationCode = subItem - // .toLocationCode; - record.toLocationCode = this.toLocationCode; - record.supplierCode = r.supplierCode; - - //使用在途库不改变管理模式 - if (this.toLocationCode == null) { - record.toPackingNumber = r - .packingNumber; - record.toBatch = r.batch; - } else { - var info = - getPackingNumberAndBatch( - this.managementList, r - .itemCode, - r.packingNumber, r - .batch); - record.toPackingNumber = info - .packingNumber; - record.toBatch = info.batch; - } - record.fromParentPackingNumber = r - .parentPackingNumber; - subItem.toLocationCode = this.toLocationCode - subItem.recordList.push(record); - }) - subList.push(deepCopyData(subItem)); - } - }) - }) + let obj = {...toLocationCode} + delete obj.subList + obj.recordList = [] + let obj1 ={} + let arr = toLocationCode.subList.filter(item=>item.scaned) + arr.forEach(record=>{ + obj1.scaned =record.scaned; + obj1.handleQty =record.handleQty; + obj1.fromLocationCode =record.fromLocationCode; + obj1.fromInventoryStatus =record.fromInventoryStatus; + obj1.copyContent =record.copyContent; + obj1.toContainerNumber = record.ContainerNumber; + obj1.toInventoryStatus =record.inventoryStatus; + obj1.toLocationCode = record.toLocationCode; + obj1.supplierCode = record.supplierCode; + obj1.toPackingNumber =''; + obj1.packingNumber = '' + obj1.fromPackingNumber = ''; + obj1.toBatch = record.batch; + obj1.toPackingNumber = ''; + obj1.packingNumber = ''; + obj1.fromPackingNumber =''; + obj.recordList.push(obj1) }) + subList.push(obj) }) - this.jobContent.subList = subList this.jobContent.createTime = createTime; this.jobContent.creator = creator; @@ -420,30 +667,12 @@ }, updateData(record) { - let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode); - let item = requestLocation.Items.find(r => r.itemCode == record.itemCode); - let itemHandleQty = 0; - if (item != undefined) { - item.Locations.forEach(l => { - let batch = l.Batchs.find(b => (b.packingNumber == record.packingNumber || b - .packingNumber == null || b.packingNumber == '') && b.batch == - record.batch); - let handleQty = 0; - if (batch != undefined) { - batch.Records.forEach(res => { - handleQty = calc.add(handleQty, res.qty) - }) - batch.handleQty = handleQty; - itemHandleQty = calc.add(itemHandleQty, handleQty) - } - }) - } - // item.handleQty=itemHandleQty; + calcHandleQty(this.detailSource); }, scanPopupGetFocus() { if (this.$refs.scanPopup != undefined) { - this.$refs.scanPopup.getfocus(); + this.$refs.scanPopup.packGetFocus(); } }, @@ -496,15 +725,42 @@ this.dataContent = result; this.$forceUpdate(); }, - openScanDetailPopup() { - var datacontent = {} - //克隆对象,深度克隆,防止双向绑定同一个变量 - // Object.assign(datacontent, this.detailSource); - this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent); - }, + // openScanDetailPopup() { + // var datacontent = {} + // //克隆对象,深度克隆,防止双向绑定同一个变量 + // // Object.assign(datacontent, this.detailSource); + // this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent); + // }, closeScanPopup() { - this.updateCommitBtn(); + // this.updateCommitBtn(); + }, + openScanPopup() { + let fromLocationCode = ''; + let fromlocationList = []; + for (var i = 0; i < this.detailSource.length; i++) { + let item = this.detailSource[i]; + item.subList.forEach(l => { + //重复的库位不往里面插入 + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { + fromlocationList.push(l.fromLocationCode); + } + //来源库位赋默认值 + if (fromLocationCode == '') { + if (!l.scaned) { + fromLocationCode = l.fromLocationCode; + } + } + }) + } + this.fromLocationCode = fromLocationCode + console.log(this.fromLocationCode) + this.$refs.scanPopup.openScanPopupForJob(fromLocationCode, fromlocationList, this.jobContent); }, + + }, + confirmFromLocation(fromLocationCodeParams){ + this.fromlocationCode = fromLocationCodeParams } }; From 5b8ed79ef0abbea85262a09bb054f02dfc340d58 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Nov 2024 13:42:59 +0800 Subject: [PATCH 054/201] =?UTF-8?q?=E5=8E=BB=E6=8E=89console?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/deliver/job/deliverDetailBatch.vue | 11 ----------- src/pages/issue/job/issueDetailBatch.vue | 6 ------ 2 files changed, 17 deletions(-) diff --git a/src/pages/deliver/job/deliverDetailBatch.vue b/src/pages/deliver/job/deliverDetailBatch.vue index d3b89425..6e0b0731 100644 --- a/src/pages/deliver/job/deliverDetailBatch.vue +++ b/src/pages/deliver/job/deliverDetailBatch.vue @@ -203,8 +203,6 @@ that.subList = res.data.subList; // that.detailSource = res.data; that.detailSource = getThreeDataSource(that.jobContent) - console.log(999,that.detailSource) - that.toLocationCode = that.subList[0].toLocationCode that.allowBiggerQty = res.data.allowBiggerQty; that.resizeCollapse(); @@ -231,7 +229,6 @@ getScanResult(result, managementTypeParams) { - console.log(222,result) this.managementType = managementTypeParams if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ this.setDataBatch(result) @@ -253,7 +250,6 @@ this.showMessage("没有库存余额") return; } - console.log(9558,result) // var inventoryStatus = "OK"; var detail = this.detailSource.find(r => r.itemCode == itemCode); @@ -285,7 +281,6 @@ if (isExit == undefined) { // this.showErrorMessage("批次【" + batch + "】库位【" + result // .fromLocationCode + "】不在列表中") - console.log(222,this.fromLocationCode) detail.subList.push({ scaned:true, fromLocationCode:this.fromLocationCode, @@ -306,7 +301,6 @@ // toLocationCode : result.balance.toLocationCode, // }] }) - console.log(999,detail) detail.handleQty = 0 detail.qty = 0 detail.subList.forEach(item=>{ @@ -369,7 +363,6 @@ detail.handleQty = calc.add(detail.handleQty,item.handleQty) }) } else { - debugger itemDetail.scaned = true; this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序 itemDetail.handleQty = result.label.qty; @@ -432,13 +425,11 @@ this.detailSource.forEach(toLocation => { itemCodes.push(toLocation.itemCode) }) - console.log( this.detailSource) //获取管理模式,封装参数 getManagementPrecisions(itemCodes, locationCode, res => { if (res.success) { this.managementList = res.list; - console.log(res) this.managementType = this.managementList && this.managementList[0] ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING' this.submitJob(); @@ -602,7 +593,6 @@ var subList = [] var createTime = getCurrDateTime(); var creator = this.$store.state.user.id - console.log(222,this.detailSource) this.detailSource.forEach(toLocationCode => { let obj = {...toLocationCode} delete obj.subList @@ -754,7 +744,6 @@ }) } this.fromLocationCode = fromLocationCode - console.log(this.fromLocationCode) this.$refs.scanPopup.openScanPopupForJob(fromLocationCode, fromlocationList, this.jobContent); }, diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue index 9785b03b..df6ab80f 100644 --- a/src/pages/issue/job/issueDetailBatch.vue +++ b/src/pages/issue/job/issueDetailBatch.vue @@ -221,7 +221,6 @@ that.jobStatus = res.data.status that.subList = res.data.subList; that.detailSource = getThreeDataSource(that.jobContent) - console.log(455,that.detailSource) that.jobContent.detailToLocationCode = res.data.subList[0].toLocationCode that.fromLocationCode = that.subList[0].fromLocationCode //任务中已经扫描,模拟扫描赋值 @@ -261,7 +260,6 @@ }, getScanResult(result, managementTypeParams) { - console.log(222,result) this.managementType = managementTypeParams if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ this.setDataBatch(result) @@ -283,7 +281,6 @@ this.showMessage("没有库存余额") return; } - console.log(9558,result) // var inventoryStatus = "OK"; var detail = this.detailSource.find(r => r.itemCode == itemCode); @@ -335,7 +332,6 @@ // toLocationCode : result.balance.toLocationCode, // }] }) - console.log(999,detail) detail.handleQty = 0 detail.qty = 0 detail.subList.forEach(item=>{ @@ -592,7 +588,6 @@ let str1="" var totalQty =0; var taskQty =0; - console.log(this.detailSource) this.detailSource.forEach(detail => { detail.subList.forEach(item => { if(item.scaned){ @@ -611,7 +606,6 @@ if(str){ str = '任务明细未全部完成,是否提交?\n' + str } - console.log(333,str1) if(str1){ this.$refs.comMessage.showQuestionMessage1(str1, 'red', res => { From cd452e8403848342e8921fa14b446feda8468e4f Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Nov 2024 13:43:29 +0800 Subject: [PATCH 055/201] =?UTF-8?q?=E5=8E=BB=E6=8E=89debugger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/deliver/job/deliverDetailBatch.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/deliver/job/deliverDetailBatch.vue b/src/pages/deliver/job/deliverDetailBatch.vue index 6e0b0731..0db4d140 100644 --- a/src/pages/deliver/job/deliverDetailBatch.vue +++ b/src/pages/deliver/job/deliverDetailBatch.vue @@ -573,8 +573,6 @@ return; } } - debugger - deliverJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { From 629f352f9b6b59e23b034ed568328297d674dc66 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Nov 2024 13:46:29 +0800 Subject: [PATCH 056/201] =?UTF-8?q?YT-631pda=E9=A2=84=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E6=94=B6=E8=B4=A7=E4=BB=BB=E5=8A=A1=EF=BC=8C=E7=9B=AE=E6=A0=87?= =?UTF-8?q?=E5=BA=93=E4=BD=8D=E5=BA=94=E5=B8=A6=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/unPlanned/job/receiptJobDetail.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/unPlanned/job/receiptJobDetail.vue b/src/pages/unPlanned/job/receiptJobDetail.vue index a5b94d1e..0cca45bd 100644 --- a/src/pages/unPlanned/job/receiptJobDetail.vue +++ b/src/pages/unPlanned/job/receiptJobDetail.vue @@ -366,8 +366,6 @@ this.detailSource.forEach(item => { itemCodes.push(item.itemCode) }) - return - getManagementPrecisions(itemCodes, this.toLocationCode, res => { if (res.success) { this.managementList = res.list; From a16b01305e7de2263b12a909929feeeaa24327cf Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Nov 2024 14:24:14 +0800 Subject: [PATCH 057/201] =?UTF-8?q?YT-631pda=E9=A2=84=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E6=94=B6=E8=B4=A7=E4=BB=BB=E5=8A=A1=EF=BC=8C=E7=9B=AE=E6=A0=87?= =?UTF-8?q?=E5=BA=93=E4=BD=8D=E5=BA=94=E5=B8=A6=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/productReceipt/job/productReceiptDetail.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/productReceipt/job/productReceiptDetail.vue b/src/pages/productReceipt/job/productReceiptDetail.vue index 087661be..2a34cef8 100644 --- a/src/pages/productReceipt/job/productReceiptDetail.vue +++ b/src/pages/productReceipt/job/productReceiptDetail.vue @@ -230,6 +230,7 @@ } else { if (res.data.subList.length > 0) { that.jobContent = res.data; + console.log(344,that.jobContent.allowModifyLocation) that.subList = res.data.subList; that.jobStatus = res.data.status; that.jobToLocationCode = that.subList[0].toLocationCode; @@ -295,7 +296,7 @@ } else { itemDetail.scaned = true; itemDetail.handleQty = Number(result.label.qty); - itemDetail.toLocationCode = this.toLocationCode; + // itemDetail.toLocationCode = this.toLocationCode; itemDetail.labelQty = Number(result.label.qty); this.continueScan() this.$forceUpdate() From 0ccfa31daa1f9614d76f087a5c96b15366187622 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Nov 2024 14:51:50 +0800 Subject: [PATCH 058/201] =?UTF-8?q?YT-634=E5=8F=91=E6=96=99=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C=E6=89=AB=E6=8F=8F=E6=95=B0=E9=87=8F=E5=A4=A7?= =?UTF-8?q?=E4=BA=8E=E5=BA=93=E5=AD=98=E6=95=B0=E9=87=8F=EF=BC=8C=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=BA=94=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=A4=A7=E4=BA=8E=E5=BA=93=E5=AD=98=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/job/issueDetailBatch.vue | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue index df6ab80f..346ed891 100644 --- a/src/pages/issue/job/issueDetailBatch.vue +++ b/src/pages/issue/job/issueDetailBatch.vue @@ -473,13 +473,15 @@ const isTrue = params.subList.some(item=>{ return item.recordList.some(cur=>cur.scaned) == true }) + if(!isTrue){ uni.hideLoading() this.showErrorMessage("请扫描您需要提交的发料任务") return } - // return + console.log("提交参数", params); + return issueJobSubmit(params).then(res => { uni.hideLoading() if (res.data) { @@ -588,6 +590,7 @@ let str1="" var totalQty =0; var taskQty =0; + console.log(877,this.detailSource) this.detailSource.forEach(detail => { detail.subList.forEach(item => { if(item.scaned){ @@ -603,15 +606,18 @@ }) }) - if(str){ - str = '任务明细未全部完成,是否提交?\n' + str - } if(str1){ - this.$refs.comMessage.showQuestionMessage1(str1, 'red', res => { - - }) + this.$refs.comMessage.showMessage(str1, res => { + if (res) { + this.afterCloseMessage() + } + }); return } + if(str){ + str = '任务明细未全部完成,是否提交?\n' + str + } + if(totalQty!=taskQty){ str ="扫描数量["+totalQty+"]与任务数量不一致["+taskQty+"],是否提交" this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { From bf3f03672e4ed06795cfb746c70159cb40bafe88 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 1 Nov 2024 15:08:47 +0800 Subject: [PATCH 059/201] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=89=AB=E6=8F=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/count/job/countJob.vue | 5 +++-- src/pages/issue/job/issueJob.vue | 12 +++++++----- .../productReceipt/job/productReceiptJob.vue | 5 +++-- src/pages/purchaseReceipt/job/receiptJob.vue | 16 ++++++++++++++-- src/pages/putaway/job/putawayJob.vue | 9 ++++++--- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/pages/count/job/countJob.vue b/src/pages/count/job/countJob.vue index 0e441c34..7ca78774 100644 --- a/src/pages/count/job/countJob.vue +++ b/src/pages/count/job/countJob.vue @@ -20,7 +20,7 @@ - + @@ -84,7 +84,8 @@ creationTime: "", status: "1,2", fromLocationCode: "" - } + }, + manageModel:import.meta.env.VITE_MANAGE_MODEL }; }, onLoad(option) { diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue index 7afeb8c0..5f2e24a1 100644 --- a/src/pages/issue/job/issueJob.vue +++ b/src/pages/issue/job/issueJob.vue @@ -25,7 +25,7 @@ - + @@ -114,7 +114,8 @@ businessTypeCode: "Issue", businessType: null, timer: null, - productionLineCode:"" + productionLineCode:"", + manageModel:import.meta.env.VITE_MANAGE_MODEL }; }, onLoad(option) { @@ -244,6 +245,9 @@ uni.hideLoading(); if (type === "refresh") { uni.stopPullDownRefresh(); + if(this.manageModel!='BY_BATCH'){ + this.openScanPopup() + } } var list = res.data.list; @@ -260,9 +264,7 @@ if (type === "refresh") { uni.stopPullDownRefresh(); } - if(this.jobList.length>0){ - this.openScanPopup() - } + }).catch(error => { if (type === "refresh") { uni.stopPullDownRefresh(); diff --git a/src/pages/productReceipt/job/productReceiptJob.vue b/src/pages/productReceipt/job/productReceiptJob.vue index baf01cda..3a722ba8 100644 --- a/src/pages/productReceipt/job/productReceiptJob.vue +++ b/src/pages/productReceipt/job/productReceiptJob.vue @@ -20,7 +20,7 @@ - + @@ -84,7 +84,8 @@ detailOptions: [], detailGiveupOptions: [], scanMessage: "", - timer:null + timer:null, + manageModel:import.meta.env.VITE_MANAGE_MODEL }; }, // 装配收货:type = 'assemble' diff --git a/src/pages/purchaseReceipt/job/receiptJob.vue b/src/pages/purchaseReceipt/job/receiptJob.vue index cb517066..b1a8c9b6 100644 --- a/src/pages/purchaseReceipt/job/receiptJob.vue +++ b/src/pages/purchaseReceipt/job/receiptJob.vue @@ -20,7 +20,7 @@ - + @@ -78,7 +78,9 @@ status: '1,2', //待处理 、进行中 detailOptions: [], detailGiveupOptions: [], - scanMessage: "" + scanMessage: "", + manageModel:import.meta.env.VITE_MANAGE_MODEL, + scanHintTitle:"" }; }, @@ -153,6 +155,12 @@ this.getList("more"); }, refresh() { + if(this.manageModel=='BY_BATCH'){ + this.scanHintTitle="ASN单号" + }else { + this.scanHintTitle="箱标签/ASN单号" + } + this.getList('refresh'); }, openFilter() { @@ -397,6 +405,10 @@ value: this.$store.state.user.id }] } else { + if(this.manageModel=="BY_BATCH"){ + this.showMessage("请扫描ASN单号") + return; + } filters = [{ column: "packingNumber", action: "in", diff --git a/src/pages/putaway/job/putawayJob.vue b/src/pages/putaway/job/putawayJob.vue index a55c07e8..cd09fa03 100644 --- a/src/pages/putaway/job/putawayJob.vue +++ b/src/pages/putaway/job/putawayJob.vue @@ -21,7 +21,7 @@ - + @@ -84,7 +84,8 @@ detailOptions: [], detailGiveupOptions: [], title: '', - scanMessage: "" + scanMessage: "", + manageModel:import.meta.env.VITE_MANAGE_MODEL }; }, @@ -174,7 +175,9 @@ uni.hideLoading(); if (type === "refresh") { uni.stopPullDownRefresh(); - this.openScanPopup() + if(this.manageModel!='BY_BATCH'){ + this.openScanPopup() + } } var list = res.data.list; From 5a55c1a43e98888d6429327863d7ffd32d028c03 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Nov 2024 16:02:19 +0800 Subject: [PATCH 060/201] =?UTF-8?q?=E7=89=A9=E6=96=99=E9=9A=94=E7=A6=BB?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coms/comInventoryDetailCard.vue | 10 +- .../coms/comInventoryDetailCardBatch.vue | 203 ------------------ .../inventoryMove/job/inventoryMoveDetail.vue | 11 +- 3 files changed, 11 insertions(+), 213 deletions(-) delete mode 100644 src/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue diff --git a/src/pages/inventoryMove/coms/comInventoryDetailCard.vue b/src/pages/inventoryMove/coms/comInventoryDetailCard.vue index bb58c12c..4ffc3a1b 100644 --- a/src/pages/inventoryMove/coms/comInventoryDetailCard.vue +++ b/src/pages/inventoryMove/coms/comInventoryDetailCard.vue @@ -3,7 +3,11 @@ @@ -27,6 +31,7 @@ - - \ No newline at end of file diff --git a/src/pages/inventoryMove/job/inventoryMoveDetail.vue b/src/pages/inventoryMove/job/inventoryMoveDetail.vue index eca6f03f..7c91522e 100644 --- a/src/pages/inventoryMove/job/inventoryMoveDetail.vue +++ b/src/pages/inventoryMove/job/inventoryMoveDetail.vue @@ -12,15 +12,10 @@ - - + @openDetail="openDetail"> @@ -81,7 +76,6 @@ import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue' import comInventoryDetailCard from '@/pages/inventoryMove/coms/comInventoryDetailCard.vue' - import comInventoryDetailCardBatch from '@/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue' import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue' import jobTop from '@/mycomponents/job/jobTop.vue' @@ -93,7 +87,6 @@ winScanButton, winScanPack, comInventoryDetailCard, - comInventoryDetailCardBatch, winScanPackAndLocation, detailInfoPopup, jobTop @@ -292,6 +285,7 @@ calcHandleQty() { calcHandleQty(this.detailSource) + console.log(this.detailSource) this.continueScan() this.$forceUpdate(); }, @@ -354,6 +348,7 @@ if (itemDetail.scaned) { // this.showMessage("批次【" + batch + "】已经扫描") itemDetail.handleQty =calc.add(itemDetail.handleQty,Number(result.label.qty)); + this.calcHandleQty(); } else { let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); From 2671100352f022c3aebfb1b8455646264200c5ab Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Nov 2024 16:36:14 +0800 Subject: [PATCH 061/201] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=87=BA?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/balance.js | 2 +- .../detail/comRecommendDetailCardBatch.vue | 103 +++++------------- .../unPlanned/coms/comReceiptDetailCard.vue | 11 +- src/pages/unPlanned/job/issueJobDetail.vue | 10 +- 4 files changed, 42 insertions(+), 84 deletions(-) diff --git a/src/common/balance.js b/src/common/balance.js index 7e682098..8ddae8f2 100644 --- a/src/common/balance.js +++ b/src/common/balance.js @@ -403,7 +403,7 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback) filters.push({ column: "batch", action: "==", - value: null + value: label.batch?label.batch:null }) filters.push({ column: "locationCode", diff --git a/src/mycomponents/detail/comRecommendDetailCardBatch.vue b/src/mycomponents/detail/comRecommendDetailCardBatch.vue index acfc3d3b..5452b913 100644 --- a/src/mycomponents/detail/comRecommendDetailCardBatch.vue +++ b/src/mycomponents/detail/comRecommendDetailCardBatch.vue @@ -1,50 +1,45 @@