diff --git a/src/views/collect/IoCreateOrder.vue b/src/views/collect/IoCreateOrder.vue index 8f8f461a..610fbc20 100644 --- a/src/views/collect/IoCreateOrder.vue +++ b/src/views/collect/IoCreateOrder.vue @@ -39,11 +39,11 @@ - 选入单据 - + + + + + diff --git a/src/views/collect/IoSplitFifoRemove.vue b/src/views/collect/IoSplitFifoRemove.vue index 80d428be..51d0af88 100644 --- a/src/views/collect/IoSplitFifoRemove.vue +++ b/src/views/collect/IoSplitFifoRemove.vue @@ -22,13 +22,15 @@ style="display: flex; margin-top: 5px; float: right" > 拍照解码 - 回退 - 放弃 @@ -305,7 +307,7 @@ export default { valiCodes: [], //weksolket sitcomScan: false, - sictomText: '', + sictomText: '' } }, methods: { @@ -563,6 +565,7 @@ export default { this.splitCodeQuery.relId = this.curQueue.relId this.getCodes() this.getSplitCodes() + this.selectSysParam() } else { this.init() this.$message.error(response.message) @@ -642,14 +645,37 @@ export default { }) }) }, - paizhao(){ + dropCode() { + this.redMeg = true + this.curQueueName = '', + this.isCheckQueue = false + this.curQueue = null + this.queueCodes = [] + this.splitCodes = [] + this.queueQuery = { + page: 1, + limit: 10, + relId: '', + action: '' + } + this.splitCodeQuery = { + page: 1, + limit: 10, + relId: '' + } + this.splitCodeTotal = 0 + this.queueCodeTotal = 0 + this.collectSet = null + + }, + paizhao() { if (this.ws && this.ws.readyState === WebSocket.OPEN) { // const data = JSON.stringify({ action: "subscribe", channel: "updates" }); // 发送的参数 - var sendData = "ManualClick=1" - this.ws.send(sendData); // 发送数据 - console.log("Data sent:", sendData); + var sendData = 'ManualClick=1' + this.ws.send(sendData) // 发送数据 + console.log('Data sent:', sendData) } else { - console.error("WebSocket is not connected."); + console.error('WebSocket is not connected.') } }, init() { @@ -676,17 +702,17 @@ export default { getSet().then((response) => { if (response.code == 20000) { this.collectSet = response.data - console.log("高拍仪设置" ,this.collectSet) + console.log('高拍仪设置', this.collectSet) } }) }, //处理事件 getDMHotskeyValue(str) { console.log(str) - if (str.includes("DMQ")) { + if (str.includes('DMQ')) { if (!isBlank(this.curQueueName)) { this.scanCode = '' - return this.$message.warning("当前已录入槽位") + return this.$message.warning('当前已录入槽位') } let query = { code: this.scanCode @@ -697,33 +723,33 @@ export default { } this.handleSlotCodeScan() return true - }else if (str.includes("DMOENTER")) { + } else if (str.includes('DMOENTER')) { return true - }else if (str.includes("DMOCANCEL")) { + } else if (str.includes('DMOCANCEL')) { return true - }else if (str.includes("DMODEL")) { + } else if (str.includes('DMODEL')) { return true } return false }, handleScanComplete(fullScanData) { if (!this.curQueue.code) { - if (fullScanData != null && fullScanData[0].includes("DMQ")) { + if (fullScanData != null && fullScanData[0].includes('DMQ')) { this.getDMHotskeyValue(fullScanData[0]) - return; + return } } else if (this.curQueue.code != null) { - if (fullScanData != null && fullScanData[0].includes("DMQ")) { - this.$message.warning('已绑定取货槽,请勿重复绑定!'); - return; + if (fullScanData != null && fullScanData[0].includes('DMQ')) { + this.$message.warning('已绑定取货槽,请勿重复绑定!') + return } } const verify = this.verifyScanCount(fullScanData) - if (verify){ - let params = { - codeList: fullScanData - } - this.batchVailCode(params) + if (verify) { + let params = { + codeList: fullScanData + } + this.batchVailCode(params) } }, handleRecCodesEvent(event) { @@ -744,10 +770,10 @@ export default { const SCAN_TIMEOUT = 1000 // 1秒间隔,表示扫码结束的判定标准 const self = this console.log('启用监听') - this.ws.onmessage = function (event) { + this.ws.onmessage = function(event) { let scanData = event.data // 获取扫码数据 let currentTime = Date.now() - console.log(scanData + "33333") + console.log(scanData + '33333') // 如果时间间隔超过预设的阈值,表示这是一次新的扫码 if (currentTime - lastScanTime > SCAN_TIMEOUT) { // 处理上一次完整的扫码数据 @@ -780,7 +806,7 @@ export default { if (this.ws == null || this.ws.readyState === WebSocket.CLOSED) { this.ws = new WebSocket('ws://127.0.0.1:9988') const self = this - this.ws.onopen = function (evt) { + this.ws.onopen = function(evt) { console.log('工位剔除WebSocket 连接中 ...') self.socketListener() } @@ -791,7 +817,7 @@ export default { console.log('关闭工位剔除websocket成功') } } - }, + } }, computed: { // 计算每个分组的合并信息 @@ -861,7 +887,7 @@ export default { }, created() { this.workplaceId = this.$route.query.workplaceId - this.selectSysParam() + // this.selectSysParam() }, beforeDestroy() { window.removeEventListener('gwsh', this.handleRecCodesEvent)