|
@ -48,7 +48,8 @@ |
|
|
inventoryMoveSubmit |
|
|
inventoryMoveSubmit |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
import { |
|
|
import { |
|
|
getManagementPrecisions |
|
|
getManagementPrecisions, |
|
|
|
|
|
getPrecisionStrategyList |
|
|
} from '@/common/balance.js'; |
|
|
} from '@/common/balance.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
@ -61,7 +62,7 @@ |
|
|
updateTitle, |
|
|
updateTitle, |
|
|
navigateBack, |
|
|
navigateBack, |
|
|
getCurrDateTime, |
|
|
getCurrDateTime, |
|
|
getPackingNumberAndBatch, |
|
|
getPackingNumberAndBatchByList, |
|
|
getInventoryStatusName |
|
|
getInventoryStatusName |
|
|
} from '@/common/basic.js'; |
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
@ -264,16 +265,17 @@ |
|
|
} else { |
|
|
} else { |
|
|
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); |
|
|
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); |
|
|
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); |
|
|
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); |
|
|
if (itemDetail.inventoryStatus != result.balance.inventoryStatus){ |
|
|
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { |
|
|
if(this.jobContent.allowModifyInventoryStatus=="TRUE"){ |
|
|
if (this.jobContent.allowModifyInventoryStatus == "TRUE") { |
|
|
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + |
|
|
|
|
|
itemStatus + |
|
|
']不一致,是否继续转移?', res => { |
|
|
']不一致,是否继续转移?', res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.handleQty = Number(result.balance.qty) ; |
|
|
itemDetail.handleQty = Number(result.balance.qty); |
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance.balanceQty =Number(result.balance.qty) ; |
|
|
itemDetail.balance.balanceQty = Number(result.balance.qty); |
|
|
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) |
|
|
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) |
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
this.calcHandleQty(); |
|
|
this.calcHandleQty(); |
|
@ -281,15 +283,16 @@ |
|
|
this.scanPopupGetFocus(); |
|
|
this.scanPopupGetFocus(); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}else { |
|
|
} else { |
|
|
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + |
|
|
|
|
|
itemStatus + |
|
|
']不一致,不允许转移!', res => { |
|
|
']不一致,不允许转移!', res => { |
|
|
this.scanPopupGetFocus(); |
|
|
this.scanPopupGetFocus(); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}else { |
|
|
} else { |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.scaned = true; |
|
|
itemDetail.handleQty = Number(result.balance.qty) ; |
|
|
itemDetail.handleQty = Number(result.balance.qty); |
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance = result.balance; |
|
|
itemDetail.balance.balanceQty = Number(result.balance.qty); |
|
|
itemDetail.balance.balanceQty = Number(result.balance.qty); |
|
@ -297,27 +300,6 @@ |
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
this.calcHandleQty(); |
|
|
this.calcHandleQty(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { |
|
|
|
|
|
// this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
|
|
|
// ']不一致,是否继续转移?', res => { |
|
|
|
|
|
// if (res) { |
|
|
|
|
|
// itemDetail.scaned = true; |
|
|
|
|
|
// itemDetail.handleQty = Number(result.balance.qty) ; |
|
|
|
|
|
// itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
|
|
|
// itemDetail.balance = result.balance; |
|
|
|
|
|
// itemDetail.balance.balanceQty = result.balance.qty; |
|
|
|
|
|
// itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
|
|
|
// itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
|
|
|
// this.calcHandleQty(); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.scanPopupGetFocus(); |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
// } else { |
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -362,24 +344,15 @@ |
|
|
title: "提交中....", |
|
|
title: "提交中....", |
|
|
mask: true |
|
|
mask: true |
|
|
}); |
|
|
}); |
|
|
this.managementList = []; |
|
|
|
|
|
//查询管理模式 |
|
|
//查询管理模式 |
|
|
// this.detailSource.forEach(item => { |
|
|
this.managementList = []; |
|
|
// item.subList.forEach(detail => { |
|
|
var precisionStrategParams = this.setPrecisionStrategParams() |
|
|
// if (detail.scaned) { |
|
|
getPrecisionStrategyList(precisionStrategParams, res => { |
|
|
// getManagementPrecisions(item.itemCode,detail.toLocationCode,res=>{ |
|
|
if (res.success) { |
|
|
// if (res.success) { |
|
|
this.managementList = res.list; |
|
|
// this.managementList = this.managementList.concat(res.list) |
|
|
var params = this.setParams() |
|
|
|
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
var params = this.setParams(); |
|
|
|
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
|
|
|
|
|
|
inventoryMoveSubmit(params).then(res => { |
|
|
inventoryMoveSubmit(params).then(res => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
if (res.data) { |
|
|
if (res.data) { |
|
@ -391,6 +364,39 @@ |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showErrorMessage(error) |
|
|
this.showErrorMessage(error) |
|
|
}) |
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
this.showErrorMessage(res.message); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setPrecisionStrategParams(){ |
|
|
|
|
|
var itemList = [] |
|
|
|
|
|
this.detailSource.forEach(item => { |
|
|
|
|
|
item.subList.forEach(detail => { |
|
|
|
|
|
if (detail.scaned) { |
|
|
|
|
|
var filterResult = itemList.filter(res => { |
|
|
|
|
|
if (res.itemCode == item.itemCode |
|
|
|
|
|
&&res.locationCode == detail.locationCode) { |
|
|
|
|
|
return res |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
//去掉重复元素 |
|
|
|
|
|
if(filterResult.length==0){ |
|
|
|
|
|
var result = { |
|
|
|
|
|
itemCode: item.itemCode, |
|
|
|
|
|
locationCode: detail.toLocationCode |
|
|
|
|
|
} |
|
|
|
|
|
itemList.push(result) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
return itemList; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setParams() { |
|
|
setParams() { |
|
@ -400,10 +406,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 = getPackingNumberAndBatchByList(this.managementList, detail.itemCode, |
|
|
// detail.packingNumber, detail.batch); |
|
|
detail.packingNumber, detail.toLocationCode, detail.batch); |
|
|
detail.toPackingNumber = detail.packingNumber; |
|
|
detail.toPackingNumber = info.packingNumber; |
|
|
detail.toBatch = detail.batch; |
|
|
detail.toBatch = info.batch; |
|
|
detail.toContainerNumber = ''; |
|
|
detail.toContainerNumber = ''; |
|
|
|
|
|
|
|
|
detail.toLocationCode = detail.toLocationCode; |
|
|
detail.toLocationCode = detail.toLocationCode; |
|
|