diff --git a/src/app/routes/datatable/components/compliance/index/curve/curve.component.html b/src/app/routes/datatable/components/compliance/index/curve/curve.component.html new file mode 100644 index 00000000..7ceba0b7 --- /dev/null +++ b/src/app/routes/datatable/components/compliance/index/curve/curve.component.html @@ -0,0 +1,2 @@ + + diff --git a/src/app/routes/datatable/components/compliance/index/curve/curve.component.less b/src/app/routes/datatable/components/compliance/index/curve/curve.component.less new file mode 100644 index 00000000..e69de29b diff --git a/src/app/routes/datatable/components/compliance/index/curve/curve.component.ts b/src/app/routes/datatable/components/compliance/index/curve/curve.component.ts new file mode 100644 index 00000000..0dbacb97 --- /dev/null +++ b/src/app/routes/datatable/components/compliance/index/curve/curve.component.ts @@ -0,0 +1,91 @@ +import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; +import { G2MiniAreaClickItem } from '@delon/chart/mini-area'; + +// import DataSet from '@antv/data-set'; +const DataSet = require('@antv/data-set'); +import { Chart } from '@antv/g2'; +import { DataService } from 'src/app/routes/datatable/services/data.service'; +@Component({ + selector: 'app-compliance-curve', + templateUrl: './curve.component.html', + styleUrls: ['./curve.component.less'] +}) +export class ComplianceCurveComponent implements OnInit,OnChanges { + el: any; + @Input() chartData: any; + chart: any; + constructor(private service: DataService, private ngZone: NgZone) { + + } + ngOnChanges(changes: SimpleChanges): void { + if (this.chartData) { + // setTimeout(()=>{ + // this.chart.render(true) + // }, 1000) + + } + } + + ngOnInit(): void { + + } + reRender() { + setTimeout(() => { + this.chart.data(this.chartData); + this.chart.render(); + }, 1000) + } + render(el: ElementRef): void { + this.el = el.nativeElement + setTimeout(() => { + console.log(this.chartData) + this.ngZone.runOutsideAngular(() => this.init(this.el)); + }, 1000) + } + + private init(el: HTMLElement): void { + this.chart = new Chart({ + container: el, + autoFit: true, + height: 500, + }); + + this.chart.data(this.chartData); + this.chart.scale({ + time: { + range: [0, 1], + }, + number: { + min: 0, + nice: true, + }, + }); + + this.chart.tooltip({ + showCrosshairs: true, + shared: true, + }); + + this.chart.axis('proportion', { + label: { + formatter: (val: any) => { + return val*100+ ' %'; + }, + }, + }); + + this.chart + .line() + .position('situationDate*proportion') + .color('type') + .tooltip('proportion*type', function(name: any, value: any) { + return { + name: name*100+'%', + value: value + }; + }); + + this.chart.render(); + + } +} diff --git a/src/app/routes/datatable/components/compliance/index/index.component.html b/src/app/routes/datatable/components/compliance/index/index.component.html index dbcfc3c0..0d55f76b 100644 --- a/src/app/routes/datatable/components/compliance/index/index.component.html +++ b/src/app/routes/datatable/components/compliance/index/index.component.html @@ -24,37 +24,37 @@
- +
- 合格:12423 不合格:12423 + 合格:{{cardData1?.leftQuantity}} 不合格:{{cardData1?.rightQuantity}}
- +
- 货源单:12423 合同单:12423 + 货源单:{{cardData2?.leftQuantity}} 合同单:{{cardData2?.rightQuantity}}
- +
- 司机:12423 车队长:12423 + 司机:{{cardData3?.leftQuantity}} 车队长:{{cardData3?.rightQuantity}}
- +
- 准时:12423 逾期:12423 + 准时:{{cardData4?.leftQuantity}} 逾期:{{cardData4?.rightQuantity}}
@@ -62,5 +62,6 @@
- + + diff --git a/src/app/routes/datatable/components/compliance/index/index.component.ts b/src/app/routes/datatable/components/compliance/index/index.component.ts index 4de2d93e..97ab6b2b 100644 --- a/src/app/routes/datatable/components/compliance/index/index.component.ts +++ b/src/app/routes/datatable/components/compliance/index/index.component.ts @@ -5,6 +5,9 @@ import { format } from 'date-fns'; import { SFComponent, SFDateWidgetSchema, SFRadioWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; import { G2TimelineData, G2TimelineMap } from '@delon/chart/timeline'; import { Chart } from '@antv/g2'; +import { DataService } from '../../../services/data.service'; +import { ComplianceCurveComponent } from './curve/curve.component'; + @Component({ selector: 'app-datatable-compliance-index', templateUrl: './index.component.html', @@ -12,51 +15,107 @@ import { Chart } from '@antv/g2'; providers: [DatePipe] }) export class DatatableComplianceIndexComponent implements OnInit { + @ViewChild('curve') private readonly curve!: ComplianceCurveComponent; @ViewChild('sf', { static: false }) + sf!: SFComponent; ui!: SFUISchema; schema: SFSchema = {}; mode = 'year'; date: any = null; - dateFormat = 'yyyy-MM-dd'; - time: any = ['2022-01-01 00:00:00'] - constructor(private http: _HttpClient, private modal: ModalHelper, private ngZone: NgZone, private datePipe: DatePipe) {} + dateFormat = 'yyyy'; + time: any = '2022' + chartData: any = {} + + cardData1:any; + cardData2:any; + cardData3:any; + cardData4:any; + + constructor(private http: _HttpClient, private modal: ModalHelper, private ngZone: NgZone,public service: DataService, private datePipe: DatePipe) {} ngOnInit(): void { this.initSF(); + this.initdData(); } + initdData(){ + const params ={ + ...this.sf?.value, + timeType:this.mode ==='month'?'M':'Y', + time:this.time + } + this.service.request(this.service.$api_getBillRateQualified, params).subscribe(res => { + if (res) { + this.cardData1 = res; + this.cardData1.proportion = this.cardData1.proportion*100 +'%' + } + }); + this.service.request(this.service.$api_getBillRateProportion, params).subscribe(res => { + if (res) { + this.cardData2 = res; + this.cardData2.proportion = this.cardData2.proportion*100 +'%' + } + }); + this.service.request(this.service.$api_getBillRateDirectPayment, params).subscribe(res => { + if (res) { + this.cardData3 = res; + this.cardData3.proportion = this.cardData3.proportion*100 +'%' + } + }); + this.service.request(this.service.$api_getBillTimelyPayment, params).subscribe(res => { + if (res) { + this.cardData4 = res; + this.cardData4.proportion = this.cardData4.proportion*100 +'%' + } + }); + + this.service.request(this.service.$api_listMonitorSituation, params).subscribe(res => { + if (res) { + this.chartData = res + this.curve.reRender(); + + } + }) + } + + changeData(){ if(this.mode === 'year') { this.dateFormat = 'yyyy' } else if(this.mode === 'month') { this.dateFormat = 'yyyy-MM' - } else { - this.dateFormat = 'yyyy-MM-dd' - } + } + } onChange(result: any) { if(this.mode === 'year') { - this.time = [this.datePipe.transform(this.date, 'yyyy') + '-01-01 00:00:00'] + this.time = this.datePipe.transform(this.date, 'yyyy') } else if(this.mode === 'month') { - this.time = [this.datePipe.transform(this.date, 'yyyy-MM') + '-01 00:00:00'] + this.time = this.datePipe.transform(this.date, 'yyyy-MM') } + this.initdData(); } initSF() { this.schema = { properties: { - name: { + enterpriseInfoId: { type: 'string', title: '', ui: { widget: 'select', - placeholder: '网络货运人' + placeholder: '网络货运人', + asyncData: () => this.service.getNetworkFreightForwarder({}), + change:()=>{ + this.initdData(); + }, + allowClear: true } }, - name2: { + enterpriseProjectId: { type: 'string', title: '', ui: { @@ -64,11 +123,12 @@ export class DatatableComplianceIndexComponent implements OnInit { placeholder: '部门' } }, - name3: { + salesmanId: { type: 'string', title: '', ui: { - placeholder: '业务员' + placeholder: '业务员', + enter: () => this.initdData(), } } } @@ -81,6 +141,9 @@ export class DatatableComplianceIndexComponent implements OnInit { } + + + render(el: ElementRef) { this.ngZone.runOutsideAngular(() => this.init(el.nativeElement)); } diff --git a/src/app/routes/datatable/components/financetable/curve/curve.component.ts b/src/app/routes/datatable/components/financetable/curve/curve.component.ts index 9f345eda..66ef76b1 100644 --- a/src/app/routes/datatable/components/financetable/curve/curve.component.ts +++ b/src/app/routes/datatable/components/financetable/curve/curve.component.ts @@ -66,16 +66,22 @@ export class FinanceTableCurveComponent implements OnInit,OnChanges { this.chart.axis('number', { label: { formatter: (val: any) => { - return val; + return val*100+ ' %'; }, }, }); + this.chart .line() .position('time*number') .color('name') - + .tooltip('name*number', (name:any, value:any) => { + return { + name: name, + value: value*100 + '%' + }; + }); this.chart.render(); diff --git a/src/app/routes/datatable/components/financetable/financetable.component.html b/src/app/routes/datatable/components/financetable/financetable.component.html index 25eded17..b9c25062 100644 --- a/src/app/routes/datatable/components/financetable/financetable.component.html +++ b/src/app/routes/datatable/components/financetable/financetable.component.html @@ -50,7 +50,7 @@
- +
@@ -66,10 +66,10 @@
- +
- +
\ No newline at end of file diff --git a/src/app/routes/datatable/components/financetable/financetable.component.ts b/src/app/routes/datatable/components/financetable/financetable.component.ts index 9f8cf423..92464349 100644 --- a/src/app/routes/datatable/components/financetable/financetable.component.ts +++ b/src/app/routes/datatable/components/financetable/financetable.component.ts @@ -6,6 +6,8 @@ import { DataService } from '../../services/data.service'; import { differenceInCalendarDays } from 'date-fns'; import { OperationCurveComponent } from '../operationtable/curve/curve.component'; import { OperationPillarComponent } from '../operationtable/pillar/pillar.component'; +import { FinanceTableCurveComponent } from './curve/curve.component'; +import { FinancetablePillarComponent } from './pillar/pillar.component'; @Component({ selector: 'app-datatable-financetable', @@ -14,8 +16,8 @@ import { OperationPillarComponent } from '../operationtable/pillar/pillar.compon providers: [DatePipe] }) export class DatatableFinancetableComponent implements OnInit { - @ViewChild('curve') private readonly curve!: OperationCurveComponent; - @ViewChild('pillar') private readonly pillar!: OperationPillarComponent; + @ViewChild('curve') private readonly curve!: FinanceTableCurveComponent; + @ViewChild('pillar') private readonly pillar!: FinancetablePillarComponent; @ViewChild('st') private readonly st!: STComponent; type = 1; mode = 'year'; @@ -85,7 +87,7 @@ export class DatatableFinancetableComponent implements OnInit { enterpriseInfoId: this.enterpriseInfoId }; this.flag = true - this.service.request(this.service.$api_operationalReportHistogram, params).subscribe(res => { + this.service.request(this.service.$api_financialReportHistogram, params).subscribe(res => { if (res) { this.chartData = res if(this.flag) { @@ -148,6 +150,7 @@ export class DatatableFinancetableComponent implements OnInit { } else if(this.mode === 'month') { this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00'] } + this.initPillarData(); } } diff --git a/src/app/routes/datatable/datatable.module.ts b/src/app/routes/datatable/datatable.module.ts index 0eaeb61f..a1a054d8 100644 --- a/src/app/routes/datatable/datatable.module.ts +++ b/src/app/routes/datatable/datatable.module.ts @@ -27,6 +27,7 @@ import { OperationPillarComponent } from './components/operationtable/pillar/pil import { OperationCurveComponent } from './components/operationtable/curve/curve.component'; import { FinanceTableCurveComponent } from './components/financetable/curve/curve.component'; import { FinancetablePillarComponent } from './components/financetable/pillar/pillar.component'; +import { ComplianceCurveComponent } from './components/compliance/index/curve/curve.component'; const COMPONENTS: Type[] = [ DatatableDataindexComponent, @@ -56,7 +57,8 @@ const COMPONENTS: Type[] = [ OperationCurveComponent, DatatableReportingFundInfoComponent, FinanceTableCurveComponent, - FinancetablePillarComponent + FinancetablePillarComponent, + ComplianceCurveComponent ] diff --git a/src/app/routes/datatable/reporting/components/fund-info/fund-info.component.html b/src/app/routes/datatable/reporting/components/fund-info/fund-info.component.html index ec41a240..4714651b 100644 --- a/src/app/routes/datatable/reporting/components/fund-info/fund-info.component.html +++ b/src/app/routes/datatable/reporting/components/fund-info/fund-info.component.html @@ -1,14 +1,15 @@ - - - -
-
{{item.expenseName}}:{{item.price | currency}}
-
-
-
+
+ + + +
+
{{item.expenseName}}:{{item.price | currency}}
+
+
+
+
- diff --git a/src/app/routes/datatable/reporting/services/reporting.service.ts b/src/app/routes/datatable/reporting/services/reporting.service.ts index ff73672a..4f0ebcd3 100644 --- a/src/app/routes/datatable/reporting/services/reporting.service.ts +++ b/src/app/routes/datatable/reporting/services/reporting.service.ts @@ -6,7 +6,7 @@ import { BaseService } from '@shared'; }) export class ReportingService extends BaseService { - $api_get_order_reporting_page = `/api/sdc/billOperate/listWholePage`; // 订单上报列表 + $api_get_order_reporting_page = `/api/sdc/regulation/list/page`; // 订单上报列表 $api_recall_reporting = ``; // 撤回 $api_async_export_order_reporting_list = ``; // 导出订单上报 $api_get_upload_setting = ``; // 修改上传设置 @@ -16,6 +16,8 @@ export class ReportingService extends BaseService { $api_fund_reporting_upload = `/api/fcc/fundUploadHead/uploadFundNumber`; // 资金批量上传 $api_fund_reporting_recall = `/api/fcc/fundUploadHead/recallUploadFundNumber`; //资金批量撤回 $api_get_fund_valid_result = `/api/fcc/capitalFieldCheck/getCapitalFieldCheckList`; // 查询资金校验表 + + constructor(public injector: Injector) { super(injector); } diff --git a/src/app/routes/datatable/services/data.service.ts b/src/app/routes/datatable/services/data.service.ts index ff5b2a14..f8bf590d 100644 --- a/src/app/routes/datatable/services/data.service.ts +++ b/src/app/routes/datatable/services/data.service.ts @@ -42,8 +42,20 @@ export class DataService extends BaseService { // 查询货主报表 $api_listShipperReportPage = `/api/sdc/report/listShipperReportPage`; - // 查询货主报表 + // 财务报表柱状图 $api_financialReportHistogram = `/api/sdc/report/financialReportHistogram`; + // 合规监控报表-运费直付占比 + $api_getBillRateDirectPayment = `/api/sdc/reportComplianceMonitor/getBillRateDirectPayment`; + // 合规监控报表-货源单占比 + $api_getBillRateProportion = `/api/sdc/reportComplianceMonitor/getBillRateProportion`; + // 合规监控报表-订单合格率 + $api_getBillRateQualified = `/api/sdc/reportComplianceMonitor/getBillRateQualified`; + // 合规监控报表-付款及时率 + $api_getBillTimelyPayment = `/api/sdc/reportComplianceMonitor/getBillTimelyPayment`; + // 合规监控报表-监控报表(折线图) + $api_listMonitorSituation = `/api/sdc/reportComplianceMonitor/listMonitorSituation`; + + constructor(public injector: Injector) { super(injector); diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts index 265d5c0f..04957c1b 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts @@ -397,25 +397,25 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { { text: '生成电子单据', click: _record => this.generate(_record, 2), - iif: item => !item?.loadingLadingBillFilePath, + iif: item => !item?.loadingElectronicsLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] }, }, { text: '通过', click: _record => this.sign(_record), - iif: item => !item?.loadingLadingBillFilePath, + iif: item => !item?.loadingElectronicsLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] }, }, { text: '修改', click: _record => this.modification(_record), - iif: item => !item?.loadingLadingBillFilePath, + iif: item => !item?.loadingElectronicsLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }, }, { text: '查看凭证', click: _record => this.generate(_record, 3), - iif: item => item?.loadingLadingBillFilePath, + iif: item => item?.loadingElectronicsLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-view'] }, }, ] diff --git a/src/app/routes/order-management/components/risk/risk.component.html b/src/app/routes/order-management/components/risk/risk.component.html index 2bde8ffd..df5ff43f 100644 --- a/src/app/routes/order-management/components/risk/risk.component.html +++ b/src/app/routes/order-management/components/risk/risk.component.html @@ -33,7 +33,7 @@
- +