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