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/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/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/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..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();
@@ -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);
}
//来源库位赋默认值
@@ -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/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..30db744a 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);
}
//来源库位赋默认值
@@ -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);
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 3342d8b5..148232a8 100644
--- a/pages/unPlanned/job/receiptJobDetail.vue
+++ b/pages/unPlanned/job/receiptJobDetail.vue
@@ -37,7 +37,7 @@
-
+
@@ -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);
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 @@
-
+