| | |
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('memo'),
|
| | | },
|
| | |
|
| | | {
|
| | | title: formatMessage('common.operation', '操作'),
|
| | | name: 'oper',
|
| | | dataIndex: 'oper',
|
| | | key: 'oper',
|
| | | width: 240,
|
| | | width: 350,
|
| | | fixed: 'right',
|
| | | },
|
| | | ];
|
| | |
| | | printData.push(newItem)
|
| | | })
|
| | | printChild.value.printData = printData;
|
| | | printChild.value.data = record.__v_raw;
|
| | | printChild.value.orderNo = record.__v_raw.orderNo
|
| | | printChild.value.open = true;
|
| | | }
|
| | |
| | | const printChild = ref(null); |
| | | const selectTemplate = ref('Template1'); |
| | | let open = ref(false); |
| | | let data = ref({}) |
| | | let printData = ref([]); |
| | | let repeatNum = ref(1); |
| | | let orderNo = ref(''); |
| | |
| | | defineExpose({ |
| | | open, |
| | | orderNo, |
| | | data, |
| | | printData |
| | | }) |
| | | </script> |
| | |
| | | <a-modal v-model:open="open" :title="formatMessage('', '订单打印')" @ok="handleOk" :width="'60%'" v-if="open"> |
| | | <div style="height: 500px;overflow-x: hidden;overflow-y: scroll;"> |
| | | <div style="margin-top: 20px;"> |
| | | <Component :is="template[selectTemplate]" ref="printChild" :list="printData" :repeatNum="repeatNum" :orderNo="orderNo" /> |
| | | <Component :is="template[selectTemplate]" ref="printChild" :list="printData" :repeatNum="repeatNum" :orderNo="orderNo" :data="data"/> |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | |
| | | repeatNum: { |
| | | type: Number, |
| | | default: 1 |
| | | }, |
| | | data: { |
| | | type: Object, |
| | | default: {} |
| | | } |
| | | }); |
| | | const { orderNo, list, repeatNum } = toRefs(props) |
| | | |
| | | const { orderNo, list, repeatNum, data } = toRefs(props) |
| | | </script> |
| | | |
| | | <template> |
| | | <div id="printOrder"> |
| | | <div> |
| | | <table class="contain" width="1200" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | |
| | | <table class="contain" width="980" style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> |
| | | <tr style="height: 40px"> |
| | | <td align="center" colspan="2">客户名称</td> |
| | | <td align="center" colspan="2">联系电话</td> |
| | |
| | | <td align="center" colspan="4">收货地址</td> |
| | | </tr> |
| | | <template v-for="(item, index) in list" :key="index"> |
| | | <tr style="height: 40px"> |
| | | <td align="center" colspan="2">{{ item.customer }}</td> |
| | | <td align="center" colspan="2">{{ item.phone }}</td> |
| | | <td align="center" colspan="3">{{ item.logistics }}</td> |
| | | <td align="center" colspan="4">{{ item.address }}</td> |
| | | <tr style="height: 40px" v-if="index == 0"> |
| | | <td align="center" colspan="2">{{ data.customer }}</td> |
| | | <td align="center" colspan="2">{{ data.phone }}</td> |
| | | <td align="center" colspan="3">{{ data.logistics }}</td> |
| | | <td align="center" colspan="4">{{ data.address }}</td> |
| | | </tr> |
| | | </template> |
| | | <tr style="height: 100px"> |