|
@ -21,6 +21,8 @@ |
|
|
<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> |
|
|
|
|
|
<winScanPackJob ref="scanPopup" @getResult='getScanResult' ></winScanPackJob> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
@ -48,6 +50,8 @@ |
|
|
import comRepleinshJobCard from '@/pages/repleinsh/coms/comRepleinshJobCard.vue' |
|
|
import comRepleinshJobCard from '@/pages/repleinsh/coms/comRepleinshJobCard.vue' |
|
|
import repleinshJobListPopup from '@/pages/repleinsh/coms/repleinshJobListPopup.vue' |
|
|
import repleinshJobListPopup from '@/pages/repleinsh/coms/repleinshJobListPopup.vue' |
|
|
import repleinshInfoPopup from '@/pages/repleinsh/coms/repleinshInfoPopup.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 { |
|
|
export default { |
|
|
name: 'repleinsh', |
|
|
name: 'repleinsh', |
|
@ -57,6 +61,8 @@ |
|
|
comRepleinshJobCard, |
|
|
comRepleinshJobCard, |
|
|
repleinshJobListPopup, |
|
|
repleinshJobListPopup, |
|
|
repleinshInfoPopup, |
|
|
repleinshInfoPopup, |
|
|
|
|
|
winScanPackJob, |
|
|
|
|
|
winScanButton, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -195,9 +201,10 @@ |
|
|
this.getList('refresh', fromLocationCode, '') |
|
|
this.getList('refresh', fromLocationCode, '') |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
openJobDetail(item) { |
|
|
openJobDetail(item,scanMessage = '') { |
|
|
uni.navigateTo({ |
|
|
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> |
|
|
</script> |
|
|