From a21906521689490fb7daadeee9fa0fc729d946aa Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Fri, 16 Aug 2024 18:26:41 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/scan/winScanPackage.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mycomponents/scan/winScanPackage.vue b/src/mycomponents/scan/winScanPackage.vue index e751e5f4..bb364b40 100644 --- a/src/mycomponents/scan/winScanPackage.vue +++ b/src/mycomponents/scan/winScanPackage.vue @@ -176,7 +176,7 @@ getBalanceByFilter(params).then(res => { if (res.data.list.length > 0) { res.data.list.forEach(r => { - if (packageInfo.parentNumber !== null) { + if (packageInfo.parentNumber) { r.parentPackingNumber = packageInfo.parentNumber } else { r.parentPackingNumber = packageInfo.number @@ -230,7 +230,7 @@ }, losefocus() { - if (this.$refs.comscan ) { + if (this.$refs.comscan) { this.$refs.comscan.losefocus(); } }, From d88bdff7c54576eaaa582f33ffab6c9c2fd789af Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Fri, 16 Aug 2024 20:12:25 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=96=990816?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/issue/record/directIssue0816.vue | 71 +++++++++++++--------- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/src/pages/issue/record/directIssue0816.vue b/src/pages/issue/record/directIssue0816.vue index 8efa0038..6e4668b1 100644 --- a/src/pages/issue/record/directIssue0816.vue +++ b/src/pages/issue/record/directIssue0816.vue @@ -45,9 +45,9 @@ - - - + + @@ -100,7 +100,7 @@ import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' // import balanceQuery from '@/mycomponents/query/balanceQuery.vue' - + import winScanPackage from '@/mycomponents/scan/winScanPackage.vue' export default { components: { @@ -114,6 +114,7 @@ recordDetailCard, balanceSelect, winComScanBalance, + winScanPackage // balanceQuery }, data() { @@ -181,7 +182,6 @@ // showDrawer() { // this.$refs.showRight.open(); // }, - getBusinessType() { getBusinessType(this.businessTypeCode, res => { if (res.success) { @@ -196,27 +196,36 @@ }, getScanResult(result) { + // let balance = result.balance; let pack = result.package; - let balance = result.balance; - - if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) { - this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this - .fromLocationCode + "]没有库存余额") - return; - } - - //扫描的是子包装 - if (pack.parentNumber) { - this.setPackageData(result); - } else { - this.setContainerData(result); - } + result.balance.forEach( + b => { + this.setPackageData(b,pack); + } + ) }, + + // getScanResult(result) { + // let pack = result.package; + // let balance = result.balance; + + // if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) { + // this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this + // .fromLocationCode + "]没有库存余额") + // return; + // } + + // //扫描的是子包装 + // if (pack.parentNumber) { + // this.setPackageData(result); + // } else { + // this.setContainerData(result); + // } + // }, - setPackageData(result) { - let balance = result.balance; - let label = result.label; - let pack = result.package; + setPackageData(balance, pack) { + // let balance = result.balance; + // let pack = result.package; var item = this.detailSource.find(res => { if (res.itemCode == balance.itemCode) { @@ -432,12 +441,18 @@ this.updateData(); }, + // openScanPopup() { + // if (this.businessType) { + // this.$refs.scanPopup.openScanPopup(this.businessType); + // } else { + // this.getBusinessType() + // } + // }, + openScanPopup() { - if (this.businessType) { - this.$refs.scanPopup.openScanPopup(this.businessType); - } else { - this.getBusinessType() - } + setTimeout(r => { + this.$refs.scanPopup.openScanPopupByBusinessType(this.businessType); + }) }, showFromLocationPopup() { From d097282c73bbab2cbdc09b3d5f580cf6596d069a Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Sat, 17 Aug 2024 13:26:37 +0800 Subject: [PATCH 3/6] =?UTF-8?q?HL-5359=E5=9C=A8=E5=BC=80=E5=85=B3=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=E5=A2=9E=E5=8A=A0=E5=BC=80=E5=85=B3=EF=BC=9AsemiProdu?= =?UTF-8?q?ctReceipCommitValidate=EF=BC=8C=E5=9C=A8=E9=A2=84=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E5=AE=8C=E5=B7=A5=E6=94=B6=E8=B4=A7=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=97=B6=E6=A0=B9=E6=8D=AE=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E6=98=AF=E5=90=A6=E8=A6=81=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E5=BA=93=E4=BD=8D=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E4=B8=8D=E6=89=AB=E6=8F=8F=E7=9B=AE=E6=A0=87=E5=BA=93=E4=BD=8D?= =?UTF-8?q?=E5=8F=96=E4=BB=BB=E5=8A=A1=E4=B8=AD=E7=9A=84=E7=9B=AE=E6=A0=87?= =?UTF-8?q?=E5=BA=93=E4=BD=8D=EF=BC=8C=E5=8F=82=E8=80=83=E8=A3=85=E9=85=8D?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=B8=AD=E7=9A=84fgProductReceipCommitValida?= =?UTF-8?q?te=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/productReceipt/job/productReceiptDetail.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/productReceipt/job/productReceiptDetail.vue b/src/pages/productReceipt/job/productReceiptDetail.vue index 1c6c3cb3..574f5b56 100644 --- a/src/pages/productReceipt/job/productReceiptDetail.vue +++ b/src/pages/productReceipt/job/productReceiptDetail.vue @@ -228,9 +228,9 @@ that.jobToLocationCode = that.subList[0].toLocationCode; that.productionLineCode = that.jobContent.subList[0].productionLineCode; - if (that.jobContent.allowModifyLocation == 'FALSE') { - that.toLocationCode = that.subList[0].toLocationCode - } + // if (that.jobContent.allowModifyLocation == 'FALSE') { + // that.toLocationCode = that.subList[0].toLocationCode + // } that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) that.detailSource = getDataSource(that.subList) if (that.scanMessage) { From fdcf2ab346fe3eb00cefbb7c0378691a6690a5fe Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Sat, 17 Aug 2024 13:31:54 +0800 Subject: [PATCH 4/6] =?UTF-8?q?HL-5426=20PDA=E5=8F=91=E6=96=99=E6=8E=A5?= =?UTF-8?q?=E6=94=B6=E4=BB=BB=E5=8A=A1=E4=B8=AD=E7=AD=9B=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E9=87=8D=E7=BD=AE=E6=B2=A1=E6=9C=89=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=E5=8F=AA=E7=9C=8B=E5=BD=93=E5=A4=A9=E5=92=8C=E5=8F=AA?= =?UTF-8?q?=E7=9C=8B=E5=BE=85=E5=A4=84=E7=90=86=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionReceipt/job/productionReceiptJob.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pages/productionReceipt/job/productionReceiptJob.vue b/src/pages/productionReceipt/job/productionReceiptJob.vue index fe5f82a4..a78c388d 100644 --- a/src/pages/productionReceipt/job/productionReceiptJob.vue +++ b/src/pages/productionReceipt/job/productionReceiptJob.vue @@ -460,6 +460,17 @@ }else{ this.filterItemCode = '' } + if (params.status) { + this.status = params.status + + }else{ + this.status = "1,2" + } + if(params.creationTime==""){ + this.checkedToday = false; + } + this.todayTime = params.creationTime + this.getList('refresh', this.productionLine, this.filterItemCode) }, From 2f5d6c0e841baef553ed0793779b3e8ca7aff490 Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Sat, 17 Aug 2024 13:53:10 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E7=9B=B4=E6=8E=A5=E5=8F=91=E6=96=99?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/record.js | 17 +- src/mycomponents/balance/balance.vue | 7 +- .../record/recordComDetailCard.vue | 12 +- .../scan/winScanParentPackage.vue | 273 ++++++++++++++++++ src/pages/issue/record/directIssue0816.vue | 203 ++++++------- 5 files changed, 385 insertions(+), 127 deletions(-) create mode 100644 src/mycomponents/scan/winScanParentPackage.vue diff --git a/src/common/record.js b/src/common/record.js index df840606..6cbcb38b 100644 --- a/src/common/record.js +++ b/src/common/record.js @@ -39,7 +39,7 @@ export function createDetailInfo(balance, pack) { let detail = deepCopyData(balance); detail.balanceQty = new Decimal(detail.qty).toNumber() detail.qty = new Decimal(detail.qty).toNumber(); - detail.packQty = pack.packQty?new Decimal(pack.packQty).toNumber():0 + detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0 detail.packUnit = pack.packUnit detail.handleQty = new Decimal(detail.qty).toNumber(); detail.package = pack; @@ -49,6 +49,21 @@ export function createDetailInfo(balance, pack) { return detail; } + +export function createDetailByPackInfo(pack) { + + // data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus; + // data.inventoryStatus = data.inventoryStatus; + let detail = deepCopyData(pack); detail.scaned = true; + detail.balanceQty = new Decimal(detail.qty).toNumber() + detail.qty = new Decimal(detail.qty).toNumber(); + detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0 + detail.packUnit = pack.packUnit + detail.handleQty = new Decimal(detail.qty).toNumber(); + detail.package = pack; + return detail; +} + //计算实际数量 export function calcHandleQty(detailSource) { for (let item of detailSource) { diff --git a/src/mycomponents/balance/balance.vue b/src/mycomponents/balance/balance.vue index b4ed53fb..fc5582ab 100644 --- a/src/mycomponents/balance/balance.vue +++ b/src/mycomponents/balance/balance.vue @@ -2,7 +2,8 @@ - + @@ -91,6 +92,10 @@ type: Boolean, default: false }, + isShowParentPack: { + type: Boolean, + default: true + }, }, watch: { diff --git a/src/mycomponents/record/recordComDetailCard.vue b/src/mycomponents/record/recordComDetailCard.vue index 26d24503..cd6be527 100644 --- a/src/mycomponents/record/recordComDetailCard.vue +++ b/src/mycomponents/record/recordComDetailCard.vue @@ -9,7 +9,8 @@ :isShowBalanceQty="isShowBalanceQty"> - + @@ -21,7 +22,7 @@ :right-options="detail.scaned?scanOptions:detailOptions"> + :isShowToLocation="isShowToLocation" :isShowParentPack="isShowParentPack"> @@ -100,6 +101,11 @@ type: Boolean, default: false }, + + isShowParentPack: { + type: Boolean, + default: true + }, }, watch: { @@ -146,7 +152,7 @@ this.$refs.comMessage.showQuestionMessage("确定清空物料及箱码信息?", res => { if (res) { - this.$emit('removeItem',dataContent) + this.$emit('removeItem', dataContent) // this.$emit('removeItem', this.dataContent) } }); diff --git a/src/mycomponents/scan/winScanParentPackage.vue b/src/mycomponents/scan/winScanParentPackage.vue new file mode 100644 index 00000000..8a0553a8 --- /dev/null +++ b/src/mycomponents/scan/winScanParentPackage.vue @@ -0,0 +1,273 @@ + + + + + \ No newline at end of file diff --git a/src/pages/issue/record/directIssue0816.vue b/src/pages/issue/record/directIssue0816.vue index 6e4668b1..9a28e633 100644 --- a/src/pages/issue/record/directIssue0816.vue +++ b/src/pages/issue/record/directIssue0816.vue @@ -18,9 +18,8 @@ + @removePack="removePack" :isShowParentPack="false"> - @@ -45,7 +44,8 @@ - + + @@ -79,6 +79,7 @@ getBusinessType, createItemInfo, createDetailInfo, + createDetailByPackInfo, calcTreeHandleQty, calcHandleQty } from '@/common/record.js'; @@ -100,7 +101,7 @@ import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' // import balanceQuery from '@/mycomponents/query/balanceQuery.vue' - import winScanPackage from '@/mycomponents/scan/winScanPackage.vue' + import winScanParentPackage from '@/mycomponents/scan/winScanParentPackage.vue' export default { components: { @@ -114,7 +115,7 @@ recordDetailCard, balanceSelect, winComScanBalance, - winScanPackage + winScanParentPackage // balanceQuery }, data() { @@ -196,82 +197,87 @@ }, getScanResult(result) { - // let balance = result.balance; let pack = result.package; - result.balance.forEach( - b => { - this.setPackageData(b,pack); + let childBalance = result.balance.childBalance; + let parentBalance = result.balance.parentBalance[0]; + + //1.先判断是否重复扫描 + if (this.itemCode) { + var item = this.detailSource.find(res => res.itemCode == pack.itemCode) + if (item == undefined) { + this.showErrorMessage("请扫描物料为【" + this.itemCode + "】不在此次发料记录中") + return; } - ) - }, - - // getScanResult(result) { - // let pack = result.package; - // let balance = result.balance; - - // if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) { - // this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this - // .fromLocationCode + "]没有库存余额") - // return; - // } + if (item.subList.length > 0) { + var detail = item.subList.find(r => { + if (r.packingNumber == pack.number && + r.batch == pack.batch) { + return r; + } + }) - // //扫描的是子包装 - // if (pack.parentNumber) { - // this.setPackageData(result); - // } else { - // this.setContainerData(result); - // } - // }, + if (detail && detail.scaned) { + this.showErrorMessage("箱码[" + pack.number + "批次[" + pack.batch + "]重复扫描") + return; + } + } + } - setPackageData(balance, pack) { - // let balance = result.balance; - // let pack = result.package; + //2.向列表中增加明细 + //扫描的是子包装 + if (pack.parentNumber) { + //子包装没有库存 + if (childBalance.length == 0) { + this.setPackageData(parentBalance, pack); + } else { //子包装有库存 + this.setPackageData(childBalance[0], pack); + } + } else { + //扫描的是父包装,要过滤掉不在超市的库存,加上没有的库存 + pack.subList.forEach(sub => { + let subBalance = childBalance.find(r => r.packingNumber == sub.number); + if (subBalance) { + //校验父包装和子包装是否在一个库位 + if (subBalance.locationCode == parentBalance.locationCode) { + this.setPackageData(subBalance, sub); + } else { + //不在一个库位暂时先不加 + } + } else { + //如果子包装没有库存,取父包装库存 + this.setPackageData(parentBalance, sub); + } + }) + } + }, + + setPackageData(balance, pack) { var item = this.detailSource.find(res => { if (res.itemCode == balance.itemCode) { return res } }) if (item == undefined) { - if (this.itemCode != "" && this.itemCode != balance.itemCode) { - this.showErrorMessage("请扫描物料为【" + this.itemCode + "】的箱码") - return; - } - if (this.fromWarehouseCode == '') { - this.fromWarehouseCode = balance.warehouseCode; - } var itemp = createItemInfo(balance, pack); - let newDetail = createDetailInfo(balance, pack); // - newDetail.parentNumber = pack.parentNumber; - newDetail.packingNumber = pack.number - newDetail.packUnit = pack.packUnit; - newDetail.packQty = pack.packQty; - if (balance.lableQty) { - newDetail.handleQty = balance.lableQty - } + let newDetail = this.createPackageDetail(balance, pack); itemp.subList.push(newDetail); - this.detailSource.push(itemp) + this.detailSource.push(itemp); this.itemCode = balance.itemCode; - this.fromLocationCode = balance.locationCode + this.fromLocationCode = balance.locationCode; + this.fromWarehouseCode = balance.warehouseCode; this.scanPopupGetFocus() } else { var detail = item.subList.find(r => { if (r.packingNumber == pack.number && - r.batch == balance.batch && - r.locationCode == balance.locationCode && + r.batch == pack.batch && + r.locationCode == pack.locationCode && r.inventoryStatus == balance.inventoryStatus) { return r; } }) if (detail == undefined) { - let newDetail = createDetailInfo(balance, pack); - newDetail.parentNumber = pack.parentNumber; - newDetail.packingNumber = pack.number - newDetail.packUnit = pack.packUnit; - newDetail.packQty = pack.packQty; - if (balance.lableQty) { - newDetail.handleQty = balance.lableQty - } + let newDetail = this.createPackageDetail(balance, pack); item.subList.push(newDetail); this.scanPopupGetFocus() } else { @@ -283,73 +289,26 @@ calcHandleQty(this.detailSource); }, - setContainerData(result) { - //1.查询托和箱所有的库存 - this.getBalance(result, resList => { - - }); - }, - - getBalance(result, callback) { - let packageInfo = result.package; - let filters = [{ - column: "itemCode", - action: "==", - value: packageInfo.itemCode - }, { - column: "batch", - action: "==", - value: packageInfo.batch - }]; - if (this.businessType.outInventoryStatuses != null) { - filters.push({ - column: "inventoryStatus", - action: "in", - value: this.businessType.outInventoryStatuses - }) - } - if (this.businessType.outAreaTypes != null) { - filters.push({ - column: "areaType", - action: "in", - value: this.businessType.outAreaTypes - }) - } - - - let packingNumber = packageInfo.number; - packageInfo.subList.forEach(sub => { - packingNumber = packingNumber + ',' + sub.number - }) - packingNumber = packingNumber.trimEnd(','); - filters.push({ - column: "packingNumber", - action: "in", - value: packingNumber - }) - var params = { - filters: filters, - pageNo: 1, - pageSize: 100, - } - getBalanceByFilter(params).then(res => { - if (res.data.list.length > 0) { - res.data.list.forEach(r => { - // if (packageInfo.parentNumber !== null) { - // r.parentPackingNumber = packageInfo.parentNumber - // } else { - // r.parentPackingNumber = packageInfo.number - // } - }) - callback(res.data.list) - } else { + createPackageDetail(balance, pack) { + let newDetail = {}; + if (balance.packingNumber != pack.number) { + newDetail = createDetailByPackInfo(pack); + newDetail.inventoryStatus = balance.inventoryStatus; + } else { + newDetail = createDetailInfo(balance, pack); + if (balance.lableQty) { + newDetail.handleQty = balance.lableQty } - }).catch(err => { - this.showErrorMessage(err.message); - }) + } + newDetail.parentNumber = pack.parentNumber; + newDetail.packingNumber = pack.number + newDetail.packUnit = pack.packUnit; + newDetail.packQty = pack.packQty; + return newDetail; }, + showErrorMessage(message) { this.$refs.comMessage.showErrorMessage(message, res => { if (res) { @@ -448,7 +407,7 @@ // this.getBusinessType() // } // }, - + openScanPopup() { setTimeout(r => { this.$refs.scanPopup.openScanPopupByBusinessType(this.businessType); From ca3dc72b155bc09c1130a40f3eef10c6b31ceaef Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Sat, 17 Aug 2024 14:01:03 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E7=89=A9=E6=96=99=E9=9A=94=E7=A6=BB?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=EF=BC=8CPDA=E5=A2=9E=E5=8A=A0=E7=89=A9?= =?UTF-8?q?=E6=96=99=E5=8F=B7=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/inventoryMove/coms/comMoveJob.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/inventoryMove/coms/comMoveJob.vue b/src/pages/inventoryMove/coms/comMoveJob.vue index 7446bf81..4e77583f 100644 --- a/src/pages/inventoryMove/coms/comMoveJob.vue +++ b/src/pages/inventoryMove/coms/comMoveJob.vue @@ -212,14 +212,14 @@ uni.stopPullDownRefresh(); } - var list = res.data.list; + let list = res.data.list; this.totalCount = res.data.total this.loadingType = "loadmore"; + this.jobList = type === "refresh" ? list : this.jobList.concat(list); if (list == null || list.length == 0) { this.loadingType = "nomore"; return; } - this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.pageNo++; this.updateTitle(); }).catch(error => {