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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
<template>
  <div class="apply-info">
    <p v-if="query.transCode === '3003' && conf.edit === 'Y'" class="apply-top-button">
      <!-- <el-button @click="madeCodeImg" size="small">获取签约二维码</!-->
 
      <el-popover placement="top" width="300" v-model="visible" trigger="manual">
        <div class="qrcode-content">
          <p class="qrode-close">
            <i class="el-icon-close" @click="visible = false"></i>
          </p>
          <p class="qrode-title">手机扫码上传</p>
          <p>
            <img :src="codeUrl" />
          </p>
          <p class="qrode-text">手机微信扫描二维码上传影像资料</p>
        </div>
 
        <el-button type="primary" slot="reference" size="small" @click="madeCodeImg">获取签约二维码</el-button>
      </el-popover>
 
      <el-button type="primary" size="small" @click="updateSign">查询账户签约状态</el-button>
    </p>
    <CommForm
      :inline="true"
      :list="computedFormList"
      @updateValue="updateValue"
      ref="applyForm"
      :formValues="formValues"
      :formRules="formRules"
      formType="info"
      title="申请信息"
      :key="key"
    ></CommForm>
    <Dialog
      v-model="isShowDialog"
      icon="succ"
      iconText="提交成功"
      :buttons="[{text: '确定', type: 'primary'}]"
      @handleClick="commitSuccess"
    ></Dialog>
  </div>
</template>
<script>
import { mapMutations } from 'vuex'
import QRCode from 'qrcode'
import dayjs from 'dayjs'
 
// 申请信息详情
import CommForm from '@/components/CommForm'
import Dialog from '@/components/Dialog'
 
import queryCodeValueList from '@/controller/queryCodeValueList'
import getRQCode from '@/controller/getRQCode'
import queryActionBankList from '@/controller/queryActionBankList'
 
// 正常/逾期还款  2001
import normalOrOverduePaymentApplyInfo from '@/controller/normalOrOverduePaymentApplyInfo'
import createNormalOrOverduePayment from '@/controller/createNormalOrOverduePayment'
 
// 提前部分还款 2000
import queryPartPrePaymentApplyInfo from '@/controller/queryPartPrePaymentApplyInfo'
import createPartPrePayment from '@/controller/createPartPrePayment'
 
// 提前结清 2002
import queryPrePaymentApplyInfo from '@/controller/queryPrePaymentApplyInfo'
import createPrepayment from '@/controller/createPrepayment'
 
// 提前结清预约申请/结清预登记 2020
import queryPaymentRegistrationApplyInfo from '@/controller/queryPaymentRegistrationApplyInfo'
import createPaymentRegistration from '@/controller/createPaymentRegistration'
 
// 提前结清规则变更交易 2007
import queryPrepaymentSettleRuleApplyInfo from '@/controller/queryPrepaymentSettleRuleApplyInfo'
import createPrepaymentSettleRule from '@/controller/createPrepaymentSettleRule'
 
// 提交创建利率交易 3002
import queryChangeRateApplyInfo from '@/controller/queryChangeRateApplyInfo'
import createChangeRate from '@/controller/createChangeRate'
 
// 还款账号变更申请 3003
import queryChangeAcctAccountApplyInfo from '@/controller/queryChangeAcctAccountApplyInfo'
import createAcctChangeAcctAccount from '@/controller/createAcctChangeAcctAccount'
 
// 提交创建还款冲账交易 4002
import queryRePaymentWashApplyInfo from '@/controller/queryRePaymentWashApplyInfo'
import createRePaymentWashTrans from '@/controller/createRePaymentWashTrans'
 
// 结清证明发送 T1009
import mailLoanInfo from '@/controller/mailLoanInfo'
import customerContractMailCommit from '@/controller/customerContractMailCommit'
 
// 提交创建还款冲账交易 5005
import queryLoanCancelInfo from '@/controller/queryLoanCancelInfo'
import createLoanCancel from '@/controller/createLoanCancel'
import moneytLossTrial from '@/controller/moneytLossTrial'
 
