|
@ -1,15 +1,12 @@ |
|
|
<template> |
|
|
<template> |
|
|
<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" :isShowFromLocationCode="true" @onQuery="getListByFilter" :isShowQurery="true"> |
|
|
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" |
|
|
|
|
|
: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-count-job-card :dataContent="item" @click='openJobDetail(item)'></com-count-job-card> |
|
|
<com-count-job-card :dataContent="item" @click='openJobDetail(item)'></com-count-job-card> |
|
|
</uni-swipe-action-item> |
|
|
</uni-swipe-action-item> |
|
@ -22,7 +19,7 @@ |
|
|
<uni-load-more :status="loadingType" /> |
|
|
<uni-load-more :status="loadingType" /> |
|
|
</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 title="库位" ref="scanPopup" @getResult='getScanResult' > |
|
|
<winScanPackJob title="库位" ref="scanPopup" @getResult='getScanResult'> |
|
|
</winScanPackJob> |
|
|
</winScanPackJob> |
|
|
<jobList ref="jobList" @selectItem="selectItem"></jobList> |
|
|
<jobList ref="jobList" @selectItem="selectItem"></jobList> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
@ -80,10 +77,15 @@ |
|
|
status: '1,2', //待处理 、进行中 |
|
|
status: '1,2', //待处理 、进行中 |
|
|
detailOptions: [], |
|
|
detailOptions: [], |
|
|
detailGiveupOptions: [], |
|
|
detailGiveupOptions: [], |
|
|
title:'' |
|
|
title: '', |
|
|
|
|
|
queryParams: { |
|
|
|
|
|
creationTime: "", |
|
|
|
|
|
status: "1,2", |
|
|
|
|
|
fromLocationCode: "" |
|
|
|
|
|
} |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad(option){ |
|
|
onLoad(option) { |
|
|
this.title = option.title |
|
|
this.title = option.title |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -142,44 +144,14 @@ |
|
|
this.jobList = []; |
|
|
this.jobList = []; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var filters = [] |
|
|
|
|
|
if (this.checkedToday) { |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "create_time", |
|
|
|
|
|
action: "betweeen", |
|
|
|
|
|
value: this.todayTime |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "status", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: this.status |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
var queryFiltersParams = this.setQueryParam() |
|
|
column: "countSplitType", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: "locationCode" |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "isOpenCount", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: "TRUE" |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "accept_user_id", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: this.$store.state.user.id |
|
|
|
|
|
}) |
|
|
|
|
|
var params = { |
|
|
var params = { |
|
|
filters: filters, |
|
|
filters: queryFiltersParams, |
|
|
pageNo: this.pageNo, |
|
|
pageNo: this.pageNo, |
|
|
pageSize: this.pageSize, |
|
|
pageSize: this.pageSize, |
|
|
sort:"number", |
|
|
sort: "number", |
|
|
by:"DESC" |
|
|
by: "DESC" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getCountJobList(params).then(res => { |
|
|
getCountJobList(params).then(res => { |
|
@ -190,7 +162,7 @@ |
|
|
|
|
|
|
|
|
var list = res.data.list; |
|
|
var list = res.data.list; |
|
|
this.totalCount = res.data.total |
|
|
this.totalCount = res.data.total |
|
|
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"; |
|
@ -215,19 +187,82 @@ |
|
|
// url: './countDetail?id=' + item.id + '&status=' + item.status |
|
|
// url: './countDetail?id=' + item.id + '&status=' + item.status |
|
|
// }); |
|
|
// }); |
|
|
//明盘 |
|
|
//明盘 |
|
|
if(item.isOpenCount=="TRUE"){ |
|
|
if (item.isOpenCount == "TRUE") { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: './countLightDetail?id=' + item.id + '&status=' + item.status+'&title='+this.title |
|
|
url: './countLightDetail?id=' + item.id + '&status=' + item.status + '&title=' + this.title |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
}else { |
|
|
} else { |
|
|
//盲盘 |
|
|
//盲盘 |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: './countBlindDetail?id=' + item.id + '&status=' + item.status+'&title='+this.title |
|
|
url: './countBlindDetail?id=' + item.id + '&status=' + item.status + '&title=' + this.title |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
setQueryParam() { |
|
|
|
|
|
var filterParams = [] |
|
|
|
|
|
|
|
|
|
|
|
//只看当天 |
|
|
|
|
|
if (this.queryParams.creationTime) { |
|
|
|
|
|
filterParams.push({ |
|
|
|
|
|
column: "create_time", |
|
|
|
|
|
action: "betweeen", |
|
|
|
|
|
value: this.queryParams.creationTime |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
//只看待处理 |
|
|
|
|
|
if (this.queryParams.status) { |
|
|
|
|
|
filterParams.push({ |
|
|
|
|
|
column: "status", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: this.queryParams.status |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
filterParams.push({ |
|
|
|
|
|
column: "status", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: "1,2" |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//来源库位 |
|
|
|
|
|
if (this.queryParams.fromLocationCode) { |
|
|
|
|
|
filterParams.push({ |
|
|
|
|
|
column: "countSplitCode", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: this.queryParams.fromLocationCode |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
filterParams.push({ |
|
|
|
|
|
column: "countSplitType", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: "locationCode" |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
filterParams.push({ |
|
|
|
|
|
column: "isOpenCount", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: "TRUE" |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
filterParams.push({ |
|
|
|
|
|
column: "accept_user_id", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: this.$store.state.user.id |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
return filterParams; |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
getListByFilter(params) { |
|
|
|
|
|
this.queryParams.creationTime = params.creationTime; |
|
|
|
|
|
this.queryParams.status = params.status; |
|
|
|
|
|
this.queryParams.fromLocationCode = params.fromLocationCode; |
|
|
|
|
|
this.getList('refresh') |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
showItemList(itemList) { |
|
|
showItemList(itemList) { |
|
|
this.$refs.jobListPopup.openPopup(itemList); |
|
|
this.$refs.jobListPopup.openPopup(itemList); |
|
@ -236,15 +271,15 @@ |
|
|
selectedItem(item) { |
|
|
selectedItem(item) { |
|
|
this.openJobDetail(item); |
|
|
this.openJobDetail(item); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
openScanPopup() { |
|
|
openScanPopup() { |
|
|
this.$refs.scanPopup.openScanPopup(); |
|
|
this.$refs.scanPopup.openScanPopup(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selectItem(item) { |
|
|
selectItem(item) { |
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
this.openJobDetail(item) |
|
|
this.openJobDetail(item) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
swipeClick(e, dataContent) { |
|
|
swipeClick(e, dataContent) { |
|
@ -266,12 +301,12 @@ |
|
|
|
|
|
|
|
|
cancleJob(id) { |
|
|
cancleJob(id) { |
|
|
cancleTakeCountJob(id).then(res => { |
|
|
cancleTakeCountJob(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 => { |
|
@ -279,77 +314,6 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
switchChangeToday(state, creationTime) { |
|
|
|
|
|
this.checkedToday = state; |
|
|
|
|
|
this.todayTime = creationTime; |
|
|
|
|
|
this.getList("refresh"); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
switchChangeWait(state, jobStatus) { |
|
|
|
|
|
this.checkedWaitTask = state; |
|
|
|
|
|
this.status = jobStatus; |
|
|
|
|
|
this.getList("refresh"); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getScanNumber(code) { |
|
|
|
|
|
this.getDataListByType(code) |
|
|
|
|
|
}, |
|
|
|
|
|
getDataListByType(code) { |
|
|
|
|
|
let that = this; |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中....", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}); |
|
|
|
|
|
var filters = [] |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "status", |
|
|
|
|
|
action: "in", |
|
|
|
|
|
value: '1,2' |
|
|
|
|
|
}) |
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "number", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: code |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "countSplitType", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: "locationCode" |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "isOpenCount", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: "TRUE" |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
|
|
column: "accept_user_id", |
|
|
|
|
|
action: "==", |
|
|
|
|
|
value: this.$store.state.user.id |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
var params = { |
|
|
|
|
|
filters: filters, |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
pageSize: 100, |
|
|
|
|
|
sort:"number", |
|
|
|
|
|
by:"DESC" |
|
|
|
|
|
} |
|
|
|
|
|
getCountJobList(params).then(res => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
if (res.data.list.length == 0) { |
|
|
|
|
|
that.showMessage('未查找到' + '【' + code + '】的收货任务'); |
|
|
|
|
|
} else if (res.data.list.length == 1) { |
|
|
|
|
|
that.openJobDetail(res.data.list[0]); |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
that.showMessage(error); |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showMessage(message) { |
|
|
showMessage(message) { |
|
|
this.$refs.comMessage.showErrorMessage(message, res => { |
|
|
this.$refs.comMessage.showErrorMessage(message, res => { |
|
|
if (res) { |
|
|
if (res) { |
|
@ -357,8 +321,8 @@ |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getScanResult(result){ |
|
|
getScanResult(result) { |
|
|
let that = this; |
|
|
let that = this; |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "加载中....", |
|
|
title: "加载中....", |
|
@ -370,57 +334,57 @@ |
|
|
action: "in", |
|
|
action: "in", |
|
|
value: '1,2' |
|
|
value: '1,2' |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
filters.push({ |
|
|
filters.push({ |
|
|
column: "countSplitType", |
|
|
column: "countSplitType", |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: "locationCode" |
|
|
value: "locationCode" |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
filters.push({ |
|
|
filters.push({ |
|
|
column: "isOpenCount", |
|
|
column: "isOpenCount", |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: "TRUE" |
|
|
value: "TRUE" |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
filters.push({ |
|
|
filters.push({ |
|
|
column: "countSplitCode", |
|
|
column: "countSplitCode", |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: result.label.code |
|
|
value: result.label.code |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
filters.push({ |
|
|
filters.push({ |
|
|
column: "accept_user_id", |
|
|
column: "accept_user_id", |
|
|
action: "==", |
|
|
action: "==", |
|
|
value: this.$store.state.user.id |
|
|
value: this.$store.state.user.id |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
var params = { |
|
|
var params = { |
|
|
filters: filters, |
|
|
filters: filters, |
|
|
pageNo: 1, |
|
|
pageNo: 1, |
|
|
pageSize: 1000, |
|
|
pageSize: 1000, |
|
|
sort:"number", |
|
|
sort: "number", |
|
|
by:"DESC" |
|
|
by: "DESC" |
|
|
} |
|
|
} |
|
|
getCountJobList(params).then(res => { |
|
|
getCountJobList(params).then(res => { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
let resultList = res.data.list; |
|
|
let resultList = res.data.list; |
|
|
resultList.forEach(item => { |
|
|
resultList.forEach(item => { |
|
|
item.title = item.number; |
|
|
item.title = item.number; |
|
|
item.selected = false |
|
|
item.selected = false |
|
|
}) |
|
|
}) |
|
|
let list = [] |
|
|
let list = [] |
|
|
resultList.forEach(item => { |
|
|
resultList.forEach(item => { |
|
|
if (!list.find(subItem => subItem.title == item.title)) { |
|
|
if (!list.find(subItem => subItem.title == item.title)) { |
|
|
list.push(item) |
|
|
list.push(item) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
if (list.length == 0) { |
|
|
if (list.length == 0) { |
|
|
that.showMessage('未查找到库位' + '【' + result.label.code + '】的盘点任务'); |
|
|
that.showMessage('未查找到库位' + '【' + result.label.code + '】的盘点任务'); |
|
|
} else if (list.length == 1) { |
|
|
} else if (list.length == 1) { |
|
|
that.selectItem(list[0]); |
|
|
that.selectItem(list[0]); |
|
|
}else { |
|
|
} else { |
|
|
that.$refs.jobList.openList(list) |
|
|
that.$refs.jobList.openList(list) |
|
|
} |
|
|
} |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
@ -434,4 +398,4 @@ |
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
|
|
|
|
|
|
</style> |
|
|
</style> |