fix bug
This commit is contained in:
		| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2021-12-24 16:58:02 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-04 14:06:28 | ||||
|  * @LastEditTime : 2022-03-04 14:15:24 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.html | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
| --> | ||||
| @ -345,17 +345,23 @@ | ||||
|  | ||||
| <nz-card> | ||||
|   <div nz-row> | ||||
|     <nz-card nzTitle="轨迹信息" style="width: 100%;" #distannce5> | ||||
|       <div nz-row >  | ||||
|         <div nz-col [nzSpan]='12'> | ||||
|     <!-- <st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }"> | ||||
|     </st> --> | ||||
|   </div> | ||||
|   <div nz-col [nzSpan]='12'> | ||||
|      <amap-path-simplifier></amap-path-simplifier> | ||||
|    </div> | ||||
|    </div> | ||||
|     <nz-card nzTitle="轨迹信息" style="width: 100%" id="distannce5"  [nzExtra]="extraTemplate" #distannce5> | ||||
|       <div nz-row> | ||||
|         <div nz-col [nzSpan]="12"> | ||||
|           <st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }"> | ||||
|     </st> | ||||
|         </div> | ||||
|         <div nz-col [nzSpan]="12"> | ||||
|           <amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="MapList"></amap-path-simplifier> | ||||
|         </div> | ||||
|       </div> | ||||
|     </nz-card> | ||||
|     <ng-template #extraTemplate> | ||||
|       <nz-radio-group [(ngModel)]="trajectory"> | ||||
|         <label nz-radio-button nzValue="car">车辆轨迹</label> | ||||
|         <label nz-radio-button nzValue="driver">司机轨迹</label> | ||||
|       </nz-radio-group> | ||||
|     </ng-template> | ||||
|   </div> | ||||
| </nz-card> | ||||
| <nz-modal [(nzVisible)]="isVisible"   [nzFooter]="nzModalFooter" nzTitle="附件信息" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()"> | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2021-12-24 16:58:02 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-04 13:53:04 | ||||
|  * @LastEditTime : 2022-03-04 14:15:21 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| @ -22,6 +22,7 @@ import { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload'; | ||||
| import { Observable, Observer } from 'rxjs'; | ||||
| import { apiConf } from '@conf/api.conf'; | ||||
| import { OrderManagementService } from '../../services/order-management.service'; | ||||
| import format from 'date-fns/format'; | ||||
| import { NzCardComponent } from 'ng-zorro-antd/card'; | ||||
| import { map } from 'rxjs/operators'; | ||||
| function getBase64(file: File): Promise<string | ArrayBuffer | null> { | ||||
| @ -40,7 +41,9 @@ function getBase64(file: File): Promise<string | ArrayBuffer | null> { | ||||
| export class OrderManagementBulkDetailChangeComponent implements OnInit { | ||||
|   validateForm1: FormGroup; | ||||
|   id = this.route.snapshot.params.id; | ||||
|   trajectory = 'car'; | ||||
|   @ViewChild('distannce3', { static: false }) | ||||
|   MapList: any[]=[]; | ||||
|   i: any= {unLoadingPlaceList:[]}; | ||||
|   totalDistance = 0.0; //总里程 | ||||
|   totalTime = 0.0; //路程总时间 | ||||
| @ -67,29 +70,15 @@ loadTime: any; // 货源单设置回显 | ||||
|   schema4: SFSchema = {}; | ||||
|   isVisible = false; | ||||
|   billExpenses: any[] = []; //运费信息表格信息 | ||||
|   addressItems: any[] = []; //打点地址数据组 | ||||
|   ui4!: SFUISchema; | ||||
|   formData: any; | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   schema: SFSchema = {}; | ||||
|   ui: SFUISchema = {}; | ||||
|   logColumns: STColumn[] = [ | ||||
|     { title: '款项', index: 'expenseName' }, | ||||
|     { title: '运输费(元)', render: 'price' }, | ||||
|     { title: '附加费(元)', render: 'surcharge' }, | ||||
|     { title: '支付时间', index: ' paymentTime' }, | ||||
|     { | ||||
|       title: '支付状态', | ||||
|       className: 'text-center', | ||||
|       index: 'paymentStatus', | ||||
|       type: 'badge', | ||||
|       width: '120px', | ||||
|       badge: { | ||||
|         '1': { text: '待申请', color: 'warning' }, | ||||
|         '2': { text: '已支付', color: 'success' }, | ||||
|         '3': { text: '已拒绝', color: 'warning' }, | ||||
|         '4': { text: '申请中', color: 'warning' } | ||||
|       } | ||||
|     } | ||||
|     { title: '时间', index: 'vinOutTime' }, | ||||
|     { title: '地点', index: 'cityName' }, | ||||
|   ]; | ||||
|   constructor( | ||||
|     private route: ActivatedRoute, | ||||
| @ -889,4 +878,30 @@ goDistance(elf: NzCardComponent) { | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
|     // 获取轨迹 | ||||
|     MapInit() { | ||||
|       this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { | ||||
|         if (res) { | ||||
|           const points = res.trackArray; | ||||
|           let list :any[] = []; | ||||
|           points?.forEach((item: any) => { | ||||
|             list.push({ | ||||
|               name: item.hgt, | ||||
|               lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] | ||||
|             }); | ||||
|           }); | ||||
|           this.MapList = list; | ||||
|           this.addressItems = res.parkArray; | ||||
|           if(this.addressItems && this.addressItems.length > 0){ | ||||
|             this.addressItems.forEach(item => { | ||||
|               item.vinOutTime = this.getLocalTime(item.vinOutTime); | ||||
|             }); | ||||
|           } | ||||
|         } | ||||
|       }); | ||||
|     } | ||||
|    | ||||
|     getLocalTime(time: any) { | ||||
|       return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -34,23 +34,8 @@ export class OrderManagementBulkeDetailComponent implements OnInit { | ||||
|   attObj: any; | ||||
|   isVisible = false; | ||||
|   logColumns: STColumn[] = [ | ||||
|     { title: '款项', index: 'costName', render: 'PriceType' }, | ||||
|     { title: '运输费(元)', render: 'price' }, | ||||
|     { title: '附加费(元)', render: 'surcharge' }, | ||||
|     { title: '支付时间', index: 'paymentTime' }, | ||||
|     { | ||||
|       title: '支付状态', | ||||
|       className: 'text-center', | ||||
|       index: 'paymentStatus', | ||||
|       type: 'badge', | ||||
|       width: '120px', | ||||
|       badge: { | ||||
|         '1': { text: '待申请', color: 'warning' }, | ||||
|         '2': { text: '已支付', color: 'success' }, | ||||
|         '3': { text: '已拒绝', color: 'warning' }, | ||||
|         '4': { text: '申请中', color: 'warning' } | ||||
|       } | ||||
|     } | ||||
|     { title: '时间', index: 'vinOutTime' }, | ||||
|     { title: '地点', index: 'cityName' }, | ||||
|   ]; | ||||
|   trajectory = 'car'; | ||||
|   addressItems: any[] = []; //打点地址数据组 | ||||
|  | ||||
		Reference in New Issue
	
	Block a user