legalPersonListModal.vue
35.3 KB
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
<template>
<a-modal
:title="title"
:width="1000"
:centered="false"
:visible="visible"
:okButtonProps="{ props: {disabled: disableSubmit} }"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
cancelText
:maskClosable="false"
style="top:20px;"
class="scoped-person"
>
<a-tabs defaultActiveKey="1" v-model="defaultTabKey" @change="callback" :animated="false">
<a-tab-pane tab="客户详情" key="1">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-card title="申请产品信息" :bordered="false">
<a-row :gutter="24">
<a-col :span="10">
<a-form-item label="产品分类名称" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-select
v-decorator="[ 'productCategoryNo', {'initialValue':productCategoryNo?productCategoryNo:''}]"
:disabled="disableSubmit"
placeholder="请选择产品分类名称"
>
<a-select-option
v-for="(item, index) in dbProductCategory"
:key="index"
:value="item.name"
>{{item.title}}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="10">
<a-form-item label="申请时间" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
v-decorator="[ 'creditApplyTime',{'initialValue':creditApplyTime?creditApplyTime:''}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
</a-row>
</a-card>
<a-card title="企业法定代表人信息" :bordered="false">
<a-layout>
<a-layout-content style="background:#fff;">
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="姓名" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入姓名"
v-decorator="[ 'cusBasicInfo.idCardName',{'initialValue':cusBasicInfo?cusBasicInfo.idCardName:'',rules:[{required: true,message: '请输入姓名'}]}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="性别" :labelCol="{span:8}" :wrapperCol="{span:16}">
<j-dict-select-tag
v-decorator="[ 'cusBasicInfo.sex',{'initialValue':cusBasicInfo?cusBasicInfo.sex:''}]"
dictCode="sex"
:disabled="onlyread"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="民族" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入民族"
v-decorator="[ 'cusBasicInfo.nation',{'initialValue':cusBasicInfo?cusBasicInfo.nation:''}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="出生日期" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-date-picker
style="width: 100%"
v-decorator="['cusBasicInfo.birthday', {initialValue:!cusBasicInfo?null:moment(cusBasicInfo.birthday,dateFormat)}]"
:disabled="disableSubmit"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col v-if="disableSubmit" :span="12">
<a-form-item label="手机号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入手机号"
v-decorator="[ 'cusBasicInfo.mobilePhone',{'initialValue':cusBasicInfo?cusBasicInfo.mobilePhoneView:'',rules:[{required: true,message: '请输入手机号'}]}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<a-col v-else :span="12">
<a-form-item label="手机号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入手机号"
v-decorator="[ 'cusBasicInfo.mobilePhone',{'initialValue':cusBasicInfo?cusBasicInfo.mobilePhone:'',rules:[{required: true,message: '请输入手机号'}]}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<a-col v-if="disableSubmit" :span="12">
<a-form-item label="身份证号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入身份证号"
v-decorator="[ 'cusBasicInfo.idCardNo',{'initialValue':cusBasicInfo?cusBasicInfo.idCardNoView:'',rules:[
{ required: true, pattern: /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/, message: '请输入身份证号' }
]}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<a-col v-else :span="12">
<a-form-item label="身份证号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入身份证号"
v-decorator="[ 'cusBasicInfo.idCardNo',{'initialValue':cusBasicInfo?cusBasicInfo.idCardNo:'',rules:[
{ required: true, pattern: /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/, message: '请输入身份证号' }
]}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="有效期" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-date-picker
style="width: 100%"
v-decorator="['cusBasicInfo.idCardStartValidity', {initialValue:!cusBasicInfo?null:moment(cusBasicInfo.idCardStartValidity,dateFormat)}]"
:disabled="onlyread && disableSubmit"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="至" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-date-picker
style="width: 100%"
v-decorator="['cusBasicInfo.idCardEndValidity', {initialValue:!cusBasicInfo?null:moment(cusBasicInfo.idCardEndValidity,dateFormat)}]"
:disabled="onlyread && disableSubmit"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-form-item label="住址" :labelCol="{span:4}" :wrapperCol="{span:19}">
<a-input
placeholder="请输入住址"
v-decorator="[ 'cusBasicInfo.address',{'initialValue':cusBasicInfo?cusBasicInfo.address:''}]"
:readOnly="onlyread && disableSubmit"
/>
</a-form-item>
</a-row>
<a-row :gutter="24">
<a-form-item label="发证机关" :labelCol="{span:4}" :wrapperCol="{span:19}">
<a-input
placeholder="请输入发证机关"
v-decorator="[ 'cusBasicInfo.issuanceAuthority',{'initialValue':cusBasicInfo?cusBasicInfo.issuanceAuthority:''}]"
:readOnly="onlyread && disableSubmit"
/>
</a-form-item>
</a-row>
</a-layout-content>
<a-layout-sider style="background:#fff;">
<div
class="scoped-img"
style="display: flex;align-items: center;flex-direction: column;"
>
<a-form-item label="身份证正面照片" style="text-align:center;">
<a-upload
name="file"
listType="picture-card"
class="avatar-uploader"
accept="image/*"
:showUploadList="false"
:action="url.upload"
v-decorator="[ 'cusBasicInfo.idCardUrl', {'initialValue':cusBasicInfo?cusBasicInfo.idCardUrl:'',rules:[{required: true,message: '请上传身份证正面'}]}]"
@change="handleChangeFront"
:disabled="onlyread && disableSubmit"
>
<img
v-if="imageUrlFront"
:src="imageUrlFront"
alt="avatar"
style="max-width:200px;max-height:200px;"
/>
<div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" />
<div class="ant-upload-text">Upload</div>
</div>
</a-upload>
</a-form-item>
</div>
<div
class="scoped-img"
style="display: flex;align-items: center;flex-direction: column;"
>
<a-form-item label="身份证反面照片" style="text-align:center;">
<a-upload
name="file"
listType="picture-card"
class="avatar-uploader"
accept="image/*"
:showUploadList="false"
:action="url.upload"
v-decorator="[ 'cusBasicInfo.idCardBackUrl', {'initialValue':cusBasicInfo?cusBasicInfo.idCardBackUrl:'',rules:[{required: true,message: '请上传身份证反面'}]}]"
@change="handleChangeBack"
:disabled="onlyread && disableSubmit"
>
<img
v-if="imageUrlBack"
:src="imageUrlBack"
alt="avatar"
style="max-width:200px;max-height:200px;"
/>
<div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" />
<div class="ant-upload-text">Upload</div>
</div>
</a-upload>
</a-form-item>
</div>
</a-layout-sider>
</a-layout>
</a-card>
<a-card title="企业基本信息" :bordered="false">
<a-layout>
<a-layout-content style="background:#fff;">
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="企业名称" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入企业名称"
v-decorator="[ 'cusEnterpriseBasicInfo.enterpriseName',{'initialValue':enterpriseBasicInfo?enterpriseBasicInfo.enterpriseName:'',rules:[{required: true,message: '请输入企业名称'}]}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="注册类型" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-select
v-decorator="[ 'cusEnterpriseBasicInfo.registeredType', {'initialValue':enterpriseBasicInfo?enterpriseBasicInfo.registeredType:''}]"
placeholder="请选择"
:disabled="onlyread"
>
<a-select-option
v-for="(item, index) in registerType"
:key="index"
:value="item.value"
>{{item.label}}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="统一社会信用代码" :labelCol="{span:12}" :wrapperCol="{span:12}">
<a-input
placeholder="统一社会信用代码"
v-decorator="[ 'cusEnterpriseBasicInfo.orgCode',{'initialValue':enterpriseBasicInfo?enterpriseBasicInfo.orgCode:'',rules:[{required: true,message: '请输入统一社会信用代码'}]}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="注册日期" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-date-picker
style="width: 100%"
v-decorator="['cusEnterpriseBasicInfo.orglicenseStartValidity', {initialValue:!enterpriseBasicInfo || !enterpriseBasicInfo.orglicenseStartValidity?null:moment(enterpriseBasicInfo.orglicenseStartValidity,dateFormat)}]"
:disabled="onlyread && disableSubmit"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="到期日期" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-date-picker
style="width: 100%"
v-decorator="['cusEnterpriseBasicInfo.orglicenseEndValidity', {initialValue: !enterpriseBasicInfo || !enterpriseBasicInfo.orglicenseEndValidity?null:moment(enterpriseBasicInfo.orglicenseEndValidity,dateFormat)}]"
:disabled="onlyread && disableSubmit"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="企业规模" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入企业规模"
v-decorator="['cusEnterpriseBasicInfo.enterpriseScale',{'initialValue':enterpriseBasicInfo?enterpriseBasicInfo.enterpriseScale:''}]"
:readOnly="onlyread && disableSubmit"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="注册资本" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
v-decorator="['cusEnterpriseBasicInfo.registeredCapital',{'initialValue':enterpriseBasicInfo?enterpriseBasicInfo.registeredCapital:''}]"
:readOnly="onlyread && disableSubmit"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-form-item label="注册地址" :labelCol="{span:4}" :wrapperCol="{span:19}">
<a-input
placeholder="请输入注册地址"
v-decorator="['cusEnterpriseBasicInfo.address',{'initialValue':enterpriseBasicInfo?enterpriseBasicInfo.address:''}]"
:readOnly="onlyread && disableSubmit"
/>
</a-form-item>
</a-row>
<a-row :gutter="24">
<a-form-item label="实际经营地址" :labelCol="{span:5}" :wrapperCol="{span:18}">
<a-input
placeholder="请输入实际经营地址"
v-decorator="['cusEnterpriseBasicInfo.actualBusinessAddress',{'initialValue':enterpriseBasicInfo?enterpriseBasicInfo.actualBusinessAddress:''}]"
:readOnly="onlyread && disableSubmit"
/>
</a-form-item>
</a-row>
<a-row :gutter="24">
<a-form-item label="经营范围" :labelCol="{span:4}" :wrapperCol="{span:18}">
<a-textarea
rows="4"
placeholder="请输入经营范围"
v-decorator="['cusEnterpriseBasicInfo.businessScope',{'initialValue':enterpriseBasicInfo?enterpriseBasicInfo.businessScope:''}]"
:readOnly="onlyread && disableSubmit"
/>
</a-form-item>
</a-row>
</a-layout-content>
<a-layout-sider style="background:#fff;">
<div
class="scoped-img"
style="display: flex;align-items: center;flex-direction: column;position: relative;top: 10%;"
>
<a-form-item label="营业执照" style="text-align:center;">
<a-upload
name="file"
listType="picture-card"
class="avatar-uploader"
accept="image/*"
:showUploadList="false"
:action="url.upload"
v-decorator="[ 'cusEnterpriseBasicInfo.licenceUrl', {'initialValue':enterpriseBasicInfo?enterpriseBasicInfo.licenceUrl:'',rules:[{required: true,message: '请上传身份证反面'}]}]"
@change="handleChangePermit"
:disabled="onlyread && disableSubmit"
>
<img
v-if="imageUrlPermit"
:src="imageUrlPermit"
alt="avatar"
style="max-width:240px;max-height:360px;"
/>
<div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" />
<div class="ant-upload-text">Upload</div>
</div>
</a-upload>
</a-form-item>
</div>
</a-layout-sider>
</a-layout>
</a-card>
<a-card title="经办人信息" :bordered="false">
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="姓名" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入姓名"
v-decorator="[ 'agent.agentName',{'initialValue':agent?agent.agentName:''}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<a-col v-if="disableSubmit" :span="12">
<a-form-item label="手机号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入手机号"
v-decorator="[ 'agent.mobilePhone',{'initialValue':agent?agent.mobilePhoneView:''}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<a-col v-else :span="12">
<a-form-item label="手机号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入手机号"
v-decorator="[ 'agent.mobilePhone',{'initialValue':agent?agent.mobilePhone:''}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col v-if="disableSubmit" :span="12">
<a-form-item label="身份证号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入身份证号"
v-decorator="[ 'agent.idCardNo',{'initialValue':agent?agent.idCardNoView:''}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<a-col v-else :span="12">
<a-form-item label="身份证号" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-input
placeholder="请输入身份证号"
v-decorator="[ 'agent.idCardNo',{'initialValue':agent?agent.idCardNo:''}]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<!-- <a-col :span="12">
<a-form-item label="与经办人关系" :labelCol="{span:8}" :wrapperCol="{span:16}">
<a-select v-decorator="[ 'agent.relation',{'initialValue':agent?agent.relation:''}]" placeholder="请选择">
<a-select-option v-for="(item, index) in selectTionRelation" :key="index" :value="item.name">
{{item.title}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>-->
</a-row>
<a-row :gutter="24" v-show="!disableSubmit" style="float:right;margin-right:20px;">
<a-button style="margin-right:10px;" @click="handleCancel">取消</a-button>
<a-button type="primary" @click="handleSubmit">确定</a-button>
</a-row>
</a-card>
</a-form>
</a-spin>
<company-account-table
:userType="3"
:cusPublicBankAccounts.sync="publicBankAccountList"
:customerNo.sync="customerNo"
@editReload="editReload"
></company-account-table>
<common-link-man-table
:userType="3"
:contactsInfoList.sync="contactsInfoList"
:customerNo.sync="customerNo"
@editReload="editReload"
></common-link-man-table>
<common-bank-account-table
:userType="3"
:privateBankAccountList.sync="privateBankAccountList"
:customerNo.sync="customerNo"
@editReload="editReload"
></common-bank-account-table>
<company-shareholder-table
:userType="3"
:stockholderList.sync="stockholderList"
:customerNo.sync="customerNo"
@editReload="editReload"
></company-shareholder-table>
<common-attachment-table
:userType="3"
:attachmentList.sync="attachmentList"
:customerNo.sync="customerNo"
@editReload="editReload"
></common-attachment-table>
<common-text-table
:userType="3"
:objDataList.sync="objDataList"
:customerNo.sync="customerNo"
@editReload="editReload"
></common-text-table>
</a-tab-pane>
<a-tab-pane tab="资料补充" key="2" forceRender>
<company-supplement-upload
:userType="3"
ref="supplement"
:customerNo.sync="customerNo"
:creditApplyAmount.sync="creditApplyAmount"
:disableSubmit.sync="disableSubmit"
@close="close"
></company-supplement-upload>
</a-tab-pane>
<a-tab-pane tab="电核记录" key="3" forceRender>
<common-electrical-energy :userType="3" ref="electrical" :customerNo.sync="customerNo"></common-electrical-energy>
</a-tab-pane>
<a-tab-pane tab="审批记录" key="4" forceRender>
<common-approval-record :userType="3" ref="approval" :creditApplyNo.sync="creditApplyNo"></common-approval-record>
</a-tab-pane>
</a-tabs>
</a-modal>
</template>
<script>
function getBase64(img, callback) {
const reader = new FileReader()
reader.addEventListener('load', () => callback(reader.result))
reader.readAsDataURL(img)
}
import JDictSelectTag from '@/components/dict/JDictSelectTag.vue'
import moment from 'moment'
import pick from 'lodash.pick'
import { queryCollLegalPersonApplyDetail, legalSaveOrUpdate, postAction } from '@/api/configApi'
import { JeecgListMixin } from '@/mixins/CoreListMixin'
import companySupplementUpload from './company/companySupplementUpload' // tab切换 资料补充
import commonApprovalRecord from './common/commonApprovalRecord' // tab切换 审批记录
import commonElectricalEnergy from './common/commonElectricalEnergy' // tab切换 电核记录
import companyAccountTable from './company/companyAccountTable'
import commonLinkManTable from './common/commonLinkManTable'
import commonBankAccountTable from './common/commonBankAccountTable'
import companyShareholderTable from './company/companyShareholderTable'
import commonAttachmentTable from './common/commonAttachmentTable'
import commonTextTable from './common/commonTextTable'
import { registerType } from '@/data/params'
export default {
name: 'CompanyInformationListModal',
mixins: [JeecgListMixin],
components: {
companySupplementUpload, // 资料补充
commonApprovalRecord, // 审批记录
commonElectricalEnergy, // 电核记录
companyAccountTable, // 企业账户信息
commonLinkManTable, // 联系人信息
commonBankAccountTable, // 法定代表人银行账户信息
companyShareholderTable, // 企业股东信息
commonAttachmentTable, // 自定义附件信息
commonTextTable // 自定义文本信息
},
data() {
return {
visible: false,
confirmLoading: false,
title: '',
imageUrlFront: '',
imageUrlBack: '',
imageUrlPermit: '',
disableSubmit: false,
onlyread: false,
creditApplyAmount: '',
defaultTabKey: '',
registerType: registerType,
programOffices: JSON.parse(sessionStorage.getItem('PROGRAMOFFICES')), // 组织机构
dbCollectionInfo: JSON.parse(sessionStorage.getItem('DB_COLLECTION_INFO')), // 进件流编号
dbBusinessChannel: JSON.parse(sessionStorage.getItem('DB_BUSINESS_CHANNEL')), // 业务线名称
dbCooPerationPlatform: JSON.parse(sessionStorage.getItem('DB_COOPERATION_PLATFORM')), // 合作平台
dbProductCategory: JSON.parse(sessionStorage.getItem('DB_PRODUCT_CATEGORY')), // 产品分类
selectTionRelation: JSON.parse(sessionStorage.getItem('SELECTION_RELATION')), // 联系关系
creditList: '',
model: {},
customerNo: '',
creditApplyNo: '',
id: '',
enterpriseBasicInfo: {}, // 企业基本信息
cusBasicInfo: {}, // 法人基本信息
publicBankAccountList: '', // 企业公户信息
contactsInfoList: '', // 联系人信息
privateBankAccountList: '', // 法人银行卡信息
agent: {}, // 经办人信息
stockholderList: {}, // 企业股东信息
objDataList: {}, // 自定义文本信息
attachmentList: {}, // 自定义附件信息
collCreditStatuses: [], // 企业认证状态信息
form: this.$form.createForm(this),
dateFormat: 'YYYY-MM-DD',
productCategoryNo: '',
creditApplyTime: '',
disableMixinCreated: true,
url: {
imgerver: window._CONFIG['domianURL'] + '/sys/common/view',
syncUser: '/process/extActProcess/doSyncUser',
list: '/legalPersonApply/queryCollLegalPersonApplyPage',
delete: '/sys/user/delete',
deleteBatch: '/sys/user/deleteBatch',
exportXlsUrl: '/sys/user/exportXls',
upload: window._CONFIG['uploadUrl']
}
}
},
created() {
console.log('created')
},
methods: {
moment,
edit(res, data) {
this.defaultTabKey = '1'
this.creditApplyAmount = data.creditApplyAmount
this.productCategoryNo = data.productCategoryNo
this.creditApplyTime = data.creditApplyTime
this.customerNo = data.customerNo
this.creditApplyNo = data.creditApplyNo
this.id = res.id
this.assignment(res)
this.form.resetFields()
this.visible = true
this.$nextTick(() => {})
},
add(username) {
this.model = {}
this.form.resetFields()
this.visible = true
},
close() {
this.$emit('close')
this.visible = false
this.disableSubmit = false
this.selectedRole = []
},
handleSubmit() {
// 触发表单验证
this.form.validateFields((err, values) => {
values.cusBasicInfo.birthday = !values.cusBasicInfo.birthday
? null
: values.cusBasicInfo.birthday.format(this.dateFormat)
values.cusBasicInfo.idCardStartValidity = !values.cusBasicInfo.idCardStartValidity
? null
: values.cusBasicInfo.idCardStartValidity.format(this.dateFormat)
values.cusBasicInfo.idCardEndValidity = !values.cusBasicInfo.idCardEndValidity
? null
: values.cusBasicInfo.idCardEndValidity.format(this.dateFormat)
values.cusEnterpriseBasicInfo.orglicenseStartValidity = !values.cusEnterpriseBasicInfo.orglicenseStartValidity
? null
: values.cusEnterpriseBasicInfo.orglicenseStartValidity.format(this.dateFormat)
values.cusEnterpriseBasicInfo.orglicenseEndValidity = !values.cusEnterpriseBasicInfo.orglicenseEndValidity
? null
: values.cusEnterpriseBasicInfo.orglicenseEndValidity.format(this.dateFormat)
if (!err) {
this.confirmLoading = true
values.cusBasicInfo.customerNo = this.customerNo
values.cusEnterpriseBasicInfo.customerNo = this.customerNo
values.agent.customerNo = this.customerNo
values.customerNo = this.customerNo
values.cusBasicInfo.id = this.model.cusBasicInfo ? this.model.cusBasicInfo.id : ''
values.cusEnterpriseBasicInfo.id = this.model.enterpriseBasicInfo ? this.model.enterpriseBasicInfo.id : ''
values.agent.id = this.agent ? this.agent.id : ''
values.id = this.id
values.cusBasicInfo.idCardUrl = this.imageUrlFront
values.cusBasicInfo.idCardBackUrl = this.imageUrlBack
values.cusEnterpriseBasicInfo.licenceUrl = this.imageUrlPermit
let formData = Object.assign({}, values)
console.log(formData)
legalSaveOrUpdate(formData)
.then(res => {
if (res.status.statusCode == 0) {
this.$message.success(res.status.statusReason)
this.$emit('ok')
} else {
this.$message.warning(res.status.statusReason)
}
})
.finally(() => {
this.confirmLoading = false
this.close()
})
}
})
},
handleCancel() {
this.close()
},
// tabs 回调
callback(key) {
if (key == 2) {
this.$refs.supplement.loadData()
} else if (key == 4) {
this.$refs.approval.loadData()
} else if (key == 3) {
this.$refs.electrical.loadData()
}
},
handleChangeFront(info) {
if (info.file.status === 'uploading') {
this.loading = true
return
}
if (info.file.status === 'done') {
getBase64(info.file.originFileObj, imageUrlFront => {
this.loading = false
})
if (info.file.response.code == 200) {
this.imageUrlFront = info.file.response.data.fileURL
this.$message.success(`身份证正面上传成功!`)
}
}
},
handleChangeBack(info) {
if (info.file.status === 'uploading') {
this.loading = true
return
}
if (info.file.status === 'done') {
getBase64(info.file.originFileObj, imageUrlBack => {
this.loading = false
})
if (info.file.response.code == 200) {
this.imageUrlBack = info.file.response.data.fileURL
this.$message.success(`身份证反面上传成功!`)
}
}
},
handleChangePermit(info) {
if (info.file.status === 'uploading') {
this.loading = true
return
}
if (info.file.status === 'done') {
getBase64(info.file.originFileObj, imageUrlPermit => {
this.loading = false
})
if (info.file.response.code == 200) {
this.imageUrlPermit = info.file.response.data.fileURL
this.$message.success(`营业执照上传成功!`)
}
}
},
editReload() {
let _p = { customerNo: this.customerNo }
queryCollLegalPersonApplyDetail(_p).then(res => {
console.log('-------------')
console.log(res.result)
console.log('-------------')
this.assignment(res.result)
})
},
assignment(res) {
this.model = res ? res : {}
this.enterpriseBasicInfo = this.model.enterpriseBasicInfo
this.cusBasicInfo = this.model.cusBasicInfo
if (this.cusBasicInfo) {
this.imageUrlFront = this.cusBasicInfo.idCardUrl
this.imageUrlBack = this.cusBasicInfo.idCardBackUrl
} else {
this.imageUrlFront = ''
this.imageUrlBack = ''
}
if (this.enterpriseBasicInfo) {
this.imageUrlPermit = this.enterpriseBasicInfo.licenceUrl
} else {
this.imageUrlPermit = ''
}
this.publicBankAccountList = this.model.publicBankAccountList
this.contactsInfoList = this.model.contactsInfoList
this.privateBankAccountList = this.model.privateBankAccountList
this.agent = this.model.agent
this.stockholderList = this.model.stockholderList
this.objDataList = this.model.objDataList
this.attachmentList = this.model.attachmentList
this.collCreditStatuses = this.model.collCreditStatuses
}
}
}
</script>
<style>
.scoped-person .ant-modal-body {
padding: 0 24px !important;
}
.scoped-person .ant-modal-body {
overflow-y: scroll;
min-height: 600px;
max-height: 600px !important;
}
.scoped-person .ant-tabs-bar {
margin-bottom: 0;
}
.scoped-person .ant-card-body {
padding: 10px 24px;
}
.scoped-person .ant-layout-sider {
flex: 0 0 300px;
max-width: 300px !important;
min-width: 300px !important;
width: 300px !important;
}
.scoped-person .ant-modal-footer {
display: none;
}
.scoped-person .scoped-img img {
width: 200px;
}
.scoped-person .scoped-approval .ant-card-head {
border-bottom: 0;
}
</style>