Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
"sortablejs": "1.10.2",
|
||||
"splitpanes": "2.4.1",
|
||||
"vue": "2.6.12",
|
||||
"vue-barcode": "^1.3.0",
|
||||
"vue-count-to": "1.0.13",
|
||||
"vue-cropper": "0.5.5",
|
||||
"vue-easy-print": "^0.0.8",
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<div class="qrcode-container">
|
||||
<vue-qr
|
||||
:text="qrCodeValue"
|
||||
:size="180"
|
||||
:size="80"
|
||||
:margin="0"
|
||||
:correctLevel="2"
|
||||
error-correction-level="M"
|
||||
@@ -116,8 +116,8 @@
|
||||
|
||||
<!-- 打印专用区域(隐藏) -->
|
||||
<vue-easy-print style="display: none;" ref="easyPrint2">
|
||||
<div class="vue-easy-print" style="page-break-after:always">
|
||||
<div class="label-content">
|
||||
<div class="vue-easy-print">
|
||||
<div class="print-label">
|
||||
<div class="preview-box">
|
||||
<div class="preview-content">
|
||||
<div class="preview-row">
|
||||
@@ -158,10 +158,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 二维码区域 -->
|
||||
<div class="qrcode-container">
|
||||
<div class="qrcode-container" style="top:2mm;right:2mm;">
|
||||
<vue-qr
|
||||
:text="qrCodeValue"
|
||||
:size="180"
|
||||
:size="120"
|
||||
:margin="0"
|
||||
:correctLevel="2"
|
||||
error-correction-level="M"
|
||||
@@ -969,7 +969,7 @@ export default {
|
||||
}
|
||||
|
||||
.preview-display {
|
||||
padding: 0 20px 20px;
|
||||
padding: 0 10px 10px;
|
||||
}
|
||||
|
||||
.label-content {
|
||||
@@ -978,6 +978,19 @@ export default {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 打印单页标签尺寸(按实际贴纸尺寸调整) */
|
||||
.print-label {
|
||||
width: 90mm; /* 贴纸宽度 */
|
||||
height: 30mm; /* 贴纸高度 */
|
||||
padding: 6mm; /* 安全边距 */
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
background: #fff;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.preview-box {
|
||||
padding: 20px;
|
||||
font-family: 'Arial', sans-serif;
|
||||
@@ -1103,26 +1116,63 @@ export default {
|
||||
@media print {
|
||||
@page {
|
||||
margin: 0;
|
||||
size: auto;
|
||||
size: 90mm 30mm;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.vue-easy-print {
|
||||
width: 90mm;
|
||||
height: 30mm;
|
||||
}
|
||||
|
||||
.preview-box {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.preview-content {
|
||||
margin-right: 38mm;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.preview-row {
|
||||
margin-bottom: 4px;
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.preview-label {
|
||||
font-size: 14px;
|
||||
min-width: 10mm;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.preview-value {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.qrcode-container {
|
||||
border: none;
|
||||
position: absolute !important;
|
||||
top: 20px !important;
|
||||
right: 20px !important;
|
||||
top: 2mm !important;
|
||||
right: 2mm !important;
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 提高打印品质,避免缩放导致模糊 */
|
||||
* {
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
<!-- 添加或修改条码信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<!-- <el-form-item label="格式ID" prop="formatId">
|
||||
<el-form-item label="格式ID" prop="formatId">
|
||||
<el-select v-model="form.formatId" placeholder="请选择格式ID">
|
||||
<el-option
|
||||
v-for="item in traycodeFormatList"
|
||||
@@ -159,7 +159,7 @@
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="数量" prop="spare1" v-if="form.id == null">
|
||||
<el-input v-model="form.spare1" placeholder="请输入数量" />
|
||||
@@ -189,10 +189,13 @@
|
||||
<!-- 打印模板 -->
|
||||
<vue-easy-print v-show="true" ref="easyPrint2">
|
||||
<div v-for="item in printData" :key="item.id" style="page-break-after:always" class="vue-easy-print">
|
||||
<vue-qr :text='item.trayCode' :size="150" :margin="10" :align-item="center" :correctLevel="2"></vue-qr>
|
||||
<div>
|
||||
<span class="num">{{ item.trayCode }}</span>
|
||||
</div>
|
||||
<vue-barcode
|
||||
:value=item.trayCode
|
||||
format="CODE39"
|
||||
width="2"
|
||||
height="100"
|
||||
display-value
|
||||
/>
|
||||
</div>
|
||||
</vue-easy-print>
|
||||
</div>
|
||||
@@ -203,14 +206,15 @@ import { listTraycode, getTraycode, delTraycode, addTraycode, updateTraycode } f
|
||||
import { listTraycodeFormat } from "@/api/bas/traycodeFormat"
|
||||
import vueEasyPrint from 'vue-easy-print'
|
||||
import VueQr from 'vue-qr'
|
||||
|
||||
import VueBarcode from 'vue-barcode'
|
||||
|
||||
export default {
|
||||
name: "Traycode",
|
||||
dicts:['sys_yes_no'],
|
||||
components: {
|
||||
vueEasyPrint,
|
||||
VueQr
|
||||
VueQr,
|
||||
VueBarcode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -455,7 +459,7 @@ export default {
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
size: A4;
|
||||
size: 80mm 50mm;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user