|
|
@ -21,6 +21,9 @@ |
|
|
|
|
|
|
|
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> |
|
|
|
</view> |
|
|
|
<win-scan-button @goScan='openScanPopup' v-if="false"></win-scan-button> |
|
|
|
<winScanPackJob ref="scanPopup" @getResult='getScanResult' ></winScanPackJob> |
|
|
|
<jobList ref="jobList" @selectItem="selectItem"></jobList> |
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -45,6 +48,9 @@ |
|
|
|
import comIssueJobCard from '@/pages/issue/coms/comIssueJobCard.vue' |
|
|
|
import jobListPopup from '@/pages/issue/coms/jobListPopup.vue' |
|
|
|
import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue' |
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
|
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue" |
|
|
|
import jobList from '@/mycomponents/jobList/jobList.vue' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'issue', |
|
|
@ -53,7 +59,10 @@ |
|
|
|
jobFilter, |
|
|
|
comIssueJobCard, |
|
|
|
jobListPopup, |
|
|
|
jobInfoPopup |
|
|
|
jobInfoPopup, |
|
|
|
winScanPackJob, |
|
|
|
winScanButton, |
|
|
|
jobList |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -223,9 +232,10 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
openJobDetail(item) { |
|
|
|
openJobDetail(item, packingNumber = '') { |
|
|
|
uni.navigateTo({ |
|
|
|
url: './issueDetail?id=' + item.masterId + '&status=' + item.status |
|
|
|
url: './issueDetail?id=' + item.masterId + '&status=' + item.status+'&scaned=' + |
|
|
|
packingNumber |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
@ -236,6 +246,11 @@ |
|
|
|
selectedItem(item) { |
|
|
|
this.openJobDetail(item); |
|
|
|
}, |
|
|
|
|
|
|
|
selectItem(item) { |
|
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
|
this.openJobDetail(item,item.packingNumber); |
|
|
|
}, |
|
|
|
|
|
|
|
swipeClick(e, dataContent) { |
|
|
|
if (e.content.text == "详情") { |
|
|
@ -306,8 +321,6 @@ |
|
|
|
filters: filters, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 100, |
|
|
|
sort: 'fromLocationCode', |
|
|
|
by: 'asc' |
|
|
|
} |
|
|
|
getIssueJobList(params).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
@ -329,6 +342,63 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
openScanPopup() { |
|
|
|
this.$refs.scanPopup.openScanPopup(); |
|
|
|
}, |
|
|
|
getScanResult(result) { |
|
|
|
try { |
|
|
|
var filters = [ |
|
|
|
{ |
|
|
|
column: "status", |
|
|
|
action: "in", |
|
|
|
value: '1,2' |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: "batch", |
|
|
|
action: "==", |
|
|
|
value: result.label.batch |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: "itemCode", |
|
|
|
action: "==", |
|
|
|
value: result.label.itemCode |
|
|
|
} |
|
|
|
] |
|
|
|
getIssueJobList({ |
|
|
|
filters: filters, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 100, |
|
|
|
sort: 'createTime', |
|
|
|
by: 'asc' |
|
|
|
}).then(res => { |
|
|
|
let resultList = res.data.list; |
|
|
|
if (resultList.length > 0) { |
|
|
|
resultList.forEach(item => { |
|
|
|
item.title = item.number; |
|
|
|
item.selected = false |
|
|
|
}) |
|
|
|
let list = [] |
|
|
|
resultList.forEach(item=>{ |
|
|
|
if(!list.find(subItem=>subItem.title==item.title)){ |
|
|
|
list.push(item) |
|
|
|
} |
|
|
|
}) |
|
|
|
if (list.length > 1) { |
|
|
|
this.$refs.jobList.openList(list) |
|
|
|
} else { |
|
|
|
this.selectItem(list[0]) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.showMessage('未查找到任务') |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
this.showMessage(e.message) |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|