Browse Source

HL-5486PDA翻包任务增加关闭功能

hella_online_20240821
wangyufei 3 months ago
parent
commit
0af78626a7
  1. 12
      src/api/request2.js
  2. 30
      src/pages/package/job/overPackageJob.vue

12
src/api/request2.js

@ -2610,7 +2610,17 @@ export function deliverRequestClose(id) {
data: {}, data: {},
}); });
} }
/**
* 翻包任务 关闭任务
* @param {*} params
*/
export function packageoverRequestClose(id) {
return request({
url: baseApi + "/wms/packageover-job-main/close?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 制品发货申请 提交审批 * 制品发货申请 提交审批
* @param {*} params * @param {*} params

30
src/pages/package/job/overPackageJob.vue

@ -34,6 +34,7 @@
import { import {
cancleTakeOverPageJob, cancleTakeOverPageJob,
getOverPageJobList, getOverPageJobList,
packageoverRequestClose
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
@ -113,6 +114,14 @@
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption(); this.detailGiveupOptions = getDetailGiveupOption();
this.detailOptions = [...this.detailOptions,{
text:"关闭",
style:{
backgroundColor:"#F56C6C"
}
}]
console.log('this.detailGiveupOptions',this.detailGiveupOptions)
console.log('this.detailOptions',this.detailOptions)
}, },
onReachBottom() { onReachBottom() {
// //
@ -278,12 +287,33 @@
this.cancleJob(dataContent.masterId); this.cancleJob(dataContent.masterId);
} }
}); });
} else if (e.content.text == "关闭") {
this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?",
res => {
if (res) {
this.closeJob(dataContent.masterId);
}
});
} }
}, },
openjobInfoPopup(item) { openjobInfoPopup(item) {
this.$refs.jobInfoPopup.openPopup(item) this.$refs.jobInfoPopup.openPopup(item)
}, },
closeJob(id){
packageoverRequestClose(id).then(res => {
if(res.data){
this.getList("refresh")
uni.showToast({
title:"关闭任务成功"
})
}else {
this.showMessage("关闭任务失败")
}
}).catch(error => {
this.showMessage(error)
})
},
cancleJob(id) { cancleJob(id) {
cancleTakeOverPageJob(id).then(res => { cancleTakeOverPageJob(id).then(res => {

Loading…
Cancel
Save