fix bug
This commit is contained in:
		| @ -1,34 +0,0 @@ | ||||
| <div class="modal-header"> | ||||
|     <div class="modal-title" *ngIf="i.flag === 'add'">车辆协助认证</div> | ||||
|     <div class="modal-title" *ngIf="i.flag !== 'add'">添加车辆</div> | ||||
| </div> | ||||
| <!-- <nz-spin *ngIf="!i" class="modal-spin"></nz-spin> --> | ||||
| <div class="sfBox"> | ||||
|     <sf #sf [compact]="true" [ui]="ui" [schema]="schema" [button]="'none'" *ngIf="schema" [formData]="detailData"> | ||||
|         <ng-template sf-template="tipsA" let-me let-ui="ui" let-schema="schema"> | ||||
|             <div class="pr"> | ||||
|                 <dl class="tips"> | ||||
|                     <dt>行驶证首页</dt> | ||||
|                     <dd>示例</dd> | ||||
|                 </dl> | ||||
|                 <div class="pa"><img width="190" src="/assets/images/driverfront.png" /></div> | ||||
|             </div> | ||||
|         </ng-template> | ||||
|         <ng-template sf-template="tipsB" let-me let-ui="ui" let-schema="schema"> | ||||
|             <div class="pr"> | ||||
|                 <dl class="tips"> | ||||
|                     <dt>行驶证副页</dt> | ||||
|                     <dd>示例</dd> | ||||
|                 </dl> | ||||
|                 <div class="pa"><img width="190" src="/assets/images/driverback.png" /></div> | ||||
|             </div> | ||||
|         </ng-template> | ||||
|     </sf> | ||||
|     <img class="drivercard" height="104" src="/assets/images/car.png" /> | ||||
|     <img class="agreement" height="104" src="/assets/images/agreement.png" /> | ||||
|     <img class="jopcard" height="104" src="/assets/images/road.png" /> | ||||
| </div> | ||||
| <div class="modal-footer"> | ||||
|     <button nz-button type="button" (click)="close()">关闭</button> | ||||
|     <button nz-button type="button" nzType="primary" (click)="submitForm()" [disabled]="!sf?.valid" [nzLoading]="checked">确定</button> | ||||
| </div> | ||||
| @ -1,654 +0,0 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { apiConf } from '@conf/api.conf'; | ||||
| import { cacheConf } from '@conf/cache.conf'; | ||||
| import { SFUISchema, SFSchema, SFUploadWidgetSchema, SFComponent, SFSelectWidgetSchema } from '@delon/form'; | ||||
| import { _HttpClient } from '@delon/theme'; | ||||
| import { EACacheService, EAEnvironmentService } from '@shared'; | ||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||
| import { NzUploadFile } from 'ng-zorro-antd/upload'; | ||||
| import { Observable, Observer, of } from 'rxjs'; | ||||
| import { ListService } from '../../services/list.service'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-car-carauth', | ||||
|   templateUrl: './carauth.component.html', | ||||
|   styleUrls: ['./carauth.component.less'] | ||||
| }) | ||||
| export class CarCarauthComponent implements OnInit { | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   record: any = {}; | ||||
|   i: any; | ||||
|   ui: SFUISchema = {}; | ||||
|   schema: SFSchema = {}; | ||||
|   showCardFlag = false; | ||||
|   showJopFlag = false; | ||||
|   companyData: any = {}; | ||||
|   detailData: any = {}; | ||||
|   carNo = '' | ||||
|   checked = false | ||||
|  | ||||
|   constructor( | ||||
|     private modal: NzModalRef, | ||||
|     public service: ListService, | ||||
|     private envSrv: EAEnvironmentService, | ||||
|     private eaCacheSrv: EACacheService, | ||||
|   ) { } | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     this.initData() | ||||
|     this.initSF() | ||||
|   } | ||||
|   initData() { | ||||
|     if(this.i.id){ | ||||
|       this.companyData = this.eaCacheSrv.get(cacheConf.env) | ||||
|       const params = { | ||||
|         id: this.i.id | ||||
|       } | ||||
|       this.service.request(this.service.$api_getShipperCar, params).subscribe(res => { | ||||
|         this.detailData = res | ||||
|         this.detailData.isSelf = res.isSelf ? 1 : 0 | ||||
|         this.detailData.isTrailer = res.isTrailer ? 1 : 0 | ||||
|         this.detailData.carFrontPhotoWatermark = [ | ||||
|           { | ||||
|             uid: -1, | ||||
|             name: 'LOGO', | ||||
|             status: 'done', | ||||
|             url: this.detailData.carFrontPhotoWatermark, | ||||
|             response:this.detailData.carFrontPhotoWatermark, | ||||
|           }, | ||||
|         ]; | ||||
|         this.detailData.carProtocalWatermark = [ | ||||
|           { | ||||
|             uid: -1, | ||||
|             name: 'LOGO', | ||||
|             status: 'done', | ||||
|             url: this.detailData.carProtocalWatermark, | ||||
|             response: this.detailData.carProtocalWatermark, | ||||
|           }, | ||||
|         ]; | ||||
|         this.detailData.certificatePhotoFrontWatermark = [ | ||||
|           { | ||||
|             uid: -1, | ||||
|             name: 'LOGO', | ||||
|             status: 'done', | ||||
|             url: this.detailData.certificatePhotoFrontWatermark, | ||||
|             response: this.detailData.certificatePhotoFrontWatermark, | ||||
|           }, | ||||
|         ]; | ||||
|         this.detailData.certificatePhotoBackWatermark = [ | ||||
|           { | ||||
|             uid: -1, | ||||
|             name: 'LOGO', | ||||
|             status: 'done', | ||||
|             url: this.detailData.certificatePhotoBackWatermark, | ||||
|             response: this.detailData.certificatePhotoBackWatermark, | ||||
|           }, | ||||
|         ]; | ||||
|         if(this.detailData.roadTransportPhotoWatermark !== null) { | ||||
|           this.detailData.roadTransportPhotoWatermark = [ | ||||
|             { | ||||
|               uid: -1, | ||||
|               name: 'LOGO', | ||||
|               status: 'done', | ||||
|               url: this.detailData.roadTransportPhotoWatermark, | ||||
|               response: this.detailData.roadTransportPhotoWatermark, | ||||
|             }, | ||||
|           ]; | ||||
|         } | ||||
|  | ||||
|       }) | ||||
|     } | ||||
|   } | ||||
|   initSF() { | ||||
|     this.schema = { | ||||
|       properties: { | ||||
|         carFrontPhotoWatermark: { | ||||
|           type: 'string', | ||||
|           title: '车头照照片', | ||||
|           ui: { | ||||
|             action: apiConf.fileUpload, | ||||
|             accept: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             widget: 'upload', | ||||
|             descriptionI18n: '请上传车头照照片,支持JPG、PNG格式,文件小于5M。', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|             change: (args: any) => { | ||||
|               if (args.type === 'success') { | ||||
|                 this.detailData.carFrontPhoto = args.file.response.data.fullFilePath | ||||
|               } | ||||
|             }, | ||||
|             beforeUpload: (file: any, _fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt2M = file.size / 1024 / 1024 < 5; | ||||
|                 if (!isLt2M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt2M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             previewFile: (file: NzUploadFile) => of(file.url), | ||||
|           }, | ||||
|         }, | ||||
|         carNo: { | ||||
|           title: '车牌号', | ||||
|           type: 'string', | ||||
|           maxLength: 9, | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         carNoColor: { | ||||
|           title: '车牌颜色', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             params: { dictKey: 'car:color' }, | ||||
|             placeholder: '请选择车牌颜色', | ||||
|             containsAllLabel:false, | ||||
|           } as SFSelectWidgetSchema, | ||||
|         }, | ||||
|         carModel: { | ||||
|           title: '车型', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             params: { dictKey: 'car:model' }, | ||||
|             placeholder: '请选择车型', | ||||
|             containsAllLabel:false, | ||||
|           } as SFSelectWidgetSchema, | ||||
|         }, | ||||
|         carLength: { | ||||
|           title: '车长', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             params: { dictKey: 'car:length' }, | ||||
|             placeholder: '请选择车长', | ||||
|             containsAllLabel:false, | ||||
|           } as SFSelectWidgetSchema, | ||||
|         }, | ||||
|         carLoad: { | ||||
|           title: '载重', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|             change: (val: any) =>{ | ||||
|               const value =  val.replace(/\D/g,'') | ||||
|               this.sf.setValue('/carLoad', value) | ||||
|             }, | ||||
|           } | ||||
|         }, | ||||
|         isSelf: { | ||||
|           title: '是否挂靠', | ||||
|           type: 'string', | ||||
|           enum: [ | ||||
|             { label: '否', value: 0 }, | ||||
|             { label: '是', value: 1 }, | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|           } | ||||
|         }, | ||||
|         isTrailer: { | ||||
|           title: '是否为挂车', | ||||
|           type: 'string', | ||||
|           enum: [ | ||||
|             { label: '否', value: 0 }, | ||||
|             { label: '是', value: 1 }, | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|           } | ||||
|         }, | ||||
|         carProtocalWatermark: { | ||||
|           type: 'string', | ||||
|           title: '挂靠协议', | ||||
|           ui: { | ||||
|             action: apiConf.fileUpload, | ||||
|             accept: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             widget: 'upload', | ||||
|             descriptionI18n: '请上传挂靠协议,支持JPG、PNG格式,文件小于5M。', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|             change: (args: any) => { | ||||
|               if (args.type === 'success') { | ||||
|                 this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath | ||||
|               } | ||||
|             }, | ||||
|             beforeUpload: (file: any, _fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt2M = file.size / 1024 / 1024 < 5; | ||||
|                 if (!isLt2M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt2M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             previewFile: (file: NzUploadFile) => of(file.url), | ||||
|           }, | ||||
|         }, | ||||
|         titleA: { | ||||
|           title: '行驶证信息(必填)', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'textarea', | ||||
|             borderless:true, | ||||
|           }, | ||||
|           default: '照片上传后会自动识别文字并填充下列内容栏', | ||||
|         }, | ||||
|         tipsA: { | ||||
|           title: '', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             offsetControl: 6, | ||||
|           }, | ||||
|         }, | ||||
|         certificatePhotoFrontWatermark: { | ||||
|           type: 'string', | ||||
|           title: '行驶证首页照片', | ||||
|           ui: { | ||||
|             action: apiConf.fileUpload, | ||||
|             accept: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             widget: 'upload', | ||||
|             descriptionI18n: '请上传行驶证首页照片,支持JPG、PNG格式,文件小于5M。照片信息缺失、拼凑、过度PS、模糊不清,都不会通过审核。', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|             change: (args: any) => { | ||||
|               if (args.type === 'success') { | ||||
|                 this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath | ||||
|                 this.checkCarCard(args.file.response.data.fullFilePath, 'front'); | ||||
|               } | ||||
|             }, | ||||
|             beforeUpload: (file: any, _fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt2M = file.size / 1024 / 1024 < 5; | ||||
|                 if (!isLt2M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt2M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|           }, | ||||
|         }, | ||||
|         tipsB: { | ||||
|           title: '', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'custom', | ||||
|             offsetControl: 6, | ||||
|           }, | ||||
|         }, | ||||
|         certificatePhotoBackWatermark: { | ||||
|           type: 'string', | ||||
|           title: '行驶证副页照片', | ||||
|           ui: { | ||||
|             action: apiConf.fileUpload, | ||||
|             accept: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             widget: 'upload', | ||||
|             descriptionI18n: '请上传行驶证副业照片,支持JPG、PNG格式,文件小于5M。', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|             change: (args: any) => { | ||||
|               if (args.type === 'success') { | ||||
|                 this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath | ||||
|                 this.checkCarCard(args.file.response.data.fullFilePath, 'back'); | ||||
|               } | ||||
|             }, | ||||
|             beforeUpload: (file: any, _fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt2M = file.size / 1024 / 1024 < 5; | ||||
|                 if (!isLt2M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt2M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             previewFile: (file: NzUploadFile) => of(file.url), | ||||
|           }, | ||||
|         }, | ||||
|         driverLicenseRegisterTime: { | ||||
|           title: '行驶证注册日期', | ||||
|           type: 'string', | ||||
|           format: 'date', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         driverLicenseGetTime: { | ||||
|           title: '行驶证发证日期', | ||||
|           type: 'string', | ||||
|           format: 'date', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         driverLicenseEndTime: { | ||||
|           title: '行驶证到期日期', | ||||
|           type: 'string', | ||||
|           format: 'date', | ||||
|           maxLength: 30, | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         driverLicenseSigningOrg: { | ||||
|           title: '行驶证签发机关', | ||||
|           type: 'string', | ||||
|           maxLength: 30, | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         carDistinguishCode: { | ||||
|           title: '车辆识别代码', | ||||
|           type: 'string', | ||||
|           maxLength: 30, | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         useNature: { | ||||
|           title: '使用性质', | ||||
|           type: 'string', | ||||
|           maxLength: 30, | ||||
|           enum: [ | ||||
|             {label: '非营运', value: 0}, | ||||
|             {label: '营运', value: 1}, | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|           }, | ||||
|         }, | ||||
|         curbWeight: { | ||||
|           title: '整备质量', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         carOwner: { | ||||
|           title: '所有人', | ||||
|           type: 'string', | ||||
|           maxLength: 30, | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         titleB: { | ||||
|           title: '道运证(选填)', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'text', | ||||
|           }, | ||||
|           default: '照片上传后会自动识别文字并填充下列内容栏', | ||||
|         }, | ||||
|         roadTransportPhotoWatermark: { | ||||
|           type: 'string', | ||||
|           title: '道运证照片', | ||||
|           ui: { | ||||
|             action: apiConf.fileUpload, | ||||
|             accept: 'image/png,image/jpeg,image/jpg,image/gif', | ||||
|             limit: 1, | ||||
|             limitFileCount: 1, | ||||
|             resReName: 'data.fullFileWatermarkPath', | ||||
|             urlReName: 'data.fullFileWatermarkPath', | ||||
|             widget: 'upload', | ||||
|             descriptionI18n: '请上传道运证照片,支持JPG、PNG格式,文件小于5M。蓝牌绿牌车辆,可不用传道运证', | ||||
|             data: { | ||||
|               appId: this.envSrv.env.appId, | ||||
|             }, | ||||
|             name: 'multipartFile', | ||||
|             multiple: false, | ||||
|             listType: 'picture-card', | ||||
|             change: (args: any) => { | ||||
|               if (args.type === 'success') { | ||||
|                 this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath | ||||
|                 this.checkTransCard(args.file.response.data.fullFilePath); | ||||
|               } else { | ||||
|                 this.detailData.roadTransportPhoto = '' | ||||
|               } | ||||
|             }, | ||||
|             beforeUpload: (file: any, _fileList: any) => { | ||||
|               return new Observable((observer: Observer<boolean>) => { | ||||
|                 const isLt2M = file.size / 1024 / 1024 < 5; | ||||
|                 if (!isLt2M) { | ||||
|                   this.service.msgSrv.warning('图片大小超过5M!'); | ||||
|                   observer.complete(); | ||||
|                   return; | ||||
|                 } | ||||
|                 observer.next(isLt2M); | ||||
|                 observer.complete(); | ||||
|               }); | ||||
|             }, | ||||
|             previewFile: (file: NzUploadFile) => of(file.url), | ||||
|           }, | ||||
|         }, | ||||
|         roadTransportNo: { | ||||
|           title: '道运证号码', | ||||
|           type: 'string', | ||||
|           maxLength: 30, | ||||
|           ui: { | ||||
|             // widget: this.detailData.commitFlag !== 0 ? 'text' : '', | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         roadTransportLicenceNo: { | ||||
|           title: '经营许可证号', | ||||
|           type: 'string', | ||||
|           maxLength: 30, | ||||
|           ui: { | ||||
|             // widget: this.detailData.commitFlag !== 0 ? 'text' : '', | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         roadTransportStartTime: { | ||||
|           title: '发证日期', | ||||
|           type: 'string', | ||||
|           format: 'date', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         roadTransportEndTime: { | ||||
|           title: '有效期至', | ||||
|           type: 'string', | ||||
|           format: 'date', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         remarks: { | ||||
|           title: '备注', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|       }, | ||||
|       required: [ | ||||
|         'carFrontPhotoWatermark', | ||||
|         'carNo', | ||||
|         'carNoColor', | ||||
|         'carModel', | ||||
|         'carLength', | ||||
|         'carLoad', | ||||
|         'isSelf', | ||||
|         'isTrailer', | ||||
|         'certificatePhotoFrontWatermark', | ||||
|         'certificatePhotoBackWatermark', | ||||
|         'driverLicenseRegisterTime', | ||||
|         'driverLicenseGetTime', | ||||
|         'driverLicenseEndTime', | ||||
|         'driverLicenseSigningOrg', | ||||
|         'carDistinguishCode', | ||||
|         'useNature', | ||||
|         'carOwner' | ||||
|       ], | ||||
|     }; | ||||
|  | ||||
|     this.ui = { | ||||
|   '*': { | ||||
|     spanLabelFixed: 180, | ||||
|     grid: { span: 18 }, | ||||
|     width: 600, | ||||
|   }, | ||||
|   $title1: { | ||||
|     spanLabelFixed: 0, | ||||
|   }, | ||||
|   $title2: { | ||||
|     spanLabelFixed: 0, | ||||
|   }, | ||||
|   $title3: { | ||||
|     spanLabelFixed: 0, | ||||
|   }, | ||||
|   $enterpriseRegistrationTime: { | ||||
|     width: 680, | ||||
|   }, | ||||
|   $operatingEndTime: { | ||||
|     grid: { span: 9 }, | ||||
|   }, | ||||
|   $dateType: { | ||||
|     grid: { span: 4 }, | ||||
|   }, | ||||
|   $validEndTime: { | ||||
|     grid: { span: 9 }, | ||||
|   }, | ||||
|   $dateType01: { | ||||
|     grid: { span: 4 }, | ||||
|   }, | ||||
|   $registrationCapital: { | ||||
|     grid: { span: 12 }, | ||||
|   }, | ||||
|   $unit: { | ||||
|     spanLabelFixed: 20, | ||||
|     grid: { span: 3 }, | ||||
|   }, | ||||
| }; | ||||
|   } | ||||
| // 道路运输证识别 | ||||
| checkTransCard(imgurl: any) { | ||||
|   const params = { | ||||
|     transportationLicenseUrl: imgurl, | ||||
|   }; | ||||
|   this.service.request(this.service.$api_recognizeTransportationLicense, params).subscribe((res) => { | ||||
|     if (res) { | ||||
|       this.sf.setValue('/roadTransportNo', res.number); | ||||
|       this.sf.setValue('/roadTransportLicenceNo', res.businessCertificate); | ||||
|       this.sf.setValue('/roadTransportStartTime', res.issueDate); | ||||
|       if(this.carNo === '') { | ||||
|         this.carNo = res.number | ||||
|       } else if(this.carNo && res.vehicleNumber.indexOf(this.carNo) === -1) { | ||||
|         this.service.msgSrv.warning('请上传同一认证车辆的相关证件') | ||||
|       } | ||||
|     } | ||||
|   }); | ||||
| } | ||||
| // 行驶证识别 | ||||
| checkCarCard(imgurl: any, side: any) { | ||||
|   const params = { | ||||
|     vehicleLicenseUrl: imgurl, | ||||
|     side, | ||||
|   }; | ||||
|   this.service.request(this.service.$api_recognizeVehicleLicense, params).subscribe((res) => { | ||||
|     if (res) { | ||||
|       if (side === 'front') { // 正面 | ||||
|         this.sf.setValue('/driverLicenseRegisterTime', res.registerDate); | ||||
|         this.sf.setValue('/carNo', res.number); | ||||
|         this.sf.setValue('/driverLicenseGetTime', res.issueDate); | ||||
|         this.sf.setValue('/driverLicenseSigningOrg', res.issuingAuthority); | ||||
|         this.sf.setValue('/carDistinguishCode', res.vin); | ||||
|         this.sf.setValue('/carOwner', res.name); | ||||
|         this.sf.setValue('/useNature', res.useCharacter === '非营运' ? 0 : 1 ); | ||||
|       } else { | ||||
|         this.sf.setValue('/curbWeight', res.unladenMass); | ||||
|         this.sf.setValue('/remarks', res.remarks); | ||||
|       } | ||||
|       if(this.carNo === '') { | ||||
|         this.carNo = res.number | ||||
|       } else if(this.carNo && this.carNo !== res.number) { | ||||
|         this.service.msgSrv.warning('请上传同一认证车辆的相关证件') | ||||
|       } | ||||
|     } | ||||
|   }); | ||||
| } | ||||
|  | ||||
| close(): void { | ||||
|   this.modal.close(true) | ||||
| } | ||||
| showExample() { | ||||
|   this.showCardFlag = !this.showCardFlag | ||||
| } | ||||
| showJopExample() { | ||||
|   this.showJopFlag = !this.showJopFlag | ||||
| } | ||||
| submitForm(){ | ||||
|   const params:any = { | ||||
|     appUserId: this.i.appUserId, | ||||
|     ...this.sf.value, | ||||
|     bindType: this.i.bindType | ||||
|   }; | ||||
|   params.carFrontPhoto = this.detailData.carFrontPhoto | ||||
|   params.carProtocal = this.detailData.carProtocal | ||||
|   params.certificatePhotoFront = this.detailData.certificatePhotoFront | ||||
|   params.certificatePhotoBack = this.detailData.certificatePhotoBack | ||||
|   params.roadTransportPhoto = this.detailData.roadTransportPhoto | ||||
|   delete params.titleA | ||||
|   delete params.titleB | ||||
|   this.checked = true | ||||
|   this.service.request(this.service.$api_updateAssistCertification, params).subscribe(res => { | ||||
|     this.checked = false | ||||
|     if(res){ | ||||
|       this.service.msgSrv.success('添加成功') | ||||
|       this.modal.close(true) | ||||
|     } | ||||
|   }) | ||||
| } | ||||
| } | ||||
| @ -0,0 +1,9 @@ | ||||
| <sf #sf [schema]="schema" [ui]="ui" [button]="'none'" [formData]="detailData"></sf> | ||||
| <div class="info"> | ||||
|   1.如果修改前后的合伙人不是在同一个渠道销售下,修改后客户的渠道销售会随着修改后的合伙人绑定到新的渠道销售下,系统也会同步发起CRM《客户转移》流程;<br> | ||||
| 2.结算起算日:指给合伙人结算佣金的起算时间,如果是修改合伙人,该日期是当前合伙人的结算起算日,同时也是上一个合伙人的结算结束时间。 | ||||
| </div> | ||||
| <div class="modal-footer"> | ||||
|   <button nz-button type="button" (click)="close()">关闭</button> | ||||
|   <button nz-button type="button" nzType="primary" (click)="save()" [disabled]="!sf?.valid">确定</button> | ||||
| </div> | ||||
| @ -0,0 +1,7 @@ | ||||
| .info{ | ||||
|   width: 80%; | ||||
|   margin:0 auto; | ||||
|   color: #333; | ||||
|   font-size: 12px; | ||||
|   line-height: 24px;; | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||
| import { EditPartnerComponentsAddComponent } from './editPartner.component'; | ||||
|  | ||||
| describe('EditPartnerComponentsAddComponent', () => { | ||||
|   let component: EditPartnerComponentsAddComponent; | ||||
|   let fixture: ComponentFixture<EditPartnerComponentsAddComponent>; | ||||
|  | ||||
|   beforeEach(async(() => { | ||||
|     TestBed.configureTestingModule({ | ||||
|       declarations: [ EditPartnerComponentsAddComponent ] | ||||
|     }) | ||||
|     .compileComponents(); | ||||
|   })); | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     fixture = TestBed.createComponent(EditPartnerComponentsAddComponent); | ||||
|     component = fixture.componentInstance; | ||||
|     fixture.detectChanges(); | ||||
|   }); | ||||
|  | ||||
|   it('should create', () => { | ||||
|     expect(component).toBeTruthy(); | ||||
|   }); | ||||
| }); | ||||
| @ -0,0 +1,122 @@ | ||||
| import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { ActivatedRoute, Router } from '@angular/router'; | ||||
| import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; | ||||
| import { _HttpClient } from '@delon/theme'; | ||||
| import { EAEnvironmentService } from '@shared'; | ||||
| import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; | ||||
| import format from 'date-fns/format'; | ||||
| import { NzMessageService } from 'ng-zorro-antd/message'; | ||||
| import { NzUploadFile } from 'ng-zorro-antd/upload'; | ||||
| import { Observable, Observer, of } from 'rxjs'; | ||||
| import { apiConf } from '@conf/api.conf'; | ||||
| import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service'; | ||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-ad-components-partner', | ||||
|   templateUrl: './editPartner.component.html', | ||||
|   styleUrls: ['./editPartner.component.less'] | ||||
| }) | ||||
| export class EditPartnerComponentsAddComponent implements OnInit { | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   record: any = {}; | ||||
|   i: any; | ||||
|   schema: SFSchema = {}; | ||||
|   detailData: any = {} | ||||
|   ui: SFUISchema = {}; | ||||
|   | ||||
|   constructor( | ||||
|     public msgSrv: NzMessageService, | ||||
|     public http: _HttpClient, | ||||
|     private route: ActivatedRoute, | ||||
|     private router: Router, | ||||
|     public service: UsermanageService, | ||||
|     private envSrv: EAEnvironmentService, | ||||
|     private modal: NzModalRef, | ||||
|   ) { } | ||||
|  | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     this.initDetailData() | ||||
|     this.initSF(); | ||||
|   } | ||||
|   initDetailData() { | ||||
|     const params = { | ||||
|       id: this.i.id | ||||
|     } | ||||
|     this.service.request(this.service.$api_partnerChannelUpdateDetaiList, params).subscribe(res => { | ||||
|       if(res) { | ||||
|         this.detailData = res | ||||
|       } else { | ||||
|         this.service.msgSrv.error(res.msg) | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
|   initSF() { | ||||
|     this.schema = { | ||||
|       properties: { | ||||
|         channelId: { | ||||
|           type: 'string', | ||||
|           title: '合伙人修改为', | ||||
|           ui: { | ||||
|             widget: 'radio', | ||||
|             showRequired: true, | ||||
|           } as SFRadioWidgetSchema, | ||||
|           enum: [ | ||||
|             { label: '全部可见', value: 1 }, | ||||
|             { label: '合伙人可见', value: 2 }, | ||||
|             { label: '销售渠道可见', value: 3 }, | ||||
|           ], | ||||
|         }, | ||||
|         remark: { | ||||
|           type: 'string', | ||||
|           title: '备注', | ||||
|           ui: { | ||||
|             widget: 'textarea', | ||||
|             placeholder: '请不要超过50个字', | ||||
|             maxLength: 50, | ||||
|             autosize: { minRows: 2, maxRows: 6 }, | ||||
|           }, | ||||
|         }, | ||||
|         effectiveNode: { | ||||
|           type: 'string', | ||||
|           title: '生效节点', | ||||
|           ui: { | ||||
|             widget: 'radio', | ||||
|             showRequired: true, | ||||
|           } as SFRadioWidgetSchema, | ||||
|           enum: [ | ||||
|             { label: '修改成功后立即生效', value: 1 }, | ||||
|             { label: 'CRM流程审核通过后生效', value: 2 } | ||||
|           ], | ||||
|         }, | ||||
|       }, | ||||
|       required: ['channelId', 'remark', 'effectiveNode'], | ||||
|     }; | ||||
|     this.ui = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 180, | ||||
|         grid: { span: 18 }, | ||||
|         width: 600, | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|   get reqParams() { | ||||
|     return {}; | ||||
|   } | ||||
|   close(): void { | ||||
|     this.modal.close(true) | ||||
|   } | ||||
|   save() { | ||||
|     const params = { | ||||
|       ...this.sf.value | ||||
|     } | ||||
|     this.service.request(this.service.$api_batchUpdateEnterpricePartner, params).subscribe(res => { | ||||
|       if(res) { | ||||
|         this.service.msgSrv.success('修改成功') | ||||
|       } else { | ||||
|         this.service.msgSrv.error(res.msg) | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,8 @@ | ||||
| <sf #sf [schema]="schema" [ui]="ui" [button]="'none'" [formData]="detailData"></sf> | ||||
| <div class="info"> | ||||
|   修改渠道销售:客户修改渠道销售后,会跟原合伙人解绑,成为新渠道销售的直客。同时系统会同步发起CRM《客户转移》流程。 | ||||
| </div> | ||||
| <div class="modal-footer"> | ||||
|   <button nz-button type="button" (click)="close()">关闭</button> | ||||
|   <button nz-button type="button" nzType="primary" (click)="save()" [disabled]="!sf?.valid">确定</button> | ||||
| </div> | ||||
| @ -0,0 +1,7 @@ | ||||
|   .info{ | ||||
|     width: 80%; | ||||
|     margin:0 auto; | ||||
|     color: #333; | ||||
|     font-size: 12px; | ||||
|     line-height: 24px;; | ||||
|   } | ||||
| @ -0,0 +1,24 @@ | ||||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||
| import { EditSaleComponentsAddComponent } from './editSale.component'; | ||||
|  | ||||
| describe('EditSaleComponentsAddComponent', () => { | ||||
|   let component: EditSaleComponentsAddComponent; | ||||
|   let fixture: ComponentFixture<EditSaleComponentsAddComponent>; | ||||
|  | ||||
|   beforeEach(async(() => { | ||||
|     TestBed.configureTestingModule({ | ||||
|       declarations: [ EditSaleComponentsAddComponent ] | ||||
|     }) | ||||
|     .compileComponents(); | ||||
|   })); | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     fixture = TestBed.createComponent(EditSaleComponentsAddComponent); | ||||
|     component = fixture.componentInstance; | ||||
|     fixture.detectChanges(); | ||||
|   }); | ||||
|  | ||||
|   it('should create', () => { | ||||
|     expect(component).toBeTruthy(); | ||||
|   }); | ||||
| }); | ||||
| @ -0,0 +1,130 @@ | ||||
| import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { ActivatedRoute, Router } from '@angular/router'; | ||||
| import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; | ||||
| import { _HttpClient } from '@delon/theme'; | ||||
| import { EAEnvironmentService } from '@shared'; | ||||
| import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; | ||||
| import format from 'date-fns/format'; | ||||
| import { NzMessageService } from 'ng-zorro-antd/message'; | ||||
| import { NzUploadFile } from 'ng-zorro-antd/upload'; | ||||
| import { Observable, Observer, of } from 'rxjs'; | ||||
| import { apiConf } from '@conf/api.conf'; | ||||
| import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service'; | ||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-ad-components-Sale', | ||||
|   templateUrl: './editSale.component.html', | ||||
|   styleUrls: ['./editSale.component.less'] | ||||
| }) | ||||
| export class EditSaleComponentsAddComponent implements OnInit { | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   record: any = {}; | ||||
|   i: any; | ||||
|   schema: SFSchema = {}; | ||||
|   detailData: any = {} | ||||
|   ui: SFUISchema = {}; | ||||
|  | ||||
|   constructor( | ||||
|     public msgSrv: NzMessageService, | ||||
|     public http: _HttpClient, | ||||
|     private route: ActivatedRoute, | ||||
|     private router: Router, | ||||
|     public service: UsermanageService, | ||||
|     private envSrv: EAEnvironmentService, | ||||
|     private modal: NzModalRef, | ||||
|      | ||||
|   ) { } | ||||
|  | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     this.initDetailData() | ||||
|     this.initSF(); | ||||
|   } | ||||
|   initDetailData() { | ||||
|     const params = { | ||||
|       id: this.i.id | ||||
|     } | ||||
|     this.service.request(this.service.$api_partnerChannelUpdateDetaiList, params).subscribe(res => { | ||||
|       if(res) { | ||||
|         this.detailData = res | ||||
|       } else { | ||||
|         this.service.msgSrv.error(res.msg) | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
|   initSF() { | ||||
|     this.schema = { | ||||
|       properties: { | ||||
|         channelId: { | ||||
|           type: 'string', | ||||
|           title: '渠道销售修改为', | ||||
|           ui: { | ||||
|             widget: 'radio', | ||||
|             showRequired: true, | ||||
|           } as SFRadioWidgetSchema, | ||||
|           enum: [ | ||||
|             { label: '全部可见', value: 1 }, | ||||
|             { label: '合伙人可见', value: 2 }, | ||||
|             { label: '销售渠道可见', value: 3 }, | ||||
|           ], | ||||
|         }, | ||||
|         remark: { | ||||
|           type: 'string', | ||||
|           title: '备注', | ||||
|           ui: { | ||||
|             widget: 'textarea', | ||||
|             placeholder: '请不要超过50个字', | ||||
|             maxLength: 50, | ||||
|             autosize: { minRows: 2, maxRows: 6 }, | ||||
|           }, | ||||
|         }, | ||||
|         effectiveNode: { | ||||
|           type: 'string', | ||||
|           title: '生效节点', | ||||
|           ui: { | ||||
|             widget: 'radio', | ||||
|             showRequired: true, | ||||
|           } as SFRadioWidgetSchema, | ||||
|           enum: [ | ||||
|             { label: '修改成功后立即生效', value: 1 }, | ||||
|             { label: 'CRM流程审核通过后生效', value: 2 } | ||||
|           ], | ||||
|         }, | ||||
|       }, | ||||
|       required: ['channelId', 'remark', 'effectiveNode'], | ||||
|     }; | ||||
|     this.ui = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 180, | ||||
|         grid: { span: 18 }, | ||||
|         width: 600, | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|   get reqParams() { | ||||
|     return {}; | ||||
|   } | ||||
|   save() { | ||||
|     this.service.nzModalService.create({ | ||||
|       nzTitle: '确定提交吗?', | ||||
|       nzClosable: false, | ||||
|       nzOnOk: () => { | ||||
|         const params = { | ||||
|           ...this.sf.value | ||||
|         } | ||||
|         this.service.request(this.service.$api_batchUpdateEnterpriceChannel, params).subscribe(res => { | ||||
|           if(res) { | ||||
|             this.service.msgSrv.success('修改成功') | ||||
|           } else { | ||||
|             this.service.msgSrv.error(res.msg) | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   close(): void { | ||||
|     this.modal.close(true) | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,19 @@ | ||||
| :host{ | ||||
|     ::ng-deep{ | ||||
|         .btnBox { | ||||
|             st-td{ | ||||
|                 // display: flex; | ||||
|                 // align-items: center; | ||||
|                 st-td>span{ | ||||
|                     display: inline-block; | ||||
|                     width: 95px; | ||||
|                     text-align: center; | ||||
|                     margin: 0 10px; | ||||
|                 } | ||||
|             } | ||||
|             .st__btn-text span{ | ||||
|                 white-space: nowrap; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -6,6 +6,9 @@ import { DynamicSettingModalComponent, ShipperBaseService } from '@shared'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component'; | ||||
| import { UsermanageService } from '../../../services/usercenter.service'; | ||||
| import { EditPartnerComponentsAddComponent } from './editPartner/editPartner.component'; | ||||
| import { EditSaleComponentsAddComponent } from './editSale/editSale.component'; | ||||
| import { ShowServiceComponent } from './showService/showservice.component'; | ||||
| @Component({ | ||||
|   selector: 'app-Freight-components-list', | ||||
|   templateUrl: './list.component.html', | ||||
| @ -93,7 +96,7 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|   showService(record: any) { | ||||
|     const modalRef = this.modal.create({ | ||||
|       nzTitle: '分配客服人员', | ||||
|       //nzContent: PartnerEditComponent, | ||||
|       nzContent: ShowServiceComponent, | ||||
|       nzWidth: 600, | ||||
|       nzComponentParams: { | ||||
|         i: record | ||||
| @ -109,8 +112,8 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|   editPartner(record: any) { | ||||
|     const modalRef = this.modal.create({ | ||||
|       nzTitle: '修改合伙人', | ||||
|       //nzContent: PartnerEditComponent, | ||||
|       nzWidth: 600, | ||||
|       nzContent: EditPartnerComponentsAddComponent, | ||||
|       nzWidth: 800, | ||||
|       nzComponentParams: { | ||||
|         i: record | ||||
|       }, | ||||
| @ -125,8 +128,8 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|   editSale(record: any) { | ||||
|     const modalRef = this.modal.create({ | ||||
|       nzTitle: '修改渠道销售', | ||||
|       //nzContent: PartnerEditComponent, | ||||
|       nzWidth: 600, | ||||
|       nzContent: EditSaleComponentsAddComponent, | ||||
|       nzWidth: 800, | ||||
|       nzComponentParams: { | ||||
|         i: record | ||||
|       }, | ||||
| @ -193,7 +196,7 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         lockedStatus7: { | ||||
|         oftenUsedServices: { | ||||
|           type: 'string', | ||||
|           title: '常用服务', | ||||
|           enum: [ | ||||
| @ -209,13 +212,13 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         lockedStatus6: { | ||||
|         customerType: { | ||||
|           type: 'string', | ||||
|           title: '客户类型', | ||||
|           enum: [ | ||||
|             { label: '全部', value: '' }, | ||||
|             { label: '直客', value: 0 }, | ||||
|             { label: '渠道客户', value: 1 } | ||||
|             { label: '直客', value: 1 }, | ||||
|             { label: '渠道客户', value: 20 } | ||||
|           ], | ||||
|           default: '', | ||||
|           ui: { | ||||
| @ -230,15 +233,21 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|             showRequired: false | ||||
|             showRequired: false, | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         contactName4: { | ||||
|         partnerName: { | ||||
|           title: '合伙人', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|             showRequired: false | ||||
|             showRequired: false, | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         contactName3: { | ||||
| @ -246,7 +255,10 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|             showRequired: false | ||||
|             showRequired: false, | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         contactName2: { | ||||
| @ -254,7 +266,10 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|             showRequired: false | ||||
|             showRequired: false, | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         applyDate: { | ||||
| @ -265,8 +280,8 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|             type: 'date', | ||||
|             format: 'yyyy-MM-dd', | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|             }, | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } as SFDateWidgetSchema, | ||||
|         }, | ||||
|         applyDate1: { | ||||
| @ -276,31 +291,10 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|             widget: 'sl-from-to', | ||||
|             type: 'date', | ||||
|             format: 'yyyy-MM-dd', | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|             }, | ||||
|           } as SFDateWidgetSchema, | ||||
|         }, | ||||
|         networkTransporter: { | ||||
|           type: 'string', | ||||
|           title: '网络货运人', | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             allowClear: true, | ||||
|             asyncData: () => this.shipperservice.getNetworkFreightForwarder() | ||||
|           } | ||||
|         }, | ||||
|         promotersTelephone: { | ||||
|           title: '业务员', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|             showRequired: false, | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|           } as SFDateWidgetSchema, | ||||
|         }, | ||||
|         lockedStatus3: { | ||||
|           type: 'string', | ||||
| @ -318,14 +312,37 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         networkTransporter: { | ||||
|           type: 'string', | ||||
|           title: '网络货运人', | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             allowClear: true, | ||||
|             asyncData: () => this.shipperservice.getNetworkFreightForwarder(), | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         promotersTelephone: { | ||||
|           title: '业务员', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|             showRequired: false, | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         source: { | ||||
|           type: 'string', | ||||
|           title: '注册渠道', | ||||
|           enum: [ | ||||
|             { label: '全部', value: '' }, | ||||
|             { label: '用户注册', value: 1 }, | ||||
|             { label: '货主添加', value: 2 }, | ||||
|             { label: '运营添加', value: 3 } | ||||
|             { label: '货主注册', value: 1 }, | ||||
|             { label: '平台添加', value: 2 } | ||||
|           ], | ||||
|           default: '', | ||||
|           ui: { | ||||
| @ -393,8 +410,8 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|       }, | ||||
|       { | ||||
|         title: '操作', | ||||
|         width: '110px', | ||||
|         className: 'text-center', | ||||
|         width: '250px', | ||||
|         className: 'text-center btnBox', | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '查看', | ||||
| @ -415,17 +432,14 @@ export class FreightComponentsListComponent implements OnInit { | ||||
|             click: item => this.showAccountDetail(item) | ||||
|           }, | ||||
|           { | ||||
|             acl: { ability: ['USERCENTER-FREIGHT-LIST-balance'] }, | ||||
|             text: '分配客服人员', | ||||
|             click: item => this.showService(item) | ||||
|           }, | ||||
|           { | ||||
|             acl: { ability: ['USERCENTER-FREIGHT-LIST-balance'] }, | ||||
|             text: '修改合伙人', | ||||
|             click: item => this.editPartner(item) | ||||
|           }, | ||||
|           { | ||||
|             acl: { ability: ['USERCENTER-FREIGHT-LIST-balance'] }, | ||||
|             text: '修改渠道销售', | ||||
|             click: item => this.editSale(item) | ||||
|           } | ||||
|  | ||||
| @ -0,0 +1,16 @@ | ||||
|  | ||||
| <!-- <nz-spin *ngIf="!i" class="modal-spin"></nz-spin> --> | ||||
| <div class="serviceBox"> | ||||
|     <div class="left">客服人员</div> | ||||
|     <div class="right"> | ||||
|         <nz-select ngModel="lucy" style="width: 250px;"> | ||||
|             <nz-option nzValue="jack" nzLabel="Jack"></nz-option> | ||||
|             <nz-option nzValue="lucy" nzLabel="Lucy"></nz-option> | ||||
|             <nz-option nzValue="disabled" nzLabel="Disabled" nzDisabled></nz-option> | ||||
|           </nz-select> | ||||
|     </div> | ||||
| </div> | ||||
| <div class="modal-footer"> | ||||
|     <button nz-button type="button" (click)="close()">关闭</button> | ||||
|     <button nz-button type="button" nzType="primary" (click)="submitForm()" [disabled]="!sf?.valid">确定</button> | ||||
| </div> | ||||
| @ -120,4 +120,10 @@ | ||||
|         resize:none; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   } | ||||
| .serviceBox{ | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|     justify-content: space-between; | ||||
|     width: 350px; | ||||
| } | ||||
| @ -0,0 +1,61 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { apiConf } from '@conf/api.conf'; | ||||
| import { cacheConf } from '@conf/cache.conf'; | ||||
| import { SFUISchema, SFSchema, SFUploadWidgetSchema, SFComponent, SFSelectWidgetSchema } from '@delon/form'; | ||||
| import { _HttpClient } from '@delon/theme'; | ||||
| import { EACacheService, EAEnvironmentService } from '@shared'; | ||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||
| import { NzUploadFile } from 'ng-zorro-antd/upload'; | ||||
| import { Observable, Observer, of } from 'rxjs'; | ||||
| import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-car-showService', | ||||
|   templateUrl: './showService.component.html', | ||||
|   styleUrls: ['./showService.component.less'] | ||||
| }) | ||||
| export class ShowServiceComponent implements OnInit { | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   record: any = {}; | ||||
|   i: any; | ||||
|  | ||||
|  | ||||
|   constructor( | ||||
|     private modal: NzModalRef, | ||||
|     public service: UsermanageService, | ||||
|     private envSrv: EAEnvironmentService, | ||||
|     private eaCacheSrv: EACacheService, | ||||
|   ) { } | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|  | ||||
|   } | ||||
|  | ||||
|  | ||||
| close(): void { | ||||
|   this.modal.close(true) | ||||
| } | ||||
|  | ||||
| submitForm(){ | ||||
|   // const params:any = { | ||||
|   //   appUserId: this.i.appUserId, | ||||
|   //   ...this.sf.value, | ||||
|   //   bindType: this.i.bindType | ||||
|   // }; | ||||
|   // params.carFrontPhoto = this.detailData.carFrontPhoto | ||||
|   // params.carProtocal = this.detailData.carProtocal | ||||
|   // params.certificatePhotoFront = this.detailData.certificatePhotoFront | ||||
|   // params.certificatePhotoBack = this.detailData.certificatePhotoBack | ||||
|   // params.roadTransportPhoto = this.detailData.roadTransportPhoto | ||||
|   // delete params.titleA | ||||
|   // delete params.titleB | ||||
|   // this.checked = true | ||||
|   // this.service.request(this.service.$api_updateAssistCertification, params).subscribe(res => { | ||||
|   //   this.checked = false | ||||
|   //   if(res){ | ||||
|   //     this.service.msgSrv.success('添加成功') | ||||
|   //     this.modal.close(true) | ||||
|   //   } | ||||
|   // }) | ||||
| } | ||||
| } | ||||
| @ -136,7 +136,14 @@ export class UsermanageService extends ShipperBaseService { | ||||
|   // 查询司机配置列表 | ||||
|   $api_configPage = '/api/mdc/cuc/driver/list/configPage'; | ||||
|  | ||||
|   constructor(public injector: Injector, private nzModalService: NzModalService, public eaCacheSrv: EACacheService) { | ||||
|   // 批量修改企业渠道 | ||||
|   $api_batchUpdateEnterpriceChannel = '/api/mdc/enterpriceRelLog/batchUpdateEnterpriceChannel'; | ||||
|   // 批量修改企业合伙人 | ||||
|   $api_batchUpdateEnterpricePartner = '/api/mdc/enterpriceRelLog/batchUpdateEnterpricePartner'; | ||||
|   // 渠道销售修改详情 | ||||
|   $api_partnerChannelUpdateDetaiList = '/api/mdc/enterpriceRelLog/partnerChannelUpdateDetaiList'; | ||||
|  | ||||
|   constructor(public injector: Injector, public nzModalService: NzModalService, public eaCacheSrv: EACacheService) { | ||||
|     super(injector, eaCacheSrv); | ||||
|   } | ||||
|  | ||||
|  | ||||
| @ -25,7 +25,8 @@ import { FreightComponentsUserDetailComponent } from './components/freight/user/ | ||||
| import { FreightComponentsUserComponent } from './components/freight/user/user.component'; | ||||
|  | ||||
| const routes: Routes = [ | ||||
|   { path: 'freight/list', component: FreightComponentsListComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-LIST-list'] } } }, | ||||
|   { path: 'freight/list', component: FreightComponentsListComponent, }, | ||||
|   //  data: { guard: { ability: ['USERCENTER-FREIGHT-LIST-list'] } } | ||||
|   { path: 'freight/list/view/:id', component: FreightComponentsListViewComponent }, | ||||
|   { path: 'freight/list/new', component: FreightComponentsListNewComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-NEW-save'] } } }, | ||||
|   { | ||||
|  | ||||
| @ -26,6 +26,9 @@ import { CarSettleAddDriverComponent } from './components/driver/add-driver/add- | ||||
| import { CtcCaptatinAddComponent } from './components/driver/captain/add/add.component'; | ||||
| import { FreightConfigComponent } from './components/freight/freight-config/freight-config.component'; | ||||
| import { UserCenterComponentsDriverConfigComponent } from './components/driver/driver-config/driver-config.component'; | ||||
| import { ShowServiceComponent } from './components/freight/list/showService/showservice.component'; | ||||
| import { EditPartnerComponentsAddComponent } from './components/freight/list/editPartner/editPartner.component'; | ||||
| import { EditSaleComponentsAddComponent } from './components/freight/list/editSale/editSale.component'; | ||||
|  | ||||
| const COMPONENTS = [ | ||||
|   FreightComponentsListComponent, | ||||
| @ -46,9 +49,10 @@ const COMPONENTS = [ | ||||
|   FreightConfigComponent, | ||||
|   UserCenterComponentsDriverConfigComponent | ||||
| ]; | ||||
| const COMPONENTS_NOROUNT = [ShowServiceComponent, EditPartnerComponentsAddComponent, EditSaleComponentsAddComponent]; | ||||
|  | ||||
| @NgModule({ | ||||
|   imports: [SharedModule, UsercenterRoutingModule, DynamicSettingModule], | ||||
|   declarations: [...COMPONENTS] | ||||
|   declarations: [...COMPONENTS, ...COMPONENTS_NOROUNT] | ||||
| }) | ||||
| export class UsercenterModule {} | ||||
|  | ||||
		Reference in New Issue
	
	Block a user