2/21 优化1.1

20240912_adapter
wangwei 7 months ago
parent da9072ffcb
commit 7fbb42d160

@ -39,11 +39,11 @@
<!-- v-show="isLinkDisabled"--> <!-- v-show="isLinkDisabled"-->
<!--&gt;选入已完成单据--> <!--&gt;选入已完成单据-->
<!--</el-button>--> <!--</el-button>-->
<el-button size="mini" type="primary" @click.native="chooseDraftOrder()" :loading="submitLoading" <!--<el-button size="mini" type="primary" @click.native="chooseDraftOrder()" :loading="submitLoading"-->
style="margin-right: 8px;border-radius: 5%;" v-show="isLinkDisabled " <!-- style="margin-right: 8px;border-radius: 5%;" v-show="isLinkDisabled "-->
:disabled="splitType=='out' && redMesg" <!-- :disabled="splitType=='out' && redMesg"-->
>选入单据 <!--&gt;选入单据-->
</el-button> <!--</el-button>-->
<!--<el-button size="mini" type="primary" @click.native="delOrder()" :loading="submitLoading"--> <!--<el-button size="mini" type="primary" @click.native="delOrder()" :loading="submitLoading"-->
<!-- style="margin-right: 8px;border-radius: 5%;" v-show="isLinkDisabled"--> <!-- style="margin-right: 8px;border-radius: 5%;" v-show="isLinkDisabled"-->
<!-- :disabled="orderFormData.billNo == null && curQueueName == '' "--> <!-- :disabled="orderFormData.billNo == null && curQueueName == '' "-->

@ -22,13 +22,15 @@
style="display: flex; margin-top: 5px; float: right" style="display: flex; margin-top: 5px; float: right"
> >
<el-button size="mini" type="primary" @click.native="paizhao()" <el-button size="mini" type="primary" @click.native="paizhao()"
v-if="collectSet.autoDecode == 0" style="margin-right: 8px;border-radius: 5%;" v-if="collectSet != null && collectSet.autoDecode == 0" style="margin-right: 8px;border-radius: 5%;"
>拍照解码 >拍照解码
</el-button> </el-button>
<el-button size="mini" type="primary" @click.native="fallbackCode()" :disabled="redMeg" style="margin-right: 8px;border-radius: 5%;" <el-button size="mini" type="primary" @click.native="fallbackCode()" :disabled="redMeg"
style="margin-right: 8px;border-radius: 5%;"
>回退 >回退
</el-button> </el-button>
<el-button size="mini" type="primary" :disabled="redMeg" style="margin-right: 8px;border-radius: 5%;" <el-button size="mini" type="primary" @click.native="dropCode()" :disabled="redMeg"
style="margin-right: 8px;border-radius: 5%;"
>放弃 >放弃
</el-button> </el-button>
@ -305,7 +307,7 @@ export default {
valiCodes: [], valiCodes: [],
//weksolket //weksolket
sitcomScan: false, sitcomScan: false,
sictomText: '', sictomText: ''
} }
}, },
methods: { methods: {
@ -563,6 +565,7 @@ export default {
this.splitCodeQuery.relId = this.curQueue.relId this.splitCodeQuery.relId = this.curQueue.relId
this.getCodes() this.getCodes()
this.getSplitCodes() this.getSplitCodes()
this.selectSysParam()
} else { } else {
this.init() this.init()
this.$message.error(response.message) this.$message.error(response.message)
@ -642,14 +645,37 @@ export default {
}) })
}) })
}, },
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() { paizhao() {
if (this.ws && this.ws.readyState === WebSocket.OPEN) { if (this.ws && this.ws.readyState === WebSocket.OPEN) {
// const data = JSON.stringify({ action: "subscribe", channel: "updates" }); // // const data = JSON.stringify({ action: "subscribe", channel: "updates" }); //
var sendData = "ManualClick=1" var sendData = 'ManualClick=1'
this.ws.send(sendData); // this.ws.send(sendData) //
console.log("Data sent:", sendData); console.log('Data sent:', sendData)
} else { } else {
console.error("WebSocket is not connected."); console.error('WebSocket is not connected.')
} }
}, },
init() { init() {
@ -676,17 +702,17 @@ export default {
getSet().then((response) => { getSet().then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.collectSet = response.data this.collectSet = response.data
console.log("高拍仪设置" ,this.collectSet) console.log('高拍仪设置', this.collectSet)
} }
}) })
}, },
// //
getDMHotskeyValue(str) { getDMHotskeyValue(str) {
console.log(str) console.log(str)
if (str.includes("DMQ")) { if (str.includes('DMQ')) {
if (!isBlank(this.curQueueName)) { if (!isBlank(this.curQueueName)) {
this.scanCode = '' this.scanCode = ''
return this.$message.warning("当前已录入槽位") return this.$message.warning('当前已录入槽位')
} }
let query = { let query = {
code: this.scanCode code: this.scanCode
@ -697,25 +723,25 @@ export default {
} }
this.handleSlotCodeScan() this.handleSlotCodeScan()
return true return true
}else if (str.includes("DMOENTER")) { } else if (str.includes('DMOENTER')) {
return true return true
}else if (str.includes("DMOCANCEL")) { } else if (str.includes('DMOCANCEL')) {
return true return true
}else if (str.includes("DMODEL")) { } else if (str.includes('DMODEL')) {
return true return true
} }
return false return false
}, },
handleScanComplete(fullScanData) { handleScanComplete(fullScanData) {
if (!this.curQueue.code) { if (!this.curQueue.code) {
if (fullScanData != null && fullScanData[0].includes("DMQ")) { if (fullScanData != null && fullScanData[0].includes('DMQ')) {
this.getDMHotskeyValue(fullScanData[0]) this.getDMHotskeyValue(fullScanData[0])
return; return
} }
} else if (this.curQueue.code != null) { } else if (this.curQueue.code != null) {
if (fullScanData != null && fullScanData[0].includes("DMQ")) { if (fullScanData != null && fullScanData[0].includes('DMQ')) {
this.$message.warning('已绑定取货槽,请勿重复绑定!'); this.$message.warning('已绑定取货槽,请勿重复绑定!')
return; return
} }
} }
const verify = this.verifyScanCount(fullScanData) const verify = this.verifyScanCount(fullScanData)
@ -747,7 +773,7 @@ export default {
this.ws.onmessage = function(event) { this.ws.onmessage = function(event) {
let scanData = event.data // let scanData = event.data //
let currentTime = Date.now() let currentTime = Date.now()
console.log(scanData + "33333") console.log(scanData + '33333')
// //
if (currentTime - lastScanTime > SCAN_TIMEOUT) { if (currentTime - lastScanTime > SCAN_TIMEOUT) {
// //
@ -791,7 +817,7 @@ export default {
console.log('关闭工位剔除websocket成功') console.log('关闭工位剔除websocket成功')
} }
} }
}, }
}, },
computed: { computed: {
// //
@ -861,7 +887,7 @@ export default {
}, },
created() { created() {
this.workplaceId = this.$route.query.workplaceId this.workplaceId = this.$route.query.workplaceId
this.selectSysParam() // this.selectSysParam()
}, },
beforeDestroy() { beforeDestroy() {
window.removeEventListener('gwsh', this.handleRecCodesEvent) window.removeEventListener('gwsh', this.handleRecCodesEvent)

Loading…
Cancel
Save