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 => { getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams() this.submit()
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)
})
} else { } else {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(res.message); 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() { setPrecisionStrategParams() {
var itemList = [] var itemList = []

Loading…
Cancel
Save