From 013138a38f1caf644fb9747a7677628ea2b1c7ac Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 29 Dec 2023 11:03:57 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=96=99?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E8=BD=A6=E9=97=B4=20=20=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E5=A4=96=E5=87=BA=E5=85=A5=E5=BA=93=E4=B8=8D=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E5=88=B6=E5=93=81=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/issue/request/issueRequestCreate.vue | 2 +- pages/unPlanned/job/receiptJobDetail.vue | 2 +- pages/unPlanned/record/receiptRecord.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/issue/request/issueRequestCreate.vue b/pages/issue/request/issueRequestCreate.vue index b194ac25..8b0cce4b 100644 --- a/pages/issue/request/issueRequestCreate.vue +++ b/pages/issue/request/issueRequestCreate.vue @@ -89,7 +89,7 @@ if (this.detailSource.subList.length == 0) { this.detailSource = { - workshopCode: item.workshopCode, + workShopCode: item.workshopCode, workShopName: item.workShopName, productionLineCode: item.productionLineCode, productionLineName: item.productionLineName, diff --git a/pages/unPlanned/job/receiptJobDetail.vue b/pages/unPlanned/job/receiptJobDetail.vue index 3342d8b5..d872eb6d 100644 --- a/pages/unPlanned/job/receiptJobDetail.vue +++ b/pages/unPlanned/job/receiptJobDetail.vue @@ -37,7 +37,7 @@ - + diff --git a/pages/unPlanned/record/receiptRecord.vue b/pages/unPlanned/record/receiptRecord.vue index fc0f6e59..99f50cc0 100644 --- a/pages/unPlanned/record/receiptRecord.vue +++ b/pages/unPlanned/record/receiptRecord.vue @@ -37,7 +37,7 @@ - + From 0fac06e793bfd595c680d998ccede7696729a650 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 29 Dec 2023 13:55:37 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=E5=BA=93=E4=BD=8D,=20=E8=AE=A1=E5=88=92=E5=A4=96=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/count/job/countDetail.vue | 4 ++-- pages/customerReturn/job/returnDetail.vue | 4 ++-- pages/inspect/job/inspectDetail.vue | 4 ++-- pages/inspect/job/inspectFullDetail.vue | 4 ++-- pages/inspect/job/inspectResult.vue | 4 ++-- .../inventoryMove/job/inventoryMoveDetail.vue | 4 ++-- .../job/productDismantleDetail.vue | 4 ++-- .../job/productPutawayDetail.vue | 4 ++-- .../job/productionReceiptDetail.vue | 4 ++-- pages/productionReturn/job/returnDetail.vue | 8 +++---- pages/putaway/job/putawayDetail.vue | 4 ++-- pages/scrap/job/scrapJobDetail.vue | 4 ++-- pages/transfer/job/issueDetail.vue | 4 ++-- pages/transfer/job/transferDetail.vue | 4 ++-- pages/unPlanned/job/issueJobDetail.vue | 22 ++++++++++++++----- pages/unPlanned/job/receiptJobDetail.vue | 9 ++++---- 16 files changed, 52 insertions(+), 39 deletions(-) diff --git a/pages/count/job/countDetail.vue b/pages/count/job/countDetail.vue index 375e14b7..7d940707 100644 --- a/pages/count/job/countDetail.vue +++ b/pages/count/job/countDetail.vue @@ -273,8 +273,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/customerReturn/job/returnDetail.vue b/pages/customerReturn/job/returnDetail.vue index 93c2d3e4..2c6f06c9 100644 --- a/pages/customerReturn/job/returnDetail.vue +++ b/pages/customerReturn/job/returnDetail.vue @@ -226,8 +226,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/inspect/job/inspectDetail.vue b/pages/inspect/job/inspectDetail.vue index db6d8e6b..e59a139f 100644 --- a/pages/inspect/job/inspectDetail.vue +++ b/pages/inspect/job/inspectDetail.vue @@ -270,8 +270,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/inspect/job/inspectFullDetail.vue b/pages/inspect/job/inspectFullDetail.vue index df0be900..2e97c3dc 100644 --- a/pages/inspect/job/inspectFullDetail.vue +++ b/pages/inspect/job/inspectFullDetail.vue @@ -286,8 +286,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/inspect/job/inspectResult.vue b/pages/inspect/job/inspectResult.vue index 1aa6c8ef..d0d67ec2 100644 --- a/pages/inspect/job/inspectResult.vue +++ b/pages/inspect/job/inspectResult.vue @@ -479,9 +479,9 @@ if (res.data) { var hint=""; if(this.jobContent.nextAction=="FULL_INSPECT"){ - hint ="提交成功
生成到货检验任务" + res.data + hint ="提交成功
生成到货检验任务
" + res.data }else { - hint ="提交成功
生成到货检验记录" + res.data + hint ="提交成功
生成到货检验记录
" + res.data } this.showCommitSuccessMessage(hint) } else { diff --git a/pages/inventoryMove/job/inventoryMoveDetail.vue b/pages/inventoryMove/job/inventoryMoveDetail.vue index 3bf224f8..30856fd3 100644 --- a/pages/inventoryMove/job/inventoryMoveDetail.vue +++ b/pages/inventoryMove/job/inventoryMoveDetail.vue @@ -267,8 +267,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/productDismantle/job/productDismantleDetail.vue b/pages/productDismantle/job/productDismantleDetail.vue index 84cce3aa..aff9024c 100644 --- a/pages/productDismantle/job/productDismantleDetail.vue +++ b/pages/productDismantle/job/productDismantleDetail.vue @@ -241,8 +241,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/productPutaway/job/productPutawayDetail.vue b/pages/productPutaway/job/productPutawayDetail.vue index a148423a..3c323a0b 100644 --- a/pages/productPutaway/job/productPutawayDetail.vue +++ b/pages/productPutaway/job/productPutawayDetail.vue @@ -241,8 +241,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/productionReceipt/job/productionReceiptDetail.vue b/pages/productionReceipt/job/productionReceiptDetail.vue index d93fbc3e..66847d7b 100644 --- a/pages/productionReceipt/job/productionReceiptDetail.vue +++ b/pages/productionReceipt/job/productionReceiptDetail.vue @@ -226,8 +226,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/productionReturn/job/returnDetail.vue b/pages/productionReturn/job/returnDetail.vue index 9557298b..542b5fd5 100644 --- a/pages/productionReturn/job/returnDetail.vue +++ b/pages/productionReturn/job/returnDetail.vue @@ -243,10 +243,10 @@ // let item = this.detailSource[i]; // item.subList.forEach(l => { // //重复的库位不往里面插入 - // var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - // if (location.length == 0) { - // fromlocationList.push(l.fromLocationCode); - // } + // var location = fromlocationList.find(res => res == l.fromLocationCode) + // if (location == undefined) { + // fromlocationList.push(l.fromLocationCode); + // } // //来源库位赋默认值 // if (fromlocationCode == '') { // if (!l.scaned) { diff --git a/pages/putaway/job/putawayDetail.vue b/pages/putaway/job/putawayDetail.vue index d21fd2bc..0f20f86b 100644 --- a/pages/putaway/job/putawayDetail.vue +++ b/pages/putaway/job/putawayDetail.vue @@ -250,8 +250,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/scrap/job/scrapJobDetail.vue b/pages/scrap/job/scrapJobDetail.vue index f62413b3..23884b2b 100644 --- a/pages/scrap/job/scrapJobDetail.vue +++ b/pages/scrap/job/scrapJobDetail.vue @@ -374,8 +374,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/transfer/job/issueDetail.vue b/pages/transfer/job/issueDetail.vue index 9367f3de..1e7824f4 100644 --- a/pages/transfer/job/issueDetail.vue +++ b/pages/transfer/job/issueDetail.vue @@ -230,8 +230,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/transfer/job/transferDetail.vue b/pages/transfer/job/transferDetail.vue index 4319f35a..145ad91f 100644 --- a/pages/transfer/job/transferDetail.vue +++ b/pages/transfer/job/transferDetail.vue @@ -281,8 +281,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/unPlanned/job/issueJobDetail.vue b/pages/unPlanned/job/issueJobDetail.vue index ebcd52bb..8d93fc19 100644 --- a/pages/unPlanned/job/issueJobDetail.vue +++ b/pages/unPlanned/job/issueJobDetail.vue @@ -218,13 +218,14 @@ } else { var itemDetail = detail.subList.find(r => { return r.packingNumber == packingNumber && - r.batch == batch + r.batch == batch&& + r.fromLocationCode == result.fromLocationCode }) if (itemDetail == undefined) { - this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在列表中") + this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】不在列表中") } else { if (itemDetail.scaned) { - this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") + this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】已经扫描") } else { let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); @@ -361,6 +362,17 @@ }); }) }, + + showQuestionMessage(message, callback) { + setTimeout(r => { + this.scanPopupLoseFocus(); + this.$refs.comMessage.showQuestionMessage(message, res => { + if (res) { + callback(res); + } + }); + }) + }, openScanPopup() { let fromlocationCode = ''; @@ -369,8 +381,8 @@ let item = this.detailSource[i]; item.subList.forEach(l => { //重复的库位不往里面插入 - var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) - if (location.length == 0) { + var location = fromlocationList.find(res => res == l.fromLocationCode) + if (location == undefined) { fromlocationList.push(l.fromLocationCode); } //来源库位赋默认值 diff --git a/pages/unPlanned/job/receiptJobDetail.vue b/pages/unPlanned/job/receiptJobDetail.vue index d872eb6d..148232a8 100644 --- a/pages/unPlanned/job/receiptJobDetail.vue +++ b/pages/unPlanned/job/receiptJobDetail.vue @@ -217,15 +217,16 @@ var itemCode = result.label.itemCode; var detail = this.detailSource.find(r => r.itemCode == itemCode); if (detail == undefined) { - this.showMessage("物料号【" + itemCode + "】不在列表中") + this.showErrorMessage("物料号【" + itemCode + "】不在列表中") } else { - var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch); + var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch + && r.fromLocationCode == result.fromLocationCode); if (itemDetail == undefined) { - this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】不在列表中") + this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】不在列表中") } else { if (itemDetail.scaned) { - this.showMessage("箱码【" + packingNumber + "】已经扫描") + this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】已经扫描") } else { itemDetail.scaned = true; itemDetail.handleQty = Number(result.label.qty); From b7e18fe0c5ff1c4ea923e5f2e7008a41130144e9 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 29 Dec 2023 15:15:19 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/basic.js | 17 +++++++++++++++++ mycomponents/detail/comDetailCard.vue | 3 ++- .../productPutaway/job/productPutawayDetail.vue | 10 ++++------ .../productReceipt/job/productReceiptDetail.vue | 5 ++--- pages/putaway/job/putawayDetail.vue | 8 ++++---- 5 files changed, 29 insertions(+), 14 deletions(-) diff --git a/common/basic.js b/common/basic.js index 53648ae5..b7467356 100644 --- a/common/basic.js +++ b/common/basic.js @@ -992,3 +992,20 @@ export function navigateBack(backIndex) { history.back(); } } +/** + * 深度克隆对象 + * @param {*} target + */ +export function deepCopyData(target) { + // 克隆原始类型和null + if (!(target !== null && (typeof target === 'object' || typeof target === 'function'))) { + return target; + } + let cloneTarget = Array.isArray(target) ? [] : {}; + // 克隆对象和数组 + for (const key in target) { + cloneTarget[key] = this.deepCopyData(target[key]); + } + + return cloneTarget; +} diff --git a/mycomponents/detail/comDetailCard.vue b/mycomponents/detail/comDetailCard.vue index f3c72706..79801df8 100644 --- a/mycomponents/detail/comDetailCard.vue +++ b/mycomponents/detail/comDetailCard.vue @@ -31,10 +31,11 @@ :right-options="item.scaned?scanOptions:detailOptions"> + - + diff --git a/pages/productPutaway/job/productPutawayDetail.vue b/pages/productPutaway/job/productPutawayDetail.vue index 3c323a0b..661329eb 100644 --- a/pages/productPutaway/job/productPutawayDetail.vue +++ b/pages/productPutaway/job/productPutawayDetail.vue @@ -142,7 +142,7 @@ if (e.from == 'backbutton') { if (this.received) { //取消承接任务 - cancleProductPutawayJob(this.id).then(res => { + cancleTakeProductPutawayJob(this.id).then(res => { uni.navigateBack(); }).catch(error => { uni.navigateBack(); @@ -276,15 +276,13 @@ var itemDetail = detail.subList.find(r => { return r.packingNumber == packingNumber && r.batch == batch && - r.fromLocationCode == locationCode + r.fromLocationCode == result.fromLocationCode }) if (itemDetail == undefined) { - this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode + - "]不在列表中") + this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】不在列表中") } else { if (itemDetail.scaned) { - this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]库位[" + locationCode + - "]已经扫描") + this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】已经扫描") } else { let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); diff --git a/pages/productReceipt/job/productReceiptDetail.vue b/pages/productReceipt/job/productReceiptDetail.vue index 7dd8e04c..5701bce4 100644 --- a/pages/productReceipt/job/productReceiptDetail.vue +++ b/pages/productReceipt/job/productReceiptDetail.vue @@ -14,7 +14,7 @@ + @remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'> @@ -28,7 +28,7 @@ + :locationTypeList="toLocationTypeList"> @@ -104,7 +104,6 @@ subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 toLocationTypeList: [], - toLocationInfo: {}, managementList: [] }; diff --git a/pages/putaway/job/putawayDetail.vue b/pages/putaway/job/putawayDetail.vue index 0f20f86b..30db744a 100644 --- a/pages/putaway/job/putawayDetail.vue +++ b/pages/putaway/job/putawayDetail.vue @@ -284,13 +284,13 @@ } else { var itemDetail = detail.subList.find(r => { return r.packingNumber == packingNumber && - r.batch == batch + r.batch == batch&& + r.fromLocationCode == result.fromLocationCode }) if (itemDetail == undefined) { - this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在列表中") - } else { + this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】不在列表中") if (itemDetail.scaned) { - this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") + this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【"+result.fromLocationCode+"】已经扫描") } else { let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);