Browse Source

生产收料去除查询管理模式,在后端查询

hella_online_20240829
lijuncheng 5 months ago
parent
commit
0eb6365958
  1. 51
      src/pages/productionReceipt/job/productionReceiptDetail.vue

51
src/pages/productionReceipt/job/productionReceiptDetail.vue

@ -428,17 +428,8 @@
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
productionReceiptJobSubmit(params).then(res => { productionReceiptJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
@ -450,11 +441,35 @@
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
} else {
uni.hideLoading();
this.showErrorMessage(res.message); // var itemCodes = []
} // this.detailSource.forEach(item => {
}); // itemCodes.push(item.itemCode)
// })
// getManagementPrecisions(itemCodes, this.toLocationCode, res => {
// if (res.success) {
// this.managementList = res.list;
// var params = this.setParams()
// console.log("", JSON.stringify(params));
// productionReceiptJobSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br><br>" + res.data)
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
// } else {
// uni.hideLoading();
// this.showErrorMessage(res.message);
// }
// });
}, },
setParams() { setParams() {
@ -464,10 +479,10 @@
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, // var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch); // detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber; detail.toPackingNumber = detail.packingNumber;
detail.toBatch = info.batch; detail.toBatch = detail.batch;
detail.toContainerNumber = ""; detail.toContainerNumber = "";
detail.toLocationCode = this.toLocationCode; detail.toLocationCode = this.toLocationCode;
subList.push(detail) subList.push(detail)

Loading…
Cancel
Save