diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index 89fc5b4b..07b45ea3 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -1024,8 +1024,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit { if (this.PageStatus === '大宗修改') { this.sf4data.id = res?.goodsInfoVOList[0]?.id; } - // 计算里程,时间 - if (this.startInfo[0]?.area && this.endInfo[0]?.area) { + // 计算里程,时间 + if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { this.totalDistance = res.distance; this.totalTime = res.time; @@ -1103,13 +1103,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit { element.type = '2'; }); - // 计算里程,时间 - if (this.startInfo[0]?.area && this.endInfo[0]?.area) { - this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { - this.totalDistance = res.distance; - this.totalTime = res.time; - }); - } + // 计算里程,时间 + if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) { + this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { + this.totalDistance = res.distance; + this.totalTime = res.time; + }); + } } getLimitvalue() { const getlimitvaluesParms = [ diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index 53858ad0..9804987e 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -839,13 +839,13 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { element.type = '2'; }); - // 计算里程,时间 - if (this.startInfo[0]?.area && this.endInfo[0]?.area) { - this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { - this.totalDistance = res.distance; - this.totalTime = res.time; - }); - } + // 计算里程,时间 + if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) { + this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { + this.totalDistance = res.distance; + this.totalTime = res.time; + }); + } } getLimitvalue() { const getlimitvaluesParms = [