车辆对接
This commit is contained in:
		| @ -1,5 +1,5 @@ | ||||
| <div class="modal-header"> | ||||
|     <div class="modal-title">新增</div> | ||||
|     <div class="modal-title">添加熟车</div> | ||||
| </div> | ||||
| <!-- <nz-spin *ngIf="!i" class="modal-spin"></nz-spin> --> | ||||
| <div> | ||||
| @ -30,9 +30,22 @@ | ||||
|     <div *ngIf="sf?.value?.mobile && tableData?.length > 0"> | ||||
|         <st #st multiSort bordered [columns]="columns" [ps]="20" [req]="{ method: 'POST', allInBody: true, reName: { pi: '', ps: '' }, params: reqParams }" [res]="{ reName: { list: 'data', total: 'data.total' } }" [page]="{ show: true, showSize: true, pageSizes: [20, 50, 100] }" | ||||
|         [loading]="service.http.loading" [data]="tableData"> | ||||
|  | ||||
|         <ng-template st-row="certificationStatus" let-item let-index="index"> | ||||
|             <div *ngIf="item.certificationStatus === -1"> | ||||
|                 <span class="ng-tns-c230-1239 ant-badge-status-dot ant-badge-status-processing ng-star-inserted"></span> 未认证 | ||||
|             </div> | ||||
|             <div *ngIf="item.certificationStatus === 0"> | ||||
|                 <span class="ng-tns-c230-1239 ant-badge-status-dot ant-badge-status-processing ng-star-inserted"></span> 待审核 | ||||
|             </div> | ||||
|             <div *ngIf="item.certificationStatus === 1"> | ||||
|                 <span class="ng-tns-c230-1239 ant-badge-status-dot ant-badge-status-success ng-star-inserted"></span> 已成功 | ||||
|             </div> | ||||
|             <div *ngIf="item.certificationStatus === 2"> | ||||
|                 <span class="ng-tns-c230-1240 ant-badge-status-dot ant-badge-status-warning ng-star-inserted"></span> 已驳回 | ||||
|             </div> | ||||
|         </ng-template> | ||||
|     <ng-template st-row="carModel" let-item let-index="index"> | ||||
|         <span>{{item.carModel}};{{item.carLength}};{{item.carLoad}};</span> | ||||
|         <span>{{item.carModelLabel}}-{{item.carLengthLabel}}米-{{item.carLoad}}吨</span> | ||||
|     </ng-template> | ||||
| </st> | ||||
|     </div> | ||||
|  | ||||
| @ -106,17 +106,10 @@ export class CarAddmodalComponent implements OnInit { | ||||
|       { title: '车辆信息', render: 'carModel', className: 'text-center' }, | ||||
|       { | ||||
|         title: '个人认证状态', | ||||
|         index: 'identityStatus', | ||||
|         render: 'certificationStatus', | ||||
|         className: 'text-center', | ||||
|         type: 'enum', | ||||
|         enum: { | ||||
|           10: '待审核', | ||||
|           20: '已成功', | ||||
|           30: '已驳回', | ||||
|           40: '证件过期', | ||||
|         } | ||||
|       }, | ||||
|       { title: '驾驶证类型', index: 'createTime', className: 'text-center' }, | ||||
|       { title: '驾驶证类型', index: 'driverType', className: 'text-center' }, | ||||
|       { | ||||
|         title: '操作', | ||||
|         width: '180px', | ||||
| @ -129,14 +122,16 @@ export class CarAddmodalComponent implements OnInit { | ||||
|   } | ||||
|   initData(flag?: any) { | ||||
|     if (this.sf?.value.mobile) { | ||||
|       this.flag = flag | ||||
|       this.service.request(this.service.$api_getCarCaptainByMobile, { mobile: this.sf?.value.mobile }).subscribe(res => { | ||||
|         this.flag = flag | ||||
|         if (res.userId) { | ||||
|           this.tableData = [res]; | ||||
|           setTimeout(() => { | ||||
|             this.st.reload() | ||||
|           }) | ||||
|         } else { | ||||
|           this.tableData = [] | ||||
|         } | ||||
|         this.st.reload() | ||||
|       }) | ||||
|     } | ||||
|   } | ||||
| @ -152,15 +147,14 @@ export class CarAddmodalComponent implements OnInit { | ||||
|    */ | ||||
|   add(item: any) { | ||||
|     const params: any = { | ||||
|       enterpriseId: this.companyData.enterpriseId, | ||||
|       enterpriseProjectId: this.companyData.projectId, | ||||
|       source: 1, | ||||
|       appUserId: item.appUserId ? item.appUserId : '', | ||||
|       mobile: item.mobile | ||||
|     } | ||||
|     this.service.request(this.service.$api_enterpriseVehicleSave, params).subscribe(res => { | ||||
|       if (res.data) { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success('添加成功') | ||||
|         this.modal.close(true) | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
| @ -174,6 +168,6 @@ export class CarAddmodalComponent implements OnInit { | ||||
|     window.history.go(-1); | ||||
|   } | ||||
|   close(): void { | ||||
|     this.modal.destroy(); | ||||
|     this.modal.close(true); | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -282,7 +282,7 @@ | ||||
|   <div class="align-center"> | ||||
|     <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="choose()">取消</button> | ||||
|     <button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submit()">提交修改</button> | ||||
|     <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="chooseFamifiar()">指派熟车</button> | ||||
|     <!-- <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="chooseFamifiar()">指派熟车</button> --> | ||||
|     <button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" (click)="submit()" | ||||
|       >司机抢单</button | ||||
|     > | ||||
|  | ||||
| @ -313,7 +313,7 @@ | ||||
| </nz-card> | ||||
| <nz-card> | ||||
|   <div class="align-center"> | ||||
|     <button nz-button nzType="primary" (click)="submit('assign')" *ngIf="type === 'add'">指派熟车</button> | ||||
|     <!-- <button nz-button nzType="primary" (click)="submit('assign')" *ngIf="type === 'add'">指派熟车</button> --> | ||||
|     <button nz-button nzType="primary" style="margin-left: 48px" (click)="submit('publish')" *ngIf="type === 'add'">司机抢单</button> | ||||
|     <button | ||||
|       nz-button | ||||
|  | ||||
		Reference in New Issue
	
	Block a user