啊鑫
7 天以前 a653457ef9e7d0760c9a49179794d590846b6934
pages/QC/LLJ/detail.vue
@@ -141,6 +141,7 @@
                        备注
                     </button>
                     <input v-if="(tableData.length < formData.checkQyt) && formData.fupAllow && formData.fdownAllow"
                        ref="numberInput"
                        @input="onNumberInput"
                        @confirm="onEnterSave"
                        v-model="formData.fcheckResu"
@@ -149,6 +150,7 @@
                        placeholder="请输入检验结果..."
                        placeholder-class="placeholder" />
                     <input v-else
                        ref="textInput"
                        @input="search($event)"
                        @confirm="onEnterSave"
                        v-model="inputTxt"
@@ -182,7 +184,9 @@
                   
                  <view class="input-wrapper" style="margin-top: 15px;">
                     <input v-if="(tableData.length < formData.checkQyt)" @input="search($event)"
                     <input v-if="(tableData.length < formData.checkQyt)"
                        ref="textInput2"
                        @input="search($event)"
                        @confirm="onEnterSave"
                        v-model="inputTxt" type="text" class="result-input" placeholder="请输入检验结果..."
                        placeholder-class="placeholder" />
@@ -556,6 +560,23 @@
               this.$showMessage("保存成功");
               this.refreshResult();
               this.inputTxt = '';
               // 设置焦点回到对应的输入框
               this.$nextTick(() => {
                  if (this.formData.fupAllow && this.formData.fdownAllow) {
                     // 有上下限时,焦点回到数字输入框
                     if (this.$refs.numberInput) {
                        this.$refs.numberInput.focus();
                     }
                  } else {
                     // 无上下限时,焦点回到文本输入框
                     if (this.$refs.textInput) {
                        this.$refs.textInput.focus();
                     } else if (this.$refs.textInput2) {
                        this.$refs.textInput2.focus();
                     }
                  }
               });
            })
         },