From c4846874135544e92995e9899f57d845ec3c147d Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 6 Apr 2022 14:38:10 +0800 Subject: [PATCH 1/5] fix bug --- .../customindex/curve/curve.component.html | 1 + .../customindex/curve/curve.component.less | 0 .../customindex/curve/curve.component.ts | 81 ++++++++++ .../customindex/customindex.component.html | 20 ++- .../customindex/customindex.component.ts | 142 ++++++++++++------ src/app/routes/datatable/datatable.module.ts | 4 +- .../routes/datatable/services/data.service.ts | 10 +- .../components/bulk/bulk.component.ts | 6 +- .../compliance-audit.component.ts | 6 +- .../receipts-audit.component.ts | 6 +- .../components/risk/risk.component.ts | 6 +- .../components/vehicle/vehicle.component.ts | 6 +- .../components/bulk/bulk.component.ts | 6 +- .../components/vehicle/vehicle.component.ts | 6 +- .../components/bulk/bulk.component.ts | 6 +- .../components/vehicle/vehicle.component.ts | 6 +- 16 files changed, 213 insertions(+), 99 deletions(-) create mode 100644 src/app/routes/datatable/components/customtable/customindex/curve/curve.component.html create mode 100644 src/app/routes/datatable/components/customtable/customindex/curve/curve.component.less create mode 100644 src/app/routes/datatable/components/customtable/customindex/curve/curve.component.ts diff --git a/src/app/routes/datatable/components/customtable/customindex/curve/curve.component.html b/src/app/routes/datatable/components/customtable/customindex/curve/curve.component.html new file mode 100644 index 00000000..0640a4d4 --- /dev/null +++ b/src/app/routes/datatable/components/customtable/customindex/curve/curve.component.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app/routes/datatable/components/customtable/customindex/curve/curve.component.less b/src/app/routes/datatable/components/customtable/customindex/curve/curve.component.less new file mode 100644 index 00000000..e69de29b diff --git a/src/app/routes/datatable/components/customtable/customindex/curve/curve.component.ts b/src/app/routes/datatable/components/customtable/customindex/curve/curve.component.ts new file mode 100644 index 00000000..6ea07ece --- /dev/null +++ b/src/app/routes/datatable/components/customtable/customindex/curve/curve.component.ts @@ -0,0 +1,81 @@ +import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; +import { Chart } from '@antv/g2'; +import { DataService } from 'src/app/routes/datatable/services/data.service'; +@Component({ + selector: 'app-datatable-customindex-curve', + templateUrl: './curve.component.html', + styleUrls: ['./curve.component.less'] +}) +export class DatatableCustomindexCurveComponent 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(() => { + this.ngZone.runOutsideAngular(() => this.init(this.el)); + },500) + } + + 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: { + nice: true, + }, + }); + + this.chart.tooltip({ + showCrosshairs: true, + shared: true, + }); + + this.chart.axis('number', { + label: { + formatter: (val: any) => { + return val; + }, + }, + }); + + this.chart + .line() + .position('time*number') + .color('name') + + + this.chart.render(); + + } + +} \ No newline at end of file diff --git a/src/app/routes/datatable/components/customtable/customindex/customindex.component.html b/src/app/routes/datatable/components/customtable/customindex/customindex.component.html index 4583cab7..b7e6b600 100644 --- a/src/app/routes/datatable/components/customtable/customindex/customindex.component.html +++ b/src/app/routes/datatable/components/customtable/customindex/customindex.component.html @@ -1,20 +1,30 @@ +
- +
- +
- +
- +
@@ -55,5 +65,5 @@ - + \ No newline at end of file diff --git a/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts b/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts index e290bb54..fbc7ba9e 100644 --- a/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts +++ b/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts @@ -3,32 +3,30 @@ import { STColumn, STComponent } from '@delon/abc/st'; import { DatePipe, _HttpClient } from '@delon/theme'; import { differenceInCalendarDays } from 'date-fns'; import { DataService } from '../../../services/data.service'; -import { OperationCurveComponent } from '../../operationtable/curve/curve.component'; +import { DatatableCustomindexCurveComponent } from './curve/curve.component'; @Component({ selector: 'app-datatable-customindex', templateUrl: './customindex.component.html', styleUrls: ['./customindex.component.less'], providers: [DatePipe] - }) export class DatatableCustomindexComponent implements OnInit { @ViewChild('st') private readonly st!: STComponent; - @ViewChild('curve') private readonly curve!: OperationCurveComponent; + @ViewChild('curve') private readonly curve!: DatatableCustomindexCurveComponent; type = 1; mode = 'year'; date: any = null; defineDate = []; - time: any = ['2022-01-01 00:00:00'] + time: any = ['2022-01-01 00:00:00']; dateFormat = 'yyyy'; today = new Date(); dateNext: any = null; modeNext = 'year'; - timeNext: any = ['2022-01-01 00:00:00'] + timeNext: any = ['2022-01-01 00:00:00']; chartData: any; flag = false; - columns: STColumn[] = [ { title: '用户类型', index: 'networkTransporterName', className: 'text-center' }, { title: '用户总数', index: 'zsl', className: 'text-center' }, @@ -39,18 +37,22 @@ export class DatatableCustomindexComponent implements OnInit { { title: '流失用户数', index: 'djd', className: 'text-center' }, { title: '流失率', index: 'ysz', className: 'text-center' } ]; + hzData: any; + hhrData: any; + sjData: any; + clData: any; /** * 查询参数 */ get reqParams() { if (this.mode === 'year') { - this.type = 1 + this.type = 1; } else if (this.mode === 'month') { - this.type = 2 + this.type = 2; } else if (this.mode === 'date') { - this.type = 3 + this.type = 3; } else { - this.type = 4 + this.type = 4; } let params: any = { time: this.time, @@ -61,50 +63,100 @@ export class DatatableCustomindexComponent implements OnInit { return { ...params }; } - constructor(public service: DataService, private datePipe: DatePipe) { } + constructor(public service: DataService, private datePipe: DatePipe) {} ngOnInit(): void { - this.initCurveData() + this.initCurveData(); } initCurveData() { - let type = 1 + let type = 1; if (this.mode === 'year') { - type = 1 + type = 1; } else if (this.mode === 'month') { - type = 2 + type = 2; } - const params: any = { - time: this.timeNext, - type - }; - this.flag = true - this.service.request(this.service.$api_operationalReportHistogram, params).subscribe(res => { - if (res) { - this.chartData = res - if (this.flag) { - this.curve.reRender() + // const params: any = { + // time: this.timeNext, + // type + // }; + this.flag = true; + + this.service + .request(this.service.$api_statistics_totalDetail, { + time: this.timeNext, + type: 1 + }) + .subscribe(res => { + if (res) { + this.chartData = res; } + }); + this.service.request(this.service.$api_statistics_totalDetail, { + time: this.timeNext, + type: 2 + }).subscribe(res => { + if (res) { + this.chartData = res; } - }) + }); + this.service.request(this.service.$api_statistics_totalDetail, { + time: this.timeNext, + type: 3 + }).subscribe(res => { + if (res) { + this.chartData = res; + } + }); + this.service.request(this.service.$api_statistics_totalDetail, { + time: this.timeNext, + type: 4 + }).subscribe(res => { + if (res) { + this.chartData = res; + } + }); + this.service.request(this.service.$api_statistics_total, { type: 1 }).subscribe(res => { + if (res) { + this.hzData = res; + } + }); + this.service.request(this.service.$api_statistics_total, { type: 2 }).subscribe(res => { + if (res) { + this.hhrData = res; + } + }); + this.service.request(this.service.$api_statistics_total, { type: 3 }).subscribe(res => { + if (res) { + this.sjData = res; + } + }); + this.service.request(this.service.$api_statistics_total, { type: 4 }).subscribe(res => { + if (res) { + this.clData = res; + } + }); } changeData() { if (this.mode === 'year') { - this.dateFormat = 'yyyy' + this.dateFormat = 'yyyy'; } else if (this.mode === 'month') { - this.dateFormat = 'yyyy-MM' + this.dateFormat = 'yyyy-MM'; } else { - this.dateFormat = 'yyyy-MM-dd' + 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') + '-01-01 00:00:00']; } 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') + '-01 00:00:00']; } else if (this.mode === 'date') { - this.time = [this.datePipe.transform(this.date, 'yyyy-MM-dd') + ' 00:00:00'] + this.time = [this.datePipe.transform(this.date, 'yyyy-MM-dd') + ' 00:00:00']; } else { - this.time = [this.datePipe.transform(this.defineDate[0], 'yyyy-MM-dd') + '00:00:00', this.datePipe.transform(this.defineDate[1], 'yyyy-MM-dd') + ' 00:00:00'] + this.time = [ + this.datePipe.transform(this.defineDate[0], 'yyyy-MM-dd') + '00:00:00', + this.datePipe.transform(this.defineDate[1], 'yyyy-MM-dd') + ' 00:00:00' + ]; } this.st.reload({ ...this.reqParams }); } @@ -112,24 +164,22 @@ export class DatatableCustomindexComponent implements OnInit { // Can not select days before today and today differenceInCalendarDays(current, this.today) > 0; - changeDataNext() { - if(this.mode === 'year') { - this.dateFormat = 'yyyy' - } else if(this.mode === 'month') { - this.dateFormat = 'yyyy-MM' + if (this.mode === 'year') { + this.dateFormat = 'yyyy'; + } else if (this.mode === 'month') { + this.dateFormat = 'yyyy-MM'; } } onChangeNext(result: any) { - if(result === null) { - return + if (result === null) { + return; } - if(this.mode === 'year') { - this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy') + '-01-01 00:00:00'] - } else if(this.mode === 'month') { - this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00'] + if (this.mode === 'year') { + this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy') + '-01-01 00:00:00']; + } else if (this.mode === 'month') { + this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00']; } - this.initCurveData() + this.initCurveData(); } - } diff --git a/src/app/routes/datatable/datatable.module.ts b/src/app/routes/datatable/datatable.module.ts index a2215935..83577595 100644 --- a/src/app/routes/datatable/datatable.module.ts +++ b/src/app/routes/datatable/datatable.module.ts @@ -29,6 +29,7 @@ import { DatatableDatascreenComponent } from './components/datascreen/datascreen import { FinancetablePillarComponent } from './components/financetable/pillar/pillar.component'; import { ComplianceCurveComponent } from './components/compliance/index/curve/curve.component'; import { BusitableCurveComponent } from './components/busitable/busiindex/curve/curve.component'; +import { DatatableCustomindexCurveComponent } from './components/customtable/customindex/curve/curve.component'; const COMPONENTS: Type[] = [ DatatableDataindexComponent, @@ -60,7 +61,8 @@ const COMPONENTS: Type[] = [ DatatableDatascreenComponent, FinancetablePillarComponent, ComplianceCurveComponent, - BusitableCurveComponent + BusitableCurveComponent, + DatatableCustomindexCurveComponent ] diff --git a/src/app/routes/datatable/services/data.service.ts b/src/app/routes/datatable/services/data.service.ts index 8e3c1163..63251569 100644 --- a/src/app/routes/datatable/services/data.service.ts +++ b/src/app/routes/datatable/services/data.service.ts @@ -4,8 +4,8 @@ * @Author : Shiming * @Date : 2021-12-27 10:30:56 * @LastEditors : Shiming - * @LastEditTime : 2022-01-18 17:14:59 - * @FilePath : \\tms-obc-web\\src\\app\\routes\\account\\services\\account.service.ts + * @LastEditTime : 2022-04-06 13:47:25 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\services\\data.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -58,6 +58,12 @@ export class DataService extends BaseService { $api_listMonitorSituation = `/api/sdc/reportComplianceMonitor/listMonitorSituation`; + // 客户报表-根据类型获取统计信息(card) + $api_statistics_total = `/api/mdc/cuc/statistics/total`; + // 客户报表-根据类型获取统计明细信息(table) + $api_statistics_totalDetail = `/api/mdc/cuc/statistics/totalDetail`; + + constructor(public injector: Injector) { super(injector); diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index 8fe0410e..00a306fb 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -851,10 +851,6 @@ export class OrderManagementBulkComponent implements OnInit { } // 导出 exprot() { - this.service.request(this.service.$api_get_asyncExportBulkList, this.reqParams).subscribe((res: any) => { - if (res) { - this.service.msgSrv.success('导出成功,请去下载中心下载!'); - } - }); + this.service.asyncExport(this.reqParams,this.service.$api_get_asyncExportBulkList); } } diff --git a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts index c6d77830..5ae60cc3 100644 --- a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts +++ b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts @@ -696,10 +696,6 @@ export class OrderManagementComplianceAuditComponent implements OnInit { } // 导出 exprot() { - this.service.request(this.service.$api_get_asyncExportSpotCheckList, this.reqParams).subscribe((res: any) => { - if (res) { - this.service.msgSrv.success('导出成功,请去下载中心下载!'); - } - }); + this.service.asyncExport(this.reqParams, this.service.$api_get_asyncExportSpotCheckList); } } 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 804c2839..a8b7fe1f 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 @@ -578,10 +578,6 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { } // 导出 exprot() { - this.service.request(this.service.$api_get_asyncExportExamineBillList, this.reqParams).subscribe((res: any) => { - if (res) { - this.service.msgSrv.success('导出成功,请去下载中心下载!'); - } - }); + this.service.asyncExport(this.reqParams, this.service.$api_get_asyncExportExamineBillList); } } diff --git a/src/app/routes/order-management/components/risk/risk.component.ts b/src/app/routes/order-management/components/risk/risk.component.ts index 1e3a85d0..14e690d7 100644 --- a/src/app/routes/order-management/components/risk/risk.component.ts +++ b/src/app/routes/order-management/components/risk/risk.component.ts @@ -534,10 +534,6 @@ export class OrderManagementRiskComponent implements OnInit { } // 导出 exprot() { - this.service.request(this.service.$api_get_asyncExportRiskBillList, this.reqParams).subscribe((res: any) => { - if (res) { - this.service.msgSrv.success('导出成功,请去下载中心下载!'); - } - }); + this.service.asyncExport(this.reqParams, this.service.$api_get_asyncExportRiskBillList); } } diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 64a39077..386a0fc6 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -866,10 +866,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme } // 导出 exprot() { - this.service.request(this.service.$api_get_asyncExportWholeList, this.reqParams).subscribe((res: any) => { - if (res) { - this.service.msgSrv.success('导出成功,请去下载中心下载!'); - } - }); + this.service.asyncExport(this.reqParams, this.service.$api_get_asyncExportWholeList); } } diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index 35bb9a3a..14fddd9a 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -568,10 +568,6 @@ export class SupplyManagementBulkComponent implements OnInit { userAction() {} // 导出 exportFire() { - this.service.request(this.service.$api_asyncExportBulkList, this.reqParams).subscribe((res: any) => { - if (res) { - this.service.msgSrv.success('导出成功,请去下载中心下载!'); - } - }); + this.service.asyncExport(this.reqParams, this.service.$api_asyncExportBulkList); } } diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts index ce7d90c6..c469dc82 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -685,10 +685,6 @@ export class SupplyManagementVehicleComponent implements OnInit { } // 导出 exportFire() { - this.service.request(this.service.$api_asyncExportWholeList, this.reqParams).subscribe((res: any) => { - if (res) { - this.service.msgSrv.success('导出成功,请去下载中心下载!'); - } - }); + this.service.asyncExport(this.reqParams, this.service.$api_asyncExportWholeList); } } diff --git a/src/app/routes/waybill-management/components/bulk/bulk.component.ts b/src/app/routes/waybill-management/components/bulk/bulk.component.ts index e2c103eb..92344617 100644 --- a/src/app/routes/waybill-management/components/bulk/bulk.component.ts +++ b/src/app/routes/waybill-management/components/bulk/bulk.component.ts @@ -477,10 +477,6 @@ export class WaybillManagementBulkComponent implements OnInit { } // 导出 exprot() { - this.service.request(this.service.$api_asyncExportBulkList, this.reqParams).subscribe((res: any) => { - if (res) { - this.service.msgSrv.success('导出成功,请去下载中心下载!'); - } - }); + this.service.asyncExport(this.reqParams,this.service.$api_asyncExportBulkList) } } diff --git a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts index 30bce172..132e0836 100644 --- a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts @@ -486,10 +486,6 @@ export class WaybillManagementVehicleComponent implements OnInit { } // 导出 exprot() { - this.service.request(this.service.$api_asyncExportWholeList, this.reqParams).subscribe((res: any) => { - if (res) { - this.service.msgSrv.success('导出成功,请去下载中心下载!'); - } - }); + this.service.asyncExport(this.reqParams, this.service.$api_asyncExportWholeList); } } From 7a459bb0317151ab1ea69d0697df05cf5aa46f3f Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 6 Apr 2022 14:40:57 +0800 Subject: [PATCH 2/5] edit --- .../payment-order-detail.component.html | 2 +- .../system-logs/system-logs.component.html | 2 +- .../system-supply-logs.component.html | 27 ++++++------------- .../system-supply-logs.component.ts | 2 +- .../user-logs/user-logs.component.html | 2 +- .../version-logs/version-logs.component.html | 2 +- 6 files changed, 13 insertions(+), 24 deletions(-) diff --git a/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html b/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html index 0c3e3031..3c575c32 100644 --- a/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html +++ b/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html @@ -29,7 +29,7 @@ {{headerInfo?.ltdAccountId}} - {{headerInfo?.payMoney | currency}} + {{headerInfo?.ishrhxLabel}}
diff --git a/src/app/routes/logs/components/system-logs/system-logs.component.html b/src/app/routes/logs/components/system-logs/system-logs.component.html index f84204c8..ebbf215b 100644 --- a/src/app/routes/logs/components/system-logs/system-logs.component.html +++ b/src/app/routes/logs/components/system-logs/system-logs.component.html @@ -3,7 +3,7 @@
- +
diff --git a/src/app/routes/logs/components/system-supply-logs/system-supply-logs.component.html b/src/app/routes/logs/components/system-supply-logs/system-supply-logs.component.html index 3940755c..a1b61545 100644 --- a/src/app/routes/logs/components/system-supply-logs/system-supply-logs.component.html +++ b/src/app/routes/logs/components/system-supply-logs/system-supply-logs.component.html @@ -11,32 +11,21 @@
- +
- +
- - + [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false" + [scroll]="{ y: '370px' }"> + \ No newline at end of file diff --git a/src/app/routes/logs/components/system-supply-logs/system-supply-logs.component.ts b/src/app/routes/logs/components/system-supply-logs/system-supply-logs.component.ts index 998d6ca1..53edd71b 100644 --- a/src/app/routes/logs/components/system-supply-logs/system-supply-logs.component.ts +++ b/src/app/routes/logs/components/system-supply-logs/system-supply-logs.component.ts @@ -34,7 +34,7 @@ export class SystemSupplyLogsComponent implements OnInit { } }, time: { - title: '登录时间', + title: '操作时间', type: 'string', ui: { widget: 'sl-from-to-search', diff --git a/src/app/routes/logs/components/user-logs/user-logs.component.html b/src/app/routes/logs/components/user-logs/user-logs.component.html index 83422b67..ea2aff40 100644 --- a/src/app/routes/logs/components/user-logs/user-logs.component.html +++ b/src/app/routes/logs/components/user-logs/user-logs.component.html @@ -4,7 +4,7 @@
-
diff --git a/src/app/routes/logs/components/version-logs/version-logs.component.html b/src/app/routes/logs/components/version-logs/version-logs.component.html index 3421d3aa..3eff1b25 100644 --- a/src/app/routes/logs/components/version-logs/version-logs.component.html +++ b/src/app/routes/logs/components/version-logs/version-logs.component.html @@ -13,7 +13,7 @@
- +
From d74845021f3815049b78047647ca1719bca0aea4 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 6 Apr 2022 14:48:24 +0800 Subject: [PATCH 3/5] edit --- .../dist/recharge-record.component.js | 252 ------------------ .../recharge-record.component.ts | 11 +- .../services/freight-account.service.ts | 2 + 3 files changed, 11 insertions(+), 254 deletions(-) delete mode 100644 src/app/routes/financial-management/components/recharge-record/dist/recharge-record.component.js diff --git a/src/app/routes/financial-management/components/recharge-record/dist/recharge-record.component.js b/src/app/routes/financial-management/components/recharge-record/dist/recharge-record.component.js deleted file mode 100644 index d6f8ba31..00000000 --- a/src/app/routes/financial-management/components/recharge-record/dist/recharge-record.component.js +++ /dev/null @@ -1,252 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -exports.__esModule = true; -exports.RechargeRecordComponent = void 0; -var core_1 = require("@angular/core"); -var RechargeRecordComponent = /** @class */ (function () { - function RechargeRecordComponent(service, modal) { - var _this = this; - this.service = service; - this.modal = modal; - this.columns = this.initST(); - this.searchSchema = this.initSF(); - this.rechargeRemark = ''; - this._$expand = false; - this.beforeReq = function (requestOptions) { - if (_this.sf) { - Object.assign(requestOptions.body, __assign({}, _this.sf.value)); - } - return requestOptions; - }; - } - RechargeRecordComponent.prototype.ngOnInit = function () { }; - RechargeRecordComponent.prototype.addRemark = function (item) { - var _this = this; - this.rechargeRemark = item.rechargeRemark; - var modal = this.modal.create({ - nzTitle: this.rechargeRemark ? '修改备注' : '添加备注', - nzContent: this.remarkodal, - nzFooter: [ - { - type: 'primary', - label: '确认', - loading: function () { return _this.service.http.loading; }, - onClick: function () { - modal.destroy(); - } - } - ] - }); - }; - RechargeRecordComponent.prototype.goBack = function () { - history.go(-1); - }; - /** - * 重置表单 - */ - RechargeRecordComponent.prototype.resetSF = function () { - this.sf.reset(); - this._$expand = false; - }; - /** - * 伸缩查询条件 - */ - RechargeRecordComponent.prototype.expandToggle = function () { - var _a; - this._$expand = !this._$expand; - (_a = this.sf) === null || _a === void 0 ? void 0 : _a.setValue('/expand', this._$expand); - }; - RechargeRecordComponent.prototype.exportList = function () { - this.service.downloadFile(this.service.$mock_url, __assign(__assign({}, this.sf.value), { pageSize: -1 })); - }; - RechargeRecordComponent.prototype.initSF = function () { - var _this = this; - return { - properties: { - expand: { - type: 'boolean', - ui: { - hidden: true - } - }, - rechargeNo: { - type: 'string', - title: '充值单号', - ui: { - placeholder: '请输入' - } - }, - rechargeStatus: { - type: 'string', - title: '充值状态', - "enum": [ - { label: '全部', value: '' }, - { label: '充值中', value: '1' }, - { label: '充值失败', value: '2' }, - { label: '充值成功', value: '3' } - ], - ui: { - widget: 'select', - placeholder: '请选择' - }, - "default": '' - }, - createTime: { - title: '充值时间', - type: 'string', - ui: { - widget: 'date', - mode: 'range', - format: 'yyyy-MM-dd' - } - }, - roleName: { - type: 'string', - title: '账户名称', - ui: { - placeholder: '请输入', - autocomplete: 'off', - visibleIf: { - expand: function (value) { return value; } - } - } - }, - accountType: { - type: 'string', - title: '账户类型', - "enum": [ - { label: '全部', value: '' }, - { label: '货主账户', value: '1' }, - { label: '司机账户', value: '2' }, - { label: '营商商账户', value: '3' } - ], - ui: { - widget: 'select', - placeholder: '请选择', - visibleIf: { - expand: function (value) { return value; } - } - }, - "default": '' - }, - ltdId: { - type: 'string', - title: '网络货运人', - ui: { - widget: 'select', - placeholder: '请选择', - visibleIf: { - expand: function (value) { return value; } - }, - allowClear: true, - asyncData: function () { return _this.service.getNetworkFreightForwarder(); } - } - }, - bankType: { - type: 'string', - title: '银行类型', - "enum": [ - { label: '全部', value: '' }, - { label: '平安银行', value: '1' }, - { label: '浦发银行', value: '2' } - ], - ui: { - widget: 'select', - placeholder: '请选择', - visibleIf: { - expand: function (value) { return value; } - } - }, - "default": '' - } - } - }; - }; - RechargeRecordComponent.prototype.initST = function () { - var _this = this; - return [ - { title: '充值时间', index: 'createTime', type: 'date', width: 180 }, - { title: '充值单号', index: 'rechargeNo', width: 140 }, - { title: '网络货运人', index: 'ltdName', width: 160 }, - { title: '银行类型', index: 'bankTypeLabel', width: 100 }, - { title: '账户类型', index: 'accountTypeLabel', width: 100 }, - { title: '账户名称', index: 'roleName', width: 160 }, - { title: '虚拟账户', index: 'virtualAccount', width: 100 }, - { - title: '充值金额', - index: 'rechargeAmount', - width: 160, - type: 'widget', - className: 'text-right', - widget: { type: 'currency-chy', params: function (_a) { - var record = _a.record; - return ({ value: record.rechargeAmount }); - } } - }, - { title: '充值银行账户', render: 'transferBankAccount', width: 200 }, - { title: '充值方式', index: 'payChannelLabel', width: 100 }, - { title: '充值状态', index: 'rechargeStatusLabel', width: 100 }, - { title: '银行流水号', index: 'paySerialNumber', width: 120 }, - { - title: '操作', - width: 120, - fixed: 'right', - className: 'text-center', - buttons: [ - { type: 'divider' }, - { - text: '查看回单
', - click: function (item) { - return _this.service.getReceiptUrl(item.receiptUrl, { - bankType: item.bankType, - rmYll: item.roleId, - snglFlgCd: item.paySerialNumber2, - bussType: '06', - ltdId: item.ltdId, - accountType: item.accountType - }); - } - }, - { - text: '添加备注', - click: function (item) { return _this.addRemark(item); } - } - ] - } - ]; - }; - __decorate([ - core_1.ViewChild('st', { static: true }) - ], RechargeRecordComponent.prototype, "st"); - __decorate([ - core_1.ViewChild('sf', { static: false }) - ], RechargeRecordComponent.prototype, "sf"); - __decorate([ - core_1.ViewChild('remarkodal', { static: true }) - ], RechargeRecordComponent.prototype, "remarkodal"); - RechargeRecordComponent = __decorate([ - core_1.Component({ - selector: 'app-recharge-record', - templateUrl: './recharge-record.component.html', - styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] - }) - ], RechargeRecordComponent); - return RechargeRecordComponent; -}()); -exports.RechargeRecordComponent = RechargeRecordComponent; diff --git a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts index bb067549..e45f63bb 100644 --- a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts +++ b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts @@ -34,7 +34,7 @@ export class RechargeRecordComponent implements OnInit { }; addRemark(item: any) { - this.rechargeRemark = item.rechargeRemark; + this.rechargeRemark = item.remark; const modal = this.modal.create({ nzTitle: this.rechargeRemark ? '修改备注' : '添加备注', nzContent: this.remarkodal, @@ -44,7 +44,14 @@ export class RechargeRecordComponent implements OnInit { label: '确认', loading: () => this.service.http.loading, onClick: () => { - modal.destroy(); + this.service.request(this.service.$api_edit_remark, { id: item.id, remark: this.rechargeRemark }).subscribe(res => { + if (res) { + this.service.msgSrv.success('修改成功'); + this.st.load(1); + modal.destroy(); + } + }); + return false; } } ] diff --git a/src/app/routes/financial-management/services/freight-account.service.ts b/src/app/routes/financial-management/services/freight-account.service.ts index f9bcbac8..60242ceb 100644 --- a/src/app/routes/financial-management/services/freight-account.service.ts +++ b/src/app/routes/financial-management/services/freight-account.service.ts @@ -76,6 +76,8 @@ export class FreightAccountService extends ShipperBaseService { $api_get_abnormal_gold_page = '/api/fcc/rechargeInfo/list/page'; // 运营端获取账户余额交易明细 $api_get_account_blance = '/api/fcc/accountBalanceDetail/getAccountBalanceByPage'; + // 添加备注 + $api_edit_remark = '/api/fcc/rechargeInfo/addRemark'; // 查询费用单抬头 $api_get_cost_page = '/api/fcc/ficoFeeH/list/page'; From e0073230e5ea8f3bb296f96bb2f7f96e3b8389a5 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 6 Apr 2022 15:12:45 +0800 Subject: [PATCH 4/5] fix bug --- .../customindex/customindex.component.html | 51 +++++++++++++++---- .../customindex/customindex.component.ts | 30 ++++++----- .../vehicle-detail-change.component.ts | 12 +---- .../vehicle-detail.component.ts | 12 +---- 4 files changed, 61 insertions(+), 44 deletions(-) diff --git a/src/app/routes/datatable/components/customtable/customindex/customindex.component.html b/src/app/routes/datatable/components/customtable/customindex/customindex.component.html index b7e6b600..3231c1ac 100644 --- a/src/app/routes/datatable/components/customtable/customindex/customindex.component.html +++ b/src/app/routes/datatable/components/customtable/customindex/customindex.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-04-06 13:20:56 * @LastEditors : Shiming - * @LastEditTime : 2022-04-06 13:55:19 + * @LastEditTime : 2022-04-06 15:00:01 * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\customtable\\customindex\\customindex.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -39,17 +39,43 @@
- - + +
- - + [scroll]="{ x: '1200px' }" + [res]="{ reName: { list: 'data', total: 'data.total' } }" + [page]="{ show: false, showSize: false, pageSizes: [20, 50, 100] }" + > + +
货主
+
合伙人
+
司机
+
车辆
+
+
@@ -60,10 +86,15 @@
- +
- -
\ No newline at end of file + + diff --git a/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts b/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts index fbc7ba9e..416aad88 100644 --- a/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts +++ b/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts @@ -28,19 +28,21 @@ export class DatatableCustomindexComponent implements OnInit { flag = false; columns: STColumn[] = [ - { title: '用户类型', index: 'networkTransporterName', className: 'text-center' }, - { title: '用户总数', index: 'zsl', className: 'text-center' }, - { title: '已认证数量', index: 'yingsje', className: 'text-center' }, - { title: '活跃用户数', index: 'cys', className: 'text-center' }, - { title: '未激活用户数', index: 'yingfyf', className: 'text-center' }, - { title: '沉默用户数', index: 'yl', className: 'text-center' }, - { title: '流失用户数', index: 'djd', className: 'text-center' }, - { title: '流失率', index: 'ysz', className: 'text-center' } + { title: '用户类型', render: 'type', className: 'text-center' }, + { title: '用户总数', index: '总数', className: 'text-center' }, + { title: '已认证数量', index: 'auditPassTotal', className: 'text-center' }, + { title: '活跃用户数', index: 'activeTotal', className: 'text-center' }, + { title: '未激活用户数', index: 'notActivationTotal', className: 'text-center' }, + { title: '沉默用户数', index: 'silentTotal', className: 'text-center' }, + { title: '流失用户数', index: 'drainTotal', className: 'text-center' }, + { title: '流失率', index: 'drainRate', className: 'text-center' } ]; hzData: any; hhrData: any; sjData: any; clData: any; + reportData: any = []; + /** * 查询参数 */ @@ -79,15 +81,14 @@ export class DatatableCustomindexComponent implements OnInit { // type // }; this.flag = true; - this.service .request(this.service.$api_statistics_totalDetail, { time: this.timeNext, - type: 1 + type: 1 //用户角色类型 1:货主 2:合伙人 3:司机 4:车辆 }) .subscribe(res => { if (res) { - this.chartData = res; + this.reportData.push(res); } }); this.service.request(this.service.$api_statistics_totalDetail, { @@ -95,7 +96,7 @@ export class DatatableCustomindexComponent implements OnInit { type: 2 }).subscribe(res => { if (res) { - this.chartData = res; + this.reportData.push(res); } }); this.service.request(this.service.$api_statistics_totalDetail, { @@ -103,7 +104,7 @@ export class DatatableCustomindexComponent implements OnInit { type: 3 }).subscribe(res => { if (res) { - this.chartData = res; + this.reportData.push(res); } }); this.service.request(this.service.$api_statistics_totalDetail, { @@ -111,7 +112,8 @@ export class DatatableCustomindexComponent implements OnInit { type: 4 }).subscribe(res => { if (res) { - this.chartData = res; + this.reportData.push(res); + this.st.reload(); } }); this.service.request(this.service.$api_statistics_total, { type: 1 }).subscribe(res => { diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts index d00cc627..2132950a 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-23 13:39:58 * @LastEditors : Shiming - * @LastEditTime : 2022-03-23 14:49:18 + * @LastEditTime : 2022-04-06 15:12:24 * @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. */ @@ -83,15 +83,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { { 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' } - } + index: 'paymentStatusLabel', } ]; trajectory = 'car'; diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts index 2089b4f3..099775a6 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-29 16:08:56 + * @LastEditTime : 2022-04-06 15:12:10 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -55,15 +55,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit { { 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' } - } + index: 'paymentStatusLabel', } ]; constructor( From 9fefb78dd80f9ef9b35adbb7f9f9248eddbd08da Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 6 Apr 2022 15:41:23 +0800 Subject: [PATCH 5/5] fix bug --- .../bulk-detail-change/bulk-detail-change.component.html | 4 ++-- .../components/bulk-detail/bulk-detail.component.html | 2 +- .../vehicle-detail-change.component.html | 2 +- .../components/vehicle-detail/vehicle-detail.component.html | 4 ++-- .../components/bulk-detail/bulk-detail.component.html | 4 ++-- .../waybill-management/components/bulk/bulk.component.ts | 3 +++ .../components/vehicle-detail/vehicle-detail.component.html | 4 ++-- .../components/vehicle/vehicle.component.ts | 3 +++ 8 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html index 532c7369..38b54fcb 100644 --- a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-24 16:58:02 * @LastEditors : Shiming - * @LastEditTime : 2022-04-01 10:58:50 + * @LastEditTime : 2022-04-06 15:40:05 * @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. --> @@ -275,7 +275,7 @@ 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}%)
-
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? "/" + i?.payeePhone : ''}}
+
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? "/" + i?.payeePhone : ''}}
diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html index 1bb3fc7c..46a6cfea 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html @@ -156,7 +156,7 @@ 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}%)
-
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? "/" + i?.payeePhone : ''}}
+
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? "/" + i?.payeePhone : ''}}
diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html index 31a07be6..33d7ebdc 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html @@ -253,7 +253,7 @@ 总计:{{ i?.totalAmount | currency }} (运费{{ i?.totalFreight | currency }}, 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}% ) -
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? "/" + i?.payeePhone : ''}}
+
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? "/" + i?.payeePhone : ''}}
diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index 12a00d05..52a85b12 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-04-01 11:06:21 + * @LastEditTime : 2022-04-06 15:39:20 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -170,7 +170,7 @@ 总计:{{ i?.totalAmount | currency }} (运费{{ i?.totalFreight | currency }}, 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2) }}% ) -
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? '/' + i?.payeePhone : '' }}
+
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? '/' + i?.payeePhone : '' }}
diff --git a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html index c226dd63..c264cc4d 100644 --- a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html @@ -1,7 +1,7 @@