Browse Source

补给品执行

intex_online20250220
张立 1 week ago
parent
commit
6fb4635caf
  1. 12
      src/api/request2.js
  2. 57
      src/pages/issueSupplies/job/issueDetailBatch.vue
  3. 8
      src/pages/issueSupplies/job/issueJob.vue

12
src/api/request2.js

@ -1621,7 +1621,17 @@ export function issueJobSubmit(params) {
data: params,
});
}
/**
* 补给品发料任务 提交
* @param {*} params
*/
export function issueJobEopSubmit(params) {
return request({
url: baseApi + "/wms/issue-job-main/executeEop",
method: "put",
data: params,
});
}
/**
* 生产收料 任务列表

57
src/pages/issueSupplies/job/issueDetailBatch.vue

@ -49,7 +49,7 @@
takeIssueJob,
cancleTakeIssueJob,
getIssueJobDetail,
issueJobSubmit,
issueJobEopSubmit,
issueCheck,
getBalanceByFilter
} from '@/api/request2.js';
@ -250,6 +250,7 @@
}
detail.scaned = true
}
this.continueScan()
},
//
@ -261,52 +262,16 @@
this.scanPopupGetFocus();
}
},
submit() {
uni.showLoading({
title: "提交中....",
mask: true
});
//
var itemCodes = []
let locationCode = this.toLocationCode
this.detailSource.forEach(toLocation => {
itemCodes.push(toLocation.itemCode)
})
//
getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) {
this.managementList = res.list;
this.submitJob();
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
scanPopupGetFocus (){
if (this.$refs.scanPopup ) {
this.$refs.scanPopup.packGetFocus();
}
},
submitJob() {
var params = this.setParams()
// if (!params.subList || params.subList.length == 0) {
// uni.hideLoading()
// this.showErrorMessage("")
// return
// }
const isTrue = params.subList.some(item=>{
return item.recordList.some(cur=>cur.scaned) == true
})
if(!isTrue){
uni.hideLoading()
this.showErrorMessage("请扫描您需要提交的发料任务")
return
}
console.log("提交参数", params);
issueJobSubmit(params).then(res => {
debugger
// var params = this.setParams()
issueJobEopSubmit(this.detailSource).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成发料记录\n" + res.data)
@ -451,7 +416,7 @@
this.str1 = this.str1.substring(0,this.str1.length - 1)
this.showErrorMessage(`${str1}库存不足`)
}else{
this.submit()
this.submitJob()
}
}
}).catch(err => {
@ -511,7 +476,7 @@
},
closeScanPopup() {
// this.updateCommitBtn();
this.$refs.scanPopup.closeScanPopup()
},
confirmFromLocation(fromLocationCodeParams){
this.fromLocationCode = fromLocationCodeParams

8
src/pages/issueSupplies/job/issueJob.vue

@ -464,7 +464,7 @@
.acceptUserName + "]承接,无法执行", res => {
if (res) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus()
this.$refs.scanPopup.packGetFocus()
}
this.getList('refresh')
}
@ -491,7 +491,7 @@
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus()
this.$refs.scanPopup.packGetFocus()
}
}
});
@ -545,7 +545,9 @@
this.selectItem(list[0])
}
} else {
this.queryByItemCode(result)
uni.hideLoading()
// this.queryByItemCode(result)
this.showMessage('未查找到' + '【' + result.label.code + '】的发料任务');
}
}).catch(error => {
uni.hideLoading()

Loading…
Cancel
Save