|
@ -9,7 +9,8 @@ |
|
|
<view v-if="jobList.length>0"> |
|
|
<view v-if="jobList.length>0"> |
|
|
<uni-swipe-action ref="swipeAction"> |
|
|
<uni-swipe-action ref="swipeAction"> |
|
|
<view v-for="(item, index) in jobList" :key="index"> |
|
|
<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)"> |
|
|
@click="swipeClick($event,item)"> |
|
|
|
|
|
|
|
|
<com-issue-job-card :dataContent="item" @click='openJobDetail(item)'></com-issue-job-card> |
|
|
<com-issue-job-card :dataContent="item" @click='openJobDetail(item)'></com-issue-job-card> |
|
@ -34,7 +35,8 @@ |
|
|
import { |
|
|
import { |
|
|
cancleTakeIssueJob, |
|
|
cancleTakeIssueJob, |
|
|
getIssueJobList, |
|
|
getIssueJobList, |
|
|
getIssueJobByProductionline |
|
|
getIssueJobByProductionline, |
|
|
|
|
|
closeTakeIssueJob |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
import { |
|
|
import { |
|
|
goHome, |
|
|
goHome, |
|
@ -43,7 +45,8 @@ |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
getDetailOption, |
|
|
getDetailOption, |
|
|
getDetailGiveupOption |
|
|
getDetailGiveupOption, |
|
|
|
|
|
getDetailCloseOption |
|
|
} from '@/common/array.js'; |
|
|
} from '@/common/array.js'; |
|
|
|
|
|
|
|
|
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' |
|
|
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' |
|
@ -80,7 +83,8 @@ |
|
|
status: '1,2', //待处理 、进行中 |
|
|
status: '1,2', //待处理 、进行中 |
|
|
detailOptions: [], |
|
|
detailOptions: [], |
|
|
detailGiveupOptions: [], |
|
|
detailGiveupOptions: [], |
|
|
productionlineList: [], |
|
|
productionlineList: [], |
|
|
|
|
|
detailCloseOptions: [], |
|
|
title:'', |
|
|
title:'', |
|
|
productionLine:"", |
|
|
productionLine:"", |
|
|
fromLocation:"" |
|
|
fromLocation:"" |
|
@ -97,6 +101,7 @@ |
|
|
onReady() { |
|
|
onReady() { |
|
|
this.detailOptions = getDetailOption(); |
|
|
this.detailOptions = getDetailOption(); |
|
|
this.detailGiveupOptions = getDetailGiveupOption(); |
|
|
this.detailGiveupOptions = getDetailGiveupOption(); |
|
|
|
|
|
this.detailCloseOptions = getDetailCloseOption(); |
|
|
}, |
|
|
}, |
|
|
onReachBottom() { |
|
|
onReachBottom() { |
|
|
//避免多次触发 |
|
|
//避免多次触发 |
|
@ -289,11 +294,18 @@ |
|
|
this.openjobInfoPopup(dataContent); |
|
|
this.openjobInfoPopup(dataContent); |
|
|
} else if (e.content.text == "放弃") { |
|
|
} else if (e.content.text == "放弃") { |
|
|
this.$refs.comMessage.showQuestionMessage("确定要放弃当前任务?", |
|
|
this.$refs.comMessage.showQuestionMessage("确定要放弃当前任务?", |
|
|
res => { |
|
|
res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
this.cancleJob(dataContent.masterId); |
|
|
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) |
|
|
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) { |
|
|
switchChangeToday(state, creationTime) { |
|
|
this.checkedToday = state; |
|
|
this.checkedToday = state; |
|
|