<script setup>
|
import { toRefs, ref, defineProps } from 'vue';
|
import { globalState } from '@/config.js'
|
import { formatMessage } from '@/utils/localeUtils';
|
|
const props = defineProps({
|
list: {
|
type: Array,
|
default: []
|
},
|
repeatNum: {
|
type: Number,
|
default: 1
|
}
|
});
|
const { list, repeatNum } = toRefs(props)
|
</script>
|
|
<template>
|
<div id="printMe">
|
<div v-for="(item, index) in list" :key="index">
|
<div v-for="count in repeatNum" style="font-size: 16px;margin-top: 20px;">
|
<div>
|
<table class="contain" width="300"
|
style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
|
<tr style="height: 74px">
|
<td colspan="3" align="center" scope="col">物料号</td>
|
<td class="barcode" colspan="9" align="center" scope="col">
|
<img :src="globalState.url + '/api/code/auth?type=1¶m=' + item.matnr" width="90%;" />
|
<div style="letter-spacing: 2px;margin-top: 1px; text-align: center;">
|
<span>{{ item.matnr }}</span>
|
</div>
|
</td>
|
</tr>
|
<tr style="height: 74px">
|
<td align="center" colspan="3">商品</td>
|
<td align="center" colspan="5">{{ item.maktx }}</td>
|
<td align="center" colspan="2">规格</td>
|
<td align="center" colspan="2">{{ item.specs }}</td>
|
</tr>
|
</table>
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<style>
|
@media print {
|
body {
|
margin: 0;
|
padding: 0;
|
}
|
|
.print-area {
|
margin: 0;
|
padding: 0;
|
height: auto;
|
}
|
|
|
}
|
|
.contain td {
|
border: 1px solid #000;
|
}
|
</style>
|