diff --git a/src/views/collect/device/DevicesDealOrder.vue b/src/views/collect/device/DevicesDealOrder.vue index 49c7596f..1d91e26b 100644 --- a/src/views/collect/device/DevicesDealOrder.vue +++ b/src/views/collect/device/DevicesDealOrder.vue @@ -1799,8 +1799,8 @@ export default { //环境判断 if (window.navigator.userAgent.indexOf("GLXP_PC") != -1) { this.scanDisabled = true; - window.removeEventListener('djcl', this.handleRecCodesEvent); - window.addEventListener('djcl', this.handleRecCodesEvent); + window.removeEventListener('djclQx', this.handleRecCodesEvent); + window.addEventListener('djclQx', this.handleRecCodesEvent); } document.addEventListener('visibilitychange', this.handleVisibilityChange); // window.addEventListener('storage', (event) => { @@ -1825,7 +1825,7 @@ export default { beforeDestroy() { - window.removeEventListener('djcl', this.handleRecCodesEvent); + window.removeEventListener('djclQx', this.handleRecCodesEvent); document.removeEventListener('visibilitychange', this.handleVisibilityChange); this.ws.close(); diff --git a/src/views/collect/device/DevicesIoCreateOrder.vue b/src/views/collect/device/DevicesIoCreateOrder.vue index 0fee77a8..bf38e57f 100644 --- a/src/views/collect/device/DevicesIoCreateOrder.vue +++ b/src/views/collect/device/DevicesIoCreateOrder.vue @@ -2523,8 +2523,8 @@ export default { //环境判断 if (window.navigator.userAgent.indexOf('GLXP_PC') != -1) { this.scanDisabled = true - window.removeEventListener('gwsh', this.handleRecCodesEvent) - window.addEventListener('gwsh', this.handleRecCodesEvent) + window.removeEventListener('gwshQx', this.handleRecCodesEvent) + window.addEventListener('gwshQx', this.handleRecCodesEvent) } document.addEventListener('visibilitychange', this.handleVisibilityChange) this.handleVisibilityChange() @@ -2536,7 +2536,7 @@ export default { }); }, beforeDestroy() { - window.removeEventListener('gwsh', this.handleRecCodesEvent) + window.removeEventListener('gwshQx', this.handleRecCodesEvent) this.ws.close() this.ws.onclose = function (evt) { console.log('工位上货Connection closed.') diff --git a/src/winExtend.js b/src/winExtend.js index 2c2f2b9c..1d411fda 100644 --- a/src/winExtend.js +++ b/src/winExtend.js @@ -26,6 +26,24 @@ window.recCodes = function recCodes(codes) { recCodes: codes } })); + }else if(menuActive == 100){//工位上货器械 + window.dispatchEvent(new CustomEvent('gwshQx', { + detail: { + menuNumber:menuActive, + menuName:"工位上货器械", + tyepEvent:'gwsh', + recCodes: codes + } + })); + }else if(menuActive == 10000){//处理单据器械 + window.dispatchEvent(new CustomEvent('djclQx', { + detail: { + menuNumber:menuActive, + menuName:"处理单据", + tyepEvent:'djclQx', + recCodes: codes + } + })); }else{ }