|
|
@ -21,6 +21,8 @@ |
|
|
|
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> |
|
|
|
|
|
|
|
</view> |
|
|
|
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button> |
|
|
|
<winScanPackJob ref="scanPopup" @getResult='getScanResult' ></winScanPackJob> |
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -48,7 +50,9 @@ |
|
|
|
import comRepleinshJobCard from '@/pages/repleinsh/coms/comRepleinshJobCard.vue' |
|
|
|
import repleinshJobListPopup from '@/pages/repleinsh/coms/repleinshJobListPopup.vue' |
|
|
|
import repleinshInfoPopup from '@/pages/repleinsh/coms/repleinshInfoPopup.vue' |
|
|
|
|
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
|
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue" |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'repleinsh', |
|
|
|
components: { |
|
|
@ -57,6 +61,8 @@ |
|
|
|
comRepleinshJobCard, |
|
|
|
repleinshJobListPopup, |
|
|
|
repleinshInfoPopup, |
|
|
|
winScanPackJob, |
|
|
|
winScanButton, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -195,9 +201,10 @@ |
|
|
|
this.getList('refresh', fromLocationCode, '') |
|
|
|
}, |
|
|
|
|
|
|
|
openJobDetail(item) { |
|
|
|
openJobDetail(item,scanMessage = '') { |
|
|
|
uni.navigateTo({ |
|
|
|
url: './repleinshDetail?id=' + item.masterId + '&status=' + item.status |
|
|
|
url: './repleinshDetail?id=' + item.masterId + '&status=' + item.status+'&scanMessage=' + |
|
|
|
scanMessage |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
@ -300,6 +307,74 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
openScanPopup() { |
|
|
|
this.$refs.scanPopup.openScanPopup(); |
|
|
|
}, |
|
|
|
selectItem(item) { |
|
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
|
this.openJobDetail(item,this.scanMessage); |
|
|
|
}, |
|
|
|
getScanResult(result) { |
|
|
|
if(!result.label.batch){ |
|
|
|
this.showMessage("批次为空") |
|
|
|
return; |
|
|
|
} |
|
|
|
if(!result.label.itemCode){ |
|
|
|
this.showMessage("物料号为空") |
|
|
|
return; |
|
|
|
} |
|
|
|
try { |
|
|
|
var filters = [ |
|
|
|
{ |
|
|
|
column: "status", |
|
|
|
action: "in", |
|
|
|
value: '1,2' |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: "batch", |
|
|
|
action: "==", |
|
|
|
value: result.label.batch |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: "itemCode", |
|
|
|
action: "==", |
|
|
|
value: result.label.itemCode |
|
|
|
} |
|
|
|
] |
|
|
|
getRepleinshJobList({ |
|
|
|
filters: filters, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 1000, |
|
|
|
sort: 'createTime', |
|
|
|
by: 'asc' |
|
|
|
}).then(res => { |
|
|
|
this.scanMessage =result.scanMessage |
|
|
|
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 >0){ |
|
|
|
this.selectItem(list[0]) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.showMessage("物料号["+result.label.itemCode+"]批次["+result.label.batch+']未查找到任务') |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error) |
|
|
|
}) |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
this.showMessage(e.message) |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|