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
/**
 * 和包订单详情查询
 */
 
 
import ApiModel from '@comprehensive/serve/core/ApiModel'
 
// 表单信息
const formList = [
  // {
  //   type: 'dateRange',
  //   label: '申请日期',
  //   value: [],
  //   name: 'declaration',
  //   names: ['applydateLeft', 'applydateRight']
  // },
  {
    type: 'input', // input, select, date, rangeDate
    label: '合同号',
    value: '',
    name: 'applyserialno'
  },
  {
    type: 'input', // input, select, date, rangeDate
    label: '合约号',
    value: '',
    name: 'mobileNo'
  },
  {
    type: 'input',
    label: '客户手机号',
    value: '',
    name: 'phone'
  },
  {
    type: 'input',
    label: '客户姓名',
    value: '',
    name: 'customername',
  },
  {
    type: 'input',
    label: '客户身份证号',
    value: '',
    name: 'certid',
  },
]
 
// 表格信息
const tableList = [
  {
    prop: 'applyserialno',
    label: '合同号',
    width: '150px',
    type: 'link'
  },
  {
    prop: 'mobileNo',
    label: '合约号',
    width: '150px'
  },
  {
    prop: 'phone',
    label: '客户手机号',
    width: '150px'
  },
  {
    prop: 'customername',
    label: '客户姓名',
    width: '150px'
  },
  {
    prop: 'businesstermmonth',
    label: '贷款期限',
    width: '150px'
  },
  {
    prop: 'applydateDesc',
    label: '申请时间',
    width: '160px'
  },
  {
    prop: 'loanStatusValue',
    label: '订单状态',
    width: '150px'
  },
  {
    prop: 'fundunitno',
    label: '实际出资方',
    width: '160px'
  },
  {
    prop: 'businesssum',
    label: '贷款金额',
    width: '160px'
  },
  {
    prop: 'principalbalance',
    label: '贷款余额',
    width: '110px'
  },
  {
    prop: 'payTotalAmt',
    label: '剩余应还合计',
    width: '110px'
  }
]
 
export default options => {
  // 接口地址,required
  const api = 'server/hebaoReport/qryHebaoApplyList'
 
  return new ApiModel({
    api,
    formList,
    tableList,
    request(params) {
      return this.post(params)
    },
    computedItem(item) {
      console.log('--', item)
      // 表格部分字段特殊处理
      // const applydateDesc = `${item.applydate} ${item.applytime}`
      return { ...item }
    },
    // computedValue(val, name, list) {
    //   console.log('--', val, name, list)
      //   // 表单部分字段特殊处理(这里为:多选项按接口要求转换为拼接字符串)
    //   const { formList } = this
    //   if (typeof list === 'undefined') {
    //     list = [...formList]
    //   }
    //   if (
    //     formList.some(
    //       ({ attrs = [], name: findName }) =>
    //         attrs.includes('multiple') && findName === name
    //     )
    //   ) {
    //     return Array.isArray(val) ? val.join(',') : val
    //   }
 
    //   return val
    // }
    // computedValues(values = {}) {
    //   const { formList } = this
    //   return Object.keys(values).reduce((pre, curr) => {
    //     // let { name, value } = curr
    //     let value = values[curr]
    //     const findItem = formList.find(
    //       item =>
    //         item.name === curr &&
    //         (Array.isArray(item.attrs) && item.attrs.includes('multiple'))
    //     )
    //     if (findItem && Array.isArray(value)) {
    //       value = value.join(',')
    //     }
    //     pre[curr] = value
    //     return pre
    //   }, {})
    // }
  })
}