Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
		
							
								
								
									
										3
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | { | ||||||
|  |     "compile-hero.disable-compile-files-on-did-save-code": false | ||||||
|  | } | ||||||
| @ -20,7 +20,7 @@ module.exports = { | |||||||
|   // } |   // } | ||||||
|   '//api': { |   '//api': { | ||||||
|     target: { |     target: { | ||||||
|       host: 'tms-api-test.eascs.com', |       host: 'tms-api-dev.eascs.com', | ||||||
|       protocol: 'https:', |       protocol: 'https:', | ||||||
|       port: 443 |       port: 443 | ||||||
|     }, |     }, | ||||||
|  | |||||||
| @ -17,7 +17,7 @@ const alainConfig: AlainConfig = { | |||||||
|     page: { show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000], toTop: false }, |     page: { show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000], toTop: false }, | ||||||
|     modal: { size: 'lg' } |     modal: { size: 'lg' } | ||||||
|   }, |   }, | ||||||
|   sf: { button: { search: '查询' }, ui: { placeholder: '请输入' } }, |   sf: { button: { search: '查询' } }, | ||||||
|   pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true }, |   pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true }, | ||||||
|   auth: { login_url: '/passport/login' }, |   auth: { login_url: '/passport/login' }, | ||||||
|   acl: { guard_url: '/exception/403' }, |   acl: { guard_url: '/exception/403' }, | ||||||
|  | |||||||
| @ -32,7 +32,7 @@ | |||||||
|           <label nz-radio-button nzValue="month">月</label> |           <label nz-radio-button nzValue="month">月</label> | ||||||
|         </nz-radio-group> |         </nz-radio-group> | ||||||
|         <div class="dateBox"> |         <div class="dateBox"> | ||||||
|           <nz-date-picker [(ngModel)]="dateNext" [nzDisabledDate]="disabledDate" [nzMode]="mode" (ngModelChange)="onChangeNext($event)"></nz-date-picker> |           <nz-date-picker [(ngModel)]="dateNext" [nzDisabledDate]="disabledDate" [nzMode]="modeNext" (ngModelChange)="onChangeNext($event)"></nz-date-picker> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
| @ -43,9 +43,9 @@ | |||||||
|       <div class="title"> |       <div class="title"> | ||||||
|         <div class="box" style="background-color: #3ba1ff;"></div> 环比(%) |         <div class="box" style="background-color: #3ba1ff;"></div> 环比(%) | ||||||
|       </div> |       </div> | ||||||
|       <g2-custom delay="100" (render)="render($event)"></g2-custom> |       <!-- <g2-custom delay="100" (render)="render($event)"></g2-custom> --> | ||||||
|      <!-- <app-busitable-curve></app-busitable-curve> --> |      <!-- <app-busitable-curve></app-busitable-curve> --> | ||||||
|       <!-- <app-busitable-curve #curve [chartData]="chartData.chainRatio"></app-busitable-curve> --> |      <app-busitable-curve #curve [chartData]="chartData.chainRatio"></app-busitable-curve> | ||||||
|     </div> |     </div> | ||||||
|     <div nz-col class="gutter-row" [nzSpan]="12"> |     <div nz-col class="gutter-row" [nzSpan]="12"> | ||||||
|       <div class="title"> |       <div class="title"> | ||||||
| @ -53,7 +53,6 @@ | |||||||
|       </div> |       </div> | ||||||
|       <app-busitable-pillar #pillar [chartData]="chartData.performance"></app-busitable-pillar> |       <app-busitable-pillar #pillar [chartData]="chartData.performance"></app-busitable-pillar> | ||||||
|     </div> |     </div> | ||||||
|  |  | ||||||
|   </div> |   </div> | ||||||
|    |    | ||||||
| </nz-card> | </nz-card> | ||||||
| @ -4,7 +4,8 @@ import { DatePipe, _HttpClient } from '@delon/theme'; | |||||||
| import { differenceInCalendarDays } from 'date-fns'; | import { differenceInCalendarDays } from 'date-fns'; | ||||||
| import { DataService } from '../../../services/data.service'; | import { DataService } from '../../../services/data.service'; | ||||||
| import { Chart } from '@antv/g2'; | import { Chart } from '@antv/g2'; | ||||||
| import { BusitableCurveComponent } from './curve2/curve.component'; | import { BusitablePillarComponent } from './pillar/pillar.component'; | ||||||
|  | import { BusitableCurveComponent } from './curve/curve.component'; | ||||||
|  |  | ||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-datatable-busiindex', |   selector: 'app-datatable-busiindex', | ||||||
| @ -16,6 +17,7 @@ import { BusitableCurveComponent } from './curve2/curve.component'; | |||||||
| export class DatatableBusiindexComponent implements OnInit { | export class DatatableBusiindexComponent implements OnInit { | ||||||
|   @ViewChild('st') private readonly st!: STComponent; |   @ViewChild('st') private readonly st!: STComponent; | ||||||
|   @ViewChild('curve') private readonly curve!: BusitableCurveComponent; |   @ViewChild('curve') private readonly curve!: BusitableCurveComponent; | ||||||
|  |   @ViewChild('pillar') private readonly pillar!: BusitablePillarComponent; | ||||||
|   type = 1; |   type = 1; | ||||||
|   mode = 'year'; |   mode = 'year'; | ||||||
|   date: any = null; |   date: any = null; | ||||||
| @ -26,9 +28,8 @@ export class DatatableBusiindexComponent implements OnInit { | |||||||
|   timeNext: any = ['2022-01-01 00:00:00'] |   timeNext: any = ['2022-01-01 00:00:00'] | ||||||
|   dateFormat = 'yyyy-MM-dd'; |   dateFormat = 'yyyy-MM-dd'; | ||||||
|   today = new Date(); |   today = new Date(); | ||||||
|   chainRatio: any = [] |  | ||||||
|   chartData: any = {} |   chartData: any = {} | ||||||
|   el: any; |   flag = false; | ||||||
|  |  | ||||||
|   columns: STColumn[] = [ |   columns: STColumn[] = [ | ||||||
|     { title: '运营主体', index: 'networkTransporterName', className: 'text-center' }, |     { title: '运营主体', index: 'networkTransporterName', className: 'text-center' }, | ||||||
| @ -80,12 +81,11 @@ export class DatatableBusiindexComponent implements OnInit { | |||||||
|      }; |      }; | ||||||
|     this.service.request(this.service.$api_performanceReportHistogram, params).subscribe(res => { |     this.service.request(this.service.$api_performanceReportHistogram, params).subscribe(res => { | ||||||
|       if (res) { |       if (res) { | ||||||
|         this.chainRatio = res.chainRatio |  | ||||||
|         this.chartData = res |         this.chartData = res | ||||||
|         setTimeout(() => { |         if(this.flag) { | ||||||
|           this.ngZone.runOutsideAngular(() => this.init(this.el)); |           this.pillar.reRender() | ||||||
|         }, 1000); |           this.curve.reRender() | ||||||
|          |         } | ||||||
|       } |       } | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
| @ -124,6 +124,8 @@ export class DatatableBusiindexComponent implements OnInit { | |||||||
|     } else if(this.mode === 'month') { |     } else if(this.mode === 'month') { | ||||||
|       this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00'] |       this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00'] | ||||||
|     } |     } | ||||||
|  |     this.flag = true | ||||||
|  |     this.initData() | ||||||
|   } |   } | ||||||
|   disabledDate = (current: Date): boolean => |   disabledDate = (current: Date): boolean => | ||||||
|     // Can not select days before today and today |     // Can not select days before today and today | ||||||
| @ -131,38 +133,4 @@ export class DatatableBusiindexComponent implements OnInit { | |||||||
|   exportFun(){ |   exportFun(){ | ||||||
|  |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   render(el: ElementRef<HTMLDivElement>): void { |  | ||||||
|     this.el = el.nativeElement |  | ||||||
|     |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   private init(el: HTMLElement): void { |  | ||||||
|     const chart = new Chart({ |  | ||||||
|       container: el, |  | ||||||
|       autoFit: true, |  | ||||||
|       height: 500, |  | ||||||
|     }); |  | ||||||
|  |  | ||||||
|     chart.data(this.chainRatio); |  | ||||||
|     chart.scale({ |  | ||||||
|       year: { |  | ||||||
|         range: [0, 1], |  | ||||||
|       }, |  | ||||||
|       value: { |  | ||||||
|         min: 0, |  | ||||||
|         nice: true, |  | ||||||
|       }, |  | ||||||
|     }); |  | ||||||
|  |  | ||||||
|     chart.tooltip({ |  | ||||||
|       showCrosshairs: true, // 展示 Tooltip 辅助线 |  | ||||||
|       shared: true, |  | ||||||
|     }); |  | ||||||
|  |  | ||||||
|     chart.line().position('time*value').label('value'); |  | ||||||
|     chart.point().position('time*value'); |  | ||||||
|  |  | ||||||
|     chart.render(); |  | ||||||
|   } |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -1 +1 @@ | |||||||
| <g2-custom delay="100" (render)="render($event)"></g2-custom> | <g2-custom delay="200" (render)="render($event)"></g2-custom> | ||||||
| @ -1,6 +1,4 @@ | |||||||
| import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; | 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'; |  | ||||||
| import { Chart } from '@antv/g2'; | import { Chart } from '@antv/g2'; | ||||||
| import { DataService } from 'src/app/routes/datatable/services/data.service'; | import { DataService } from 'src/app/routes/datatable/services/data.service'; | ||||||
| @Component({ | @Component({ | ||||||
| @ -9,43 +7,44 @@ import { DataService } from 'src/app/routes/datatable/services/data.service'; | |||||||
|   styleUrls: ['./curve.component.less'] |   styleUrls: ['./curve.component.less'] | ||||||
| }) | }) | ||||||
| export class BusitableCurveComponent implements OnInit, OnChanges { | export class BusitableCurveComponent implements OnInit, OnChanges { | ||||||
|   @Input() chartData: any; |  | ||||||
|   el: any; |   el: any; | ||||||
|  |   @Input() chartData: any; | ||||||
|  |   chart: any; | ||||||
|   constructor(private service: DataService, private ngZone: NgZone) { |   constructor(private service: DataService, private ngZone: NgZone) { | ||||||
|  |  | ||||||
|   } |   } | ||||||
|  |   ngOnChanges(changes: SimpleChanges): void { | ||||||
|  |     if (this.chartData) { | ||||||
|  |       // setTimeout(()=>{ | ||||||
|  |       //   this.chart.render(true) | ||||||
|  |       // }, 1000) | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|  |  | ||||||
|   } |   } | ||||||
|  |   reRender() { | ||||||
|   ngOnChanges(changes: SimpleChanges): void { |     setTimeout(() => { | ||||||
|     if (this.chartData) { |       this.chart.data(this.chartData); | ||||||
|       setTimeout(() => { |       this.chart.render(); | ||||||
|         this.ngZone.runOutsideAngular(() => this.init(this.el)); |     }, 500) | ||||||
|       }, 2000) |  | ||||||
|  |  | ||||||
|     } |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |  | ||||||
|   handleClick(data: G2MiniAreaClickItem): void { |  | ||||||
|     this.service.msgSrv.info(`${data.item.x} - ${data.item.y}`); |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   render(el: ElementRef<HTMLDivElement>): void { |   render(el: ElementRef<HTMLDivElement>): void { | ||||||
|     this.el = el.nativeElement |     this.el = el.nativeElement | ||||||
|    // this.ngZone.runOutsideAngular(() => this.init(this.el)); |     this.ngZone.runOutsideAngular(() => this.init(this.el)); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   private init(el: HTMLElement): void { |   private init(el: HTMLElement): void { | ||||||
|     const chart = new Chart({ |     this.chart = new Chart({ | ||||||
|       container: el, |       container: el, | ||||||
|       autoFit: true, |       autoFit: true, | ||||||
|       height: 500, |       height: 500, | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|     chart.data(this.chartData); |     this.chart.data(this.chartData); | ||||||
|     chart.scale({ |     this.chart.scale({ | ||||||
|       year: { |       year: { | ||||||
|         range: [0, 1], |         range: [0, 1], | ||||||
|       }, |       }, | ||||||
| @ -55,15 +54,15 @@ export class BusitableCurveComponent implements OnInit, OnChanges { | |||||||
|       }, |       }, | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|     chart.tooltip({ |     this.chart.tooltip({ | ||||||
|       showCrosshairs: true, // 展示 Tooltip 辅助线 |       showCrosshairs: true, // 展示 Tooltip 辅助线 | ||||||
|       shared: true, |       shared: true, | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|     chart.line().position('time*value').label('value'); |     this.chart.line().position('time*value').label('value'); | ||||||
|     chart.point().position('time*value'); |     this.chart.point().position('time*value'); | ||||||
|  |  | ||||||
|     chart.render(); |     this.chart.render(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
| } | } | ||||||
| @ -1,92 +0,0 @@ | |||||||
| 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'; |  | ||||||
| import { Chart } from '@antv/g2'; |  | ||||||
| import { DataService } from 'src/app/routes/datatable/services/data.service'; |  | ||||||
| @Component({ |  | ||||||
|   selector: 'app-busitable-curve', |  | ||||||
|   templateUrl: './curve.component.html', |  | ||||||
|   styleUrls: ['./curve.component.less'] |  | ||||||
| }) |  | ||||||
| export class BusitableCurveComponent implements OnInit, OnChanges { |  | ||||||
|   @Input() chartData: any ; |  | ||||||
|   el: any; |  | ||||||
|   constructor(private service: DataService, private ngZone: NgZone) { |  | ||||||
|  |  | ||||||
|   } |  | ||||||
|   ngOnChanges(changes: SimpleChanges): void { |  | ||||||
|     if(this.chartData){ |  | ||||||
|       setTimeout(()=>{ |  | ||||||
|         this.ngZone.runOutsideAngular(() => this.init(this.el)); |  | ||||||
|       }, 3000) |  | ||||||
|       |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   ngOnInit(): void { |  | ||||||
|     this.initData() |  | ||||||
|   } |  | ||||||
|   initData(){ |  | ||||||
|     this.service.request(this.service.$api_operationalReportWaybillStatusDistribution).subscribe(res => { |  | ||||||
|       if (res) { |  | ||||||
|         this.chartData = res |  | ||||||
|         this.ngZone.runOutsideAngular(() => this.init(this.el)); |  | ||||||
|       } |  | ||||||
|     }) |  | ||||||
|   } |  | ||||||
|   render(el: ElementRef<HTMLDivElement>): void { |  | ||||||
|     this.el = el.nativeElement |  | ||||||
|   } |  | ||||||
|   private init(el: HTMLElement): void { |  | ||||||
|     const ds = new DataSet(); |  | ||||||
|     const dv = ds.createView().source(this.chartData); |  | ||||||
|     dv.transform({ |  | ||||||
|       type: 'map', |  | ||||||
|       callback: row => { |  | ||||||
|         row.year = parseInt(row.year, 10); |  | ||||||
|         return row; |  | ||||||
|       } |  | ||||||
|     }).transform({ |  | ||||||
|       type: 'regression', |  | ||||||
|       method: 'polynomial', |  | ||||||
|       fields: ['year', 'value'], |  | ||||||
|       bandwidth: 0.1, |  | ||||||
|       as: ['Year', 'Value'] |  | ||||||
|     }); |  | ||||||
|  |  | ||||||
|     const chart = new Chart({ |  | ||||||
|       container: el, |  | ||||||
|       autoFit: true, |  | ||||||
|       height: 500, |  | ||||||
|       padding: [20, 40], |  | ||||||
|     }); |  | ||||||
|  |  | ||||||
|     const view1 = chart.createView(); |  | ||||||
|     view1.data(this.chartData); |  | ||||||
|     view1.scale('price', { |  | ||||||
|       nice: true, |  | ||||||
|     }); |  | ||||||
|     view1.tooltip({ |  | ||||||
|       showMarkers: false, |  | ||||||
|       shared: true, |  | ||||||
|     }); |  | ||||||
|  |  | ||||||
|     view1 |  | ||||||
|       .interval() |  | ||||||
|       .position('month*price') |  | ||||||
|       .color('name') |  | ||||||
|       .adjust([ |  | ||||||
|         { |  | ||||||
|           type: 'dodge', |  | ||||||
|           marginRatio: 0, |  | ||||||
|         }, |  | ||||||
|       ]); |  | ||||||
|  |  | ||||||
|  |  | ||||||
|    // chart.interaction('active-region'); |  | ||||||
|     chart.render(); |  | ||||||
|  |  | ||||||
|   } |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  |  | ||||||
| @ -1 +1 @@ | |||||||
| <g2-custom delay="100" (render)="render($event)"></g2-custom> | <g2-custom delay="200" (render)="render($event)"></g2-custom> | ||||||
| @ -7,48 +7,50 @@ import { DataService } from 'src/app/routes/datatable/services/data.service'; | |||||||
|   styleUrls: ['./pillar.component.less'] |   styleUrls: ['./pillar.component.less'] | ||||||
| }) | }) | ||||||
| export class BusitablePillarComponent implements OnInit, OnChanges { | export class BusitablePillarComponent implements OnInit, OnChanges { | ||||||
|    |  | ||||||
|   el: any; |   el: any; | ||||||
|   @Input() chartData: any ; |   @Input() chartData: any; | ||||||
|  |   chart: any; | ||||||
|   constructor(private service: DataService, private ngZone: NgZone) { |   constructor(private service: DataService, private ngZone: NgZone) { | ||||||
|  |  | ||||||
|   } |   } | ||||||
|   ngOnChanges(changes: SimpleChanges): void { |   ngOnChanges(changes: SimpleChanges): void { | ||||||
|     if(this.chartData){ |     if (this.chartData) { | ||||||
|       setTimeout(()=>{ |       // setTimeout(()=>{ | ||||||
|         this.ngZone.runOutsideAngular(() => this.init(this.el)); |       //   this.chart.render(true) | ||||||
|       }, 1000) |       // }, 1000) | ||||||
|  |  | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|  |  | ||||||
|  |   } | ||||||
|  |   reRender() { | ||||||
|  |     setTimeout(() => { | ||||||
|  |       this.chart.data(this.chartData); | ||||||
|  |       this.chart.render(); | ||||||
|  |     }, 500) | ||||||
|   } |   } | ||||||
|   render(el: ElementRef<HTMLDivElement>): void { |   render(el: ElementRef<HTMLDivElement>): void { | ||||||
|     this.el = el.nativeElement |     this.el = el.nativeElement | ||||||
|  |     this.ngZone.runOutsideAngular(() => this.init(this.el)); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |  | ||||||
|   private init(el: HTMLElement): void { |   private init(el: HTMLElement): void { | ||||||
|     const chart = new Chart({ |     this.chart = new Chart({ | ||||||
|       container: el, |       container: el, | ||||||
|       autoFit: true, |       autoFit: true, | ||||||
|       height: 500, |       height: 500, | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|     chart.data(this.chartData); |     this.chart.data(this.chartData); | ||||||
|  |  | ||||||
|     chart.tooltip({ |     this.chart.tooltip({ | ||||||
|       showMarkers: false, |       showMarkers: false, | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|     chart.interval().position('time*number'); |     this.chart.interval().position('time*number'); | ||||||
|  |     this.chart.render(); | ||||||
|     chart.interaction('element-active'); |  | ||||||
|  |  | ||||||
|     chart.render(); |  | ||||||
|  |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
| } | } | ||||||
| @ -38,5 +38,4 @@ | |||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|   </ng-template> |   </ng-template> | ||||||
|   <app-datatable-curve></app-datatable-curve> |  | ||||||
| </nz-card> | </nz-card> | ||||||
| @ -55,5 +55,4 @@ | |||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|   </ng-template> |   </ng-template> | ||||||
|   <app-datatable-curve></app-datatable-curve> |  | ||||||
| </nz-card> | </nz-card> | ||||||
| @ -24,6 +24,7 @@ export class DatatableCustomindexComponent implements OnInit { | |||||||
|   modeNext = 'year'; |   modeNext = 'year'; | ||||||
|   timeNext: any = ['2022-01-01 00:00:00'] |   timeNext: any = ['2022-01-01 00:00:00'] | ||||||
|    |    | ||||||
|  |  | ||||||
|   columns: STColumn[] = [ |   columns: STColumn[] = [ | ||||||
|     { title: '用户类型', index: 'networkTransporterName', className: 'text-center' }, |     { title: '用户类型', index: 'networkTransporterName', className: 'text-center' }, | ||||||
|     { title: '用户总数', index: 'zsl', className: 'text-center' }, |     { title: '用户总数', index: 'zsl', className: 'text-center' }, | ||||||
|  | |||||||
| @ -52,7 +52,8 @@ export class DatatableDriverComponent implements OnInit { | |||||||
|     } |     } | ||||||
|     let params: any = { |     let params: any = { | ||||||
|       time: this.time, |       time: this.time, | ||||||
|       type: this.type |       type: this.type, | ||||||
|  |       ...this.sf?.value | ||||||
|      }; |      }; | ||||||
|    |    | ||||||
|     delete params._$expand; |     delete params._$expand; | ||||||
|  | |||||||
| @ -38,7 +38,7 @@ | |||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|   </ng-template> |   </ng-template> | ||||||
|   <st #st multiSort [columns]="columns" [ps]="20" [data]="service.$api_listOperationalReportPage" |   <st #st multiSort [columns]="columns" [ps]="20" [data]="service.$api_listShipperReportPage" | ||||||
|     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" |     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" | ||||||
|     [scroll]="{ x: '1200px' }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }" |     [scroll]="{ x: '1200px' }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||||
|     [page]="{ show: true, showSize: true, pageSizes: [20, 50, 100] }" [loading]="false"></st> |     [page]="{ show: true, showSize: true, pageSizes: [20, 50, 100] }" [loading]="false"></st> | ||||||
|  | |||||||
| @ -26,23 +26,33 @@ export class DatatableOwnerComponent implements OnInit { | |||||||
|   schema: SFSchema = {}; |   schema: SFSchema = {}; | ||||||
|   |   | ||||||
|   columns: STColumn[] = [ |   columns: STColumn[] = [ | ||||||
|     { title: '货主名称', index: 'networkTransporterName', className: 'text-center' }, |     { title: '货主名称', index: 'enterpriseName', className: 'text-center' }, | ||||||
|     { title: '注册时间', index: 'zsl', className: 'text-center' }, |     { title: '注册时间', index: 'registerTime', className: 'text-center' }, | ||||||
|     { title: '客户类型', index: 'yingsje', className: 'text-center' }, |     { title: '客户类型', index: 'customerType', className: 'text-center', type: 'enum', enum: { | ||||||
|     { title: '业务员', index: 'cys', className: 'text-center' }, |       1: '平台客户', | ||||||
|     { title: '合伙人', index: 'yingfyf', className: 'text-center' }, |       2: '直客', | ||||||
|     { title: '客户状态', index: 'yl', className: 'text-center' }, |       3: '渠道客户' | ||||||
|     { title: '订单数', index: 'djd', className: 'text-center' }, |     } | ||||||
|     { title: '订单金额', index: 'ysz', className: 'text-center' }, |    }, | ||||||
|     { title: '应收订单数', index: 'yswc', className: 'text-center' }, |     { title: '业务员', index: 'salesmanName', className: 'text-center' }, | ||||||
|     { title: '应收金额', index: 'yisje', className: 'text-center' }, |     { title: '合伙人', index: 'partnerName', className: 'text-center' }, | ||||||
|  |     { title: '客户状态', index: 'customerStatus', className: 'text-center', type: 'enum', enum: { | ||||||
|  |       1: '未激活', | ||||||
|  |       2: '沉默', | ||||||
|  |       3: '流失', | ||||||
|  |       4: '活跃' | ||||||
|  |     } }, | ||||||
|  |     { title: '订单数', index: 'zsl', className: 'text-center' }, | ||||||
|  |     { title: '订单金额', index: 'ddje', className: 'text-center' }, | ||||||
|  |     { title: '应收订单数', index: 'ysdds', className: 'text-center' }, | ||||||
|  |     { title: '应收金额', index: 'yingsje', className: 'text-center' }, | ||||||
|     { title: '待开票订单数', index: 'yifyf', className: 'text-center' }, |     { title: '待开票订单数', index: 'yifyf', className: 'text-center' }, | ||||||
|     { title: '待开票金额', index: 'yifyf', className: 'text-center' }, |     { title: '待开票金额', index: 'dkpdds', className: 'text-center' }, | ||||||
|     { title: '已收金额', render: 'yifyf', className: 'text-center' }, |     { title: '已收金额', render: 'yisje', className: 'text-center' }, | ||||||
|     { title: '附加费金额', index: 'yifyf', className: 'text-center' }, |     { title: '应收附加费', index: 'yingsfjf', className: 'text-center' }, | ||||||
|     { title: '已收附加费', index: 'yifyf', className: 'text-center' }, |     { title: '已收附加费', index: 'yisfjf', className: 'text-center' }, | ||||||
|     { title: '附加费率', index: 'yifyf', className: 'text-center' }, |     { title: '附加费率', index: 'fjfl', className: 'text-center' }, | ||||||
|     { title: '已开票金额', index: 'yifyf', className: 'text-center' } |     { title: '已开票金额', index: 'ykpje', className: 'text-center' } | ||||||
|   ]; |   ]; | ||||||
|   /** |   /** | ||||||
|    * 查询参数 |    * 查询参数 | ||||||
| @ -59,7 +69,8 @@ export class DatatableOwnerComponent implements OnInit { | |||||||
|     } |     } | ||||||
|     let params: any = { |     let params: any = { | ||||||
|       time: this.time, |       time: this.time, | ||||||
|       type: this.type |       type: this.type, | ||||||
|  |       ...this.sf?.value | ||||||
|      }; |      }; | ||||||
|    |    | ||||||
|     delete params._$expand; |     delete params._$expand; | ||||||
| @ -76,28 +87,41 @@ export class DatatableOwnerComponent implements OnInit { | |||||||
|     this.schema = { |     this.schema = { | ||||||
|       properties: { |       properties: { | ||||||
|         _$expand: { type: 'boolean', ui: { hidden: true } }, |         _$expand: { type: 'boolean', ui: { hidden: true } }, | ||||||
|         billCode: { |         enterpriseName: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '货主名称', |           title: '货主名称', | ||||||
|           ui: { |           ui: { | ||||||
|             placeholder: '请输入', |             placeholder: '请输入', | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         resourceCode: { |         customerType: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '客户类型', |           title: '客户类型', | ||||||
|           ui: { |           ui: { | ||||||
|  |             widget: 'select', | ||||||
|             placeholder: '请选择', |             placeholder: '请选择', | ||||||
|           } |           }, | ||||||
|  |           enum: [ | ||||||
|  |             {label: '直客', value: 2}, | ||||||
|  |             {label: '渠道客户', value: 3}, | ||||||
|  |             {label: '平台客户', value: 1}, | ||||||
|  |           ] | ||||||
|         }, |         }, | ||||||
|         loadingPlace: { |         customerStatus: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '客户状态', |           title: '客户状态', | ||||||
|           ui: { |           ui: { | ||||||
|  |             widget: 'select', | ||||||
|             placeholder: '请选择', |             placeholder: '请选择', | ||||||
|           } |           }, | ||||||
|  |           enum: [ | ||||||
|  |             {label: '未激活', value: 1}, | ||||||
|  |             {label: '沉默', value: 2}, | ||||||
|  |             {label: '流失', value: 3}, | ||||||
|  |             {label: '活跃', value: 4}, | ||||||
|  |           ] | ||||||
|         }, |         }, | ||||||
|         createTime: { |         registerTime: { | ||||||
|           title: '注册时间', |           title: '注册时间', | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           ui: { |           ui: { | ||||||
|  | |||||||
| @ -1,24 +0,0 @@ | |||||||
| import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; |  | ||||||
| import { DatatableDataindexComponent } from './dataindex.component'; |  | ||||||
|  |  | ||||||
| describe('DatatableDataindexComponent', () => { |  | ||||||
|   let component: DatatableDataindexComponent; |  | ||||||
|   let fixture: ComponentFixture<DatatableDataindexComponent>; |  | ||||||
|  |  | ||||||
|   beforeEach(waitForAsync(() => { |  | ||||||
|     TestBed.configureTestingModule({ |  | ||||||
|       declarations: [ DatatableDataindexComponent ] |  | ||||||
|     }) |  | ||||||
|     .compileComponents(); |  | ||||||
|   })); |  | ||||||
|  |  | ||||||
|   beforeEach(() => { |  | ||||||
|     fixture = TestBed.createComponent(DatatableDataindexComponent); |  | ||||||
|     component = fixture.componentInstance; |  | ||||||
|     fixture.detectChanges(); |  | ||||||
|   }); |  | ||||||
|  |  | ||||||
|   it('should create', () => { |  | ||||||
|     expect(component).toBeTruthy(); |  | ||||||
|   }); |  | ||||||
| }); |  | ||||||
| @ -1,131 +1,81 @@ | |||||||
| import { Component, ElementRef, NgZone, OnInit, ViewChild } from '@angular/core'; | import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; | ||||||
| import { G2MiniAreaClickItem } from '@delon/chart/mini-area'; |  | ||||||
| import { DataService } from '../../../services/data.service'; |  | ||||||
| import DataSet from '@antv/data-set'; |  | ||||||
| import { Chart } from '@antv/g2'; | import { Chart } from '@antv/g2'; | ||||||
|  | import { DataService } from 'src/app/routes/datatable/services/data.service'; | ||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-datatable-curve', |   selector: 'app-operation-curve', | ||||||
|   templateUrl: './curve.component.html', |   templateUrl: './curve.component.html', | ||||||
|   styleUrls: ['./curve.component.less'] |   styleUrls: ['./curve.component.less'] | ||||||
| }) | }) | ||||||
| export class OperationtableCurveComponent implements OnInit { | export class OperationCurveComponent implements OnInit, OnChanges { | ||||||
|  |   el: any; | ||||||
|  |   @Input() chartData: any; | ||||||
|  |   chart: any; | ||||||
|   constructor(private service: DataService, private ngZone: NgZone) { |   constructor(private service: DataService, private ngZone: NgZone) { | ||||||
|  |  | ||||||
|   } |   } | ||||||
|  |   ngOnChanges(changes: SimpleChanges): void { | ||||||
|  |     if (this.chartData) { | ||||||
|  |       // setTimeout(()=>{ | ||||||
|  |       //   this.chart.render(true) | ||||||
|  |       // }, 1000) | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|  |  | ||||||
|   } |   } | ||||||
|  |   reRender() { | ||||||
|  |     setTimeout(() => { | ||||||
|  |       this.chart.data(this.chartData); | ||||||
|  |       this.chart.render(); | ||||||
|   handleClick(data: G2MiniAreaClickItem): void { |     }, 1000) | ||||||
|     this.service.msgSrv.info(`${data.item.x} - ${data.item.y}`); |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   render(el: ElementRef<HTMLDivElement>): void { |   render(el: ElementRef<HTMLDivElement>): void { | ||||||
|     this.ngZone.runOutsideAngular(() => this.init(el.nativeElement)); |     this.el = el.nativeElement | ||||||
|  |     setTimeout(() => { | ||||||
|  |       this.ngZone.runOutsideAngular(() => this.init(this.el)); | ||||||
|  |       }, 1000) | ||||||
|   } |   } | ||||||
|   private init(el: HTMLElement): void { |  | ||||||
|     const data = [ |  | ||||||
|       { name: '订单数', month: '01', count: 150, }, |  | ||||||
|       { name: '订单数', month: '02', count: 288 }, |  | ||||||
|       { name: '订单数', month: '03', count: 393 }, |  | ||||||
|       { name: '订单数', month: '04', count: 814 }, |  | ||||||
|       { name: '订单数', month: '05', count: 47 }, |  | ||||||
|       { name: '承运数', month: '05', count: 124 }, |  | ||||||
|       { name: '订单数', month: '06', count: 203 }, |  | ||||||
|       { name: '承运数', month: '06', count: 203 }, |  | ||||||
|       { name: '订单数', month: '07', count: 24 }, |  | ||||||
|       { name: '订单数', month: '08', count: 356 }, |  | ||||||
|       { name: '承运数', month: '09', count: 124 },  |  | ||||||
|       { name: '承运数', month: '10', count: 232 }, |  | ||||||
|       { name: '承运数', month: '11', count: 345 }, |  | ||||||
|       { name: '承运数', month: '12', count: 997 } |  | ||||||
|     ]; |  | ||||||
|     const dataPillar = [ |  | ||||||
|       { name: '应收金额(元)', month: '01', price: 18.9, }, |  | ||||||
|       { name: '应收金额(元)', month: '02', price: 28.8 }, |  | ||||||
|       { name: '应收金额(元)', month: '03', price: 39.3 }, |  | ||||||
|       { name: '应收金额(元)', month: '04', price: 81.4 }, |  | ||||||
|       { name: '应收金额(元)', month: '05', price: 47 }, |  | ||||||
|       { name: '应付金额(元)', month: '05', price: 12.4 }, |  | ||||||
|       { name: '应收金额(元)', month: '06', price: 20.3 }, |  | ||||||
|       { name: '应付金额(元)', month: '06', price: 20.3 }, |  | ||||||
|       { name: '应收金额(元)', month: '07', price: 24 }, |  | ||||||
|       { name: '应收金额(元)', month: '08', price: 35.6 }, |  | ||||||
|       { name: '应付金额(元)', month: '09', price: 12.4 },  |  | ||||||
|       { name: '应付金额(元)', month: '10', price: 23.2 }, |  | ||||||
|       { name: '应付金额(元)', month: '11', price: 34.5 }, |  | ||||||
|       { name: '应付金额(元)', month: '12', price: 99.7 } |  | ||||||
|     ]; |  | ||||||
|     const ds = new DataSet(); |  | ||||||
|     const dv = ds.createView().source(data); |  | ||||||
|     dv.transform({ |  | ||||||
|       type: 'map', |  | ||||||
|       callback: row => { |  | ||||||
|         row.year = parseInt(row.year, 10); |  | ||||||
|         return row; |  | ||||||
|       } |  | ||||||
|     }).transform({ |  | ||||||
|       type: 'regression', |  | ||||||
|       method: 'polynomial', |  | ||||||
|       fields: ['year', 'value'], |  | ||||||
|       bandwidth: 0.1, |  | ||||||
|       as: ['Year', 'Value'] |  | ||||||
|     }); |  | ||||||
|  |  | ||||||
|     const chart = new Chart({ |   private init(el: HTMLElement): void { | ||||||
|  |     this.chart = new Chart({ | ||||||
|       container: el, |       container: el, | ||||||
|       autoFit: true, |       autoFit: true, | ||||||
|       height: 500, |       height: 500, | ||||||
|       padding: [20, 40], |  | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|     const view1 = chart.createView(); |     this.chart.data(this.chartData); | ||||||
|     view1.data(dataPillar); |     this.chart.scale({ | ||||||
|     view1.scale('price', { |       time: { | ||||||
|       nice: true, |         range: [0, 1], | ||||||
|  |       }, | ||||||
|  |       number: { | ||||||
|  |         nice: true, | ||||||
|  |       }, | ||||||
|     }); |     }); | ||||||
|     view1.tooltip({ |      | ||||||
|       showMarkers: false, |     this.chart.tooltip({ | ||||||
|  |       showCrosshairs: true, | ||||||
|       shared: true, |       shared: true, | ||||||
|     }); |     }); | ||||||
|      |      | ||||||
|     view1 |     this.chart.axis('number', { | ||||||
|       .interval() |       label: { | ||||||
|       .position('month*price') |         formatter: (val: any) => { | ||||||
|       .color('name') |           return val; | ||||||
|       .adjust([ |  | ||||||
|         { |  | ||||||
|           type: 'dodge', |  | ||||||
|           marginRatio: 0, |  | ||||||
|         }, |         }, | ||||||
|       ]); |       }, | ||||||
|  |     }); | ||||||
|      |      | ||||||
|     const view2 = chart.createView(); |     this.chart | ||||||
|     // view2.axis('count', { |  | ||||||
|     //   label: { |  | ||||||
|     //     formatter: (val) => { |  | ||||||
|     //       return val + ' °C'; |  | ||||||
|     //     }, |  | ||||||
|     //   }, |  | ||||||
|     // }); |  | ||||||
|     view2.data(data); |  | ||||||
|     view2 |  | ||||||
|       .line() |       .line() | ||||||
|       .position('month*count') |       .position('time*number') | ||||||
|       .color('name') |       .color('name') | ||||||
|      |      | ||||||
|      |      | ||||||
|  |     this.chart.render(); | ||||||
|  |  | ||||||
|    // chart.interaction('active-region'); |  | ||||||
|     chart.render(); |  | ||||||
|      |      | ||||||
|   } |   } | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | |||||||
| @ -28,7 +28,7 @@ | |||||||
| <nz-card nzTitle="运营报表" [nzExtra]="extraTemplate01"> | <nz-card nzTitle="运营报表" [nzExtra]="extraTemplate01"> | ||||||
|   <ng-template #extraTemplate01> |   <ng-template #extraTemplate01> | ||||||
|     <div class="chooseBox"> |     <div class="chooseBox"> | ||||||
|       <nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="changeCurve()"> |       <nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="initPillarData()"> | ||||||
|         <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option> |         <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option> | ||||||
|       </nz-select> |       </nz-select> | ||||||
|       <div class="timeBox"> |       <div class="timeBox"> | ||||||
| @ -42,11 +42,22 @@ | |||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|   </ng-template> |   </ng-template> | ||||||
|   <app-datatable-curve></app-datatable-curve> |   <div nz-row [nzGutter]="64"> | ||||||
| </nz-card> |     <div nz-col class="gutter-row" [nzSpan]="12"> | ||||||
| <nz-card nzTitle="运单状态分布"> |       <!-- <div class="title"> | ||||||
|   <nz-select [(ngModel)]="enterpriseInfoIdPie" style="width: 200px" (ngModelChange)="changeCurve()"> |         <div class="box" style="background-color: #3ba1ff;"></div> 环比(%) | ||||||
|     <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option> |       </div> --> | ||||||
|   </nz-select> |       <!-- <g2-custom delay="100" (render)="render($event)"></g2-custom> --> | ||||||
| <app-opeationtable-pie></app-opeationtable-pie> |      <!-- <app-busitable-curve></app-busitable-curve> --> | ||||||
|  |      <app-operation-curve #curve [chartData]="chartData.lineChart"></app-operation-curve> | ||||||
|  |     </div> | ||||||
|  |     <div nz-col class="gutter-row" [nzSpan]="12"> | ||||||
|  |       <!-- <div class="title"> | ||||||
|  |         <div class="box" style="background-color: #f59a23;"></div> 业绩量(元) | ||||||
|  |       </div> --> | ||||||
|  |       <app-operation-pillar #pillar [chartData]="chartData.histogram"></app-operation-pillar> | ||||||
|  |     </div> | ||||||
|  |   </div> | ||||||
| </nz-card> | </nz-card> | ||||||
|  |  | ||||||
|  | <app-opeationtable-pie #pie></app-opeationtable-pie> | ||||||
|  | |||||||
| @ -3,6 +3,8 @@ import { STColumn, STComponent } from '@delon/abc/st'; | |||||||
| import { DatePipe, _HttpClient } from '@delon/theme'; | import { DatePipe, _HttpClient } from '@delon/theme'; | ||||||
| import { DataService } from '../../services/data.service'; | import { DataService } from '../../services/data.service'; | ||||||
| import { differenceInCalendarDays } from 'date-fns'; | import { differenceInCalendarDays } from 'date-fns'; | ||||||
|  | import { OperationCurveComponent } from './curve/curve.component'; | ||||||
|  | import { OperationPillarComponent } from './pillar/pillar.component'; | ||||||
|  |  | ||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-datatable-operationtable', |   selector: 'app-datatable-operationtable', | ||||||
| @ -12,6 +14,8 @@ import { differenceInCalendarDays } from 'date-fns'; | |||||||
|  |  | ||||||
| }) | }) | ||||||
| export class DatatableOperationtableComponent implements OnInit { | export class DatatableOperationtableComponent implements OnInit { | ||||||
|  |   @ViewChild('curve') private readonly curve!: OperationCurveComponent; | ||||||
|  |   @ViewChild('pillar') private readonly pillar!: OperationPillarComponent; | ||||||
|   @ViewChild('st') private readonly st!: STComponent; |   @ViewChild('st') private readonly st!: STComponent; | ||||||
|   type = 1; |   type = 1; | ||||||
|   mode = 'year'; |   mode = 'year'; | ||||||
| @ -24,8 +28,10 @@ export class DatatableOperationtableComponent implements OnInit { | |||||||
|   timeNext: any = ['2022-01-01 00:00:00'] |   timeNext: any = ['2022-01-01 00:00:00'] | ||||||
|   today = new Date(); |   today = new Date(); | ||||||
|   enterpriseInfoId = '' |   enterpriseInfoId = '' | ||||||
|   enterpriseInfoIdPie = '' |  | ||||||
|   interManlist: any = [] |   interManlist: any = [] | ||||||
|  |   chartData: any = {} | ||||||
|  |   flag = false; | ||||||
|   columns: STColumn[] = [ |   columns: STColumn[] = [ | ||||||
|     { title: '运营主体', index: 'networkTransporterName', className: 'text-center' }, |     { title: '运营主体', index: 'networkTransporterName', className: 'text-center' }, | ||||||
|     { title: '订单数', index: 'zsl', className: 'text-center' }, |     { title: '订单数', index: 'zsl', className: 'text-center' }, | ||||||
| @ -64,12 +70,36 @@ export class DatatableOperationtableComponent implements OnInit { | |||||||
|   constructor(public service: DataService, private datePipe: DatePipe) { } |   constructor(public service: DataService, private datePipe: DatePipe) { } | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|     this.initData() |     this.initData() | ||||||
|  |     this.initPillarData() | ||||||
|  |   } | ||||||
|  |   initPillarData(){ | ||||||
|  |     let type = 1 | ||||||
|  |     if(this.mode === 'year') { | ||||||
|  |       type = 1 | ||||||
|  |     } else if(this.mode === 'month') { | ||||||
|  |       type = 2 | ||||||
|  |     } | ||||||
|  |     const params: any = { | ||||||
|  |       time: this.timeNext, | ||||||
|  |       type, | ||||||
|  |       enterpriseInfoId: this.enterpriseInfoId | ||||||
|  |      }; | ||||||
|  |     this.flag = true | ||||||
|  |     this.service.request(this.service.$api_operationalReportHistogram, params).subscribe(res => { | ||||||
|  |       if (res) { | ||||||
|  |         this.chartData = res | ||||||
|  |         if(this.flag) { | ||||||
|  |           this.pillar.reRender() | ||||||
|  |           this.curve.reRender() | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }) | ||||||
|   } |   } | ||||||
|   initData() { |   initData() { | ||||||
|  |      | ||||||
|     this.service.getNetworkFreightForwarder().subscribe(res => { |     this.service.getNetworkFreightForwarder().subscribe(res => { | ||||||
|       this.interManlist = res |       this.interManlist = res | ||||||
|       this.enterpriseInfoId = res[0].value |       this.enterpriseInfoId = res[0].value | ||||||
|       this.enterpriseInfoIdPie = res[0].value |  | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | |||||||
| @ -1,3 +1,6 @@ | |||||||
| <div class="box"> | <nz-card nzTitle="运单状态分布"> | ||||||
|  |     <nz-select [(ngModel)]="enterpriseInfoIdPie" style="width: 200px" (ngModelChange)="initData()"> | ||||||
|  |         <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option> | ||||||
|  |     </nz-select> | ||||||
|     <g2-custom delay="100" (render)="render($event)"></g2-custom> |     <g2-custom delay="100" (render)="render($event)"></g2-custom> | ||||||
| </div> | </nz-card> | ||||||
| @ -1,5 +1,5 @@ | |||||||
| .box{ | .box{ | ||||||
|     width: 50%; |     width: 50%; | ||||||
|     overflow: hidden; |  | ||||||
|     margin:0 auto; |     margin:0 auto; | ||||||
|  |     overflow: hidden; | ||||||
| } | } | ||||||
| @ -13,21 +13,30 @@ export class OperationtablePieComponent implements OnInit { | |||||||
|   @ViewChild('pie', { static: false }) pie!: G2PieComponent; |   @ViewChild('pie', { static: false }) pie!: G2PieComponent; | ||||||
|   chartData: any = []; |   chartData: any = []; | ||||||
|   el: any; |   el: any; | ||||||
|  |   enterpriseInfoIdPie = '' | ||||||
|  |   interManlist: any = [] | ||||||
|  |  | ||||||
|   constructor(private service: DataService, private ngZone: NgZone) { |   constructor(private service: DataService, private ngZone: NgZone) { | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|     this.initData() |     this.initData() | ||||||
|  |     this.initManData() | ||||||
|   } |   } | ||||||
|   initData(){ |   initData(){ | ||||||
|     this.service.request(this.service.$api_operationalReportWaybillStatusDistribution).subscribe(res => { |     this.service.request(this.service.$api_operationalReportWaybillStatusDistribution, {id: this.enterpriseInfoIdPie}).subscribe(res => { | ||||||
|       if (res) { |       if (res) { | ||||||
|         this.chartData = res |         this.chartData = res | ||||||
|         this.ngZone.runOutsideAngular(() => this.init(this.el)); |         this.ngZone.runOutsideAngular(() => this.init(this.el)); | ||||||
|       } |       } | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
|  |   initManData() { | ||||||
|  |     this.service.getNetworkFreightForwarder().subscribe(res => { | ||||||
|  |       this.interManlist = res | ||||||
|  |       this.enterpriseInfoIdPie = res[0].value | ||||||
|  |     }) | ||||||
|  |   } | ||||||
|   render(el: ElementRef<HTMLDivElement>): void { |   render(el: ElementRef<HTMLDivElement>): void { | ||||||
|     this.el = el.nativeElement |     this.el = el.nativeElement | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -0,0 +1,75 @@ | |||||||
|  | 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-operation-pillar', | ||||||
|  |   templateUrl: './pillar.component.html', | ||||||
|  |   styleUrls: ['./pillar.component.less'] | ||||||
|  | }) | ||||||
|  | export class OperationPillarComponent 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); | ||||||
|  |       console.log(this.chartData) | ||||||
|  |       this.chart.render(); | ||||||
|  |     }, 1000) | ||||||
|  |   } | ||||||
|  |   render(el: ElementRef<HTMLDivElement>): void { | ||||||
|  |     this.el = el.nativeElement | ||||||
|  |     setTimeout(() => { | ||||||
|  |     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('number', { | ||||||
|  |       nice: true, | ||||||
|  |     }); | ||||||
|  |     this.chart.tooltip({ | ||||||
|  |       showMarkers: false, | ||||||
|  |       shared: true, | ||||||
|  |     }); | ||||||
|  |  | ||||||
|  |     this.chart | ||||||
|  |       .interval() | ||||||
|  |       .position('time*number') | ||||||
|  |       .color('name') | ||||||
|  |       .adjust([ | ||||||
|  |         { | ||||||
|  |           type: 'dodge', | ||||||
|  |           marginRatio: 0, | ||||||
|  |         }, | ||||||
|  |       ]); | ||||||
|  |  | ||||||
|  |     this.chart.interaction('active-region'); | ||||||
|  |  | ||||||
|  |     this.chart.render(); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -8,7 +8,6 @@ import { DatatableOperationtableComponent } from './components/operationtable/op | |||||||
| import { OperationtablePieComponent } from './components/operationtable/pie/pie.component'; | import { OperationtablePieComponent } from './components/operationtable/pie/pie.component'; | ||||||
| import { DatatableOrderReportingComponent } from './reporting/components/order-reporting/order-reporting.component'; | import { DatatableOrderReportingComponent } from './reporting/components/order-reporting/order-reporting.component'; | ||||||
| import { DatatableDataindexComponent } from './components/dataindex/dataindex.component'; | import { DatatableDataindexComponent } from './components/dataindex/dataindex.component'; | ||||||
| import { OperationtableCurveComponent } from './components/operationtable/curve/curve.component'; |  | ||||||
| import { DatatableComplianceIndexComponent } from './components/compliance/index/index.component'; | import { DatatableComplianceIndexComponent } from './components/compliance/index/index.component'; | ||||||
| import { DatatableFinancetableComponent } from './components/financetable/financetable.component'; | import { DatatableFinancetableComponent } from './components/financetable/financetable.component'; | ||||||
| import { DatatableInvoicetableComponent } from './components/invoicetable/invoicetable.component'; | import { DatatableInvoicetableComponent } from './components/invoicetable/invoicetable.component'; | ||||||
| @ -23,7 +22,9 @@ import { DatatableBusiindexComponent } from './components/busitable/busiindex/bu | |||||||
| import { DatatableMantableComponent } from './components/busitable/mantable/mantable.component'; | import { DatatableMantableComponent } from './components/busitable/mantable/mantable.component'; | ||||||
| import { BusitablePillarComponent } from './components/busitable/busiindex/pillar/pillar.component'; | import { BusitablePillarComponent } from './components/busitable/busiindex/pillar/pillar.component'; | ||||||
| import { DatatableReportingFundInfoComponent } from './reporting/components/fund-info/fund-info.component'; | import { DatatableReportingFundInfoComponent } from './reporting/components/fund-info/fund-info.component'; | ||||||
| import { BusitableCurveComponent } from './components/busitable/busiindex/curve2/curve.component'; | import { BusitableCurveComponent } from './components/busitable/busiindex/curve/curve.component'; | ||||||
|  | import { OperationPillarComponent } from './components/operationtable/pillar/pillar.component'; | ||||||
|  | import { OperationCurveComponent } from './components/operationtable/curve/curve.component'; | ||||||
| import { FinanceTableCurveComponent } from './components/financetable/curve/curve.component'; | import { FinanceTableCurveComponent } from './components/financetable/curve/curve.component'; | ||||||
|  |  | ||||||
| const COMPONENTS: Type<void>[] = [ | const COMPONENTS: Type<void>[] = [ | ||||||
| @ -34,7 +35,6 @@ const COMPONENTS: Type<void>[] = [ | |||||||
|   DatatableOperationtableComponent, |   DatatableOperationtableComponent, | ||||||
|   OperationtablePieComponent, |   OperationtablePieComponent, | ||||||
|   DatatableOrderReportingComponent, |   DatatableOrderReportingComponent, | ||||||
|   OperationtableCurveComponent, |  | ||||||
|   DatatableComplianceIndexComponent, |   DatatableComplianceIndexComponent, | ||||||
|   DatatableFinancetableComponent, |   DatatableFinancetableComponent, | ||||||
|   DatatableInvoicetableComponent, |   DatatableInvoicetableComponent, | ||||||
| @ -49,7 +49,10 @@ const COMPONENTS: Type<void>[] = [ | |||||||
|   DatatableMantableComponent, |   DatatableMantableComponent, | ||||||
|   BusitablePillarComponent, |   BusitablePillarComponent, | ||||||
|   DatatableFundReportingComponent, |   DatatableFundReportingComponent, | ||||||
|  |   DatatableReportingFundInfoComponent, | ||||||
|   BusitableCurveComponent, |   BusitableCurveComponent, | ||||||
|  |   OperationPillarComponent, | ||||||
|  |   OperationCurveComponent, | ||||||
|   DatatableReportingFundInfoComponent, |   DatatableReportingFundInfoComponent, | ||||||
|   FinanceTableCurveComponent |   FinanceTableCurveComponent | ||||||
| ] | ] | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| <nz-spin [nzSpinning]="service.http.loading"></nz-spin> | <nz-spin [nzSpinning]="service.http.loading"></nz-spin> | ||||||
| <st #st [scroll]="{x:'1000px'}" [data]="service.$api_get_order_reporting_page" [columns]="columns" | <st #st [scroll]="{x:'1000px'}" [data]="service.$api_get_fund_valid_result" [columns]="columns" | ||||||
|   [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" |   [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" | ||||||
|   [res]="{ reName: { list: 'data.records', total: 'data.total' } }" [page]="{ show: false}" [loading]="false" |   [res]="{ reName: { list: 'data.records', total: 'data.total' } }" [page]="{ show: false}" [loading]="false" | ||||||
|   [bordered]="true"> |   [bordered]="true"> | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ export class DatatableReportingFundInfoComponent implements OnInit { | |||||||
|  |  | ||||||
|  |  | ||||||
|   get reqParams() { |   get reqParams() { | ||||||
|     return {}; |     return { capitalCode: this?.record?.orderCode }; | ||||||
|   } |   } | ||||||
|   constructor(public service: ReportingService, private modalRef: NzModalRef, public router: Router) { |   constructor(public service: ReportingService, private modalRef: NzModalRef, public router: Router) { | ||||||
|  |  | ||||||
| @ -35,13 +35,34 @@ export class DatatableReportingFundInfoComponent implements OnInit { | |||||||
|   initST() { |   initST() { | ||||||
|     this.columns = [ |     this.columns = [ | ||||||
|       { title: '序号', type: 'no', className: 'text-center', width: '60px', }, |       { title: '序号', type: 'no', className: 'text-center', width: '60px', }, | ||||||
|       { title: '监管平台字段', index: 'orderStatus', className: 'text-center', width: '120px', }, |       { title: '监管平台字段', index: 'thirdPartyFieldName', className: 'text-center', width: '120px', }, | ||||||
|       { title: '系统字段', index: 'orderStatus', className: 'text-center', width: '100px', }, |       { title: '系统字段', index: 'checkFieldName', className: 'text-center', width: '100px', }, | ||||||
|       { title: '归属模块', index: 'orderStatus', className: 'text-center', width: '120px', }, |       { title: '归属模块', index: 'orderStatus', className: 'text-center', width: '120px', }, | ||||||
|       { title: '是否必填', index: 'orderStatus', className: 'text-center', width: '100px', }, |       { | ||||||
|       { title: '上传值', index: 'orderStatus', className: 'text-center', width: '150px', }, |         title: '是否必填', | ||||||
|       { title: '本地校验', index: 'orderStatus', className: 'text-center', width: '100px', }, |         index: 'orderStatus', | ||||||
|       { title: '错误内容', index: 'orderStatus', className: 'text-center', width: '150px', }, |         className: 'text-center', | ||||||
|  |         width: '100px', | ||||||
|  |         type: 'enum', | ||||||
|  |         enum: { | ||||||
|  |           '0': '非必填', | ||||||
|  |           '1': '必填', | ||||||
|  |         }, | ||||||
|  |       }, | ||||||
|  |       { title: '上传值', index: 'fieldValue', className: 'text-center', width: '150px', }, | ||||||
|  |       { | ||||||
|  |         title: '本地校验', | ||||||
|  |         index: 'checkStatus', | ||||||
|  |         className: 'text-center', | ||||||
|  |         type: 'enum', | ||||||
|  |         enum: { | ||||||
|  |           '0': '校验中', | ||||||
|  |           '1': '通过', | ||||||
|  |           '2': '不通过' | ||||||
|  |         }, | ||||||
|  |         width: '100px', | ||||||
|  |       }, | ||||||
|  |       { title: '错误内容', index: 'remark', className: 'text-center', width: '150px', }, | ||||||
|     ] |     ] | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @ -71,4 +92,5 @@ export class DatatableReportingFundInfoComponent implements OnInit { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -28,7 +28,8 @@ | |||||||
|   <st #st [scroll]="{x:'1200px'}" [data]="service.$api_get_fund_reporting_page" [columns]="columns" |   <st #st [scroll]="{x:'1200px'}" [data]="service.$api_get_fund_reporting_page" [columns]="columns" | ||||||
|     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" |     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" | ||||||
|     [res]="{ reName: { list: 'data.records', total: 'data.total' } }" |     [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||||
|     [page]="{ show: true, showSize: true, pageSizes: [10,20, 50, 100] }" [loading]="false"> |     [page]="{ show: true, showSize: true, pageSizes: [1,10,20, 50, 100] }" [loading]="false" | ||||||
|  |     (change)="changeSt($event)"> | ||||||
|     <ng-template st-row="uploadStatus" let-item> |     <ng-template st-row="uploadStatus" let-item> | ||||||
|       <span [ngClass]="{'text-red-dark':item?.uploadStatus === '4'}">{{item?.billStatusLabel}}</span> |       <span [ngClass]="{'text-red-dark':item?.uploadStatus === '4'}">{{item?.billStatusLabel}}</span> | ||||||
|     </ng-template> |     </ng-template> | ||||||
| @ -48,10 +49,10 @@ | |||||||
|       <span *ngIf="item?.billStatus !== '2'">{{item?.billStatusLabel}}</span> |       <span *ngIf="item?.billStatus !== '2'">{{item?.billStatusLabel}}</span> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="tolalAmount" let-item let-index="index"> |     <ng-template st-row="tolalAmount" let-item let-index="index"> | ||||||
|       <div class="text-right">{{item?.tolalAmount | currency :' '}}</div> |       <div class="text-right">{{item?.tolalAmount | currency }}</div> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="payAmount" let-item let-index="index"> |     <ng-template st-row="payAmount" let-item let-index="index"> | ||||||
|       <div class="text-right">{{item?.payAmount | currency :' '}}</div> |       <div class="text-right">{{item?.payAmount | currency }}</div> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|   </st> |   </st> | ||||||
| </nz-card> | </nz-card> | ||||||
|  | |||||||
| @ -1,10 +1,11 @@ | |||||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
| import { ActivatedRoute, Router } from '@angular/router'; | import { ActivatedRoute, Router } from '@angular/router'; | ||||||
| import { STColumn, STComponent, STData } from '@delon/abc/st'; | import { STChange, STColumn, STComponent, STData } from '@delon/abc/st'; | ||||||
| import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; | import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; | ||||||
| import { ShipperBaseService } from '@shared'; | import { ShipperBaseService } from '@shared'; | ||||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | import { NzModalService } from 'ng-zorro-antd/modal'; | ||||||
| import { ReportingService } from '../../services/reporting.service'; | import { ReportingService } from '../../services/reporting.service'; | ||||||
|  | import { DatatableReportingFundInfoComponent } from '../fund-info/fund-info.component'; | ||||||
| import { DatatableReportingUploadSettingComponent } from '../upload-setting/upload-setting.component'; | import { DatatableReportingUploadSettingComponent } from '../upload-setting/upload-setting.component'; | ||||||
| import { DatatableReportingVerifyResultComponent } from '../verify-result/verify-result.component'; | import { DatatableReportingVerifyResultComponent } from '../verify-result/verify-result.component'; | ||||||
|  |  | ||||||
| @ -30,6 +31,7 @@ export class DatatableFundReportingComponent implements OnInit { | |||||||
|   ]; |   ]; | ||||||
|   selectedIndex = '1'; //选择的项目 |   selectedIndex = '1'; //选择的项目 | ||||||
|   serviceTel = ''; |   serviceTel = ''; | ||||||
|  |   selectedRows: any[] = []; | ||||||
|   constructor( |   constructor( | ||||||
|     public service: ReportingService, |     public service: ReportingService, | ||||||
|     private router: Router, |     private router: Router, | ||||||
| @ -51,7 +53,7 @@ export class DatatableFundReportingComponent implements OnInit { | |||||||
|    */ |    */ | ||||||
|   get reqParams() { |   get reqParams() { | ||||||
|     const params = Object.assign({}, this.sf?.value || {}, { |     const params = Object.assign({}, this.sf?.value || {}, { | ||||||
|       uploadStatus: this.selectedIndex, |       uploadStatus: this.selectedIndex | ||||||
|     }); |     }); | ||||||
|     delete params._$expand; |     delete params._$expand; | ||||||
|     return { ...params }; |     return { ...params }; | ||||||
| @ -60,9 +62,9 @@ export class DatatableFundReportingComponent implements OnInit { | |||||||
|   /** |   /** | ||||||
|    * 选中行 |    * 选中行 | ||||||
|    */ |    */ | ||||||
|   get selectedRows() { |   // get selectedRows() { | ||||||
|     return this.st?.list.filter((item: any) => item.checked) || []; |   //   return this.st?.list.filter((item: any) => item.checked) || []; | ||||||
|   } |   // } | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 伸缩查询条件 |    * 伸缩查询条件 | ||||||
| @ -217,12 +219,12 @@ export class DatatableFundReportingComponent implements OnInit { | |||||||
|       { title: '', type: 'checkbox', className: 'text-center', width: '60px', }, |       { title: '', type: 'checkbox', className: 'text-center', width: '60px', }, | ||||||
|       { title: '上传状态', render: 'uploadStatus', className: 'text-center', width: '120px', }, |       { title: '上传状态', render: 'uploadStatus', className: 'text-center', width: '120px', }, | ||||||
|       { title: '本地校验', render: 'verifyStatus', className: 'text-center', width: '120px', }, |       { title: '本地校验', render: 'verifyStatus', className: 'text-center', width: '120px', }, | ||||||
|       { title: '流水单号', index: 'serialNumberCode', className: 'text-center', width: '150px', }, |       { title: '流水单号', index: 'serialNumberCode', className: 'text-center', width: '190px', }, | ||||||
|       { |       { | ||||||
|         title: '订单号', |         title: '订单号', | ||||||
|         render: 'orderCode', |         render: 'orderCode', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         width: '150px', |         width: '180px', | ||||||
|       }, |       }, | ||||||
|       { title: '运单号', render: 'wayBillCode', className: 'text-center', width: '150px', }, |       { title: '运单号', render: 'wayBillCode', className: 'text-center', width: '150px', }, | ||||||
|       { |       { | ||||||
| @ -243,9 +245,9 @@ export class DatatableFundReportingComponent implements OnInit { | |||||||
|  |  | ||||||
|       { title: '收款银行', index: 'bankTypeLabel', className: 'text-center', width: '200px' }, |       { title: '收款银行', index: 'bankTypeLabel', className: 'text-center', width: '200px' }, | ||||||
|  |  | ||||||
|       { title: '银行流水号', index: 'bankSerialNumber', className: 'text-center', width: '150px' }, |       { title: '银行流水号', index: 'bankSerialNumber', className: 'text-center', width: '180px' }, | ||||||
|       { title: '实际支付金额', render: 'payAmount', className: 'text-center', width: '150px' }, |       { title: '实际支付金额', render: 'payAmount', className: 'text-center', width: '150px' }, | ||||||
|       { title: '交易时间', index: 'transactionTime', className: 'text-center', width: '150px' }, |       { title: '交易时间', index: 'transactionTime', className: 'text-center', width: '180px' }, | ||||||
|       { title: '上传次数', index: 'uploadFrequency', className: 'text-center', width: '120px' }, |       { title: '上传次数', index: 'uploadFrequency', className: 'text-center', width: '120px' }, | ||||||
|       { title: '上传时间', index: 'uploadTime', className: 'text-center', width: '180px' }, |       { title: '上传时间', index: 'uploadTime', className: 'text-center', width: '180px' }, | ||||||
|     ]; |     ]; | ||||||
| @ -268,9 +270,11 @@ export class DatatableFundReportingComponent implements OnInit { | |||||||
|       nzOkText: '确定', |       nzOkText: '确定', | ||||||
|       nzCancelText: '取消', |       nzCancelText: '取消', | ||||||
|       nzOnOk: () => { |       nzOnOk: () => { | ||||||
|         this.service.request(this.service.$api_recall_reporting, { rows: this.selectedRows }).subscribe((res: any) => { |         const ids = this.selectedRows.map(i => i?.id); | ||||||
|  |         this.service.request(this.service.$api_fund_reporting_recall, ids).subscribe((res: any) => { | ||||||
|           if (res) { |           if (res) { | ||||||
|             this.service.msgSrv.success('撤销成功'); |             this.service.msgSrv.success('撤销成功'); | ||||||
|  |  | ||||||
|             this.search(); |             this.search(); | ||||||
|           } |           } | ||||||
|         }) |         }) | ||||||
| @ -326,7 +330,8 @@ export class DatatableFundReportingComponent implements OnInit { | |||||||
|       this.openWainingModal('请选择需要上传的数据'); |       this.openWainingModal('请选择需要上传的数据'); | ||||||
|       return; |       return; | ||||||
|     } |     } | ||||||
|     this.service.request(this.service.$api_recall_reporting, { rows: this.selectedRows }).subscribe((res: any) => { |     const ids = this.selectedRows.map(i => i?.id); | ||||||
|  |     this.service.request(this.service.$api_fund_reporting_upload, ids).subscribe((res: any) => { | ||||||
|       if (res) { |       if (res) { | ||||||
|         this.service.msgSrv.success('上传成功'); |         this.service.msgSrv.success('上传成功'); | ||||||
|         this.search(); |         this.search(); | ||||||
| @ -354,13 +359,13 @@ export class DatatableFundReportingComponent implements OnInit { | |||||||
|   /** |   /** | ||||||
|    * 查看校验结果 |    * 查看校验结果 | ||||||
|    */ |    */ | ||||||
|   viewResult(item: any) { |   viewResult(record: any) { | ||||||
|     const modalRef = this.modal.create({ |     const modalRef = this.modal.create({ | ||||||
|       nzTitle: '校验结果', |       nzTitle: '校验结果', | ||||||
|       nzWidth: 1200, |       nzWidth: 1200, | ||||||
|       nzContent: DatatableReportingVerifyResultComponent, |       nzContent: DatatableReportingFundInfoComponent, | ||||||
|       nzComponentParams: { |       nzComponentParams: { | ||||||
|         record: item |         record | ||||||
|       }, |       }, | ||||||
|       nzFooter: null |       nzFooter: null | ||||||
|     }); |     }); | ||||||
| @ -380,6 +385,7 @@ export class DatatableFundReportingComponent implements OnInit { | |||||||
|  |  | ||||||
|  |  | ||||||
|   search() { |   search() { | ||||||
|  |     this.selectedRows = []; | ||||||
|     this.st.load(1); |     this.st.load(1); | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @ -398,5 +404,45 @@ export class DatatableFundReportingComponent implements OnInit { | |||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   changeSt(e: STChange): void { | ||||||
|  |  | ||||||
|  |     if (e.type === 'checkbox') { | ||||||
|  |       const checkRows = (e.checkbox as STData[]) || []; | ||||||
|  |       //判断当前页是否有选中的行 | ||||||
|  |       if (checkRows.length === 0) { | ||||||
|  |         // 当前页没有存在已勾选的行,移除之前所记录的当前页的行 | ||||||
|  |         const stList = this.st.list; | ||||||
|  |         stList.forEach(item => { | ||||||
|  |           this.selectedRows = this.selectedRows.filter((e: any) => e.id !== item.id); | ||||||
|  |         }) | ||||||
|  |       } else { | ||||||
|  |         //添加新增的行 | ||||||
|  |         checkRows.forEach((item: any) => { | ||||||
|  |           const newSelectedList = this.selectedRows.filter((r: any) => r.id === item.id); | ||||||
|  |           if (newSelectedList.length === 0) { | ||||||
|  |             this.selectedRows.push(item); | ||||||
|  |  | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |         // 移除取消选中的行 | ||||||
|  |         const stList = this.st.list; | ||||||
|  |         stList.forEach(item => { | ||||||
|  |           if (!item.checked) { | ||||||
|  |             const index = this.selectedRows.findIndex(_item => item.id === _item.id); | ||||||
|  |             if (index !== -1) this.selectedRows.splice(index, 1); | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |       } | ||||||
|  |     } else if (e.type === 'loaded') { | ||||||
|  |       // 页面加载时勾选 | ||||||
|  |       (e?.loaded || []).forEach((r: any) => { | ||||||
|  |         this.selectedRows.forEach((x) => { | ||||||
|  |           if (x.id === r.id) { | ||||||
|  |             r.checked = true; | ||||||
|  |           } | ||||||
|  |         }); | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -12,7 +12,10 @@ export class ReportingService extends BaseService { | |||||||
|   $api_get_upload_setting = ``; // 修改上传设置 |   $api_get_upload_setting = ``; // 修改上传设置 | ||||||
|   $api_upload_setting_save = ``; // 修改上传设置 |   $api_upload_setting_save = ``; // 修改上传设置 | ||||||
|  |  | ||||||
|   $api_get_fund_reporting_page = `/api/fcc/fundUploadHead/list/page`; |   $api_get_fund_reporting_page = `/api/fcc/fundUploadHead/list/page`; // 资金上报列表 | ||||||
|  |   $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) { |   constructor(public injector: Injector) { | ||||||
|     super(injector); |     super(injector); | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -27,6 +27,8 @@ export class DataService extends BaseService { | |||||||
|   $api_listPerformanceReportPage = `/api/sdc/report/listPerformanceReportPage`; |   $api_listPerformanceReportPage = `/api/sdc/report/listPerformanceReportPage`; | ||||||
|   // 运营报表运单状态分布 |   // 运营报表运单状态分布 | ||||||
|   $api_operationalReportWaybillStatusDistribution = `/api/sdc/report/operationalReportWaybillStatusDistribution`; |   $api_operationalReportWaybillStatusDistribution = `/api/sdc/report/operationalReportWaybillStatusDistribution`; | ||||||
|  |   // 运营报表柱状图 | ||||||
|  |   $api_operationalReportHistogram = `/api/sdc/report/operationalReportHistogram`; | ||||||
|   // 获取网络货运人 |   // 获取网络货运人 | ||||||
|   $api_get_network_freight_forwarder_list = `/api/mdc/cuc/networkTransporter/findAll`; |   $api_get_network_freight_forwarder_list = `/api/mdc/cuc/networkTransporter/findAll`; | ||||||
|   // 业绩报表柱状图 |   // 业绩报表柱状图 | ||||||
| @ -37,6 +39,10 @@ export class DataService extends BaseService { | |||||||
|   // 查询开票数据报表 |   // 查询开票数据报表 | ||||||
|   $api_listFinancialReportPage = `/api/sdc/report/listFinancialReportPage`; |   $api_listFinancialReportPage = `/api/sdc/report/listFinancialReportPage`; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |   // 查询货主报表 | ||||||
|  |   $api_listShipperReportPage = `/api/sdc/report/listShipperReportPage`; | ||||||
|  |  | ||||||
|   constructor(public injector: Injector) { |   constructor(public injector: Injector) { | ||||||
|     super(injector); |     super(injector); | ||||||
|   } |   } | ||||||
| @ -66,7 +72,7 @@ export class DataService extends BaseService { | |||||||
|     ); |     ); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   getPerformanceReportHistogram(params = {}){ |   getPerformanceReportHistogram(params = {}) { | ||||||
|     return this.request(this.$api_performanceReportHistogram, params) |     return this.request(this.$api_performanceReportHistogram, params) | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -134,7 +134,7 @@ export class FreightAccountDetailComponent implements OnInit { | |||||||
|         }, |         }, | ||||||
|         businessNumber: { |         businessNumber: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '关联单号', |           title: '交易单号', | ||||||
|           ui: { |           ui: { | ||||||
|             placeholder: '请输入' |             placeholder: '请输入' | ||||||
|           } |           } | ||||||
| @ -178,7 +178,7 @@ export class FreightAccountDetailComponent implements OnInit { | |||||||
|           default: '' |           default: '' | ||||||
|         }, |         }, | ||||||
|         projectId: { |         projectId: { | ||||||
|           title: '项目', |           title: '所属项目', | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           default: '', |           default: '', | ||||||
|           ui: { |           ui: { | ||||||
|  | |||||||
							
								
								
									
										252
									
								
								src/app/routes/financial-management/components/recharge-record/dist/recharge-record.component.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										252
									
								
								src/app/routes/financial-management/components/recharge-record/dist/recharge-record.component.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,252 @@ | |||||||
|  | "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: '查看回单<br>', | ||||||
|  |                         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; | ||||||
| @ -19,7 +19,7 @@ | |||||||
|     <div nz-row nzGutter="8"> |     <div nz-row nzGutter="8"> | ||||||
|         <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24"> |         <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24"> | ||||||
|             <sf #sf [schema]="searchSchema" |             <sf #sf [schema]="searchSchema" | ||||||
|                 [ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true" |                 [ui]="{ '*': { spanLabelFixed: 110,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true" | ||||||
|                 [button]="'none'"></sf> |                 [button]="'none'"></sf> | ||||||
|         </div> |         </div> | ||||||
|         <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand" |         <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand" | ||||||
| @ -43,3 +43,14 @@ | |||||||
|         </ng-template> |         </ng-template> | ||||||
|     </st> |     </st> | ||||||
| </nz-card> | </nz-card> | ||||||
|  |  | ||||||
|  | <ng-template #remarkodal> | ||||||
|  |     <div nz-row> | ||||||
|  |         <div nz-col nzSpan="24" se-container [labelWidth]="80"> | ||||||
|  |             <se [col]="1" label="备注"> | ||||||
|  |                 <textarea nz-input rows="3" [(ngModel)]="rechargeRemark" placeholder="最多不能超过100字" | ||||||
|  |                     maxlength="100"></textarea> | ||||||
|  |             </se> | ||||||
|  |         </div> | ||||||
|  |     </div> | ||||||
|  | </ng-template> | ||||||
| @ -1,6 +1,7 @@ | |||||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
| import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; | import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; | ||||||
| import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; | import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; | ||||||
|  | import { NzModalService } from 'ng-zorro-antd/modal'; | ||||||
| import { FreightAccountService } from '../../services/freight-account.service'; | import { FreightAccountService } from '../../services/freight-account.service'; | ||||||
|  |  | ||||||
| @Component({ | @Component({ | ||||||
| @ -16,8 +17,12 @@ export class RechargeRecordComponent implements OnInit { | |||||||
|   columns: STColumn[] = this.initST(); |   columns: STColumn[] = this.initST(); | ||||||
|   searchSchema: SFSchema = this.initSF(); |   searchSchema: SFSchema = this.initSF(); | ||||||
|  |  | ||||||
|  |   @ViewChild('remarkodal', { static: true }) | ||||||
|  |   remarkodal!: any; | ||||||
|  |   rechargeRemark = ''; | ||||||
|  |  | ||||||
|   _$expand = false; |   _$expand = false; | ||||||
|   constructor(public service: FreightAccountService) {} |   constructor(public service: FreightAccountService, private modal: NzModalService) {} | ||||||
|  |  | ||||||
|   ngOnInit(): void {} |   ngOnInit(): void {} | ||||||
|  |  | ||||||
| @ -28,6 +33,24 @@ export class RechargeRecordComponent implements OnInit { | |||||||
|     return requestOptions; |     return requestOptions; | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|  |   addRemark(item: any) { | ||||||
|  |     this.rechargeRemark = item.rechargeRemark; | ||||||
|  |     const modal = this.modal.create({ | ||||||
|  |       nzTitle: this.rechargeRemark ? '修改备注' : '添加备注', | ||||||
|  |       nzContent: this.remarkodal, | ||||||
|  |       nzFooter: [ | ||||||
|  |         { | ||||||
|  |           type: 'primary', | ||||||
|  |           label: '确认', | ||||||
|  |           loading: () => this.service.http.loading, | ||||||
|  |           onClick: () => { | ||||||
|  |             modal.destroy(); | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     }); | ||||||
|  |   } | ||||||
|  |  | ||||||
|   goBack() { |   goBack() { | ||||||
|     history.go(-1); |     history.go(-1); | ||||||
|   } |   } | ||||||
| @ -110,7 +133,7 @@ export class RechargeRecordComponent implements OnInit { | |||||||
|             { label: '全部', value: '' }, |             { label: '全部', value: '' }, | ||||||
|             { label: '货主账户', value: '1' }, |             { label: '货主账户', value: '1' }, | ||||||
|             { label: '司机账户', value: '2' }, |             { label: '司机账户', value: '2' }, | ||||||
|             { label: '营商账户', value: '3' } |             { label: '营商商账户', value: '3' } | ||||||
|           ], |           ], | ||||||
|           ui: { |           ui: { | ||||||
|             widget: 'select', |             widget: 'select', | ||||||
| @ -178,12 +201,13 @@ export class RechargeRecordComponent implements OnInit { | |||||||
|       { title: '银行流水号', index: 'paySerialNumber', width: 120 }, |       { title: '银行流水号', index: 'paySerialNumber', width: 120 }, | ||||||
|       { |       { | ||||||
|         title: '操作', |         title: '操作', | ||||||
|         width: 100, |         width: 120, | ||||||
|         fixed: 'right', |         fixed: 'right', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         buttons: [ |         buttons: [ | ||||||
|  |           { type: 'divider' }, | ||||||
|           { |           { | ||||||
|             text: '查看回单', |             text: '查看回单<br>', | ||||||
|             click: item => |             click: item => | ||||||
|               this.service.getReceiptUrl(item.receiptUrl, { |               this.service.getReceiptUrl(item.receiptUrl, { | ||||||
|                 bankType: item.bankType, |                 bankType: item.bankType, | ||||||
| @ -193,6 +217,10 @@ export class RechargeRecordComponent implements OnInit { | |||||||
|                 ltdId: item.ltdId, |                 ltdId: item.ltdId, | ||||||
|                 accountType: item.accountType |                 accountType: item.accountType | ||||||
|               }) |               }) | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             text: '添加备注', | ||||||
|  |             click: item => this.addRemark(item) | ||||||
|           } |           } | ||||||
|         ] |         ] | ||||||
|       } |       } | ||||||
|  | |||||||
| @ -138,9 +138,9 @@ export class TransactionFlowComponent { | |||||||
|           title: '账户类型', |           title: '账户类型', | ||||||
|           enum: [ |           enum: [ | ||||||
|             { label: '全部', value: '' }, |             { label: '全部', value: '' }, | ||||||
|             { label: '货主端', value: '1' }, |             { label: '货主账户', value: '1' }, | ||||||
|             { label: '司机端', value: '2' }, |             { label: '司机账户', value: '2' }, | ||||||
|             { label: '司机端', value: '3' } |             { label: '运营商账户', value: '3' } | ||||||
|           ], |           ], | ||||||
|           ui: { |           ui: { | ||||||
|             widget: 'select', |             widget: 'select', | ||||||
|  | |||||||
| @ -59,7 +59,7 @@ | |||||||
|                 <strong class="text-red">{{ selectedRows.length }}</strong> 条数据   累计提现 <strong |                 <strong class="text-red">{{ selectedRows.length }}</strong> 条数据   累计提现 <strong | ||||||
|                     class="text-red">{{ |                     class="text-red">{{ | ||||||
|                     totalCallNo }}</strong> |                     totalCallNo }}</strong> | ||||||
|                 <a *ngIf="totalCallNo > 0" (click)="st.clearCheck()" class="ml-lg">清空</a> |                 <a *ngIf="totalCallNo > 0" (click)="st.clearCheck();totalCallNo=0" class="ml-lg">清空</a> | ||||||
|             </div> |             </div> | ||||||
|             <button nz-button (click)="this.auditAction(null)">审核</button> |             <button nz-button (click)="this.auditAction(null)">审核</button> | ||||||
|         </div> |         </div> | ||||||
|  | |||||||
| @ -1,8 +1,9 @@ | |||||||
| import { Component, ViewChild } from '@angular/core'; | import { Component, ViewChild } from '@angular/core'; | ||||||
| import { Router } from '@angular/router'; | import { Router } from '@angular/router'; | ||||||
| import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; | import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; | ||||||
| import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; | import { SFComponent, SFSchema, SFDateWidgetSchema, SFAutoCompleteWidgetSchema, SFSelectWidgetSchema } from '@delon/form'; | ||||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | import { NzModalService } from 'ng-zorro-antd/modal'; | ||||||
|  | import { of } from 'rxjs'; | ||||||
| import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component'; | import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component'; | ||||||
|  |  | ||||||
| import { PartnerListService } from '../../services/partner-list.service'; | import { PartnerListService } from '../../services/partner-list.service'; | ||||||
| @ -241,11 +242,22 @@ export class PartnerListComponent { | |||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '渠道销售', |           title: '渠道销售', | ||||||
|           ui: { |           ui: { | ||||||
|             placeholder: '请输入姓名或者手机号', |             widget: 'select', | ||||||
|  |             searchDebounceTime: 300, | ||||||
|  |             searchLoadingText: '搜索中...', | ||||||
|  |             allowClear: true, | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               expand: (value: boolean) => value |               expand: (value: boolean) => value | ||||||
|  |             }, | ||||||
|  |             onSearch: (q: any) => { | ||||||
|  |               let str = q.replace(/^\s+|\s+$/g, ''); | ||||||
|  |               if (str) { | ||||||
|  |                 return this.service.getChannel({ enterpriseName: str }).toPromise(); | ||||||
|  |               } else { | ||||||
|  |                 return of([]); | ||||||
|  |               } | ||||||
|             } |             } | ||||||
|           } |           } as SFSelectWidgetSchema | ||||||
|         }, |         }, | ||||||
|         partnerType: { |         partnerType: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
| @ -367,13 +379,12 @@ export class PartnerListComponent { | |||||||
|     return [ |     return [ | ||||||
|       { |       { | ||||||
|         title: '合伙人名称', |         title: '合伙人名称', | ||||||
|         index: 'enterpriseName', |         index: 'contactName', | ||||||
|         width: 180, |         width: 180 | ||||||
|         format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '') |  | ||||||
|       }, |       }, | ||||||
|       { title: '付款编码', index: 'payCode', width: 160 }, |       { title: '付款编码', index: 'payCode', width: 160 }, | ||||||
|       { title: '邀请码', index: 'invitationCode', className: 'text-center', width: 130 }, |       { title: '邀请码', index: 'invitationCode', className: 'text-center', width: 130 }, | ||||||
|       { title: '企业管理员', index: 'contactName', width: 150, format: item => (item.partnerType ? `${item.contactName}` : '') }, |       { title: '企业管理员', index: 'adminName', width: 150 }, | ||||||
|       { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, |       { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, | ||||||
|       { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, |       { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, | ||||||
|       { title: '注册渠道', index: 'source', type: 'enum', enum: { 1: '合伙人注册', 2: '平台添加' }, width: 130 }, |       { title: '注册渠道', index: 'source', type: 'enum', enum: { 1: '合伙人注册', 2: '平台添加' }, width: 130 }, | ||||||
|  | |||||||
| @ -34,7 +34,7 @@ | |||||||
|                 已选择 |                 已选择 | ||||||
|                 <strong class="text-red">{{ selectedRows.length }}</strong> 张发票   发票金额总计 |                 <strong class="text-red">{{ selectedRows.length }}</strong> 张发票   发票金额总计 | ||||||
|                 <strong class="text-red">{{totalCallNo }}</strong> |                 <strong class="text-red">{{totalCallNo }}</strong> | ||||||
|                 <a *ngIf="totalCallNo > 0" (click)="st.clearCheck()" class="ml-lg">清空</a> |                 <a *ngIf="totalCallNo > 0" (click)="st.clearCheck();totalCallNo=0" class="ml-lg">清空</a> | ||||||
|             </div> |             </div> | ||||||
|             <button nz-button *ngIf="resourceStatus===1 || !resourceStatus" (click)="this.batchPush()">推送开票</button> |             <button nz-button *ngIf="resourceStatus===1 || !resourceStatus" (click)="this.batchPush()">推送开票</button> | ||||||
|             <!-- <button nz-button *ngIf="resourceStatus===1 || !resourceStatus" |             <!-- <button nz-button *ngIf="resourceStatus===1 || !resourceStatus" | ||||||
|  | |||||||
| @ -402,11 +402,11 @@ export class CancellationInvoiceComponent implements OnInit { | |||||||
|             iif: item => item.sts != '3', |             iif: item => item.sts != '3', | ||||||
|             click: item => this.requestedAction(item) |             click: item => this.requestedAction(item) | ||||||
|           }, |           }, | ||||||
|           { |           // { | ||||||
|             text: '推送开票<br>', |           //   text: '推送开票<br>', | ||||||
|             iif: item => item.sts === '1', |           //   iif: item => item.sts === '1', | ||||||
|             click: item => this.pushInvoiceAction(item) |           //   click: item => this.pushInvoiceAction(item) | ||||||
|           } |           // } | ||||||
|           // { |           // { | ||||||
|           //   text: '作废发票', |           //   text: '作废发票', | ||||||
|           //   iif: item => item.sts === '3', |           //   iif: item => item.sts === '3', | ||||||
|  | |||||||
| @ -102,7 +102,7 @@ | |||||||
|             <strong class="text-red">{{ selectedRows.length }}</strong> 条数据   开票金额总计 <strong |             <strong class="text-red">{{ selectedRows.length }}</strong> 条数据   开票金额总计 <strong | ||||||
|                 class="text-red">{{ |                 class="text-red">{{ | ||||||
|                 totalCallNo |currency }}</strong> |                 totalCallNo |currency }}</strong> | ||||||
|             <a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a> |             <a *ngIf="selectedRows.length > 0" (click)="st.clearCheck();totalCallNo='0'" class="ml-lg">清空</a> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
|  |  | ||||||
|  | |||||||
| @ -45,7 +45,7 @@ | |||||||
|         已选择 |         已选择 | ||||||
|         <strong class="text-red">{{ selectedRows.length }}</strong> 条数据   开票金额总计 |         <strong class="text-red">{{ selectedRows.length }}</strong> 条数据   开票金额总计 | ||||||
|         <strong class="text-red">{{ totalCallNo }}</strong> |         <strong class="text-red">{{ totalCallNo }}</strong> | ||||||
|         <a *ngIf="totalCallNo > 0" (click)="st.clearCheck()" class="ml-lg">清空</a> |         <a *ngIf="totalCallNo > 0" (click)="st.clearCheck();totalCallNo=0" class="ml-lg">清空</a> | ||||||
|       </div> |       </div> | ||||||
|       <button nz-button *ngIf="resourceStatus==='1' || !resourceStatus" (click)="this.batchRequested()">批量受理</button> |       <button nz-button *ngIf="resourceStatus==='1' || !resourceStatus" (click)="this.batchRequested()">批量受理</button> | ||||||
|       <button nz-button *ngIf="resourceStatus==='1' || !resourceStatus" |       <button nz-button *ngIf="resourceStatus==='1' || !resourceStatus" | ||||||
|  | |||||||
| @ -49,6 +49,22 @@ export class FreightComponentsListComponent implements OnInit { | |||||||
|       Object.assign(requestOptions.body, { |       Object.assign(requestOptions.body, { | ||||||
|         ...this.sf.value |         ...this.sf.value | ||||||
|       }); |       }); | ||||||
|  |       if (this.sf.value.createTime) { | ||||||
|  |         Object.assign(requestOptions.body, { | ||||||
|  |           createTime: { | ||||||
|  |             start: this.sf.value.createTime[0], | ||||||
|  |             end: this.sf.value.createTime[1] | ||||||
|  |           } | ||||||
|  |         }); | ||||||
|  |       } | ||||||
|  |       if (this.sf.value.approvalTime) { | ||||||
|  |         Object.assign(requestOptions.body, { | ||||||
|  |           approvalTime: { | ||||||
|  |             start: this.sf.value.approvalTime[0], | ||||||
|  |             end: this.sf.value.approvalTime[1] | ||||||
|  |           } | ||||||
|  |         }); | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|     this.loadingList = true; |     this.loadingList = true; | ||||||
|     return requestOptions; |     return requestOptions; | ||||||
| @ -215,9 +231,11 @@ export class FreightComponentsListComponent implements OnInit { | |||||||
|         customerType: { |         customerType: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '客户类型', |           title: '客户类型', | ||||||
|           enum: [{ label: '全部', value: '' }, |           enum: [ | ||||||
|           { label: '直客', value: 1 }, |             { label: '全部', value: '' }, | ||||||
|           { label: '渠道客户', value: 20 }], |             { label: '直客', value: 1 }, | ||||||
|  |             { label: '渠道客户', value: 20 } | ||||||
|  |           ], | ||||||
|           default: '', |           default: '', | ||||||
|           ui: { |           ui: { | ||||||
|             widget: 'select', |             widget: 'select', | ||||||
| @ -363,7 +381,7 @@ export class FreightComponentsListComponent implements OnInit { | |||||||
|   initST() { |   initST() { | ||||||
|     this.columns = [ |     this.columns = [ | ||||||
|       // { title: '', type: 'checkbox', className: 'text-center' }, |       // { title: '', type: 'checkbox', className: 'text-center' }, | ||||||
|       { title: '企业名称',  render: 'enterpriseName', width: 350 }, |       { title: '企业名称', render: 'enterpriseName', width: 350 }, | ||||||
|       { title: '统一社会信用代码', className: 'text-center', render: 'unifiedSocialCreditCode', width: 200 }, |       { title: '统一社会信用代码', className: 'text-center', render: 'unifiedSocialCreditCode', width: 200 }, | ||||||
|       { |       { | ||||||
|         title: '公司所在地', |         title: '公司所在地', | ||||||
|  | |||||||
| @ -176,21 +176,23 @@ export class ShipperBaseService extends BaseService { | |||||||
|   getEnterpriceList(params = { enterpriseName: '' }, containerAll = false) { |   getEnterpriceList(params = { enterpriseName: '' }, containerAll = false) { | ||||||
|     let str = params.enterpriseName.replace(/^\s+|\s+$/g, ''); |     let str = params.enterpriseName.replace(/^\s+|\s+$/g, ''); | ||||||
|     if (str) { |     if (str) { | ||||||
|       return this.request(this.$api_enterpriceList, params).pipe( |       return this.request(this.$api_enterpriceList, params) | ||||||
|         map((res: any) => { |         .pipe( | ||||||
|           if (!res) { |           map((res: any) => { | ||||||
|             return []; |             if (!res) { | ||||||
|           } |               return []; | ||||||
|           const list = res.map((item: any) => { |             } | ||||||
|             return { label: item.enterpriseName, value: item.id }; |             const list = res.map((item: any) => { | ||||||
|           }); |               return { label: item.enterpriseName, value: item.id }; | ||||||
|           const obj = []; |             }); | ||||||
|           if (containerAll) { |             const obj = []; | ||||||
|             obj.push({ label: '全部', value: '' }); |             if (containerAll) { | ||||||
|           } |               obj.push({ label: '全部', value: '' }); | ||||||
|           return [...obj, ...list]; |             } | ||||||
|         }) |             return [...obj, ...list]; | ||||||
|       ).toPromise();; |           }) | ||||||
|  |         ) | ||||||
|  |         .toPromise(); | ||||||
|     } else { |     } else { | ||||||
|       return of([]); |       return of([]); | ||||||
|     } |     } | ||||||
| @ -291,14 +293,15 @@ export class ShipperBaseService extends BaseService { | |||||||
|    * 获取渠道销售管理集合 |    * 获取渠道销售管理集合 | ||||||
|    * @returns |    * @returns | ||||||
|    */ |    */ | ||||||
|   getChannel() { |   getChannel(params = {}, containerAll = false) { | ||||||
|     const params = {}; |  | ||||||
|     return this.request(this.$api_get_channel, params, 'POST').pipe( |     return this.request(this.$api_get_channel, params, 'POST').pipe( | ||||||
|       map(res => { |       map(res => { | ||||||
|         if (res) { |         if (res) { | ||||||
|           return res.map((m: any) => { |           const obj = []; | ||||||
|             return { label: `${m.employeeVO?.empName}/${m.employeeVO?.mobile}`, value: m.id }; |           if (containerAll) { | ||||||
|           }); |             obj.push({ label: '全部', value: '' }); | ||||||
|  |           } | ||||||
|  |           return [...obj, ...res.map((m: any) => ({ label: `${m.employeeVO?.empName}/${m.employeeVO?.mobile}`, value: m.id }))]; | ||||||
|         } else { |         } else { | ||||||
|           return []; |           return []; | ||||||
|         } |         } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user