Compare commits

...

2 Commits

  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 {*} * @param {*}

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

@ -57,7 +57,7 @@
import { import {
issueRecordSubmit, issueRecordSubmit,
getWorkShopLineStation, getWorkShopLineStation,
getBalanceByFilter getTransactionByFilter
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -228,27 +228,48 @@
if (pack.parentNumber) { if (pack.parentNumber) {
// //
if (childBalance.length == 0) { 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 { // } else { //
this.setPackageData(childBalance[0], pack); this.setPackageData(childBalance[0], pack);
} }
} else { } else {
// let packparams = '';
pack.subList.forEach(sub => { pack.subList.forEach(pack => {
let subBalance = childBalance.find(r => r.packingNumber == sub.number); packparams = packparams + pack.number + ','
if (subBalance) { })
// packparams = packparams.trimEnd(',');
if (subBalance.locationCode == parentBalance.locationCode) { this.getTransactionList(packparams, transactionRes => {
this.setPackageData(subBalance, sub); //
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 { } 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); 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) { createPackageDetail(balance, pack) {
let newDetail = {}; let newDetail = {};

Loading…
Cancel
Save