fix bug
This commit is contained in:
		| @ -4,7 +4,7 @@ | |||||||
|  * @Author       : Shiming |  * @Author       : Shiming | ||||||
|  * @Date         : 2021-12-24 16:58:02 |  * @Date         : 2021-12-24 16:58:02 | ||||||
|  * @LastEditors  : Shiming |  * @LastEditors  : Shiming | ||||||
|  * @LastEditTime : 2022-03-23 14:44:37 |  * @LastEditTime : 2022-04-11 19:03:20 | ||||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts |  * @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. |  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||||
|  */ |  */ | ||||||
| @ -589,6 +589,7 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit { | |||||||
|       nzContent: AmapPoiPickerComponent, |       nzContent: AmapPoiPickerComponent, | ||||||
|       nzWidth: 900, |       nzWidth: 900, | ||||||
|       nzOnOk: item => { |       nzOnOk: item => { | ||||||
|  |         if(item?.poi) { | ||||||
|         const poi = item.poi; |         const poi = item.poi; | ||||||
|         const locList = poi.pois; |         const locList = poi.pois; | ||||||
|         switch (type) { |         switch (type) { | ||||||
| @ -620,7 +621,10 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit { | |||||||
|             this.totalTime = res?.time; |             this.totalTime = res?.time; | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|  |       } else { | ||||||
|  |         this.service.msgSrv.warning('请重新手动选择地址!') | ||||||
|       } |       } | ||||||
|  |     } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|   initSF3() { |   initSF3() { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ | |||||||
|  * @Author       : Shiming |  * @Author       : Shiming | ||||||
|  * @Date         : 2021-12-23 13:39:58 |  * @Date         : 2021-12-23 13:39:58 | ||||||
|  * @LastEditors  : Shiming |  * @LastEditors  : Shiming | ||||||
|  * @LastEditTime : 2022-04-06 15:12:24 |  * @LastEditTime : 2022-04-11 19:03:47 | ||||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts |  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts | ||||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. |  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||||
|  */ |  */ | ||||||
| @ -560,6 +560,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | |||||||
|       nzContent: AmapPoiPickerComponent, |       nzContent: AmapPoiPickerComponent, | ||||||
|       nzWidth: 900, |       nzWidth: 900, | ||||||
|       nzOnOk: item => { |       nzOnOk: item => { | ||||||
|  |         if(item?.poi) { | ||||||
|         const poi = item.poi; |         const poi = item.poi; | ||||||
|         const locList = poi.pois; |         const locList = poi.pois; | ||||||
|         switch (type) { |         switch (type) { | ||||||
| @ -591,6 +592,9 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | |||||||
|             this.totalTime = res?.time; |             this.totalTime = res?.time; | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|  |       } else { | ||||||
|  |         this.service.msgSrv.warning('请重新手动选择地址!') | ||||||
|  |       } | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -838,6 +838,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | |||||||
|       nzContent: AmapPoiPickerComponent, |       nzContent: AmapPoiPickerComponent, | ||||||
|       nzWidth: 900, |       nzWidth: 900, | ||||||
|       nzOnOk: item => { |       nzOnOk: item => { | ||||||
|  |         if(item?.poi) { | ||||||
|         const poi = item.poi; |         const poi = item.poi; | ||||||
|         const locList = poi.location.toString().split(','); |         const locList = poi.location.toString().split(','); | ||||||
|         switch (type) { |         switch (type) { | ||||||
| @ -869,6 +870,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | |||||||
|             this.totalTime = res.time; |             this.totalTime = res.time; | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|  |       } else { | ||||||
|  |         this.service.msgSrv.warning('请重新手动选择地址!') | ||||||
|  |       } | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -725,6 +725,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { | |||||||
|       nzContent: AmapPoiPickerComponent, |       nzContent: AmapPoiPickerComponent, | ||||||
|       nzWidth: 900, |       nzWidth: 900, | ||||||
|       nzOnOk: item => { |       nzOnOk: item => { | ||||||
|  |         if(item?.poi) { | ||||||
|         const poi = item.poi; |         const poi = item.poi; | ||||||
|         const locList = poi.pois; |         const locList = poi.pois; | ||||||
|         switch (type) { |         switch (type) { | ||||||
| @ -753,6 +754,9 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { | |||||||
|             this.totalTime = res.time; |             this.totalTime = res.time; | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|  |       } else { | ||||||
|  |         this.service.msgSrv.warning('请重新手动选择地址!') | ||||||
|  |       } | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -1080,37 +1080,42 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|       nzContent: AmapPoiPickerComponent, |       nzContent: AmapPoiPickerComponent, | ||||||
|       nzWidth: 900, |       nzWidth: 900, | ||||||
|       nzOnOk: item => { |       nzOnOk: item => { | ||||||
|         const poi = item.poi; |         console.log(item); | ||||||
|         const locList = poi.pois; |         if(item?.poi) { | ||||||
|         switch (type) { |           const poi = item.poi; | ||||||
|           case 'start': |           const locList = poi.pois; | ||||||
|             this.startInfo[index].detailedAddress = poi.formattedAddress; |           switch (type) { | ||||||
|             this.startInfo[index].longitude = locList[0]; |             case 'start': | ||||||
|             this.startInfo[index].latitude = locList[1]; |               this.startInfo[index].detailedAddress = poi.formattedAddress; | ||||||
|             this.startInfo[index].province = poi.addressComponent.province; |               this.startInfo[index].longitude = locList[0]; | ||||||
|             this.startInfo[index].city = poi.addressComponent.city; |               this.startInfo[index].latitude = locList[1]; | ||||||
|             this.startInfo[index].area = poi.addressComponent.district; |               this.startInfo[index].province = poi.addressComponent.province; | ||||||
|             this.startInfo[index].address = poi.formattedAddress; |               this.startInfo[index].city = poi.addressComponent.city; | ||||||
|             break; |               this.startInfo[index].area = poi.addressComponent.district; | ||||||
|           case 'end': |               this.startInfo[index].address = poi.formattedAddress; | ||||||
|             this.endInfo[index].detailedAddress = poi.formattedAddress; |               break; | ||||||
|             this.endInfo[index].longitude = locList[0]; |             case 'end': | ||||||
|             this.endInfo[index].latitude = locList[1]; |               this.endInfo[index].detailedAddress = poi.formattedAddress; | ||||||
|             this.endInfo[index].province = poi.addressComponent.province; |               this.endInfo[index].longitude = locList[0]; | ||||||
|             this.endInfo[index].city = poi.addressComponent.city; |               this.endInfo[index].latitude = locList[1]; | ||||||
|             this.endInfo[index].area = poi.addressComponent.district; |               this.endInfo[index].province = poi.addressComponent.province; | ||||||
|             this.endInfo[index].address = poi.formattedAddress; |               this.endInfo[index].city = poi.addressComponent.city; | ||||||
|             break; |               this.endInfo[index].area = poi.addressComponent.district; | ||||||
|           default: |               this.endInfo[index].address = poi.formattedAddress; | ||||||
|             break; |               break; | ||||||
|         } |             default: | ||||||
|  |               break; | ||||||
|         if (this.startInfo[0]?.area && this.endInfo[0]?.area) { |           } | ||||||
|           this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { |    | ||||||
|             this.totalDistance = res.distance; |           if (this.startInfo[0]?.area && this.endInfo[0]?.area) { | ||||||
|             this.totalTime = res.time; |             this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { | ||||||
|             this.getInsurersPrice(); // 计算保费金额 |               this.totalDistance = res.distance; | ||||||
|           }); |               this.totalTime = res.time; | ||||||
|  |               this.getInsurersPrice(); // 计算保费金额 | ||||||
|  |             }); | ||||||
|  |           } | ||||||
|  |         } else { | ||||||
|  |           this.service.msgSrv.warning('请重新手动选择地址!') | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|  | |||||||
| @ -999,6 +999,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|       nzContent: AmapPoiPickerComponent, |       nzContent: AmapPoiPickerComponent, | ||||||
|       nzWidth: 900, |       nzWidth: 900, | ||||||
|       nzOnOk: item => { |       nzOnOk: item => { | ||||||
|  |         if(item?.poi) { | ||||||
|         const poi = item.poi; |         const poi = item.poi; | ||||||
|         const locList = poi.pois; |         const locList = poi.pois; | ||||||
|         switch (type) { |         switch (type) { | ||||||
| @ -1029,6 +1030,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|             this.getInsurersPrice(); // 计算保费金额 |             this.getInsurersPrice(); // 计算保费金额 | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|  |       } else { | ||||||
|  |         this.service.msgSrv.warning('请重新手动选择地址!') | ||||||
|  |       } | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user