diff --git a/src/views/modules/boxManage/saleBoxManage.vue b/src/views/modules/boxManage/saleBoxManage.vue
index 1a1aa4d..a9a1ec9 100644
--- a/src/views/modules/boxManage/saleBoxManage.vue
+++ b/src/views/modules/boxManage/saleBoxManage.vue
@@ -19,7 +19,6 @@
-
@@ -234,9 +233,6 @@
-
-
-
@@ -319,6 +315,7 @@
+ 打印
应用
保存
关闭
@@ -826,9 +823,9 @@ export default {
}
this.caseDialogVisible = true
this.resetCaseForm()
- // 对话框打开后自动聚焦到盒标签输入框
+ // 对话框打开后自动聚焦到卷标签输入框
this.$nextTick(() => {
- this.$refs.caseNoInput.focus()
+ this.$refs.rollNoInput.focus()
})
},
@@ -845,26 +842,16 @@ export default {
this.updateCaseStatistics()
},
- focusRollNoInput(){
- if(!this.caseForm.casesNo){
- this.$message.warning('请先扫描盒标签')
- return
- }
- this.$refs.rollNoInput.focus()
- },
-
async scanCaseRoll(){
// 校验必填项
- if(!this.caseForm.casesNo){
- this.$message.warning('请先扫描盒标签')
- this.$refs.caseNoInput.focus()
- return
- }
if(!this.caseForm.rollNo){
this.$message.warning('请扫描卷标签')
return
}
+ // 将卷标签值赋给盒标签(casesNo = rollNo)
+ this.caseForm.casesNo = this.caseForm.rollNo
+
// 从当前行获取物料编码
let partNo = this.currentRow.partNo || ''
this.caseForm.partNo = partNo
@@ -900,13 +887,13 @@ export default {
// 更新统计信息
this.updateCaseStatistics()
- // 重置两个输入框,准备下一次扫描
+ // 重置输入框,准备下一次扫描
this.caseForm.casesNo = ''
this.caseForm.rollNo = ''
- // 光标回到盒标签输入框,继续按照规定顺序扫描
+ // 光标回到卷标签输入框,继续扫描
this.$nextTick(() => {
- this.$refs.caseNoInput.focus()
+ this.$refs.rollNoInput.focus()
})
this.$message.success(`扫描成功,添加了 ${rollList.length} 条记录`)