Browse Source

目标库位和状态都一致时不可以提交

lijuncheng0816
lijuncheng 3 months ago
parent
commit
22d90fa4c1
  1. 48
      src/pages/inventoryMove/coms/comMoveRecord.vue

48
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -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);
@ -399,6 +386,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 = []
this.detailSource.forEach(item => {

Loading…
Cancel
Save