This commit is contained in:
wangshiming
2022-05-06 11:10:13 +08:00
parent 77dc933e7c
commit 803aa860c0
2 changed files with 12 additions and 4 deletions

View File

@ -77,8 +77,10 @@ export class DatatableDataindexComponent implements OnInit {
// 订单类型比例 // 订单类型比例
this.service.request(this.service.$api_getBillTypeProportion).subscribe(res => { this.service.request(this.service.$api_getBillTypeProportion).subscribe(res => {
if (res) { if (res) {
this.billTypeDatas = this.formatCoordinateData(res); const billTypeDatas2 = this.formatCoordinateData(res);
this.initBillChart(this.g2custom['el'].nativeElement as any); console.log(billTypeDatas2);
this.initBillChart(this.g2custom['el'].nativeElement as any,billTypeDatas2);
} }
}); });
// 大区业绩完成情况 // 大区业绩完成情况
@ -98,6 +100,8 @@ export class DatatableDataindexComponent implements OnInit {
this.service.request(this.service.$api_getWayBillDirectProportion).subscribe(res => { this.service.request(this.service.$api_getWayBillDirectProportion).subscribe(res => {
if (res) { if (res) {
const billTypeDatas = this.formatCoordinateData(res.map((item: any) => ({ ...item, billType: item.wayBillType }))); const billTypeDatas = this.formatCoordinateData(res.map((item: any) => ({ ...item, billType: item.wayBillType })));
console.log(billTypeDatas);
this.initBillChart(this.BillDirectProportion['el'].nativeElement as any, billTypeDatas); this.initBillChart(this.BillDirectProportion['el'].nativeElement as any, billTypeDatas);
} }
}); });
@ -141,7 +145,7 @@ export class DatatableDataindexComponent implements OnInit {
chart.scale('percent', { chart.scale('percent', {
formatter: val => { formatter: val => {
val = val * 100 + '%'; val = (val * 100 ).toFixed(0)+ '%';
return val; return val;
} }
}); });
@ -198,7 +202,7 @@ export class DatatableDataindexComponent implements OnInit {
.label('percent', percent => { .label('percent', percent => {
return { return {
content: data => { content: data => {
return ` ${percent * 100}%`; return (percent * 100).toFixed(0)+`%`;
}, },
style: { fontSize: 14 } style: { fontSize: 14 }
}; };
@ -498,6 +502,8 @@ export class DatatableDataindexComponent implements OnInit {
percent: Number((item.quantity / total).toFixed(2)) percent: Number((item.quantity / total).toFixed(2))
}); });
}); });
console.log(rs);
return rs; return rs;
} }

View File

@ -236,7 +236,9 @@ export class WithdrawalsDetailComponent implements OnInit {
width: 140 width: 140
}, },
{ title: '运费明细', render: 'amountDetails', className: 'text-right', width: 150 }, { title: '运费明细', render: 'amountDetails', className: 'text-right', width: 150 },
{ title: '网络货运人', index: 'ltdName', className: 'text-left', width: 200 },
{ title: '货主', index: 'enterpriseInfoName', className: 'text-left', width: 200 }, { title: '货主', index: 'enterpriseInfoName', className: 'text-left', width: 200 },
{ title: '项目名称', index: 'enterpriseProjectName', className: 'text-left', width: 200 },
{ title: '订单号', render: 'billId', width: 200 }, { title: '订单号', render: 'billId', width: 200 },
{ title: '运单号', render: 'wayBillId', width: 200 }, { title: '运单号', render: 'wayBillId', width: 200 },
{ title: '货源编号', index: 'resourceCode', width: 200 }, { title: '货源编号', index: 'resourceCode', width: 200 },