车辆对接
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-15 13:17:42
|
||||
* @LastEditTime: 2021-12-21 09:34:52
|
||||
* @LastEditTime: 2021-12-21 14:50:54
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\confir-receipt\confir-receipt.component.ts
|
||||
@ -42,6 +42,7 @@ export class VehicleConfirReceiptComponent implements OnInit {
|
||||
record: any = {};
|
||||
i:any;
|
||||
Status: any
|
||||
costDetail: any // 费用明细
|
||||
columns!: STColumn[];
|
||||
previewVisible1 = false;
|
||||
dataInfo: any;
|
||||
@ -49,9 +50,13 @@ export class VehicleConfirReceiptComponent implements OnInit {
|
||||
data: any = {};
|
||||
previewImage1 = '';
|
||||
listImagUrls: any[] = [];
|
||||
payeeList: any;
|
||||
driverList: any;
|
||||
carList: any;
|
||||
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public http: _HttpClient,public service: OrderManagementService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initST()
|
||||
this.initData()
|
||||
}
|
||||
|
||||
@ -96,14 +101,6 @@ export class VehicleConfirReceiptComponent implements OnInit {
|
||||
});
|
||||
};
|
||||
initData() {
|
||||
// this.dataInfo = [
|
||||
// {
|
||||
// prePay: this.i?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'PRE')[0]?.price || 0,
|
||||
// toPay: this.i?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'RECE')[0]?.price || 0,
|
||||
// receiptPay: this.i?.mybidDetailInfo?.filter((data: any) => data.expenseCode === 'OIL')[0]?.price || 0,
|
||||
// traiPrice: this.i?.mybidDetailInfo?.filter((data: any) => data.expenseName === '运输费')[0]?.price || 0
|
||||
// }
|
||||
// ];
|
||||
// if (this.i?.receiptCertificate?.length > 0) {
|
||||
// this.i?.receiptCertificate.forEach((element: any) => {
|
||||
// const image = {
|
||||
@ -118,6 +115,34 @@ export class VehicleConfirReceiptComponent implements OnInit {
|
||||
this.service.request(this.service.$api_get_getWholeSignForDetail, {id: this.i?.id}).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
this.dataInfo = res;
|
||||
const cost: any = {}
|
||||
res.mybidDetailInfo.forEach((element: any) => {
|
||||
if(element.expenseName === "预付" || element.expenseCode === 'PRE') {
|
||||
cost.PRE = element.price
|
||||
} else if(element.expenseName === "到付" || element.expenseCode === 'RECE') {
|
||||
cost.RECE = element.price
|
||||
} else if(element.expenseName === "回单付" || element.expenseCode === 'BACK') {
|
||||
cost.BACK = element.price
|
||||
} else if(element.expenseName === "油卡" || element.expenseCode === 'OIL') {
|
||||
cost.OIL = element.price
|
||||
} else if(element.expenseName === "总费用") {
|
||||
cost.traiPrice = element.price
|
||||
}
|
||||
});
|
||||
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.dataInfo?.payeeId}).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
this.payeeList = res;
|
||||
})
|
||||
this.service.request(this.service.$api_getUserDetailByAppUserId, {id: this.dataInfo?.driverId}).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
this.driverList = res;
|
||||
})
|
||||
this.service.request(this.service.$api_getCarLicenseByIds, {id: this.dataInfo?.carId}).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
this.carList = res;
|
||||
})
|
||||
console.log(cost)
|
||||
this.costDetail = [cost];
|
||||
})
|
||||
}
|
||||
|
||||
@ -125,19 +150,19 @@ export class VehicleConfirReceiptComponent implements OnInit {
|
||||
this.columns = [
|
||||
{
|
||||
title: '预付',
|
||||
index: 'prePay'
|
||||
index: 'PRE'
|
||||
},
|
||||
{
|
||||
title: '到付',
|
||||
index: 'toPay'
|
||||
index: 'RECE'
|
||||
},
|
||||
{
|
||||
title: '油卡',
|
||||
index: 'OIL'
|
||||
},
|
||||
// {
|
||||
// title: '油卡',
|
||||
// index: 'name3'
|
||||
// },
|
||||
{
|
||||
title: '回单付',
|
||||
index: 'receiptPay'
|
||||
index: 'BACK'
|
||||
},
|
||||
{
|
||||
title: '总运费',
|
||||
|
||||
Reference in New Issue
Block a user