From 69ed1555e7be98d643e5cf9c55b591c44d52d1b9 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 01 十一月 2024 11:24:24 +0800
Subject: [PATCH] 修改标签打印格式
---
src/components/view/b1-sample.vue | 74 ++++++++++++++++++++++++++++++++++---
1 files changed, 68 insertions(+), 6 deletions(-)
diff --git a/src/components/view/b1-sample.vue b/src/components/view/b1-sample.vue
index 70d036c..1db786b 100644
--- a/src/components/view/b1-sample.vue
+++ b/src/components/view/b1-sample.vue
@@ -166,7 +166,7 @@
<div style="width: 100%;height: 100%;" v-if="!isDetail">
<div>
<el-row class="title">
- <el-col :span="12" style="padding-left: 20px;">鏍峰搧绠$悊</el-col>
+ <el-col :span="12" style="padding-left: 20px;text-align: left;">鏍峰搧绠$悊</el-col>
<el-col :span="12" style="text-align: right;">
<el-button size="small" type="primary" @click="storageVisible=true">鍏ュ簱</el-button>
<el-button size="small" type="primary" @click="exportVisible=true">鍑哄簱</el-button>
@@ -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">
+ <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>
@@ -222,7 +222,7 @@
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"
@@ -255,7 +255,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"></el-input>
+ <el-input v-model="sampleCode" size="small" @change="sampleCodeChange"></el-input>
</div>
</el-col>
</el-row>
@@ -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"></el-input>
+ <el-input v-model="sampleCode" size="small" @change="sampleCodeChange" clearable></el-input>
</div>
</el-col>
</el-row>
@@ -366,6 +366,7 @@
<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>
@@ -382,6 +383,7 @@
shelfId: null
},
warehouse: [],
+ startTime: null,
shelf: [],
storageList:[],
storageVisible: false,
@@ -406,13 +408,61 @@
tableLoading:false,
sampleCode:'',
currentId:null,
- searchSampleCode:''
+ searchSampleCode:null,
+ 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)
+ // }
+ // },
+ // isEdit(newVal){
+ // if(!newVal){
+ // this.shelves = {}
+ // }
+ // }
+ // },
mounted() {
this.selectList()
},
methods: {
+ keyup(e){
+ var code = ''
+ try{
+ code = this.codeInfo.substring()
+ if(code==null||code==undefined||code==''){
+ this.$message.error('璇ヤ簩缁寸爜鏈夎')
+ }else{
+ this.sampleCode = code
+ }
+ }catch(e){
+ this.$message.error('璇疯皟鑷宠嫳鏂囬敭鐩�')
+ }
+ this.codeInfo = null
+ },
selectList() {
this.$axios.get(this.$api.warehouse.selectWarehouse).then(res => {
this.warehouse = res.data
@@ -700,6 +750,7 @@
this.isDetail = true;
},
warehouseChange(val) {
+ this.tableList = []
let map = this.warehouse.find(a => {
return a.id === val ? a : null
})
@@ -751,6 +802,17 @@
this.isDetail = true;
}
})
+ },
+ sampleCodeChange(e){
+ 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')
}
}
}
--
Gitblit v1.9.3