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

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

@ -34,6 +34,7 @@
import {
cancleTakeOverPageJob,
getOverPageJobList,
packageoverRequestClose
} from '@/api/request2.js';
import {
goHome,
@ -113,6 +114,14 @@
onReady() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
this.detailOptions = [...this.detailOptions,{
text:"关闭",
style:{
backgroundColor:"#F56C6C"
}
}]
console.log('this.detailGiveupOptions',this.detailGiveupOptions)
console.log('this.detailOptions',this.detailOptions)
},
onReachBottom() {
//
@ -278,12 +287,33 @@
this.cancleJob(dataContent.masterId);
}
});
} else if (e.content.text == "关闭") {
this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?",
res => {
if (res) {
this.closeJob(dataContent.masterId);
}
});
}
},
openjobInfoPopup(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) {
cancleTakeOverPageJob(id).then(res => {

Loading…
Cancel
Save