|
|
|
@ -19,7 +19,6 @@ |
|
|
|
<el-form-item :label="'单据状态'"> |
|
|
|
<el-select multiple collapse-tags v-model="searchData.orderStatusList" clearable style="width: 160px"> |
|
|
|
<el-option label="待包装" value="待包装"></el-option> |
|
|
|
<el-option label="待出库" value="待出库"></el-option> |
|
|
|
<el-option label="已出库" value="已出库"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
@ -234,9 +233,6 @@ |
|
|
|
<!-- 盒清单新增对话框 --> |
|
|
|
<el-dialog title="装盒扫描" :visible.sync="caseDialogVisible" width="70%" :close-on-click-modal="false" @close="closeCaseDialog"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="盒标签"> |
|
|
|
<el-input ref="caseNoInput" v-model="caseForm.casesNo" @keyup.enter.native="focusRollNoInput" placeholder="请扫描盒标签" style="width: 200px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="卷标签"> |
|
|
|
<el-input ref="rollNoInput" v-model="caseForm.rollNo" @keyup.enter.native="scanCaseRoll" placeholder="请扫描卷标签" style="width: 200px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -319,6 +315,7 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-footer style="height:35px;margin-top: 15px;text-align:center"> |
|
|
|
<el-button type="primary" @click="">打印</el-button> |
|
|
|
<el-button type="primary" @click="applyCaseScan">应用</el-button> |
|
|
|
<el-button type="success" @click="saveCaseScan">保存</el-button> |
|
|
|
<el-button @click="closeCaseDialog">关闭</el-button> |
|
|
|
@ -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} 条记录`) |
|
|
|
|