InvoiceDetail.vue
2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<template>
<template>
<BasicDrawer
@register="register"
v-bind="$attrs"
title="订单信息"
width="60%"
:isDetail="true"
:showDetailBack="false"
:destroyOnClose="true"
>
<div class="p-4">
<BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'"> </template>
<template v-if="column.key === 'picUrl'">
<img :z-index="100000" :width="50" :height="50" :src="record?.smallPicUrl" />
</template>
</template>
</BasicTable>
</div>
</BasicDrawer>
</template>
</template>
<script lang="ts" setup>
import { BasicDrawer, useDrawerInner } from '@/components/Drawer';
import { BasicForm, FormSchema, useForm } from '@/components/Form';
import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue';
import { demoListApi } from '/@/api/demo/table';
import { BasicColumn, useTable, BasicTable, ColumnChangeParam } from '/@/components/Table';
import { getBaseInvoice } from '/@/api/project/invoice';
const columns: BasicColumn[] = [
{
title: '客户编码',
dataIndex: 'customerCode',
width: 100,
},
{
title: '项目号',
dataIndex: 'projectNo',
width: 100,
},
{
title: '内部编码',
dataIndex: 'innerNo',
width: 100,
},
{
title: '客户po号',
dataIndex: 'customerPo',
width: 100,
},
{
title: '客户STYLE',
width: 150,
dataIndex: 'customerStyle',
},
{
title: 'Model(REFERENCE)',
width: 150,
dataIndex: 'modeleLo',
},
{
title: '订单图片',
width: 150,
dataIndex: 'picUrl',
},
{
title: '数量',
width: 150,
dataIndex: 'orderCount',
},
{
title: '客户单价$',
width: 150,
dataIndex: 'orderCount',
},
{
title: '客户总价$',
width: 150,
dataIndex: 'orderCount',
},
];
const invoiceNo = ref();
const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => {
// 方式1
invoiceNo.value = data.data.invoiceNo;
// getBaseInvoice({ invoiceNo: invoiceNo.value });
});
const params = ref({
invoiceNo: invoiceNo.value,
});
const [registerTable] = useTable({
api: () => {
const res = getBaseInvoice({ invoiceNo: invoiceNo.value });
return res;
},
columns: columns,
bordered: true,
});
</script>