|
|
@ -372,20 +372,7 @@ |
|
|
|
getPrecisionStrategyList(precisionStrategParams, res => { |
|
|
|
if (res.success) { |
|
|
|
this.managementList = res.list; |
|
|
|
var params = this.setParams() |
|
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
|
inventoryMoveRecordSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|
this.showCommitSuccessMessage("提交成功\n生成" + this.title + "\n" + |
|
|
|
res.data) |
|
|
|
} else { |
|
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
this.submit() |
|
|
|
} else { |
|
|
|
uni.hideLoading(); |
|
|
|
this.showErrorMessage(res.message); |
|
|
@ -398,6 +385,39 @@ |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
submit(){ |
|
|
|
//目标库位和状态都一致时不可以提交 |
|
|
|
var params = this.setParams() |
|
|
|
let hint="" |
|
|
|
this.dataContent.subList.forEach(res=>{ |
|
|
|
if(res.fromLocationCode==res.toLocationCode&& |
|
|
|
res.fromInventoryStatus&&res.toInventoryStatus){ |
|
|
|
hint +=`包装号【${res.fromPackingNumber}】来源库位与目标库位 来源状态与目标状态一致,不可以提交\n` |
|
|
|
} |
|
|
|
}) |
|
|
|
if(hint){ |
|
|
|
uni.hideLoading() |
|
|
|
this.$refs.comMessage.showQuestionMessage1(hint, 'red', res => { |
|
|
|
if (res) { |
|
|
|
} |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
|
inventoryMoveRecordSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|
this.showCommitSuccessMessage("提交成功\n生成" + this.title + "\n" + |
|
|
|
res.data) |
|
|
|
} else { |
|
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
setPrecisionStrategParams() { |
|
|
|
var itemList = [] |
|
|
|