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, 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, takeIssueJob,
cancleTakeIssueJob, cancleTakeIssueJob,
getIssueJobDetail, getIssueJobDetail,
issueJobSubmit, issueJobEopSubmit,
issueCheck, issueCheck,
getBalanceByFilter getBalanceByFilter
} from '@/api/request2.js'; } from '@/api/request2.js';
@ -250,6 +250,7 @@
} }
detail.scaned = true detail.scaned = true
} }
this.continueScan()
}, },
// //
@ -261,52 +262,16 @@
this.scanPopupGetFocus(); this.scanPopupGetFocus();
} }
}, },
scanPopupGetFocus (){
submit() { if (this.$refs.scanPopup ) {
uni.showLoading({ this.$refs.scanPopup.packGetFocus();
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);
}
});
}, },
submitJob() { submitJob() {
var params = this.setParams() debugger
// var params = this.setParams()
// if (!params.subList || params.subList.length == 0) { issueJobEopSubmit(this.detailSource).then(res => {
// 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 => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成发料记录\n" + res.data) this.showCommitSuccessMessage("提交成功\n生成发料记录\n" + res.data)
@ -451,7 +416,7 @@
this.str1 = this.str1.substring(0,this.str1.length - 1) this.str1 = this.str1.substring(0,this.str1.length - 1)
this.showErrorMessage(`${str1}库存不足`) this.showErrorMessage(`${str1}库存不足`)
}else{ }else{
this.submit() this.submitJob()
} }
} }
}).catch(err => { }).catch(err => {
@ -511,7 +476,7 @@
}, },
closeScanPopup() { closeScanPopup() {
// this.updateCommitBtn(); this.$refs.scanPopup.closeScanPopup()
}, },
confirmFromLocation(fromLocationCodeParams){ confirmFromLocation(fromLocationCodeParams){
this.fromLocationCode = fromLocationCodeParams this.fromLocationCode = fromLocationCodeParams

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

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

Loading…
Cancel
Save