liangjin
2021-04-01 b3d69d1ed5d25ec57cf50e742100a5e4f61b2301
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
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
<!--
 * @Author: 小明丶
 * @Date: 2020-08-18 10:39:57
 * @LastEditors: 小明丶
 * @LastEditTime: 2020-12-25 11:41:23
 * @Description: 通联通道开通信息录入页面
-->
<template>
  <div class="startOpen-page">
    <v-navbar title="开通通联通道"></v-navbar>
    <div class="info-box">
      <van-cell-group>
        <van-cell title-class="title-class" title="所在省市" :value="addr" is-link @click="show=true" />
        <van-field
          label-class="label-class"
          label-width="100px"
          input-align="right"
          v-model="detailInfo.addr.dtlAddr"
          label="详细地址"
          placeholder="请输入"
        />
        <van-field
          label-class="label-class"
          label-width="150px"
          input-align="right"
          maxlength="11"
          v-model="detailInfo.legalMblNo"
          label="法人手机号"
          placeholder="请输入"
        />
        <van-cell
          title-class="title-class"
          title="商户类型"
          :value="storeTypeStr"
          is-link
          @click="showStore=true"
        />
        <van-cell
          title-class="title-class"
          title="经营类目"
          :value="categoryStr"
          is-link
          @click="showCategory=true"
        />
        <van-field
          label-class="label-class"
          :disabled="isdisabledlegalName"
          v-if="storeType=='02'"
          label-width="130px"
          input-align="right"
          maxlength="8"
          v-model="legalName"
          label="经营者身份证姓名"
          placeholder="请输入"
        />
        <van-field
          v-else
          label-class="label-class"
          :disabled="isdisabledlegalName"
          label-width="130px"
          input-align="right"
          maxlength="8"
          v-model="legalName"
          label="法人身份证姓名"
          placeholder="请输入"
        />
        <van-field
          label-class="label-class"
          :disabled="isdisabledlegalIdNo"
          v-if="storeType=='02'"
          label-width="130px"
          input-align="right"
          maxlength="18"
          v-model="legalIdNo"
          label="经营者身份证号"
          placeholder="请输入"
        />
        <van-field
          v-else
          label-class="label-class"
          :disabled="isdisabledlegalIdNo"
          label-width="130px"
          input-align="right"
          maxlength="18"
          v-model="legalIdNo"
          label="法人身份证号"
          placeholder="请输入"
        />
        <van-field
          label-class="label-class"
          label-width="120px"
          disabled
          center
          clearable
          label="身份证期限类型"
        >
          <template #button>
            <van-button
              size="mini"
              color="#896edb"
              :plain="idType==1?false:true"
              style="border-radius: 3px;width:50px"
              type="primary"
              @click="btnClick(1)"
            >有效期</van-button>
            <van-button
              size="mini"
              color="#896edb"
              :plain="idType==2?false:true"
              style="border-radius: 3px;width:50px"
              type="primary"
              @click="btnClick(2)"
            >长期</van-button>
          </template>
        </van-field>
        <van-cell
          v-show="idType==1"
          title-class="title-class"
          title="身份证有效期"
          :value="detailInfo.legalIdVld"
          is-link
          @click="showIdDate=true"
        />
        <!-- 新增字段 -->
        <van-cell
          title-class="title-class"
          :title="storeType=='02'?'经营者职业':'法人职业'"
          :value="legalOccupStr"
          is-link
          @click="showOccupation=true"
        />
        <van-field
          label-class="label-class"
          label-width="160px"
          input-align="right"
          maxlength="18"
          v-model="detailInfo.busDtl"
          label="经营内容"
          placeholder="请输入"
        />
 
        <van-field
          label-class="label-class"
          :disabled="isdisabledlicenseNo"
          v-if="storeType=='02'"
          label-width="160px"
          input-align="right"
          maxlength="18"
          v-model="licenseNo"
          label="营业执照工商注册号"
          placeholder="请输入"
        />
        <van-field
          v-else
          label-class="label-class"
          :disabled="isdisabledlicenseNo"
          label-width="130px"
          input-align="right"
          maxlength="18"
          v-model="licenseNo"
          label="统一社会信用代码"
          placeholder="请输入"
        />
        <van-field
          label-class="label-class"
          label-width="120px"
          disabled
          center
          clearable
          label="营业执照期限类型"
        >
          <template #button>
            <van-button
              size="mini"
              color="#896edb"
              :plain="yyType==1?false:true"
              style="border-radius: 3px;width:50px"
              type="primary"
              @click="btnClickyy(1)"
            >有效期</van-button>
            <van-button
              size="mini"
              color="#896edb"
              :plain="yyType==2?false:true"
              style="border-radius: 3px;width:50px"
              type="primary"
              @click="btnClickyy(2)"
            >长期</van-button>
          </template>
        </van-field>
        <van-cell
          title-class="title-class"
          v-show="yyType==1"
          title="营业执照有效期"
          :value="detailInfo.licenseVld"
          is-link
          @click="showDate=true"
        />
        <van-cell
          title-class="title-class"
          title="结算方式"
          :value="endTypeStr"
          is-link
          @click="showType=true"
        />
        <van-field
          label-class="label-class"
          v-if="storeType=='02'&&endType=='02'"
          label-width="160px"
          input-align="right"
          maxlength="18"
          v-model="detailInfo.aliLogonId"
          label="支付宝账号"
          placeholder="请输入经营者支付宝账号"
        />
        <van-field
          label-class="label-class"
          v-if="storeType=='03'&&endType=='02'"
          label-width="160px"
          input-align="right"
          maxlength="18"
          v-model="detailInfo.aliLogonId"
          label="支付宝账号"
          placeholder="请输入公司支付宝账号"
        />
        <van-field
          label-class="label-class"
          v-if="storeType=='02'&&endType!='02'"
          label-width="160px"
          input-align="right"
          maxlength="19"
          v-model="detailInfo.bankCardNo"
          label="经营者银行卡号"
          placeholder="请输入"
        />
        <van-field
          label-class="label-class"
          v-if="storeType=='03'&&endType!='02'"
          label-width="160px"
          input-align="right"
          maxlength="30"
          v-model="detailInfo.bankCardNo"
          label="企业对公银行账户号"
          placeholder="请输入"
        />
        <van-field
          label-class="label-class"
          v-if="storeType=='02'&&endType!='02'"
          :disabled="isdisabledlegalName"
          label-width="130px"
          input-align="right"
          maxlength="18"
          v-model="legalName"
          label="经营者银行卡户名"
          placeholder="请输入"
        />
        <van-field
          label-class="label-class"
          v-if="storeType=='03'&&endType!='02'"
          :disabled="isdisabledmerName"
          label-width="160px"
          input-align="right"
          maxlength="18"
          v-model="merName"
          label="企业对公银行账户名称"
          placeholder="请输入"
        />
        <van-field
          label-class="label-class"
          :disabled="accountType?true:false"
          v-if="endType!='02'"
          label-width="140px"
          input-align="right"
          maxlength="18"
          v-model="accountType"
          label="账户类型"
          placeholder="请输入"
        />
        <van-field
          label-class="label-class"
          v-if="storeType=='03'&&endType!='02'"
          label-width="130px"
          input-align="right"
          maxlength="18"
          v-model="detailInfo.contactLine"
          label="开户行联行号"
          placeholder="请输入"
        />
        <van-field
          label-class="label-class"
          v-if="storeType!='03'&&endType!='02'"
          label-width="130px"
          input-align="right"
          maxlength="18"
          v-model="detailInfo.bankAddr.dtlAddr"
          label="开户支行名称"
          placeholder="请输入"
        />
        <van-cell
          title-class="title-class"
          v-if="endType!='02'&&storeType!='03'"
          title="开户支行所在地"
          :value="bankAddr"
          is-link
          @click="showAddress=true"
        />
      </van-cell-group>
      <button class="btn-y" :style="{background:$store.state.defaultColor}" @click="goNext">下一步</button>
      <!-- 省市弹窗 -->
      <van-popup v-model="show" position="bottom" :style="{ height: '30%' }">
        <van-picker
          value-key="name"
          show-toolbar
          title="省市选择"
          :columns="areaInfos"
          @cancel="show=false"
          @confirm="onConfirmArea"
        />
      </van-popup>
      <!-- 商户类型弹窗 -->
      <van-popup v-model="showStore" position="bottom" :style="{ height: '30%' }">
        <van-picker
          value-key="name"
          show-toolbar
          title="商户类型选择"
          :columns="merTypes"
          @cancel="showStore=false"
          @confirm="onConfirmmerTypes"
        />
      </van-popup>
      <!-- 经营类目弹窗 -->
      <van-popup v-model="showCategory" position="bottom" :style="{ height: '30%' }">
        <van-picker
          value-key="name"
          show-toolbar
          title="商户类型选择"
          :columns="categorys"
          @cancel="showCategory=false"
          @confirm="onConfirmmerCategory"
        />
      </van-popup>
      <!-- 营业执照有效期弹窗 -->
      <van-popup v-model="showIdDate" position="bottom" :style="{ height: '40%' }">
        <van-datetime-picker
          v-model="currentIdDate"
          type="date"
          title="选择身份证时间"
          :min-date="minDate"
          :max-date="maxDate"
          @cancel="showIdDate=false"
          @confirm="onConfirmIdDate"
        />
      </van-popup>
      <!-- 营业执照有效期弹窗 -->
      <van-popup v-model="showDate" position="bottom" :style="{ height: '40%' }">
        <van-datetime-picker
          v-model="currentDate"
          type="date"
          title="选择年月日"
          :min-date="minDate"
          :max-date="maxDate"
          @cancel="showDate=false"
          @confirm="onConfirmDate"
        />
      </van-popup>
      <!-- 结算方式弹窗 -->
      <van-popup v-model="showType" position="bottom" :style="{ height: '30%' }">
        <van-picker
          value-key="name"
          show-toolbar
          title="结算方式选择"
          :columns="storeType=='02'?settTypes:settTypes2"
          @cancel="showType=false"
          @confirm="onConfirmsettTypes"
        />
      </van-popup>
      <!-- 开户支行所在地弹窗 -->
      <van-popup v-model="showAddress" position="bottom" :style="{ height: '30%' }">
        <van-picker
          value-key="name"
          show-toolbar
          title="开户支行所在地选择"
          :columns="bankAreaInfos"
          @cancel="showAddress=false"
          @confirm="onConfirmbankArea"
        />
      </van-popup>
      <!-- 经营者职业弹窗 -->
      <van-popup v-model="showOccupation" position="bottom" :style="{ height: '30%' }">
        <van-picker
          value-key="name"
          show-toolbar
          title="职业选择"
          :columns="legalOccups"
          @cancel="showOccupation=false"
          @confirm="onConfirmOccupation"
        />
      </van-popup>
    </div>
  </div>
