fix bug
This commit is contained in:
		| @ -92,7 +92,7 @@ export class CarAddDriverComponent implements OnInit { | ||||
|           title: '', | ||||
|           ui: { | ||||
|             offsetControl: 6, | ||||
|             action: apiConf.fileUpload, | ||||
|             action: apiConf.waterFileUpload, | ||||
|             accept: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
| @ -108,6 +108,18 @@ export class CarAddDriverComponent implements OnInit { | ||||
|             listType: 'picture-card', | ||||
|             change: (args: any) => { | ||||
|               if (args.type === 'success') { | ||||
|                 const avatar = [ | ||||
|                   { | ||||
|                     uid: -1, | ||||
|                     name: 'LOGO', | ||||
|                     status: 'done', | ||||
|                     url: args.file.response.data.fullFileWatermarkPath, | ||||
|                     response: { | ||||
|                       url: args.file.response.data.fullFileWatermarkPath, | ||||
|                     }, | ||||
|                   }, | ||||
|                 ]; | ||||
|                 this.sf?.setValue('/certificatePhotoFrontWatermark', avatar); | ||||
|                 this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath | ||||
|                 this.checkIdCard(args.file.response.data.fullFilePath, 'front', 0); | ||||
|               } else { | ||||
| @ -142,7 +154,7 @@ export class CarAddDriverComponent implements OnInit { | ||||
|           title: '', | ||||
|           ui: { | ||||
|             offsetControl: 6, | ||||
|             action: apiConf.fileUpload, | ||||
|             action: apiConf.waterFileUpload, | ||||
|             accept: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
| @ -158,6 +170,18 @@ export class CarAddDriverComponent implements OnInit { | ||||
|             listType: 'picture-card', | ||||
|             change: (args: any) => { | ||||
|               if (args.type === 'success') { | ||||
|                 const avatar = [ | ||||
|                   { | ||||
|                     uid: -1, | ||||
|                     name: 'LOGO', | ||||
|                     status: 'done', | ||||
|                     url: args.file.response.data.fullFileWatermarkPath, | ||||
|                     response: { | ||||
|                       url: args.file.response.data.fullFileWatermarkPath, | ||||
|                     }, | ||||
|                   }, | ||||
|                 ]; | ||||
|                 this.sf?.setValue('/certificatePhotoBackWatermark', avatar); | ||||
|                 this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath | ||||
|                 this.checkIdCard(args.file.response.data.fullFilePath, 'back', 0); | ||||
|               } else { | ||||
|  | ||||
| @ -23,12 +23,16 @@ | ||||
|             </div> | ||||
|         </ng-template> | ||||
|     </sf> | ||||
|     <sf #sf1 [compact]="true" [ui]="ui" [schema]="schema1" [button]="'none'" *ngIf="schema1"> | ||||
|     <sf #sf1 [compact]="true" [ui]="ui2" [schema]="schema1" [button]="'none'" *ngIf="schema1"> | ||||
|         <ng-template sf-template="roadImg" let-me let-ui="ui" let-schema="schema"> | ||||
|             <img height="104" src="/assets/images/drivercard.png" class="borderImg" /> | ||||
|         </ng-template> | ||||
|     </sf> | ||||
|     <sf #sf2 [compact]="true" [ui]="ui" [schema]="schema2" [button]="'none'" *ngIf="schema2"> | ||||
|     <sf #sf2 [compact]="true" [ui]="ui3" [schema]="schema2" [button]="'none'" *ngIf="schema2"> | ||||
|         <ng-template sf-template="agreeImg" let-me let-ui="ui" let-schema="schema"> | ||||
|             <img height="104" src="/assets/images/jopcard.png" class="borderImg" /> | ||||
|         </ng-template> | ||||
|     </sf> | ||||
|     <img class="drivercard" height="104" src="/assets/images/drivercard.png" /> | ||||
|     <img class="jopcard" height="104" src="/assets/images/jopcard.png" /> | ||||
|     <!-- <div class="example" (click)="showExample()"> | ||||
|       查看示例 | ||||
|       <div class="popBox" *ngIf="showCardFlag"> | ||||
|  | ||||
| @ -29,13 +29,13 @@ | ||||
| } | ||||
| .drivercard{ | ||||
|   position: absolute; | ||||
|   top: 50%; | ||||
|   top: 710px; | ||||
|   left: 330px; | ||||
|   border: solid 1px #ebf0fb; | ||||
| } | ||||
| .jopcard{ | ||||
|   position: absolute; | ||||
|   top: 79%; | ||||
|   top: 1115px; | ||||
|   left: 330px; | ||||
|   border: solid 1px #ebf0fb; | ||||
| } | ||||
| @ -47,5 +47,11 @@ | ||||
|       color: black; | ||||
|       resize:none; | ||||
|     } | ||||
|     .setCustom .ant-form-item-control{ | ||||
|       margin-left: -100px !important | ||||
|     } | ||||
|     .borderImg{ | ||||
|       border: solid 1px #ebf0fb; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @ -22,6 +22,8 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|   record: any = {}; | ||||
|   i: any; | ||||
|   ui: SFUISchema = {}; | ||||
|   ui2: SFUISchema = {}; | ||||
|   ui3: SFUISchema = {}; | ||||
|   schema: SFSchema = {}; | ||||
|   schema1: SFSchema = {}; | ||||
|   schema2: SFSchema = {}; | ||||
| @ -88,7 +90,7 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|           title: '', | ||||
|           ui: { | ||||
|             offsetControl: 6, | ||||
|             action: apiConf.fileUpload, | ||||
|             action: apiConf.waterFileUpload, | ||||
|             fileType: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
| @ -104,7 +106,18 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|             listType: 'picture-card', | ||||
|             change: (args: any) => { | ||||
|               if (args.type === 'success') { | ||||
|                 console.log(args.file.response.data.fullFilePath); | ||||
|                 const avatar = [ | ||||
|                   { | ||||
|                     uid: -1, | ||||
|                     name: 'LOGO', | ||||
|                     status: 'done', | ||||
|                     url: args.file.response.data.fullFileWatermarkPath, | ||||
|                     response: { | ||||
|                       url: args.file.response.data.fullFileWatermarkPath, | ||||
|                     }, | ||||
|                   }, | ||||
|                 ]; | ||||
|                 this.sf?.setValue('/certificatePhotoFrontWatermark', avatar); | ||||
|                 this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath; | ||||
|                 this.checkIdCard(args.file.response.data.fullFilePath, 'front', 0); | ||||
|               } | ||||
| @ -137,7 +150,7 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|           title: '', | ||||
|           ui: { | ||||
|             offsetControl: 6, | ||||
|             action: apiConf.fileUpload, | ||||
|             action: apiConf.waterFileUpload, | ||||
|             fileType: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
| @ -153,6 +166,18 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|             listType: 'picture-card', | ||||
|             change: (args: any) => { | ||||
|               if (args.type === 'success') { | ||||
|                 const avatar = [ | ||||
|                   { | ||||
|                     uid: -1, | ||||
|                     name: 'LOGO', | ||||
|                     status: 'done', | ||||
|                     url: args.file.response.data.fullFileWatermarkPath, | ||||
|                     response: { | ||||
|                       url: args.file.response.data.fullFileWatermarkPath, | ||||
|                     }, | ||||
|                   }, | ||||
|                 ]; | ||||
|                 this.sf?.setValue('/certificatePhotoBackWatermark', avatar); | ||||
|                 this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath; | ||||
|                 this.checkIdCard(args.file.response.data.fullFilePath, 'back', 0); | ||||
|               } | ||||
| @ -234,7 +259,7 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|           type: 'string', | ||||
|           title: '驾驶证照片', | ||||
|           ui: { | ||||
|             action: apiConf.fileUpload, | ||||
|             action: apiConf.waterFileUpload, | ||||
|             fileType: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
| @ -250,6 +275,18 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|             listType: 'picture-card', | ||||
|             change: (args: any) => { | ||||
|               if (args.type === 'success') { | ||||
|                 const avatar = [ | ||||
|                   { | ||||
|                     uid: -1, | ||||
|                     name: 'LOGO', | ||||
|                     status: 'done', | ||||
|                     url: args.file.response.data.fullFileWatermarkPath, | ||||
|                     response: { | ||||
|                       url: args.file.response.data.fullFileWatermarkPath, | ||||
|                     }, | ||||
|                   }, | ||||
|                 ]; | ||||
|                 this.sf1?.setValue('/certificatePhotoWatermark', avatar); | ||||
|                 this.detailData.userDriverLicenseDTO.certificatePhoto = args.file.response.data.fullFilePath; | ||||
|                 this.checkDriverCard(args.file.response.data.fullFilePath, 'front', 0); | ||||
|               } else { | ||||
| @ -271,6 +308,14 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|             //  previewFile: (file: NzUploadFile) => of(file.url), | ||||
|           } | ||||
|         }, | ||||
|         roadImg: { | ||||
|           title: '', | ||||
|           type: 'boolean', | ||||
|           // enum: [{ label: '长期', value: true }], | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|           } | ||||
|         }, | ||||
|         licenseNo: { | ||||
|           title: '驾驶证号', | ||||
|           type: 'string', | ||||
| @ -351,7 +396,7 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|           title: '', | ||||
|           ui: { | ||||
|             offsetControl: 6, | ||||
|             action: apiConf.fileUpload, | ||||
|             action: apiConf.waterFileUpload, | ||||
|             fileType: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
| @ -367,6 +412,18 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|             listType: 'picture-card', | ||||
|             change: (args: any) => { | ||||
|               if (args.type === 'success') { | ||||
|                 const avatar = [ | ||||
|                   { | ||||
|                     uid: -1, | ||||
|                     name: 'LOGO', | ||||
|                     status: 'done', | ||||
|                     url: args.file.response.data.fullFileWatermarkPath, | ||||
|                     response: { | ||||
|                       url: args.file.response.data.fullFileWatermarkPath, | ||||
|                     }, | ||||
|                   }, | ||||
|                 ]; | ||||
|                 this.sf2?.setValue('/certificatePhotoWatermark', avatar); | ||||
|                 this.detailData.userPracticeSeniorityDTO.certificatePhoto = args.file.response.data.fullFilePath; | ||||
|                 this.checkQualificationCertificate(args.file.response.data.fullFilePath); | ||||
|               } else { | ||||
| @ -385,7 +442,15 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             previewFile: (file: NzUploadFile) => of() | ||||
|             // previewFile: (file: NzUploadFile) => of() | ||||
|           } | ||||
|         }, | ||||
|         agreeImg: { | ||||
|           title: '', | ||||
|           type: 'boolean', | ||||
|           // enum: [{ label: '长期', value: true }], | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|           } | ||||
|         }, | ||||
|         licenseNo: { | ||||
| @ -476,6 +541,40 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|         grid: { span: 3 } | ||||
|       } | ||||
|     }; | ||||
|     this.ui2 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 180, | ||||
|         grid: { span: 18 }, | ||||
|         width: 600, | ||||
|       }, | ||||
|       $titleB:{ | ||||
|         grid: { span: 24 }, | ||||
|       }, | ||||
|       $certificatePhotoWatermark: { | ||||
|         grid: { span: 12 }, | ||||
|       }, | ||||
|       $roadImg: { | ||||
|         grid: { span: 4 }, | ||||
|         class: 'setCustom' | ||||
|       }, | ||||
|     }; | ||||
|     this.ui3 = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 180, | ||||
|         grid: { span: 18 }, | ||||
|         width: 600, | ||||
|       }, | ||||
|       $titleC:{ | ||||
|         grid: { span: 24 }, | ||||
|       }, | ||||
|       $certificatePhotoWatermark: { | ||||
|         grid: { span: 12 }, | ||||
|       }, | ||||
|       $agreeImg: { | ||||
|         grid: { span: 4 }, | ||||
|         class: 'setCustom' | ||||
|       }, | ||||
|     }; | ||||
|   } | ||||
|   getRegionToThree() { | ||||
|     // 获取一、二、三级地区详情 | ||||
| @ -547,7 +646,7 @@ export class CarSettleAddDriverComponent implements OnInit { | ||||
|           if (side === 'front') { | ||||
|             // 正面 | ||||
|             this.sf1.setValue('/licenseNo', res.number); | ||||
|             this.sf1.setValue('/driverModel', [res.classType.toUpperCase()]); | ||||
|             this.sf1.setValue('/driverModel', [res.classType?.toUpperCase()]); | ||||
|             this.sf1.setValue('/validStartTime', res.validFrom); | ||||
|             this.sf1.setValue('/validEndTime', res.validTo); | ||||
|             this.sf1.setValue('/signingOrganization', res.issuingAuthority); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user