constant.tsx
2.08 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
103
104
105
import { TableDropdown } from '@ant-design/pro-components';
export type InvoiceItem = {
id: number; //id
invoiceStatus: string; //发票类型:专票/普票
invoiceNumber: string; //发票号码
status: string; //状态
purchaser: string; //购买方
payee: string; //收款单位
contacts: string; //联系人
sale: string; //销售
money: number; //金额
invoicingTime: string; //开票日期
collectionTime: string; //收款时间
notes: string; //备注
};
export const INVOICE_COLUMNS = [
{
dataIndex: 'invoiceNumber',
title: '发票号码',
valueType: 'text',
width: 80,
},
{
dataIndex: 'invoiceStatus',
title: '发票类型',
valueType: 'select',
width: 80,
},
{
title: '状态',
dataIndex: 'status',
valueType: 'text',
width: 80,
},
{
title: '购买方',
dataIndex: 'purchaser',
valueType: 'text',
width: 80,
},
{
title: '收款单位',
dataIndex: 'payee',
valueType: 'text',
width: 80,
},
{
title: '联系人',
dataIndex: 'contacts',
valueType: 'text',
width: 80,
},
{
title: '销售',
dataIndex: 'sale',
valueType: 'text',
width: 80,
},
{
title: '金额',
dataIndex: 'money',
valueType: 'money',
width: 80,
},
{
title: '开票日期',
dataIndex: 'invoicingTime',
valueType: 'date',
width: 80,
},
{
title: '收款时间',
dataIndex: 'collectionTime',
valueType: 'dateTime',
width: 80,
},
{
title: '操作',
valueType: 'option',
key: 'option',
render: (text, record, _, action) => [
<a
key="editable"
onClick={() => {
action?.startEditable?.(record.id);
}}
>
编辑
</a>,
<a href={record.url} target="_blank" rel="noopener noreferrer" key="view">
查看
</a>,
<TableDropdown
key="actionGroup"
onSelect={() => action?.reload()}
menus={[
{ key: 'copy', name: '复制' },
{ key: 'delete', name: '删除' },
]}
/>,
],
},
];