</template>
<script>
import { mapState, mapGetters } from 'vuex';
export default {
  data() {
    return {
      minDate: new Date(),
      maxDate: new Date(2099, 11, 31),
      currentDate: new Date(),
      currentIdDate: new Date(),
 
      isdisabledlegalName: false, //法人及户名是否禁用
      isdisabledlegalIdNo: false, //身份证号是否禁用
      isdisabledmerName: false, //企业对公银行账户名称是否禁用
      isdisabledlicenseNo: false, //营业执照号是否禁用
 
      show: false, //省市弹出层展示
      showStore: false, //商户类型弹出层
      showCategory:false,//经营类目弹窗层
      showDate: false, //营业执照有效期弹出层
      showIdDate: false, //身份证有效期弹出层
      showType: false, //结算方式弹出层
      showAddress: false, //开户支行所在地弹窗
      showUserSex:false,//经营者性别弹窗 
      showOccupation:false,//经营者职业弹窗
      merTypes: [], //商户类型数组
      categorys:[], //经营类目数组
      settTypes: [], //结算类型数组-个体
      settTypes2:[],//结算类型数组-企业
      areaInfos: [], //地址数组
      bankAreaInfos: [], //银行地址数组
      legalOccups:[],//经营者-法人职业数组
      endType: "", //结算状态-用于判断输入框
      endTypeStr: "", //结算状态字符串
      storeType: "", //商户状态-用于判断输入框
      storeTypeStr: "", //商户状态字符串
      category:'',//经营类目-用于判断输入框
      categoryStr:'',//经营类目字符串
      legalOccupStr:'',//经营者-法人职业字符串
      idType: 1, //身份证有效期类型
      yyType: 1, //营业执照有效期类型
      detailInfo: {
        addr: {
          dtlAddr: "", //省市详细地址
          province: {
            code: "",
            name: "",
          }, //省
          city: {
            code: "",
            name: "",
          }, //市
          area: "", //区
        },
        bankAddr: {
          dtlAddr: "",
          province: {
            code: "",
            name: "",
          },
          city: {
            code: "",
            name: "",
          },
          area: "",
        },
        legalMblNo: "", //法人电话号码
        merType: "", //商户类型
        settType: "", //结算类型
        legalOccup:'',//经营者-法人职业
        busDtl:"",//经营内容
        bankCardNo: "", //银行卡号
        aliLogonId: "", //支付宝账号
        licenseVld: "", //社会信用代码证有效期
        legalIdVld: "", //法人身份证有效期
      },
      legalIdNo: "", //法人身份证号
      legalName: "", //法人姓名
      licenseNo: "", //商户营业执照号
      merName: "", //商户名称
    };
  },
  computed: {
    ...mapState(['userinfo']),
    accountType() {
      if (this.detailInfo.merType == "02") {
        return "对私";
      }
      if (this.detailInfo.merType == "03") {
        return "对公";
      }
    },
    addr() {
      let str = "";
      let _this = this;
      if (_this.detailInfo.addr.province.code) {
        _this.areaInfos.forEach((e) => {
          if (e.code == _this.detailInfo.addr.province.code) {
            e.children.forEach((i) => {
              if (i.code == _this.detailInfo.addr.city.code) {
                str = e.name + "/" + i.name;
              }
            });
          }
        });
        return str;
      }
    },
    bankAddr() {
      let str = "";
      let _this = this;
      if (_this.detailInfo.bankAddr.province.code) {
        _this.bankAreaInfos.forEach((e) => {
          if (e.code == _this.detailInfo.bankAddr.province.code) {
            e.children.forEach((i) => {
              if (i.code == _this.detailInfo.bankAddr.city.code) {
                str = e.name + "/" + i.name;
              }
            });
          }
        });
        return str;
      }
    },
  },
  created() {
    this.init();
  },
  methods: {
    /**
     * @description:获取页面初始化信息
     * @return void
     * **/
    init() {
      this.$api.tltMerOpenInit().then((res) => {
        // 附值弹出层选择项
        this.merTypes = res.body.merTypes;
        this.categorys = res.body.merMccs;
        this.settTypes = res.body.settTypes;//个体工商户结算类型
        this.settTypes2 = [res.body.settTypes[0]];//企业商户只能选银行卡
        this.areaInfos = res.body.areaInfos;
        this.bankAreaInfos = res.body.bankAreaInfos;
        this.legalOccups = res.body.legalOccups;
        // 如果初始化接口拿到信息并且本地没有保存信息,显示取初始化信息
        if (res.body.detailInfo && !sessionStorage.getItem(`sib_tl_openInfo_${this.userinfo.orgId}`)) {
          this.detailInfo = res.body.detailInfo;
          // 处理两个地址
          if (!res.body.detailInfo.addr) {
            this.detailInfo.addr = {
              dtlAddr: "", //省市详细地址
              province: {
                code: "",
                name: "",
              }, //省
              city: {
                code: "",
                name: "",
              }, //市
              area: "", //区
            };
          }
          if (!res.body.detailInfo.bankAddr) {
            this.detailInfo.bankAddr = {
              dtlAddr: "",
              province: {
                code: "",
                name: "",
              },
              city: {
                code: "",
                name: "",
              },
              area: "",
            };
          }
          // 获取选择框值
          this.storeType = res.body.detailInfo.merType;
          this.category = res.body.detailInfo.merMcc;
          this.endType = res.body.detailInfo.settType;
          // 循环取出对应名字
          // 商户类型
          this.merTypes.forEach((e) => {
            if (e.code == this.detailInfo.merType) {
              this.storeTypeStr = e.name;
            }
          });
          // 经营类目
          this.categorys.forEach((e) => {
            if (e.code == this.detailInfo.merMcc) {
              this.categoryStr = e.name;
            }
          });
          // 结算类型
          this.settTypes.forEach((e) => {
            if (e.code == this.detailInfo.settType) {
              this.endTypeStr = e.name;
            }
          });
          this.legalOccups.forEach(item=>{
            if(item.code == this.detailInfo.legalOccup){
              this.legalOccupStr = item.name
            }
          })
          // 处理图片
          let picIdList = {
            licencePhotos: this.detailInfo.licencePhotos,
            cardFrontPhotos: this.detailInfo.cardFrontPhotos,
            cardBackPhotos: this.detailInfo.cardBackPhotos,
            handCardPhotos: this.detailInfo.handCardPhotos,
            storeInnerPhotos: this.detailInfo.storeInnerPhotos,
            storeSignPhotos: this.detailInfo.storeSignPhotos,
            industryLicensePhotos: this.detailInfo.industryLicensePhotos,
          };
          // 进行本地存储图片列表
          sessionStorage.setItem(`sib_tl_pic_${this.userinfo.orgId}`, JSON.stringify(picIdList));
        } 
        // 本地有存储则返显存储信息,显示存储信息的情况仅限输入跳转下一页又返回这种情况,一旦开通成功则清除了本地存储
        if(sessionStorage.getItem(`sib_tl_openInfo_${this.userinfo.orgId}`)) {
          this.idType = JSON.parse(
            sessionStorage.getItem(`sib_tl_openInfo_${this.userinfo.orgId}`)
          ).idType;
          this.yyType = JSON.parse(sessionStorage.getItem(`sib_tl_openInfo_${this.userinfo.orgId}`)).yyType
          this.detailInfo = JSON.parse(
            sessionStorage.getItem(`sib_tl_openInfo_${this.userinfo.orgId}`)
          ).detailInfo;
          this.storeType = this.detailInfo.merType;
          this.merTypes.forEach((e) => {
            if (e.code == this.detailInfo.merType) {
              this.storeTypeStr = e.name;
            }
          });
          this.category = this.detailInfo.merMcc;
          this.categorys.forEach((e) => {
            if (e.code == this.detailInfo.merMcc) {
              this.categoryStr = e.name;
            }
          });
          this.endType = this.detailInfo.settType;
          this.settTypes.forEach((e) => {
            if (e.code == this.detailInfo.settType) {
              this.endTypeStr = e.name;
            }
          });
          this.legalOccups.forEach(item=>{
            if(item.code == this.detailInfo.legalOccup){
              this.legalOccupStr = item.name
            }
          })
        }
        // 下列字段有则返显不可编辑,无则可输入
        if (res.body.legalIdNo) {
          this.isdisabledlegalIdNo = true;
        }
        if (res.body.legalName) {
          this.isdisabledlegalName = true;
        }
        if (res.body.merName) {
          this.isdisabledmerName = true;
        }
        if (res.body.licenseNo) {
          this.isdisabledlicenseNo = true;
        }
        this.legalIdNo = res.body.legalIdNo;
        this.legalName = res.body.legalName;
        this.licenseNo = res.body.licenseNo;
        this.merName = res.body.merName;
      });
    },
    /**
     * @description:省份选择
     * @return void
     * **/
    onConfirmArea(indexText, indexList) {
      /**
       * 根据索引获取对应的省市code值
       * **/
      this.detailInfo.addr.province.code = this.areaInfos[indexList[0]].code;
      this.detailInfo.addr.city.code = this.areaInfos[indexList[0]].children[
        indexList[1]
      ].code;
      this.detailInfo.addr.province.name = this.areaInfos[indexList[0]].name;
      this.detailInfo.addr.city.name = this.areaInfos[indexList[0]].children[
        indexList[1]
      ].name;
      this.show = false;
    },
    /**
     * @description:开户行地址选择
     * @return void
     * **/
    onConfirmbankArea(indexText, indexList) {
      /**
       * 根据索引获取对应的省市code值
       * **/
      this.detailInfo.bankAddr.province.code = this.bankAreaInfos[
        indexList[0]
      ].code;
      this.detailInfo.bankAddr.city.code = this.bankAreaInfos[
        indexList[0]
      ].children[indexList[1]].code;
      this.detailInfo.bankAddr.province.name = this.bankAreaInfos[
        indexList[0]
      ].name;
      this.detailInfo.bankAddr.city.name = this.bankAreaInfos[
        indexList[0]
      ].children[indexList[1]].name;
      this.showAddress = false;
    },
    /**
     * @description:身份证时间选择
     * @return void
     * **/
    onConfirmIdDate() {
      console.log(this.currentIdDate.getDate());
      let timeStr =
        this.currentIdDate.getFullYear() +
        "-" +
        (this.currentIdDate.getMonth() + 1) +
        "-" +
        this.currentIdDate.getDate();
      this.detailInfo.legalIdVld = timeStr;
      this.showIdDate = false;
    },
    /**
     * @description:商户类型选择成功
     * @param {Object} 选择的信息
     * @return void
     * **/
    onConfirmmerTypes(value) {
      this.detailInfo.merType = value.code;
      this.storeType = value.code;
      this.storeTypeStr = value.name;
      // 企业商户只能使用银行卡,故此在选择企业03时 对下面结算框手动更改
      if(this.storeType == '03'){
        this.detailInfo.settType = '01';
        this.endType = '01';
        this.endTypeStr = '银行卡';
      }
      this.showStore = false;
    },
     /**
     * @description:经营类目选择成功
     * @param {Object} 选择的信息
     * @return void
     * **/
    onConfirmmerCategory(value){
      this.detailInfo.merMcc = value.code;
      this.category = value.code;
      this.categoryStr = value.name;
      this.showCategory = false;
    },
    /**
     * @description:结算类型选择成功
     * @param {Object} 选择的信息
     * @return void
     * **/
    onConfirmsettTypes(value) {
      this.detailInfo.settType = value.code;
      this.endType = value.code;
      this.endTypeStr = value.name;
      this.showType = false;
    },
    /**
     * @description:营业执照有效期选择
     * @return void
     * **/
    onConfirmDate() {
      let timeStr =
        this.currentDate.getFullYear() +
        "-" +
        (this.currentDate.getMonth() + 1) +
        "-" +
        this.currentDate.getDate();
      this.detailInfo.licenseVld = timeStr;
      this.showDate = false;
    },
    /**
     * @description:法人-经营者职业选择
     * @return void
     * **/
    onConfirmOccupation(val){
      this.legalOccupStr = val.name
      this.detailInfo.legalOccup = val.code
      this.showOccupation = false
    },
    /**
     * @description:身份证有效期类型选择
     * @param {Number} 类型
     * @return void
     * **/
    btnClick(id) {
      console.log(this.addr);
      this.detailInfo.legalIdVld = "";
      if (id == 1) {
        this.idType = 1;
      } else {
        this.idType = 2;
        this.detailInfo.legalIdVld = "2099-12-31";
      }
    },
    /**
     * @description:营业执照有效期类型选择
     * @param {Number} 类型
     * @return void
     * **/
    btnClickyy(id) {
      this.detailInfo.licenseVld = "";
      if (id == 1) {
        this.yyType = 1;
      } else {
        this.yyType = 2;
        this.detailInfo.licenseVld = "2099-12-31";
      }
    },
    /**
     * @description:下一步
     * @return void
     * **/
    goNext() {
      let obj = {},
        openObj = {};
      /**
       * 校验
       * **/
      if (this.$tool.checkValEmpty(this.detailInfo.addr.province.code)) {
        this.$notify_success("请选择省市");
        return false;
      }
      if (this.$tool.checkValEmpty(this.detailInfo.addr.dtlAddr)) {
        this.$notify_success("请填写具体地址");
        return false;
      }
      if (this.$tool.checkValEmpty(this.detailInfo.legalMblNo)) {
        this.$notify_success("请填写法人手机号");
        return false;
      }
      if (this.$tool.checkValEmpty(this.detailInfo.merType)) {
        this.$notify_success("请选择商户类型");
        return false;
      }
      if (this.$tool.checkValEmpty(this.detailInfo.merMcc)) {
        this.$notify_success("请选择经营类目");
        return false;
      }
      if (this.$tool.checkValEmpty(this.legalName)) {
        if (this.storeType == "02") {
          this.$notify_success("请填写经营者身份证姓名");
        } else {
          this.$notify_success("请填写法人身份证姓名");
        }
        return false;
      }
      if (this.$tool.checkValEmpty(this.legalIdNo)) {
        if (this.storeType == "02") {
          this.$notify_success("请填写经营者身份证号");
        } else {
          this.$notify_success("请填写法人身份证号");
        }
        return false;
      }
      if (this.$tool.checkValEmpty(this.detailInfo.legalIdVld)) {
        this.$notify_success("请选择身份证有效期");
        return false;
      }
      if (this.$tool.checkValEmpty(this.detailInfo.legalOccup)) {
        if (this.storeType == "02") {
          this.$notify_success("请选择经营者职业");
        } else {
          this.$notify_success("请选择法人职业");
        }
        return false;
      }
      if (this.$tool.checkValEmpty(this.detailInfo.busDtl)) {
        this.$notify_success("请输入经营内容");
        return false;
      }
      if (this.$tool.checkValEmpty(this.licenseNo)) {
        if (this.storeType == "02") {
          this.$notify_success("营业执照工商注册号");
        } else {
          this.$notify_success("请填写统一社会信用代码");
        }
        return false;
      }
      if (this.$tool.checkValEmpty(this.detailInfo.licenseVld)) {
        this.$notify_success("请选择营业执照有效期");
        return false;
      }
      if (this.$tool.checkValEmpty(this.detailInfo.settType)) {
        this.$notify_success("请选择结算类型");
        return false;
      }
      if (this.$tool.checkValEmpty(this.detailInfo.bankCardNo) && this.endType == "01") {
        if (this.storeType == "02" && this.endType == "01") {
          this.$notify_success("请填写经营者银行卡号");
        } 
        if(this.storeType == "03" && this.endType == "01") {
          this.$notify_success("请填写企业对公银行账户号");
        }
        return false;
      }
      if (this.$tool.checkValEmpty(this.accountType) && this.endType == "01") {
        this.$notify_success("请填写账户类型(对公/对私)");
        return false;
      }
      if (
        this.$tool.checkValEmpty(this.detailInfo.contactLine) &&
        this.storeType=='03' && this.endType!='02'
      ) {
        this.$notify_success("请填写开户行联行号");
        return false;
      }
      if (
        this.$tool.checkValEmpty(this.detailInfo.bankAddr.dtlAddr) &&
        this.endType == "01"&&this.storeType!='03'
      ) {
        this.$notify_success("请输入开户行名称");
        return false;
      }
      if (
        this.$tool.checkValEmpty(this.detailInfo.bankAddr.province.code) &&
        this.endType == "01"&&this.storeType!='03'
      ) {
        this.$notify_success("请选择开户支行所在地");
        return false;
      }
      if (
        this.$tool.checkValEmpty(this.detailInfo.aliLogonId) &&
        this.endType == "02"
      ) {
        this.$notify_success("请填写支付宝账号");
        return false;
      }
 
      obj.legalIdNo = this.legalIdNo //法人身份证号
      obj.legalName = this.legalName //法人姓名
      obj.licenseNo = this.licenseNo //商户营业执照号
      obj.merName = this.merName //商户名称
      obj.idType = this.idType
      obj.yyType = this.yyType
      openObj = { ...obj, detailInfo: this.detailInfo };
      sessionStorage.setItem(`sib_tl_openInfo_${this.userinfo.orgId}`, JSON.stringify(openObj));
      this.$router.push({
        path: "/tonglian/store-pictures",
        query: {
          ...this.$route.query,
        },
      });
    },
  },
};
</script>
<style lang="less" scoped>
.startOpen-page {
  & {
    min-height: 100vh;
    background: #f5f5f7;
  }
  /deep/.label-class {
    font-size: 14px;
    color: #333;
  }
  /deep/.title-class {
    font-size: 14px;
  }
  .info-box {
    margin-top: 10px;
    width: 96vw;
    margin-left: 2vw;
  }
  .btn-y {
    width: 78%;
    margin-left: 11%;
    margin-top: 40px;
    height: 44px;
    background: #896edb;
    border-radius: 22px;
    color: #fff;
    outline: none;
    border: 0;
    margin-bottom: 30px;
    
  }
}
</style>