2 changed files with 325 additions and 23 deletions
@ -0,0 +1,149 @@ |
|||
<template> |
|||
<div class="label-container"> |
|||
<!-- 标题栏 --> |
|||
<div class="label-header"> |
|||
<div class="label-title">货位信息标签</div> |
|||
</div> |
|||
|
|||
<!-- 内容区域 --> |
|||
<div class="label-content"> |
|||
<!-- 左侧二维码 --> |
|||
<div class="qrcode-section"> |
|||
<img :src="qrCodeDataUrl" /> |
|||
</div> |
|||
|
|||
<!-- 右侧信息 --> |
|||
<div class="info-section"> |
|||
<div class="info-row"> |
|||
<span class="info-text primary">货位编码:{{ locationData.locationId || '' }}</span> |
|||
</div> |
|||
<div class="info-row"> |
|||
<span class="info-text">货位名称:{{ locationData.locationName || '' }}</span> |
|||
</div> |
|||
<div class="info-row"> |
|||
<span class="info-text">所属仓库:{{ locationData.warehouseName || locationData.warehouseId || '' }}</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- 底部提示 --> |
|||
<div class="label-footer"> |
|||
请扫描二维码查看详情 |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'LocationLabelPrint', |
|||
props: { |
|||
locationData: { |
|||
type: Object, |
|||
required: true, |
|||
default: () => ({ |
|||
locationId: '', |
|||
locationName: '', |
|||
warehouseId: '', |
|||
warehouseName: '' |
|||
}) |
|||
}, |
|||
qrCodeDataUrl: { |
|||
type: String, |
|||
required: true, |
|||
default: '' |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.label-container { |
|||
width: 80mm; |
|||
height: 80mm; |
|||
display: flex; |
|||
flex-direction: column; |
|||
padding: 3mm; |
|||
box-sizing: border-box; |
|||
border: 1px solid #333; |
|||
background: #fff; |
|||
font-family: "Microsoft YaHei", Arial, sans-serif; |
|||
} |
|||
|
|||
/* 标题栏 */ |
|||
.label-header { |
|||
background: #F5F5F5; |
|||
padding: 2mm 0; |
|||
text-align: center; |
|||
margin-bottom: 3mm; |
|||
border-radius: 1mm; |
|||
} |
|||
|
|||
.label-title { |
|||
font-size: 11pt; |
|||
font-weight: bold; |
|||
font-family: "Microsoft YaHei", sans-serif; |
|||
color: #333; |
|||
} |
|||
|
|||
/* 内容区域 */ |
|||
.label-content { |
|||
flex: 1; |
|||
display: flex; |
|||
align-items: center; |
|||
gap: 2mm; |
|||
} |
|||
|
|||
/* 二维码区域 */ |
|||
.qrcode-section { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
width: 25mm; |
|||
height: 25mm; |
|||
} |
|||
|
|||
.qrcode-section img { |
|||
width: 25mm; |
|||
height: 25mm; |
|||
display: block; |
|||
} |
|||
|
|||
/* 信息区域 */ |
|||
.info-section { |
|||
flex: 1; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: center; |
|||
gap: 3mm; |
|||
} |
|||
|
|||
.info-row { |
|||
display: flex; |
|||
align-items: center; |
|||
line-height: 1.5; |
|||
} |
|||
|
|||
.info-text { |
|||
font-size: 10pt; |
|||
font-family: "Microsoft YaHei", sans-serif; |
|||
color: #000; |
|||
word-break: break-word; |
|||
line-height: 1.4; |
|||
} |
|||
|
|||
.info-text.primary { |
|||
font-weight: bold; |
|||
} |
|||
|
|||
/* 底部提示 */ |
|||
.label-footer { |
|||
text-align: center; |
|||
font-size: 7pt; |
|||
font-family: "Microsoft YaHei", sans-serif; |
|||
color: #999; |
|||
padding-top: 2mm; |
|||
border-top: 1px solid #eee; |
|||
margin-top: 2mm; |
|||
} |
|||
</style> |
|||
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue