Merge branch 'develop' of gitlab.eascs.com:tms-ui/tms-obc-web into develop
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-07 17:32:05
|
* @LastEditTime : 2022-03-08 14:55:27
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.html
|
* @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.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
@ -86,7 +86,7 @@
|
|||||||
<input
|
<input
|
||||||
nz-input
|
nz-input
|
||||||
[(ngModel)]="data1.detailedAddress"
|
[(ngModel)]="data1.detailedAddress"
|
||||||
(click)="openMap('start', idx)"
|
(click)="openMap('start', idx,data1.detailedAddress)"
|
||||||
formControlName="loadAddress{{ idx }}"
|
formControlName="loadAddress{{ idx }}"
|
||||||
placeholder="请输入装货地"
|
placeholder="请输入装货地"
|
||||||
readonly="true"
|
readonly="true"
|
||||||
@ -139,7 +139,7 @@
|
|||||||
<input
|
<input
|
||||||
nz-input
|
nz-input
|
||||||
[(ngModel)]="data2.detailedAddress"
|
[(ngModel)]="data2.detailedAddress"
|
||||||
(click)="openMap('end', idx)"
|
(click)="openMap('end', idx,data2.detailedAddress)"
|
||||||
formControlName="unloadAddress{{ idx }}"
|
formControlName="unloadAddress{{ idx }}"
|
||||||
placeholder="请输入卸货地"
|
placeholder="请输入卸货地"
|
||||||
name="unloadAddress{{ idx }}"
|
name="unloadAddress{{ idx }}"
|
||||||
@ -338,27 +338,29 @@
|
|||||||
</sv-container>
|
</sv-container>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
|
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<nz-card nzTitle="轨迹信息" style="width: 100%" id="distannce5" [nzExtra]="extraTemplate" #distannce5>
|
<nz-card nzTitle="轨迹信息" style="width: 100%" [nzExtra]="extraTemplate" #distannce5>
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div nz-col [nzSpan]="12">
|
<div nz-col [nzSpan]="12">
|
||||||
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||||
</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"></amap-path-simplifier>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<ng-template #extraTemplate>
|
<ng-template #extraTemplate>
|
||||||
<nz-radio-group [(ngModel)]="trajectory">
|
<nz-radio-group [(ngModel)]="trajectory" (ngModelChange)="trajectoryChange($event)">
|
||||||
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
||||||
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
||||||
</nz-radio-group>
|
</nz-radio-group>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="附件信息" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="附件信息" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||||
<ng-container *nzModalContent>
|
<ng-container *nzModalContent>
|
||||||
<app-imagelist [imgList]="imges"></app-imagelist>
|
<app-imagelist [imgList]="imges"></app-imagelist>
|
||||||
|
|||||||
@ -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-07 17:56:10
|
* @LastEditTime : 2022-03-08 19:31:50
|
||||||
* @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.
|
||||||
*/
|
*/
|
||||||
@ -41,9 +41,7 @@ function getBase64(file: File): Promise<string | ArrayBuffer | null> {
|
|||||||
export class OrderManagementBulkDetailChangeComponent implements OnInit {
|
export class OrderManagementBulkDetailChangeComponent implements OnInit {
|
||||||
validateForm1: FormGroup;
|
validateForm1: FormGroup;
|
||||||
id = this.route.snapshot.params.id;
|
id = this.route.snapshot.params.id;
|
||||||
trajectory = 'car';
|
|
||||||
@ViewChild('distannce3', { static: false })
|
@ViewChild('distannce3', { static: false })
|
||||||
MapList: any[]=[];
|
|
||||||
i: any= {unLoadingPlaceList:[]};
|
i: any= {unLoadingPlaceList:[]};
|
||||||
totalDistance = 0.0; //总里程
|
totalDistance = 0.0; //总里程
|
||||||
totalTime = 0.0; //路程总时间
|
totalTime = 0.0; //路程总时间
|
||||||
@ -70,16 +68,38 @@ loadTime: any; // 货源单设置回显
|
|||||||
schema4: SFSchema = {};
|
schema4: SFSchema = {};
|
||||||
isVisible = false;
|
isVisible = false;
|
||||||
billExpenses: any[] = []; //运费信息表格信息
|
billExpenses: any[] = []; //运费信息表格信息
|
||||||
addressItems: any[] = []; //打点地址数据组
|
|
||||||
ui4!: SFUISchema;
|
ui4!: SFUISchema;
|
||||||
formData: any;
|
formData: any;
|
||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
schema: SFSchema = {};
|
schema: SFSchema = {};
|
||||||
ui: SFUISchema = {};
|
ui: SFUISchema = {};
|
||||||
logColumns: STColumn[] = [
|
logColumns2: STColumn[] = [
|
||||||
{ title: '时间', index: 'vinOutTime' },
|
{ title: '时间', index: 'vinOutTime' },
|
||||||
{ title: '地点', index: 'cityName' },
|
{ title: '地点', index: 'cityName' },
|
||||||
];
|
];
|
||||||
|
logColumns: STColumn[] = [
|
||||||
|
{ title: '款项', index: 'expenseCodeLabel' },
|
||||||
|
{ title: '小计(元)', render: 'price' },
|
||||||
|
{ 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' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
trajectory = 'car';
|
||||||
|
mapList:any[] = []; //地图点位数据组
|
||||||
|
addressItems:any[] = []; //打点地址数据组
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@ -99,10 +119,10 @@ loadTime: any; // 货源单设置回显
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initSF();
|
this.initData()
|
||||||
this.initSF3();
|
this.initSF3();
|
||||||
this.initSF4();
|
this.initSF4();
|
||||||
this.initData()
|
this.getTrajectory()
|
||||||
}
|
}
|
||||||
initSF() {
|
initSF() {
|
||||||
this.schema = {
|
this.schema = {
|
||||||
@ -110,6 +130,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
loadingLadingBillFilePath: {
|
loadingLadingBillFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '装货凭证',
|
title: '装货凭证',
|
||||||
|
readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
action: apiConf.fileUpload,
|
action: apiConf.fileUpload,
|
||||||
@ -148,6 +169,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
loadingPeopleVehiclesGoodsFilePath: {
|
loadingPeopleVehiclesGoodsFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
|
readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
action: apiConf.fileUpload,
|
action: apiConf.fileUpload,
|
||||||
@ -202,6 +224,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
unloadingLadingBillFilePath: {
|
unloadingLadingBillFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '卸货凭证',
|
title: '卸货凭证',
|
||||||
|
readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
action: apiConf.fileUpload,
|
action: apiConf.fileUpload,
|
||||||
@ -240,6 +263,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
unloadingPeopleVehiclesGoodsFilePath: {
|
unloadingPeopleVehiclesGoodsFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
|
readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
action: apiConf.fileUpload,
|
action: apiConf.fileUpload,
|
||||||
@ -311,6 +335,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
if (res) {
|
if (res) {
|
||||||
this.i = res;
|
this.i = res;
|
||||||
this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA');
|
this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA');
|
||||||
|
this.initSF();
|
||||||
// 对装货凭证进行初始化
|
// 对装货凭证进行初始化
|
||||||
let arr : any= []
|
let arr : any= []
|
||||||
res?.receiptFilePath.forEach((element: any, index: any) => {
|
res?.receiptFilePath.forEach((element: any, index: any) => {
|
||||||
@ -448,6 +473,20 @@ loadTime: any; // 货源单设置回显
|
|||||||
}
|
}
|
||||||
// 保存修改
|
// 保存修改
|
||||||
save() {
|
save() {
|
||||||
|
Object.keys(this.validateForm1.controls).forEach(key => {
|
||||||
|
this.validateForm1.controls[key].markAsDirty();
|
||||||
|
this.validateForm1.controls[key].updateValueAndValidity();
|
||||||
|
});
|
||||||
|
this.sf3.validator({ emitError: true });
|
||||||
|
this.sf4.validator({ emitError: true });
|
||||||
|
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid ) {
|
||||||
|
this.service.msgSrv.warning('请完善必填项!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ((this.sf4.value?.acceptWeight > this.i?.goodsInfoList?.[0]?.weight) || (this.sf4.value?.settlementWeight.settlementWeight > this.i?.goodsInfoList?.[0]?.weight) ) {
|
||||||
|
this.service.msgSrv.warning('装货重量/卸货重量不能大于货物重量!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
let imgList : any= [];
|
let imgList : any= [];
|
||||||
if(this.listImagUrls.length > 0) {
|
if(this.listImagUrls.length > 0) {
|
||||||
this.listImagUrls?.forEach((res :any) => {
|
this.listImagUrls?.forEach((res :any) => {
|
||||||
@ -513,32 +552,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({
|
const modalRef = this.modalService.create({
|
||||||
nzTitle: '',
|
nzTitle: '',
|
||||||
|
nzComponentParams: { selectedAddress: address },
|
||||||
nzContent: AmapPoiPickerComponent,
|
nzContent: AmapPoiPickerComponent,
|
||||||
nzWidth: 900,
|
nzWidth: 900,
|
||||||
nzOnOk: item => {
|
nzOnOk: item => {
|
||||||
const poi = item.poi;
|
const poi = item.poi;
|
||||||
const locList = poi.location.toString().split(',');
|
const locList = poi.pois;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'start':
|
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].longitude = locList[0];
|
||||||
this.startInfo[index].latitude = locList[1];
|
this.startInfo[index].latitude = locList[1];
|
||||||
this.startInfo[index].province = poi.cityInfo.province;
|
this.startInfo[index].province = poi.addressComponent.province;
|
||||||
this.startInfo[index].city = poi.cityInfo.city;
|
this.startInfo[index].city = poi.addressComponent.city;
|
||||||
this.startInfo[index].area = poi.cityInfo.district;
|
this.startInfo[index].area = poi.addressComponent.district;
|
||||||
this.startInfo[index].address = poi.name;
|
this.startInfo[index].address = poi.formattedAddress;
|
||||||
break;
|
break;
|
||||||
case 'end':
|
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].longitude = locList[0];
|
||||||
this.endInfo[index].latitude = locList[1];
|
this.endInfo[index].latitude = locList[1];
|
||||||
this.endInfo[index].province = poi.cityInfo.province;
|
this.endInfo[index].province = poi.addressComponent.province;
|
||||||
this.endInfo[index].city = poi.cityInfo.city;
|
this.endInfo[index].city = poi.addressComponent.city;
|
||||||
this.endInfo[index].area = poi.cityInfo.district;
|
this.endInfo[index].area = poi.addressComponent.district;
|
||||||
this.endInfo[index].address = poi.name;
|
this.endInfo[index].address = poi.formattedAddress;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -879,30 +922,61 @@ goDistance(elf: NzCardComponent) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 获取轨迹
|
|
||||||
MapInit() {
|
// 获取车辆轨迹
|
||||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
getTrajectory(){
|
||||||
if (res) {
|
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||||
const points = res.trackArray;
|
if (res) {
|
||||||
let list :any[] = [];
|
const points = res.trackArray;
|
||||||
points?.forEach((item: any) => {
|
let list :any[] = [];
|
||||||
list.push({
|
points?.forEach((item: any) => {
|
||||||
name: item.hgt,
|
list.push({
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
name: item.hgt,
|
||||||
});
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.mapList = list;
|
||||||
|
this.addressItems = res.cityArray;
|
||||||
|
if(this.addressItems && this.addressItems.length > 0){
|
||||||
|
this.addressItems.forEach(item => {
|
||||||
|
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
||||||
});
|
});
|
||||||
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');
|
// 获取司机轨迹
|
||||||
|
getDriverTrajectory(){
|
||||||
|
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
const points = res.tracks;
|
||||||
|
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.enclosureDataAppTrack];
|
||||||
|
if(this.addressItems && this.addressItems.length > 0){
|
||||||
|
this.addressItems.forEach(item => {
|
||||||
|
item.vinOutTime = this.getLocalTime(item.gtm);
|
||||||
|
item.cityName = item.appAdress;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
trajectoryChange(event:any){
|
||||||
|
if(event ==='car'){
|
||||||
|
this.getTrajectory()
|
||||||
|
}else if(event ==='driver'){
|
||||||
|
this.getDriverTrajectory();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
getLocalTime(time: any) {
|
||||||
|
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-06 20:20:26
|
* @Date : 2021-12-06 20:20:26
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-04 14:07:44
|
* @LastEditTime : 2022-03-08 14:53:01
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
@ -204,16 +204,16 @@
|
|||||||
<nz-card nzTitle="轨迹信息" style="width: 100%" [nzExtra]="extraTemplate" #distannce5>
|
<nz-card nzTitle="轨迹信息" style="width: 100%" [nzExtra]="extraTemplate" #distannce5>
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div nz-col [nzSpan]="12">
|
<div nz-col [nzSpan]="12">
|
||||||
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns2" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||||
</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"></amap-path-simplifier>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<ng-template #extraTemplate>
|
<ng-template #extraTemplate>
|
||||||
<nz-radio-group [(ngModel)]="trajectory">
|
<nz-radio-group [(ngModel)]="trajectory" (ngModelChange)="trajectoryChange($event)">
|
||||||
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
||||||
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
||||||
</nz-radio-group>
|
</nz-radio-group>
|
||||||
|
|||||||
@ -33,12 +33,33 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
totalObj: any;
|
totalObj: any;
|
||||||
attObj: any;
|
attObj: any;
|
||||||
isVisible = false;
|
isVisible = false;
|
||||||
logColumns: STColumn[] = [
|
logColumns2: STColumn[] = [
|
||||||
{ title: '时间', index: 'vinOutTime' },
|
{ title: '时间', index: 'vinOutTime' },
|
||||||
{ title: '地点', index: 'cityName' },
|
{ title: '地点', index: 'cityName' },
|
||||||
];
|
];
|
||||||
|
logColumns: STColumn[] = [
|
||||||
|
{ title: '款项', index: 'expenseCodeLabel' },
|
||||||
|
{ title: '小计(元)', render: 'price' },
|
||||||
|
{ 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' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
trajectory = 'car';
|
trajectory = 'car';
|
||||||
addressItems: any[] = []; //打点地址数据组
|
mapList:any[] = []; //地图点位数据组
|
||||||
|
addressItems:any[] = []; //打点地址数据组
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private msgSrv: NzMessageService,
|
private msgSrv: NzMessageService,
|
||||||
@ -49,7 +70,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initData();
|
this.initData();
|
||||||
this.MapInit();
|
this.getTrajectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
initData() {
|
initData() {
|
||||||
@ -103,8 +124,9 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 获取轨迹
|
|
||||||
MapInit() {
|
// 获取车辆轨迹
|
||||||
|
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;
|
||||||
@ -115,8 +137,8 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.MapList = list;
|
this.mapList = list;
|
||||||
this.addressItems = res.parkArray;
|
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);
|
||||||
@ -126,6 +148,36 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取司机轨迹
|
||||||
|
getDriverTrajectory(){
|
||||||
|
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
const points = res.tracks;
|
||||||
|
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.enclosureDataAppTrack];
|
||||||
|
if(this.addressItems && this.addressItems.length > 0){
|
||||||
|
this.addressItems.forEach(item => {
|
||||||
|
item.vinOutTime = this.getLocalTime(item.gtm);
|
||||||
|
item.cityName = item.appAdress;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
trajectoryChange(event:any){
|
||||||
|
if(event ==='car'){
|
||||||
|
this.getTrajectory()
|
||||||
|
}else if(event ==='driver'){
|
||||||
|
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');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -442,11 +442,22 @@ export class OrderManagementBulkComponent implements OnInit {
|
|||||||
width: '180px',
|
width: '180px',
|
||||||
index: 'unloadingAddressArr'
|
index: 'unloadingAddressArr'
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// title: '货物信息',
|
||||||
|
// className: 'text-left',
|
||||||
|
// width: '250px',
|
||||||
|
// render: 'goodsName'
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
title: '货物信息',
|
title: '货物信息',
|
||||||
|
index: 'goodsName',
|
||||||
|
width: '180px',
|
||||||
className: 'text-left',
|
className: 'text-left',
|
||||||
width: '250px',
|
format: (item: any) =>
|
||||||
render: 'goodsName'
|
`${item.goodsName}/
|
||||||
|
${item.goodsWeight || '0'}吨/
|
||||||
|
${item.goodsVolume || '0'}方/
|
||||||
|
${item.goodsNumber || '0'}件`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '运费单价',
|
title: '运费单价',
|
||||||
@ -460,8 +471,8 @@ export class OrderManagementBulkComponent implements OnInit {
|
|||||||
width: '170px',
|
width: '170px',
|
||||||
className: 'text-left',
|
className: 'text-left',
|
||||||
format: (item: any) =>
|
format: (item: any) =>
|
||||||
`${item.acceptWeight || '--'}吨/
|
`${item.acceptWeight || '0'}吨/
|
||||||
${item.acceptVolume || '--'}方`
|
${item.acceptVolume || '0'}方`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '结算数量',
|
title: '结算数量',
|
||||||
@ -469,8 +480,8 @@ export class OrderManagementBulkComponent implements OnInit {
|
|||||||
width: '170px',
|
width: '170px',
|
||||||
className: 'text-left',
|
className: 'text-left',
|
||||||
format: (item: any) =>
|
format: (item: any) =>
|
||||||
`${item.settlementWeight || '--'}吨/
|
`${item.settlementWeight || '0'}吨/
|
||||||
${item.settlementVolume || '--'}方`
|
${item.settlementVolume || '0'}方`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '承运司机',
|
title: '承运司机',
|
||||||
|
|||||||
@ -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-03-07 17:29:44
|
* @LastEditTime : 2022-03-08 14:59:55
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.html
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
@ -265,20 +265,20 @@
|
|||||||
<sv label="是否回单">
|
<sv label="是否回单">
|
||||||
{{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }}
|
{{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }}
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="回单类型">
|
<sv label="回单类型" *ngIf="i?.supplementaryInformationVO?.stateReceipt">
|
||||||
{{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }}
|
{{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }}
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="联系人"> {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} </sv>
|
<sv label="联系人" *ngIf="i?.supplementaryInformationVO?.stateReceipt"> {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} </sv>
|
||||||
<sv label="所在地区">
|
<sv label="所在地区" *ngIf="i?.supplementaryInformationVO?.stateReceipt">
|
||||||
{{ i?.supplementaryInformationVO?.area }}
|
{{ i?.supplementaryInformationVO?.area }}
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="详细地址">
|
<sv label="详细地址" *ngIf="i?.supplementaryInformationVO?.stateReceipt">
|
||||||
{{ i?.supplementaryInformationVO?.address }}
|
{{ i?.supplementaryInformationVO?.address }}
|
||||||
</sv>
|
</sv>
|
||||||
|
|
||||||
</sv-container>
|
</sv-container>
|
||||||
<sv-container col="1" class="mt-md">
|
<sv-container col="1" class="mt-md">
|
||||||
<sv label="回单凭证">
|
<sv label="回单凭证" *ngIf="i?.supplementaryInformationVO?.stateReceipt">
|
||||||
<nz-upload
|
<nz-upload
|
||||||
class="avatar-uploader"
|
class="avatar-uploader"
|
||||||
[nzAction]="service.$api_upload_url"
|
[nzAction]="service.$api_upload_url"
|
||||||
@ -309,17 +309,23 @@
|
|||||||
|
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<nz-card nzTitle="轨迹信息" style="width: 100%" #distannce5>
|
<nz-card nzTitle="轨迹信息" style="width: 100%" [nzExtra]="extraTemplate" #distannce5>
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div nz-col [nzSpan]="12">
|
<div nz-col [nzSpan]="12">
|
||||||
<!-- <st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns2" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||||
</st> -->
|
</st>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="12">
|
<div nz-col [nzSpan]="12">
|
||||||
<amap-path-simplifier></amap-path-simplifier>
|
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="mapList"></amap-path-simplifier>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
<ng-template #extraTemplate>
|
||||||
|
<nz-radio-group [(ngModel)]="trajectory" (ngModelChange)="trajectoryChange($event)">
|
||||||
|
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
||||||
|
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
||||||
|
</nz-radio-group>
|
||||||
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="附件信息" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="附件信息" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||||
|
|||||||
@ -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-03-07 17:56:51
|
* @LastEditTime : 2022-03-08 16:12:17
|
||||||
* @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.
|
||||||
*/
|
*/
|
||||||
@ -21,6 +21,7 @@ import { NzModalService } from 'ng-zorro-antd/modal';
|
|||||||
import { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload';
|
import { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload';
|
||||||
import { Observable, Observer } from 'rxjs';
|
import { Observable, Observer } from 'rxjs';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
|
import format from 'date-fns/format';
|
||||||
import { OrderManagementService } from '../../services/order-management.service';
|
import { OrderManagementService } from '../../services/order-management.service';
|
||||||
function getBase64(file: File): Promise<string | ArrayBuffer | null> {
|
function getBase64(file: File): Promise<string | ArrayBuffer | null> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@ -90,6 +91,13 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
trajectory = 'car';
|
||||||
|
mapList:any[] = []; //地图点位数据组
|
||||||
|
addressItems:any[] = []; //打点地址数据组
|
||||||
|
logColumns2: STColumn[] = [
|
||||||
|
{ title: '时间', index: 'vinOutTime' },
|
||||||
|
{ title: '地点', index: 'cityName' },
|
||||||
|
];
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@ -109,18 +117,19 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
console.log(this.id);
|
this.initData();
|
||||||
this.initSF();
|
|
||||||
this.initSF3();
|
this.initSF3();
|
||||||
this.initSF4();
|
this.initSF4();
|
||||||
this.initData();
|
|
||||||
}
|
}
|
||||||
initSF() {
|
initSF() {
|
||||||
|
console.log(this.i);
|
||||||
|
console.log(this.i.billStatus == '4' || this.i.billStatus == '3');
|
||||||
this.schema = {
|
this.schema = {
|
||||||
properties: {
|
properties: {
|
||||||
loadingLadingBillFilePath: {
|
loadingLadingBillFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '装货凭证',
|
title: '装货凭证',
|
||||||
|
readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
action: apiConf.fileUpload,
|
action: apiConf.fileUpload,
|
||||||
@ -159,6 +168,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
loadingPeopleVehiclesGoodsFilePath: {
|
loadingPeopleVehiclesGoodsFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
|
readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
action: apiConf.fileUpload,
|
action: apiConf.fileUpload,
|
||||||
@ -213,6 +223,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
unloadingLadingBillFilePath: {
|
unloadingLadingBillFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '卸货凭证',
|
title: '卸货凭证',
|
||||||
|
readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
action: apiConf.fileUpload,
|
action: apiConf.fileUpload,
|
||||||
@ -251,6 +262,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
unloadingPeopleVehiclesGoodsFilePath: {
|
unloadingPeopleVehiclesGoodsFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
|
readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
action: apiConf.fileUpload,
|
action: apiConf.fileUpload,
|
||||||
@ -331,6 +343,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
delete this.approvalLsit[key];
|
delete this.approvalLsit[key];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.initSF();
|
||||||
// 对装货凭证进行初始化
|
// 对装货凭证进行初始化
|
||||||
let arr: any = [];
|
let arr: any = [];
|
||||||
res?.receiptFilePath.forEach((element: any, index: any) => {
|
res?.receiptFilePath.forEach((element: any, index: any) => {
|
||||||
@ -759,7 +772,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadPlanTime: {
|
loadTime: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '发车时间',
|
title: '发车时间',
|
||||||
ui: {
|
ui: {
|
||||||
@ -767,7 +780,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
unloadPlanTime: {
|
unloadTime: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '到车时间',
|
title: '到车时间',
|
||||||
ui: {
|
ui: {
|
||||||
@ -916,4 +929,60 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 获取车辆轨迹
|
||||||
|
getTrajectory(){
|
||||||
|
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.cityArray;
|
||||||
|
if(this.addressItems && this.addressItems.length > 0){
|
||||||
|
this.addressItems.forEach(item => {
|
||||||
|
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取司机轨迹
|
||||||
|
getDriverTrajectory(){
|
||||||
|
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
const points = res.tracks;
|
||||||
|
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.enclosureDataAppTrack];
|
||||||
|
if(this.addressItems && this.addressItems.length > 0){
|
||||||
|
this.addressItems.forEach(item => {
|
||||||
|
item.vinOutTime = this.getLocalTime(item.gtm);
|
||||||
|
item.cityName = item.appAdress;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
trajectoryChange(event:any){
|
||||||
|
if(event ==='car'){
|
||||||
|
this.getTrajectory()
|
||||||
|
}else if(event ==='driver'){
|
||||||
|
this.getDriverTrajectory();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getLocalTime(time: any) {
|
||||||
|
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-28 14:42:03
|
* @Date : 2021-12-28 14:42:03
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-04 17:48:27
|
* @LastEditTime : 2022-03-09 10:33:44
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
@ -46,7 +46,7 @@
|
|||||||
<sv label="服务类型">{{ i?.goodsResource?.serviceTypeLabel }}</sv>
|
<sv label="服务类型">{{ i?.goodsResource?.serviceTypeLabel }}</sv>
|
||||||
<sv label="录单员">{{ i?.createUserName || i?.goodsResource?.createUserName }} /{{ i?.createUserPhone || i?.goodsResource?.createUserPhone }} </sv>
|
<sv label="录单员">{{ i?.createUserName || i?.goodsResource?.createUserName }} /{{ i?.createUserPhone || i?.goodsResource?.createUserPhone }} </sv>
|
||||||
<sv label="调度员">{{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} </sv>
|
<sv label="调度员">{{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} </sv>
|
||||||
<sv label="外部订单号">{{ i?.wayBillCode }}</sv>
|
<sv label="外部订单号">{{ i?.externalBillCode }}</sv>
|
||||||
<sv label="货源编号">{{ i?.resourceCode }} </sv>
|
<sv label="货源编号">{{ i?.resourceCode }} </sv>
|
||||||
<sv label="运单号">{{ i?.wayBillId }}</sv>
|
<sv label="运单号">{{ i?.wayBillId }}</sv>
|
||||||
<sv label="承诺付款天数">{{ i?.goodsResource?.dispatchName }}</sv>
|
<sv label="承诺付款天数">{{ i?.goodsResource?.dispatchName }}</sv>
|
||||||
@ -173,19 +173,19 @@
|
|||||||
<sv label="是否回单">
|
<sv label="是否回单">
|
||||||
{{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }}
|
{{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }}
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="回单类型">
|
<sv label="回单类型" *ngIf="i?.supplementaryInformationVO?.stateReceipt">
|
||||||
{{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }}
|
{{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }}
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="联系人"> {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} </sv>
|
<sv label="联系人" *ngIf="i?.supplementaryInformationVO?.stateReceipt"> {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} </sv>
|
||||||
<sv label="所在地区">
|
<sv label="所在地区" *ngIf="i?.supplementaryInformationVO?.stateReceipt">
|
||||||
{{ i?.supplementaryInformationVO?.area }}
|
{{ i?.supplementaryInformationVO?.area }}
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="详细地址">
|
<sv label="详细地址" *ngIf="i?.supplementaryInformationVO?.stateReceipt">
|
||||||
{{ i?.supplementaryInformationVO?.address }}
|
{{ i?.supplementaryInformationVO?.address }}
|
||||||
</sv>
|
</sv>
|
||||||
</sv-container>
|
</sv-container>
|
||||||
<sv-container col="1" class="mt-md">
|
<sv-container col="1" class="mt-md">
|
||||||
<sv label="回单凭证">
|
<sv label="回单凭证" *ngIf="i?.supplementaryInformationVO?.stateReceipt">
|
||||||
<app-imagelist [imgList]="i?.receiptFilePath"></app-imagelist>
|
<app-imagelist [imgList]="i?.receiptFilePath"></app-imagelist>
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="备注">
|
<sv label="备注">
|
||||||
@ -196,19 +196,19 @@
|
|||||||
|
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<nz-card nzTitle="轨迹信息" style="width: 100%" id="distannce5" [nzExtra]="extraTemplate" #distannce5>
|
<nz-card nzTitle="轨迹信息" style="width: 100%" [nzExtra]="extraTemplate" #distannce5>
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div nz-col [nzSpan]="12">
|
<div nz-col [nzSpan]="12">
|
||||||
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns2" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||||
</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"></amap-path-simplifier>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<ng-template #extraTemplate>
|
<ng-template #extraTemplate>
|
||||||
<nz-radio-group [(ngModel)]="trajectory">
|
<nz-radio-group [(ngModel)]="trajectory" (ngModelChange)="trajectoryChange($event)">
|
||||||
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
||||||
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
||||||
</nz-radio-group>
|
</nz-radio-group>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-28 14:42:03
|
* @Date : 2021-12-28 14:42:03
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-02 16:19:31
|
* @LastEditTime : 2022-03-08 14:56:43
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -23,7 +23,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;
|
||||||
MapList: any[]=[];
|
trajectory = 'car';
|
||||||
|
mapList:any[] = []; //地图点位数据组
|
||||||
|
addressItems:any[] = []; //打点地址数据组
|
||||||
i: any = {
|
i: any = {
|
||||||
unLoadingPlaceList: [],
|
unLoadingPlaceList: [],
|
||||||
billExpenseDetails: [],
|
billExpenseDetails: [],
|
||||||
@ -36,13 +38,30 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
totalObj: any;
|
totalObj: any;
|
||||||
approvalLsit: any;
|
approvalLsit: any;
|
||||||
isVisible = false;
|
isVisible = false;
|
||||||
logColumns: STColumn[] = [
|
logColumns2: STColumn[] = [
|
||||||
{ title: '时间', index: 'vinOutTime' },
|
{ title: '时间', index: 'vinOutTime' },
|
||||||
{ title: '地点', index: 'cityName' },
|
{ title: '地点', index: 'cityName' },
|
||||||
];
|
];
|
||||||
trajectory = 'car';
|
logColumns: STColumn[] = [
|
||||||
addressItems: any[] = []; //打点地址数据组
|
{ title: '款项', index: 'expenseCodeLabel' },
|
||||||
|
{ title: '小计(元)', render: 'price' },
|
||||||
|
{ 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' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private msgSrv: NzMessageService,
|
private msgSrv: NzMessageService,
|
||||||
@ -53,7 +72,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initData();
|
this.initData();
|
||||||
this.MapInit()
|
this.getTrajectory()
|
||||||
}
|
}
|
||||||
|
|
||||||
initData() {
|
initData() {
|
||||||
@ -108,8 +127,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
// elf['elementRef'].nativeElement.className = 'target-fix'
|
// elf['elementRef'].nativeElement.className = 'target-fix'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 获取轨迹
|
// 获取车辆轨迹
|
||||||
MapInit() {
|
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;
|
||||||
@ -120,8 +139,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.MapList = list;
|
this.mapList = list;
|
||||||
this.addressItems = res.parkArray;
|
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);
|
||||||
@ -131,6 +150,36 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取司机轨迹
|
||||||
|
getDriverTrajectory(){
|
||||||
|
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
const points = res.tracks;
|
||||||
|
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.enclosureDataAppTrack];
|
||||||
|
if(this.addressItems && this.addressItems.length > 0){
|
||||||
|
this.addressItems.forEach(item => {
|
||||||
|
item.vinOutTime = this.getLocalTime(item.gtm);
|
||||||
|
item.cityName = item.appAdress;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
trajectoryChange(event:any){
|
||||||
|
if(event ==='car'){
|
||||||
|
this.getTrajectory()
|
||||||
|
}else if(event ==='driver'){
|
||||||
|
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,20 +4,26 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-29 14:51:07
|
* @Date : 2021-12-29 14:51:07
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-02-10 10:19:34
|
* @LastEditTime : 2022-03-08 13:21:35
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-rate\\modify-rate.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-rate\\modify-rate.component.html
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
<nz-alert nzType="info" [nzMessage]="'已选择'+ data?.ids?.length + '条订单'" nzShowIcon></nz-alert>
|
<nz-alert nzType="info" [nzMessage]="'已选择'+ data?.ids?.length + '条订单'" nzShowIcon></nz-alert>
|
||||||
<sf style="margin-top: 15px" #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
|
<sf style="margin-top: 15px" #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
|
||||||
|
|
||||||
<st #st [data]="service.$api_getChangeRecordWholeDetail" [columns]="columns"
|
<st #st [data]="service.$api_searchAdditionalRateBatch" [columns]="columns"
|
||||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams}"
|
[req]="{ method: 'POST',params: reqParams}"
|
||||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
[res]="{ reName: { list: 'data' } }"
|
||||||
[page]="{}"
|
[page]="{show: false,showSize: false,front: false}"
|
||||||
>
|
>
|
||||||
<ng-template st-row="operator" let-item>
|
<ng-template st-row="oldAdditionalRate" let-item>
|
||||||
{{item?.operator}}/{{item.telephone}}
|
{{ item?.oldAdditionalRate? (item?.oldAdditionalRate * 100).toFixed(2) + '%' : ''}}
|
||||||
|
</ng-template>
|
||||||
|
<ng-template st-row="oldSurcharge" let-item>
|
||||||
|
{{ item?.oldSurcharge | currency}}
|
||||||
|
</ng-template>
|
||||||
|
<ng-template st-row="newSurcharge" let-item>
|
||||||
|
{{ item?.newSurcharge | currency}}
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</st>
|
</st>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-29 14:51:07
|
* @Date : 2021-12-29 14:51:07
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-04 14:45:58
|
* @LastEditTime : 2022-03-08 13:21:59
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-rate\\modify-rate.component.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-rate\\modify-rate.component.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -26,9 +26,10 @@ export class VehicleModifyRateComponent implements OnInit {
|
|||||||
schema: SFSchema = {};
|
schema: SFSchema = {};
|
||||||
ui: SFUISchema = {};
|
ui: SFUISchema = {};
|
||||||
columns: STColumn[] = [
|
columns: STColumn[] = [
|
||||||
{ title: '内容', index: 'operationContent' },
|
{ title: '订单号', index: 'billCode' },
|
||||||
{ title: '操作人', index: 'operator' },
|
{ title: '原附加费率', render: 'oldAdditionalRate' },
|
||||||
{ title: '操作时间', index: 'operatorTimestamp' },
|
{ title: '原附加费', render: 'oldSurcharge' },
|
||||||
|
{ title: '新附加费', render: 'newSurcharge' },
|
||||||
];
|
];
|
||||||
aggreechecked = false;
|
aggreechecked = false;
|
||||||
|
|
||||||
@ -40,11 +41,15 @@ export class VehicleModifyRateComponent implements OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
console.log(this.data);
|
console.log(this.data);
|
||||||
this.initSF();
|
this.initSF();
|
||||||
|
console.log(this.data?.ids)
|
||||||
}
|
}
|
||||||
get reqParams() {
|
get reqParams() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// operateObject: this.i?.resourceCode,
|
// operateObject: this.i?.resourceCode,
|
||||||
// operateType: 4,
|
// operateType: 4,
|
||||||
|
ids: this.data?.ids,
|
||||||
|
additionalRate: this.sf?.value?.additionalRate || 0
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
initSF() {
|
initSF() {
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-02-22 13:53:29
|
* @Date : 2022-02-22 13:53:29
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-02 16:18:46
|
* @LastEditTime : 2022-03-08 15:01:14
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.html
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<nz-card nzTitle="轨迹信息" [nzExtra]="extraTemplate" >
|
<nz-card nzTitle="轨迹信息" [nzExtra]="extraTemplate" >
|
||||||
<div style="display: flex; flex: 1;">
|
<div style="display: flex; flex: 1;">
|
||||||
<div style=" flex: 1;">
|
<div style=" flex: 1;">
|
||||||
<st #st [scroll]="{y: '500px'}" [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
<st #st [scroll]="{y: '500px'}" [data]="addressItems" [columns]="logColumns2" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||||
</st>
|
</st>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1;" >
|
<div style="flex: 1;" >
|
||||||
@ -21,7 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<ng-template #extraTemplate>
|
<ng-template #extraTemplate>
|
||||||
<nz-radio-group [(ngModel)]="trajectory">
|
<nz-radio-group [(ngModel)]="trajectory" (ngModelChange)="trajectoryChange($event)">
|
||||||
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
||||||
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
||||||
</nz-radio-group>
|
</nz-radio-group>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-02-22 13:53:29
|
* @Date : 2022-02-22 13:53:29
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-02 16:02:51
|
* @LastEditTime : 2022-03-08 16:11:58
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -35,8 +35,9 @@ export class OneCarOrderViewtrackComponent implements OnInit {
|
|||||||
i: any; // 单行数据
|
i: any; // 单行数据
|
||||||
MapList:any[] = []; //地图点位数据组
|
MapList:any[] = []; //地图点位数据组
|
||||||
trajectory = 'car';
|
trajectory = 'car';
|
||||||
|
mapList:any[] = []; //地图点位数据组
|
||||||
addressItems: any[] = []; //打点地址数据组
|
addressItems: any[] = []; //打点地址数据组
|
||||||
logColumns: STColumn[] = [
|
logColumns2: STColumn[] = [
|
||||||
{ title: '时间', index: 'vinOutTime' },
|
{ title: '时间', index: 'vinOutTime' },
|
||||||
{ title: '地点', index: 'cityName' },
|
{ title: '地点', index: 'cityName' },
|
||||||
];
|
];
|
||||||
@ -49,12 +50,15 @@ export class OneCarOrderViewtrackComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
console.log(this.i);
|
console.log(this.i);
|
||||||
this.MapInit();
|
this.getTrajectory();
|
||||||
|
|
||||||
}
|
}
|
||||||
// 获取轨迹
|
close(value: boolean): void {
|
||||||
MapInit() {
|
this.modalRef.close(false);
|
||||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.i.id }).subscribe(res => {
|
}
|
||||||
|
// 获取车辆轨迹
|
||||||
|
getTrajectory(){
|
||||||
|
this.service.request(this.service.$api_get_getTrajectory, { id: this.i?.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
const points = res.trackArray;
|
const points = res.trackArray;
|
||||||
let list :any[] = [];
|
let list :any[] = [];
|
||||||
@ -64,8 +68,7 @@ export class OneCarOrderViewtrackComponent implements OnInit {
|
|||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.MapList = list;
|
this.mapList = list;
|
||||||
// this.addressItems = res.parkArray;
|
|
||||||
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 => {
|
||||||
@ -75,10 +78,38 @@ export class OneCarOrderViewtrackComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
close(value: boolean): void {
|
|
||||||
this.modalRef.close(false);
|
// 获取司机轨迹
|
||||||
}
|
getDriverTrajectory(){
|
||||||
getLocalTime(time: any) {
|
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.i?.id }).subscribe(res => {
|
||||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
if (res) {
|
||||||
}
|
const points = res.tracks;
|
||||||
|
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.enclosureDataAppTrack];
|
||||||
|
if(this.addressItems && this.addressItems.length > 0){
|
||||||
|
this.addressItems.forEach(item => {
|
||||||
|
item.vinOutTime = this.getLocalTime(item.gtm);
|
||||||
|
item.cityName = item.appAdress;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
trajectoryChange(event:any){
|
||||||
|
if(event ==='car'){
|
||||||
|
this.getTrajectory()
|
||||||
|
}else if(event ==='driver'){
|
||||||
|
this.getDriverTrajectory();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getLocalTime(time: any) {
|
||||||
|
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-03 15:31:52
|
* @Date : 2021-12-03 15:31:52
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-01 19:21:53
|
* @LastEditTime : 2022-03-08 09:27:47
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -120,46 +120,43 @@ export class OrderManagementService extends ShipperBaseService {
|
|||||||
|
|
||||||
// 获取货主企业列表
|
// 获取货主企业列表
|
||||||
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
|
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
|
||||||
// 查询系统配置项
|
// 查询系统配置项
|
||||||
public $api_get_config_item_page = '/api/mdc/pbc/sysConfigItem/list/page';
|
public $api_get_config_item_page = '/api/mdc/pbc/sysConfigItem/list/page';
|
||||||
|
|
||||||
// 查询单据审核
|
// 查询单据审核
|
||||||
public $api_get_billExamine_page = '/api/sdc/billExamine/listPage';
|
public $api_get_billExamine_page = '/api/sdc/billExamine/listPage';
|
||||||
// 单据审核查看凭证
|
// 单据审核查看凭证
|
||||||
public $api_get_getCredentials = '/api/sdc/billExamine/getCredentials';
|
public $api_get_getCredentials = '/api/sdc/billExamine/getCredentials';
|
||||||
// 单据审核
|
// 单据审核
|
||||||
public $api_get_billAudit = '/api/sdc/billExamine/billAudit';
|
public $api_get_billAudit = '/api/sdc/billExamine/billAudit';
|
||||||
// 统计单据审核状态数量
|
// 统计单据审核状态数量
|
||||||
public $api_get_getAuditStatistical = '/api/sdc/billExamine/getAuditStatistical';
|
public $api_get_getAuditStatistical = '/api/sdc/billExamine/getAuditStatistical';
|
||||||
// 修改单据审核
|
// 修改单据审核
|
||||||
public $api_get_updateBillExamine = '/api/sdc/billExamine/updateBillExamine';
|
public $api_get_updateBillExamine = '/api/sdc/billExamine/updateBillExamine';
|
||||||
// 单据审核通过
|
// 单据审核通过
|
||||||
public $api_get_billAuditPass = '/api/sdc/billExamine/billAuditPassBatch';
|
public $api_get_billAuditPass = '/api/sdc/billExamine/billAuditPassBatch';
|
||||||
|
|
||||||
|
// 查询规则抽查列表
|
||||||
// 查询规则抽查列表
|
|
||||||
public $api_get_listCompliancePage = '/api/sdc/BillComplianceSpotCheck/list/Page';
|
public $api_get_listCompliancePage = '/api/sdc/BillComplianceSpotCheck/list/Page';
|
||||||
// 规则抽查审批
|
// 规则抽查审批
|
||||||
public $api_get_updateBillByCompliance = '/api/sdc/billOperate/updateBillByCompliance';
|
public $api_get_updateBillByCompliance = '/api/sdc/billOperate/updateBillByCompliance';
|
||||||
// 获取规则抽查分类统计
|
// 获取规则抽查分类统计
|
||||||
public $api_get_getComplianceStatisticalStatus = '/api/sdc/billOperate/getComplianceStatisticalStatus';
|
public $api_get_getComplianceStatisticalStatus = '/api/sdc/billOperate/getComplianceStatisticalStatus';
|
||||||
|
|
||||||
// 货主端-货主查看评价(评价司机的)
|
// 货主端-货主查看评价(评价司机的)
|
||||||
public $api_getBillEvaluateByShipper = '/api/sdc/billEvaluate/getBillEvaluateByShipper';
|
public $api_getBillEvaluateByShipper = '/api/sdc/billEvaluate/getBillEvaluateByShipper';
|
||||||
// 货主端-货主查看评价(司机评价货主的)
|
// 货主端-货主查看评价(司机评价货主的)
|
||||||
public $api_getBillEvaluateDriverByShipper = '/api/sdc/billEvaluate/getBillEvaluateDriverByShipper';
|
public $api_getBillEvaluateDriverByShipper = '/api/sdc/billEvaluate/getBillEvaluateDriverByShipper';
|
||||||
|
|
||||||
|
// 获取订单退款申请表
|
||||||
|
|
||||||
// 获取订单退款申请表
|
|
||||||
public $api_billRefundApplication_get = '/api/fcc/billRefundApplication/get';
|
public $api_billRefundApplication_get = '/api/fcc/billRefundApplication/get';
|
||||||
// 同意退款
|
// 同意退款
|
||||||
public $api_billRefundApplication_agreeRefund = '/api/fcc/billRefundApplication/agreeRefund';
|
public $api_billRefundApplication_agreeRefund = '/api/fcc/billRefundApplication/agreeRefund';
|
||||||
// 保存订单退款申请表
|
// 保存订单退款申请表
|
||||||
public $api_billRefundApplication_save = '/api/fcc/billRefundApplication/save';
|
public $api_billRefundApplication_save = '/api/fcc/billRefundApplication/save';
|
||||||
|
|
||||||
|
// 批量修改费率-实时查看附加费
|
||||||
|
public $api_searchAdditionalRateBatch = '/api/sdc/billOperate/searchAdditionalRateBatch';
|
||||||
|
|
||||||
getDictByKey(dictKey: string) {
|
getDictByKey(dictKey: string) {
|
||||||
const params = { dictKey: dictKey };
|
const params = { dictKey: dictKey };
|
||||||
@ -169,6 +166,8 @@ export class OrderManagementService extends ShipperBaseService {
|
|||||||
$api_getDictValue = `/api/mdc/pbc/dictItems/getDictValue`;
|
$api_getDictValue = `/api/mdc/pbc/dictItems/getDictValue`;
|
||||||
// 获取轨迹
|
// 获取轨迹
|
||||||
$api_get_getTrajectory = `/api/sdc/billShipper/getTrajectoryByBillId`;
|
$api_get_getTrajectory = `/api/sdc/billShipper/getTrajectoryByBillId`;
|
||||||
|
// 获取订单司机轨迹
|
||||||
|
$api_get_getAppDriverPosition = `/api/sdc/billShipper/getAppDriverPosition`;
|
||||||
/**
|
/**
|
||||||
* 根据企业ID,获取企业历史网络货运人
|
* 根据企业ID,获取企业历史网络货运人
|
||||||
* @returns
|
* @returns
|
||||||
@ -190,22 +189,22 @@ export class OrderManagementService extends ShipperBaseService {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取车型、车长字典数据
|
* 获取车型、车长字典数据
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getDictOptions(params = {}) {
|
getDictOptions(params = {}) {
|
||||||
return this.request(this.$api_getDictValue, params).pipe(
|
return this.request(this.$api_getDictValue, params).pipe(
|
||||||
map((res: any) => {
|
map((res: any) => {
|
||||||
if (!res) {
|
if (!res) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const obj = [];
|
const obj = [];
|
||||||
obj.push({ label: '不限', value: '999' });
|
obj.push({ label: '不限', value: '999' });
|
||||||
return [...obj, ...res];
|
return [...obj, ...res];
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
|
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
|
||||||
super(injector, eaCacheSrv);
|
super(injector, eaCacheSrv);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,10 +116,11 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
serverSearch: true,
|
serverSearch: true,
|
||||||
|
allowClear: true,
|
||||||
searchDebounceTime: 300,
|
searchDebounceTime: 300,
|
||||||
searchLoadingText: '搜索中...',
|
searchLoadingText: '搜索中...',
|
||||||
onSearch: (q: any) => {
|
onSearch: (q: any) => {
|
||||||
let str = q.replace(/^\s+|\s+$/g, '');
|
let str = q?.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
return this.service
|
return this.service
|
||||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||||
@ -130,7 +131,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
change: (q: any, qs: any) => {
|
change: (q: any, qs: any) => {
|
||||||
let str = q.replace(/^\s+|\s+$/g, '');
|
let str = q?.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
this.getRegionCode(str);
|
this.getRegionCode(str);
|
||||||
this.shipperName = qs?.label;
|
this.shipperName = qs?.label;
|
||||||
@ -649,17 +650,17 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
// 校验各个输入限定值
|
// 校验各个输入限定值
|
||||||
if (
|
if (
|
||||||
this.sf4.value.weight > this.limitValues.maxWeight ||
|
this.sf4.value?.weight > this.limitValues?.maxWeight ||
|
||||||
this.sf4.value.volume > this.limitValues.maxVolume ||
|
this.sf4.value?.volume > this.limitValues?.maxVolume ||
|
||||||
this.sf4.value.number > this.limitValues.maxTrainNumber
|
this.sf4.value?.number > this.limitValues?.maxTrainNumber
|
||||||
) {
|
) {
|
||||||
this.service.msgSrv.error(
|
this.service.msgSrv.error(
|
||||||
`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxTrainNumber}车】`
|
`当前货物核载信息已超出限定值【${this.limitValues?.maxWeight}吨、${this.limitValues?.maxVolume}方、${this.limitValues?.maxTrainNumber}车】`
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.sf4.value.freightPrice > this.limitValues.maxFreight) {
|
if (this.sf4.value?.freightPrice > this.limitValues?.maxFreight) {
|
||||||
this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`);
|
this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -682,8 +683,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
...this.sf4.value,
|
...this.sf4.value,
|
||||||
...this.sf3.value,
|
...this.sf3.value,
|
||||||
carModel: this.sf4.value.carModel.join(','),
|
carModel: this.sf4.value?.carModel.join(','),
|
||||||
carLength: this.sf4.value.carLength.join(',')
|
carLength: this.sf4.value?.carLength.join(',')
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
// 从“再下一单”过来,将所有的子参数内的id都删除
|
// 从“再下一单”过来,将所有的子参数内的id都删除
|
||||||
|
|||||||
@ -130,7 +130,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
|||||||
searchLoadingText: '搜索中...',
|
searchLoadingText: '搜索中...',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
onSearch: (q: any) => {
|
onSearch: (q: any) => {
|
||||||
let str =q.replace(/^\s+|\s+$/g,"");
|
let str =q?.replace(/^\s+|\s+$/g,"");
|
||||||
if (str) {
|
if (str) {
|
||||||
return this.service
|
return this.service
|
||||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||||
@ -141,7 +141,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
change: (q: any, qs: any) => {
|
change: (q: any, qs: any) => {
|
||||||
let str =q.replace(/^\s+|\s+$/g,"");
|
let str =q?.replace(/^\s+|\s+$/g,"");
|
||||||
if (str) {
|
if (str) {
|
||||||
this.getRegionCode(str);
|
this.getRegionCode(str);
|
||||||
this.shipperName = qs?.label;
|
this.shipperName = qs?.label;
|
||||||
|
|||||||
@ -150,10 +150,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
// serverSearch: true,
|
// serverSearch: true,
|
||||||
|
allowClear: true,
|
||||||
searchDebounceTime: 300,
|
searchDebounceTime: 300,
|
||||||
searchLoadingText: '搜索中...',
|
searchLoadingText: '搜索中...',
|
||||||
onSearch: (q: any) => {
|
onSearch: (q: any) => {
|
||||||
let str = q.replace(/^\s+|\s+$/g, '');
|
let str = q?.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
return this.service
|
return this.service
|
||||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||||
@ -164,7 +165,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
change: (q: any, qs: any) => {
|
change: (q: any, qs: any) => {
|
||||||
let str = q.replace(/^\s+|\s+$/g, '');
|
let str = q?.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
this.getRegionCode(str);
|
this.getRegionCode(str);
|
||||||
this.shipperName = qs?.label;
|
this.shipperName = qs?.label;
|
||||||
@ -407,7 +408,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
params: { dictKey: 'insure:packaged:goods' },
|
params: { dictKey: 'insure:packaged:goods' },
|
||||||
containsAllLabel: false,
|
containsAllLabel: false,
|
||||||
validator: val => {
|
validator: val => {
|
||||||
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) {
|
if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !=='3' && this.isEmpty(val)) {
|
||||||
return [{ keyword: 'required', message: '必填项' }];
|
return [{ keyword: 'required', message: '必填项' }];
|
||||||
} else {
|
} else {
|
||||||
return [];
|
return [];
|
||||||
@ -421,7 +422,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom',
|
||||||
validator: val => {
|
validator: val => {
|
||||||
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) {
|
if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !=='3' && this.isEmpty(val)) {
|
||||||
return [{ keyword: 'required', message: '必填项' }];
|
return [{ keyword: 'required', message: '必填项' }];
|
||||||
} else {
|
} else {
|
||||||
return [];
|
return [];
|
||||||
@ -768,20 +769,20 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
// 货物核载信息最大值
|
// 货物核载信息最大值
|
||||||
// 货物运输费(小计)最大值
|
// 货物运输费(小计)最大值
|
||||||
const getlimitvaluesParms = [
|
const getlimitvaluesParms = [
|
||||||
this.service.limitKeys.weight,
|
this.service?.limitKeys?.weight,
|
||||||
this.service.limitKeys.volume,
|
this.service?.limitKeys?.volume,
|
||||||
this.service.limitKeys.piece,
|
this.service?.limitKeys?.piece,
|
||||||
this.service.limitKeys.maxDays,
|
this.service?.limitKeys?.maxDays,
|
||||||
this.service.limitKeys.intervalDays,
|
this.service?.limitKeys?.intervalDays,
|
||||||
this.service.limitKeys.maxTimes
|
this.service?.limitKeys?.maxTimes
|
||||||
];
|
];
|
||||||
this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe(res => {
|
this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe(res => {
|
||||||
const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys.weight)[0].itemValue;
|
const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys?.weight)[0].itemValue;
|
||||||
const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys.volume)[0].itemValue;
|
const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys?.volume)[0].itemValue;
|
||||||
const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys.piece)[0].itemValue;
|
const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys?.piece)[0].itemValue;
|
||||||
const maxDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxDays)[0].itemValue;
|
const maxDays = res.filter((item: any) => item.itemKey === this.service.limitKeys?.maxDays)[0].itemValue;
|
||||||
const intervalDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.intervalDays)[0].itemValue;
|
const intervalDays = res.filter((item: any) => item.itemKey === this.service.limitKeys?.intervalDays)[0].itemValue;
|
||||||
const maxTimes = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxTimes)[0].itemValue;
|
const maxTimes = res.filter((item: any) => item.itemKey === this.service.limitKeys?.maxTimes)[0].itemValue;
|
||||||
this.limitValues = {
|
this.limitValues = {
|
||||||
maxWeight: Number(maxWeight),
|
maxWeight: Number(maxWeight),
|
||||||
maxVolume: Number(maxVolume),
|
maxVolume: Number(maxVolume),
|
||||||
@ -894,7 +895,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
this.sf5.validator({ emitError: true });
|
this.sf5.validator({ emitError: true });
|
||||||
this.sf6.validator({ emitError: true });
|
this.sf6.validator({ emitError: true });
|
||||||
this.sf7.validator({ emitError: true });
|
this.sf7.validator({ emitError: true });
|
||||||
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) {
|
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) {
|
||||||
this.service.msgSrv.warning('请完善必填项!');
|
this.service.msgSrv.warning('请完善必填项!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -912,16 +913,16 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
const num = (Number(this.validateForm1.value.unloadingTime) - Number(this.validateForm1.value.loadingTime)) / (24 * 60 * 60 * 1000);
|
const num = (Number(this.validateForm1.value.unloadingTime) - Number(this.validateForm1.value.loadingTime)) / (24 * 60 * 60 * 1000);
|
||||||
if (num > this.limitValues.maxDays) {
|
if (num > this.limitValues.maxDays) {
|
||||||
this.service.msgSrv.error(`当前计划装卸货时间间隔已超出限定值【${this.limitValues.maxDays}天】`);
|
this.service.msgSrv.error(`当前计划装卸货时间间隔已超出限定值【${this.limitValues?.maxDays}天】`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.sf4.value.weight > this.limitValues.maxWeight ||
|
this.sf4.value?.weight > this.limitValues?.maxWeight ||
|
||||||
this.sf4.value.volume > this.limitValues.maxVolume ||
|
this.sf4.value?.volume > this.limitValues?.maxVolume ||
|
||||||
this.sf4.value.number > this.limitValues.maxPiece
|
this.sf4.value?.number > this.limitValues?.maxPiece
|
||||||
) {
|
) {
|
||||||
this.service.msgSrv.error(
|
this.service.msgSrv.error(
|
||||||
`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxPiece}件】`
|
`当前货物核载信息已超出限定值【${this.limitValues?.maxWeight}吨、${this.limitValues?.maxVolume}方、${this.limitValues?.maxPiece}件】`
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1235,8 +1236,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
this.validateForm1.patchValue(
|
this.validateForm1.patchValue(
|
||||||
{
|
{
|
||||||
loadingTime: new Date(Date.parse(res.loadingTime.replace(/-/g, '/'))),
|
loadingTime: new Date(Date.parse(res?.loadingTime.replace(/-/g, '/'))),
|
||||||
unloadingTime: new Date(Date.parse(res.unloadingTime.replace(/-/g, '/')))
|
unloadingTime: new Date(Date.parse(res?.unloadingTime.replace(/-/g, '/')))
|
||||||
},
|
},
|
||||||
{ onlySelf: true }
|
{ onlySelf: true }
|
||||||
);
|
);
|
||||||
@ -1383,7 +1384,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
// 计算保价费金额
|
// 计算保价费金额
|
||||||
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
|
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
|
||||||
if ( this.sf5.value.insuranceType !=='3' && this.sf4.value.goodsValue >= 50000 && this.totalDistance > 0 ) {
|
console.log(this.totalDistance)
|
||||||
|
if ( insuranceType !=='3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0 ) {
|
||||||
const params = {
|
const params = {
|
||||||
insuranceType,
|
insuranceType,
|
||||||
goodsValue: this.sf4.value.goodsValue,
|
goodsValue: this.sf4.value.goodsValue,
|
||||||
|
|||||||
@ -142,12 +142,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
serverSearch: true,
|
allowClear: true,
|
||||||
searchDebounceTime: 300,
|
searchDebounceTime: 300,
|
||||||
searchLoadingText: '搜索中...',
|
searchLoadingText: '搜索中...',
|
||||||
onSearch: (q: any) => {
|
onSearch: (q: any) => {
|
||||||
console.log(q === ' ');
|
console.log(q === ' ');
|
||||||
let str = q.replace(/^\s+|\s+$/g, '');
|
let str = q?.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
return this.service
|
return this.service
|
||||||
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
.request(this.service.$api_enterpriceList, { enterpriseName: str })
|
||||||
@ -158,7 +158,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
change: (q: any, qs: any) => {
|
change: (q: any, qs: any) => {
|
||||||
let str = q.replace(/^\s+|\s+$/g, '');
|
let str = q?.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
this.getRegionCode(str);
|
this.getRegionCode(str);
|
||||||
this.shipperName = qs?.label;
|
this.shipperName = qs?.label;
|
||||||
@ -390,7 +390,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
params: { dictKey: 'insure:packaged:goods' },
|
params: { dictKey: 'insure:packaged:goods' },
|
||||||
containsAllLabel: false,
|
containsAllLabel: false,
|
||||||
validator: val => {
|
validator: val => {
|
||||||
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) {
|
if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !=='3' && this.isEmpty(val)) {
|
||||||
return [{ keyword: 'required', message: '必填项' }];
|
return [{ keyword: 'required', message: '必填项' }];
|
||||||
} else {
|
} else {
|
||||||
return [];
|
return [];
|
||||||
@ -404,7 +404,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom',
|
||||||
validator: val => {
|
validator: val => {
|
||||||
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) {
|
if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !=='3' && this.isEmpty(val)) {
|
||||||
return [{ keyword: 'required', message: '必填项' }];
|
return [{ keyword: 'required', message: '必填项' }];
|
||||||
} else {
|
} else {
|
||||||
return [];
|
return [];
|
||||||
@ -443,6 +443,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
this.sf5.setValue('/insurancePremium', null);
|
this.sf5.setValue('/insurancePremium', null);
|
||||||
this.sf5.setValue('/insuranceRate', null);
|
this.sf5.setValue('/insuranceRate', null);
|
||||||
}else {
|
}else {
|
||||||
|
console.log(tag)
|
||||||
this.getInsurersPrice(tag);
|
this.getInsurersPrice(tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -662,20 +663,20 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
// 货物核载信息最大值
|
// 货物核载信息最大值
|
||||||
// 货物运输费(小计)最大值
|
// 货物运输费(小计)最大值
|
||||||
const getlimitvaluesParms = [
|
const getlimitvaluesParms = [
|
||||||
this.service.limitKeys.weight,
|
this.service.limitKeys?.weight,
|
||||||
this.service.limitKeys.volume,
|
this.service.limitKeys?.volume,
|
||||||
this.service.limitKeys.piece,
|
this.service.limitKeys?.piece,
|
||||||
this.service.limitKeys.maxDays,
|
this.service.limitKeys?.maxDays,
|
||||||
this.service.limitKeys.intervalDays,
|
this.service.limitKeys?.intervalDays,
|
||||||
this.service.limitKeys.maxTimes
|
this.service.limitKeys?.maxTimes
|
||||||
];
|
];
|
||||||
this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe(res => {
|
this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe(res => {
|
||||||
const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys.weight)[0].itemValue;
|
const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys?.weight)[0].itemValue;
|
||||||
const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys.volume)[0].itemValue;
|
const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys?.volume)[0].itemValue;
|
||||||
const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys.piece)[0].itemValue;
|
const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys?.piece)[0].itemValue;
|
||||||
const maxDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxDays)[0].itemValue;
|
const maxDays = res.filter((item: any) => item.itemKey === this.service.limitKeys?.maxDays)[0].itemValue;
|
||||||
const intervalDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.intervalDays)[0].itemValue;
|
const intervalDays = res.filter((item: any) => item.itemKey === this.service?.limitKeys?.intervalDays)[0].itemValue;
|
||||||
const maxTimes = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxTimes)[0].itemValue;
|
const maxTimes = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxTimes)[0]?.itemValue;
|
||||||
this.limitValues = {
|
this.limitValues = {
|
||||||
maxWeight: Number(maxWeight),
|
maxWeight: Number(maxWeight),
|
||||||
maxVolume: Number(maxVolume),
|
maxVolume: Number(maxVolume),
|
||||||
@ -844,12 +845,15 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
this.validateForm1.controls[key].markAsDirty();
|
this.validateForm1.controls[key].markAsDirty();
|
||||||
this.validateForm1.controls[key].updateValueAndValidity();
|
this.validateForm1.controls[key].updateValueAndValidity();
|
||||||
});
|
});
|
||||||
|
this.sf1.validator({ emitError: true });
|
||||||
this.sf3.validator({ emitError: true });
|
this.sf3.validator({ emitError: true });
|
||||||
this.sf4.validator({ emitError: true });
|
this.sf4.validator({ emitError: true });
|
||||||
this.sf5.validator({ emitError: true });
|
this.sf5.validator({ emitError: true });
|
||||||
this.sf6.validator({ emitError: true });
|
this.sf6.validator({ emitError: true });
|
||||||
this.sf7.validator({ emitError: true });
|
this.sf7.validator({ emitError: true });
|
||||||
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) {
|
console.log(!this.sf1.valid)
|
||||||
|
console.log(this.sf1.value)
|
||||||
|
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) {
|
||||||
this.service.msgSrv.warning('请完善必填项!');
|
this.service.msgSrv.warning('请完善必填项!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -871,22 +875,22 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.sf4.value.weight > this.limitValues.maxWeight ||
|
this.sf4.value?.weight > this.limitValues?.maxWeight ||
|
||||||
this.sf4.value.volume > this.limitValues.maxVolume ||
|
this.sf4.value?.volume > this.limitValues?.maxVolume ||
|
||||||
this.sf4.value.number > this.limitValues.maxPiece
|
this.sf4.value?.number > this.limitValues?.maxPiece
|
||||||
) {
|
) {
|
||||||
this.service.msgSrv.error(
|
this.service.msgSrv.error(
|
||||||
`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxPiece}件】`
|
`当前货物核载信息已超出限定值【${this.limitValues?.maxWeight}吨、${this.limitValues?.maxVolume}方、${this.limitValues?.maxPiece}件】`
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const getFreightParms = { carLengthKeys: this.sf4.value.carLength, km: this.totalDistance };
|
const getFreightParms = { carLengthKeys: this.sf4.value.carLength, km: this.totalDistance };
|
||||||
this.service.request(this.service.$api_getFreight, getFreightParms).subscribe(res => {
|
this.service.request(this.service.$api_getFreight, getFreightParms).subscribe(res => {
|
||||||
if (this.sf7.value.subtotal > res.maxPrice) {
|
if (this.sf7.value?.subtotal > res?.maxPrice) {
|
||||||
this.service.msgSrv.error(`运费过高,请调整录入`);
|
this.service.msgSrv.error(`运费过高,请调整录入`);
|
||||||
return;
|
return;
|
||||||
} else if (this.sf7.value.subtotal > res.ewPrice) {
|
} else if (this.sf7.value?.subtotal > res?.ewPrice) {
|
||||||
this.modalService.confirm({
|
this.modalService.confirm({
|
||||||
nzTitle: '',
|
nzTitle: '',
|
||||||
nzContent: `您的录入的运费过高,可能会影响支付,请仔细确认`,
|
nzContent: `您的录入的运费过高,可能会影响支付,请仔细确认`,
|
||||||
@ -1007,11 +1011,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// 计算里程,时间
|
||||||
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.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||||
this.totalDistance = res.distance;
|
this.totalDistance = res.distance;
|
||||||
this.totalTime = res.time;
|
this.totalTime = res.time;
|
||||||
|
this.getInsurersPrice(); // 计算保费金额
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1077,6 +1082,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// 计算里程,时间
|
||||||
|
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;
|
||||||
|
this.getInsurersPrice(); //计算保费金额
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1110,8 +1123,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
if (res) {
|
if (res) {
|
||||||
this.sf3.getProperty('/goodsNameId')!.schema.enum = res;
|
this.sf3.getProperty('/goodsNameId')!.schema.enum = res;
|
||||||
this.sf3.getProperty('/goodsNameId')!.widget.reset(res);
|
this.sf3.getProperty('/goodsNameId')!.widget.reset(res);
|
||||||
if (this.sf3data.goodsNameId) {
|
if (this.sf3data?.goodsNameId) {
|
||||||
this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId);
|
this.sf3.setValue('/goodsNameId', this.sf3data?.goodsNameId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.service.msgSrv.error(res.msg);
|
this.service.msgSrv.error(res.msg);
|
||||||
@ -1161,8 +1174,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 计算保价费金额
|
// 计算保价费金额
|
||||||
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
|
getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) {
|
||||||
if ( this.sf5.value.insuranceType !=='3' && this.sf4.value.goodsValue >= 50000 && this.totalDistance > 0 ) {
|
console.log(insuranceType)
|
||||||
|
console.log(this.totalDistance)
|
||||||
|
if ( insuranceType !=='3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0 ) {
|
||||||
const params = {
|
const params = {
|
||||||
insuranceType,
|
insuranceType,
|
||||||
goodsValue: this.sf4.value.goodsValue,
|
goodsValue: this.sf4.value.goodsValue,
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-02-24 20:19:51
|
* @Date : 2022-02-24 20:19:51
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-04 16:46:31
|
* @LastEditTime : 2022-03-08 14:05:09
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -62,30 +62,30 @@ export class TranAgreementComponent {
|
|||||||
templateType: 'MX',
|
templateType: 'MX',
|
||||||
parametersDTO: {
|
parametersDTO: {
|
||||||
contractCode:'',
|
contractCode:'',
|
||||||
shipperLegalPersonName:this.enterpriseInfo.legalPersonName, //托运法定代表人
|
shipperLegalPersonName:this.enterpriseInfo.legalPersonName || '', //托运法定代表人
|
||||||
carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName, //承运法定代表人
|
carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName || '', //承运法定代表人
|
||||||
shipperName:this?.shipperName, //托运人
|
shipperName:this?.shipperName || '', //托运人
|
||||||
carrierName:this.object?.enterpriseInfoName, //承运人
|
carrierName:this.object?.enterpriseInfoName || '', //承运人
|
||||||
consignorInfo: `${this.object?.unLoadingPlaceDTOList[0].appUserName} ${this.object?.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息
|
consignorInfo: `${this.object?.unLoadingPlaceDTOList[0].appUserName} ${this.object?.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息
|
||||||
consignorAddress: this.object?.unLoadingPlaceDTOList[0].detailedAddress, // 发货地址
|
consignorAddress: this.object?.unLoadingPlaceDTOList[0].detailedAddress, // 发货地址
|
||||||
consignorDate: this.object?.loadingTime, // 发货时间
|
consignorDate: this.object?.loadingTime || '', // 发货时间
|
||||||
consigneeInfo: `${this.object?.unLoadingPlaceDTOList[this.object?.unLoadingPlaceDTOList.length-1].appUserName} ${this.object?.unLoadingPlaceDTOList[this.object?.unLoadingPlaceDTOList.length-1].contractTelephone}`, // 收货信息
|
consigneeInfo: `${this.object?.unLoadingPlaceDTOList[this.object?.unLoadingPlaceDTOList.length-1].appUserName} ${this.object?.unLoadingPlaceDTOList[this.object?.unLoadingPlaceDTOList.length-1].contractTelephone}`, // 收货信息
|
||||||
consigneeDate: this.object?.unloadingTime, // 收货时间
|
consigneeDate: this.object?.unloadingTime || '', // 收货时间
|
||||||
consigneeAddress: this.object?.unLoadingPlaceDTOList[this.object?.unLoadingPlaceDTOList.length-1].detailedAddress, // 收货地址
|
consigneeAddress: this.object?.unLoadingPlaceDTOList[this.object?.unLoadingPlaceDTOList.length-1].detailedAddress || '', // 收货地址
|
||||||
goodsName:this.object?.goodsInfoDTOList[0].goodsName, // 货物名称
|
goodsName:this.object?.goodsInfoDTOList[0].goodsName || '', // 货物名称
|
||||||
shippingType:'整车运输',
|
shippingType:'整车运输',
|
||||||
consignmentVolume:`${this.object?.goodsInfoDTOList[0].weight}吨/${this.object?.goodsInfoDTOList[0].volume}方/${this.object?.goodsInfoDTOList[0].number}件`, //托运量
|
consignmentVolume:`${this.object?.goodsInfoDTOList[0].weight}吨/${this.object?.goodsInfoDTOList[0].volume}方/${this.object?.goodsInfoDTOList[0].number}件`, //托运量
|
||||||
transporterInfo:'', //运输方信息
|
transporterInfo:'', //运输方信息
|
||||||
freightAmount:this.object?.total, // 订单运费金额(元)
|
freightAmount:this.object?.total || '', // 订单运费金额(元)
|
||||||
pre:this.object?.expenseDTOList?.filter((item:any) => item.expenseCode === 'PRE')[0].price, //预付
|
pre:this.object?.expenseDTOList?.filter((item:any) => item.expenseCode === 'PRE')[0].price, //预付
|
||||||
rece:this.object?.expenseDTOList?.filter((item:any) => item.expenseCode === 'RECE')[0].price,// 到付
|
rece:this.object?.expenseDTOList?.filter((item:any) => item.expenseCode === 'RECE')[0].price,// 到付
|
||||||
back:this.object?.expenseDTOList?.filter((item:any) => item.expenseCode === 'BACK')[0].price,// 回单付
|
back:this.object?.expenseDTOList?.filter((item:any) => item.expenseCode === 'BACK')[0].price,// 回单付
|
||||||
lunarKnot:0,
|
lunarKnot:0,
|
||||||
total:this.object?.subtotal, // 合计(元)
|
total:this.object?.subtotal || '', // 合计(元)
|
||||||
paymentTime:`到货后${this.object?.paymentDays}天`, // 承诺支付运费时间
|
paymentTime:`到货后${this.object?.paymentDays}天`, // 承诺支付运费时间
|
||||||
year:new Date().getFullYear(), // 签约年份
|
year:new Date().getFullYear() || '', // 签约年份
|
||||||
month:new Date().getMonth()+1, // 签约月份
|
month:new Date().getMonth()+1 || '', // 签约月份
|
||||||
day:new Date().getDate(), // 签约日期
|
day:new Date().getDate() || '', // 签约日期
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(this.type ==='bulk'){
|
} else if(this.type ==='bulk'){
|
||||||
@ -96,17 +96,17 @@ export class TranAgreementComponent {
|
|||||||
templateType: 'MX',
|
templateType: 'MX',
|
||||||
parametersDTO: {
|
parametersDTO: {
|
||||||
contractCode:'',
|
contractCode:'',
|
||||||
shipperName:this?.shipperName, //托运人
|
shipperName:this?.shipperName || '', //托运人
|
||||||
carrierName:this.object?.enterpriseInfoName, //承运人
|
carrierName:this.object?.enterpriseInfoName || '', //承运人
|
||||||
shipperLegalPersonName:this.enterpriseInfo.legalPersonName, //托运法定代表人
|
shipperLegalPersonName:this.enterpriseInfo.legalPersonName || '', //托运法定代表人
|
||||||
carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName, //承运法定代表人
|
carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName || '', //承运法定代表人
|
||||||
consignorInfo: `${this.object.unLoadingPlaceDTOList[0].appUserName} ${this.object.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息
|
consignorInfo: `${this.object.unLoadingPlaceDTOList[0].appUserName} ${this.object.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息
|
||||||
consignorAddress: this.object.unLoadingPlaceDTOList[0].detailedAddress, // 发货地址
|
consignorAddress: this.object.unLoadingPlaceDTOList[0].detailedAddress, // 发货地址
|
||||||
consignorDate: '', // 发货时间
|
consignorDate: '', // 发货时间
|
||||||
consigneeInfo: `${this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].appUserName} ${this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].contractTelephone}`, // 收货信息
|
consigneeInfo: `${this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].appUserName} ${this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].contractTelephone}`, // 收货信息
|
||||||
consigneeDate: '', // 收货时间
|
consigneeDate: '', // 收货时间
|
||||||
consigneeAddress: this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].detailedAddress, // 收货地址
|
consigneeAddress: this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].detailedAddress, // 收货地址
|
||||||
goodsName:this.object.goodsInfoDTOList[0].goodsName, // 货物名称
|
goodsName:this.object.goodsInfoDTOList[0]?.goodsName || '', // 货物名称
|
||||||
shippingType:'大宗运输',
|
shippingType:'大宗运输',
|
||||||
consignmentVolume:`${this.object.goodsInfoDTOList[0].weight}吨/${this.object.goodsInfoDTOList[0].volume}方/${this.object.goodsInfoDTOList[0].number}车`, //托运量
|
consignmentVolume:`${this.object.goodsInfoDTOList[0].weight}吨/${this.object.goodsInfoDTOList[0].volume}方/${this.object.goodsInfoDTOList[0].number}车`, //托运量
|
||||||
transporterInfo:'', //运输方信息
|
transporterInfo:'', //运输方信息
|
||||||
@ -117,9 +117,9 @@ export class TranAgreementComponent {
|
|||||||
lunarKnot:'',
|
lunarKnot:'',
|
||||||
total:'', // 合计(元)
|
total:'', // 合计(元)
|
||||||
paymentTime:`到货后${this.object.paymentDays}天`, // 承诺支付运费时间
|
paymentTime:`到货后${this.object.paymentDays}天`, // 承诺支付运费时间
|
||||||
year:new Date().getFullYear(), // 签约年份
|
year:new Date().getFullYear() || '', // 签约年份
|
||||||
month:new Date().getMonth()+1, // 签约月份
|
month:new Date().getMonth()+1 || '', // 签约月份
|
||||||
day:new Date().getDate(), // 签约日期
|
day:new Date().getDate() || '', // 签约日期
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -156,13 +156,15 @@
|
|||||||
|
|
||||||
<nz-card nzTitle="服务信息">
|
<nz-card nzTitle="服务信息">
|
||||||
<sv-container>
|
<sv-container>
|
||||||
<sv label="增值服务套餐">
|
<sv label="服务包">
|
||||||
{{ i?.insuranceTypeLabel }}
|
{{ i?.insuranceTypeLabel}}
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="货物价值" *ngIf="i?.insuranceType !== '3'">
|
<sv label="货物价值">
|
||||||
{{ i?.goodsValue | currency }}
|
{{i?.goodsValue !==null?(i?.goodsValue|currency)+'元':'-'}}
|
||||||
|
</sv>
|
||||||
|
<sv label="保价费金额">
|
||||||
|
{{i?.insurancePremium!==null?(i?.insurancePremium |currency)+'元':'-'}}
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="保价费金额" *ngIf="i?.insuranceType !== '3'"> {{ i?.insurancePremium | currency }} 元 </sv>
|
|
||||||
</sv-container>
|
</sv-container>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-card [nzTitle]="'运费信息(到货后' + i?.paymentDays + '天内支付运费)'">
|
<nz-card [nzTitle]="'运费信息(到货后' + i?.paymentDays + '天内支付运费)'">
|
||||||
|
|||||||
@ -606,7 +606,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
text: '修改货源',
|
text: '修改货源',
|
||||||
click: _record => this.amend(_record),
|
click: _record => this.amend(_record),
|
||||||
iif: item => item.resourceStatus === '1',
|
iif: item => item.resourceStatus === '1' ,
|
||||||
acl: { ability: ['SUPPLY-INDEX-vehicleModificationSupply'] }
|
acl: { ability: ['SUPPLY-INDEX-vehicleModificationSupply'] }
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
|||||||
@ -125,10 +125,13 @@ export class NetworkFreightComponent implements OnInit {
|
|||||||
text: '应用设置',
|
text: '应用设置',
|
||||||
click: item => this.settingApp(item)
|
click: item => this.settingApp(item)
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
text: '系统配置',
|
text: '系统配置',
|
||||||
click: item => this.settingAction(item)
|
click: item => this.settingAction(item)
|
||||||
}
|
},
|
||||||
|
{ type: 'divider' },
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// text: '合同设置',
|
// text: '合同设置',
|
||||||
// click: item => this.roleAction(item, 2)
|
// click: item => this.roleAction(item, 2)
|
||||||
@ -327,7 +330,7 @@ export class NetworkFreightComponent implements OnInit {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
this.ui3 = {
|
this.ui3 = {
|
||||||
'*': { spanLabelFixed: 120, grid: { span: 24 } },
|
'*': { spanLabelFixed: 150, grid: { span: 24 } },
|
||||||
'$taxClassificationVersion': { spanLabelFixed: 150, grid: { span: 24 } },
|
'$taxClassificationVersion': { spanLabelFixed: 150, grid: { span: 24 } },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -209,7 +209,7 @@
|
|||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div nz-col [nzSpan]="12">
|
<div nz-col [nzSpan]="12">
|
||||||
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||||
</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"></amap-path-simplifier>
|
||||||
|
|||||||
@ -259,11 +259,22 @@ tabs = {
|
|||||||
width: '220px',
|
width: '220px',
|
||||||
index: 'dischargePlace'
|
index: 'dischargePlace'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
|
// title: '货物信息',
|
||||||
|
// className: 'text-left',
|
||||||
|
// width: '250px',
|
||||||
|
// render: 'goodsInfos'
|
||||||
|
// },
|
||||||
|
{
|
||||||
title: '货物信息',
|
title: '货物信息',
|
||||||
|
index: 'goodsInfos',
|
||||||
|
width: '180px',
|
||||||
className: 'text-left',
|
className: 'text-left',
|
||||||
width: '250px',
|
format: (item: any) =>
|
||||||
render: 'goodsInfos'
|
`${item.goodsName}/
|
||||||
|
${item.goodsWeight || '0'}吨/
|
||||||
|
${item.goodsVolume || '0'}方/
|
||||||
|
${item.goodsNumber || '0'}件`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '运费单价',
|
title: '运费单价',
|
||||||
@ -277,8 +288,8 @@ tabs = {
|
|||||||
width: '170px',
|
width: '170px',
|
||||||
className: 'text-left',
|
className: 'text-left',
|
||||||
format: (item: any) =>
|
format: (item: any) =>
|
||||||
`${item.acceptWeight || '--'}吨/
|
`${item.acceptWeight || '0'}吨/
|
||||||
${item.acceptVolume || '--'}方`
|
${item.acceptVolume || '0'}方`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '结算数量',
|
title: '结算数量',
|
||||||
@ -286,8 +297,8 @@ tabs = {
|
|||||||
width: '170px',
|
width: '170px',
|
||||||
className: 'text-left',
|
className: 'text-left',
|
||||||
format: (item: any) =>
|
format: (item: any) =>
|
||||||
`${item.settlementWeight || '--'}吨/
|
`${item.settlementWeight || '0'}吨/
|
||||||
${item.settlementVolume || '--'}方`
|
${item.settlementVolume || '0'}方`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '承运司机',
|
title: '承运司机',
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { WaybillManagementBulkComponent } from './../components/bulk/bulk.compon
|
|||||||
/*
|
/*
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-12-07 14:52:29
|
* @Date: 2021-12-07 14:52:29
|
||||||
* @LastEditTime : 2022-03-02 16:22:23
|
* @LastEditTime : 2022-03-08 14:51:11
|
||||||
* @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\\waybill-management\\services\\waybill-management.service.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\services\\waybill-management.service.ts
|
||||||
@ -15,50 +15,51 @@ import { BaseService } from 'src/app/shared/services';
|
|||||||
})
|
})
|
||||||
export class WaybillManagementServe extends BaseService {
|
export class WaybillManagementServe extends BaseService {
|
||||||
$api_get_enterprise_project = `/api/mdc/cuc/enterpriseProject/getEnterpriseProjectList `; // 所属项目列表
|
$api_get_enterprise_project = `/api/mdc/cuc/enterpriseProject/getEnterpriseProjectList `; // 所属项目列表
|
||||||
// 据 手机号/姓名 查询 车队长/司机
|
// 据 手机号/姓名 查询 车队长/司机
|
||||||
$api_get_getDriverInfo = `/api/mdc/cuc/user/getDriverInfo`;
|
$api_get_getDriverInfo = `/api/mdc/cuc/user/getDriverInfo`;
|
||||||
// 查询整车运单-运营后台
|
// 查询整车运单-运营后台
|
||||||
$api_get_wholePage = `/api/sdc/wayBillOperate/listWholePage`;
|
$api_get_wholePage = `/api/sdc/wayBillOperate/listWholePage`;
|
||||||
// 查询整车运单详情-运营后台
|
// 查询整车运单详情-运营后台
|
||||||
$api_get_getWholeDetail = `/api/sdc/wayBillOperate/getWholeDetail`;
|
$api_get_getWholeDetail = `/api/sdc/wayBillOperate/getWholeDetail`;
|
||||||
|
|
||||||
// 查询大宗运单-运营后台
|
// 查询大宗运单-运营后台
|
||||||
$api_get_Bulkpage = `/api/sdc/wayBillOperate/listBulkPage`;
|
$api_get_Bulkpage = `/api/sdc/wayBillOperate/listBulkPage`;
|
||||||
// 查询大宗运单详情-运营后台
|
// 查询大宗运单详情-运营后台
|
||||||
$api_get_getBulkDetail = `/api/sdc/wayBillOperate/getBulkDetail`;
|
$api_get_getBulkDetail = `/api/sdc/wayBillOperate/getBulkDetail`;
|
||||||
|
|
||||||
// 整车运单分类统计
|
// 整车运单分类统计
|
||||||
$api_get_getWholeStatistics = `/api/sdc/wayBillOperate/getWholeStatistics`;
|
$api_get_getWholeStatistics = `/api/sdc/wayBillOperate/getWholeStatistics`;
|
||||||
// 大宗运单分类统计
|
// 大宗运单分类统计
|
||||||
$api_get_getBulkStatistics = `/api/sdc/wayBillOperate/getBulkStatistics`;
|
$api_get_getBulkStatistics = `/api/sdc/wayBillOperate/getBulkStatistics`;
|
||||||
|
|
||||||
// 根据车牌号查询车辆信息
|
// 根据车牌号查询车辆信息
|
||||||
$api_get_getCarLicenseListByCarNo= `/api/mdc/cuc/carLicense/findCarLicenseByCarNo`;
|
$api_get_getCarLicenseListByCarNo = `/api/mdc/cuc/carLicense/findCarLicenseByCarNo`;
|
||||||
|
|
||||||
// 大宗确认发车
|
// 大宗确认发车
|
||||||
$api_get_insertBulkStartCarInfo= `/api/sdc/wayBillOperate/insertBulkStartCarInfo`;
|
$api_get_insertBulkStartCarInfo = `/api/sdc/wayBillOperate/insertBulkStartCarInfo`;
|
||||||
// 整车确认发车
|
// 整车确认发车
|
||||||
$api_get_insertWholeStartCarInfo= `/api/sdc/wayBillOperate/insertWholeStartCarInfo`;
|
$api_get_insertWholeStartCarInfo = `/api/sdc/wayBillOperate/insertWholeStartCarInfo`;
|
||||||
// 整车确认到车
|
// 整车确认到车
|
||||||
$api_get_insertWholeUnloadCarInfo = `/api/sdc/wayBillOperate/insertWholeUnloadCarInfo`;
|
$api_get_insertWholeUnloadCarInfo = `/api/sdc/wayBillOperate/insertWholeUnloadCarInfo`;
|
||||||
// 大宗确认到车
|
// 大宗确认到车
|
||||||
$api_get_insertBulkUnloadCarInfo = `/api/sdc/wayBillOperate/insertBulkUnloadCarInfo`;
|
$api_get_insertBulkUnloadCarInfo = `/api/sdc/wayBillOperate/insertBulkUnloadCarInfo`;
|
||||||
// 确认到车界面信息(两个只能看的图片)
|
// 确认到车界面信息(两个只能看的图片)
|
||||||
$api_get_getUnloadCarInfo = `/api/sdc/wayBillOperate/getUnloadCarInfo`;
|
$api_get_getUnloadCarInfo = `/api/sdc/wayBillOperate/getUnloadCarInfo`;
|
||||||
|
|
||||||
|
// 查询CRM客户信息表
|
||||||
// 查询CRM客户信息表
|
|
||||||
$api_get_crmCustomer_page = '/api/mdc/cuc/crmCustomer/list/page';
|
$api_get_crmCustomer_page = '/api/mdc/cuc/crmCustomer/list/page';
|
||||||
|
|
||||||
// 查询运营端未回复异常上报
|
// 查询运营端未回复异常上报
|
||||||
$api_get_listOperatePage = '/api/sdc/exceptionReport/listOperateUnReplyPage';
|
$api_get_listOperatePage = '/api/sdc/exceptionReport/listOperateUnReplyPage';
|
||||||
// 查询运营端已回复异常上报
|
// 查询运营端已回复异常上报
|
||||||
$api_get_listOperateReplyPage = '/api/sdc/exceptionReport/listOperateReplyPage';
|
$api_get_listOperateReplyPage = '/api/sdc/exceptionReport/listOperateReplyPage';
|
||||||
// 获取轨迹
|
// 获取轨迹
|
||||||
$api_get_getTrajectory = `/api/sdc/billShipper/getTrajectoryByBillId`;
|
$api_get_getTrajectory = `/api/sdc/billShipper/getTrajectoryByBillId`;
|
||||||
// 获取货主企业列表
|
// 获取订单司机轨迹
|
||||||
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
|
$api_get_getAppDriverPosition = `/api/sdc/billShipper/getAppDriverPosition`;
|
||||||
|
// 获取货主企业列表
|
||||||
|
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
|
||||||
constructor(public injector: Injector) {
|
constructor(public injector: Injector) {
|
||||||
super(injector)
|
super(injector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,8 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
this.setData(changes.pathList?.currentValue);
|
this.setData(changes.pathList?.currentValue);
|
||||||
this.setPathIndex(this.selectedIndex);
|
this.setPathIndex(this.selectedIndex);
|
||||||
}
|
}
|
||||||
if (changes?.MapList?.currentValue && this?.pathSimplifierIns) {
|
if (changes?.MapList?.currentValue && this?.pathSimplifierIns && changes.MapList?.currentValue.length > 0) {
|
||||||
|
console.log(this.MapList);
|
||||||
this.pathList = [
|
this.pathList = [
|
||||||
{
|
{
|
||||||
name: '路线1',
|
name: '路线1',
|
||||||
@ -45,7 +46,6 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
];
|
];
|
||||||
this.setData(this.pathList);
|
this.setData(this.pathList);
|
||||||
this.setPathIndex(this.selectedIndex);
|
this.setPathIndex(this.selectedIndex);
|
||||||
console.log(this.MapList);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
@ -78,6 +78,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
this.aMap.on('complete', () => {
|
this.aMap.on('complete', () => {
|
||||||
// this.service.msgSrv.info('地图加载完成 !');
|
// this.service.msgSrv.info('地图加载完成 !');
|
||||||
this.pathInit();
|
this.pathInit();
|
||||||
|
// this.setPOIS();
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
@ -125,6 +126,130 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setPOIS() {
|
||||||
|
AMapUI.loadUI(['misc/MarkerList'], (MarkerList: any) => {
|
||||||
|
var markerList = new MarkerList({
|
||||||
|
//关联的map对象
|
||||||
|
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]
|
||||||
|
getPosition: (dataItem: any) => {
|
||||||
|
console.log(dataItem);
|
||||||
|
|
||||||
|
return dataItem.position;
|
||||||
|
},
|
||||||
|
//返回数据项对应的Marker
|
||||||
|
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
|
||||||
|
if (recycledMarker) {
|
||||||
|
//直接更新内容返回
|
||||||
|
recycledMarker.setLabel(label);
|
||||||
|
return recycledMarker;
|
||||||
|
}
|
||||||
|
|
||||||
|
//返回一个新的Marker
|
||||||
|
return new AMap.Marker({
|
||||||
|
label: label
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//返回数据项对应的infoWindow
|
||||||
|
getInfoWindow: (dataItem: any, context: any, recycledInfoWindow: any) => {
|
||||||
|
var tpl = '<p><%- dataItem.id %>:<%- dataItem.infoWinContent %><p>';
|
||||||
|
|
||||||
|
//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>';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//监听选中改变
|
||||||
|
markerList.on('selectedChanged', (event: any, info: any) => {
|
||||||
|
console.log(event, info);
|
||||||
|
});
|
||||||
|
|
||||||
|
//监听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);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
setData(pathList: Array<any>) {
|
setData(pathList: Array<any>) {
|
||||||
this.pathSimplifierIns.setData(pathList);
|
this.pathSimplifierIns.setData(pathList);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user