Browse Source

采购收货任务--扫描ASN

hella_online_20240829
wangyufei 5 months ago
parent
commit
60c07403e4
  1. 8
      src/mycomponents/jobList/jobList.vue
  2. 25
      src/pages/purchaseReceipt/job/receiptJob.vue

8
src/mycomponents/jobList/jobList.vue

@ -26,6 +26,7 @@ import { onShow } from '@dcloudio/uni-app';
},
data() {
return {
isScanedASN:false,
list: []
// [{
// title:'',
@ -36,13 +37,14 @@ import { onShow } from '@dcloudio/uni-app';
props: {
},
methods:{
openList(list){
this.list = list
openList(list,isScanedASN=false){
this.list = list;
this.isScanedASN = isScanedASN;
this.$refs.listPopup.open('center')
},
selectItem(item,index){
this.$refs.listPopup.close();
this.$emit("selectItem", item);
this.$emit("selectItem", item,this.isScanedASN);
}
}
}

25
src/pages/purchaseReceipt/job/receiptJob.vue

@ -20,7 +20,7 @@
<receipt-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></receipt-job-list-popup>
</view>
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button>
<winScanPackJob title="箱标签" ref="scanPopup" @getResult='getScanResult' >
<winScanPackJob title="箱标签/ASN单号" ref="scanPopup" @getResult='getScanResult' >
</winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage>
@ -344,16 +344,19 @@
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item, item.packingNumber);
selectItem(item,isScanedASN=false) {
this.$refs.scanPopup.closeScanPopup();
if(isScanedASN){
this.openJobDetail(item)
}else{
;
this.openJobDetail(item, item.packingNumber);
}
},
getScanResult(result) {
if(result.scanMessage.indexOf('ASN')>-1){
this.showMessage('请扫描箱标签')
return
}
try {
let filters = []
@ -419,9 +422,9 @@
console.log('list', list)
if (list.length > 1) {
this.$refs.jobList.openList(list)
this.$refs.jobList.openList(list,result.scanMessage.indexOf('ASN')>-1)
} else {
this.selectItem(list[0])
this.selectItem(list[0],result.scanMessage.indexOf('ASN')>-1)
}
} else {
this.showMessage('未查找到任务')

Loading…
Cancel
Save