Browse Source

模拟扫描功能

hella_online_20240829
wangyufei 5 months ago
parent
commit
7d2eec95d2
  1. 14
      src/mycomponents/recommend/recommend.vue
  2. 4
      src/mycomponents/scan/winComScanFg.vue
  3. 7
      src/mycomponents/scan/winScanFgLabel.vue
  4. 6
      src/pages/productReceipt/job/fgProductReceiptDetail.vue

14
src/mycomponents/recommend/recommend.vue

@ -93,7 +93,19 @@
}, },
watch: { watch: {
//
detail: {
handler(newVal, oldVal) {
if(newVal.scaned){
newVal.copyContent = "HPQ;V1.0;I" + newVal.itemCode + ";P" + newVal.packingNumber + ";B" + newVal.batch + ";Q" + newVal.qty
}else{
newVal.copyContent = ''
}
console.log('newVal.copyContent',newVal.copyContent)
},
immediate: true,
deep: true
}
}, },
methods: { methods: {
copy() { copy() {

4
src/mycomponents/scan/winComScanFg.vue

@ -139,6 +139,10 @@
}, 1000); }, 1000);
// #endif // #endif
}, },
setItemCodeSimulate(itemCode,scanMsg) {
this.itemCode = itemCode;
this.scanMsg = scanMsg;
},
setItemCode(itemCode) { setItemCode(itemCode) {
this.itemCode = itemCode; this.itemCode = itemCode;
}, },

7
src/mycomponents/scan/winScanFgLabel.vue

@ -21,6 +21,8 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<!-- 模拟扫描功能 -->
<win-com-scan-fg v-show="false" ref="comscansimulate" @getResult="getScanResult" :isShowHistory="false" :clearResult="true"></win-com-scan-fg>
<comMessage ref="comMessage" @afterClose="getfocus"></comMessage> <comMessage ref="comMessage" @afterClose="getfocus"></comMessage>
</view> </view>
</template> </template>
@ -52,6 +54,11 @@
}, },
methods: { methods: {
//
simulateScan(item){
this.$refs.comscansimulate.setItemCodeSimulate(item.itemCode,item.copyContent)
this.$refs.comscansimulate.clickScanMsg();
},
openScanPopup(itemCode) { openScanPopup(itemCode) {
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')

6
src/pages/productReceipt/job/fgProductReceiptDetail.vue

@ -231,7 +231,11 @@
that.detailSource.forEach(r => { that.detailSource.forEach(r => {
r.subList.forEach(s => { r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) s.scaned = true .packingNumber) {
s.scaned = true
//
this.$refs.scanPopup.simulateScan(s);
}
}) })
}) })

Loading…
Cancel
Save