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
<template>
  <div>
    <div class="tab-section" v-if="tableHeader.length === 0">
      <el-tabs v-model="activeName" type="card">
        <el-tab-pane
          v-for="(item, index) in list"
          :key="index"
          :label="item.customername.value"
          :name="`${index}`"
        >
          <FormInfo :info="item" :keys="userBaseInfo" title="个人基本信息" :loading="loading"></FormInfo>
          <FormInfo :info="item" :keys="userBaseSpecialInfo" title="产品个性化信息" :loading="loading"></FormInfo>
        </el-tab-pane>
      </el-tabs>
    </div>
    <div v-else>
      <!-- 佣金贷 -->
      <div v-if="flowno == 'CreditFlowPublic' || productID">
        <FormInfo :info="info" :keys="userBaseInfo" title="借款人基本信息" :loading="loading"></FormInfo>
        <FormInfo :info="info" :keys="controlpeoplenInfo" title="实控人信息" :loading="loading"></FormInfo>
        <KeysTable :list="contactList" :header="creditFlowPublicTableHeader" :isShowPages="false" title="联系人信息"></KeysTable>
      </div>
      <!-- 个人场景贷 -->
      <template v-if="flowno != 'CreditFlowPublic' && !productID">
          <div v-if="flowno == 'CreditFlowCase' || flowno == 'CreditFlowCommon'">
            <FormInfo :info="info" :keys="creditFlowCaseUserBaseInfo" title="借款人基本信息" :loading="loading"></FormInfo>
            <FormInfo :info="info" :keys="creditFlowCaseWorkInfo" title="借款人工作信息" :loading="loading"></FormInfo>
            <FormInfo :info="info" :keys="controlpeoplenInfo" title="实控人信息" :loading="loading"></FormInfo>
            <KeysTable :list="contactList" :header="creditFlowPublicTableHeader" :isShowPages="false" title="联系人信息"></KeysTable>
          </div>
          <div v-else>
            <FormInfo :info="info" :keys="userBaseInfo" title="个人基本信息" :loading="loading"></FormInfo>
            <FormInfo :info="info" :keys="userBaseSpecialInfo" title="产品个性化信息" :loading="loading"></FormInfo>
            <KeysTable :list="contactList" :header="tableHeader" :isShowPages="false" title="联系人信息"></KeysTable>
          </div>
      </template>
      
      
    </div>
  </div>
</template>
<script>
// 借款人信息
import {
  qryCustomerBasicInfo,
  qryCustomerInfoList,
  qryApplyDetail
} from '@comprehensive/serve/public'
import FormInfo from '../FormInfo'
import KeysTable from '../KeysTable'
import {
  userBaseInfo,
  creditFlowCaseUserBaseInfo,
  creditFlowCaseWorkInfo,
  controlpeoplenInfo,
  buildingBusinessFlowUserBaseInfo,
  userBaseSpecialInfo
} from '@comprehensive/utils/formHeaders'
import { contactListHeader } from '@comprehensive/utils/tableHeaders'
import { flownos } from '@comprehensive/utils/comm'
 
