zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
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
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
/*
 * @Author: Pengjiantian
 * @Date: 2020-06-15 17:39:37
 * @Last Modified by: Pengjiantian
 * @Last Modified time: 2020-07-20 10:01:11
 */
 
import ApiModel from '@/utils/core/apiModel'
// 贷款机构-功能约束子流程定义-列表查询
const baseFormList = [
  {
    type: 'select',
    label: '产品名称',
    value: '',
    name: 'productName',
    // descName: 'productCode',
    options: [],
    attrs: ['filterable', 'clearable', 'collapse-tags'],
    rules: [{ required: true }]
  },
  {
    type: 'select',
    label: '产品维度名称',
    value: '',
    name: 'productDimensionName',
    options: [],
    attrs: ['filterable', 'clearable', 'collapse-tags'],
    rules: [{ required: true }]
  },
  {
    type: 'input',
    label: '占比(%)',
    value: '',
    name: 'proportion',
    isNumber: true,
    rules: [{ required: true }]
  }
]
 
const BasetTableList = [
  {
    label: '产品名称',
    prop: 'productName'
  },
  {
    label: '产品维度名称',
    prop: 'productDimensionName',
    attrs: { width: 'auto' }
  },
  {
    label: '占比(%)',
    prop: 'proportion',
    attrs: { width: 'auto' }
  },
  {
    prop: 'action',
    label: '操作管理',
    attrs: {
      // width: '260px',
      fixed: 'right'
    },
    type: 'buttons'
  }
]
 
// 学历表单
const educationForm = [
  {
    type: 'select',
    label: '学历',
    value: '',
    name: 'educationDesc',
    descName: 'education',
    options: [],
    attrs: ['filterable', 'clearable', 'collapse-tags'],
    rules: [{ required: true }]
  }
]
// 学历表格
const educationTable = [
  {
    label: '学历',
    prop: 'educationDesc',
    attrs: { width: 'auto' }
  }
]
 
// 申请金额表单
const moneyForm = [
  {
    type: 'input',
    label: '档次金额下限',
    value: '',
    name: 'minAccount',
    isNumber: true,
    rules: [{ required: true }]
  },
  {
    type: 'input',
    label: '档次金额上限',
    value: '',
    name: 'maxAccount',
    isNumber: true,
    rules: [{ required: true }]
  }
]
// 申请金额表格
const moneyTable = [
  {
    label: '档次金额下限',
    prop: 'minAccount',
    attrs: { width: 'auto' }
  },
  {
    label: '档次金额上限',
    prop: 'maxAccount',
    attrs: { width: 'auto' }
  }
]
 
// 贷款表单
const loadForm = [
  {
    type: 'select',
    label: '期限单位',
    value: '',
    name: 'loanTermUnitDesc',
    options: [],
    attrs: ['filterable', 'clearable', 'collapse-tags'],
    rules: [{ required: true }]
  },
  {
    type: 'input',
    label: '贷款期限',
    value: '',
    name: 'loanTerm',
    isNumber: true,
    rules: [{ required: true }]
  }
]
// 贷款表格
const loadTable = [
  {
    label: '期限单位',
    prop: 'loanTermUnitDesc',
    attrs: { width: 'auto' }
  },
  {
    label: '贷款期限',
    prop: 'loanTerm',
    attrs: { width: 'auto' }
  }
]
 
// 还款方式表单
const repaymentForm = [
  {
    type: 'select',
    label: '还款方式',
    value: '',
    name: 'repaymentTypeDesc',
    descName: 'repaymentType',
    options: [],
    attrs: ['filterable', 'clearable', 'collapse-tags'],
    rules: [{ required: true }]
  }
]
// 还款方式表格
const repaymentTable = [
  {
    label: '还款方式',
    prop: 'repaymentTypeDesc',
    attrs: { width: 'auto' }
  }
]
 
// 申请渠道表单
const channelForm = [
  {
    type: 'select',
    label: '申请渠道',
    value: '',
    name: 'applyOrgIDDesc',
    options: [],
    attrs: ['filterable', 'clearable', 'collapse-tags'],
    rules: [{ required: true }]
  }
]
// 申请渠道表格
const channelTable = [
  {
    label: '申请渠道',
    prop: 'applyOrgIDDesc',
    attrs: { width: 'auto' }
  }
]
 
// 企业客户表单
const clientForm = [
  // {
  //   type: 'select',
  //   label: '客户企业',
  //   value: '',
  //   name: 'cusEnterpriseDesc',
  //   options: [],
  //   attrs: ['filterable', 'clearable', 'collapse-tags'],
  //   rules: [{ required: true }]
  // }
  {
    type: 'input',
    label: '客户企业',
    value: '',
    name: 'cusEnterprise',
    rules: [{ required: true }]
  }
]
// 企业客户表格
const clientTable = [
  // {
  //   label: '客户企业',
  //   prop: 'cusEnterpriseDesc',
  //   attrs: { width: 'auto' }
  // }
  {
    label: '客户企业',
    prop: 'cusEnterprise',
    attrs: { width: 'auto' }
  }
]
 
// 工作城市表单
const workCitysForm = [
  {
    type: 'select',
    label: '工作城市',
    name: 'workCityDesc',
    descName: 'workCity',
    options: [],
    attrs: ['filterable', 'clearable', 'collapse-tags'],
    rules: [{ required: true }]
  }
]
// 工作城市表格
const workCitysTable = [
  {
    label: '工作城市',
    prop: 'workCityDesc',
    attrs: { width: 'auto' }
  }
]
 
