|
|
@ -9,7 +9,8 @@ |
|
|
|
<view v-if="jobList.length>0"> |
|
|
|
<uni-swipe-action ref="swipeAction"> |
|
|
|
<view v-for="(item, index) in jobList" :key="index"> |
|
|
|
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions" |
|
|
|
<uni-swipe-action-item |
|
|
|
:right-options="item.status=='2'?detailGiveupOptions:item.status=='1'?detailCloseOptions:detailOptions" |
|
|
|
@click="swipeClick($event,item)"> |
|
|
|
|
|
|
|
<com-issue-job-card :dataContent="item" @click='openJobDetail(item)'></com-issue-job-card> |
|
|
@ -34,7 +35,8 @@ |
|
|
|
import { |
|
|
|
cancleTakeIssueJob, |
|
|
|
getIssueJobList, |
|
|
|
getIssueJobByProductionline |
|
|
|
getIssueJobByProductionline, |
|
|
|
closeTakeIssueJob |
|
|
|
} from '@/api/request2.js'; |
|
|
|
import { |
|
|
|
goHome, |
|
|
@ -43,7 +45,8 @@ |
|
|
|
|
|
|
|
import { |
|
|
|
getDetailOption, |
|
|
|
getDetailGiveupOption |
|
|
|
getDetailGiveupOption, |
|
|
|
getDetailCloseOption |
|
|
|
} from '@/common/array.js'; |
|
|
|
|
|
|
|
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' |
|
|
@ -81,6 +84,7 @@ |
|
|
|
detailOptions: [], |
|
|
|
detailGiveupOptions: [], |
|
|
|
productionlineList: [], |
|
|
|
detailCloseOptions: [], |
|
|
|
title:'', |
|
|
|
productionLine:"", |
|
|
|
fromLocation:"" |
|
|
@ -97,6 +101,7 @@ |
|
|
|
onReady() { |
|
|
|
this.detailOptions = getDetailOption(); |
|
|
|
this.detailGiveupOptions = getDetailGiveupOption(); |
|
|
|
this.detailCloseOptions = getDetailCloseOption(); |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
//避免多次触发 |
|
|
@ -294,6 +299,13 @@ |
|
|
|
this.cancleJob(dataContent.masterId); |
|
|
|
} |
|
|
|
}); |
|
|
|
}else if (e.content.text == "关闭") { |
|
|
|
this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?", |
|
|
|
res => { |
|
|
|
if (res) { |
|
|
|
this.closeJob(dataContent.masterId); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
@ -315,6 +327,27 @@ |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
closeJob(id) { |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
|
|
|
|
closeTakeIssueJob(id).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if(res.data){ |
|
|
|
this.getList("refresh") |
|
|
|
uni.showToast({ |
|
|
|
title:"关闭任务成功" |
|
|
|
}) |
|
|
|
}else { |
|
|
|
this.showMessage("关闭任务失败") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
switchChangeToday(state, creationTime) { |
|
|
|
this.checkedToday = state; |
|
|
|