车辆对接
This commit is contained in:
		| @ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-11-29 15:22:34 | ||||
|  * @LastEditTime: 2021-12-13 10:02:18 | ||||
|  * @LastEditTime: 2021-12-16 13:34:20 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\list.component.html | ||||
| @ -60,10 +60,10 @@ | ||||
|     [loading]="service.http.loading" | ||||
|   > | ||||
|     <ng-template st-row="carLength" let-item let-index="index"> | ||||
|     <div>{{item?.carModel}}-{{item?.carLength?  item?.carLength + '米' : ''}}-{{ item?.carLoad? item?.carLoad + '吨' : ''}}</div> | ||||
|     <div>{{item?.carModelLabel}}-{{item?.carLength?  item?.carLength + '米' : ''}}-{{ item?.carLoad? item?.carLoad + '吨' : ''}}</div> | ||||
|     </ng-template> | ||||
|     <ng-template st-row="isSelf" let-item let-index="index"> | ||||
|     <div>{{item?.carModel}}-{{item?.carLength?  item?.carLength + '米' : ''}}-{{ item?.carLoad? item?.carLoad + '吨' : ''}}</div> | ||||
|     <div>{{item?.carModelLabel}}-{{item?.carLength?  item?.carLength + '米' : ''}}-{{ item?.carLoad? item?.carLoad + '吨' : ''}}</div> | ||||
|     </ng-template> | ||||
|     <ng-template st-row="contactsPhone" let-item let-index="index"> | ||||
|         <div | ||||
|  | ||||
| @ -130,7 +130,7 @@ export class VehicleComponentsAuditComponent implements OnInit { | ||||
|     this.columns = [ | ||||
|       // { title: '', type: 'checkbox', className: 'text-center' }, | ||||
|       { title: '车牌号', className: 'text-center', index: 'carNo' }, | ||||
|       { title: '车牌颜色', className: 'text-center', index: 'carNoColor' }, | ||||
|       { title: '车牌颜色', className: 'text-center', index: 'carModelLabel' }, | ||||
|       { title: '车型-车长-载重', className: 'text-center', render: 'carLength' }, | ||||
|       { title: '是否挂靠', className: 'text-center', render: 'isSelf' }, | ||||
|       { title: '所有人', className: 'text-center', index: 'carOwner' }, | ||||
| @ -138,18 +138,15 @@ export class VehicleComponentsAuditComponent implements OnInit { | ||||
|       { | ||||
|         title: '审核状态', | ||||
|         className: 'text-center', | ||||
|         index: 'enStatusStr2', | ||||
|         index: 'approvalStatus', | ||||
|         type: 'badge', | ||||
|         badge: { | ||||
|           10: { text: '待审核', color: 'default' }, | ||||
|           20: { text: '审核通过', color: 'success' }, | ||||
|           30: { text: '驳回', color: 'warning' }, | ||||
|           // { label: '未提交', value: '-1' }, | ||||
|           // { label: '草稿', value: 0}, | ||||
|           // { label: '待审核', value: 10 }, | ||||
|           // { label: '审核通过', value: 20 }, | ||||
|           // { label: '驳回', value: 30 }, | ||||
|           // { label: '证件过期', value: 40 }, | ||||
|           '-1': { text: '未上传', color: 'default' }, | ||||
|           0: { text: '草稿', color: 'warning' }, | ||||
|           10: { text: '待审核', color: 'warning' }, | ||||
|           20: { text: '已审核', color: 'success' }, | ||||
|           30: { text: '已驳回', color: 'error' }, | ||||
|           40: { text: '证件过期', color: 'error' }, | ||||
|         }, | ||||
|       }, | ||||
|       { title: '申请时间', className: 'text-center', render: 'isSelf' }, | ||||
| @ -161,7 +158,7 @@ export class VehicleComponentsAuditComponent implements OnInit { | ||||
|           { | ||||
|             text: '查看', | ||||
|             click: (item) => { | ||||
|               this.router.navigate(['./detail', item.id], { relativeTo: this.ar }); | ||||
|               this.router.navigate(['./detail', item.id], { relativeTo: this.ar,queryParams: { carId: item.carId } }); | ||||
|               // this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } }); | ||||
|             }, | ||||
|           }, | ||||
| @ -170,7 +167,7 @@ export class VehicleComponentsAuditComponent implements OnInit { | ||||
|     ]; | ||||
|   } | ||||
|   daoyun(item: any) { | ||||
|     this.router.navigate(['./view', item.id], { relativeTo: this.ar }); | ||||
|     this.router.navigate(['./view', item], { relativeTo: this.ar }); | ||||
|   } | ||||
|   expandToggle() { | ||||
|     this._$expand = !this._$expand; | ||||
|  | ||||
| @ -8,9 +8,15 @@ | ||||
|   <ng-template #content> | ||||
|     <sv-container col="3"> | ||||
|       <h2>车牌号:{{detailData?.carNo}}</h2> | ||||
|       <sv-title style="font-weight: 700;">待审核 | ||||
|         <div style="float: right;"> | ||||
|           <ng-container *ngIf="!isEdit"> | ||||
|       <sv-title style="font-weight: 700;"> | ||||
|         <span *ngIf="detailData?.approvalStatus === 1 || detailData?.approvalStatus === '1'">未上传</span> | ||||
|         <span *ngIf="detailData?.approvalStatus === 0 || detailData?.approvalStatus === '0'">草稿</span> | ||||
|         <span *ngIf="detailData?.approvalStatus === 10 || detailData?.approvalStatus === '10'">待审核</span> | ||||
|         <span *ngIf="detailData?.approvalStatus === 20 || detailData?.approvalStatus === '20'">已审核</span> | ||||
|         <span *ngIf="detailData?.approvalStatus === 30 || detailData?.approvalStatus === '30'">已驳回</span> | ||||
|         <span *ngIf="detailData?.approvalStatus === 40 || detailData?.approvalStatus === '40'">证件过期</span> | ||||
|         <div style="float: right;" *ngIf="detailData?.approvalStatus === 10 || detailData?.approvalStatus === '10'"> | ||||
|           <ng-container *ngIf="!isEdit "> | ||||
|             <button nz-button nzType="default" nzDanger (click)="approveDriver()">通过</button> | ||||
|             <button nz-button nzType="default" nzDanger (click)="rejectedDriver()">驳回</button> | ||||
|             <button nz-button nzType="default" nzDanger (click)="ratify()">修改</button> | ||||
| @ -84,8 +90,8 @@ | ||||
|   <sv-container col="1" class="mt-md"> | ||||
|     <sv label="车头照"> | ||||
|       <ng-container | ||||
|         *ngTemplateOutlet="uploadTemplate;context:{image:detailData?.carFrontPhoto,key:'carFrontPhoto'}"> | ||||
|       </ng-container> | ||||
|             *ngTemplateOutlet="uploadTemplate;context:{image:detailData?.carFrontPhotoWatermark,key:'carFrontPhotoWatermark',hover: 'PhotoWatermark2'}"> | ||||
|           </ng-container> | ||||
|     </sv> | ||||
|   </sv-container> | ||||
|   <nz-divider></nz-divider> | ||||
| @ -150,10 +156,12 @@ | ||||
|   </sv-container> | ||||
|   <sv-container col="1"> | ||||
|     <sv label="行驶证照片"> | ||||
|       <!-- <app-imagelist [imgList]="[detailData?.certificatePhotoFront,detailData?.certificatePhotoBack,detailData?.certificatePhotoFrontWatermark,detailData?.certificatePhotoBackWatermark]"></app-imagelist> --> | ||||
|       <ng-container | ||||
|       *ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFront,key:'certificatePhotoFront'}"> | ||||
|     </ng-container> | ||||
|         *ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoFrontWatermark,key:'certificatePhotoFrontWatermark',hover: 'FrontWatermark'}"> | ||||
|       </ng-container> | ||||
|         <ng-container | ||||
|         *ngTemplateOutlet="uploadTemplate;context:{image:detailData?.certificatePhotoBackWatermark,key:'certificatePhotoBackWatermark',hover: 'BackWatermark'}"> | ||||
|       </ng-container> | ||||
|     </sv> | ||||
|   </sv-container> | ||||
|   <nz-divider></nz-divider> | ||||
| @ -180,9 +188,8 @@ | ||||
|       [nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''"></nz-date-picker> | ||||
|     </sv> | ||||
|     <sv label="道路运输证照片"> | ||||
|       <!-- <app-imagelist [imgList]="[detailData?.roadTransportPhoto,detailData?.roadTransportPhotoWatermark ]"></app-imagelist> --> | ||||
|       <ng-container | ||||
|       *ngTemplateOutlet="uploadTemplate;context:{image:detailData?.roadTransportPhoto,key:'roadTransportPhoto'}"> | ||||
|       *ngTemplateOutlet="uploadTemplate;context:{image:detailData?.roadTransportPhotoWatermark,key:'roadTransportPhotoWatermark', hover: 'Watermark'}" > | ||||
|     </ng-container> | ||||
|     </sv> | ||||
|   </sv-container> | ||||
| @ -194,11 +201,14 @@ | ||||
|   [req]="{  method: 'POST', allInBody: true, params: reqParams }" | ||||
|     [res]="{ reName: { list: 'data', total: 'data' } }" | ||||
|     [ngStyle]="{ margin: '1rem 0' }" multiSort size="small" [page]="{ show: false }"> | ||||
|     <ng-template st-row="isSelf" let-item let-index="index"> | ||||
|       <div nz-tooltip [nzTooltipTitle]="item.enterpriseName"> | ||||
|         <div> | ||||
|           {{ item?.isSelf ? '是' : '否' }} | ||||
|         </div> | ||||
|     <ng-template st-row="auditStatusEnum" let-item let-index="index"> | ||||
|       <div> | ||||
|         <span *ngIf="item?.auditStatusEnum === -1 || item?.auditStatusEnum === '-1'">未上传</span> | ||||
|         <span *ngIf="item?.auditStatusEnum === 0 || item?.auditStatusEnum === '0'">草稿</span> | ||||
|         <span *ngIf="item?.auditStatusEnum === 10 || item?.auditStatusEnum === '10'">待审核</span> | ||||
|         <span *ngIf="item?.auditStatusEnum === 20 || item?.auditStatusEnum === '20'">已审核</span> | ||||
|         <span *ngIf="item?.auditStatusEnum === 30 || item?.auditStatusEnum === '30'">已驳回</span> | ||||
|         <span *ngIf="item?.auditStatusEnum === 40 || item?.auditStatusEnum === '40'">证件过期</span> | ||||
|       </div> | ||||
|     </ng-template> | ||||
|   </st> | ||||
| @ -228,7 +238,7 @@ | ||||
|     </ng-container> | ||||
|     <div *ngIf="image" (mouseover)="detailData[hover]=true" (mouseleave)="detailData[hover]=false" | ||||
|       (click)="$event.cancelBubble=true" class="image-hover"> | ||||
|       <img [src]="image" style="width: 200px;height: 160px;" /> | ||||
|       <img (click)="showImg(image)" [src]="image" style="width: 200px;height: 160px;" /> | ||||
|       <div class="mask" *ngIf="detailData[hover] && isEdit"></div> | ||||
|       <div class="mask-over" *ngIf="detailData[hover] && isEdit"> | ||||
|         <i nz-icon nzType="close-circle" nzTheme="fill" class="delete-icon" (click)="deleteImg(key)"></i> | ||||
|  | ||||
| @ -12,6 +12,8 @@ import { VehicleService } from '../../../services/vehicle.service'; | ||||
| // import { VehicleComponentsListEditComponent } from '../edit/edit.component'; | ||||
| // import { VehicleImgViewComponent } from '../img-view/img-view.component'; | ||||
| import { EADateUtil } from '@shared'; | ||||
| import { VehicleImgViewComponent } from '../../list/img-view/img-view.component'; | ||||
| import { VehicleComponentsListEditComponent } from '../../list/edit/edit.component'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-Vehicle-components-Audit-detail', | ||||
| @ -31,20 +33,21 @@ export class VehicleComponentsAuditDetailComponent implements OnInit { | ||||
|   approvalOpinion = ''; | ||||
|   uploadURl = apiConf.waterFileUpload; | ||||
|   disabledUpload = false; | ||||
|   constructor(public service: VehicleService, private route: ActivatedRoute, private nzModalService: NzModalService) {} | ||||
|   constructor(public service: VehicleService, private route: ActivatedRoute, private nzModalService: NzModalService, private modal: ModalHelper,) {} | ||||
|  | ||||
|   ngOnInit() { | ||||
|     this.getSelectList(); | ||||
|     console.log(this.route.snapshot.params) | ||||
|     this.getDetailList(); | ||||
|     this.initST(); | ||||
|   } | ||||
|  | ||||
|   initST() { | ||||
|     this.columns = [ | ||||
|       { title: '认证司机', index: 'name', width: 300, className: 'text-center' }, | ||||
|       { title: '司机手机号', index: 'mobile', width: 300, className: 'text-center' }, | ||||
|       { title: '是否挂靠', render: 'isSelf', width: 300, className: 'text-center' }, | ||||
|       { title: '录入人员', index: 'totalPrice', width: 300, className: 'text-center' }, | ||||
|       { title: '司机姓名', index: 'name',  className: 'text-center' }, | ||||
|       { title: '司机手机号', index: 'mobile',  className: 'text-center' }, | ||||
|       { title: '身份证号', index: 'idCardNo',  className: 'text-center' }, | ||||
|       { title: '挂靠协议', render: 'auditStatusEnum',  className: 'text-center' }, | ||||
|       { | ||||
|         title: '车主申明/挂靠协议', | ||||
|         fixed: 'right', | ||||
| @ -52,20 +55,22 @@ export class VehicleComponentsAuditDetailComponent implements OnInit { | ||||
|         className: 'text-left', | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '查看协议' | ||||
|             // click: _record => this.viewEvaluate(_record) | ||||
|             text: '查看协议', | ||||
|             click: (_record) => this.viewEvaluate(_record), | ||||
|             iif: item => item.auditStatusEnum == 10 || item.auditStatusEnum == 20, | ||||
|           }, | ||||
|           { | ||||
|             text: '上传协议' | ||||
|             // click: _record => this.updateEvaluate(_record) | ||||
|           } | ||||
|             text: '上传协议', | ||||
|             click: (_record) => this.updateEvaluate(_record), | ||||
|             iif: item => item.auditStatusEnum == -1, | ||||
|           }, | ||||
|         ] | ||||
|       } | ||||
|     ]; | ||||
|   } | ||||
|  | ||||
|   getDetailList() { | ||||
|     console.log(this.route.snapshot?.params?.id); | ||||
|     console.log(this.route.snapshot.queryParams.carId); | ||||
|     const params = { | ||||
|       id: this.route.snapshot?.params?.id | ||||
|     }; | ||||
| @ -78,11 +83,12 @@ export class VehicleComponentsAuditDetailComponent implements OnInit { | ||||
|   approveDriver() { | ||||
|     this.nzModalService.confirm({ | ||||
|       nzTitle: '审核通过', | ||||
|       nzContent: `<p>车牌号:${this.detailData?.licenseNo}</p><p>是否确认通过审核`, | ||||
|       nzContent: `<p>车牌号:${this.detailData?.carNo}</p><p>是否确认通过审核`, | ||||
|       nzOnOk: () => { | ||||
|         this.adjuctUser( | ||||
|           { | ||||
|             auditStatus: 20 | ||||
|             approvalStatus: 20, | ||||
|             id: this.route.snapshot?.params?.id, | ||||
|           }, | ||||
|           '审核成功' | ||||
|         ); | ||||
| @ -101,7 +107,8 @@ export class VehicleComponentsAuditDetailComponent implements OnInit { | ||||
|         } | ||||
|         this.adjuctUser( | ||||
|           { | ||||
|             auditStatus: 30, | ||||
|             id: this.route.snapshot?.params?.id, | ||||
|             approvalStatus: 30, | ||||
|             approvalOpinion: this.approvalOpinion | ||||
|           }, | ||||
|           '审核驳回成功' | ||||
| @ -147,7 +154,7 @@ export class VehicleComponentsAuditDetailComponent implements OnInit { | ||||
|    * 查询参数 | ||||
|    */ | ||||
|     get reqParams() { | ||||
|       return { id: this.route.snapshot?.params?.id }; | ||||
|       return { id: this.route.snapshot.queryParams.carId }; | ||||
|     } | ||||
|   showImg(url: any) { | ||||
|     const params = { | ||||
| @ -171,7 +178,7 @@ export class VehicleComponentsAuditDetailComponent implements OnInit { | ||||
|   } | ||||
|  | ||||
|   private adjuctUser(params: any, msg: string) { | ||||
|     this.service.request(this.service.$api_get_operate_get, { ...params }).subscribe(res => { | ||||
|     this.service.request(this.service.$api_get_operate_audit, { ...params }).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success(msg); | ||||
|       } | ||||
| @ -225,4 +232,14 @@ export class VehicleComponentsAuditDetailComponent implements OnInit { | ||||
|       }) | ||||
|       return value; | ||||
|     } | ||||
|     viewEvaluate(item: any) { | ||||
|       this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe(() => { | ||||
|         this.st.reload(); | ||||
|       }); | ||||
|     } | ||||
|     updateEvaluate(item: any) { | ||||
|       this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe(() => { | ||||
|         this.st.reload(); | ||||
|       }); | ||||
|     } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user