|
|
@@ -19,7 +19,7 @@
|
|
|
<template v-for="(o, i) in modelList">
|
|
|
<div v-if="item[o.value]" :class="$style.item" :style="`width: ${o.width};`">
|
|
|
<span :class="$style.name">{{ o.label }}:</span>
|
|
|
- <span :class="$style.value">{{ item[o.value] }}</span>
|
|
|
+ <span :class="$style.value">{{ item[o.value] | dateFormat(o) }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
<vue-barcode
|
|
|
@@ -51,7 +51,7 @@
|
|
|
},
|
|
|
title: {
|
|
|
type: String,
|
|
|
- default: '标签打印'
|
|
|
+ default: '标签打印(实际效果以打印页面为准)'
|
|
|
},
|
|
|
list: {
|
|
|
type: Array,
|
|
|
@@ -62,6 +62,15 @@
|
|
|
default: '物料'
|
|
|
}
|
|
|
},
|
|
|
+ filters: {
|
|
|
+ dateFormat (v, o) {
|
|
|
+ const s = ['daoKuRiQi', 'youXiaoQi']
|
|
|
+ if (s.includes(o.value)) {
|
|
|
+ return v.replace(/-/g, '.')
|
|
|
+ }
|
|
|
+ return v
|
|
|
+ }
|
|
|
+ },
|
|
|
components: {
|
|
|
vueEasyPrint: () => import('vue-easy-print'),
|
|
|
VueBarcode: () => import('vue-barcode')
|