// 房产城市表单
const homeCitysForm = [
  {
    type: 'select',
    label: '房产城市',
    name: 'houseCityDesc',
    descName: 'houseCity',
    value: '',
    options: [],
    attrs: ['filterable', 'clearable', 'collapse-tags'],
    rules: [{ required: true }]
  }
]
// 房产城市表格
const homeCitysTable = [
  {
    label: '房产城市',
    prop: 'houseCityDesc',
    attrs: { width: 'auto' }
  }
]
 
// 客群分类表单
const customerTypeForm = [
  // {
  //   type: 'select',
  //   label: '客群分类',
  //   name: 'cusClassifyDesc',
  //   descName: 'cusClassify',
  //   value: '',
  //   options: [],
  //   attrs: ['filterable', 'clearable', 'collapse-tags'],
  //   rules: [{ required: true }]
  // }
  {
    type: 'input',
    label: '客群分类',
    name: 'cusClassify',
    value: '',
    rules: [{ required: true }]
  }
]
// 客群分类表格
const customerTypeTable = [
  {
    label: '客群分类',
    prop: 'cusClassify',
    attrs: { width: 'auto' }
  }
]
 
// 风险等级表单
const riskLevelForm = [
  {
    type: 'select',
    label: '客户风险等级',
    name: 'riskGradeDesc',
    descName: 'riskGrade',
    value: '',
    options: [],
    attrs: ['filterable', 'clearable', 'collapse-tags'],
    rules: [{ required: true }]
  }
]
// 风险等级表格
const riskLevelTable = [
  {
    label: '客户风险等级',
    prop: 'riskGradeDesc',
    attrs: { width: 'auto' }
  }
]
 
// 客户企业表单
const customerEnterpriseForm = [
  {
    type: 'select',
    label: '客户企业分类',
    name: 'cusEnterpriseTypeDesc',
    descName: 'cusEnterpriseType',
    value: '',
    options: [],
    attrs: ['filterable', 'clearable', 'collapse-tags'],
    rules: [{ required: true }]
  }
]
// 客户企业表格
const customerEnterpriseTable = [
  {
    label: '客户企业分类',
    prop: 'cusEnterpriseTypeDesc',
    attrs: { width: 'auto' }
  }
]
 
// 工作城市分类表单
const workCityTypeForm = [
  {
    type: 'select',
    label: '工作城市分类',
    name: 'workCityTypeDesc',
    descName: 'workCityType',
    value: '',
    options: [],
    attrs: ['filterable', 'clearable', 'collapse-tags'],
    rules: [{ required: true }]
  }
]
// 工作城市分类表格
const workCityTypeTable = [
  {
    label: '工作城市分类',
    prop: 'workCityTypeDesc',
    attrs: { width: 'auto' }
  }
]
 
// 房产城市分类表单
const homeCityTypeForm = [
  {
    type: 'select',
    label: '房产城市分类',
    name: 'houseCityTypeDesc',
    descName: 'houseCityType',
    value: '',
    options: [],
    attrs: ['filterable', 'clearable', 'collapse-tags'],
    rules: [{ required: true }]
  }
]
// 房产城市分类表格
const homeCityTypeTable = [
  {
    label: '房产城市分类',
    prop: 'houseCityTypeDesc',
    attrs: { width: 'auto' }
  }
]
 
export default options => {
  // 接口地址: required
  const api = 'server/queryFundUnitAssetAllocationList'
  let { value, formList = null, tableList = null } = options
  if (value === '01') {
    formList = [...baseFormList]
    tableList = [...BasetTableList]
  } else if (value === '02') {
    formList = [...educationForm, ...baseFormList]
    tableList = [...educationTable, ...BasetTableList]
  } else if (value === '03') {
    formList = [...moneyForm, ...baseFormList]
    tableList = [...moneyTable, ...BasetTableList]
  } else if (value === '04') {
    formList = [...loadForm, ...baseFormList]
    tableList = [...loadTable, ...BasetTableList]
  } else if (value === '05') {
    formList = [...repaymentForm, ...baseFormList]
    tableList = [...repaymentTable, ...BasetTableList]
  } else if (value === '06') {
    formList = [...channelForm, ...baseFormList]
    tableList = [...channelTable, ...BasetTableList]
  } else if (value === '07') {
    formList = [...clientForm, ...baseFormList]
    tableList = [...clientTable, ...BasetTableList]
  } else if (value === '08') {
    formList = [...workCitysForm, ...baseFormList]
    tableList = [...workCitysTable, ...BasetTableList]
  } else if (value === '09') {
    formList = [...homeCitysForm, ...baseFormList]
    tableList = [...homeCitysTable, ...BasetTableList]
  } else if (value === '10') {
    formList = [...customerTypeForm, ...baseFormList]
    tableList = [...customerTypeTable, ...BasetTableList]
  } else if (value === '11') {
    formList = [...riskLevelForm, ...baseFormList]
    tableList = [...riskLevelTable, ...BasetTableList]
  } else if (value === '12') {
    formList = [...customerEnterpriseForm, ...baseFormList]
    tableList = [...customerEnterpriseTable, ...BasetTableList]
  } else if (value === '13') {
    formList = [...workCityTypeForm, ...baseFormList]
    tableList = [...workCityTypeTable, ...BasetTableList]
  } else if (value === '14') {
    formList = [...homeCityTypeForm, ...baseFormList]
    tableList = [...homeCityTypeTable, ...BasetTableList]
  }
 
  return new ApiModel({
    api,
    formList,
    tableList,
    request(body) {
      return this.post(body)
    }
  })
}