| | |
| | | effect="dark" |
| | | placement="top" |
| | | v-for="(n,j) in m.samples" |
| | | :key="j" :disabled="`${n.sample}${n.model}`.length<10"> |
| | | :key="j" :disabled="`${n.sample}${n.model}`.length<5"> |
| | | <div slot="content"><span>{{ n.sample }}</span> |
| | | <span> ({{ n.model }}) [{{ n.sampleCode }}]</span></div> |
| | | <li class="green" |
| | |
| | | <el-button type="primary" @click="confirmShelves" :loading="upLoadShelves">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <input type="password" id="ScanCodeInfo" v-model="codeInfo" @keyup.enter="keyup" style="opacity: 0;height: 0px;margin: 0px;padding: 0px;position: absolute;top: 0;"></input> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | shelfId: null |
| | | }, |
| | | warehouse: [], |
| | | startTime: null, |
| | | shelf: [], |
| | | storageList:[], |
| | | storageVisible: false, |
| | |
| | | tableLoading:false, |
| | | sampleCode:'', |
| | | currentId:null, |
| | | searchSampleCode:'' |
| | | searchSampleCode:'', |
| | | codeInfo:null, |
| | | } |
| | | }, |
| | | watch:{ |
| | | storageVisible(newVal){ |
| | | if(newVal){ |
| | | // this.$message.success('扫码:打开') |
| | | let input = document.getElementById('ScanCodeInfo'); |
| | | input.focus(); |
| | | this.startTime = setInterval(()=>{ |
| | | input.focus() |
| | | },1000) |
| | | }else{ |
| | | // this.$message.warning('扫码:关闭') |
| | | clearInterval(this.startTime) |
| | | } |
| | | }, |
| | | exportVisible(newVal){ |
| | | if(newVal){ |
| | | // this.$message.success('扫码:打开') |
| | | let input = document.getElementById('ScanCodeInfo'); |
| | | input.focus(); |
| | | this.startTime = setInterval(()=>{ |
| | | input.focus() |
| | | },1000) |
| | | }else{ |
| | | // this.$message.warning('扫码:关闭') |
| | | clearInterval(this.startTime) |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.selectList() |
| | | }, |
| | | methods: { |
| | | keyup(e){ |
| | | var code = '' |
| | | var str = {} |
| | | var that = this; |
| | | console.log(3333,this.codeInfo) |
| | | try{ |
| | | code = JSON.parse(this.codeInfo) |
| | | if(code.moNo2==null||code.moNo2==undefined||code.moNo2==''){ |
| | | this.$message.error('该二维码有误') |
| | | }else{ |
| | | str = { |
| | | moNo2: code.moNo2, |
| | | } |
| | | // if(this.storageVisible){ |
| | | // }else if(this.exportVisible){} |
| | | this.sampleCode = code.moNo2 |
| | | } |
| | | }catch(e){ |
| | | this.$message.error('该二维码有误') |
| | | } |
| | | this.codeInfo = null |
| | | }, |
| | | selectList() { |
| | | this.$axios.get(this.$api.warehouse.selectWarehouse).then(res => { |
| | | this.warehouse = res.data |