|
@ -2,16 +2,18 @@ |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<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' |
|
|
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" |
|
|
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" |
|
|
:checkedWaitTask="checkedWaitTask"> |
|
|
:checkedWaitTask="checkedWaitTask" @onQuery="getListByFilter"> |
|
|
</job-filter> |
|
|
</job-filter> |
|
|
|
|
|
|
|
|
<view v-if="jobList.length>0"> |
|
|
<view v-if="jobList.length>0" style="padding-bottom: 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" |
|
|
@click="swipeClick($event,item)"> |
|
|
@click="swipeClick($event,item)"> |
|
|
<com-putaway-job-card :dataContent="item" @click='openJobDetail(item)'></com-putaway-job-card> |
|
|
<com-putaway-job-card :dataContent="item" @click='openJobDetail(item)'></com-putaway-job-card> |
|
|
|
|
|
|
|
|
</uni-swipe-action-item> |
|
|
</uni-swipe-action-item> |
|
|
</view> |
|
|
</view> |
|
|
</uni-swipe-action> |
|
|
</uni-swipe-action> |
|
@ -21,12 +23,14 @@ |
|
|
<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> --> |
|
|
|
|
|
|
|
|
<winScanPackJob ref="scanPopup" @getResult='getScanResult'> |
|
|
<!-- <winScanPackJob ref="scanPopup" @getResult='getScanResult'> |
|
|
</winScanPackJob> |
|
|
</winScanPackJob> --> |
|
|
<jobList ref="jobList" @selectItem="selectItem"></jobList> |
|
|
<jobList ref="jobList" @selectItem="selectItem"></jobList> |
|
|
|
|
|
<view class="footer" v-if="jobList.length>0"> |
|
|
|
|
|
<button class="btn_single_commit" hover-class="btn_commit_after" @click="takeAllJob">全部执行</button> |
|
|
|
|
|
</view> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
@ -36,7 +40,9 @@ |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
getPutawayJobList, |
|
|
getPutawayJobList, |
|
|
cancleTakePutawayJob |
|
|
cancleTakePutawayJob, |
|
|
|
|
|
putawayJobAllExecute, |
|
|
|
|
|
takeAllPutawayJob |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
@ -46,6 +52,7 @@ |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
getDetailOption, |
|
|
getDetailOption, |
|
|
|
|
|
|
|
|
getDetailGiveupOption |
|
|
getDetailGiveupOption |
|
|
} from '@/common/array.js'; |
|
|
} from '@/common/array.js'; |
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
@ -76,17 +83,18 @@ |
|
|
return { |
|
|
return { |
|
|
jobList: [], |
|
|
jobList: [], |
|
|
pageNo: 1, |
|
|
pageNo: 1, |
|
|
pageSize: 10, |
|
|
pageSize: 30, |
|
|
totalCount: 0, |
|
|
totalCount: 0, |
|
|
loadingType: "nomore", |
|
|
loadingType: "nomore", |
|
|
checkedToday: false, |
|
|
checkedToday: false, |
|
|
checkedWaitTask: false, |
|
|
checkedWaitTask: false, |
|
|
todayTime: "", |
|
|
todayTime: "", |
|
|
status: '1,2', //待处理 、进行中 |
|
|
status: '1', //待处理 |
|
|
detailOptions: [], |
|
|
detailOptions: [], |
|
|
detailGiveupOptions: [], |
|
|
detailGiveupOptions: [], |
|
|
title: '', |
|
|
title: '', |
|
|
scanMessage: "" |
|
|
scanMessage: "", |
|
|
|
|
|
jobNumberList:[],//全部承接参数 |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -134,7 +142,7 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
getList(type) { |
|
|
getList(type,toAreaCode='') { |
|
|
let that = this; |
|
|
let that = this; |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "加载中....", |
|
|
title: "加载中....", |
|
@ -166,6 +174,14 @@ |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: this.$store.state.user.id |
|
|
value: this.$store.state.user.id |
|
|
}) |
|
|
}) |
|
|
|
|
|
if(toAreaCode){ |
|
|
|
|
|
//到库区 |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "toAreaCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: toAreaCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
var params = { |
|
|
var params = { |
|
|
filters: filters, |
|
|
filters: filters, |
|
|
pageNo: this.pageNo, |
|
|
pageNo: this.pageNo, |
|
@ -174,10 +190,10 @@ |
|
|
|
|
|
|
|
|
getPutawayJobList(params).then(res => { |
|
|
getPutawayJobList(params).then(res => { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
if (type === "refresh") { |
|
|
// if (type === "refresh") { |
|
|
uni.stopPullDownRefresh(); |
|
|
// uni.stopPullDownRefresh(); |
|
|
this.openScanPopup() |
|
|
// this.openScanPopup() |
|
|
} |
|
|
// } |
|
|
|
|
|
|
|
|
var list = res.data.list; |
|
|
var list = res.data.list; |
|
|
this.totalCount = res.data.total |
|
|
this.totalCount = res.data.total |
|
@ -188,6 +204,7 @@ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
this.jobList = type === "refresh" ? list : this.jobList.concat(list); |
|
|
this.jobList = type === "refresh" ? list : this.jobList.concat(list); |
|
|
|
|
|
this.jobNumberList = list.map(item=>item.number) |
|
|
this.pageNo++; |
|
|
this.pageNo++; |
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
@ -274,7 +291,7 @@ |
|
|
filters.push({ |
|
|
filters.push({ |
|
|
column: "status", |
|
|
column: "status", |
|
|
action: "in", |
|
|
action: "in", |
|
|
value: '1,2' |
|
|
value: '1' |
|
|
}) |
|
|
}) |
|
|
filters.push({ |
|
|
filters.push({ |
|
|
column: "number", |
|
|
column: "number", |
|
@ -360,7 +377,7 @@ |
|
|
{ |
|
|
{ |
|
|
column: "status", |
|
|
column: "status", |
|
|
action: "in", |
|
|
action: "in", |
|
|
value: '1,2', |
|
|
value: '1', |
|
|
}, |
|
|
}, |
|
|
// { |
|
|
// { |
|
|
// column: "accept_user_id", |
|
|
// column: "accept_user_id", |
|
@ -422,10 +439,86 @@ |
|
|
this.showMessage(e + "\n扫描[" + result.scanMessage + "]") |
|
|
this.showMessage(e + "\n扫描[" + result.scanMessage + "]") |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
getListByFilter(params) { |
|
|
|
|
|
console.log('getListByFilter',params) |
|
|
|
|
|
let that = this; |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中....", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (params.status) { |
|
|
|
|
|
this.status = params.status |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
this.status = "1" |
|
|
|
|
|
} |
|
|
|
|
|
if(params.creationTime==""){ |
|
|
|
|
|
this.checkedToday = false; |
|
|
|
|
|
} |
|
|
|
|
|
if (params.toAreaCode) { |
|
|
|
|
|
// 到库区 |
|
|
|
|
|
this.toAreaCode = params.toAreaCode |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.toAreaCode = '' |
|
|
|
|
|
} |
|
|
|
|
|
this.getList('refresh',this.toAreaCode) |
|
|
|
|
|
}, |
|
|
|
|
|
// 承接全部任务 |
|
|
|
|
|
takeAllJob(){ |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中....", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}); |
|
|
|
|
|
takeAllPutawayJob({ |
|
|
|
|
|
jobNumberList:this.jobNumberList |
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.executeAllJob() |
|
|
|
|
|
} else { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showMessage("承接任务失败") |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
executeAllJob(){ |
|
|
|
|
|
putawayJobAllExecute({ |
|
|
|
|
|
jobNumberList:this.jobNumberList |
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.$refs.comMessage.showSuccessMessage( "执行任务成功", res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.getList("refresh") |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showMessage("执行任务失败") |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
|
|
|
.footer{ |
|
|
|
|
|
position: fixed; |
|
|
|
|
|
bottom: 0px; |
|
|
|
|
|
background: white; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
padding:16rpx 20rpx; |
|
|
|
|
|
box-shadow: 0px 0px 20rpx 20rpx rgba(0, 0, 0, 0.05); |
|
|
|
|
|
button{ |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |