Merge branch 'develop' of gitlab.eascs.com:tms-ui/tms-obc-web into develop
This commit is contained in:
@ -36,9 +36,8 @@
|
|||||||
{{ item.orderPaymentCode }} <br> <a>{{ item.paymentStatusLabel }}</a>
|
{{ item.orderPaymentCode }} <br> <a>{{ item.paymentStatusLabel }}</a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template st-row="amountDetails" let-item let-index="index" let-column="column">
|
<ng-template st-row="amountDetails" let-item let-index="index" let-column="column">
|
||||||
{{item.costName}}:{{ item.price | currency }}<br />
|
<ng-container *ngFor="let detail of item.amountDetails">
|
||||||
<ng-container *ngIf="item.payType==='1'">
|
{{detail.costName}}:{{ detail.price | currency }}<br />
|
||||||
附加费: {{ item.surcharge| currency }}
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template st-row="billCode" let-item let-index="index" let-column="column">
|
<ng-template st-row="billCode" let-item let-index="index" let-column="column">
|
||||||
|
|||||||
@ -251,16 +251,14 @@ export class PaymentRecordComponent implements OnInit {
|
|||||||
title: '运费明细',
|
title: '运费明细',
|
||||||
render: 'amountDetails',
|
render: 'amountDetails',
|
||||||
width: 160,
|
width: 160,
|
||||||
format: item => {
|
// format: item => {
|
||||||
let surcharge = 0;
|
// (item.amountDetails as Array<any>).forEach(detail => {
|
||||||
(item.amountDetails as Array<any>).forEach(detail => {
|
// detail.surcharge = detail.price + (detail.surcharge || 0);
|
||||||
surcharge += detail.surcharge || 0;
|
// });
|
||||||
});
|
// console.log(item.amountDetails);
|
||||||
item.surcharge = surcharge.toFixed(2);
|
|
||||||
item.price = item.amountDetails?.[0]?.price || 0;
|
// return '';
|
||||||
item.costName = item.amountDetails?.[0]?.costName;
|
// }
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '支付类型',
|
title: '支付类型',
|
||||||
|
|||||||
@ -203,7 +203,7 @@
|
|||||||
</st>
|
</st>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="12">
|
<div nz-col [nzSpan]="12">
|
||||||
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="mapList"></amap-path-simplifier>
|
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="mapList" [pois]="pois"></amap-path-simplifier>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|||||||
@ -24,8 +24,9 @@ import { OrderManagementService } from '../../services/order-management.service'
|
|||||||
export class OrderManagementVehicleDetailComponent implements OnInit {
|
export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||||
id = this.route.snapshot.params.id;
|
id = this.route.snapshot.params.id;
|
||||||
trajectory = 'car';
|
trajectory = 'car';
|
||||||
mapList:any[] = []; //地图点位数据组
|
mapList: any[] = []; //地图点位数据组
|
||||||
addressItems:any[] = []; //打点地址数据组
|
pois: any[] = [];
|
||||||
|
addressItems: any[] = []; //打点地址数据组
|
||||||
i: any = {
|
i: any = {
|
||||||
unLoadingPlaceList: [],
|
unLoadingPlaceList: [],
|
||||||
billExpenseDetails: [],
|
billExpenseDetails: [],
|
||||||
@ -40,7 +41,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
isVisible = false;
|
isVisible = false;
|
||||||
logColumns2: STColumn[] = [
|
logColumns2: STColumn[] = [
|
||||||
{ title: '时间', index: 'vinOutTime' },
|
{ title: '时间', index: 'vinOutTime' },
|
||||||
{ title: '地点', index: 'cityName' },
|
{ title: '地点', index: 'cityName' }
|
||||||
];
|
];
|
||||||
logColumns: STColumn[] = [
|
logColumns: STColumn[] = [
|
||||||
{ title: '款项', index: 'expenseCodeLabel' },
|
{ title: '款项', index: 'expenseCodeLabel' },
|
||||||
@ -72,15 +73,31 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initData();
|
this.initData();
|
||||||
this.getTrajectory()
|
this.getTrajectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
initData() {
|
initData() {
|
||||||
this.service.request(this.service.$api_get_getWholeBillDetail, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_get_getWholeBillDetail, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.i = res;
|
this.i = res;
|
||||||
this.billExpenses = this.i?.billExpenseDetails?.filter((data:any)=>data.expenseCode ==="PRE" || data.expenseCode ==="RECE" ||data.expenseCode ==="BACK" )
|
this.pois = [
|
||||||
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE");
|
{
|
||||||
|
markerLabel: '起',
|
||||||
|
color: 'blue',
|
||||||
|
position: [res.startingPoint.longitude, res.startingPoint.latitude],
|
||||||
|
title: res.startingPoint.detailedAddress
|
||||||
|
},
|
||||||
|
{
|
||||||
|
markerLabel: '卸',
|
||||||
|
color: 'red',
|
||||||
|
position: [res.endPoint.longitude, res.endPoint.latitude],
|
||||||
|
title: res.endPoint.detailedAddress
|
||||||
|
}
|
||||||
|
];
|
||||||
|
this.billExpenses = this.i?.billExpenseDetails?.filter(
|
||||||
|
(data: any) => data.expenseCode === 'PRE' || data.expenseCode === 'RECE' || data.expenseCode === 'BACK'
|
||||||
|
);
|
||||||
|
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data: any) => data.displayStatus !== 'HIDE');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -128,11 +145,11 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 获取车辆轨迹
|
// 获取车辆轨迹
|
||||||
getTrajectory(){
|
getTrajectory() {
|
||||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
const points = res.trackArray;
|
const points = res.trackArray;
|
||||||
let list :any[] = [];
|
let list: any[] = [];
|
||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: `${item.spd}km/h`,
|
name: `${item.spd}km/h`,
|
||||||
@ -141,7 +158,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
this.addressItems = res.cityArray;
|
this.addressItems = res.cityArray;
|
||||||
if(this.addressItems && this.addressItems.length > 0){
|
if (this.addressItems && this.addressItems.length > 0) {
|
||||||
this.addressItems.forEach(item => {
|
this.addressItems.forEach(item => {
|
||||||
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
||||||
});
|
});
|
||||||
@ -150,12 +167,12 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取司机轨迹
|
// 获取司机轨迹
|
||||||
getDriverTrajectory(){
|
getDriverTrajectory() {
|
||||||
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
const points = res.tracks;
|
const points = res.tracks;
|
||||||
let list :any[] = [];
|
let list: any[] = [];
|
||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
@ -164,7 +181,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
this.addressItems = [...res.enclosureDataAppTrack];
|
this.addressItems = [...res.enclosureDataAppTrack];
|
||||||
if(this.addressItems && this.addressItems.length > 0){
|
if (this.addressItems && this.addressItems.length > 0) {
|
||||||
this.addressItems.forEach(item => {
|
this.addressItems.forEach(item => {
|
||||||
item.vinOutTime = this.getLocalTime(item.gtm);
|
item.vinOutTime = this.getLocalTime(item.gtm);
|
||||||
item.cityName = item.appAdress;
|
item.cityName = item.appAdress;
|
||||||
@ -172,14 +189,14 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
trajectoryChange(event:any){
|
trajectoryChange(event: any) {
|
||||||
if(event ==='car'){
|
if (event === 'car') {
|
||||||
this.getTrajectory()
|
this.getTrajectory();
|
||||||
}else if(event ==='driver'){
|
} else if (event === 'driver') {
|
||||||
this.getDriverTrajectory();
|
this.getDriverTrajectory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getLocalTime(time: any) {
|
getLocalTime(time: any) {
|
||||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-15 13:17:42
|
* @Date : 2021-12-15 13:17:42
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-02 13:50:12
|
* @LastEditTime : 2022-03-09 15:24:55
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\confir-receipt\\confir-receipt.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\confir-receipt\\confir-receipt.component.html
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
@ -33,10 +33,10 @@
|
|||||||
</st>
|
</st>
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="司机车辆">
|
<sv label="司机车辆">
|
||||||
<div>{{ dataInfo?.driverName }} / {{ dataInfo?.driverPhone }}/ {{ dataInfo?.carNo }}</div>
|
<div>{{ dataInfo?.driverName|| '-' }} / {{dataInfo?.driverTelephone || '-' }}/ {{ dataInfo?.carNo || '-' }}</div>
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="收款人">
|
<sv label="收款人">
|
||||||
<div>{{ dataInfo?.payeeName }} / {{ dataInfo?.payeePhone }}</div>
|
<div>{{ i?.payeeName || '-'}} / {{ i?.payeePhone || '-'}}</div>
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="回单凭证">
|
<sv label="回单凭证">
|
||||||
<nz-upload
|
<nz-upload
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
<button nz-button nzType="primary" (click)="roleAction('',1)">新增结算客户</button>
|
<button nz-button nzType="primary" (click)="roleAction('',1)">新增结算客户</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<st #st [data]="service.$api_settlementCustomer_page" [columns]="columns" [req]="{ params: reqParams }"
|
<st #st [data]="service.$api_settlementCustomer_page" [columns]="columns" [req]="{ params: reqParams }" [page]="{}"
|
||||||
[loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)">
|
[loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)">
|
||||||
<ng-template st-row="customerType" let-item let-index="index">
|
<ng-template st-row="customerType" let-item let-index="index">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
[scroll]="{ x: '2000px' }"
|
[scroll]="{ x: '2000px' }"
|
||||||
[data]="service.$api_networkTransporter_page"
|
[data]="service.$api_networkTransporter_page"
|
||||||
[columns]="columns"
|
[columns]="columns"
|
||||||
[req]="{ params: reqParams }"
|
[req]="{ params: reqParams }" [page]="{}"
|
||||||
[loading]="service.http.loading"
|
[loading]="service.http.loading"
|
||||||
(change)="stChange($event)"
|
(change)="stChange($event)"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -51,7 +51,6 @@
|
|||||||
<st #st size="small" [bordered]="true" [scroll]="{x:'800px',y: '300px' }" [data]="service.$api_ficoVatinv_Detail"
|
<st #st size="small" [bordered]="true" [scroll]="{x:'800px',y: '300px' }" [data]="service.$api_ficoVatinv_Detail"
|
||||||
[columns]="columns"
|
[columns]="columns"
|
||||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
|
||||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [page]="{ }" [loading]="service.http.loading"
|
||||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
class="mt-md">
|
||||||
[loading]="service.http.loading" class="mt-md">
|
|
||||||
</st>
|
</st>
|
||||||
@ -85,7 +85,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<st #orderST [scroll]="{ x: '1200px' }" [data]="service.$api_get_invoice_order_detail" [columns]="orderColumns"
|
<st #orderST [scroll]="{ x: '1200px' }" [data]="service.$api_get_invoice_order_detail" [columns]="orderColumns" [page]="{}"
|
||||||
size="small" bordered="true" [req]="{ process: beforeReq }" [loading]="service.http.loading"
|
size="small" bordered="true" [req]="{ process: beforeReq }" [loading]="service.http.loading"
|
||||||
[scroll]="{ x: '1200px', y: '250px' }"></st>
|
[scroll]="{ x: '1200px', y: '250px' }"></st>
|
||||||
</nz-tab>
|
</nz-tab>
|
||||||
@ -103,11 +103,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<st #costST [data]="service.$api_get_invoice_cost_detail" [columns]="costColumns" size="small" bordered="true"
|
<st #costST [data]="service.$api_get_invoice_cost_detail" [columns]="costColumns" size="small" bordered="true" [page]="{}"
|
||||||
[req]="{ process: beforeReq }" [loading]="service.http.loading" [scroll]="{ x: '1200px', y: '250px' }"></st>
|
[req]="{ process: beforeReq }" [loading]="service.http.loading" [scroll]="{ x: '1200px', y: '250px' }"></st>
|
||||||
</nz-tab>
|
</nz-tab>
|
||||||
<nz-tab nzTitle="发票明细">
|
<nz-tab nzTitle="发票明细">
|
||||||
<st #invoiceST [data]="service.$api_get_invoice_details" [columns]="invoiceColumns" size="small" bordered="true"
|
<st #invoiceST [data]="service.$api_get_invoice_details" [columns]="invoiceColumns" size="small" bordered="true" [page]="{}"
|
||||||
[req]="{ process: beforeReq }" [loading]="service.http.loading" [scroll]="{ x: '1200px', y: '250px' }">
|
[req]="{ process: beforeReq }" [loading]="service.http.loading" [scroll]="{ x: '1200px', y: '250px' }">
|
||||||
<ng-template st-row="vatname" let-item let-index="index">
|
<ng-template st-row="vatname" let-item let-index="index">
|
||||||
<nz-select *ngIf="isEdit" [ngModel]="item.owner"
|
<nz-select *ngIf="isEdit" [ngModel]="item.owner"
|
||||||
|
|||||||
@ -130,12 +130,7 @@ export class InvoiceDetailComponent implements OnInit {
|
|||||||
projectId: {
|
projectId: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '所属项目',
|
title: '所属项目',
|
||||||
ui: {
|
ui: { widget: 'select', placeholder: '请选择', allowClear: true, asyncData: () => this.service.getEnterpriseProject() },
|
||||||
widget: 'select',
|
|
||||||
placeholder: '请选择',
|
|
||||||
allowClear: true,
|
|
||||||
asyncData: () => this.service.getEnterpriseProject()
|
|
||||||
},
|
|
||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -158,7 +153,7 @@ export class InvoiceDetailComponent implements OnInit {
|
|||||||
width: 120,
|
width: 120,
|
||||||
type: 'widget',
|
type: 'widget',
|
||||||
className: 'text-right',
|
className: 'text-right',
|
||||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: this.type ==='2'?record.billkpmoney: record.billkpnotax }) }
|
widget: { type: 'currency-chy', params: ({ record }) => ({ value: this.type === '2' ? record.billkpmoney : record.billkpnotax }) }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '运输费',
|
title: '运输费',
|
||||||
@ -190,7 +185,7 @@ export class InvoiceDetailComponent implements OnInit {
|
|||||||
private initCostSF(): SFSchema {
|
private initCostSF(): SFSchema {
|
||||||
return {
|
return {
|
||||||
properties: {
|
properties: {
|
||||||
billHId: {
|
billHCode: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '订单号',
|
title: '订单号',
|
||||||
ui: {
|
ui: {
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<nz-card class="search-box" nzBordered>
|
<nz-card class="search-box" nzBordered>
|
||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||||
<sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } }"
|
<sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 120, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } }"
|
||||||
[compact]="true" [button]="'none'"></sf>
|
[compact]="true" [button]="'none'"></sf>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
|
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
|
||||||
|
|||||||
@ -38,9 +38,9 @@ export class InvoicedListComponent implements OnInit {
|
|||||||
if (this.sf) {
|
if (this.sf) {
|
||||||
Object.assign(requestOptions.body, {
|
Object.assign(requestOptions.body, {
|
||||||
...this.sf.value,
|
...this.sf.value,
|
||||||
createTime: {
|
invoicedate: {
|
||||||
start: this.sf.value.createTime?.[0] || '',
|
start: this.sf.value.invoicedate?.[0] || '',
|
||||||
end: this.sf.value.createTime?.[1] || ''
|
end: this.sf.value.invoicedate?.[1] || ''
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -135,7 +135,7 @@ export class InvoicedListComponent implements OnInit {
|
|||||||
autocomplete: 'off'
|
autocomplete: 'off'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createTime: {
|
invoicedate: {
|
||||||
title: '开票日期',
|
title: '开票日期',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
@ -145,13 +145,11 @@ export class InvoicedListComponent implements OnInit {
|
|||||||
nzShowTime: true
|
nzShowTime: true
|
||||||
} as SFDateWidgetSchema
|
} as SFDateWidgetSchema
|
||||||
},
|
},
|
||||||
arto: {
|
artoname: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '购买人',
|
title: '购买人',
|
||||||
enum: [{ label: '全部', value: '全部' }],
|
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
placeholder: '请输入',
|
||||||
placeholder: '请选择',
|
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
}
|
||||||
@ -167,7 +165,7 @@ export class InvoicedListComponent implements OnInit {
|
|||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
},
|
},
|
||||||
asyncData: () => this.service.getNetworkFreightForwarder()
|
asyncData: () => this.service.getNetworkFreightForwarder({}, true)
|
||||||
},
|
},
|
||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
<div style="flex: 1">
|
<div style="flex: 1">
|
||||||
<div style="display: flex; width: 100%; justify-content: space-between">
|
<div style="display: flex; width: 100%; justify-content: space-between">
|
||||||
<p style="padding-right: 80px; width: 400px">{{ userDetail?.realName }}
|
<p style="padding-right: 80px; width: 400px">{{ userDetail?.realName }}
|
||||||
<nz-badge nzStatus="success" nzText="正常" *ngIf="!userDetail?.stateLocked" class="ml-xl"> </nz-badge>
|
<nz-badge nzStatus="success" nzText="正常" *ngIf="!userDetail?.stateLocked" class="ml-xs"> </nz-badge>
|
||||||
<nz-badge nzStatus="warning" nzText="冻结" *ngIf="userDetail?.stateLocked" class="ml-xl"> </nz-badge>
|
<nz-badge nzStatus="warning" nzText="冻结" *ngIf="userDetail?.stateLocked" class="ml-xs"> </nz-badge>
|
||||||
</p>
|
</p>
|
||||||
<div style="margin-right: 24px">
|
<div style="margin-right: 24px">
|
||||||
<button *ngIf="userDetail?.stateLocked" [nzLoading]="service.http.loading" nz-button nzType="primary"
|
<button *ngIf="userDetail?.stateLocked" [nzLoading]="service.http.loading" nz-button nzType="primary"
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
<div style="flex: 1">
|
<div style="flex: 1">
|
||||||
<div style="display: flex;width: 100%;justify-content: space-between;">
|
<div style="display: flex;width: 100%;justify-content: space-between;">
|
||||||
<p style="padding-right: 80px; width: 400px;">{{ userDetail?.realName }}
|
<p style="padding-right: 80px; width: 400px;">{{ userDetail?.realName }}
|
||||||
<nz-badge nzStatus="success" nzText="正常" *ngIf="!userDetail?.stateLocked" class="ml-xl"></nz-badge>
|
<nz-badge nzStatus="success" nzText="正常" *ngIf="!userDetail?.stateLocked" class="ml-xs"></nz-badge>
|
||||||
<nz-badge nzStatus="warning" nzText="冻结" *ngIf="userDetail?.stateLocked" class="ml-xl"></nz-badge>
|
<nz-badge nzStatus="warning" nzText="冻结" *ngIf="userDetail?.stateLocked" class="ml-xs"></nz-badge>
|
||||||
</p>
|
</p>
|
||||||
<div style="margin-right: 24px;">
|
<div style="margin-right: 24px;">
|
||||||
<button *ngIf="userDetail?.stateLocked" [disabled]="service.http.loading" nz-button nzType="primary"
|
<button *ngIf="userDetail?.stateLocked" [disabled]="service.http.loading" nz-button nzType="primary"
|
||||||
@ -217,7 +217,7 @@
|
|||||||
<input nz-input type="text" [(ngModel)]="licenseDetail.licenseNo" [readonly]="!isEditDriver"
|
<input nz-input type="text" [(ngModel)]="licenseDetail.licenseNo" [readonly]="!isEditDriver"
|
||||||
[nzBorderless]="!isEditDriver" [placeholder]="isEditDriver?'':'-'">
|
[nzBorderless]="!isEditDriver" [placeholder]="isEditDriver?'':'-'">
|
||||||
</sv>
|
</sv>
|
||||||
<!-- <sv label="公司所在地" >
|
<sv label="公司所在地" >
|
||||||
<ng-container *ngIf="isEditDriver; else cascaderelseTemplate">
|
<ng-container *ngIf="isEditDriver; else cascaderelseTemplate">
|
||||||
<nz-select [(ngModel)]="licenseDetail.regionCode">
|
<nz-select [(ngModel)]="licenseDetail.regionCode">
|
||||||
<ng-container *ngFor="let item of adressCodeList">
|
<ng-container *ngFor="let item of adressCodeList">
|
||||||
@ -228,7 +228,7 @@
|
|||||||
<ng-template #cascaderelseTemplate>
|
<ng-template #cascaderelseTemplate>
|
||||||
{{licenseDetail?.regionCodeName }}
|
{{licenseDetail?.regionCodeName }}
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</sv> -->
|
</sv>
|
||||||
<sv label="发证日期" col="2">
|
<sv label="发证日期" col="2">
|
||||||
<nz-date-picker [(ngModel)]="licenseDetail.validStartTime" [nzDisabled]="!isEditDriver" nzPlaceHolder=" "
|
<nz-date-picker [(ngModel)]="licenseDetail.validStartTime" [nzDisabled]="!isEditDriver" nzPlaceHolder=" "
|
||||||
[nzBorderless]="!isEditDriver" [nzSuffixIcon]="isEditDriver?'calendar':''" style="width: 110px;"
|
[nzBorderless]="!isEditDriver" [nzSuffixIcon]="isEditDriver?'calendar':''" style="width: 110px;"
|
||||||
|
|||||||
@ -323,11 +323,16 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!licenseDetail.licenseNo || !licenseDetail.regionCode || !licenseDetail.validStartTime) {
|
if (!driverDetail.licenseNo || !driverDetail.driverModel || !driverDetail.validStartTime || !driverDetail.signingOrganization || !driverDetail.certificatePhotoWatermark) {
|
||||||
this.service.msgSrv.warning('请完善从业资格证信息');
|
this.service.msgSrv.warning('请完善驾驶证信息');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!licenseDetail.licenseNo || !licenseDetail.validStartTime || !licenseDetail.certificatePhotoWatermark) {
|
||||||
|
this.service.msgSrv.warning('请完善从业资格证信息');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const params: any = {
|
const params: any = {
|
||||||
userId: this.route.snapshot.params.id,
|
userId: this.route.snapshot.params.id,
|
||||||
mobile: this.userDetail?.phone,
|
mobile: this.userDetail?.phone,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-11-29 15:22:34
|
* @Date: 2021-11-29 15:22:34
|
||||||
* @LastEditTime : 2022-02-18 16:29:43
|
* @LastEditTime : 2022-03-09 16:04:08
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\driver\\driver-config\\driver-config.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\driver\\driver-config\\driver-config.component.html
|
||||||
@ -30,8 +30,8 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
<st #st [columns]="columns" [data]="service.$api_configPage" [req]="{ params: reqParams }"
|
<st #st [columns]="columns" [scroll]="{ x: '1200px' }"[data]="service.$api_configPage" [req]="{ params: reqParams }"
|
||||||
[loading]="service.http.loading">
|
[loading]="service.http.loading" [page]={}>
|
||||||
<ng-template st-row="monthFreightAmount" let-item let-index="index">
|
<ng-template st-row="monthFreightAmount" let-item let-index="index">
|
||||||
<div>{{item?.monthFreightAmount | currency}}</div>
|
<div>{{item?.monthFreightAmount | currency}}</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|||||||
@ -103,16 +103,17 @@ export class UserCenterComponentsDriverConfigComponent implements OnInit {
|
|||||||
private initST(): STColumn[] {
|
private initST(): STColumn[] {
|
||||||
return [
|
return [
|
||||||
// { title: '', type: 'checkbox', className: 'text-center' },
|
// { title: '', type: 'checkbox', className: 'text-center' },
|
||||||
{ title: '司机姓名', className: 'text-center', index: 'name' },
|
{ title: '司机姓名', className: 'text-center', width: '170px', index: 'name' },
|
||||||
{ title: '手机号', className: 'text-center', index: 'mobile' },
|
{ title: '手机号', className: 'text-center', width: '170px', index: 'mobile' },
|
||||||
{ title: '类型', className: 'text-center', render: 'isCaptain' },
|
{ title: '类型', className: 'text-center', width: '170px',render: 'isCaptain' },
|
||||||
{ title: '月承运金额上限(元)', className: 'text-center', render: 'monthFreightAmount' },
|
{ title: '月承运金额上限(元)', className: 'text-center', width: '200px', render: 'monthFreightAmount' },
|
||||||
{ title: '日提现金额上限(元)', className: 'text-center', render: 'dayWithdrawalAmount' },
|
{ title: '日提现金额上限(元)', className: 'text-center', width: '200px', render: 'dayWithdrawalAmount' },
|
||||||
{ title: '月提现金额上限(元)', className: 'text-center', render: 'monthWithdrawalAmount' },
|
{ title: '月提现金额上限(元)', className: 'text-center', width: '200px', render: 'monthWithdrawalAmount' },
|
||||||
{ title: '月收款金额上限(元)', className: 'text-center', render: 'monthReceivableAmount' },
|
{ title: '月收款金额上限(元)', className: 'text-center', width: '200px', render: 'monthReceivableAmount' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: '170px',
|
width: '170px',
|
||||||
|
fixed: 'right',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -269,7 +269,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</sv-title>
|
</sv-title>
|
||||||
<sv label="法定代表人">
|
<sv label="法定代表人">
|
||||||
<input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.name" [readonly]="!isEdit"
|
<input nz-input type="text" maxlength="32" [(ngModel)]="detailData.legalPersonIdentityVO.name" [readonly]="!isEdit"
|
||||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="身份证号码">
|
<sv label="身份证号码">
|
||||||
|
|||||||
@ -286,12 +286,24 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
|
|||||||
this.isEdit = false;
|
this.isEdit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
save(data: any) {
|
save(data: any){
|
||||||
const dateil = { ...this.detailData };
|
const dateil = { ...this.detailData };
|
||||||
Object.assign(dateil.legalPersonIdentityVO, {
|
Object.assign(dateil.legalPersonIdentityVO, {
|
||||||
validStartTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validStartTime, 'yyyy-MM-dd'),
|
validStartTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validStartTime, 'yyyy-MM-dd'),
|
||||||
validEndTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validEndTime, 'yyyy-MM-dd')
|
validEndTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validEndTime, 'yyyy-MM-dd')
|
||||||
});
|
});
|
||||||
|
if (!this.detailData?.enterpriseName || !this.detailData?.enterpriseAddress) {
|
||||||
|
this.service.msgSrv.error('请完善企业基本信息!')
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!this.detailData.legalPersonIdentityVO.name || !this.detailData.legalPersonIdentityVO.certificateNumber) {
|
||||||
|
this.service.msgSrv.error('请完善法人信息!')
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!this.detailData.createBank || !this.detailData.bankAccount) {
|
||||||
|
this.service.msgSrv.error('请完善企业开票信息!')
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const params = {};
|
const params = {};
|
||||||
Object.assign(params, {
|
Object.assign(params, {
|
||||||
adminMobile: dateil.adminMobile,
|
adminMobile: dateil.adminMobile,
|
||||||
@ -331,6 +343,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
|
|||||||
this.isEdit = false;
|
this.isEdit = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
private refreshData(status: number) {
|
private refreshData(status: number) {
|
||||||
|
|||||||
@ -16,7 +16,11 @@ const CONFIG = amapConf;
|
|||||||
export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
||||||
aMap: any;
|
aMap: any;
|
||||||
pathSimplifierIns: any;
|
pathSimplifierIns: any;
|
||||||
|
geocoder: any;
|
||||||
navigator: any;
|
navigator: any;
|
||||||
|
infoWindow: any;
|
||||||
|
markerList: any;
|
||||||
|
SimpleMarker: any;
|
||||||
@Input()
|
@Input()
|
||||||
pathList: any = [];
|
pathList: any = [];
|
||||||
@Input()
|
@Input()
|
||||||
@ -31,40 +35,8 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
clcikPointEvent = new EventEmitter<any>();
|
clcikPointEvent = new EventEmitter<any>();
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
pois: any = [
|
pois: any = [];
|
||||||
{
|
private _pois: any = [];
|
||||||
id: 'A',
|
|
||||||
position: [116.020764, 39.904989],
|
|
||||||
markerLabel: 'X_A',
|
|
||||||
infoWinContent: 'Hello! A',
|
|
||||||
listDesc: '起',
|
|
||||||
color: '#F5222D'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'B',
|
|
||||||
position: [116.405285, 39.904989],
|
|
||||||
markerLabel: 'X_B',
|
|
||||||
infoWinContent: 'Hello! B',
|
|
||||||
listDesc: '终',
|
|
||||||
color: '#1890ff'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'C',
|
|
||||||
position: [116.789806, 39.904989],
|
|
||||||
markerLabel: 'X_C',
|
|
||||||
infoWinContent: 'Hello! C',
|
|
||||||
listDesc: '卸',
|
|
||||||
color: '#1890ff'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'C',
|
|
||||||
position: [116.789806, 39.904989],
|
|
||||||
markerLabel: 'X_C',
|
|
||||||
infoWinContent: 'Hello! C',
|
|
||||||
listDesc: '装',
|
|
||||||
color: '#F5222D'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
constructor(public service: BaseService) {}
|
constructor(public service: BaseService) {}
|
||||||
ngOnChanges(changes: SimpleChanges): void {
|
ngOnChanges(changes: SimpleChanges): void {
|
||||||
@ -77,11 +49,19 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
this.pathList = [
|
this.pathList = [
|
||||||
{
|
{
|
||||||
name: '路线1',
|
name: '路线1',
|
||||||
points: changes?.MapList?.currentValue
|
points: changes.MapList?.currentValue
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
this.setData(this.pathList);
|
this.setData(this.pathList);
|
||||||
this.setPathIndex(this.selectedIndex);
|
this.setPathIndex(this.selectedIndex);
|
||||||
|
this.getPoiByPositon(this.MapList[this.MapList?.length - 1]?.lnglat);
|
||||||
|
}
|
||||||
|
if (changes?.pois?.currentValue) {
|
||||||
|
// console.log(this.pois);
|
||||||
|
this._pois = changes?.pois?.currentValue;
|
||||||
|
if (this?.markerList && this._pois.length > 0) {
|
||||||
|
this.markerList.render(this._pois);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
@ -99,7 +79,9 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
version: CONFIG.version,
|
version: CONFIG.version,
|
||||||
plugins: [
|
plugins: [
|
||||||
// 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
// 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
||||||
'AMap.PathSimplifier'
|
'AMap.PathSimplifier',
|
||||||
|
'AMap.InfoWindow',
|
||||||
|
'AMap.Geocoder'
|
||||||
],
|
],
|
||||||
AMapUI: {
|
AMapUI: {
|
||||||
version: CONFIG.AMapUIVersion,
|
version: CONFIG.AMapUIVersion,
|
||||||
@ -112,10 +94,16 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.aMap.on('complete', () => {
|
this.aMap.on('complete', () => {
|
||||||
|
// 信息窗口
|
||||||
|
this.infoWindow = new AMap.InfoWindow({
|
||||||
|
offset: new AMap.Pixel(0, -40)
|
||||||
|
});
|
||||||
|
this.geocoder = new AMap.Geocoder({
|
||||||
|
radius: 1000 //范围,默认:500
|
||||||
|
});
|
||||||
// this.service.msgSrv.info('地图加载完成 !');
|
// this.service.msgSrv.info('地图加载完成 !');
|
||||||
this.pathInit();
|
this.pathInit();
|
||||||
// this.setPOIS();
|
this.setPOIS();
|
||||||
// this.loadPOIS();
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
@ -123,88 +111,6 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
loadPOIS() {
|
|
||||||
AMapUI.loadUI(['overlay/SvgMarker'], (SvgMarker: any) => {
|
|
||||||
if (!SvgMarker.supportSvg) {
|
|
||||||
//当前环境并不支持SVG,此时SvgMarker会回退到父类,即SimpleMarker
|
|
||||||
alert('当前环境不支持SVG');
|
|
||||||
}
|
|
||||||
|
|
||||||
//just some colors
|
|
||||||
var colors = ['#F5222D', '#1890ff'];
|
|
||||||
|
|
||||||
//SvgMarker.Shape下的Shape
|
|
||||||
var shapeKeys = ['WaterDrop'];
|
|
||||||
|
|
||||||
var colNum = 2,
|
|
||||||
rowNum = shapeKeys.length;
|
|
||||||
const markers: any[] = [];
|
|
||||||
|
|
||||||
this.pois.forEach((d: any) => {
|
|
||||||
//创建shape
|
|
||||||
const shape = new SvgMarker.Shape['WaterDrop']({
|
|
||||||
height: 40,
|
|
||||||
strokeWidth: 1,
|
|
||||||
strokeColor: '#ccc',
|
|
||||||
fillColor: '#F5222D'
|
|
||||||
});
|
|
||||||
|
|
||||||
markers.push(
|
|
||||||
new SvgMarker(shape, {
|
|
||||||
map: this.aMap,
|
|
||||||
position: d.position,
|
|
||||||
containerClassNames: 'shape-' + 'WaterDrop',
|
|
||||||
iconLabel: {
|
|
||||||
innerHTML: d.listDesc,
|
|
||||||
style: {
|
|
||||||
top: 7 + 'px'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
showPositionPoint: true
|
|
||||||
})
|
|
||||||
);
|
|
||||||
});
|
|
||||||
console.log(markers);
|
|
||||||
|
|
||||||
// var pxCenter = this.aMap.lnglatToPixel(this.aMap.getCenter());
|
|
||||||
|
|
||||||
// var startX = pxCenter.getX(),
|
|
||||||
// startY = pxCenter.getY();
|
|
||||||
|
|
||||||
// for (var c = 0; c < colNum; c++) {
|
|
||||||
// for (var r = 0; r < rowNum; r++) {
|
|
||||||
// var idx = r * colNum + c;
|
|
||||||
|
|
||||||
// if (!colors[idx]) {
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// var x = startX + (c - colNum / 2) * 70;
|
|
||||||
// var y = startY + 50 + (r - rowNum / 2) * 80;
|
|
||||||
|
|
||||||
// var labelCenter = shape.getCenter();
|
|
||||||
|
|
||||||
// var position = this.aMap.pixelToLngLat(new AMap.Pixel(x, y));
|
|
||||||
|
|
||||||
// markers.push(
|
|
||||||
// new SvgMarker(shape, {
|
|
||||||
// map: this.aMap,
|
|
||||||
// position: position,
|
|
||||||
// containerClassNames: 'shape-' + shapeKeys[r],
|
|
||||||
// iconLabel: {
|
|
||||||
// innerHTML: String.fromCharCode('A'.charCodeAt(0) + c),
|
|
||||||
// style: {
|
|
||||||
// top: labelCenter[1] - 9 + 'px'
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// showPositionPoint: true
|
|
||||||
// })
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
pathInit() {
|
pathInit() {
|
||||||
this.pathSimplifierIns = new AMapUI.PathSimplifier({
|
this.pathSimplifierIns = new AMapUI.PathSimplifier({
|
||||||
zIndex: 100,
|
zIndex: 100,
|
||||||
@ -222,13 +128,11 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
return lnglatList;
|
return lnglatList;
|
||||||
},
|
},
|
||||||
getHoverTitle: function (pathData: any, pathIndex: any, pointIndex: any) {
|
getHoverTitle: function (pathData: any, pathIndex: any, pointIndex: any) {
|
||||||
console.log(pathData, pointIndex);
|
|
||||||
|
|
||||||
if (pointIndex >= 0) {
|
if (pointIndex >= 0) {
|
||||||
//point
|
//point
|
||||||
return pathData.name + ',' + pathData.points[pointIndex].name;
|
return pathData.name + ',' + pathData.points[pointIndex].name;
|
||||||
}
|
}
|
||||||
return pathData.name + ',点数量' + pathData.points?.length;
|
return '';
|
||||||
},
|
},
|
||||||
renderOptions: {
|
renderOptions: {
|
||||||
renderAllPointsIfNumberBelow: 10 //绘制路线节点,如不需要可设置为-1
|
renderAllPointsIfNumberBelow: 10 //绘制路线节点,如不需要可设置为-1
|
||||||
@ -248,126 +152,53 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setPOIS() {
|
setPOIS() {
|
||||||
AMapUI.loadUI(['misc/MarkerList'], (MarkerList: any) => {
|
AMapUI.loadUI(['misc/MarkerList', 'overlay/SimpleMarker'], (MarkerList: any, SimpleMarker: any) => {
|
||||||
var markerList = new MarkerList({
|
this.markerList = new MarkerList({
|
||||||
//关联的map对象
|
//关联的map对象
|
||||||
map: this.aMap,
|
map: this.aMap,
|
||||||
|
|
||||||
//选中状态(通过点击列表或者marker)时在Marker和列表节点上添加的class,可以借此编写css控制选中时的展示效果
|
|
||||||
selectedClassNames: 'selected',
|
|
||||||
|
|
||||||
//返回数据项的Id
|
|
||||||
getDataId: (dataItem: any, index: any) => {
|
|
||||||
//index表示该数据项在数组中的索引位置,从0开始,如果确实没有id,可以返回index代替
|
|
||||||
return dataItem.id;
|
|
||||||
},
|
|
||||||
//返回数据项的位置信息,需要是AMap.LngLat实例,或者是经纬度数组,比如[116.789806, 39.904989]
|
//返回数据项的位置信息,需要是AMap.LngLat实例,或者是经纬度数组,比如[116.789806, 39.904989]
|
||||||
getPosition: (dataItem: any) => {
|
getPosition: (dataItem: any) => {
|
||||||
console.log(dataItem);
|
|
||||||
|
|
||||||
return dataItem.position;
|
return dataItem.position;
|
||||||
},
|
},
|
||||||
//返回数据项对应的Marker
|
//返回数据项对应的Marker
|
||||||
getMarker: (dataItem: any, context: any, recycledMarker: any) => {
|
getMarker: (dataItem: any, context: any, recycledMarker: any) => {
|
||||||
//marker的标注内容
|
|
||||||
var content = dataItem.markerLabel;
|
|
||||||
|
|
||||||
var label = {
|
|
||||||
offset: new AMap.Pixel(16, 18), //修改label相对于marker的位置
|
|
||||||
content: content
|
|
||||||
};
|
|
||||||
|
|
||||||
//存在可回收利用的marker
|
//存在可回收利用的marker
|
||||||
if (recycledMarker) {
|
if (recycledMarker) {
|
||||||
//直接更新内容返回
|
//直接更新内容返回
|
||||||
recycledMarker.setLabel(label);
|
recycledMarker.setIconLabel(context.id);
|
||||||
|
recycledMarker.setIconStyle(dataItem.iconStyle);
|
||||||
return recycledMarker;
|
return recycledMarker;
|
||||||
}
|
}
|
||||||
|
this.SimpleMarker = SimpleMarker;
|
||||||
//返回一个新的Marker
|
//返回一个新的Marker
|
||||||
return new AMap.Marker({
|
return new SimpleMarker({
|
||||||
label: label
|
//普通文本
|
||||||
|
iconLabel: {
|
||||||
|
//普通文本
|
||||||
|
innerHTML: dataItem.markerLabel,
|
||||||
|
//设置样式
|
||||||
|
style: {
|
||||||
|
color: '#fff',
|
||||||
|
fontSize: '110%',
|
||||||
|
marginTop: '2px'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
iconStyle: dataItem.color,
|
||||||
|
map: this.aMap,
|
||||||
|
position: dataItem.position
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//返回数据项对应的infoWindow
|
//返回数据项对应的infoWindow
|
||||||
getInfoWindow: (dataItem: any, context: any, recycledInfoWindow: any) => {
|
getInfoWindow: (dataItem: any, context: any, recycledInfoWindow: any) => {
|
||||||
var tpl = '<p><%- dataItem.id %>:<%- dataItem.infoWinContent %><p>';
|
this.selectedPOI(dataItem);
|
||||||
|
return null;
|
||||||
//MarkerList.utils.template支持underscore语法的模板
|
|
||||||
var content = MarkerList.utils.template(tpl, {
|
|
||||||
dataItem: dataItem,
|
|
||||||
dataIndex: context.index
|
|
||||||
});
|
|
||||||
|
|
||||||
if (recycledInfoWindow) {
|
|
||||||
//存在可回收利用的infoWindow, 直接更新内容返回
|
|
||||||
recycledInfoWindow.setContent(content);
|
|
||||||
return recycledInfoWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
//返回一个新的InfoWindow
|
|
||||||
return new AMap.InfoWindow({
|
|
||||||
offset: new AMap.Pixel(0, -32),
|
|
||||||
content: content
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//返回数据项对应的列表节点
|
|
||||||
getListElement: (dataItem: any, context: any, recycledListElement: any) => {
|
|
||||||
var tpl = '<p><%- dataItem.id %>:<%- dataItem.listDesc %><p>';
|
|
||||||
|
|
||||||
var content = MarkerList.utils.template(tpl, {
|
|
||||||
dataItem: dataItem,
|
|
||||||
dataIndex: context.index
|
|
||||||
});
|
|
||||||
|
|
||||||
if (recycledListElement) {
|
|
||||||
//存在可回收利用的listElement, 直接更新内容返回
|
|
||||||
recycledListElement.innerHTML = content;
|
|
||||||
return recycledListElement;
|
|
||||||
}
|
|
||||||
|
|
||||||
//返回一段html,MarkerList将利用此html构建一个新的dom节点
|
|
||||||
return '<li>' + content + '</li>';
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//监听选中改变
|
if (this._pois?.length > 0) {
|
||||||
markerList.on('selectedChanged', (event: any, info: any) => {
|
//展示该数据
|
||||||
console.log(event, info);
|
this.markerList.render(this._pois);
|
||||||
});
|
}
|
||||||
|
|
||||||
//监听Marker和ListElement上的点击
|
|
||||||
markerList.on('markerClick listElementClick', (event: any, record: any) => {
|
|
||||||
//console.log(event, record);
|
|
||||||
});
|
|
||||||
|
|
||||||
//构建一个数据项数组,数据项本身没有格式要求,但需要支持getDataId和getPosition
|
|
||||||
var data = [
|
|
||||||
{
|
|
||||||
id: 'A',
|
|
||||||
position: [116.020764, 39.904989],
|
|
||||||
markerLabel: 'X_A',
|
|
||||||
infoWinContent: 'Hello! A',
|
|
||||||
listDesc: '店铺 A'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'B',
|
|
||||||
position: [116.405285, 39.904989],
|
|
||||||
markerLabel: 'X_B',
|
|
||||||
infoWinContent: 'Hello! B',
|
|
||||||
listDesc: '店铺 B'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'C',
|
|
||||||
position: [116.789806, 39.904989],
|
|
||||||
markerLabel: 'X_C',
|
|
||||||
infoWinContent: 'Hello! C',
|
|
||||||
listDesc: '店铺 C'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
//展示该数据
|
|
||||||
markerList.render(data);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -377,7 +208,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
|
|
||||||
setPathIndex(index: number) {
|
setPathIndex(index: number) {
|
||||||
this.pathSimplifierIns.setSelectedPathIndex(index);
|
this.pathSimplifierIns.setSelectedPathIndex(index);
|
||||||
// this.startNav();
|
this.startNav();
|
||||||
}
|
}
|
||||||
|
|
||||||
startNav() {
|
startNav() {
|
||||||
@ -391,4 +222,61 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
this.navigator?.start();
|
this.navigator?.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 根据经纬度获取地址信息 */
|
||||||
|
getPoiByPositon(position: Array<string>) {
|
||||||
|
this.geocoder.getAddress(position, (status: any, result: any) => {
|
||||||
|
if (status === 'complete' && result.info === 'OK') {
|
||||||
|
// result中对应详细地理坐标信息
|
||||||
|
this._pois = [...this.pois, { markerLabel: '终', color: 'red', position: position, title: result.regeocode.formattedAddress }];
|
||||||
|
if (this.markerList) {
|
||||||
|
this.markerList.render(this._pois);
|
||||||
|
}
|
||||||
|
// this.setPOI({ markerLabel: '终', color: 'red', position: position });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选中标点,设置窗口信息
|
||||||
|
* @param location
|
||||||
|
*/
|
||||||
|
selectedPOI(location: any) {
|
||||||
|
this.infoWindow.setContent(`地址: <pre>${location.title}</pre>`);
|
||||||
|
this.infoWindow.open(this.aMap, location.position);
|
||||||
|
this.infoWindow.setPosition(location.position);
|
||||||
|
this.aMap.setCenter(location.position);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增加标记点
|
||||||
|
* @param poi
|
||||||
|
*/
|
||||||
|
setPOI(poi: POI) {
|
||||||
|
AMapUI.loadUI(['overlay/SimpleMarker'], (SimpleMarker: any) => {
|
||||||
|
//启动页面
|
||||||
|
new SimpleMarker({
|
||||||
|
//普通文本
|
||||||
|
iconLabel: {
|
||||||
|
//普通文本
|
||||||
|
innerHTML: poi.markerLabel,
|
||||||
|
//设置样式
|
||||||
|
style: {
|
||||||
|
color: '#fff',
|
||||||
|
fontSize: '110%',
|
||||||
|
marginTop: '2px'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
iconStyle: poi.color,
|
||||||
|
map: this.aMap,
|
||||||
|
position: poi.position
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface POI {
|
||||||
|
markerLabel: string;
|
||||||
|
color: string;
|
||||||
|
position: Array<string>;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* @Description :
|
* @Description :
|
||||||
* @Version : 1.0
|
* @Version : 1.0
|
||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-24 15:37:00
|
* @Date : 2021-12-24 15:37:00
|
||||||
@ -24,8 +24,8 @@ export class AmapService {
|
|||||||
sub = new Subject<any>();
|
sub = new Subject<any>();
|
||||||
currentSub = new Subject<any>();
|
currentSub = new Subject<any>();
|
||||||
|
|
||||||
//计算路径驾车最优路线的长度与所需时间
|
//计算路径驾车最优路线的长度与所需时间
|
||||||
drivingCompute(starts: any[], ends: any[]): Observable<any> {
|
drivingCompute(starts: any[], ends: any[]): Observable<any> {
|
||||||
AMap.plugin('AMap.Driving', () => {
|
AMap.plugin('AMap.Driving', () => {
|
||||||
let driving = new AMap.Driving({
|
let driving = new AMap.Driving({
|
||||||
// 驾车路线规划策略,AMap.DrivingPolicy.LEAST_TIME是最快捷模式
|
// 驾车路线规划策略,AMap.DrivingPolicy.LEAST_TIME是最快捷模式
|
||||||
@ -35,7 +35,10 @@ export class AmapService {
|
|||||||
return { keyword: item.detailedAddress, city: item.city };
|
return { keyword: item.detailedAddress, city: item.city };
|
||||||
});
|
});
|
||||||
driving.search(points, (status: any, result: any) => {
|
driving.search(points, (status: any, result: any) => {
|
||||||
const repData = { distance: (result?.routes?.[0]?.distance / 1000).toFixed(2), time: (result?.routes?.[0]?.time / 60 / 60).toFixed(2) };
|
const repData = {
|
||||||
|
distance: (result?.routes?.[0]?.distance / 1000).toFixed(2),
|
||||||
|
time: (result?.routes?.[0]?.time / 60 / 60).toFixed(2)
|
||||||
|
};
|
||||||
this.sub.next(repData);
|
this.sub.next(repData);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-01-25 16:03:45
|
* @Date : 2022-01-25 16:03:45
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-01 15:31:23
|
* @LastEditTime : 2022-03-09 16:17:28
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-h5\\dynamic-setting-h5.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-h5\\dynamic-setting-h5.component.html
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
@ -30,7 +30,10 @@
|
|||||||
<ng-container *ngSwitchCase="1">
|
<ng-container *ngSwitchCase="1">
|
||||||
<nz-input-group [nzAddOnAfter]="item.remark?.afterLable" style="width: 155px;"
|
<nz-input-group [nzAddOnAfter]="item.remark?.afterLable" style="width: 155px;"
|
||||||
class="ml-md mr-xl">
|
class="ml-md mr-xl">
|
||||||
<input type="number" nz-input [(ngModel)]="item.itemValue" placeholder="请输入" />
|
<nz-input-number [(ngModel)]="item.itemValue" [nzMin]="item.remark?.min"
|
||||||
|
[nzPrecision]="item.remark?.precision" [nzMax]="item.remark?.max"
|
||||||
|
nzPlaceHolder="请输入" style="width: 120px;"></nz-input-number>
|
||||||
|
<!-- <input type="number" nz-input [(ngModel)]="item.itemValue" placeholder="请输入"/> -->
|
||||||
</nz-input-group>
|
</nz-input-group>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<!-- 0-1单选框 -->
|
<!-- 0-1单选框 -->
|
||||||
|
|||||||
@ -50,6 +50,11 @@ export class DynamicSettingH5Component implements OnInit {
|
|||||||
if (this.configList?.length < 0) {
|
if (this.configList?.length < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 配置校验
|
||||||
|
if (this.configList.find((config: any) => !config.itemValue && config.requiredField)) {
|
||||||
|
this.service.msgSrv.warning('请填写必填项');
|
||||||
|
return;
|
||||||
|
}
|
||||||
let params = [...this.configList];
|
let params = [...this.configList];
|
||||||
params = params.map((item: any) => {
|
params = params.map((item: any) => {
|
||||||
if (item.itemType == 9) {
|
if (item.itemType == 9) {
|
||||||
|
|||||||
Reference in New Issue
Block a user