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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
| import type { VbenFormSchema } from '#/adapter/form';
| import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
| import { DICT_TYPE } from '..\..\..\..\packages\constants\src';
| import { getDictOptions } from '..\..\..\..\packages\effects\hooks\src';
|
| /** 列表的搜索表单 */
| export function useGridFormSchema(): VbenFormSchema[] {
| return [
| {
| fieldName: 'name',
| label: '客户名称',
| component: 'Input',
| componentProps: {
| placeholder: '请输入客户名称',
| allowClear: true,
| },
| },
| {
| fieldName: 'mobile',
| label: '手机',
| component: 'Input',
| componentProps: {
| placeholder: '请输入手机',
| allowClear: true,
| },
| },
| {
| fieldName: 'industryId',
| label: '所属行业',
| component: 'Select',
| componentProps: {
| options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_INDUSTRY, 'number'),
| placeholder: '请选择所属行业',
| allowClear: true,
| },
| },
| {
| fieldName: 'level',
| label: '客户级别',
| component: 'Select',
| componentProps: {
| options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_LEVEL, 'number'),
| placeholder: '请选择客户级别',
| allowClear: true,
| },
| },
| {
| fieldName: 'source',
| label: '客户来源',
| component: 'Select',
| componentProps: {
| options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_SOURCE, 'number'),
| placeholder: '请选择客户来源',
| allowClear: true,
| },
| },
| ];
| }
|
| export function useGridColumns(): VxeTableGridOptions['columns'] {
| return [
| {
| title: '客户名称',
| field: 'name',
| minWidth: 160,
| fixed: 'left',
| slots: { default: 'name' },
| },
| {
| title: '客户来源',
| field: 'source',
| minWidth: 100,
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.CRM_CUSTOMER_SOURCE },
| },
| },
| {
| title: '手机',
| field: 'mobile',
| minWidth: 120,
| },
| {
| title: '电话',
| field: 'telephone',
| minWidth: 120,
| },
| {
| title: '邮箱',
| field: 'email',
| minWidth: 140,
| },
| {
| title: '客户级别',
| field: 'level',
| minWidth: 135,
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.CRM_CUSTOMER_LEVEL },
| },
| },
| {
| title: '客户行业',
| field: 'industryId',
| minWidth: 100,
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.CRM_CUSTOMER_INDUSTRY },
| },
| },
| {
| title: '下次联系时间',
| field: 'contactNextTime',
| minWidth: 180,
| formatter: 'formatDateTime',
| },
| {
| title: '备注',
| field: 'remark',
| minWidth: 200,
| },
| {
| title: '成交状态',
| field: 'dealStatus',
| minWidth: 80,
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.INFRA_BOOLEAN_STRING },
| },
| },
| {
| title: '最后跟进时间',
| field: 'contactLastTime',
| minWidth: 180,
| formatter: 'formatDateTime',
| },
| {
| title: '最后跟进记录',
| field: 'contactLastContent',
| minWidth: 200,
| },
| {
| title: '更新时间',
| field: 'updateTime',
| minWidth: 180,
| formatter: 'formatDateTime',
| },
| {
| title: '创建时间',
| field: 'createTime',
| minWidth: 180,
| formatter: 'formatDateTime',
| },
| {
| title: '创建人',
| field: 'creatorName',
| minWidth: 100,
| },
| ];
| }
|
|