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