|
|
@ -1860,14 +1860,6 @@ export default {
|
|
|
|
this.$refs.multipleTable.clearSelection()
|
|
|
|
this.$refs.multipleTable.clearSelection()
|
|
|
|
this.$refs.multipleTable.toggleAllSelection()
|
|
|
|
this.$refs.multipleTable.toggleAllSelection()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleSizeChange(val) {
|
|
|
|
|
|
|
|
this.query.limit = val
|
|
|
|
|
|
|
|
this.getCodeList()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
|
|
|
|
this.query.page = val
|
|
|
|
|
|
|
|
this.getCodeList()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
intentBack() {
|
|
|
|
intentBack() {
|
|
|
|
this.$router.go(-1)
|
|
|
|
this.$router.go(-1)
|
|
|
@ -2178,10 +2170,19 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleScanComplete(fullScanData) {
|
|
|
|
handleScanComplete(fullScanData) {
|
|
|
|
console.log('接收 recCodes event:', fullScanData.join(';'))
|
|
|
|
console.log('接收 recCodes event:', fullScanData.join(';'))
|
|
|
|
|
|
|
|
if (this.scanStatus == 1) {
|
|
|
|
|
|
|
|
let query = {
|
|
|
|
|
|
|
|
orderId: this.orderFormData.billNo,
|
|
|
|
|
|
|
|
codeList: fullScanData
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//剔除码
|
|
|
|
|
|
|
|
this.removeCodesTemp(query)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
let params = {
|
|
|
|
let params = {
|
|
|
|
codeList: fullScanData
|
|
|
|
codeList: fullScanData
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.batchVailCode(params)
|
|
|
|
this.batchVailCode(params)
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
socketListener() {
|
|
|
|
socketListener() {
|
|
|
@ -2231,7 +2232,6 @@ export default {
|
|
|
|
console.log('工位上货WebSocket 连接中 ...')
|
|
|
|
console.log('工位上货WebSocket 连接中 ...')
|
|
|
|
self.socketListener()
|
|
|
|
self.socketListener()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
|
|
|
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
|
|
@ -2278,22 +2278,8 @@ export default {
|
|
|
|
window.addEventListener('gwsh', this.handleRecCodesEvent)
|
|
|
|
window.addEventListener('gwsh', this.handleRecCodesEvent)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
document.addEventListener('visibilitychange', this.handleVisibilityChange)
|
|
|
|
document.addEventListener('visibilitychange', this.handleVisibilityChange)
|
|
|
|
// window.addEventListener('storage', (event) => {
|
|
|
|
this.handleVisibilityChange()
|
|
|
|
// console.log("关闭上货单据websocket")
|
|
|
|
|
|
|
|
// if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
|
|
|
|
|
|
|
// this.ws.close();
|
|
|
|
|
|
|
|
// console.log("关闭上货单据websocket成功")
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// if (!this.ws) {
|
|
|
|
|
|
|
|
// this.ws = new WebSocket("ws://127.0.0.1:9988");
|
|
|
|
|
|
|
|
// this.ws.onopen = function (evt) {
|
|
|
|
|
|
|
|
// console.log("处理单据WebSocket 连接中 ...");
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
// this.socketListener()
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// window.dispatchEvent(new CustomEvent('storage', null));
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
beforeDestroy() {
|
|
|
|
beforeDestroy() {
|
|
|
|
window.removeEventListener('gwsh', this.handleRecCodesEvent)
|
|
|
|
window.removeEventListener('gwsh', this.handleRecCodesEvent)
|
|
|
|