diff --git a/src/assets/audioFiles/colser.mp3 b/src/assets/audioFiles/colser.mp3 new file mode 100644 index 00000000..7ef2daf7 Binary files /dev/null and b/src/assets/audioFiles/colser.mp3 differ diff --git a/src/assets/audioFiles/order.mp3 b/src/assets/audioFiles/order.mp3 new file mode 100644 index 00000000..90731a4f Binary files /dev/null and b/src/assets/audioFiles/order.mp3 differ diff --git a/src/views/collect/DealOrder.vue b/src/views/collect/DealOrder.vue index 39b1fa73..41f416c9 100644 --- a/src/views/collect/DealOrder.vue +++ b/src/views/collect/DealOrder.vue @@ -3,74 +3,7 @@ - - - - - - - - - - - 扫码剔除 - - 结束剔除 - - - - - - - - 选单 - - 挂起 - - 放弃 - - 完成 - - - - - - - - - - - - - - - - - - @@ -164,9 +97,10 @@ -
+ +
- + - - - - - - ALT+29 - - 清空 - + + + + 扫码剔除 + + 结束剔除 + + 选单 + + 挂起 + + 放弃 + + 完成 + @@ -238,7 +188,7 @@
- + @@ -251,10 +201,7 @@ {{ formData.billNo }} {{ formData.shipperName }} {{ formData.fromCorpName }} - {{ formData.busTypeName }} - {{ formData.fromType }} {{ formData.billTime }} - {{ formData.remark }} @@ -596,7 +543,6 @@ export default { if (res.code == 20000) { if (res.data.billNo != null) { this.formData = res.data - this.generateBarcode() this.scanCode = ""; this.formData.workPlaceCode = this.workplaceId this.checked = false @@ -1144,6 +1090,8 @@ export default { cancelOrder(this.formData).then(res => { this.loading = false if (res.code == 20000) { + const audio = new Audio(require('@/assets/audioFiles/colser.mp3')); + audio.play(); this.overdeleteCode() this.reset() } @@ -1169,6 +1117,8 @@ export default { finishOrder(this.formData).then(res => { this.loading = false if (res.code == 20000) { + const audio = new Audio(require('@/assets/audioFiles/order.mp3')); + audio.play(); this.reset() if (this.formDataVisible.scanType != 1) this.findCurOrder() @@ -1796,9 +1746,33 @@ export default { } }) }, + + addKeyboardShortcut() { + window.addEventListener('key', this.handleKeyboardShortcut); + }, + removeKeyboardShortcut() { + window.removeEventListener('key', this.handleKeyboardShortcut); + }, + handleKeydown(event){ + if (event.key === 'F9' || event.keyCode === 120) { + event.preventDefault(); // 阻止默认行为 + this.finishOrder() + } + }, + handleKeyboardShortcut(event) { + if (event.key === 'F9' || event.keyCode === 120) { // keyCode 120 是 F9 的键码 + event.preventDefault(); // 阻止默认行为 + this.finishOrder() + } + if (event.key === 'F10' || event.keyCode === 121) { + event.preventDefault(); // 阻止默认行为(如果有的话) + // this.push(); + } + } }, mounted() { this.$refs.inputRef.focus(); + document.addEventListener('keydown', this.handleKeydown); //环境判断 if (window.navigator.userAgent.indexOf("GLXP_PC") != -1) { this.scanDisabled = true; @@ -1828,6 +1802,7 @@ export default { beforeDestroy() { + document.removeEventListener('keydown', this.handleKeydown); window.removeEventListener('djcl', this.handleRecCodesEvent); document.removeEventListener('visibilitychange', this.handleVisibilityChange); @@ -1835,6 +1810,7 @@ export default { this.ws.onclose = function (evt) { console.log("处理单据 Connection closed."); }; + }, created() { getHead("prescribeTagCodeDeal", "1").then((re) => { diff --git a/src/views/collect/IoCreateOrder.vue b/src/views/collect/IoCreateOrder.vue index c439284a..ba7a4632 100644 --- a/src/views/collect/IoCreateOrder.vue +++ b/src/views/collect/IoCreateOrder.vue @@ -149,7 +149,6 @@ type="tel" placeholder="请点击输入框进行扫码设置或者扫码录入" v-model="scanCode" - > @@ -1861,11 +1860,11 @@ export default { this.checkSuccess = true // this.workPlaceQueueCode = this.scanCode if (this.getDMHotskeyValue(this.scanCode)) { - if (this.scanCode.includes("DMOENTER")) { - this.submit() + if (this.scanCode.includes("18238132561")) { + this.submit() this.scanCode = '' return - }else if (this.scanCode.includes("DMOCANCEL")) { + }else if (this.scanCode.includes("13598092803")) { this.delOrder() this.scanCode = '' return @@ -2042,6 +2041,22 @@ export default { getInputFocus(event) { event.currentTarget.select() }, + handleInput(value){ + if (value.includes("DMOENTER")) { + // alert("住主张组或者") + this.submit() + this.scanCode = '' + return + }else if (value.includes("DMOCANCEL")) { + this.delOrder() + this.scanCode = '' + return + }else if (value.includes("DMODEL")) { + this.deleteCode() + this.scanCode = '' + return + } + }, tableSelection() { this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.toggleAllSelection() @@ -2155,9 +2170,9 @@ export default { }) return true - }else if (str.includes("DMOENTER")) { + }else if (this.scanCode.includes("18238132561") ) { return true - }else if (str.includes("DMOCANCEL")) { + }else if( this.scanCode.includes("13598092803")) { return true }else if (str.includes("DMODEL")) { return true diff --git a/src/views/collect/PannelOrderBiz.vue b/src/views/collect/PannelOrderBiz.vue index 75f90572..51344f21 100644 --- a/src/views/collect/PannelOrderBiz.vue +++ b/src/views/collect/PannelOrderBiz.vue @@ -116,28 +116,29 @@ - - - - - - - - + - + + + + + + + + + + + + +