Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -202,17 +202,23 @@
|
||||
|
||||
<nz-card>
|
||||
<div nz-row>
|
||||
<nz-card nzTitle="轨迹信息" style="width: 100%" #distannce5>
|
||||
<nz-card nzTitle="轨迹信息" style="width: 100%" [nzExtra]="extraTemplate" #distannce5>
|
||||
<div nz-row>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<!-- <st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st> -->
|
||||
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<amap-path-simplifier></amap-path-simplifier>
|
||||
<amap-path-simplifier [MapList]="MapList"></amap-path-simplifier>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
<ng-template #extraTemplate>
|
||||
<nz-radio-group [(ngModel)]="trajectory">
|
||||
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
||||
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
||||
</nz-radio-group>
|
||||
</ng-template>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-06 20:20:26
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:18:24
|
||||
* @LastEditTime : 2022-02-22 10:16:11
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -17,14 +17,15 @@ import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { OrderManagementService } from '../../services/order-management.service';
|
||||
import { NzCardComponent } from 'ng-zorro-antd/card';
|
||||
import format from 'date-fns/format';
|
||||
|
||||
@Component({
|
||||
selector: 'app-supply-management-bulk-detail',
|
||||
templateUrl: './bulk-detail.component.html',
|
||||
styleUrls: ['./bulk-detail.component.less']
|
||||
})
|
||||
export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
|
||||
|
||||
MapList: any;
|
||||
id = this.route.snapshot.params.id;
|
||||
i: any;
|
||||
imges: any;
|
||||
@ -46,23 +47,23 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
'1': { text: '待申请', color: 'warning' },
|
||||
'2': { text: '已支付', color: 'success' },
|
||||
'3': { text: '已拒绝', color: 'warning' },
|
||||
'4': { text: '申请中', color: 'warning' },
|
||||
},
|
||||
},
|
||||
'4': { text: '申请中', color: 'warning' }
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
trajectory = 'car';
|
||||
addressItems: any[] = []; //打点地址数据组
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private msgSrv: NzMessageService,
|
||||
private service: OrderManagementService,
|
||||
private router: Router,
|
||||
private modal: NzModalService,
|
||||
) {
|
||||
|
||||
}
|
||||
private modal: NzModalService
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initData()
|
||||
this.initData();
|
||||
this.MapInit();
|
||||
}
|
||||
|
||||
initData() {
|
||||
@ -72,30 +73,29 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
this.attObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'ATT')[0];
|
||||
this.totalObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TOTAL')[0];
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
// 修改订单
|
||||
changeOrder() {
|
||||
this.router.navigate(['order-management/bulk-detailChange', this.id])
|
||||
this.router.navigate(['order-management/bulk-detailChange', this.id]);
|
||||
}
|
||||
agreement(value: any) {
|
||||
if (value === '1') {
|
||||
this.imges = this.i?.supplementAgreement
|
||||
this.imges = this.i?.supplementAgreement;
|
||||
} else if (value === '2') {
|
||||
this.imges = this.i?.supplementAgreement
|
||||
this.imges = this.i?.supplementAgreement;
|
||||
}
|
||||
this.isVisible = true;
|
||||
}
|
||||
handleCancel() {
|
||||
this.isVisible = false
|
||||
this.isVisible = false;
|
||||
}
|
||||
handleOK() {
|
||||
this.isVisible = false
|
||||
this.isVisible = false;
|
||||
}
|
||||
goDistance(elf: NzCardComponent) {
|
||||
if (elf) {
|
||||
@ -109,12 +109,37 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
nzTitle: '<b>确定取消该订单吗?</b>',
|
||||
nzContent: `<b>取消后无法恢复,请确认</b>`,
|
||||
nzOnOk: () =>
|
||||
this.service.request(this.service.$api_get_cancelAnOrder, {id: this.id}).subscribe((res) => {
|
||||
this.service.request(this.service.$api_get_cancelAnOrder, { id: this.id }).subscribe(res => {
|
||||
if (res === true) {
|
||||
this.service.msgSrv.success('操作成功!');
|
||||
this.initData();
|
||||
}
|
||||
}),
|
||||
})
|
||||
});
|
||||
}
|
||||
// 获取轨迹
|
||||
MapInit() {
|
||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
const points = res.trackArray;
|
||||
points?.forEach((item: any) => {
|
||||
this.MapList.push({
|
||||
name: item.hgt,
|
||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||
});
|
||||
});
|
||||
this.addressItems = res.parkArray;
|
||||
if (this.addressItems && this.addressItems.length > 0) {
|
||||
this.addressItems.forEach(item => {
|
||||
item.parkBte = this.getLocalTime(item.parkBte);
|
||||
item.parkEte = this.getLocalTime(item.parkEte);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getLocalTime(time: any) {
|
||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-28 14:42:03
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-16 15:42:18
|
||||
* @LastEditTime : 2022-02-22 10:10:59
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -199,17 +199,23 @@
|
||||
|
||||
<nz-card>
|
||||
<div nz-row>
|
||||
<nz-card nzTitle="轨迹信息" style="width: 100%" id="distannce5" #distannce5>
|
||||
<nz-card nzTitle="轨迹信息" style="width: 100%" id="distannce5" [nzExtra]="extraTemplate" #distannce5>
|
||||
<div nz-row>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<!-- <st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st> -->
|
||||
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<amap-path-simplifier [MapList]="MapList"></amap-path-simplifier>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
<ng-template #extraTemplate>
|
||||
<nz-radio-group [(ngModel)]="trajectory">
|
||||
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
||||
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
||||
</nz-radio-group>
|
||||
</ng-template>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-28 14:42:03
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-16 16:37:16
|
||||
* @LastEditTime : 2022-02-22 10:13:22
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -14,6 +14,7 @@ import { STColumn } from '@delon/abc/st';
|
||||
import { NzCardComponent } from 'ng-zorro-antd/card';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import format from 'date-fns/format';
|
||||
import { OrderManagementService } from '../../services/order-management.service';
|
||||
@Component({
|
||||
selector: 'app-supply-management-vehicle-detail',
|
||||
@ -54,6 +55,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
];
|
||||
trajectory = 'car';
|
||||
addressItems: any[] = []; //打点地址数据组
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
@ -126,20 +129,46 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
// elf['elementRef'].nativeElement.className = 'target-fix'
|
||||
}
|
||||
}
|
||||
// MapInit() {
|
||||
// this.service.request('/api/sdc/billShipper/getTrajectoryByBillId', { id: this.id }).subscribe(res => {
|
||||
// if (res?.trackArray) {
|
||||
// const points = res?.trackArray;
|
||||
// const 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))]
|
||||
// });
|
||||
// });
|
||||
// console.log(list);
|
||||
// this.MapList = list;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// 获取轨迹
|
||||
MapInit() {
|
||||
this.service.request('/api/sdc/billShipper/getTrajectoryByBillId', { id: this.id }).subscribe(res => {
|
||||
if (res?.trackArray) {
|
||||
const points = res?.trackArray;
|
||||
const 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.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
const points = res.trackArray;
|
||||
points?.forEach((item: any) => {
|
||||
this.MapList.push({
|
||||
name: item.hgt,
|
||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||
});
|
||||
});
|
||||
console.log(list);
|
||||
this.MapList = list;
|
||||
}
|
||||
this.addressItems = res.parkArray;
|
||||
if (this.addressItems && this.addressItems.length > 0) {
|
||||
this.addressItems.forEach(item => {
|
||||
item.parkBte = this.getLocalTime(item.parkBte);
|
||||
item.parkEte = this.getLocalTime(item.parkEte);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getLocalTime(time: any) {
|
||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-03 15:31:52
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-25 15:26:23
|
||||
* @LastEditTime : 2022-02-22 10:12:14
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -158,6 +158,8 @@ export class OrderManagementService extends ShipperBaseService {
|
||||
}
|
||||
// 获取数据字典
|
||||
$api_getDictValue = `/api/mdc/pbc/dictItems/getDictValue`;
|
||||
// 获取轨迹
|
||||
$api_get_getTrajectory = `/api/sdc/billShipper/getTrajectoryByBillId`;
|
||||
/**
|
||||
* 根据企业ID,获取企业历史网络货运人
|
||||
* @returns
|
||||
|
||||
@ -134,6 +134,9 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
|
||||
return of([]);
|
||||
}
|
||||
},
|
||||
change: (q: any) => {
|
||||
this.getRegionCode(q);
|
||||
},
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
@ -144,13 +147,11 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
allowClear: true,
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
asyncData: () =>
|
||||
this.shipperSrv.getEnterpriseProject()
|
||||
} as SFSelectWidgetSchema,
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
driverName: {
|
||||
title: '承运司机',
|
||||
@ -214,4 +215,25 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
}
|
||||
// 获取城市列表
|
||||
getRegionCode(regionCode: any) {
|
||||
console.log(regionCode);
|
||||
return this.service
|
||||
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||
.pipe(
|
||||
map(res =>
|
||||
res.map((item: any) => ({
|
||||
label: item.projectName,
|
||||
value: item.id
|
||||
}))
|
||||
)
|
||||
)
|
||||
.subscribe(res => {
|
||||
this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res;
|
||||
this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res);
|
||||
// if (this.enterpriseProjectIds) {
|
||||
// this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds);
|
||||
// }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user