|
@@ -23,6 +23,8 @@
|
|
v-model.trim="modalForm.packageCodeStart"
|
|
v-model.trim="modalForm.packageCodeStart"
|
|
placeholder="请扫描考场起始条码"
|
|
placeholder="请扫描考场起始条码"
|
|
clearable
|
|
clearable
|
|
|
|
+ ref="CodeStartRef"
|
|
|
|
+ @input="codeStartInputHandle"
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="考场结束条码:" prop="packageCodeEnd">
|
|
<el-form-item label="考场结束条码:" prop="packageCodeEnd">
|
|
@@ -30,6 +32,7 @@
|
|
v-model.trim="modalForm.packageCodeEnd"
|
|
v-model.trim="modalForm.packageCodeEnd"
|
|
placeholder="请扫描考场结束条码"
|
|
placeholder="请扫描考场结束条码"
|
|
clearable
|
|
clearable
|
|
|
|
+ ref="CodeEndRef"
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -107,13 +110,22 @@ export default {
|
|
this.modalIsShow = false;
|
|
this.modalIsShow = false;
|
|
this.$refs.modalFormComp.resetFields();
|
|
this.$refs.modalFormComp.resetFields();
|
|
},
|
|
},
|
|
|
|
+ codeStartInputHandle() {
|
|
|
|
+ console.log("start");
|
|
|
|
+ if (this.modalForm.packageCodeStart.endsWith("\n")) {
|
|
|
|
+ this.$refs.CodeEndRef.select();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
async confirm() {
|
|
async confirm() {
|
|
const valid = await this.$refs.modalFormComp.validate().catch(() => {});
|
|
const valid = await this.$refs.modalFormComp.validate().catch(() => {});
|
|
if (!valid) return;
|
|
if (!valid) return;
|
|
|
|
|
|
if (this.isSubmit) return;
|
|
if (this.isSubmit) return;
|
|
this.isSubmit = true;
|
|
this.isSubmit = true;
|
|
- const res = await updateBarCodeCheck(this.modalForm).catch(() => {});
|
|
|
|
|
|
+ const res = await updateBarCodeCheck(this.modalForm).catch(() => {
|
|
|
|
+ this.$refs.CodeStartRef.select();
|
|
|
|
+ this.modalForm.packageCodeEnd = "";
|
|
|
|
+ });
|
|
this.isSubmit = false;
|
|
this.isSubmit = false;
|
|
if (!res) return;
|
|
if (!res) return;
|
|
|
|
|