This commit is contained in:
wangshiming
2022-03-08 13:56:54 +08:00
parent 3db73b9509
commit 5fd558627f
2 changed files with 20 additions and 16 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-24 16:58:02
* @LastEditors : Shiming
* @LastEditTime : 2022-03-07 17:32:05
* @LastEditTime : 2022-03-08 13:56:14
* @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.
-->
@ -86,7 +86,7 @@
<input
nz-input
[(ngModel)]="data1.detailedAddress"
(click)="openMap('start', idx)"
(click)="openMap('start', idx,data1.detailedAddress)"
formControlName="loadAddress{{ idx }}"
placeholder="请输入装货地"
readonly="true"
@ -139,7 +139,7 @@
<input
nz-input
[(ngModel)]="data2.detailedAddress"
(click)="openMap('end', idx)"
(click)="openMap('end', idx,data2.detailedAddress)"
formControlName="unloadAddress{{ idx }}"
placeholder="请输入卸货地"
name="unloadAddress{{ idx }}"

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-24 16:58:02
* @LastEditors : Shiming
* @LastEditTime : 2022-03-08 13:47:15
* @LastEditTime : 2022-03-08 13:55:14
* @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.
*/
@ -517,32 +517,36 @@ loadTime: any; // 货源单设置回显
// 打开地图
// 打开地图
// 打开地图
openMap(type: string, index: number) {
openMap(type: string, index: number, address: string) {
console.log(type);
console.log(index);
const modalRef = this.modalService.create({
nzTitle: '',
nzComponentParams: { selectedAddress: address },
nzContent: AmapPoiPickerComponent,
nzWidth: 900,
nzOnOk: item => {
const poi = item.poi;
const locList = poi.location.toString().split(',');
const locList = poi.pois;
switch (type) {
case 'start':
this.startInfo[index].detailedAddress = poi.district + poi.name;
this.startInfo[index].detailedAddress = poi.formattedAddress;
this.startInfo[index].longitude = locList[0];
this.startInfo[index].latitude = locList[1];
this.startInfo[index].province = poi.cityInfo.province;
this.startInfo[index].city = poi.cityInfo.city;
this.startInfo[index].area = poi.cityInfo.district;
this.startInfo[index].address = poi.name;
this.startInfo[index].province = poi.addressComponent.province;
this.startInfo[index].city = poi.addressComponent.city;
this.startInfo[index].area = poi.addressComponent.district;
this.startInfo[index].address = poi.formattedAddress;
break;
case 'end':
this.endInfo[index].detailedAddress = poi.district + poi.name;
this.endInfo[index].detailedAddress = poi.formattedAddress;
this.endInfo[index].longitude = locList[0];
this.endInfo[index].latitude = locList[1];
this.endInfo[index].province = poi.cityInfo.province;
this.endInfo[index].city = poi.cityInfo.city;
this.endInfo[index].area = poi.cityInfo.district;
this.endInfo[index].address = poi.name;
this.endInfo[index].province = poi.addressComponent.province;
this.endInfo[index].city = poi.addressComponent.city;
this.endInfo[index].area = poi.addressComponent.district;
this.endInfo[index].address = poi.formattedAddress;
break;
default:
break;