Crunchy
2024-10-28 7c0eaf011a06a3b5578fef0ae7b61c8c923e0c97
src/components/view/b1-sample.vue
@@ -195,7 +195,7 @@
        <div class="search_thing">
          <div class="search_label">样品编号:</div>
          <div class="search_input">
            <el-input placeholder="请输入样品编号" v-model="searchSampleCode" size="small" autocomplete="off">
            <el-input placeholder="请输入样品编号" v-model="searchSampleCode" size="small" autocomplete="off" ref="organization" readonly="readonly" @focus="remove('organization')" @blur="setType('organization')">
              <el-button slot="append" icon="el-icon-search" @click="handleSearch"></el-button>
            </el-input>
          </div>
@@ -287,7 +287,7 @@
        <el-col class="search_thing" :span="24">
          <div class="search_label"><span class="required-span">* </span>样品编号:</div>
          <div class="search_input">
            <el-input v-model="sampleCode" size="small" @change="sampleCodeChange"></el-input>
            <el-input v-model="sampleCode" size="small" @change="sampleCodeChange" clearable></el-input>
          </div>
        </el-col>
      </el-row>
@@ -408,7 +408,7 @@
        tableLoading:false,
        sampleCode:'',
        currentId:null,
        searchSampleCode:'',
        searchSampleCode:null,
        codeInfo:null,
      }
    },
@@ -439,6 +439,11 @@
            clearInterval(this.startTime)
        }
      },
      isEdit(newVal){
        if(!newVal){
          this.shelves = {}
        }
      }
    },
    mounted() {
      this.selectList()
@@ -447,7 +452,7 @@
      keyup(e){
        var code = ''
        try{
            code = JSON.parse(this.codeInfo)
            code = this.codeInfo.substring()
            if(code==null||code==undefined||code==''){
                this.$message.error('该二维码有误')
            }else{
@@ -802,6 +807,12 @@
        if(e){
          this.sampleCode = e.replaceAll('"','')
        }
      },
      remove(type){
        this.$refs[type].$el.querySelector('input').removeAttribute('readonly')
      },
      setType(type){
        this.$refs[type].$el.querySelector('input').setAttribute('readonly', 'true')
      }
    }
  }