businessChannelsModal.vue
43.6 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
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
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
<template>
<a-modal
:title="titles"
:width="1000"
:centered="true"
:visible="visible"
v-if="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
cancelText="关闭"
style="top: 20px"
:maskClosable="false"
class="scope-person"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-card title="担保方基本信息" :bordered="false">
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="担保方类型" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<a-select
placeholder="请选择担保方类型"
:disabled="onlyread2"
@change="danChange"
v-decorator="[
'guarantorType',
{
initialValue: model ? model.guarantorType : '',
rules: [{ required: true, message: '请输入担保方类型' }],
},
]"
>
<a-select-option :value="'1'">个人</a-select-option>
<a-select-option :value="'2'">企业</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" v-if="danType == 2">
<a-form-item label="企业类型" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<a-select
placeholder="请选择企业类型"
:disabled="onlyread2"
v-decorator="[
'enterprisrType',
{
initialValue: model ? model.enterprisrType : '',
rules: [{ required: true, message: '请输入企业类型' }],
},
]"
>
<a-select-option :value="'1'">一般企业</a-select-option>
<a-select-option :value="'2'">融担公司</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="担保额度(元)" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
<a-input
placeholder="请输入担保额度(元)"
:readOnly="onlyread && disableSubmit"
v-decorator="[
'guarantorAmount',
{
initialValue: model ? model.guarantorAmount : '',
rules: [{ required: true, message: '请输入担保额度(元)' }],
},
]"
/>
</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="['sex', {}]" :triggerChange="true" placeholder="请输入用户性别"
dictCode="sex"/>
</a-form-item>
</a-col> -->
</a-row>
</a-card>
<a-card title="个人基本信息" :bordered="false" v-if="danType == 1">
<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="[
'name',
{
initialValue: model ? model.name : '',
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="[
'cardNo',
{
initialValue: model ? model.cardNo : '',
rules: [{ required: true, message: '请输入身份证号' }],
},
]"
:readOnly="onlyread && disableSubmit"
/>
</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="[
'cardNo',
{
initialValue: model ? model.cardNo : '',
rules: [{ required: true, message: '请输入身份证号' }],
},
]"
:readOnly="onlyread && disableSubmit"
/>
</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="[
'phoneNo',
{
initialValue: model ? model.phoneNo : '',
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="[
'phoneNo',
{
initialValue: model ? model.phoneNo : '',
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="['sex', {}]"
:trigger-change="true"
placeholder="请输入用户性别"
dictCode="sex"
/> -->
<a-select
placeholder="请选择性别"
:disabled="onlyread && disableSubmit"
v-decorator="[
'gender',
{
initialValue: model ? model.gender : '',
rules: [{ required: true, message: '请输入性别' }],
},
]"
>
<a-select-option :value="'1'">男</a-select-option>
<a-select-option :value="'2'">女</a-select-option>
</a-select>
</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="['address', { initialValue: model ? model.address : '' }]"
:readOnly="onlyread && disableSubmit"
/>
</a-form-item>
</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="['nation', { initialValue: model ? model.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="[
'birth',
{
initialValue: !model || !model.birth ? null : moment(model.birth, 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-date-picker
style="width: 100%"
v-decorator="[
'cardStartDate',
{
initialValue: !model || !model.cardStartDate ? null : moment(model.cardStartDate, 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="[
'cardEndDate',
{
initialValue: !model || !model.cardEndDate ? null : moment(model.cardEndDate, 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="['lssuingAuthority', { initialValue: model ? model.lssuingAuthority : '' }]"
: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
:headers="headers"
name="file"
listType="picture-card"
accept="image/*"
class="avatar-uploader"
:showUploadList="false"
:action="url.upload"
v-decorator="[
'cardFrontCode',
{
initialValue: model ? model.cardFrontCode : '',
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
:headers="headers"
name="file"
listType="picture-card"
class="avatar-uploader"
:showUploadList="false"
:action="url.upload"
v-decorator="[
'cardBackCode',
{
initialValue: model ? model.cardBackCode : '',
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>
<template v-if="danType == 2">
<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="[
'name',
{
initialValue: model ? model.name : '',
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="[
'cardNo',
{
initialValue: model ? model.cardNo : '',
rules: [{ required: true, message: '请输入身份证号' }],
},
]"
:readOnly="onlyread && disableSubmit"
/>
</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="[
'cardNo',
{
initialValue: model ? model.cardNo : '',
rules: [{ required: true, message: '请输入身份证号' }],
},
]"
:readOnly="onlyread && disableSubmit"
/>
</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="[
'phoneNo',
{
initialValue: model ? model.phoneNo : '',
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="[
'phoneNo',
{
initialValue: model ? model.phoneNo : '',
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 }">
<a-select
placeholder="请选择性别"
:disabled="onlyread && disableSubmit"
v-decorator="[
'gender',
{
initialValue: model ? model.gender : '',
rules: [{ required: true, message: '请输入性别' }],
},
]"
>
<a-select-option :value="'1'">男</a-select-option>
<a-select-option :value="'2'">女</a-select-option>
</a-select>
</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="['address', { initialValue: model ? model.address : '' }]"
:readOnly="onlyread && disableSubmit"
/>
</a-form-item>
</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="['nation', { initialValue: model ? model.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="[
'birth',
{
initialValue: !model || !model.birth ? null : moment(model.birth, 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-date-picker
style="width: 100%"
v-decorator="[
'cardStartDate',
{
initialValue:
!model || !model.cardStartDate ? null : moment(model.cardStartDate, 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="[
'cardEndDate',
{
initialValue: !model || !model.cardEndDate ? null : moment(model.cardEndDate, 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="['lssuingAuthority', { initialValue: model ? model.lssuingAuthority : '' }]"
: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
:headers="headers"
name="file"
listType="picture-card"
accept="image/*"
class="avatar-uploader"
:showUploadList="false"
:action="url.upload"
v-decorator="[
'cardFrontCode',
{
initialValue: model ? model.cardFrontCode : '',
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
:headers="headers"
name="file"
listType="picture-card"
class="avatar-uploader"
:showUploadList="false"
:action="url.upload"
v-decorator="[
'cardBackCode',
{
initialValue: model ? model.cardBackCode : '',
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="[
'enterprisrName',
{
initialValue: model ? model.enterprisrName : '',
rules: [{ required: true, message: '请输入企业名称' }],
},
]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="注册类型" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
<a-input
placeholder="注册类型"
v-decorator="[
'registrationType',
{
initialValue: model ? model.registrationType : '',
rules: [{ required: true, message: '请输入注册类型' }],
},
]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="统一社会信用代码" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
<a-input
placeholder="统一社会信用代码"
v-decorator="[
'orgCode',
{
initialValue: model ? model.orgCode : '',
rules: [{ required: true, message: '请输入统一社会信用代码' }],
},
]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="企业固话" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
<a-input
placeholder="企业固话"
v-decorator="[
'enterpriseTelephone',
{
initialValue: model ? model.enterpriseTelephone : '',
rules: [{ required: true, message: '请输入企业固话' }],
},
]"
:readOnly="onlyread"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="企业联系手机号" :labelCol="{ span: 12 }" :wrapperCol="{ span: 12 }">
<a-input
placeholder="企业联系手机号"
v-decorator="[
'enterpriseMobileNo',
{
initialValue: model ? model.enterpriseMobileNo : '',
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="[
'enterpriseRegisterDate',
{
initialValue:
!model || !model.enterpriseRegisterDate
? null
: moment(model.enterpriseRegisterDate, 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="[
'enterpriseExpireDate',
{
initialValue:
!model || !model.enterpriseExpireDate
? null
: moment(model.enterpriseExpireDate, 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="[
'enterpriseScale',
{
initialValue: model ? model.enterpriseScale : '',
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 }">
<a-input
placeholder="注册资本"
v-decorator="[
'registeredCapital',
{
initialValue: model ? model.registeredCapital : '',
rules: [{ required: true, message: '请输入注册资本' }],
},
]"
:readOnly="onlyread"
/>
</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="['registeredAddress', { initialValue: model ? model.registeredAddress : '' }]"
: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="['actualBusinessAdress', { initialValue: model ? model.actualBusinessAdress : '' }]"
:readOnly="onlyread && disableSubmit"
/>
</a-form-item>
</a-row>
<a-row :gutter="24">
<a-form-item label="经营范围" :labelCol="{ span: 4 }" :wrapperCol="{ span: 19 }">
<a-textarea
placeholder="请输入经营范围"
v-decorator="['natureBusiness', { initialValue: model ? model.natureBusiness : '' }]"
: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
:headers="headers"
name="file"
listType="picture-card"
class="avatar-uploader"
accept="image/*"
:showUploadList="false"
:action="url.upload"
v-decorator="[
'businessLicenseCode',
{
initialValue: model ? model.businessLicenseCode : '',
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>
</template>
<a-row :gutter="24" v-show="!disableSubmit" style="float: right; margin-right: 20px; margin-bottom: 30px">
<a-button style="margin-right: 10px" @click="handleCancel">取消</a-button>
<a-button type="primary" @click="handleSubmit">确定</a-button>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
function getBase64(img, callback) {
const reader = new FileReader()
reader.addEventListener('load', () => callback(reader.result))
reader.readAsDataURL(img)
}
import { changPassword } from '@/api/api'
import { saveOrUpdateGuarantorInfo, ossDownloadFile } from '@/api/configApi'
import JDate from '@/components/jeecg/JDate.vue'
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
import JSelectMultiUser from '@/components/jeecgbiz/JSelectMultiUser'
import moment from 'moment'
export default {
name: 'PasswordModal',
components: { JDate, JSelectDepart, JSelectMultiUser },
data() {
return {
visible: false,
confirmLoading: false,
confirmDirty: false,
disabledType: false,
onlyread: false,
disableSubmit: false,
onlyread2: false,
imageUrlFront: '',
imageUrlBack: '',
imageUrlPermit: '',
enterprisrTypes:'',
titles: '',
type: 'add',
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
dateFormat: 'YYYY-MM-DD',
form: this.$form.createForm(this),
id: '',
zUrl: '',
fUrl: '',
zhizhaoUrl: '',
url: {
upload: window._CONFIG['uploadUrl'],
},
headers: {
'X-Access-Token': this.$store.state.user.token,
},
danType: 1,
loading: false,
}
},
created() {
console.log('created')
},
methods: {
moment,
edit(username) {
console.log(username)
this.danType = username.guarantorType
this.disabledType = true
if (username.guarantorType == 1) {
let _p = {
fileIdentifyingCode: username.cardFrontCode,
expire: 10000,
}
this.zUrl = username.cardFrontCode
ossDownloadFile(_p).then((res) => {
if (res.status.statusCode == 0) {
this.imageUrlFront = res.result.url
} else {
this.$message.warning(res.status.statusReason)
}
})
let _f = {
fileIdentifyingCode: username.cardBackCode,
expire: 10000,
}
this.fUrl = username.cardBackCode
ossDownloadFile(_f).then((res) => {
if (res.status.statusCode == 0) {
this.imageUrlBack = res.result.url
} else {
this.$message.warning(res.status.statusReason)
}
})
} else if (username.guarantorType == 2) {
let _p = {
fileIdentifyingCode: username.cardFrontCode,
expire: 10000,
}
this.zUrl = username.cardFrontCode
ossDownloadFile(_p).then((res) => {
if (res.status.statusCode == 0) {
this.imageUrlFront = res.result.url
} else {
this.$message.warning(res.status.statusReason)
}
})
let _f = {
fileIdentifyingCode: username.cardBackCode,
expire: 10000,
}
this.fUrl = username.cardBackCode
ossDownloadFile(_f).then((res) => {
if (res.status.statusCode == 0) {
this.imageUrlBack = res.result.url
} else {
this.$message.warning(res.status.statusReason)
}
})
let _t = {
fileIdentifyingCode: username.businessLicenseCode,
expire: 10000,
}
this.zhizhaoUrl = username.businessLicenseCode
ossDownloadFile(_t).then((res) => {
if (res.status.statusCode == 0) {
this.imageUrlPermit = res.result.url
} else {
this.$message.warning(res.status.statusReason)
}
})
}
this.form.resetFields()
this.visible = true
this.model = username
this.$nextTick(() => {
this.form.setFieldsValue(username)
})
},
add(username) {
console.log('ssss')
this.model = {}
this.danType = 1
this.zUrl = ''
this.fUrl = ''
this.zhizhaoUrl = ''
this.imageUrlFront = ''
this.imageUrlBack = ''
this.imageUrlPermit = ''
this.form.resetFields()
this.visible = true
this.$nextTick(() => {
this.form.setFieldsValue()
})
},
danChange(value) {
this.danType = value
},
close() {
this.$emit('close')
this.visible = false
this.disableSubmit = false
this.selectedRole = []
},
handleChangeFront(info) {
// console.log("111", info)
let fileList = [...info.fileList]
console.log(fileList)
if (info.file.status === 'uploading') {
this.loading = true
return
}
if (info.file.status === 'done') {
getBase64(info.file.originFileObj, (imageUrlFront) => {
//console.log("111111",info.file.originFileObj)
this.loading = false
})
if (info.file.response.status.statusCode == 0) {
let _p = {
fileIdentifyingCode: info.file.response.result.fileIdentifyingCode,
expire: 10000,
}
this.zUrl = info.file.response.result.fileIdentifyingCode
ossDownloadFile(_p).then((res) => {
if (res.status.statusCode == 0) {
this.imageUrlFront = res.result.url
} else {
this.$message.warning(res.status.statusReason)
}
})
this.$message.success(`身份证正面上传成功!`)
}
}
},
handleChangeBack(info) {
console.log(info)
if (info.file.status === 'uploading') {
this.loading = true
return
}
if (info.file.status === 'done') {
getBase64(info.file.originFileObj, (imageUrlBack) => {
//console.log("111111",info.file.originFileObj)
this.loading = false
})
if (info.file.response.status.statusCode == 0) {
let _p = {
fileIdentifyingCode: info.file.response.result.fileIdentifyingCode,
expire: 10000,
}
this.fUrl = info.file.response.result.fileIdentifyingCode
ossDownloadFile(_p).then((res) => {
if (res.status.statusCode == 0) {
this.imageUrlBack = res.result.url
} else {
this.$message.warning(res.status.statusReason)
}
})
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.status.statusCode == 0) {
let _p = {
fileIdentifyingCode: info.file.response.result.fileIdentifyingCode,
expire: 10000,
}
this.zhizhaoUrl = info.file.response.result.fileIdentifyingCode
ossDownloadFile(_p).then((res) => {
if (res.status.statusCode == 0) {
this.imageUrlPermit = res.result.url
} else {
this.$message.warning(res.status.statusReason)
}
})
this.$message.success(`营业执照上传成功!`)
}
}
},
handleSubmit() {
// 触发表单验证
this.form.validateFields((err, values) => {
console.log(err, values)
if (!err) {
this.confirmLoading = true
// let l = { id: this.id }.slice(1,5)
values.cardFrontCode = this.zUrl
values.cardBackCode = this.fUrl
values.businessLicenseCode = this.zhizhaoUrl
values.guarantorNo = this.model.guarantorNo
// let formData = values
saveOrUpdateGuarantorInfo(values)
.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()
},
},
}
</script>
<style>
.scope-person .ant-modal-body {
padding: 0 24px !important;
}
.scope-person .ant-modal-body {
overflow-y: scroll;
min-height: 600px;
max-height: 600px !important;
}
.scope-person .ant-tabs-bar {
margin-bottom: 0;
}
.scope-person .ant-card-body {
padding: 10px 24px;
}
.scope-person .ant-layout-sider {
flex: 0 0 300px;
max-width: 300px !important;
min-width: 300px !important;
width: 300px !important;
}
.scope-person .ant-modal-footer {
display: none;
}
.scope-person .scoped-img img {
width: 200px;
}
</style>