import getAllCityAreaList from '@/controller/getAllCityAreaList'
import dataSupplementInfo from '@/controller/dataSupplementInfo'
 
// 1001 贷款发放
// 2000 提前部分还款
// 2001 正常/逾期还款
// 2002 提前还/付款
// 2004 认领还款
// 2005 预收息费
// 2006 预收贴息
// 2007 提前还款规则
// 2020 结清预登记
// 2021 提前结清线下认领
// 3002 利率变更
// 3003 还款账户变更
// 3006 还款计划变更
// 3007 贷款展期
// 4002 还款冲账
// 4004 冲认领还款
// 4006 冲预收还款
// 5001 息费减免
// 5002 息费退款
// 5003 退款并还款
// 5004 贴息结算
// 5005 贷款撤销
// 5006 冲贴息结算
// 9090 贷款日终+日初处理
 
export default {
  components: {
    CommForm,
    Dialog
  },
  props: {
    conf: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {
      info: {},
      transCode: '',
      signstatus: '0', // '0':未签约,'1':已签约
      query: {},
      formList: [],
      codeUrl: '',
      key: '0',
      detailModel: null,
      model: null,
      selectModel: null,
      codeModel: null,
      bankModel: null,
      moneyModel: null,
      isShowDialog: false,
      visible: false,
      timmer: null,
      areaModel: null,
      loanModel: null
    }
  },
  created() {
    this.init()
  },
  methods: {
    init() {
      const { query } = this.$route
      const { transCode } = query
      this.query = query
      this.transCode = transCode
      this.selectModel = queryCodeValueList()
      this.codeModel = getRQCode()
      this.bankModel = queryActionBankList()
      this.areaModel = getAllCityAreaList()
 
      if (transCode === '2001') {
        this.detailModel = normalOrOverduePaymentApplyInfo()
        this.model = createNormalOrOverduePayment()
      }
 
      if (transCode === '2000') {
        this.detailModel = queryPartPrePaymentApplyInfo()
        this.model = createPartPrePayment()
      }
 
      if (transCode === '2002') {
        this.detailModel = queryPrePaymentApplyInfo()
        this.model = createPrepayment()
      }
 
      if (transCode === '2020') {
        this.detailModel = queryPaymentRegistrationApplyInfo()
        this.model = createPaymentRegistration()
      }
 
      if (transCode === '2007') {
        this.detailModel = queryPrepaymentSettleRuleApplyInfo()
        this.model = createPrepaymentSettleRule()
      }
 
      if (transCode === '3002') {
        this.detailModel = queryChangeRateApplyInfo()
        this.model = createChangeRate()
      }
 
      if (transCode === '3003') {
        this.detailModel = queryChangeAcctAccountApplyInfo()
        this.model = createAcctChangeAcctAccount()
      }
 
      if (transCode === '4002') {
        this.detailModel = queryRePaymentWashApplyInfo()
        this.model = createRePaymentWashTrans()
      }
 
      if (transCode === 'T1008' || transCode === 'T1009') {
        this.detailModel = mailLoanInfo()
        this.loanModel = dataSupplementInfo(transCode)
        this.model = customerContractMailCommit()
        this.getMailDetail()
        return false
      }
 
      // 贷款撤销申请
      if (transCode === '5005') {
        this.detailModel = queryLoanCancelInfo()
        this.model = createLoanCancel()
        this.moneyModel = moneytLossTrial()
      }
 
      this.getDetail()
    },
 
    async getMailDetail(flg) {
      const { query, detailModel, loanModel } = this
      const { serialNo } = query
      const {
        deliveryWay,
        recipient,
        phone,
        etitle,
        econtent,
        ...other
      } = await detailModel.request({
        serialNo
      })
      const { customerName, phone: loanPhone } = await loanModel.request({
        serialNo
      })
      const defaultEcontent = `尊敬的客户,
 
附件为您申请的结清证明,请查收。
 
顺祝
    商祺!
 
鹏友金融客户服务中心
${dayjs().format('YYYY/MM/DD HH:mm:ss')}
`
      const result = {
        ...other,
        recipient: recipient || customerName,
        phone: phone || loanPhone,
        etitle: etitle || '鹏友金融结清证明',
        econtent: econtent || defaultEcontent,
        deliveryWay: deliveryWay || '1'
      }
      this.info = result
      this.setDeliveryWay(result.deliveryWay)
      this.setForm()
    },
 
    async getDetail(flg) {
      const { query, detailModel } = this
      const { transLogSerialno } = query
      const info = await detailModel.request({
        transLogSerialno
      })
      this.info = { ...info }
      this.signstatus = info.signstatus
      if (flg === 2) {
        this.tipSign()
      } else {
        this.setForm()
      }
    },
 
    async madeCodeImg() {
      const { codeModel, query, visible, signstatus } = this
      const { transLogSerialno } = query
      const values = this.$refs.applyForm.validate()
      if (signstatus === '1') {
        this.$message('该账号已签约成功')
        return false
      }
      if (values) {
        if (!visible) {
          const { url } = await codeModel.request({
            // acctName: values.accountname,
            acctNo: values.accountno,
            bankCode: values.accountingorgid,
            // bankName: values.accountname,
            // code: values.accountname,
            // idNo: values.accountname,
            // idType: values.accountname,
            logSerialno: transLogSerialno,
            signstatus
            // phone: values.accountname
          })
 
          const codeUrl = await QRCode.toDataURL(url)
          this.codeUrl = codeUrl
          this.visible = !visible
        }
      } else {
        this.$message('请录入新还款账户账号及开户行')
      }
    },
 
    async tipSign() {
      const { signstatus } = this
      if (signstatus === '1') {
        this.$message('新账户扣款签约状态更新成功,请确认')
        this.updateValue(
          'accountno',
          {
            rules: [],
            attrs: ['readonly']
          },
          false
        )
        this.updateValue(
          'accountingorgid',
          {
            rules: [],
            attrs: ['disabled']
          },
          false
        )
        this.updateValue(
          'signstatusDesc',
          {
            value: '已签约'
          },
          false
        )
      } else {
        this.updateValue(
          'signstatusDesc',
          {
            value: '未签约'
          },
          false
        )
        this.$message('未签约')
      }
    },
 
    updateSign() {
      const { signstatus } = this
      const values = this.$refs.applyForm.validate()
      if (signstatus === '1') {
        this.$message('该账号已签约成功!')
        return false
      }
      if (values) {
        this.getDetail(2)
      } else {
        this.$message('请录入新还款账户账号及开户行')
      }
    },
 
    setForm() {
      const { model, conf, info, signstatus, transCode } = this
      const formList = model.getFormList(info)
      const { edit } = conf
      if (edit === 'Y') {
        if (transCode === '3003' && signstatus === '1') {
          this.formList = formList.map(item => ({
            ...item,
            attrs: [item.type === 'select' ? 'disabled' : 'readonly']
          }))
        } else {
          this.formList = formList
        }
        this.setSelectOptions()
      } else {
        this.formList = formList.map(item => {
          let { name, descName, value, type, attrs = [] } = item
          if (name === 'accountingorgid') {
            value = info.accountingorgName
          }
          if (name === 'businessType') {
            value = info.businessTypeDesc
          }
          if (type === 'select' && descName) {
            if (attrs.includes('multiple')) {
              // 多选处理
              value = info[descName].join()
            } else {
              value = info[descName]
            }
          }
          return {
            ...item,
            type: 'input',
            value,
            attrs: [...attrs, 'readonly'],
            rules: []
          }
        })
      }
    },
 
    // 更新表单数据
    updateValue(index, info, flg = true) {
      const { formList, transCode, key } = this
      // 由于展示字段与formList个数不一致,index判断会有问题,所以已name为准
      if (info.name) {
        index = info.name
      }
      if (isNaN(index)) {
        // index is name
        index = formList.findIndex(({ name }) => name === index)
      }
 
      if (!isNaN(index) && index > -1) {
        const preInfo = formList[index]
        this.$set(formList, index, { ...preInfo, ...info })
 
        if (flg && transCode === '3003' && preInfo.name === 'accountno') {
          const statusIndex = formList.findIndex(
            ({ name }) => name === 'signstatusDesc'
          )
          this.signstatus = '0'
          this.$set(formList, statusIndex, {
            ...formList[statusIndex],
            value: '未签约'
          })
        }
 
        if (info.name === 'deliveryWay') {
          this.key = key === '0' ? '1' : '0'
          this.setDeliveryWay(info.value)
        }
 
        if (flg && transCode === '5005' && preInfo.name === 'actualpayAmt') {
          this.setFetch({ actualpayAmt: info.value })
        }
 
        if (flg && info.name === 'province') {
          this.getArea('city', '02', info.value)
        }
 
        if (flg && info.name === 'city') {
          this.getArea('regions', '03', info.value)
        }
      }
    },
 
    setFetch(info) {
      const { timmer } = this
      clearTimeout(timmer)
      this.timmer = setTimeout(() => {
        this.getMoneyInfo(info)
      }, 500)
    },
 
    async getMoneyInfo(info) {
      const { moneyModel, query } = this
      const { loanSerialno } = query
      let { actualpayAmt } = info
      actualpayAmt = actualpayAmt === '' ? '0' : actualpayAmt
      const { feeLossAmt, principalLossAmt } = await moneyModel.request({
        actualpayAmt,
        loanSerialNo: loanSerialno
      })
      this.updateValue('feeLossAmt', { value: feeLossAmt }, false)
      this.updateValue('principalLossAmt', { value: principalLossAmt }, false)
    },
 
    // 表单按钮事件处理
    async submit() {
      const { model, query, info, conf, signstatus } = this
      const { transLogSerialno, transCode, serialNo } = query
      const { edit } = conf
      if (edit !== 'Y') {
        return false
      }
      if (transCode === '3003' && signstatus !== '1') {
        this.$message('未签约')
        return false
      }
 
      const values = this.$refs.applyForm.validate()
      let { payAmt, actualPayamt } = values
      // 利率变更申请没有该actualPayamt字段,会导致其他页面报错无法提交
      if (actualPayamt) {
        actualPayamt = actualPayamt.trim()
      }
      if (
        !isNaN(payAmt) &&
        !isNaN(actualPayamt) &&
        Number(actualPayamt) > Number(payAmt)
      ) {
        this.$message('申请还款金额,必须≤最大可申请金额')
        return false
      }
      if (values) {
        // const loading = this.$loading({
        //   fullscreen: true
        // })
        let baseInfo = {}
        if (transCode === 'T1008' || transCode === 'T1009') {
          baseInfo.loanSerialNo = serialNo
        }
        try {
          await model.request({
            ...info,
            ...baseInfo,
            logSerialno: transLogSerialno,
            transCode,
            ...values
          })
          // loading.close()
          // this.getDetail()
          this.isShowDialog = true
        } catch (e) {
          // loading.close()
        }
      } else {
        this.$message.warning('当前页面存在必填项未录入或数据录入错误,请检查!')
      }
    },
 
    // 设置表单下拉菜单
    setSelectOptions() {
      const { formList, transCode } = this
      formList.forEach(({ name, attrs = [] }) => {
        if (
          attrs.some(
            item =>
              (typeof item === 'object' && item.readonly) || item === 'readonly'
          )
        ) {
          return false
        }
        if (name === 'finishTypeArray') {
          this.queryCodeValueList(name, 'FintshType')
        }
        if (name === 'reductionTypeArray') {
          this.queryCodeValueList(name, 'ReductionType')
        }
        if (name === 'sourcesTypeArray') {
          this.queryCodeValueList(name, 'SourcesType')
        }
        if (name === 'prepaymentType') {
          this.queryCodeValueList(name, 'PrepaymentCode2007')
        }
        if (name === 'businessType') {
          this.queryCodeValueList(name, 'WashBusinessType')
        }
        if (name === 'businessTypeDesc') {
          this.queryCodeValueList(name, 'WashBusinessType')
        }
 
        if (transCode === 'T1008' || transCode === 'T1009') {
          if (name === 'deliveryWay') {
            this.queryCodeValueList(name, 'SettleSendType')
          }
          if (name === 'status') {
            this.queryCodeValueList(name, 'MStatus')
          }
 
          if (name === 'province') {
            this.getArea(name)
          }
        }
 
        if (name === 'accountingorgid') {
          this.getBank(name)
        }
      })
    },
 
    // 省市区
    async getArea(name, queryFlag = '01', areaCode = '') {
      const { areaModel, isInitCity, info } = this
      const { city = '' } = info
      const { list } = await areaModel.request({ queryFlag, areaCode })
      const value = isInitCity ? '' : city
 
      if (name === 'province') {
        this.updateValue(name, { options: list, value }, false)
        this.updateValue('city', { options: [], value: '' }, false)
        this.updateValue('regions', { options: [], value: '' }, false)
      }
 
      if (name === 'city' && areaCode) {
        this.updateValue(name, { options: list, value }, false)
        this.updateValue('regions', { options: [], value: '' }, false)
      }
 
      if (name === 'regions' && areaCode) {
        this.updateValue(name, { options: list, value }, false)
      }
    },
 
    // 贷后交易名称下拉列表
    async getBank(name) {
      const { bankModel } = this
      const { list } = await bankModel.request({ status: 3 })
      this.updateValue(name, { options: list })
    },
 
    // 贷后交易名称下拉列表
    async queryCodeValueList(name, codeNo) {
      const { selectModel } = this
      const { list } = await selectModel.request({ codeNo })
      this.updateValue(name, { options: list })
    },
 
    // 提交成功后返回原列表页
    commitSuccess() {
      this.isShowDialog = false
      this.$router.go(-1)
    },
    ...mapMutations(['setDeliveryWay'])
  },
  computed: {
    // 表单值信息
    formValues() {
      const { model, formList } = this
      return model ? model.getFormValues(formList) : {}
    },
    computedFormList() {
      const { formList, formValues, query, conf } = this
      const { transCode } = query
      const { prepaymentType, deliveryWay } = formValues
      const { edit } = conf
      let tempList = [...formList]
 
      if (edit === 'N') {
        // 不可编辑页面必填样式控制
        if (
          transCode === '2002' ||
          transCode === '2020' ||
          transCode === '5005'
        ) {
          const { finishTypeArray, sourcesTypeArray } = formValues
          const finishTypeIndex = tempList.findIndex(
            ({ name }) => name === 'finishTypeArray'
          )
          // 其他结清类型
          const otherFinishTypeIndex = tempList.findIndex(
            ({ name }) => name === 'otherFinishType'
          )
          const sourcesTypeIndex = tempList.findIndex(
            ({ name }) => name === 'sourcesTypeArray'
          )
          // 其他还款来源类型
          const otherSourcesTypeIndex = tempList.findIndex(
            ({ name }) => name === 'otherSourcesType'
          )
          if (finishTypeIndex > -1) {
            if (finishTypeArray.includes('其他')) {
              tempList[otherFinishTypeIndex] = {
                ...tempList[otherFinishTypeIndex],
                rules: ['required']
              }
            } else {
              tempList[otherFinishTypeIndex] = {
                ...tempList[otherFinishTypeIndex],
                rules: []
              }
            }
          }
          if (sourcesTypeIndex > -1) {
            if (sourcesTypeArray.includes('其他')) {
              tempList[otherSourcesTypeIndex] = {
                ...tempList[otherSourcesTypeIndex],
                rules: ['required']
              }
            } else {
              tempList[otherSourcesTypeIndex] = {
                ...tempList[otherSourcesTypeIndex],
                rules: []
              }
            }
          }
        }
        return tempList
      }
 
      if (transCode === '2007') {
        const monthIndex = tempList.findIndex(
          ({ name }) => name === 'prepaymentmonth'
        )
        const rateIndex = tempList.findIndex(
          ({ name }) => name === 'prepaymentRate'
        )
 
        if (monthIndex > -1) {
          if (prepaymentType === '1') {
            tempList[monthIndex] = {
              ...tempList[monthIndex],
              attrs: [],
              rules: ['required']
            }
          } else {
            tempList[monthIndex] = {
              ...tempList[monthIndex],
              value: '',
              attrs: ['readonly'],
              rules: []
            }
          }
        }
 
        if (rateIndex > -1) {
          if (prepaymentType === '2') {
            tempList[rateIndex] = {
              ...tempList[rateIndex],
              attrs: [],
              rules: ['required']
            }
          } else {
            tempList[rateIndex] = {
              ...tempList[rateIndex],
              value: '',
              attrs: ['readonly'],
              rules: []
            }
          }
        }
      }
      // 提前结清申请和提前j结清预约申请必填字段联动问题
      if (
        transCode === '2002' ||
        transCode === '2020' ||
        transCode === '5005'
      ) {
        const { finishTypeArray, sourcesTypeArray } = formValues
        const finishTypeIndex = tempList.findIndex(
          ({ name }) => name === 'finishTypeArray'
        )
        // 其他结清类型
        const otherFinishTypeIndex = tempList.findIndex(
          ({ name }) => name === 'otherFinishType'
        )
        const sourcesTypeIndex = tempList.findIndex(
          ({ name }) => name === 'sourcesTypeArray'
        )
        // 其他还款来源类型
        const otherSourcesTypeIndex = tempList.findIndex(
          ({ name }) => name === 'otherSourcesType'
        )
        if (finishTypeIndex > -1) {
          if (finishTypeArray.indexOf('9') > -1) {
            tempList[otherFinishTypeIndex] = {
              ...tempList[otherFinishTypeIndex],
              rules: ['required']
            }
          } else {
            tempList[otherFinishTypeIndex] = {
              ...tempList[otherFinishTypeIndex],
              rules: []
            }
          }
        }
 
        if (sourcesTypeIndex > -1) {
          if (sourcesTypeArray.indexOf('5') > -1) {
            tempList[otherSourcesTypeIndex] = {
              ...tempList[otherSourcesTypeIndex],
              rules: ['required']
            }
          } else {
            tempList[otherSourcesTypeIndex] = {
              ...tempList[otherSourcesTypeIndex],
              rules: []
            }
          }
        }
      }
 
      if (transCode === 'T1008' || transCode === 'T1009') {
        // 1 电子邮件, 2 邮寄
        const emailKeys = ['email', 'etitle', 'econtent']
        const normalKeys = [
          'province',
          'city',
          'regions',
          'address',
          'zipCode',
          'courierCompany',
          'logisticsNumber',
          'mailingDate',
          'status'
        ]
        let filterKeys = [...emailKeys, ...normalKeys]
 
        if (deliveryWay === '1') {
          filterKeys = [...normalKeys]
        }
        if (deliveryWay === '2') {
          filterKeys = [...emailKeys]
        }
        return tempList.filter(({ name }) => !filterKeys.includes(name))
      }
 
      return tempList
    },
    formRules() {
      const { model, computedFormList } = this
      if (model) {
        return model.getFormRules(computedFormList)
      }
      return {}
    }
  },
  watch: {
    $route() {
      const { transLogSerialno } = this.$route.query
      if (transLogSerialno) {
        this.init()
      }
    }
  }
}
</script>
<style lang="postcss" scoped>
.apply-info {
}
.apply-top-button {
  & >>> .el-button {
    margin-left: 20px;
  }
}
 
.qrcode-content {
  text-align: center;
  padding-bottom: 20px;
  & p {
    margin: 0;
    padding: 0;
    & img {
      vertical-align: middle;
    }
  }
  & .qrode-title {
    color: #222222;
    font-size: 16px;
  }
  & .qrode-close {
    margin-bottom: 10px;
    text-align: right;
    & i {
      cursor: pointer;
      font-size: 18px;
    }
  }
}
</style>