|
|
@ -5,12 +5,11 @@ |
|
|
|
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" |
|
|
|
:checkedWaitTask="checkedWaitTask"> |
|
|
|
</job-filter> |
|
|
|
|
|
|
|
|
|
|
|
<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:detailOptions" |
|
|
|
@click="swipeClick($event,item)"> |
|
|
|
<com-product-job-card :dataContent="item" @click='openJobDetail(item)'></com-product-job-card> |
|
|
|
</uni-swipe-action-item> |
|
|
@ -28,8 +27,8 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
getProductReceiptJobList, |
|
|
|
cancleTakeProductReceiptJob |
|
|
|
getPickJobList, |
|
|
|
cancleTakePickJob |
|
|
|
} from '@/api/request2.js'; |
|
|
|
|
|
|
|
import { |
|
|
@ -82,7 +81,7 @@ |
|
|
|
this.detailOptions = getDetailOption(); |
|
|
|
this.detailGiveupOptions = getDetailGiveupOption(); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onReachBottom() { |
|
|
|
//避免多次触发 |
|
|
|
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|
|
@ -90,7 +89,7 @@ |
|
|
|
} |
|
|
|
this.getList("more"); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onPullDownRefresh() { |
|
|
|
this.getList('refresh'); |
|
|
|
}, |
|
|
@ -135,24 +134,24 @@ |
|
|
|
value: this.todayTime |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
column: "status", |
|
|
|
action: "in", |
|
|
|
value: this.status |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
var params = { |
|
|
|
filters: filters, |
|
|
|
pageNo: this.pageNo, |
|
|
|
pageSize: this.pageSize, |
|
|
|
} |
|
|
|
getProductReceiptJobList(params).then(res => { |
|
|
|
getPickJobList(params).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (type === "refresh") { |
|
|
|
uni.stopPullDownRefresh(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var list = res.data.list; |
|
|
|
this.totalCount = res.data.total |
|
|
|
this.loadingType = "loadmore"; |
|
|
@ -207,13 +206,13 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
cancleJob(id) { |
|
|
|
cancleTakeProductReceiptJob(id).then(res => { |
|
|
|
if(res.data){ |
|
|
|
cancleTakePickJob(id).then(res => { |
|
|
|
if (res.data) { |
|
|
|
this.getList("refresh") |
|
|
|
uni.showToast({ |
|
|
|
title:"放弃任务成功" |
|
|
|
title: "放弃任务成功" |
|
|
|
}) |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.showMessage("放弃任务失败") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
@ -252,13 +251,13 @@ |
|
|
|
action: "==", |
|
|
|
value: code |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
var params = { |
|
|
|
filters: filters, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 100, |
|
|
|
} |
|
|
|
getProductReceiptJobList(params).then(res => { |
|
|
|
getPickJobList(params).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.data.list.length == 0) { |
|
|
|
that.showMessage('未查找到' + '【' + code + '】的收货任务'); |
|
|
@ -284,4 +283,4 @@ |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
|
|
|
</style> |
|
|
|
</style> |