Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-24 16:58:02
|
* @Date : 2021-12-24 16:58:02
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-11 11:24:51
|
* @LastEditTime : 2022-03-11 17:51:15
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -42,13 +42,13 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit {
|
|||||||
validateForm1: FormGroup;
|
validateForm1: FormGroup;
|
||||||
id = this.route.snapshot.params.id;
|
id = this.route.snapshot.params.id;
|
||||||
@ViewChild('distannce3', { static: false })
|
@ViewChild('distannce3', { static: false })
|
||||||
i: any= {unLoadingPlaceList:[]};
|
i: any = { unLoadingPlaceList: [] };
|
||||||
totalDistance = 0.0; //总里程
|
totalDistance = 0.0; //总里程
|
||||||
totalTime = 0.0; //路程总时间
|
totalTime = 0.0; //路程总时间
|
||||||
startInfo: any = []; // 装货信息
|
startInfo: any = []; // 装货信息
|
||||||
endInfo: any = []; // 卸货信息
|
endInfo: any = []; // 卸货信息
|
||||||
unloadTime: any; // 货源单设置回显
|
unloadTime: any; // 货源单设置回显
|
||||||
loadTime: any; // 货源单设置回显
|
loadTime: any; // 货源单设置回显
|
||||||
sf3data: any; // 货源单设置回显
|
sf3data: any; // 货源单设置回显
|
||||||
sf4data: any; // 货源单设置回显
|
sf4data: any; // 货源单设置回显
|
||||||
dirverPhone: any; // 货源单设置回显
|
dirverPhone: any; // 货源单设置回显
|
||||||
@ -75,7 +75,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
ui: SFUISchema = {};
|
ui: SFUISchema = {};
|
||||||
logColumns2: STColumn[] = [
|
logColumns2: STColumn[] = [
|
||||||
{ title: '时间', index: 'vinOutTime' },
|
{ title: '时间', index: 'vinOutTime' },
|
||||||
{ title: '地点', index: 'cityName' },
|
{ title: '地点', index: 'cityName' }
|
||||||
];
|
];
|
||||||
logColumns: STColumn[] = [
|
logColumns: STColumn[] = [
|
||||||
{ title: '款项', index: 'expenseCodeLabel' },
|
{ title: '款项', index: 'expenseCodeLabel' },
|
||||||
@ -98,8 +98,8 @@ loadTime: any; // 货源单设置回显
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
trajectory = 'car';
|
trajectory = 'car';
|
||||||
mapList:any[] = []; //地图点位数据组
|
mapList: any[] = []; //地图点位数据组
|
||||||
addressItems:any[] = []; //打点地址数据组
|
addressItems: any[] = []; //打点地址数据组
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@ -110,19 +110,19 @@ loadTime: any; // 货源单设置回显
|
|||||||
public shipperservice: ShipperBaseService,
|
public shipperservice: ShipperBaseService,
|
||||||
fb: FormBuilder,
|
fb: FormBuilder,
|
||||||
private envSrv: EAEnvironmentService,
|
private envSrv: EAEnvironmentService,
|
||||||
private ar: ActivatedRoute,
|
private ar: ActivatedRoute
|
||||||
) {
|
) {
|
||||||
this.validateForm1 = fb.group({
|
this.validateForm1 = fb.group({
|
||||||
loadTime: [null, []],
|
loadTime: [null, []],
|
||||||
unloadTime: [null, []],
|
unloadTime: [null, []]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initData()
|
this.initData();
|
||||||
this.initSF3();
|
this.initSF3();
|
||||||
this.initSF4();
|
this.initSF4();
|
||||||
this.getTrajectory()
|
this.getTrajectory();
|
||||||
}
|
}
|
||||||
initSF() {
|
initSF() {
|
||||||
this.schema = {
|
this.schema = {
|
||||||
@ -141,7 +141,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
urlReName: 'data.fullFileWatermarkPath',
|
urlReName: 'data.fullFileWatermarkPath',
|
||||||
descriptionI18n: '提货单',
|
descriptionI18n: '提货单',
|
||||||
data: {
|
data: {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId
|
||||||
},
|
},
|
||||||
name: 'multipartFile',
|
name: 'multipartFile',
|
||||||
beforeUpload: (file: any, fileList: any) => {
|
beforeUpload: (file: any, fileList: any) => {
|
||||||
@ -163,8 +163,8 @@ loadTime: any; // 货源单设置回显
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
multiple: false,
|
multiple: false,
|
||||||
listType: 'picture-card',
|
listType: 'picture-card'
|
||||||
} as SFUploadWidgetSchema,
|
} as SFUploadWidgetSchema
|
||||||
},
|
},
|
||||||
loadingPeopleVehiclesGoodsFilePath: {
|
loadingPeopleVehiclesGoodsFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -180,7 +180,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
urlReName: 'data.fullFileWatermarkPath',
|
urlReName: 'data.fullFileWatermarkPath',
|
||||||
descriptionI18n: '人车货照片',
|
descriptionI18n: '人车货照片',
|
||||||
data: {
|
data: {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId
|
||||||
},
|
},
|
||||||
name: 'multipartFile',
|
name: 'multipartFile',
|
||||||
beforeUpload: (file: any, fileList: any) => {
|
beforeUpload: (file: any, fileList: any) => {
|
||||||
@ -202,24 +202,16 @@ loadTime: any; // 货源单设置回显
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
multiple: false,
|
multiple: false,
|
||||||
listType: 'picture-card',
|
listType: 'picture-card'
|
||||||
} as SFUploadWidgetSchema,
|
} as SFUploadWidgetSchema
|
||||||
},
|
|
||||||
no4: {
|
|
||||||
type: 'string',
|
|
||||||
title: '',
|
|
||||||
ui: {
|
|
||||||
widget: 'text',
|
|
||||||
},
|
|
||||||
default: '',
|
|
||||||
},
|
},
|
||||||
no7: {
|
no7: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'text',
|
widget: 'text'
|
||||||
},
|
},
|
||||||
default: '',
|
default: ''
|
||||||
},
|
},
|
||||||
unloadingLadingBillFilePath: {
|
unloadingLadingBillFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -235,7 +227,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
urlReName: 'data.fullFileWatermarkPath',
|
urlReName: 'data.fullFileWatermarkPath',
|
||||||
descriptionI18n: '提货单',
|
descriptionI18n: '提货单',
|
||||||
data: {
|
data: {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId
|
||||||
},
|
},
|
||||||
name: 'multipartFile',
|
name: 'multipartFile',
|
||||||
beforeUpload: (file: any, fileList: any) => {
|
beforeUpload: (file: any, fileList: any) => {
|
||||||
@ -257,8 +249,8 @@ loadTime: any; // 货源单设置回显
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
multiple: false,
|
multiple: false,
|
||||||
listType: 'picture-card',
|
listType: 'picture-card'
|
||||||
} as SFUploadWidgetSchema,
|
} as SFUploadWidgetSchema
|
||||||
},
|
},
|
||||||
unloadingPeopleVehiclesGoodsFilePath: {
|
unloadingPeopleVehiclesGoodsFilePath: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -274,7 +266,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
urlReName: 'data.fullFileWatermarkPath',
|
urlReName: 'data.fullFileWatermarkPath',
|
||||||
descriptionI18n: '人车货照片',
|
descriptionI18n: '人车货照片',
|
||||||
data: {
|
data: {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId
|
||||||
},
|
},
|
||||||
name: 'multipartFile',
|
name: 'multipartFile',
|
||||||
beforeUpload: (file: any, fileList: any) => {
|
beforeUpload: (file: any, fileList: any) => {
|
||||||
@ -296,62 +288,62 @@ loadTime: any; // 货源单设置回显
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
multiple: false,
|
multiple: false,
|
||||||
listType: 'picture-card',
|
listType: 'picture-card'
|
||||||
} as SFUploadWidgetSchema,
|
} as SFUploadWidgetSchema
|
||||||
},
|
},
|
||||||
no5: {
|
no5: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'text',
|
widget: 'text'
|
||||||
},
|
},
|
||||||
default: '',
|
default: ''
|
||||||
},
|
},
|
||||||
no6: {
|
no6: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'text',
|
widget: 'text'
|
||||||
},
|
},
|
||||||
default: '',
|
default: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
required: ['loadingLadingBillFilePath', 'unloadingLadingBillFilePath']
|
||||||
required: ['loadingLadingBillFilePath','unloadingLadingBillFilePath']
|
|
||||||
};
|
};
|
||||||
this.ui = {
|
this.ui = {
|
||||||
'*': {
|
'*': {
|
||||||
spanLabelFixed: 100,
|
spanLabelFixed: 100,
|
||||||
grid: { span: 20 }
|
grid: { span: 20 }
|
||||||
},
|
},
|
||||||
$unloadingLadingBillFilePath: { grid: { span: 12} },
|
$unloadingLadingBillFilePath: { grid: { span: 12 } },
|
||||||
$unloadingPeopleVehiclesGoodsFilePath: { grid: { span: 12} },
|
$unloadingPeopleVehiclesGoodsFilePath: { grid: { span: 12 } },
|
||||||
$loadingLadingBillFilePath: { grid: { span: 12} },
|
$loadingLadingBillFilePath: { grid: { span: 12 } },
|
||||||
$loadingPeopleVehiclesGoodsFilePath: { grid: { span: 12} },
|
$loadingPeopleVehiclesGoodsFilePath: { grid: { span: 12 } },
|
||||||
$no5: { grid: { span: 24} },
|
$no5: { grid: { span: 24 } }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
initData() {
|
initData() {
|
||||||
this.service.request(this.service.$api_getBulkBillDetail, {id: this.id}).subscribe(res => {
|
this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.i = res;
|
this.i = res;
|
||||||
this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA');
|
this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA');
|
||||||
this.initSF();
|
this.initSF();
|
||||||
// 对装货凭证进行初始化
|
// 对装货凭证进行初始化
|
||||||
let arr : any= []
|
let arr: any = [];
|
||||||
res?.receiptFilePath.forEach((element: any, index: any) => {
|
res?.receiptFilePath.forEach((element: any, index: any) => {
|
||||||
arr.push( {
|
arr.push({
|
||||||
url: element,
|
url: element,
|
||||||
status: 'done',
|
status: 'done',
|
||||||
uid: index
|
uid: index
|
||||||
})
|
|
||||||
});
|
});
|
||||||
this.sf4data
|
});
|
||||||
|
this.sf4data;
|
||||||
this.listImagUrls = arr;
|
this.listImagUrls = arr;
|
||||||
// this.sf4data = res?.goodsInfoList?.[0]
|
// this.sf4data = res?.goodsInfoList?.[0]
|
||||||
this.sf4data = {
|
this.sf4data = {
|
||||||
...res,
|
...res,
|
||||||
...res?.goodsInfoList?.[0]
|
...res?.goodsInfoList?.[0]
|
||||||
}
|
};
|
||||||
this.sf3data = {
|
this.sf3data = {
|
||||||
goodsTypeId: res?.goodsInfoList[0]?.goodsTypeId || '',
|
goodsTypeId: res?.goodsInfoList[0]?.goodsTypeId || '',
|
||||||
goodsTypeName: res?.goodsInfoList[0]?.goodsTypeName || '',
|
goodsTypeName: res?.goodsInfoList[0]?.goodsTypeName || '',
|
||||||
@ -364,7 +356,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
this.changeGoodsType(this.sf3data.goodsTypeId, { label: this.sf3data.goodsTypeName, value: this.sf3data.goodsTypeId });
|
this.changeGoodsType(this.sf3data.goodsTypeId, { label: this.sf3data.goodsTypeName, value: this.sf3data.goodsTypeId });
|
||||||
// 对装卸货信息进行初始化
|
// 对装卸货信息进行初始化
|
||||||
res?.unLoadingPlaceList.forEach((element: any) => {
|
res?.unLoadingPlaceList.forEach((element: any) => {
|
||||||
if(element.type === 1 || element.type === '1') {
|
if (element.type === 1 || element.type === '1') {
|
||||||
const controlId = this.startInfo.length;
|
const controlId = this.startInfo.length;
|
||||||
this.startInfo.push({
|
this.startInfo.push({
|
||||||
detailedAddress: element.detailedAddress,
|
detailedAddress: element.detailedAddress,
|
||||||
@ -377,11 +369,11 @@ loadTime: any; // 货源单设置回显
|
|||||||
area: element.area,
|
area: element.area,
|
||||||
type: element.type,
|
type: element.type,
|
||||||
id: element.id
|
id: element.id
|
||||||
})
|
});
|
||||||
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
|
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||||
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
|
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
|
||||||
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
|
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||||
} else if(element.type === 2 || element.type === '2') {
|
} else if (element.type === 2 || element.type === '2') {
|
||||||
const controlId = this.endInfo.length;
|
const controlId = this.endInfo.length;
|
||||||
this.endInfo.push({
|
this.endInfo.push({
|
||||||
detailedAddress: element?.detailedAddress,
|
detailedAddress: element?.detailedAddress,
|
||||||
@ -394,74 +386,72 @@ loadTime: any; // 货源单设置回显
|
|||||||
area: element.area,
|
area: element.area,
|
||||||
type: element.type,
|
type: element.type,
|
||||||
id: element.id
|
id: element.id
|
||||||
})
|
});
|
||||||
this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required));
|
this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||||
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
|
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
|
||||||
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
|
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 对装货凭证进行初始化
|
// 对装货凭证进行初始化
|
||||||
if (res.loadingLadingBillFilePath) {
|
|
||||||
this.formData = {
|
this.formData = {
|
||||||
loadingLadingBillFilePath: [
|
loadingLadingBillFilePath: [
|
||||||
{
|
{
|
||||||
uid: 'logo',
|
uid: 'logo',
|
||||||
name: 'LOGO',
|
name: 'LOGO',
|
||||||
status: 'done',
|
status: 'done',
|
||||||
url: res.loadingLadingBillFilePath,
|
url: res?.loadingLadingBillFilePath,
|
||||||
response: {
|
response: {
|
||||||
url: res.loadingLadingBillFilePath,
|
url: res?.loadingLadingBillFilePath
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
loadingPeopleVehiclesGoodsFilePath: [
|
loadingPeopleVehiclesGoodsFilePath: [
|
||||||
{
|
{
|
||||||
uid: 'logo',
|
uid: 'logo',
|
||||||
name: 'LOGO',
|
name: 'LOGO',
|
||||||
status: 'done',
|
status: 'done',
|
||||||
url: res.loadingPeopleVehiclesGoodsFilePath,
|
url: res?.loadingPeopleVehiclesGoodsFilePath,
|
||||||
response: {
|
response: {
|
||||||
url: res.loadingPeopleVehiclesGoodsFilePath,
|
url: res?.loadingPeopleVehiclesGoodsFilePath
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
unloadingLadingBillFilePath: [
|
unloadingLadingBillFilePath: [
|
||||||
{
|
{
|
||||||
uid: 'logo',
|
uid: 'logo',
|
||||||
name: 'LOGO',
|
name: 'LOGO',
|
||||||
status: 'done',
|
status: 'done',
|
||||||
url: res.unloadingLadingBillFilePath,
|
url: res?.unloadingLadingBillFilePath,
|
||||||
response: {
|
response: {
|
||||||
url: res.unloadingLadingBillFilePath,
|
url: res?.unloadingLadingBillFilePath
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
unloadingPeopleVehiclesGoodsFilePath: [
|
unloadingPeopleVehiclesGoodsFilePath: [
|
||||||
{
|
{
|
||||||
uid: 'logo',
|
uid: 'logo',
|
||||||
name: 'LOGO',
|
name: 'LOGO',
|
||||||
status: 'done',
|
status: 'done',
|
||||||
url: res.unloadingPeopleVehiclesGoodsFilePath,
|
url: res?.unloadingPeopleVehiclesGoodsFilePath,
|
||||||
response: {
|
response: {
|
||||||
url: res.unloadingPeopleVehiclesGoodsFilePath,
|
url: res?.unloadingPeopleVehiclesGoodsFilePath
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
// 发车时间到车时间初始化
|
// 发车时间到车时间初始化
|
||||||
this.loadTime = res.loadTime
|
this.loadTime = res?.loadTime;
|
||||||
this.unloadTime = res.unloadTime
|
this.unloadTime = res?.unloadTime;
|
||||||
this.dirvingMessage = res.billExpenseDetails;
|
this.dirvingMessage = res?.billExpenseDetails;
|
||||||
// 计算里程,时间
|
// 计算里程,时间
|
||||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||||
this.totalDistance = res.distance;
|
this.totalDistance = res?.distance;
|
||||||
this.totalTime = res.time;
|
this.totalTime = res?.time;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
goBack() {
|
goBack() {
|
||||||
@ -479,39 +469,66 @@ loadTime: any; // 货源单设置回显
|
|||||||
});
|
});
|
||||||
this.sf3.validator({ emitError: true });
|
this.sf3.validator({ emitError: true });
|
||||||
this.sf4.validator({ emitError: true });
|
this.sf4.validator({ emitError: true });
|
||||||
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid ) {
|
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid) {
|
||||||
this.service.msgSrv.warning('请完善必填项!');
|
this.service.msgSrv.warning('请完善必填项!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((this.sf4.value?.acceptWeight > this.i?.goodsInfoList?.[0]?.weight) || (this.sf4.value?.settlementWeight.settlementWeight > this.i?.goodsInfoList?.[0]?.weight) ) {
|
if (
|
||||||
|
this.sf4.value?.acceptWeight > this.i?.goodsInfoList?.[0]?.weight ||
|
||||||
|
this.sf4.value?.settlementWeight.settlementWeight > this.i?.goodsInfoList?.[0]?.weight
|
||||||
|
) {
|
||||||
this.service.msgSrv.warning('装货重量/卸货重量不能大于货物重量!');
|
this.service.msgSrv.warning('装货重量/卸货重量不能大于货物重量!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let imgList : any= [];
|
let imgList: any = [];
|
||||||
if(this.listImagUrls.length > 0) {
|
if (this.listImagUrls.length > 0) {
|
||||||
this.listImagUrls?.forEach((res :any) => {
|
this.listImagUrls?.forEach((res: any) => {
|
||||||
if(res.url) {
|
if (res?.url) {
|
||||||
imgList.push(res.url)
|
imgList.push(res?.url);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
if(typeof(this.unloadTime) !== 'string' ){
|
if (typeof this.unloadTime !== 'string') {
|
||||||
var c = new Date(this.unloadTime);
|
var c = new Date(this.unloadTime);
|
||||||
this.unloadTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds())
|
this.unloadTime =
|
||||||
|
c.getFullYear() +
|
||||||
|
'-' +
|
||||||
|
this.addPreZero(c.getMonth() + 1) +
|
||||||
|
'-' +
|
||||||
|
this.addPreZero(c.getDate()) +
|
||||||
|
' ' +
|
||||||
|
this.addPreZero(c.getHours()) +
|
||||||
|
':' +
|
||||||
|
this.addPreZero(c.getMinutes()) +
|
||||||
|
':' +
|
||||||
|
this.addPreZero(c.getSeconds());
|
||||||
}
|
}
|
||||||
if(typeof(this.loadTime) !== 'string' ) {
|
if (typeof this.loadTime !== 'string') {
|
||||||
var c = new Date(this.loadTime);
|
var c = new Date(this.loadTime);
|
||||||
this.loadTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds())
|
this.loadTime =
|
||||||
|
c.getFullYear() +
|
||||||
|
'-' +
|
||||||
|
this.addPreZero(c.getMonth() + 1) +
|
||||||
|
'-' +
|
||||||
|
this.addPreZero(c.getDate()) +
|
||||||
|
' ' +
|
||||||
|
this.addPreZero(c.getHours()) +
|
||||||
|
':' +
|
||||||
|
this.addPreZero(c.getMinutes()) +
|
||||||
|
':' +
|
||||||
|
this.addPreZero(c.getSeconds());
|
||||||
}
|
}
|
||||||
const params = {
|
const params = {
|
||||||
id: this.id,
|
id: this.id,
|
||||||
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,],
|
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo],
|
||||||
receiptFilePath: imgList,
|
receiptFilePath: imgList,
|
||||||
goodsInfoDTOList: [{
|
goodsInfoDTOList: [
|
||||||
|
{
|
||||||
id: this.i?.goodsInfoList?.[0].id,
|
id: this.i?.goodsInfoList?.[0].id,
|
||||||
goodsName: this.sf3.value?.goodsName,
|
goodsName: this.sf3.value?.goodsName,
|
||||||
...this.sf4.value
|
...this.sf4.value
|
||||||
}],
|
}
|
||||||
|
],
|
||||||
// 运费信息
|
// 运费信息
|
||||||
// 收款人
|
// 收款人
|
||||||
payeeId: this.dirverPhone,
|
payeeId: this.dirverPhone,
|
||||||
@ -524,26 +541,34 @@ loadTime: any; // 货源单设置回显
|
|||||||
acceptVolume: this.sf4.value?.acceptVolume,
|
acceptVolume: this.sf4.value?.acceptVolume,
|
||||||
settlementWeight: this.sf4.value?.settlementWeight,
|
settlementWeight: this.sf4.value?.settlementWeight,
|
||||||
settlementVolume: this.sf4.value?.settlementVolume,
|
settlementVolume: this.sf4.value?.settlementVolume,
|
||||||
loadingLadingBillFilePath: this.sf.value?.loadingLadingBillFilePath?.data ? this.sf.value?.loadingLadingBillFilePath.data.fullFilePath : this.sf.value?.loadingLadingBillFilePath?.url,
|
loadingLadingBillFilePath: this.sf.value?.loadingLadingBillFilePath?.data
|
||||||
|
? this.sf.value?.loadingLadingBillFilePath.data.fullFilePath
|
||||||
|
: this.sf.value?.loadingLadingBillFilePath?.url,
|
||||||
|
|
||||||
loadingPeopleVehiclesGoodsFilePath: this.sf.value?.loadingPeopleVehiclesGoodsFilePath?.data ? this.sf.value?.loadingPeopleVehiclesGoodsFilePath.data.fullFilePath : this.sf.value?.loadingPeopleVehiclesGoodsFilePath?.url,
|
loadingPeopleVehiclesGoodsFilePath: this.sf.value?.loadingPeopleVehiclesGoodsFilePath?.data
|
||||||
|
? this.sf.value?.loadingPeopleVehiclesGoodsFilePath.data.fullFilePath
|
||||||
|
: this.sf.value?.loadingPeopleVehiclesGoodsFilePath?.url,
|
||||||
|
|
||||||
unloadingLadingBillFilePath: this.sf.value?.unloadingLadingBillFilePath?.data ? this.sf.value?.unloadingLadingBillFilePath.data.fullFilePath : this.sf.value?.unloadingLadingBillFilePath?.url,
|
unloadingLadingBillFilePath: this.sf.value?.unloadingLadingBillFilePath?.data
|
||||||
|
? this.sf.value?.unloadingLadingBillFilePath.data.fullFilePath
|
||||||
|
: this.sf.value?.unloadingLadingBillFilePath?.url,
|
||||||
|
|
||||||
unloadingPeopleVehiclesGoodsFilePath: this.sf.value?.unloadingPeopleVehiclesGoodsFilePath?.data ? this.sf.value?.unloadingPeopleVehiclesGoodsFilePath.data.fullFilePath : this.sf.value?.unloadingPeopleVehiclesGoodsFilePath?.url,
|
unloadingPeopleVehiclesGoodsFilePath: this.sf.value?.unloadingPeopleVehiclesGoodsFilePath?.data
|
||||||
}
|
? this.sf.value?.unloadingPeopleVehiclesGoodsFilePath.data.fullFilePath
|
||||||
|
: this.sf.value?.unloadingPeopleVehiclesGoodsFilePath?.url
|
||||||
|
};
|
||||||
this.service.request(this.service.$api_set_modifyBulkOrder, params).subscribe((res: any) => {
|
this.service.request(this.service.$api_set_modifyBulkOrder, params).subscribe((res: any) => {
|
||||||
if(res) {
|
if (res) {
|
||||||
this.service.msgSrv.success('修改成功!');
|
this.service.msgSrv.success('修改成功!');
|
||||||
this.router.navigate(['/order-management/bulk/bulk-detail/', this.id]);
|
this.router.navigate(['/order-management/bulk/bulk-detail/', this.id]);
|
||||||
} else {
|
} else {
|
||||||
this.service.msgSrv.error(res?.msg);
|
this.service.msgSrv.error(res?.msg);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
addPreZero(num: any){
|
addPreZero(num: any) {
|
||||||
if(num<10){
|
if (num < 10) {
|
||||||
return '0'+num;
|
return '0' + num;
|
||||||
} else {
|
} else {
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
@ -589,8 +614,8 @@ loadTime: any; // 货源单设置回显
|
|||||||
|
|
||||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => {
|
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => {
|
||||||
this.totalDistance = res.distance;
|
this.totalDistance = res?.distance;
|
||||||
this.totalTime = res.time;
|
this.totalTime = res?.time;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -672,7 +697,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
changeGoodsType(value: string, data: any) {
|
changeGoodsType(value: string, data: any) {
|
||||||
if (data.label === '其它') return;
|
if (data.label === '其它') return;
|
||||||
const params = {
|
const params = {
|
||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
@ -697,8 +722,8 @@ changeGoodsType(value: string, data: any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
initSF4() {
|
initSF4() {
|
||||||
this.schema4 = {
|
this.schema4 = {
|
||||||
properties: {
|
properties: {
|
||||||
weight: {
|
weight: {
|
||||||
@ -753,61 +778,61 @@ initSF4() {
|
|||||||
acceptWeight: {
|
acceptWeight: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
title: '装货重量',
|
title: '装货重量',
|
||||||
minimum:0,
|
minimum: 0,
|
||||||
maximum:99999,
|
maximum: 99999,
|
||||||
ui: {
|
ui: {
|
||||||
unit: '吨',
|
unit: '吨',
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
grid: {
|
grid: {
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
hideStep: true,
|
hideStep: true
|
||||||
} as SFNumberWidgetSchema
|
} as SFNumberWidgetSchema
|
||||||
},
|
},
|
||||||
acceptVolume: {
|
acceptVolume: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
title: '装货体积',
|
title: '装货体积',
|
||||||
minimum:0,
|
minimum: 0,
|
||||||
maximum:99999,
|
maximum: 99999,
|
||||||
ui: {
|
ui: {
|
||||||
unit: '吨',
|
unit: '吨',
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
grid: {
|
grid: {
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
hideStep: true,
|
hideStep: true
|
||||||
} as SFNumberWidgetSchema
|
} as SFNumberWidgetSchema
|
||||||
},
|
},
|
||||||
settlementWeight: {
|
settlementWeight: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
title: '卸货重量',
|
title: '卸货重量',
|
||||||
minimum:0,
|
minimum: 0,
|
||||||
maximum:99999,
|
maximum: 99999,
|
||||||
ui: {
|
ui: {
|
||||||
unit: '吨',
|
unit: '吨',
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
grid: {
|
grid: {
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
hideStep: true,
|
hideStep: true
|
||||||
} as SFNumberWidgetSchema
|
} as SFNumberWidgetSchema
|
||||||
},
|
},
|
||||||
settlementVolume: {
|
settlementVolume: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
title: '卸货体积',
|
title: '卸货体积',
|
||||||
minimum:0,
|
minimum: 0,
|
||||||
maximum:99999,
|
maximum: 99999,
|
||||||
ui: {
|
ui: {
|
||||||
unit: '吨',
|
unit: '吨',
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
grid: {
|
grid: {
|
||||||
span: 12
|
span: 12
|
||||||
},
|
},
|
||||||
hideStep: true,
|
hideStep: true
|
||||||
} as SFNumberWidgetSchema
|
} as SFNumberWidgetSchema
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
required: ['loadTime','unloadTime']
|
required: ['loadTime', 'unloadTime']
|
||||||
};
|
};
|
||||||
this.ui4 = {
|
this.ui4 = {
|
||||||
'*': {
|
'*': {
|
||||||
@ -832,19 +857,19 @@ initSF4() {
|
|||||||
},
|
},
|
||||||
$unloadTime: {
|
$unloadTime: {
|
||||||
grid: { span: 12 }
|
grid: { span: 12 }
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// 处理上传图片
|
// 处理上传图片
|
||||||
handlePreview1 = async (file: NzUploadFile) => {
|
handlePreview1 = async (file: NzUploadFile) => {
|
||||||
if (!file.url && !file.preview) {
|
if (!file.url && !file.preview) {
|
||||||
file.preview = await getBase64(file.originFileObj!);
|
file.preview = await getBase64(file.originFileObj!);
|
||||||
}
|
}
|
||||||
this.previewImage1 = file.url || file.preview;
|
this.previewImage1 = file.url || file.preview;
|
||||||
this.previewVisible1 = true;
|
this.previewVisible1 = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
handleChange1(info: NzUploadChangeParam): void {
|
handleChange1(info: NzUploadChangeParam): void {
|
||||||
switch (info.file.status) {
|
switch (info.file.status) {
|
||||||
case 'uploading':
|
case 'uploading':
|
||||||
break;
|
break;
|
||||||
@ -862,8 +887,8 @@ handleChange1(info: NzUploadChangeParam): void {
|
|||||||
this.service.msgSrv.error('网络错误');
|
this.service.msgSrv.error('网络错误');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
beforeUpload = (file: NzUploadFile, _fileList: NzUploadFile[]) => {
|
beforeUpload = (file: NzUploadFile, _fileList: NzUploadFile[]) => {
|
||||||
return new Observable((observer: Observer<boolean>) => {
|
return new Observable((observer: Observer<boolean>) => {
|
||||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif' || file.type === 'image/bmp';
|
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif' || file.type === 'image/bmp';
|
||||||
if (!isJpgOrPng) {
|
if (!isJpgOrPng) {
|
||||||
@ -881,26 +906,26 @@ beforeUpload = (file: NzUploadFile, _fileList: NzUploadFile[]) => {
|
|||||||
observer.next(isJpgOrPng && isLt2M);
|
observer.next(isJpgOrPng && isLt2M);
|
||||||
observer.complete();
|
observer.complete();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
agreement(value: any) {
|
agreement(value: any) {
|
||||||
if(value === '1') {
|
if (value === '1') {
|
||||||
this.imges = this.i?.supplementAgreement
|
this.imges = this.i?.supplementAgreement;
|
||||||
} else if (value === '2') {
|
} else if (value === '2') {
|
||||||
this.imges = this.i?.supplementAgreement
|
this.imges = this.i?.supplementAgreement;
|
||||||
}
|
}
|
||||||
this.isVisible = true;
|
this.isVisible = true;
|
||||||
}
|
}
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.isVisible = false
|
this.isVisible = false;
|
||||||
}
|
}
|
||||||
handleOK() {
|
handleOK() {
|
||||||
this.isVisible = false
|
this.isVisible = false;
|
||||||
}
|
}
|
||||||
goDistance(elf: NzCardComponent) {
|
goDistance(elf: NzCardComponent) {
|
||||||
if (elf) {
|
if (elf) {
|
||||||
elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' });
|
elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 装卸货地址互换
|
// 装卸货地址互换
|
||||||
swapAddress() {
|
swapAddress() {
|
||||||
let item = this.startInfo;
|
let item = this.startInfo;
|
||||||
@ -917,18 +942,18 @@ goDistance(elf: NzCardComponent) {
|
|||||||
// 计算里程,时间
|
// 计算里程,时间
|
||||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||||
this.totalDistance = res.distance;
|
this.totalDistance = res?.distance;
|
||||||
this.totalTime = res.time;
|
this.totalTime = res?.time;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取车辆轨迹
|
// 获取车辆轨迹
|
||||||
getTrajectory(){
|
getTrajectory() {
|
||||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
const points = res.trackArray;
|
const points = res?.trackArray;
|
||||||
let list :any[] = [];
|
let list: any[] = [];
|
||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
@ -936,8 +961,8 @@ goDistance(elf: NzCardComponent) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
this.addressItems = res.cityArray;
|
this.addressItems = res?.cityArray;
|
||||||
if(this.addressItems && this.addressItems.length > 0){
|
if (this.addressItems && this.addressItems.length > 0) {
|
||||||
this.addressItems.forEach(item => {
|
this.addressItems.forEach(item => {
|
||||||
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
||||||
});
|
});
|
||||||
@ -947,11 +972,11 @@ goDistance(elf: NzCardComponent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取司机轨迹
|
// 获取司机轨迹
|
||||||
getDriverTrajectory(){
|
getDriverTrajectory() {
|
||||||
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
const points = res.tracks;
|
const points = res?.tracks;
|
||||||
let list :any[] = [];
|
let list: any[] = [];
|
||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
@ -959,8 +984,8 @@ goDistance(elf: NzCardComponent) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
this.addressItems = [...res.enclosureDataAppTrack];
|
this.addressItems = [...res?.enclosureDataAppTrack];
|
||||||
if(this.addressItems && this.addressItems.length > 0){
|
if (this.addressItems && this.addressItems.length > 0) {
|
||||||
this.addressItems.forEach(item => {
|
this.addressItems.forEach(item => {
|
||||||
item.vinOutTime = this.getLocalTime(item.gtm);
|
item.vinOutTime = this.getLocalTime(item.gtm);
|
||||||
item.cityName = item.appAdress;
|
item.cityName = item.appAdress;
|
||||||
@ -969,10 +994,10 @@ goDistance(elf: NzCardComponent) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
trajectoryChange(event:any){
|
trajectoryChange(event: any) {
|
||||||
if(event ==='car'){
|
if (event === 'car') {
|
||||||
this.getTrajectory()
|
this.getTrajectory();
|
||||||
}else if(event ==='driver'){
|
} else if (event === 'driver') {
|
||||||
this.getDriverTrajectory();
|
this.getDriverTrajectory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-23 13:39:58
|
* @Date : 2021-12-23 13:39:58
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-11 11:24:29
|
* @LastEditTime : 2022-03-11 17:58:28
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -93,11 +93,11 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
trajectory = 'car';
|
trajectory = 'car';
|
||||||
mapList:any[] = []; //地图点位数据组
|
mapList: any[] = []; //地图点位数据组
|
||||||
addressItems:any[] = []; //打点地址数据组
|
addressItems: any[] = []; //打点地址数据组
|
||||||
logColumns2: STColumn[] = [
|
logColumns2: STColumn[] = [
|
||||||
{ title: '时间', index: 'vinOutTime' },
|
{ title: '时间', index: 'vinOutTime' },
|
||||||
{ title: '地点', index: 'cityName' },
|
{ title: '地点', index: 'cityName' }
|
||||||
];
|
];
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
@ -204,14 +204,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
listType: 'picture-card'
|
listType: 'picture-card'
|
||||||
} as SFUploadWidgetSchema
|
} as SFUploadWidgetSchema
|
||||||
},
|
},
|
||||||
no4: {
|
|
||||||
type: 'string',
|
|
||||||
title: '',
|
|
||||||
ui: {
|
|
||||||
widget: 'text'
|
|
||||||
},
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
no7: {
|
no7: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
@ -405,7 +397,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 对装货凭证进行初始化
|
// 对装货凭证进行初始化
|
||||||
if (res?.loadingLadingBillFilePath) {
|
|
||||||
this.formData = {
|
this.formData = {
|
||||||
loadingLadingBillFilePath: [
|
loadingLadingBillFilePath: [
|
||||||
{
|
{
|
||||||
@ -425,7 +416,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
status: 'done',
|
status: 'done',
|
||||||
url: res?.loadingPeopleVehiclesGoodsFilePath,
|
url: res?.loadingPeopleVehiclesGoodsFilePath,
|
||||||
response: {
|
response: {
|
||||||
url: res?.loadingPeopleVehiclesGoodsFilePath
|
url: res?.loadingPeopleVehiclesGoodsFilePath,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -452,7 +443,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
|
||||||
// 发车时间到车时间初始化
|
// 发车时间到车时间初始化
|
||||||
this.loadTime = res?.loadTime;
|
this.loadTime = res?.loadTime;
|
||||||
this.unloadTime = res?.unloadTime;
|
this.unloadTime = res?.unloadTime;
|
||||||
@ -683,7 +673,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
'*': {
|
'*': {
|
||||||
spanLabelFixed: 110,
|
spanLabelFixed: 110,
|
||||||
grid: { span: 12 }
|
grid: { span: 12 }
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
changeGoodsType(value: string, data: any) {
|
changeGoodsType(value: string, data: any) {
|
||||||
@ -922,11 +912,11 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 获取车辆轨迹
|
// 获取车辆轨迹
|
||||||
getTrajectory(){
|
getTrajectory() {
|
||||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
const points = res?.trackArray;
|
const points = res?.trackArray;
|
||||||
let list :any[] = [];
|
let list: any[] = [];
|
||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
@ -935,7 +925,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
this.addressItems = res?.cityArray;
|
this.addressItems = res?.cityArray;
|
||||||
if(this.addressItems && this.addressItems.length > 0){
|
if (this.addressItems && this.addressItems.length > 0) {
|
||||||
this.addressItems.forEach(item => {
|
this.addressItems.forEach(item => {
|
||||||
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
||||||
});
|
});
|
||||||
@ -945,11 +935,11 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取司机轨迹
|
// 获取司机轨迹
|
||||||
getDriverTrajectory(){
|
getDriverTrajectory() {
|
||||||
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
const points = res?.tracks;
|
const points = res?.tracks;
|
||||||
let list :any[] = [];
|
let list: any[] = [];
|
||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
@ -958,7 +948,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
this.addressItems = [...res?.enclosureDataAppTrack];
|
this.addressItems = [...res?.enclosureDataAppTrack];
|
||||||
if(this.addressItems && this.addressItems.length > 0){
|
if (this.addressItems && this.addressItems.length > 0) {
|
||||||
this.addressItems.forEach(item => {
|
this.addressItems.forEach(item => {
|
||||||
item.vinOutTime = this.getLocalTime(item.gtm);
|
item.vinOutTime = this.getLocalTime(item.gtm);
|
||||||
item.cityName = item.appAdress;
|
item.cityName = item.appAdress;
|
||||||
@ -967,10 +957,10 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
trajectoryChange(event:any){
|
trajectoryChange(event: any) {
|
||||||
if(event ==='car'){
|
if (event === 'car') {
|
||||||
this.getTrajectory()
|
this.getTrajectory();
|
||||||
}else if(event ==='driver'){
|
} else if (event === 'driver') {
|
||||||
this.getDriverTrajectory();
|
this.getDriverTrajectory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-12-03 15:31:52
|
* @Date: 2021-12-03 15:31:52
|
||||||
* @LastEditTime : 2022-03-11 16:40:09
|
* @LastEditTime : 2022-03-11 17:27:42
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\bulk-detail\\bulk-detail.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\bulk-detail\\bulk-detail.component.html
|
||||||
@ -83,7 +83,7 @@
|
|||||||
{{i?.driver?.name}}/{{i?.driver?.phone}}
|
{{i?.driver?.name}}/{{i?.driver?.phone}}
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="车型车长载重">
|
<sv label="车型车长载重">
|
||||||
{{i?.carVO?.carModelLabel}},{{i?.carVO?.carLengthLabel}}米,{{i?.carVO?.carLoad ? i?.carVO?.carLoad +'吨': ''}}
|
{{i?.car?.carModelLabel}},{{i?.car?.carLengthLabel}}米,{{i?.car?.carLoad ? i?.car?.carLoad +'吨': ''}}
|
||||||
</sv>
|
</sv>
|
||||||
<!-- <sv label="计划装货时间">
|
<!-- <sv label="计划装货时间">
|
||||||
{{i?.loadPlanTime}}
|
{{i?.loadPlanTime}}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { WaybillManagementBulkComponent } from './../components/bulk/bulk.compon
|
|||||||
/*
|
/*
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-12-07 14:52:29
|
* @Date: 2021-12-07 14:52:29
|
||||||
* @LastEditTime : 2022-03-08 14:51:11
|
* @LastEditTime : 2022-03-11 17:26:20
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\services\\waybill-management.service.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\services\\waybill-management.service.ts
|
||||||
|
|||||||
Reference in New Issue
Block a user