|
@@ -1,14 +1,20 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="bg">
|
|
<div class="bg">
|
|
|
- <el-dialog width="30%" :modal-append-to-body='false' title="样品标签" :visible.sync="scanVisible">
|
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ width="21cm"
|
|
|
|
|
+ height="10cm"
|
|
|
|
|
+ :modal-append-to-body='false' title="样品标签" :visible.sync="scanVisible">
|
|
|
<!-- 表单是否显示 -->
|
|
<!-- 表单是否显示 -->
|
|
|
<div style="height:500px">
|
|
<div style="height:500px">
|
|
|
<div ref="qrcode" id="box">
|
|
<div ref="qrcode" id="box">
|
|
|
<vue-easy-print tableShow ref="easyPrint"
|
|
<vue-easy-print tableShow ref="easyPrint"
|
|
|
:onePageRow="onePageRow"
|
|
:onePageRow="onePageRow"
|
|
|
>
|
|
>
|
|
|
- <div v-for="(item1, index1) in list" :key="index1" >
|
|
|
|
|
- <div v-for="(item2, index2) in parseInt(item1.num)" :key="index2" style="page-break-after:always">
|
|
|
|
|
|
|
+ <div v-for="(item1, index1) in list" :key="index1" style="display: inline-block" >
|
|
|
|
|
+ <div v-for="(item2, index2) in parseInt(item1.num)" :key="index2"
|
|
|
|
|
+ style="display: inline-block"
|
|
|
|
|
+ ><!-- style="page-break-after:always" -->
|
|
|
|
|
+ <div class="All">
|
|
|
<div class="tagBox">
|
|
<div class="tagBox">
|
|
|
<div class="lh">
|
|
<div class="lh">
|
|
|
<div>样品名称:</div>
|
|
<div>样品名称:</div>
|
|
@@ -19,8 +25,8 @@
|
|
|
<div>样品编号:</div>
|
|
<div>样品编号:</div>
|
|
|
<div>{{ item1.serial }}</div>
|
|
<div>{{ item1.serial }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="lh" style="margin-left: 15px">
|
|
|
|
|
- <div>收样时间:</div>
|
|
|
|
|
|
|
+ <div class="lh" style="margin-left: 5px">
|
|
|
|
|
+ <div>收样时间:</div>
|
|
|
<div></div>
|
|
<div></div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -41,10 +47,17 @@
|
|
|
<div>样品数量:</div>
|
|
<div>样品数量:</div>
|
|
|
<div>{{ index2 + 1 }}/{{ item1.num }}支</div>
|
|
<div>{{ index2 + 1 }}/{{ item1.num }}支</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div>
|
|
|
|
|
- <vue-barcode :value="item1.serial" :width="2" :height="40"></vue-barcode>
|
|
|
|
|
|
|
+ <div class="ewm">
|
|
|
|
|
+ <vue-barcode :value="item1.serial" :width="1" :height="15" ></vue-barcode>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- <div
|
|
|
|
|
+ style="page-break-after: always; display: block !important;height: 40px"
|
|
|
|
|
+ ></div> -->
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</vue-easy-print>
|
|
</vue-easy-print>
|
|
@@ -90,7 +103,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- onePageRow: 1,
|
|
|
|
|
value: '',
|
|
value: '',
|
|
|
id: '',
|
|
id: '',
|
|
|
list: [{
|
|
list: [{
|
|
@@ -103,6 +115,12 @@ export default {
|
|
|
visible: true
|
|
visible: true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ obj() {
|
|
|
|
|
+ this.getInit()
|
|
|
|
|
+ // console.log(this.obj)
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
created() {
|
|
created() {
|
|
|
this.getInit()
|
|
this.getInit()
|
|
|
},
|
|
},
|
|
@@ -111,7 +129,6 @@ export default {
|
|
|
this.$refs.easyPrint.print()
|
|
this.$refs.easyPrint.print()
|
|
|
},
|
|
},
|
|
|
getInit() {
|
|
getInit() {
|
|
|
- // console.log(this.obj)
|
|
|
|
|
var idStr = '';
|
|
var idStr = '';
|
|
|
this.obj.forEach(item=>{
|
|
this.obj.forEach(item=>{
|
|
|
idStr += item + ','
|
|
idStr += item + ','
|
|
@@ -182,13 +199,30 @@ export default {
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
.bg {
|
|
.bg {
|
|
|
-
|
|
|
|
|
// height: auto;
|
|
// height: auto;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.tagBox {
|
|
.tagBox {
|
|
|
- width: 300px;
|
|
|
|
|
- height: 180px;
|
|
|
|
|
|
|
+ width: 240px; // 300 240
|
|
|
|
|
+ height: 140px; // 180 150
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ border: 1px solid #000000;
|
|
|
|
|
+ padding: 2px;
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ // justify-content: space-around;
|
|
|
|
|
+ // flex-direction: column;
|
|
|
|
|
+ margin: 10px 5px;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+}
|
|
|
|
|
+.ewm{
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+/*
|
|
|
|
|
+.tagBox {
|
|
|
|
|
+ width: 177.5px; // 300 240
|
|
|
|
|
+ height: 106.5px; // 180 150
|
|
|
|
|
+ position: relative;
|
|
|
border: 1px solid #000000;
|
|
border: 1px solid #000000;
|
|
|
padding: 20px;
|
|
padding: 20px;
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -198,6 +232,7 @@ export default {
|
|
|
border-radius: 15px;
|
|
border-radius: 15px;
|
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
}
|
|
}
|
|
|
|
|
+*/
|
|
|
|
|
|
|
|
.la {
|
|
.la {
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -206,7 +241,7 @@ export default {
|
|
|
|
|
|
|
|
.lh {
|
|
.lh {
|
|
|
// line-height: auto;
|
|
// line-height: auto;
|
|
|
- font-size: 16px;
|
|
|
|
|
|
|
+ font-size: 4px; //16
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
|