export default {
  props: {
    // 申请编号
    serialNo: {
      type: String,
      required: true
    },
    objectType: {
      type: String,
      default: ''
    },
    customerID: {
      type: String,
      default: ''
    },
    flowno: {
      type: String,
 
      // 默认为案场
      default: 'CreditFlowCase'
    }
  },
  components: {
    FormInfo,
    KeysTable
  },
  computed: {
    // 部分产品需要转对公业务
    productID(){
     const {productID,objectType}= this.$route.query
     if(!this.info.borrowertype){
      return productID.indexOf('OFF_') > -1 
     }
     const borrowertype = this.info.borrowertype.value
      const ispubile = borrowertype == '01' && objectType == 'CreditApplyCommon'
     return productID.indexOf('OFF_') > -1 || ispubile
    }
  },
  data() {
    return {
      info: {},
      list: [],
      loading: false,
      activeName: '0',
      userBaseInfo: [],
      // 联系人
      contactList: [],
      tableHeader: [...contactListHeader],
      creditFlowPublicTableHeader: [
        {
          prop: "relativecustomername",
          width: "auto",
          label: "联系人姓名"
        },
        {
          prop: "relationshipDesc",
          width: "auto",
          label: "与借款人关系"
        },
        {
          prop: "phone", 
          width: "auto", 
          label: "联系人手机号码"
        },
        {
          prop: "email",
          width: "auto",
          label: "联系人邮箱"
        },
      ],
      userBaseSpecialInfo: [...userBaseSpecialInfo],
      creditFlowCaseUserBaseInfo: [...creditFlowCaseUserBaseInfo],
      creditFlowCaseWorkInfo: [],
      controlpeoplenInfo: [...controlpeoplenInfo],
      // 案场排除字段
      creditFlowCaseFilter: [
        'borrowerrelationship',
        'idcardexpirationdate',
        'unitproperties',
        'enterprisemain',
        'positionrank',
        'hashomeDesc',
        'homecityDesc',
        'housecountyDesc'
      ],
 
      // 非案场排除字段
      creditFlowCommonFilter: [
        'borrowerrelationship',
        'idcardexpirationdate',
        'positionrank',
        'querycredittype',
        'housecountyDesc'
      ],
 
      // 抵押排除字段
      mortgageFlowFilter: [
        'borrowerrelationship',
        'querycredittype',
        'hashomeDesc',
        'hometel',
        'kosekiprovince',
        'kosekicity',
        'kosekicounty',
        'kosekifulladd'
      ],
 
      // 抵押包含字段
      buildingBusinessFlowFilter: [
        'customername',
        'borrowerrelationship',
        'certtype',
        'certid',
        'phone',
        'marriage',
        'kosekiprovince',
        'kosekicity',
        'kosekicounty',
        'kosekifulladd'
      ],
      // 保理-放款信息排除字段
      CreditFlowPublicFilter: [
        "sysputoutstatus",
        "sysputoutfail",
        "sysputoutchannl",
        "manualputoutflag"
      ]
    }
  },
  created() {
    // this.productID = this.$route.query.productID.indexOf('OFF_') > -1 ? true : false
    if(!this.productID){
      this.creditFlowCaseUserBaseInfo.push({
        label: '邮箱',
        field: 'email'
      },{
        label: '通讯地址(省)',
        field: 'permanentprovinceDesc',
      },
      {
        label: '通讯地址(市)',
        field: 'permanentcity',
        isDesc: true,
      },
      {
        label: '通讯地址(区)',
        field: 'permanentcounty',
        isDesc: true,
      },
      {
        label: '通讯地址(详细)',
        field: 'permanentaddress',
      })
    }
    // 加盟商
    if(this.$route.query.productID.indexOf('JMSJYD') > -1){
      const data =   creditFlowCaseWorkInfo.filter(res=>res.field == 'currentworkingyears')
      this.creditFlowCaseWorkInfo = [...data]
    }else{
      if(this.flowno === 'CreditFlowCommon'){
        const  creditFlowCaseWorkInfos = creditFlowCaseWorkInfo.map(res=>{
            if(res.field == 'jobtitle'){
              res.isDesc = true
            }
            return res
          })
        this.creditFlowCaseWorkInfo = [...creditFlowCaseWorkInfos]
      }else{
        this.creditFlowCaseWorkInfo = [...creditFlowCaseWorkInfo]
      }
      
    }
    setTimeout(() => {
      this.init()
    }, 1000);
  },
  methods: {
    init() {
      const {
        flowno,
        creditFlowCaseFilter,
        creditFlowCommonFilter,
        mortgageFlowFilter,
        CreditFlowPublicFilter
      } = this
      const {
        // 案场
        CreditFlowCase,
 
        // 非案场
        CreditFlowCommon,
 
        // 抵押
        MortgageFlow,
 
        // 赎楼/快贷
        BuildingBusinessFlow,
        //佣金贷(保理)
        CreditFlowPublic,
 
      } = flownos
      let header = []
 
      if (flowno === CreditFlowCase) {
        header = userBaseInfo.filter(
          ({ field }) => !creditFlowCaseFilter.includes(field)
        )
        this.qryCustomerBasicInfo()
      }
 
      if (flowno === CreditFlowCommon) {
        header = userBaseInfo.filter(
          ({ field }) => !creditFlowCommonFilter.includes(field)
        )
        this.qryCustomerBasicInfo()
      }
 
      if (flowno === MortgageFlow) {
        header = userBaseInfo.filter(
          ({ field }) => !mortgageFlowFilter.includes(field)
        )
        this.qryCustomerBasicInfo()
      }
 
      // 赎楼/快贷
      if (flowno === BuildingBusinessFlow) {
        header = [...buildingBusinessFlowUserBaseInfo]
        this.tableHeader = []
        this.activeName = '0'
        this.qryCustomerInfoList()
      }
      //佣金贷
      if (flowno === CreditFlowPublic) {
        header = userBaseInfo.filter(
          ({ field }) => !CreditFlowPublicFilter.includes(field)
        )
        
        this.qryCustomerBasicInfo()
      }
      if(this.productID){
        header[3] = {field:"customercertno",label:"统一社会信用代码"}
      }
      this.userBaseInfo = [...header]
    },
 
    // 查询顶部流程节点状态
    async qryCustomerBasicInfo() {
      sessionStorage.setItem('borrowerPhone','')
      this.loading = true
      const { serialNo, customerID } = this
      const res = await qryCustomerBasicInfo({
        applySerialNo: serialNo,
        customerId: customerID
      })
      this.loading = false
      const { result } = res
      const { contactList, ...other } = result
      this.info = other
      console.log('this.info ====>',this.info)
      sessionStorage.setItem('borrowerPhone',other.phone.value)
      let objs = []
      contactList.forEach(res=>{
        let obj = {}
        for(const key in res) {
          obj[key] = res[key].value
        }
        objs.push(obj)
      })
      
      this.contactList = objs
      console.log('CustomerBasicInfo this.contactList',this.contactList)
    },
 
    // 查询顶部流程节点状态
    async qryCustomerInfoList() {
      this.loading = true
      const { serialNo, customerID } = this
      const res = await qryCustomerInfoList({
        applySerialNo: serialNo,
        customerId: customerID
      })
      this.loading = false
      const { result } = res
      this.list = result
    },
  },
  watch: {
    serialNo() {
      this.init()
    }
  }
}
</script>
 
<style lang="postcss" scoped>
</style>