Commit ae144102 by wusiyi

fix: 盘点扫码数据处理和校验

parent bc7ee194
......@@ -2046,6 +2046,14 @@ const scan = async () => {
if (!scanInput.value) {
return ElMessage.warning('请输入备货单号')
}
// 将中文破折号转换为下划线
scanInput.value = scanInput.value.replace(/——/g, '_')
console.log(scanInput.value)
const formatRegex = /^BHD\d{9}_\d+$/
if (!formatRegex.test(scanInput.value)) {
return ElMessage.warning('请输入正确箱码')
}
const loading = ElLoading.service({
lock: true,
text: '加载中...',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment