|
@ -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' |
|
@ -81,6 +84,7 @@ |
|
|
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() { |
|
|
//避免多次触发 |
|
|
//避免多次触发 |
|
@ -294,6 +299,13 @@ |
|
|
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; |
|
|