1/9 码校验优化

20240912_adapter
wangwei 6 months ago
parent cb55a2b6c4
commit 863e6ae8cf

@ -342,6 +342,7 @@ export default {
query.codeList = filterCodeList
this.replaceCode(query, 1)
}
this.scanCode = ""
} else {
this.verifyFinish(1, res.data, res.message)
this.checkCodeEndList.push(query.code)
@ -370,6 +371,7 @@ export default {
this.codeQuery.selectType = 1
this.getResultDetailList()
this.getInputFocus()
this.initData()
this.$message.success('添加成功')
} else {
this.$message.error('添加失败')
@ -378,10 +380,12 @@ export default {
})
} else {
if (Array.isArray(res.data)) {
this.scanCode = ''
this.getInputFocus()
} else {
this.scanCode = ''
this.getInputFocus()
this.printCodeError(res.message)
// this.verifyFinish(2, res.data, res.message)
this.$message.error(res.message)
}
@ -414,6 +418,7 @@ export default {
this.getResultDetailList()
this.getInputFocus()
this.$message.success('添加成功')
this.initData()
} else {
this.$message.error('添加失败')
}
@ -505,6 +510,11 @@ export default {
this.errVisible = true
}
},
async printCodeError(rsponses){
this.successVisible = false
this.errVisible = true
this.errResult = rsponses
},
parseString(str) {
// 1. "MA"
if (str.startsWith('MA')) {
@ -573,6 +583,11 @@ export default {
this.scanCode = ''
this.$refs.inputRef.focus()
this.$refs.inputRef.select()
this.successVisible = true
this.errVisible = false
this.errResult = ''
this.result = ''
this.scanResultType = 'success'
},
init() {
this.scanCode = ''
@ -588,6 +603,7 @@ export default {
this.errVisible = false
this.errResult = ''
this.result = '\n'
this.scanResultType = 'success'
this.orderQuery = {
page: 1,
limit: 10,

Loading…
Cancel
Save