diff --git a/src/pages/issue/record/directIssue.vue b/src/pages/issue/record/directIssue.vue
index f1ba1da2..68a74ac8 100644
--- a/src/pages/issue/record/directIssue.vue
+++ b/src/pages/issue/record/directIssue.vue
@@ -4,19 +4,13 @@
-
+
@@ -79,7 +73,6 @@
getBusinessType,
createItemInfo,
createDetailInfo,
- calcTreeHandleQty,
calcHandleQty
} from '@/common/record.js';
@@ -200,11 +193,11 @@
let pack = result.package;
- if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) {
- this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this
- .fromLocationCode + "]没有库存余额")
- return;
- }
+ // if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) {
+ // this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this
+ // .fromLocationCode + "]没有库存余额")
+ // return;
+ // }
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
@@ -212,15 +205,13 @@
}
})
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.fromLocationCode=balance.locationCode
+
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
@@ -237,7 +228,7 @@
var detail = item.subList.find(r => {
if (r.packingNumber == pack.number &&
r.batch == balance.batch &&
- r.locationCode == balance.locationCode &&
+ r.fromLocationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
@@ -249,7 +240,8 @@
if (pack.parentNumber) {
var checkData = item.subList.find(r => {
if (r.packingNumber == pack.parentNumber &&
- r.batch == balance.batch) {
+ r.batch == balance.batch&&
+ r.fromLocationCode == balance.locationCode) {
return r;
}
})
@@ -264,6 +256,7 @@
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
+ newDetail.fromLocationCode=balance.locationCode
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
@@ -273,7 +266,8 @@
//扫描的是父包装
var checkData = item.subList.find(r => {
if (r.parentNumber == pack.number &&
- r.batch == balance.batch) {
+ r.batch == balance.batch&&
+ r.fromLocationCode == balance.locationCode) {
return r;
}
})
@@ -288,6 +282,7 @@
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
+ newDetail.fromLocationCode=balance.locationCode
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
@@ -297,6 +292,7 @@
console.log("扫描的是父包装,是否移除子包装")
} else {
let newDetail = createDetailInfo(balance, pack);
+ newDetail.fromLocationCode=balance.locationCode
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
@@ -326,18 +322,6 @@
});
},
- calcTreeHandleQty() {
- for (let item of this.detailSource) {
- item.qty = 0;
- for (let detail of item.subList) {
- if (detail != undefined) {
- item.qty = calc.add(item.qty, detail.qty)
- }
- }
- }
- this.$forceUpdate();
- },
-
showSelect() {
// if (this.editPosition) {
this.show = true