Blame view

src/pages/Prepaid/constant.tsx 5.21 KB
zhongnanhuang authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { enumToProTableEnumValue } from '@/utils';

export type PrepaidItem = {
  id: number; // id
  customerName: string; // 购买方
  contactPerson: string; // 联系人
  salesCode: string; // 销售
  phone: string; // 销售
  rechargeAmount: number; // 金额
  notes: string; // 备注
  rechargeSource: string; // 充值来源
  status: string; // 状态
  auditors: string; // 审核人
  auditDate: string; // 审核日期
  auditNotes: string; // 审核备注
};
export const PREPAID_STATUS_OPTIONS = {
  CREATED: '待审核',
  AUDIT_FAIL: '审核失败',
  AUDIT_PASS: '审核通过',
};
boyang authored
22
23
24
25
26
export const REMAINING_OPTIONS = {
  MORE: '大于0',
  EQUAL: '等于0',
  LESS: '小于0',
};
zhongnanhuang authored
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
export const SALES_RECHARGE_PREPAYMENT_COLUMNS = [
  // {
  //   title: '编号',
  //   dataIndex: 'id',
  //   key: 'id',
  //   valueType: 'index',
  // },
  {
    title: '客户名称',
    dataIndex: 'customerName',
    key: 'customerName',
    valueType: 'text',
  },
  {
    title: '联系人',
    dataIndex: 'contactPerson',
    key: 'contactPerson',
    valueType: 'text',
  },
  {
    title: '销售',
    dataIndex: 'salesCode',
    key: 'salesCode',
    valueType: 'text',
  },
  {
    title: '手机号',
    dataIndex: 'phone',
    key: 'phone',
    valueType: 'text',
  },
  {
boyang authored
59
    title: '充值金额',
zhongnanhuang authored
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
    dataIndex: 'rechargeAmount',
    key: 'rechargeAmount',
    valueType: 'money',
    hideInSearch: true,
  },
  {
    title: '状态',
    dataIndex: 'status',
    key: 'status',
    valueType: 'text',
    valueEnum: enumToProTableEnumValue(PREPAID_STATUS_OPTIONS),
  },
  {
    title: '备注',
    dataIndex: 'notes',
    key: 'notes',
    valueType: 'text',
  },
  {
    title: '凭证',
    dataIndex: 'proofImages',
    key: 'proofImages',
  },
  {
    title: '创建日期',
    dataIndex: 'createTime',
    key: 'createTime',
    valueType: 'dateTimeRange',
    search: {
      transform: (value) => {
        return {
          createTimeBeginTime: value[0],
          createTimeEndTime: value[1],
        };
      },
    },
  },
  {
    title: '充值来源',
    dataIndex: 'rechargeSource',
    key: 'rechargeSource',
    valueType: 'text',
    hideInTable: true,
    hideInSearch: true,
  },

  {
    title: '审核人',
    dataIndex: 'auditors',
    key: 'auditors',
    valueType: 'text',
    hideInTable: true,
    hideInSearch: true,
  },
  {
    title: '审核日期',
    dataIndex: 'auditDate',
    key: 'auditDate',
    valueType: 'dateTimeRange',
    hideInTable: true,
    search: {
      transform: (value) => {
        return {
          auditDateBeginTime: value[0],
          auditDateEndTime: value[1],
        };
      },
    },
    hideInSearch: true,
  },
  {
    title: '审核备注',
    dataIndex: 'auditNotes',
    key: 'auditNotes',
    valueType: 'text',
  },
];

export const ACCOUNT_COLUMNS = [
  // {
  //   title: '编号',
  //   dataIndex: 'uid',
  //   key: 'uid',
  //   valueType: 'index',
  //   hideInSearch: true,
  // },
  {
    title: '关键字',
    dataIndex: 'keywords',
    key: 'keywords',
    hideInTable: true,
    fieldProps: {
      placeholder: '请输入 单位|课题组|姓名|手机号|昵称',
    },
  },
  {
    title: '单位',
    dataIndex: 'institution',
    key: 'institution',
    valueType: 'text',
    hideInSearch: true,
  },
  {
    title: '课题组老师',
    dataIndex: 'institutionContactName',
    key: 'institutionContactName',
    valueType: 'text',
    hideInSearch: true,
  },
  {
    title: '手机号',
    dataIndex: 'phone',
    key: 'phone',
    valueType: 'text',
  },
  {
    title: '真实姓名',
    dataIndex: 'realName',
    key: 'realName',
    valueType: 'text',
    hideInSearch: true,
  },
  {
    title: '余额(¥)',
    dataIndex: 'nowMoney',
    key: 'nowMoney',
    valueType: 'money',
    hideInSearch: true,
  },
  {
    title: '账号',
    dataIndex: 'account',
    key: 'account',
    valueType: 'text',
    hideInSearch: true,
  },
  {
    title: '昵称',
    dataIndex: 'nickname',
    key: 'nickname',
    valueType: 'text',
    hideInSearch: true,
  },
  {
    title: '账号创建日期',
    dataIndex: 'createTime',
    key: 'createTime',
    valueType: 'dateRange',
    search: {
      transform: (value) => {
        return {
          dateLimit: value[0] + ',' + value[1],
        };
      },
    },
  },
boyang authored
216
217
218
219
220
221
222
223
224
  {
    title: '余额(¥)',
    dataIndex: 'nowMoneySearch',
    key: 'nowMoneySearch',
    valueType: 'text',
    hideInSearch: false,
    hideInTable: true,
    valueEnum: enumToProTableEnumValue(REMAINING_OPTIONS),
  },
zhongnanhuang authored
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
];

export const BALANCE_CHANGE_COLUMNS = [
  {
    title: '变动金额(¥)',
    dataIndex: 'number',
    key: 'number',
    dataType: 'money',
    width: 140,
  },
  {
    title: '变动后(¥)',
    dataIndex: 'balance',
    key: 'balance',
    dataType: 'money',
    width: 140,
  },
  {
243
244
245
246
247
248
249
    title: '变动人',
    dataIndex: 'updateBy',
    key: 'updateBy',
    dataType: 'text',
    width: 200,
  },
  {
zhongnanhuang authored
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
    title: '类型',
    dataIndex: 'title',
    key: 'title',
    dataType: 'text',
    width: 200,
  },
  {
    title: '备注',
    dataIndex: 'mark',
    key: 'mark',
    dataType: 'text',
    width: 250,
  },
  {
    title: '创建时间',
    dataIndex: 'add_time',
    key: 'add_time',
    dataType: 'datetime',
  },
];