From 7e963f1dfcb1430a2e12feb807fd85c704848771 Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Thu, 27 Feb 2025 15:25:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BC=98=E5=8C=96=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E7=9B=91=E5=90=AC=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/collect/device/DevicesDealOrder.vue | 6 +++--- .../collect/device/DevicesIoCreateOrder.vue | 6 +++--- src/winExtend.js | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 6 deletions(-) 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{ }