|
|
@ -180,11 +180,11 @@ |
|
|
|
} |
|
|
|
if (item == undefined) { |
|
|
|
// 获取推荐库位 |
|
|
|
this.getRecommendLocation(balance, pack, toLocation => { |
|
|
|
// this.getRecommendLocation(balance, pack, toLocation => { |
|
|
|
var itemp = createItemInfo(balance, pack); |
|
|
|
let newDetail = createDetailInfo(balance, pack); // |
|
|
|
newDetail.toLocationCode = toLocation.code; |
|
|
|
newDetail.toWarehouseCode = toLocation.warehouseCode; |
|
|
|
// newDetail.toLocationCode = toLocation.code; |
|
|
|
// newDetail.toWarehouseCode = toLocation.warehouseCode; |
|
|
|
itemp.subList.push(newDetail); |
|
|
|
var dataList = pack.subList |
|
|
|
this.detailSource.push(itemp) |
|
|
@ -200,7 +200,7 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
// }) |
|
|
|
|
|
|
|
} else { |
|
|
|
var itemDetail = item.subList.find(r => r.packingNumber == balance.packingNumber && r.batch == |
|
|
@ -298,6 +298,24 @@ |
|
|
|
} else { |
|
|
|
this.showErrorMessage("车间-生产线基础信息维护错误") |
|
|
|
} |
|
|
|
|
|
|
|
//赋值到库位代码 |
|
|
|
let toLocationCode = '' |
|
|
|
this.positionList.forEach(item=>{ |
|
|
|
if(this.workshopCode == item.value){ // 车间 |
|
|
|
item.children.find(child=>{ |
|
|
|
if(this.productionLineCode==child.value){ |
|
|
|
toLocationCode = child.children.find(subChild=>this.workStationCode==subChild.value).rawLocationCode; |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.detailSource.forEach(item=>{ |
|
|
|
item.subList.forEach(detail => { |
|
|
|
detail.toLocationCode = toLocationCode |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -364,13 +382,13 @@ |
|
|
|
getPrecisionStrategyList(precisionStrategyParams, res => { |
|
|
|
if (res.success) { |
|
|
|
this.managementList = res.list; |
|
|
|
var params = this.setRecordParams() |
|
|
|
var params = {...this.setRecordParams()} |
|
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
issueRecordSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|
this.showCommitSuccessMessage("提交成功<br>生成采购上架记录<br>" + res.data, ) |
|
|
|
this.showCommitSuccessMessage("提交成功<br>生成采购上架记录<br>" + res.data) |
|
|
|
} else { |
|
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
} |
|
|
@ -441,6 +459,17 @@ |
|
|
|
// detail.toLocationCode = detail.toLocationCode |
|
|
|
submitItem.qty = detail.handleQty; |
|
|
|
submitItem.package = ""; |
|
|
|
submitItem.recordList = [{ |
|
|
|
toInventoryStatus:detail.inventoryStatus, |
|
|
|
fromPackingNumber:info.packingNumber, |
|
|
|
fromBatch:info.batch, |
|
|
|
toPackingNumber:info.packingNumber, |
|
|
|
toBatch:info.batch, |
|
|
|
fromLocationCode:detail.locationCode, |
|
|
|
toLocationCode:detail.toLocationCode, |
|
|
|
handleQty:detail.handleQty |
|
|
|
} |
|
|
|
] |
|
|
|
subList.push(submitItem) |
|
|
|
} |
|
|
|
}) |
|
|
|