|
@ -1,5 +1,8 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
|
|
|
<view class="" style="background: white;padding: 20rpx;position: fixed;width: 100%;box-shadow: 0px 0px 10px 10px rgba(1, 1, 1, 0.05);z-index: 22;"> |
|
|
|
|
|
<uni-pagination :total="totalCount" title="标题文字" :pageSize='pageSize' @change="changePage" :current="pageNo"/> |
|
|
|
|
|
</view> |
|
|
<com-empty-view v-if="jobList.length==0"></com-empty-view> |
|
|
<com-empty-view v-if="jobList.length==0"></com-empty-view> |
|
|
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" |
|
|
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" |
|
|
:isShowToAreaCode="true" :isShowQurery='true' :isShowToday='false' :isShowStatus='false' |
|
|
:isShowToAreaCode="true" :isShowQurery='true' :isShowToday='false' :isShowStatus='false' |
|
@ -7,7 +10,7 @@ |
|
|
:checkedWaitTask="checkedWaitTask" @onQuery="getListByFilter"> |
|
|
:checkedWaitTask="checkedWaitTask" @onQuery="getListByFilter"> |
|
|
</job-filter> |
|
|
</job-filter> |
|
|
|
|
|
|
|
|
<view v-if="jobList.length>0" style="padding-bottom: 100rpx;"> |
|
|
<view v-if="jobList.length>0" style="padding-bottom: 100rpx;padding-top: 100rpx;"> |
|
|
<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:detailOptions" |
|
@ -20,7 +23,7 @@ |
|
|
|
|
|
|
|
|
<putaway-info-popup ref='jobInfoPopup'></putaway-info-popup> |
|
|
<putaway-info-popup ref='jobInfoPopup'></putaway-info-popup> |
|
|
<putaway-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></putaway-job-list-popup> |
|
|
<putaway-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></putaway-job-list-popup> |
|
|
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> |
|
|
<!-- <uni-load-more :status="loadingType" v-if="jobList.length>0" /> --> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<!-- <win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button> --> |
|
|
<!-- <win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button> --> |
|
@ -29,7 +32,7 @@ |
|
|
</winScanPackJob> --> |
|
|
</winScanPackJob> --> |
|
|
<jobList ref="jobList" @selectItem="selectItem"></jobList> |
|
|
<jobList ref="jobList" @selectItem="selectItem"></jobList> |
|
|
<view class="footer" v-if="jobList.length>0"> |
|
|
<view class="footer" v-if="jobList.length>0"> |
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="takeAllJob">全部执行</button> |
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="takeAllJob">执行当前页</button> |
|
|
</view> |
|
|
</view> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
</view> |
|
|
</view> |
|
@ -42,7 +45,8 @@ |
|
|
getPutawayJobList, |
|
|
getPutawayJobList, |
|
|
cancleTakePutawayJob, |
|
|
cancleTakePutawayJob, |
|
|
putawayJobAllExecute, |
|
|
putawayJobAllExecute, |
|
|
takeAllPutawayJob |
|
|
takeAllPutawayJob, |
|
|
|
|
|
cancleAllTakePutawayJob |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
@ -130,13 +134,13 @@ |
|
|
this.$refs.filter.openFilter(); |
|
|
this.$refs.filter.openFilter(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onReachBottom() { |
|
|
// onReachBottom() { |
|
|
//避免多次触发 |
|
|
// //避免多次触发 |
|
|
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|
|
// if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|
|
return; |
|
|
// return; |
|
|
} |
|
|
// } |
|
|
this.getList("more"); |
|
|
// this.getList("more"); |
|
|
}, |
|
|
// }, |
|
|
onPullDownRefresh() { |
|
|
onPullDownRefresh() { |
|
|
this.getList('refresh'); |
|
|
this.getList('refresh'); |
|
|
}, |
|
|
}, |
|
@ -174,12 +178,12 @@ |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: this.$store.state.user.id |
|
|
value: this.$store.state.user.id |
|
|
}) |
|
|
}) |
|
|
if(toAreaCode){ |
|
|
if(this.toAreaCode){ |
|
|
//到库区 |
|
|
//到库区 |
|
|
filters.push({ |
|
|
filters.push({ |
|
|
column: "toAreaCode", |
|
|
column: "toAreaCode", |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: toAreaCode |
|
|
value: this.toAreaCode |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
var params = { |
|
|
var params = { |
|
@ -197,15 +201,16 @@ |
|
|
|
|
|
|
|
|
var list = res.data.list; |
|
|
var list = res.data.list; |
|
|
this.totalCount = res.data.total |
|
|
this.totalCount = res.data.total |
|
|
|
|
|
console.log(333,this.totalCount) |
|
|
updateTitle(this.title + "(" + this.totalCount + ")"); |
|
|
updateTitle(this.title + "(" + this.totalCount + ")"); |
|
|
this.loadingType = "loadmore"; |
|
|
// this.loadingType = "loadmore"; |
|
|
if (list == null || list.length == 0) { |
|
|
// if (list == null || list.length == 0) { |
|
|
this.loadingType = "nomore"; |
|
|
// this.loadingType = "nomore"; |
|
|
return; |
|
|
// return; |
|
|
} |
|
|
// } |
|
|
this.jobList = type === "refresh" ? list : this.jobList.concat(list); |
|
|
this.jobList = list |
|
|
this.jobNumberList = list.map(item=>item.number) |
|
|
this.jobNumberList = list.map(item=>item.number) |
|
|
this.pageNo++; |
|
|
// this.pageNo++; |
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
if (type === "refresh") { |
|
|
if (type === "refresh") { |
|
@ -273,7 +278,7 @@ |
|
|
|
|
|
|
|
|
switchChangeWait(state, jobStatus) { |
|
|
switchChangeWait(state, jobStatus) { |
|
|
this.checkedWaitTask = state; |
|
|
this.checkedWaitTask = state; |
|
|
this.status = jobStatus; |
|
|
// this.status = jobStatus; |
|
|
this.getList("refresh"); |
|
|
this.getList("refresh"); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -446,13 +451,7 @@ |
|
|
title: "加载中....", |
|
|
title: "加载中....", |
|
|
mask: true |
|
|
mask: true |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
if (params.status) { |
|
|
|
|
|
this.status = params.status |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
this.status = "1" |
|
|
this.status = "1" |
|
|
} |
|
|
|
|
|
if(params.creationTime==""){ |
|
|
if(params.creationTime==""){ |
|
|
this.checkedToday = false; |
|
|
this.checkedToday = false; |
|
|
} |
|
|
} |
|
@ -492,17 +491,38 @@ |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.$refs.comMessage.showSuccessMessage( "执行任务成功", res => { |
|
|
this.$refs.comMessage.showSuccessMessage( "执行任务成功", res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
this.getList("refresh") |
|
|
this.getList() |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showMessage("执行任务失败") |
|
|
this.showMessage("执行任务失败") |
|
|
|
|
|
this.cancleAllJob() |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showMessage(error) |
|
|
this.showMessage(error) |
|
|
|
|
|
this.cancleAllJob() |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
// 取消承接全部任务 |
|
|
|
|
|
cancleAllJob(){ |
|
|
|
|
|
cancleAllTakePutawayJob({ |
|
|
|
|
|
jobNumberList:this.jobNumberList |
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
changePage(e){ |
|
|
|
|
|
console.log(e) |
|
|
|
|
|
this.pageNo = e.current |
|
|
|
|
|
this.status = 1 |
|
|
|
|
|
this.getList() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|