Browse Source

直接发料增加预计出的判断

ljc_0803
niexiting 3 months ago
parent
commit
36fe6cb120
  1. 15
      src/api/request2.js
  2. 80
      src/pages/issue/record/directIssue0816.vue

15
src/api/request2.js

@ -4114,6 +4114,21 @@ export function getBalanceByFilter(param) {
});
}
/**
* 查询库存事务
* @param {*}
*
*/
export function getTransactionByFilter(param) {
return request({
url: baseApi + "/wms/transaction/senior",
method: "post",
data: param,
});
}
/**
* 查询管理精度多个物料多个库位
* @param {*}

80
src/pages/issue/record/directIssue0816.vue

@ -57,7 +57,7 @@
import {
issueRecordSubmit,
getWorkShopLineStation,
getBalanceByFilter
getTransactionByFilter
} from '@/api/request2.js';
import {
@ -228,27 +228,48 @@
if (pack.parentNumber) {
//
if (childBalance.length == 0) {
this.setPackageData(parentBalance, pack);
this.getTransactionList(pack.number, transactionRes => {
if (transactionRes.length == 0) {
this.setPackageData(parentBalance, pack);
} else {
this.showErrorMessage("箱码[" + pack.number + "批次[" + pack.batch +
"]已经发过料")
}
});
} 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);
let packparams = '';
pack.subList.forEach(pack => {
packparams = packparams + pack.number + ','
})
packparams = packparams.trimEnd(',');
this.getTransactionList(packparams, transactionRes => {
//
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 {
//
//
//
let transaction = transactionRes.find(p => p.packingNumber == sub
.number)
if (!transaction) {
this.setPackageData(parentBalance, sub);
}
}
} else {
//
this.setPackageData(parentBalance, sub);
}
})
})
}
},
@ -289,6 +310,35 @@
calcHandleQty(this.detailSource);
},
//
getTransactionList(packingNumbers, callback) {
let params = {
filters: [{
column: "businessType",
action: "==",
value: "发料"
}, {
column: "packingNumber",
action: "in",
value: packingNumbers
}, {
column: "inventoryAction",
action: "==",
value: "OUT"
}],
pageSize: 20,
pageNo: 1,
sort: "",
by: "ASC"
}
getTransactionByFilter(params).then(res => {
callback(res.data.list);
}).catch(err => {
callback([]);
})
},
createPackageDetail(balance, pack) {
let newDetail = {};

Loading…
Cancel
Save