diff --git a/.gitignore b/.gitignore index 7b70918a..b5af4d96 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ scripts/var.less # IDE - VSCode .vscode/* +.vscode !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..a1c49108 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "compile-hero.disable-compile-files-on-did-save-code": true +} \ No newline at end of file diff --git a/proxy.conf.js b/proxy.conf.js index cb9ce42c..c4946471 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-18 09:51:21 * @LastEditors : Shiming - * @LastEditTime : 2022-03-31 14:02:38 + * @LastEditTime : 2022-04-01 14:41:31 * @FilePath : \\tms-obc-web\\proxy.conf.js * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -28,4 +28,14 @@ module.exports = { changeOrigin: true, logLevel: 'debug' }, + '//sascs': { + target: { + host: 'sascs-tj-tms-test.obs.cn-south-1.myhuaweicloud.com', + protocol: 'https:', + port: 443 + }, + secure: false, + changeOrigin: true, + logLevel: 'debug' + }, }; diff --git a/src/app/global-config.module.ts b/src/app/global-config.module.ts index 2d6bb8cd..af9999b1 100644 --- a/src/app/global-config.module.ts +++ b/src/app/global-config.module.ts @@ -17,7 +17,7 @@ const alainConfig: AlainConfig = { page: { show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000], toTop: false }, modal: { size: 'lg' } }, - sf: { button: { search: '查询' }, ui: { placeholder: '请输入' } }, + sf: { button: { search: '查询' } }, pageHeader: { homeI18n: 'home', recursiveBreadcrumb: true }, auth: { login_url: '/passport/login' }, acl: { guard_url: '/exception/403' }, diff --git a/src/app/routes/datatable/components/busitable/busiindex/busiindex.component.html b/src/app/routes/datatable/components/busitable/busiindex/busiindex.component.html index 2ed7ccb3..234c748e 100644 --- a/src/app/routes/datatable/components/busitable/busiindex/busiindex.component.html +++ b/src/app/routes/datatable/components/busitable/busiindex/busiindex.component.html @@ -32,7 +32,7 @@
- +
@@ -43,9 +43,9 @@
环比(%)
- + - +
@@ -53,7 +53,6 @@
- \ No newline at end of file diff --git a/src/app/routes/datatable/components/busitable/busiindex/busiindex.component.ts b/src/app/routes/datatable/components/busitable/busiindex/busiindex.component.ts index af0711a4..2a15b70e 100644 --- a/src/app/routes/datatable/components/busitable/busiindex/busiindex.component.ts +++ b/src/app/routes/datatable/components/busitable/busiindex/busiindex.component.ts @@ -4,7 +4,8 @@ import { DatePipe, _HttpClient } from '@delon/theme'; import { differenceInCalendarDays } from 'date-fns'; import { DataService } from '../../../services/data.service'; import { Chart } from '@antv/g2'; -import { BusitableCurveComponent } from './curve2/curve.component'; +import { BusitablePillarComponent } from './pillar/pillar.component'; +import { BusitableCurveComponent } from './curve/curve.component'; @Component({ selector: 'app-datatable-busiindex', @@ -16,6 +17,7 @@ import { BusitableCurveComponent } from './curve2/curve.component'; export class DatatableBusiindexComponent implements OnInit { @ViewChild('st') private readonly st!: STComponent; @ViewChild('curve') private readonly curve!: BusitableCurveComponent; + @ViewChild('pillar') private readonly pillar!: BusitablePillarComponent; type = 1; mode = 'year'; date: any = null; @@ -26,9 +28,8 @@ export class DatatableBusiindexComponent implements OnInit { timeNext: any = ['2022-01-01 00:00:00'] dateFormat = 'yyyy-MM-dd'; today = new Date(); - chainRatio: any = [] chartData: any = {} - el: any; + flag = false; columns: STColumn[] = [ { 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 => { if (res) { - this.chainRatio = res.chainRatio this.chartData = res - setTimeout(() => { - this.ngZone.runOutsideAngular(() => this.init(this.el)); - }, 1000); - + if(this.flag) { + this.pillar.reRender() + this.curve.reRender() + } } }) } @@ -124,6 +124,8 @@ export class DatatableBusiindexComponent implements OnInit { } else if(this.mode === 'month') { this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00'] } + this.flag = true + this.initData() } disabledDate = (current: Date): boolean => // Can not select days before today and today @@ -131,38 +133,4 @@ export class DatatableBusiindexComponent implements OnInit { exportFun(){ } - - render(el: ElementRef): 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(); - } } diff --git a/src/app/routes/datatable/components/busitable/busiindex/curve/curve.component.html b/src/app/routes/datatable/components/busitable/busiindex/curve/curve.component.html index 0640a4d4..315c4e18 100644 --- a/src/app/routes/datatable/components/busitable/busiindex/curve/curve.component.html +++ b/src/app/routes/datatable/components/busitable/busiindex/curve/curve.component.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/app/routes/datatable/components/busitable/busiindex/curve/curve.component.ts b/src/app/routes/datatable/components/busitable/busiindex/curve/curve.component.ts index c1a6e85e..70fd0aad 100644 --- a/src/app/routes/datatable/components/busitable/busiindex/curve/curve.component.ts +++ b/src/app/routes/datatable/components/busitable/busiindex/curve/curve.component.ts @@ -1,6 +1,4 @@ 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({ @@ -9,43 +7,44 @@ import { DataService } from 'src/app/routes/datatable/services/data.service'; styleUrls: ['./curve.component.less'] }) export class BusitableCurveComponent implements OnInit, OnChanges { - @Input() chartData: any; 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 { } - - ngOnChanges(changes: SimpleChanges): void { - if (this.chartData) { - setTimeout(() => { - this.ngZone.runOutsideAngular(() => this.init(this.el)); - }, 2000) - - } + reRender() { + setTimeout(() => { + this.chart.data(this.chartData); + this.chart.render(); + }, 500) } - - - handleClick(data: G2MiniAreaClickItem): void { - this.service.msgSrv.info(`${data.item.x} - ${data.item.y}`); - } - render(el: ElementRef): void { this.el = el.nativeElement - // this.ngZone.runOutsideAngular(() => this.init(this.el)); + this.ngZone.runOutsideAngular(() => this.init(this.el)); } + private init(el: HTMLElement): void { - const chart = new Chart({ + this.chart = new Chart({ container: el, autoFit: true, height: 500, }); - chart.data(this.chartData); - chart.scale({ + this.chart.data(this.chartData); + this.chart.scale({ year: { range: [0, 1], }, @@ -55,15 +54,15 @@ export class BusitableCurveComponent implements OnInit, OnChanges { }, }); - chart.tooltip({ + this.chart.tooltip({ showCrosshairs: true, // 展示 Tooltip 辅助线 shared: true, }); - chart.line().position('time*value').label('value'); - chart.point().position('time*value'); + this.chart.line().position('time*value').label('value'); + this.chart.point().position('time*value'); - chart.render(); + this.chart.render(); } } \ No newline at end of file diff --git a/src/app/routes/datatable/components/busitable/busiindex/curve2/curve.component.ts b/src/app/routes/datatable/components/busitable/busiindex/curve2/curve.component.ts deleted file mode 100644 index a02dff78..00000000 --- a/src/app/routes/datatable/components/busitable/busiindex/curve2/curve.component.ts +++ /dev/null @@ -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): 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(); - - } -} - - diff --git a/src/app/routes/datatable/components/busitable/busiindex/pillar/pillar.component.html b/src/app/routes/datatable/components/busitable/busiindex/pillar/pillar.component.html index 0640a4d4..315c4e18 100644 --- a/src/app/routes/datatable/components/busitable/busiindex/pillar/pillar.component.html +++ b/src/app/routes/datatable/components/busitable/busiindex/pillar/pillar.component.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/app/routes/datatable/components/busitable/busiindex/pillar/pillar.component.ts b/src/app/routes/datatable/components/busitable/busiindex/pillar/pillar.component.ts index f7460ec9..ad1cef14 100644 --- a/src/app/routes/datatable/components/busitable/busiindex/pillar/pillar.component.ts +++ b/src/app/routes/datatable/components/busitable/busiindex/pillar/pillar.component.ts @@ -7,48 +7,50 @@ import { DataService } from 'src/app/routes/datatable/services/data.service'; styleUrls: ['./pillar.component.less'] }) export class BusitablePillarComponent implements OnInit, OnChanges { - el: any; - @Input() chartData: any ; + @Input() chartData: any; + chart: any; constructor(private service: DataService, private ngZone: NgZone) { } ngOnChanges(changes: SimpleChanges): void { - if(this.chartData){ - setTimeout(()=>{ - this.ngZone.runOutsideAngular(() => this.init(this.el)); - }, 1000) - + if (this.chartData) { + // setTimeout(()=>{ + // this.chart.render(true) + // }, 1000) + } } ngOnInit(): void { - + + } + reRender() { + setTimeout(() => { + this.chart.data(this.chartData); + this.chart.render(); + }, 500) } render(el: ElementRef): void { this.el = el.nativeElement + this.ngZone.runOutsideAngular(() => this.init(this.el)); } - private init(el: HTMLElement): void { - const chart = new Chart({ + this.chart = new Chart({ container: el, autoFit: true, height: 500, }); - - chart.data(this.chartData); - chart.tooltip({ + this.chart.data(this.chartData); + + this.chart.tooltip({ showMarkers: false, }); - chart.interval().position('time*number'); - - chart.interaction('element-active'); - - chart.render(); - + this.chart.interval().position('time*number'); + this.chart.render(); } } \ No newline at end of file diff --git a/src/app/routes/datatable/components/busitable/mantable/mantable.component.html b/src/app/routes/datatable/components/busitable/mantable/mantable.component.html index 835e4a2e..88d2016b 100644 --- a/src/app/routes/datatable/components/busitable/mantable/mantable.component.html +++ b/src/app/routes/datatable/components/busitable/mantable/mantable.component.html @@ -38,5 +38,4 @@ - \ No newline at end of file diff --git a/src/app/routes/datatable/components/compliance/index/curve/curve.component.html b/src/app/routes/datatable/components/compliance/index/curve/curve.component.html new file mode 100644 index 00000000..7ceba0b7 --- /dev/null +++ b/src/app/routes/datatable/components/compliance/index/curve/curve.component.html @@ -0,0 +1,2 @@ + + diff --git a/src/app/routes/datatable/components/busitable/busiindex/curve2/curve.component.less b/src/app/routes/datatable/components/compliance/index/curve/curve.component.less similarity index 100% rename from src/app/routes/datatable/components/busitable/busiindex/curve2/curve.component.less rename to src/app/routes/datatable/components/compliance/index/curve/curve.component.less diff --git a/src/app/routes/datatable/components/compliance/index/curve/curve.component.ts b/src/app/routes/datatable/components/compliance/index/curve/curve.component.ts new file mode 100644 index 00000000..0dbacb97 --- /dev/null +++ b/src/app/routes/datatable/components/compliance/index/curve/curve.component.ts @@ -0,0 +1,91 @@ +import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; +import { G2MiniAreaClickItem } from '@delon/chart/mini-area'; + +// import DataSet from '@antv/data-set'; +const DataSet = require('@antv/data-set'); +import { Chart } from '@antv/g2'; +import { DataService } from 'src/app/routes/datatable/services/data.service'; +@Component({ + selector: 'app-compliance-curve', + templateUrl: './curve.component.html', + styleUrls: ['./curve.component.less'] +}) +export class ComplianceCurveComponent implements OnInit,OnChanges { + el: any; + @Input() chartData: any; + chart: any; + constructor(private service: DataService, private ngZone: NgZone) { + + } + ngOnChanges(changes: SimpleChanges): void { + if (this.chartData) { + // setTimeout(()=>{ + // this.chart.render(true) + // }, 1000) + + } + } + + ngOnInit(): void { + + } + reRender() { + setTimeout(() => { + this.chart.data(this.chartData); + this.chart.render(); + }, 1000) + } + render(el: ElementRef): void { + this.el = el.nativeElement + setTimeout(() => { + console.log(this.chartData) + this.ngZone.runOutsideAngular(() => this.init(this.el)); + }, 1000) + } + + private init(el: HTMLElement): void { + this.chart = new Chart({ + container: el, + autoFit: true, + height: 500, + }); + + this.chart.data(this.chartData); + this.chart.scale({ + time: { + range: [0, 1], + }, + number: { + min: 0, + nice: true, + }, + }); + + this.chart.tooltip({ + showCrosshairs: true, + shared: true, + }); + + this.chart.axis('proportion', { + label: { + formatter: (val: any) => { + return val*100+ ' %'; + }, + }, + }); + + this.chart + .line() + .position('situationDate*proportion') + .color('type') + .tooltip('proportion*type', function(name: any, value: any) { + return { + name: name*100+'%', + value: value + }; + }); + + this.chart.render(); + + } +} diff --git a/src/app/routes/datatable/components/compliance/index/index.component.html b/src/app/routes/datatable/components/compliance/index/index.component.html index dbcfc3c0..0d55f76b 100644 --- a/src/app/routes/datatable/components/compliance/index/index.component.html +++ b/src/app/routes/datatable/components/compliance/index/index.component.html @@ -24,37 +24,37 @@
- +
- 合格:12423 不合格:12423 + 合格:{{cardData1?.leftQuantity}} 不合格:{{cardData1?.rightQuantity}}
- +
- 货源单:12423 合同单:12423 + 货源单:{{cardData2?.leftQuantity}} 合同单:{{cardData2?.rightQuantity}}
- +
- 司机:12423 车队长:12423 + 司机:{{cardData3?.leftQuantity}} 车队长:{{cardData3?.rightQuantity}}
- +
- 准时:12423 逾期:12423 + 准时:{{cardData4?.leftQuantity}} 逾期:{{cardData4?.rightQuantity}}
@@ -62,5 +62,6 @@
- + + diff --git a/src/app/routes/datatable/components/compliance/index/index.component.ts b/src/app/routes/datatable/components/compliance/index/index.component.ts index 4de2d93e..97ab6b2b 100644 --- a/src/app/routes/datatable/components/compliance/index/index.component.ts +++ b/src/app/routes/datatable/components/compliance/index/index.component.ts @@ -5,6 +5,9 @@ import { format } from 'date-fns'; import { SFComponent, SFDateWidgetSchema, SFRadioWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; import { G2TimelineData, G2TimelineMap } from '@delon/chart/timeline'; import { Chart } from '@antv/g2'; +import { DataService } from '../../../services/data.service'; +import { ComplianceCurveComponent } from './curve/curve.component'; + @Component({ selector: 'app-datatable-compliance-index', templateUrl: './index.component.html', @@ -12,51 +15,107 @@ import { Chart } from '@antv/g2'; providers: [DatePipe] }) export class DatatableComplianceIndexComponent implements OnInit { + @ViewChild('curve') private readonly curve!: ComplianceCurveComponent; @ViewChild('sf', { static: false }) + sf!: SFComponent; ui!: SFUISchema; schema: SFSchema = {}; mode = 'year'; date: any = null; - dateFormat = 'yyyy-MM-dd'; - time: any = ['2022-01-01 00:00:00'] - constructor(private http: _HttpClient, private modal: ModalHelper, private ngZone: NgZone, private datePipe: DatePipe) {} + dateFormat = 'yyyy'; + time: any = '2022' + chartData: any = {} + + cardData1:any; + cardData2:any; + cardData3:any; + cardData4:any; + + constructor(private http: _HttpClient, private modal: ModalHelper, private ngZone: NgZone,public service: DataService, private datePipe: DatePipe) {} ngOnInit(): void { this.initSF(); + this.initdData(); } + initdData(){ + const params ={ + ...this.sf?.value, + timeType:this.mode ==='month'?'M':'Y', + time:this.time + } + this.service.request(this.service.$api_getBillRateQualified, params).subscribe(res => { + if (res) { + this.cardData1 = res; + this.cardData1.proportion = this.cardData1.proportion*100 +'%' + } + }); + this.service.request(this.service.$api_getBillRateProportion, params).subscribe(res => { + if (res) { + this.cardData2 = res; + this.cardData2.proportion = this.cardData2.proportion*100 +'%' + } + }); + this.service.request(this.service.$api_getBillRateDirectPayment, params).subscribe(res => { + if (res) { + this.cardData3 = res; + this.cardData3.proportion = this.cardData3.proportion*100 +'%' + } + }); + this.service.request(this.service.$api_getBillTimelyPayment, params).subscribe(res => { + if (res) { + this.cardData4 = res; + this.cardData4.proportion = this.cardData4.proportion*100 +'%' + } + }); + + this.service.request(this.service.$api_listMonitorSituation, params).subscribe(res => { + if (res) { + this.chartData = res + this.curve.reRender(); + + } + }) + } + + changeData(){ if(this.mode === 'year') { this.dateFormat = 'yyyy' } else if(this.mode === 'month') { this.dateFormat = 'yyyy-MM' - } else { - this.dateFormat = 'yyyy-MM-dd' - } + } + } onChange(result: any) { if(this.mode === 'year') { - this.time = [this.datePipe.transform(this.date, 'yyyy') + '-01-01 00:00:00'] + this.time = this.datePipe.transform(this.date, 'yyyy') } else if(this.mode === 'month') { - this.time = [this.datePipe.transform(this.date, 'yyyy-MM') + '-01 00:00:00'] + this.time = this.datePipe.transform(this.date, 'yyyy-MM') } + this.initdData(); } initSF() { this.schema = { properties: { - name: { + enterpriseInfoId: { type: 'string', title: '', ui: { widget: 'select', - placeholder: '网络货运人' + placeholder: '网络货运人', + asyncData: () => this.service.getNetworkFreightForwarder({}), + change:()=>{ + this.initdData(); + }, + allowClear: true } }, - name2: { + enterpriseProjectId: { type: 'string', title: '', ui: { @@ -64,11 +123,12 @@ export class DatatableComplianceIndexComponent implements OnInit { placeholder: '部门' } }, - name3: { + salesmanId: { type: 'string', title: '', ui: { - placeholder: '业务员' + placeholder: '业务员', + enter: () => this.initdData(), } } } @@ -81,6 +141,9 @@ export class DatatableComplianceIndexComponent implements OnInit { } + + + render(el: ElementRef) { this.ngZone.runOutsideAngular(() => this.init(el.nativeElement)); } diff --git a/src/app/routes/datatable/components/customtable/customindex/customindex.component.html b/src/app/routes/datatable/components/customtable/customindex/customindex.component.html index d70ba207..1b5b0a1f 100644 --- a/src/app/routes/datatable/components/customtable/customindex/customindex.component.html +++ b/src/app/routes/datatable/components/customtable/customindex/customindex.component.html @@ -55,5 +55,4 @@
- \ No newline at end of file diff --git a/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts b/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts index c2acb2b1..d8b85955 100644 --- a/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts +++ b/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts @@ -23,6 +23,7 @@ export class DatatableCustomindexComponent implements OnInit { dateNext: any = null; modeNext = 'year'; timeNext: any = ['2022-01-01 00:00:00'] + columns: STColumn[] = [ { title: '用户类型', index: 'networkTransporterName', className: 'text-center' }, diff --git a/src/app/routes/datatable/components/customtable/driver/driver.component.ts b/src/app/routes/datatable/components/customtable/driver/driver.component.ts index b69286d8..6932fd0b 100644 --- a/src/app/routes/datatable/components/customtable/driver/driver.component.ts +++ b/src/app/routes/datatable/components/customtable/driver/driver.component.ts @@ -52,7 +52,8 @@ export class DatatableDriverComponent implements OnInit { } let params: any = { time: this.time, - type: this.type + type: this.type, + ...this.sf?.value }; delete params._$expand; diff --git a/src/app/routes/datatable/components/customtable/owner/owner.component.html b/src/app/routes/datatable/components/customtable/owner/owner.component.html index 71e913ac..35c64a0e 100644 --- a/src/app/routes/datatable/components/customtable/owner/owner.component.html +++ b/src/app/routes/datatable/components/customtable/owner/owner.component.html @@ -38,7 +38,7 @@ - diff --git a/src/app/routes/datatable/components/customtable/owner/owner.component.ts b/src/app/routes/datatable/components/customtable/owner/owner.component.ts index 40bb4492..a7d178f8 100644 --- a/src/app/routes/datatable/components/customtable/owner/owner.component.ts +++ b/src/app/routes/datatable/components/customtable/owner/owner.component.ts @@ -26,23 +26,33 @@ export class DatatableOwnerComponent implements OnInit { schema: SFSchema = {}; columns: STColumn[] = [ - { title: '货主名称', index: 'networkTransporterName', className: 'text-center' }, - { title: '注册时间', index: 'zsl', className: 'text-center' }, - { title: '客户类型', index: 'yingsje', className: 'text-center' }, - { title: '业务员', index: 'cys', className: 'text-center' }, - { title: '合伙人', index: 'yingfyf', className: 'text-center' }, - { title: '客户状态', index: 'yl', className: 'text-center' }, - { title: '订单数', index: 'djd', className: 'text-center' }, - { title: '订单金额', index: 'ysz', className: 'text-center' }, - { title: '应收订单数', index: 'yswc', className: 'text-center' }, - { title: '应收金额', index: 'yisje', className: 'text-center' }, + { title: '货主名称', index: 'enterpriseName', className: 'text-center' }, + { title: '注册时间', index: 'registerTime', className: 'text-center' }, + { title: '客户类型', index: 'customerType', className: 'text-center', type: 'enum', enum: { + 1: '平台客户', + 2: '直客', + 3: '渠道客户' + } + }, + { title: '业务员', index: 'salesmanName', 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: '已收金额', render: 'yifyf', className: 'text-center' }, - { title: '附加费金额', index: 'yifyf', 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: 'yisje', className: 'text-center' }, + { title: '应收附加费', index: 'yingsfjf', className: 'text-center' }, + { title: '已收附加费', index: 'yisfjf', className: 'text-center' }, + { title: '附加费率', index: 'fjfl', className: 'text-center' }, + { title: '已开票金额', index: 'ykpje', className: 'text-center' } ]; /** * 查询参数 @@ -59,7 +69,8 @@ export class DatatableOwnerComponent implements OnInit { } let params: any = { time: this.time, - type: this.type + type: this.type, + ...this.sf?.value }; delete params._$expand; @@ -76,28 +87,41 @@ export class DatatableOwnerComponent implements OnInit { this.schema = { properties: { _$expand: { type: 'boolean', ui: { hidden: true } }, - billCode: { + enterpriseName: { type: 'string', title: '货主名称', ui: { placeholder: '请输入', } }, - resourceCode: { + customerType: { type: 'string', title: '客户类型', ui: { + widget: 'select', placeholder: '请选择', - } + }, + enum: [ + {label: '直客', value: 2}, + {label: '渠道客户', value: 3}, + {label: '平台客户', value: 1}, + ] }, - loadingPlace: { + customerStatus: { type: 'string', title: '客户状态', ui: { + widget: 'select', placeholder: '请选择', - } + }, + enum: [ + {label: '未激活', value: 1}, + {label: '沉默', value: 2}, + {label: '流失', value: 3}, + {label: '活跃', value: 4}, + ] }, - createTime: { + registerTime: { title: '注册时间', type: 'string', ui: { diff --git a/src/app/routes/datatable/components/financetable/curve/curve.component.html b/src/app/routes/datatable/components/financetable/curve/curve.component.html index bcfe240b..7ceba0b7 100644 --- a/src/app/routes/datatable/components/financetable/curve/curve.component.html +++ b/src/app/routes/datatable/components/financetable/curve/curve.component.html @@ -1,5 +1,2 @@ - - - diff --git a/src/app/routes/datatable/components/financetable/curve/curve.component.ts b/src/app/routes/datatable/components/financetable/curve/curve.component.ts index 620d2029..66ef76b1 100644 --- a/src/app/routes/datatable/components/financetable/curve/curve.component.ts +++ b/src/app/routes/datatable/components/financetable/curve/curve.component.ts @@ -1,4 +1,4 @@ -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'; @@ -9,160 +9,81 @@ import { Chart } from '@antv/g2'; templateUrl: './curve.component.html', styleUrls: ['./curve.component.less'] }) -export class FinanceTableCurveComponent implements OnInit { - constructor(private service: DataService, private ngZone: NgZone) {} +export class FinanceTableCurveComponent implements OnInit,OnChanges { + el: any; + @Input() chartData: any; + chart: any; + constructor(private service: DataService, private ngZone: NgZone) { - ngOnInit(): void {} + } + ngOnChanges(changes: SimpleChanges): void { + if (this.chartData) { + // setTimeout(()=>{ + // this.chart.render(true) + // }, 1000) - handleClick(data: G2MiniAreaClickItem): void { - this.service.msgSrv.info(`${data.item.x} - ${data.item.y}`); + } } + ngOnInit(): void { + + } + reRender() { + setTimeout(() => { + this.chart.data(this.chartData); + this.chart.render(); + }, 1000) + } render(el: ElementRef): void { - this.ngZone.runOutsideAngular(() => this.initBar(el.nativeElement)); + this.el = el.nativeElement + setTimeout(() => { + this.ngZone.runOutsideAngular(() => this.init(this.el)); + }, 1000) } - private initBar(el: HTMLElement): void { - const data = [ - { name: '已收金额(元)', 月份: 'Jan.', 月均降雨量: 18.9 }, - { name: '已收金额(元)', 月份: 'Feb.', 月均降雨量: 28.8 }, - { name: '已收金额(元)', 月份: 'Mar.', 月均降雨量: 39.3 }, - { name: '已收金额(元)', 月份: 'Apr.', 月均降雨量: 81.4 }, - { name: '已收金额(元)', 月份: 'May', 月均降雨量: 47 }, - { name: '已收金额(元)', 月份: 'Jun.', 月均降雨量: 20.3 }, - { name: '已收金额(元)', 月份: 'Jul.', 月均降雨量: 24 }, - { name: '已收金额(元)', 月份: 'Aug.', 月均降雨量: 35.6 }, - { name: '已付运费(元)', 月份: 'Jan.', 月均降雨量: 12.4 }, - { name: '已付运费(元)', 月份: 'Feb.', 月均降雨量: 23.2 }, - { name: '已付运费(元)', 月份: 'Mar.', 月均降雨量: 34.5 }, - { name: '已付运费(元)', 月份: 'Apr.', 月均降雨量: 99.7 }, - { name: '已付运费(元)', 月份: 'May', 月均降雨量: 52.6 }, - { name: '已付运费(元)', 月份: 'Jun.', 月均降雨量: 35.5 }, - { name: '已付运费(元)', 月份: 'Jul.', 月均降雨量: 37.4 }, - { name: '已付运费(元)', 月份: 'Aug.', 月均降雨量: 42.4 } - ]; - const chart = new Chart({ + private init(el: HTMLElement): void { + this.chart = new Chart({ container: el, autoFit: true, - height: 500 - }); - chart.data(data); - chart.scale('月均降雨量', { - nice: true - }); - chart.tooltip({ - showMarkers: false, - shared: true - }); - // 图表下方图形文字自定义 - chart.legend({ - items: [ - { - name: '已收金额(元)', - value: 'node_load1', - marker: { - symbol: 'circle', - style: { fill: '#6395f9' } - } - }, - { - name: '已付运费(元)', - value: 'node_load1', - marker: { - symbol: 'circle', - style: { fill: '#62daab' } - } - } - ] + height: 500, }); - chart - .interval() - .position('月份*月均降雨量') - .color('name') - .adjust([ - { - type: 'dodge', - marginRatio: 0 - } - ]); - - chart.render(); - } - - render2(el: ElementRef): void { - this.ngZone.runOutsideAngular(() => this.initCurve(el.nativeElement)); - } - - private initCurve(el: HTMLElement): void { - const chart = new Chart({ - container: el, - autoFit: true, - height: 400 - }); - // 以三组数据为例, 需要展示 91/92/93年中a/b/c数据走势 - const data = [ - { data: '1月', label: '平均附加费率', value: 5 }, - { data: '2月', label: '平均附加费率', value: 10 }, - { data: '3月', label: '平均附加费率', value: 25 }, - { data: '4月', label: '平均附加费率', value: 35 }, - { data: '5月', label: '平均附加费率', value: 15 }, - { data: '6月', label: '平均附加费率', value: 5 }, - { data: '7月', label: '平均附加费率', value: 95 }, - { data: '8月', label: '平均附加费率', value: 45 } - ]; - - chart.data(data); - //刻度自定义 - chart.scale({ - data: { - range: [0, 1] + this.chart.data(this.chartData); + this.chart.scale({ + time: { + range: [0, 1], + }, + number: { + nice: true, }, - value: { - min: 0, - nice: true - } }); - // 图表下方图形文字自定义 - chart.legend({ - items: [ - { - name: '平均附加费率', - value: 'node_load1', - marker: { - symbol: 'circle', - style: { fill: '#6193f7' } - } - } - ] - }); - // 提示自定义 - chart.tooltip({ + + this.chart.tooltip({ showCrosshairs: true, - shared: true + shared: true, + }); + + this.chart.axis('number', { + label: { + formatter: (val: any) => { + return val*100+ ' %'; + }, + }, }); - //数据格式化 - chart.axis('value', { - label: { - formatter: val => { - return val + ' %'; - } - } - }); - // 在x*y的坐标点上按z值绘制线条, 如果z值相同将使用直线连接 - chart + + this.chart .line() - .position('data*value') - .color('label') - .tooltip('label*value', (name: any, value: any) => { + .position('time*number') + .color('name') + .tooltip('name*number', (name:any, value:any) => { return { name: name, - value: value + '%' + value: value*100 + '%' }; }); - // 在x*y的坐标上按z值绘制圆点 - // chart.point().position('data*value').size(4).color('label').shape('circle'); - chart.render(); + + this.chart.render(); + } } diff --git a/src/app/routes/datatable/components/financetable/financetable.component.html b/src/app/routes/datatable/components/financetable/financetable.component.html index a25ffb3f..b9c25062 100644 --- a/src/app/routes/datatable/components/financetable/financetable.component.html +++ b/src/app/routes/datatable/components/financetable/financetable.component.html @@ -50,7 +50,7 @@
- +
@@ -64,5 +64,12 @@
- +
+
+ +
+
+ +
+
\ No newline at end of file diff --git a/src/app/routes/datatable/components/financetable/financetable.component.ts b/src/app/routes/datatable/components/financetable/financetable.component.ts index 0c64cc9e..92464349 100644 --- a/src/app/routes/datatable/components/financetable/financetable.component.ts +++ b/src/app/routes/datatable/components/financetable/financetable.component.ts @@ -4,6 +4,10 @@ import { SFSchema } from '@delon/form'; import { DatePipe, ModalHelper, _HttpClient } from '@delon/theme'; import { DataService } from '../../services/data.service'; import { differenceInCalendarDays } from 'date-fns'; +import { OperationCurveComponent } from '../operationtable/curve/curve.component'; +import { OperationPillarComponent } from '../operationtable/pillar/pillar.component'; +import { FinanceTableCurveComponent } from './curve/curve.component'; +import { FinancetablePillarComponent } from './pillar/pillar.component'; @Component({ selector: 'app-datatable-financetable', @@ -12,6 +16,8 @@ import { differenceInCalendarDays } from 'date-fns'; providers: [DatePipe] }) export class DatatableFinancetableComponent implements OnInit { + @ViewChild('curve') private readonly curve!: FinanceTableCurveComponent; + @ViewChild('pillar') private readonly pillar!: FinancetablePillarComponent; @ViewChild('st') private readonly st!: STComponent; type = 1; mode = 'year'; @@ -24,8 +30,9 @@ export class DatatableFinancetableComponent implements OnInit { timeNext: any = ['2022-01-01 00:00:00'] today = new Date(); enterpriseInfoId = '' - enterpriseInfoIdPie = '' interManlist: any = [] + chartData: any = {} + flag = false; columns: STColumn[] = [ { title: '运营主体', index: 'networkTransporterName', className: 'text-center' }, { title: '客户预存款', index: 'czcgje',render: 'czcgje', className: 'text-center' }, @@ -63,13 +70,37 @@ export class DatatableFinancetableComponent implements OnInit { constructor(public service: DataService, private datePipe: DatePipe) { } 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_financialReportHistogram, params).subscribe(res => { + if (res) { + this.chartData = res + if(this.flag) { + this.pillar.reRender() + this.curve.reRender() + } + } + }) } initData() { this.service.getNetworkFreightForwarder().subscribe(res => { this.interManlist = res this.enterpriseInfoId = res[0].value - this.enterpriseInfoIdPie = res[0].value }) } @@ -119,6 +150,7 @@ export class DatatableFinancetableComponent implements OnInit { } else if(this.mode === 'month') { this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00'] } + this.initPillarData(); } } diff --git a/src/app/routes/datatable/components/busitable/busiindex/curve2/curve.component.html b/src/app/routes/datatable/components/financetable/pillar/pillar.component.html similarity index 100% rename from src/app/routes/datatable/components/busitable/busiindex/curve2/curve.component.html rename to src/app/routes/datatable/components/financetable/pillar/pillar.component.html diff --git a/src/app/routes/datatable/components/financetable/pillar/pillar.component.less b/src/app/routes/datatable/components/financetable/pillar/pillar.component.less new file mode 100644 index 00000000..e69de29b diff --git a/src/app/routes/datatable/components/financetable/pillar/pillar.component.ts b/src/app/routes/datatable/components/financetable/pillar/pillar.component.ts new file mode 100644 index 00000000..9959782e --- /dev/null +++ b/src/app/routes/datatable/components/financetable/pillar/pillar.component.ts @@ -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-financetable-pillar', + templateUrl: './pillar.component.html', + styleUrls: ['./pillar.component.less'] +}) +export class FinancetablePillarComponent 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): 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(); + } + +} \ No newline at end of file diff --git a/src/app/routes/datatable/components/operationtable/curve/curve.component.spec.ts b/src/app/routes/datatable/components/operationtable/curve/curve.component.spec.ts deleted file mode 100644 index cd009e56..00000000 --- a/src/app/routes/datatable/components/operationtable/curve/curve.component.spec.ts +++ /dev/null @@ -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; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ DatatableDataindexComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(DatatableDataindexComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/routes/datatable/components/operationtable/curve/curve.component.ts b/src/app/routes/datatable/components/operationtable/curve/curve.component.ts index 8f76f6cd..44a3a28e 100644 --- a/src/app/routes/datatable/components/operationtable/curve/curve.component.ts +++ b/src/app/routes/datatable/components/operationtable/curve/curve.component.ts @@ -1,131 +1,81 @@ -import { Component, ElementRef, NgZone, OnInit, ViewChild } from '@angular/core'; -import { G2MiniAreaClickItem } from '@delon/chart/mini-area'; -import { DataService } from '../../../services/data.service'; -import DataSet from '@antv/data-set'; +import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; import { Chart } from '@antv/g2'; +import { DataService } from 'src/app/routes/datatable/services/data.service'; @Component({ - selector: 'app-datatable-curve', + selector: 'app-operation-curve', templateUrl: './curve.component.html', 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) { } + ngOnChanges(changes: SimpleChanges): void { + if (this.chartData) { + // setTimeout(()=>{ + // this.chart.render(true) + // }, 1000) + + } + } ngOnInit(): void { } - - - - - handleClick(data: G2MiniAreaClickItem): void { - this.service.msgSrv.info(`${data.item.x} - ${data.item.y}`); + reRender() { + setTimeout(() => { + this.chart.data(this.chartData); + this.chart.render(); + }, 1000) } - render(el: ElementRef): 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, autoFit: true, height: 500, - padding: [20, 40], }); - const view1 = chart.createView(); - view1.data(dataPillar); - view1.scale('price', { - nice: true, + this.chart.data(this.chartData); + this.chart.scale({ + time: { + range: [0, 1], + }, + number: { + nice: true, + }, }); - view1.tooltip({ - showMarkers: false, + + this.chart.tooltip({ + showCrosshairs: true, shared: true, }); - - view1 - .interval() - .position('month*price') - .color('name') - .adjust([ - { - type: 'dodge', - marginRatio: 0, + + this.chart.axis('number', { + label: { + formatter: (val: any) => { + return val; }, - ]); - - const view2 = chart.createView(); - // view2.axis('count', { - // label: { - // formatter: (val) => { - // return val + ' °C'; - // }, - // }, - // }); - view2.data(data); - view2 + }, + }); + + this.chart .line() - .position('month*count') + .position('time*number') .color('name') - - - - - // chart.interaction('active-region'); - chart.render(); - + + + this.chart.render(); + } -} - +} \ No newline at end of file diff --git a/src/app/routes/datatable/components/operationtable/operationtable.component.html b/src/app/routes/datatable/components/operationtable/operationtable.component.html index bfd7283d..eb11b8ba 100644 --- a/src/app/routes/datatable/components/operationtable/operationtable.component.html +++ b/src/app/routes/datatable/components/operationtable/operationtable.component.html @@ -28,7 +28,7 @@
- +
@@ -42,11 +42,22 @@
- +
+
+ + + + +
+
+ + +
+
- - - - - - \ No newline at end of file + + diff --git a/src/app/routes/datatable/components/operationtable/operationtable.component.ts b/src/app/routes/datatable/components/operationtable/operationtable.component.ts index 51a2f215..e94ec542 100644 --- a/src/app/routes/datatable/components/operationtable/operationtable.component.ts +++ b/src/app/routes/datatable/components/operationtable/operationtable.component.ts @@ -3,6 +3,8 @@ import { STColumn, STComponent } from '@delon/abc/st'; import { DatePipe, _HttpClient } from '@delon/theme'; import { DataService } from '../../services/data.service'; import { differenceInCalendarDays } from 'date-fns'; +import { OperationCurveComponent } from './curve/curve.component'; +import { OperationPillarComponent } from './pillar/pillar.component'; @Component({ selector: 'app-datatable-operationtable', @@ -12,6 +14,8 @@ import { differenceInCalendarDays } from 'date-fns'; }) export class DatatableOperationtableComponent implements OnInit { + @ViewChild('curve') private readonly curve!: OperationCurveComponent; + @ViewChild('pillar') private readonly pillar!: OperationPillarComponent; @ViewChild('st') private readonly st!: STComponent; type = 1; mode = 'year'; @@ -24,8 +28,10 @@ export class DatatableOperationtableComponent implements OnInit { timeNext: any = ['2022-01-01 00:00:00'] today = new Date(); enterpriseInfoId = '' - enterpriseInfoIdPie = '' + interManlist: any = [] + chartData: any = {} + flag = false; columns: STColumn[] = [ { title: '运营主体', index: 'networkTransporterName', 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) { } ngOnInit(): void { 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() { + this.service.getNetworkFreightForwarder().subscribe(res => { this.interManlist = res this.enterpriseInfoId = res[0].value - this.enterpriseInfoIdPie = res[0].value }) } diff --git a/src/app/routes/datatable/components/operationtable/pie/pie.component.html b/src/app/routes/datatable/components/operationtable/pie/pie.component.html index f36f8f9d..c7a478c5 100644 --- a/src/app/routes/datatable/components/operationtable/pie/pie.component.html +++ b/src/app/routes/datatable/components/operationtable/pie/pie.component.html @@ -1,3 +1,6 @@ -
+ + + + -
\ No newline at end of file + \ No newline at end of file diff --git a/src/app/routes/datatable/components/operationtable/pie/pie.component.less b/src/app/routes/datatable/components/operationtable/pie/pie.component.less index a69b0822..567be99f 100644 --- a/src/app/routes/datatable/components/operationtable/pie/pie.component.less +++ b/src/app/routes/datatable/components/operationtable/pie/pie.component.less @@ -1,5 +1,5 @@ .box{ width: 50%; - overflow: hidden; margin:0 auto; + overflow: hidden; } \ No newline at end of file diff --git a/src/app/routes/datatable/components/operationtable/pie/pie.component.ts b/src/app/routes/datatable/components/operationtable/pie/pie.component.ts index 594ed06d..fa58fbd1 100644 --- a/src/app/routes/datatable/components/operationtable/pie/pie.component.ts +++ b/src/app/routes/datatable/components/operationtable/pie/pie.component.ts @@ -13,21 +13,30 @@ export class OperationtablePieComponent implements OnInit { @ViewChild('pie', { static: false }) pie!: G2PieComponent; chartData: any = []; el: any; + enterpriseInfoIdPie = '' + interManlist: any = [] constructor(private service: DataService, private ngZone: NgZone) { } ngOnInit(): void { this.initData() + this.initManData() } initData(){ - this.service.request(this.service.$api_operationalReportWaybillStatusDistribution).subscribe(res => { + this.service.request(this.service.$api_operationalReportWaybillStatusDistribution, {id: this.enterpriseInfoIdPie}).subscribe(res => { if (res) { this.chartData = res this.ngZone.runOutsideAngular(() => this.init(this.el)); } }) } + initManData() { + this.service.getNetworkFreightForwarder().subscribe(res => { + this.interManlist = res + this.enterpriseInfoIdPie = res[0].value + }) + } render(el: ElementRef): void { this.el = el.nativeElement } diff --git a/src/app/routes/datatable/components/operationtable/pillar/pillar.component.html b/src/app/routes/datatable/components/operationtable/pillar/pillar.component.html new file mode 100644 index 00000000..0640a4d4 --- /dev/null +++ b/src/app/routes/datatable/components/operationtable/pillar/pillar.component.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app/routes/datatable/components/operationtable/pillar/pillar.component.less b/src/app/routes/datatable/components/operationtable/pillar/pillar.component.less new file mode 100644 index 00000000..e69de29b diff --git a/src/app/routes/datatable/components/operationtable/pillar/pillar.component.ts b/src/app/routes/datatable/components/operationtable/pillar/pillar.component.ts new file mode 100644 index 00000000..54a3b4d4 --- /dev/null +++ b/src/app/routes/datatable/components/operationtable/pillar/pillar.component.ts @@ -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): 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(); + } + +} \ No newline at end of file diff --git a/src/app/routes/datatable/datatable.module.ts b/src/app/routes/datatable/datatable.module.ts index 4e36ad35..a1a054d8 100644 --- a/src/app/routes/datatable/datatable.module.ts +++ b/src/app/routes/datatable/datatable.module.ts @@ -8,7 +8,6 @@ import { DatatableOperationtableComponent } from './components/operationtable/op import { OperationtablePieComponent } from './components/operationtable/pie/pie.component'; import { DatatableOrderReportingComponent } from './reporting/components/order-reporting/order-reporting.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 { DatatableFinancetableComponent } from './components/financetable/financetable.component'; import { DatatableInvoicetableComponent } from './components/invoicetable/invoicetable.component'; @@ -23,8 +22,12 @@ import { DatatableBusiindexComponent } from './components/busitable/busiindex/bu import { DatatableMantableComponent } from './components/busitable/mantable/mantable.component'; import { BusitablePillarComponent } from './components/busitable/busiindex/pillar/pillar.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 { FinancetablePillarComponent } from './components/financetable/pillar/pillar.component'; +import { ComplianceCurveComponent } from './components/compliance/index/curve/curve.component'; const COMPONENTS: Type[] = [ DatatableDataindexComponent, @@ -34,7 +37,6 @@ const COMPONENTS: Type[] = [ DatatableOperationtableComponent, OperationtablePieComponent, DatatableOrderReportingComponent, - OperationtableCurveComponent, DatatableComplianceIndexComponent, DatatableFinancetableComponent, DatatableInvoicetableComponent, @@ -49,9 +51,14 @@ const COMPONENTS: Type[] = [ DatatableMantableComponent, BusitablePillarComponent, DatatableFundReportingComponent, - BusitableCurveComponent, DatatableReportingFundInfoComponent, - FinanceTableCurveComponent + BusitableCurveComponent, + OperationPillarComponent, + OperationCurveComponent, + DatatableReportingFundInfoComponent, + FinanceTableCurveComponent, + FinancetablePillarComponent, + ComplianceCurveComponent ] diff --git a/src/app/routes/datatable/services/data.service.ts b/src/app/routes/datatable/services/data.service.ts index 21e5e03b..f8bf590d 100644 --- a/src/app/routes/datatable/services/data.service.ts +++ b/src/app/routes/datatable/services/data.service.ts @@ -27,6 +27,8 @@ export class DataService extends BaseService { $api_listPerformanceReportPage = `/api/sdc/report/listPerformanceReportPage`; // 运营报表运单状态分布 $api_operationalReportWaybillStatusDistribution = `/api/sdc/report/operationalReportWaybillStatusDistribution`; + // 运营报表柱状图 + $api_operationalReportHistogram = `/api/sdc/report/operationalReportHistogram`; // 获取网络货运人 $api_get_network_freight_forwarder_list = `/api/mdc/cuc/networkTransporter/findAll`; // 业绩报表柱状图 @@ -37,6 +39,24 @@ export class DataService extends BaseService { // 查询开票数据报表 $api_listFinancialReportPage = `/api/sdc/report/listFinancialReportPage`; + + // 查询货主报表 + $api_listShipperReportPage = `/api/sdc/report/listShipperReportPage`; + // 财务报表柱状图 + $api_financialReportHistogram = `/api/sdc/report/financialReportHistogram`; + // 合规监控报表-运费直付占比 + $api_getBillRateDirectPayment = `/api/sdc/reportComplianceMonitor/getBillRateDirectPayment`; + // 合规监控报表-货源单占比 + $api_getBillRateProportion = `/api/sdc/reportComplianceMonitor/getBillRateProportion`; + // 合规监控报表-订单合格率 + $api_getBillRateQualified = `/api/sdc/reportComplianceMonitor/getBillRateQualified`; + // 合规监控报表-付款及时率 + $api_getBillTimelyPayment = `/api/sdc/reportComplianceMonitor/getBillTimelyPayment`; + // 合规监控报表-监控报表(折线图) + $api_listMonitorSituation = `/api/sdc/reportComplianceMonitor/listMonitorSituation`; + + + constructor(public injector: Injector) { super(injector); } @@ -45,7 +65,7 @@ export class DataService extends BaseService { * 获取网络货运人 * @returns */ - getNetworkFreightForwarder(params = {}, containerAll = false) { + getNetworkFreightForwarder(params = {}, containerAll = false) { return this.request(this.$api_get_network_freight_forwarder_list, params).pipe( map((res: any) => { if (!res) { @@ -66,7 +86,7 @@ export class DataService extends BaseService { ); } - getPerformanceReportHistogram(params = {}){ + getPerformanceReportHistogram(params = {}) { return this.request(this.$api_performanceReportHistogram, params) } } diff --git a/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.html b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.html index b0b593d1..8e7f9b89 100644 --- a/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.html +++ b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.html @@ -9,7 +9,7 @@ - diff --git a/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.ts b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.ts index 679bd575..7b27f0bc 100644 --- a/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.ts +++ b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.ts @@ -35,7 +35,8 @@ export class DriverAccountDetailComponent implements OnInit { ltdId: this.params.ltdId, projectId: this.params.projectId, enterpriseId: this.params.enterpriseId, - roleId: this.params.roleId + roleId: this.params.roleId, + bankType: this.params.bankType, }); if (this.sf) { Object.assign(requestOptions.body, { @@ -59,6 +60,7 @@ export class DriverAccountDetailComponent implements OnInit { roleId: this.params.roleId, pageIndex: this.st.pi, pageSize: this.st.ps, + bankType: this.params.bankType, createTime: { start: this.sf?.value?.createTime?.[0] || '', end: this.sf?.value?.createTime?.[1] || '' @@ -162,13 +164,13 @@ export class DriverAccountDetailComponent implements OnInit { private initST(): STColumn[] { return [ - { title: '交易时间', index: 'createTime', type: 'date' }, - { title: '流水号', index: 'channelPaySn' }, - { title: '交易类型', index: 'tradeTypeLabel', className: 'text-center' }, - { title: '交易单号', index: 'businessNumber' }, - { title: '订单号', index: 'orderSn' }, - { title: '运单号', index: 'transportSn' }, - { title: '收支类型', index: 'incomeTypeLabel', className: 'text-center' }, + { title: '交易时间', index: 'createTime', type: 'date', width: 150 }, + { title: '流水号', index: 'channelPaySn', width: 170 }, + { title: '交易类型', index: 'tradeTypeLabel', className: 'text-center', width: 150 }, + { title: '交易单号', index: 'businessNumber' , width: 190}, + { title: '订单号', index: 'orderSn' , width: 190}, + { title: '运单号', index: 'transportSn', width: 190 }, + { title: '收支类型', index: 'incomeTypeLabel', className: 'text-center', width: 150 }, { title: '交易金额', index: 'amount', @@ -185,9 +187,9 @@ export class DriverAccountDetailComponent implements OnInit { className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.accountBalance }) } }, - { title: '付款方', index: 'payName'}, - { title: '收款方', index: 'payeeName' }, - { title: '备注', index: 'tradeContent' }, + { title: '付款方', index: 'payName', width: 150}, + { title: '收款方', index: 'incomeName', width: 150 }, + { title: '备注', index: 'tradeContent' , width: 150}, ]; } } diff --git a/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.html b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.html index 5eec5af3..b5de0f0c 100644 --- a/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.html +++ b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.html @@ -9,7 +9,7 @@ - diff --git a/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.ts b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.ts index d3d962dc..410c7fac 100644 --- a/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.ts +++ b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.ts @@ -134,7 +134,7 @@ export class FreightAccountDetailComponent implements OnInit { }, businessNumber: { type: 'string', - title: '关联单号', + title: '交易单号', ui: { placeholder: '请输入' } @@ -178,7 +178,7 @@ export class FreightAccountDetailComponent implements OnInit { default: '' }, projectId: { - title: '项目', + title: '所属项目', type: 'string', default: '', ui: { @@ -221,7 +221,7 @@ export class FreightAccountDetailComponent implements OnInit { widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.accountBalance }) } }, { title: '付款方', index: 'payName' , width: 170}, - { title: '收款方', index: 'payeeName', width: 170 }, + { title: '收款方', index: 'incomeName', width: 170 }, { title: '备注', index: 'tradeContent', width: 170 } ]; } diff --git a/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.html b/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.html index 429e0d92..41222f22 100644 --- a/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.html +++ b/src/app/routes/financial-management/components/platform-account/platform-account-detail/platform-account-detail.component.html @@ -1,4 +1,4 @@ - + diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html index 7be8c803..532c7369 100644 --- a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-24 16:58:02 * @LastEditors : Shiming - * @LastEditTime : 2022-03-11 16:40:47 + * @LastEditTime : 2022-04-01 10:58:50 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -33,8 +33,8 @@ {{ i?.goodsResource?.shipperAppUserName }} {{i?.goodsResource?.enterpriseProjectName}} {{i?.goodsResource?.serviceTypeLabel}} - {{i?.createUserName}} /{{i?.createUserPhone}} - {{i?.goodsResource?.dispatchName}}/{{i?.goodsResource?.dispatchPhone}} + {{i?.createUserName}} {{ i?.createUserPhone ? "/" + i?.createUserPhone : ''}} + {{i?.goodsResource?.dispatchName}}{{ i?.goodsResource?.dispatchPhone ? "/" + i?.goodsResource?.dispatchPhone : ''}} @@ -236,10 +236,10 @@ - {{ i?.carModel }}/{{ i?.carLength }} + {{ i?.carModel }}{{ i?.carLength ? "/" + i?.carLength : ''}} - {{i?.driverName}}/{{i?.driverPhone}}/{{i?.carNo}} + {{i?.driverName}}{{ i?.driverPhone ? "/" + i?.driverPhone : ''}}{{ i?.carNo ? "/" + i?.carNo : ''}} {{ i?.driverCarModelLabel }},{{ i?.driverCarLengthLabel }}米,{{ i?.driverCarWeight }}吨 @@ -275,7 +275,7 @@ 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}%) -
收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}
+
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? "/" + i?.payeePhone : ''}}
diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts index 32a8b032..2e5fb6b9 100644 --- a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts @@ -532,7 +532,7 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit { } ], // 运费信息 - // 收款人 + // 车队长 payeeId: this.dirverPhone, dirverBankCard: this.dirverBankCard, // 银行卡 // 发车时间 diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html index b69356f5..1bb3fc7c 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-06 20:20:26 * @LastEditors : Shiming - * @LastEditTime : 2022-03-30 17:39:43 + * @LastEditTime : 2022-04-01 10:56:13 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -43,8 +43,8 @@ {{ i?.goodsResource?.shipperAppUserName }} {{ i?.goodsResource?.enterpriseProjectName }} {{ i?.goodsResource?.serviceTypeLabel }} - {{ i?.createUserName }} /{{ i?.createUserPhone }} - {{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} + {{ i?.createUserName }} {{ i?.createUserPhone ? "/" + i?.createUserPhone : ''}} + {{ i?.goodsResource?.dispatchName }}{{ i?.goodsResource?.dispatchPhone ? "/" + i?.goodsResource?.dispatchPhone : ''}} {{ i?.goodsResource?.resourceCode }} {{ i?.wayBill?.wayBillCode }} {{ i?.goodsResource?.paymentDays }} @@ -83,8 +83,8 @@ {{i?.goodsInfoList?.[0]?.weight}}吨,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件 - {{ i?.carModel }}/{{ i?.carLength }} - {{ i?.driverName }}/{{ i?.driverPhone }}{{ i?.carNo }} + {{ i?.carModel }}{{ i?.carLength ? "/" + i?.carLength : ''}} + {{ i?.driverName }}{{i?.driverPhone ? "/" + i?.driverPhone : ''}}{{ i?.carNo ? "/" + i?.carNo : ''}} {{ i?.driverCarModelLabel }},{{ i?.driverCarLengthLabel }}米,{{ i?.driverCarWeight }}吨 @@ -76,13 +76,13 @@
卸 | {{ item?.unloadTime }}
-
{{ item?.driverName }}/{{ item?.driverPhone }}/{{ item?.carNo }}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : ''}}
-
{{ item?.payeeName }}/{{ item?.payeePhone }}
+
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
-
{{ item?.createUserName }}/{{ item?.createUserPhone }}
+
{{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }}
{{ item.billCode }} diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index c56db9bf..8fe0410e 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -506,7 +506,7 @@ export class OrderManagementBulkComponent implements OnInit { render: 'driverName' }, { - title: '收款人', + title: '车队长', className: 'text-left', width: '180px', index: 'payeeName', diff --git a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.html b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.html index f586416d..ea93a1a5 100644 --- a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.html +++ b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-03-29 14:28:39 + * @LastEditTime : 2022-04-01 10:59:54 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\compliance-audit\\compliance-audit.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -81,10 +81,10 @@
卸 | {{ item?.unloadingTime }}
-
{{ item?.driverName }}/{{ item?.driverPhone }}/{{ item?.carNo }}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : '' }}
-
{{ item?.payeeName }}/{{ item?.payeePhone }}
+
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
{{ item.billCode }} diff --git a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts index fdea46af..c6b4e3a1 100644 --- a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts +++ b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts @@ -353,7 +353,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit { render: 'driverName' }, { - title: '收款人', + title: '车队长', className: 'text-left', width: '180px', index: 'payeeName', diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html index 6fa93400..684c8358 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-03-25 13:44:11 + * @LastEditTime : 2022-04-01 11:00:38 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\receipts-audit\\receipts-audit.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -92,10 +92,10 @@
卸 | {{ item?.unloadingTime }}
-
{{ item?.driverName }}/{{ item?.driverPhone }}/{{ item?.carNo }}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : ''}}{{ item?.carNo ? "/" + item?.carNo : '' }}
-
{{ item?.payeeName }}/{{ item?.payeePhone }}
+
{{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }}
diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts index a5228fed..04957c1b 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts @@ -364,7 +364,7 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { render: 'driverName' }, { - title: '收款人', + title: '车队长', className: 'text-left', width: '180px', index: 'payeeName', @@ -397,25 +397,25 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { { text: '生成电子单据', click: _record => this.generate(_record, 2), - iif: item => item.auditStatus == '1', + iif: item => !item?.loadingElectronicsLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-electronicBillingOne'] }, }, { text: '通过', click: _record => this.sign(_record), - iif: item => item.auditStatus == '1', + iif: item => !item?.loadingElectronicsLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-billAuditPassBatch'] }, }, { text: '修改', click: _record => this.modification(_record), - iif: item => item.auditStatus == '1', + iif: item => !item?.loadingElectronicsLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-updateBillExamine'] }, }, { text: '查看凭证', click: _record => this.generate(_record, 3), - iif: item => item.auditStatus == '2', + iif: item => item?.loadingElectronicsLadingBillFilePath, acl: { ability: ['ORDER-RECEIPTS-view'] }, }, ] @@ -491,8 +491,10 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { nzFooter: null }); modalRef.afterClose.subscribe((result: any) => { - this.st.load(1); - this.getGoodsSourceStatistical() + if(result) { + this.st.load(); + this.getGoodsSourceStatistical() + } }); } // 通过 @@ -544,23 +546,14 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { nzTitle: `已选择${this.selectedRows.length}条订单,确认批量生成电子单据吗?`, nzContent: `确认后单据不可修改,请谨慎操作。`, nzOnOk: () => - // this.service.request(this.service.$api_get_cancelAnOrder, { ids: params }).subscribe(res => { - // if (res === true) { - // this.service.msgSrv.success('操作成功!'); - // this.st?.reload(1); - // this.getGoodsSourceStatistical(); - // this.initST(); - // } - // this.st?.reload(1); + { + this.service.downloadFile(this.service.$api_createBillTakeGoods,params) + this.service.downloadFile(this.service.$api_createBillDischargeGoods,params) + this.service.msgSrv.success('生成成功!'); + this.st?.reload() // this.getGoodsSourceStatistical(); - // }) - { - this.service.downloadFile(this.service.$api_createBillTakeGoods,{billIds: params.join(',')}) - - - this.service.downloadFile(this.service.$api_createBillDischargeGoods,{billIds: params.join(',')})} - - }); + } + }) } // 获取所属项目 getRegionCode(regionCode: any) { diff --git a/src/app/routes/order-management/components/risk/risk.component.html b/src/app/routes/order-management/components/risk/risk.component.html index b211966d..df5ff43f 100644 --- a/src/app/routes/order-management/components/risk/risk.component.html +++ b/src/app/routes/order-management/components/risk/risk.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-03-24 19:53:19 + * @LastEditTime : 2022-04-01 11:02:21 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\risk\\risk.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -33,7 +33,7 @@
- +
-
{{ item?.driverName }}/{{ item?.driverPhone }}
+
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : ''}}
-
{{ item?.payeeName }}/{{ item?.payeePhone }}
+
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + item?.payeePhone : '' }}
@@ -97,8 +97,8 @@

货物名称:{{ i?.goodsName }}

-

重量/体积:{{ i?.weight }}吨/{{ i?.volume }}方

-

车型/车长:{{ i?.carModelLabel }}/ {{ i?.carLengthLabel }}

+

重量/体积:{{ i?.weight ? i?.weight + '吨' : '' }}{{ i?.volume ? "/" + i?.volume + '方' : ''}}

+

车型/车长:{{ i?.carModelLabel }} {{ i?.carLengthLabel ? "/" + i?.carLengthLabel : ''}}

diff --git a/src/app/routes/order-management/components/risk/risk.component.ts b/src/app/routes/order-management/components/risk/risk.component.ts index 768350d9..1e3a85d0 100644 --- a/src/app/routes/order-management/components/risk/risk.component.ts +++ b/src/app/routes/order-management/components/risk/risk.component.ts @@ -182,7 +182,7 @@ export class OrderManagementRiskComponent implements OnInit { }, payeeName: { type: 'string', - title: '收款人', + title: '车队长', ui: { visibleIf: { _$expand: (value: boolean) => value @@ -314,7 +314,7 @@ export class OrderManagementRiskComponent implements OnInit { render: 'driverName' }, { - title: '收款人', + title: '车队长', className: 'text-left', width: '200px', render: 'payeeName' @@ -532,4 +532,12 @@ export class OrderManagementRiskComponent implements OnInit { viewEvaluate(item: any) { this.router.navigate(['/order-management/risk-detail', item.id]); } + // 导出 + exprot() { + this.service.request(this.service.$api_get_asyncExportRiskBillList, this.reqParams).subscribe((res: any) => { + if (res) { + this.service.msgSrv.success('导出成功,请去下载中心下载!'); + } + }); + } } diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html index 4bdf02bd..31a07be6 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-23 13:39:58 * @LastEditors : Shiming - * @LastEditTime : 2022-03-23 14:46:17 + * @LastEditTime : 2022-04-01 11:08:44 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -32,8 +32,10 @@ {{ i?.goodsResource?.shipperAppUserName }} {{ i?.goodsResource?.enterpriseProjectName }} {{ i?.goodsResource?.serviceTypeLabel }} - {{ i?.createUserName || i?.goodsResource?.createUserName }} /{{ i?.createUserPhone || i?.goodsResource?.createUserPhone }} - {{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} + {{ i?.createUserName }} {{ i?.createUserPhone ? '/' + i?.createUserPhone : '' }} + {{ i?.goodsResource?.dispatchName }}{{ i?.goodsResource?.dispatchPhone ? '/' + i?.goodsResource?.dispatchPhone : '' }} + {{ i?.externalBillCode }} {{ i?.goodsResource?.resourceCode }} {{ i?.wayBillId }} @@ -216,10 +218,10 @@ - {{ i?.carModel }}/{{ i?.carLength }} + {{ i?.carModel }}{{ i?.carLength ? '/' + i?.carLength : '' }} - {{i?.driverName}}/{{i?.driverPhone}}/{{i?.carNo}} + {{ i?.driverName }}{{i?.driverPhone ? "/" + i?.driverPhone : ''}}{{ i?.carNo ? "/" + i?.carNo : ''}} @@ -251,7 +253,7 @@ 总计:{{ i?.totalAmount | currency }} (运费{{ i?.totalFreight | currency }}, 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}% )
-
收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}
+
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? "/" + i?.payeePhone : ''}}
diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts index 9d8e5fff..d00cc627 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts @@ -520,7 +520,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { ], // 运费信息 billExpenseDetailDTOList: this.st._data, - // 收款人 + // 车队长 payeeId: this.dirverPhone, dirverBankCard: this.dirverBankCard, // 银行卡 // 发车时间 diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index c05f1bcc..12a00d05 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-30 09:36:23 + * @LastEditTime : 2022-04-01 11:06:21 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -15,24 +15,26 @@ -
+

订单号: {{ i?.billCode }}

-
+
@@ -43,8 +45,10 @@ {{ i?.goodsResource?.shipperAppUserName }} {{ i?.goodsResource?.enterpriseProjectName }} {{ i?.goodsResource?.serviceTypeLabel }} - {{ i?.createUserName || i?.goodsResource?.createUserName }} /{{ i?.createUserPhone || i?.goodsResource?.createUserPhone }} - {{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} + {{ i?.createUserName }} {{ i?.createUserPhone ? '/' + i?.createUserPhone : '' }} + {{ i?.goodsResource?.dispatchName }}{{ i?.goodsResource?.dispatchPhone ? '/' + i?.goodsResource?.dispatchPhone : '' }} + {{ i?.externalBillCode }} {{ i?.goodsResource?.resourceCode }} {{ i?.wayBill?.wayBillCode }} @@ -66,9 +70,13 @@
  - + [nzStatus]="item.displayStatus === 'SHOW' ? 'finish' : 'wait'" + >
@@ -86,8 +94,8 @@ {{i?.goodsInfoList?.[0]?.weight}}吨,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件 - {{ i?.carModel }}/{{ i?.carLength }} - {{ i?.driverName }}/{{ i?.driverPhone }}/{{ i?.carNo }} + {{ i?.carModel }}{{ i?.carLength ? '/' + i?.carLength : '' }} + {{ i?.driverName }}{{ i?.driverPhone ? '/' + i?.driverPhone : '' }}{{ i?.carNo ? '/' + i?.carNo : '' }} {{ i?.driverCarModelLabel }},{{ i?.driverCarLengthLabel }}米,{{ i?.driverCarWeight }}吨
@@ -108,7 +116,7 @@

装货地:{{ item?.province }}{{ item.city }}{{ item.area }}{{ item.detailedAddress }}

-

联系人:{{ item.appUserName }}/{{ item.contractTelephone }}

+

联系人:{{ item.appUserName }}{{ item.contractTelephone ? '/' + item.contractTelephone : '' }}

@@ -122,7 +130,7 @@

卸货地:{{ item?.province }}{{ item.city }}{{ item.area }}{{ item.detailedAddress }}

-

联系人:{{ item.appUserName }}/{{ item.contractTelephone }}

+

联系人:{{ item.appUserName }}{{ item.contractTelephone ? '/' + item.contractTelephone : '' }}

@@ -135,25 +143,24 @@ - {{i?.goodsResource?.insuranceTypeLabel}} + {{ i?.goodsResource?.insuranceTypeLabel }} - {{i?.goodsResource?.goodsValue !==null?(i?.goodsResource?.goodsValue|currency)+'元':'-'}} + {{ i?.goodsResource?.goodsValue !== null ? (i?.goodsResource?.goodsValue | currency) + '元' : '-' }} - {{i?.goodsResource?.insurancePremium!==null?(i?.goodsResource?.insurancePremium |currency)+'元':'-'}} + {{ i?.goodsResource?.insurancePremium !== null ? (i?.goodsResource?.insurancePremium | currency) + '元' : '-' }} - {{ item.price | currency }} - {{ item.price + item.surcharge | currency }} + {{ item.price + item.surcharge | currency }} {{ item.surcharge | currency }} @@ -161,16 +168,16 @@
总计:{{ i?.totalAmount | currency }} (运费{{ i?.totalFreight | currency }}, - 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}% ) + 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2) }}% )
-
收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}
+
车队长:{{ i?.payeeName }}{{ i?.payeePhone ? '/' + i?.payeePhone : '' }}
- 查看附件      - 补充协议 + 查看附件      + 补充协议 @@ -190,7 +197,9 @@ {{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }} - {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} + + {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} + {{ i?.supplementaryInformationVO?.area }} @@ -213,12 +222,20 @@
- +
-
+
@@ -230,36 +247,39 @@
- + - -
- 您的订单可能存在交易风险,请及时提交申诉材料,提交成功后,平台将及时完成审核并通知您! -
+ +
您的订单可能存在交易风险,请及时提交申诉材料,提交成功后,平台将及时完成审核并通知您!
如果您的运单没有问题,可以提出申诉,并提供相关资料,我们将24小时内审核反馈
    -
  • 系统识别:{{item?.complianceTypeName}}
  • -
  • {{item?.determineDetails}},您可在企业端提交申诉材料或联系客服。
  • +
  • 系统识别:{{ item?.complianceTypeName }}
  • +
  • {{ item?.determineDetails }},您可在企业端提交申诉材料或联系客服。
  • 2021-11-07 03:20:15
- - + - - +
- +
暂无附件信息
- +
diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.html b/src/app/routes/order-management/components/vehicle/vehicle.component.html index 835a7e4c..560ff7c0 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.html +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-03-31 16:05:06 + * @LastEditTime : 2022-04-01 11:03:39 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle\\vehicle.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -69,7 +69,7 @@
-
{{ item?.createUserName }}/{{ item?.createUserPhone }}
+
{{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }}
- -
- -
+ +
+
电子装货单
- -
- -
-
+ +
电子卸货单
diff --git a/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts index 54b91f69..7cf3957c 100644 --- a/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts +++ b/src/app/routes/order-management/modal/audit/voucher-view/voucher-view.component.ts @@ -30,7 +30,9 @@ import { OrderManagementService } from '../../../services/order-management.servi export class orderManagementVoucherViewComponent implements OnInit { record: any = {}; i: any; + loadPDF: string = ''; formData: any; + datas: any; Status: any; data: any ={ weight: 0, @@ -52,6 +54,7 @@ export class orderManagementVoucherViewComponent implements OnInit { if(this.Status == 1) { this.schema = { + properties: { loadingLadingBillFilePath: { type: 'string', @@ -217,9 +220,15 @@ export class orderManagementVoucherViewComponent implements OnInit { required: ['loadingLadingBillFilePath', 'loadingPeopleVehiclesGoodsFilePath','unloadingLadingBillFilePath','unloadingPeopleVehiclesGoodsFilePath' ] }; }else { - console.log('只读') this.schema = { properties: { + no0: { + type: 'string', + title: '', + ui: { + widget: 'custom', + }, + }, loadingLadingBillFilePath: { type: 'string', title: '装货凭证', @@ -298,6 +307,7 @@ export class orderManagementVoucherViewComponent implements OnInit { listType: 'picture-card', } as SFUploadWidgetSchema, }, + no4: { type: 'string', title: '', @@ -306,6 +316,13 @@ export class orderManagementVoucherViewComponent implements OnInit { }, default: '单张大小不超过5M,支持.jpg、.jpeg和 .png格式', }, + no6: { + type: 'string', + title: '', + ui: { + widget: 'custom', + }, + }, unloadingLadingBillFilePath: { type: 'string', title: '卸货凭证', @@ -421,18 +438,17 @@ export class orderManagementVoucherViewComponent implements OnInit { }) } sure() { - const params = [this.i.id]; - this.service.request(this.service.$api_get_billAuditPass, params).subscribe((res) => { - if(res) { - this.service.msgSrv.success('生成电子单据成功!') - this.modal.destroy(true); - } - }) + const params = [this.i?.id]; + this.service.downloadFile(this.service.$api_createBillTakeGoods,params) + this.service.downloadFile(this.service.$api_createBillDischargeGoods,params) + this.service.msgSrv.success('生成电子单据成功!') + this.modal.destroy(true); } // 确认到车界面信息(两个只能看的图片) initData() { this.service.request(this.service.$api_get_getCredentials, { id : this.i?.id}).subscribe((res) => { console.log(res) + this.datas = res if (res.unloadingLadingBillFilePath) { this.formData = { loadingLadingBillFilePath: [ @@ -486,5 +502,22 @@ export class orderManagementVoucherViewComponent implements OnInit { close(): void { this.modal.destroy(true); } - + openlaod(value: any) { + if(value === 1) { + const a = document.createElement('a'); + a.href = this.datas?.loadingElectronicsLadingBillFilePath; + document.body.appendChild(a); + console.log(document.body.contains(a)) + a.click(); //点击下载 + document.body.removeChild(a); //下载完成移除元素 + } else { + const a = document.createElement('a'); + a.href = this.datas?.unloadingElectronicsLadingBillFilePath; + document.body.appendChild(a); + console.log(document.body.contains(a)) + a.click(); //点击下载 + document.body.removeChild(a); //下载完成移除元素 + } + + } } diff --git a/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.html b/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.html index f830ca80..2c0d7063 100644 --- a/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.html +++ b/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-15 13:17:42 * @LastEditors : Shiming - * @LastEditTime : 2022-03-31 14:20:41 + * @LastEditTime : 2022-04-01 10:39:59 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\confir-receipt\\confir-receipt.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -28,7 +28,7 @@ {{item.BACK | currency}}
- {{item.surcharge + item.traiPrice | currency}} + {{ item.traiPrice | currency}} {{item.surcharge | currency}} diff --git a/src/app/routes/order-management/services/order-management.service.ts b/src/app/routes/order-management/services/order-management.service.ts index 21b45d1c..16922472 100644 --- a/src/app/routes/order-management/services/order-management.service.ts +++ b/src/app/routes/order-management/services/order-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 15:31:52 * @LastEditors : Shiming - * @LastEditTime : 2022-03-30 16:08:50 + * @LastEditTime : 2022-04-02 13:10:13 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -191,6 +191,8 @@ export class OrderManagementService extends ShipperBaseService { $api_get_asyncExportBulkList = `/api/sdc/billOperate/asyncExportBulkList`; // 异步导出运营后台整车订单列表 $api_get_asyncExportWholeList = `/api/sdc/billOperate/asyncExportWholeList`; + // 异步导出风险单导出 + $api_get_asyncExportRiskBillList = `/api/sdc/billRiskOperate/asyncExportRiskBillList`; /** * 根据企业ID,获取企业历史网络货运人 * @returns diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts index d970bbd7..ae12b403 100644 --- a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts @@ -1,8 +1,9 @@ import { Component, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; 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 { of } from 'rxjs'; 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'; @@ -24,7 +25,7 @@ export class PartnerListComponent { @ViewChild('editTemplate', { static: true }) editTemplate: any; - templateId: any; + templateId: any; templates: any[] = []; @ViewChild('editCannel', { static: true }) @@ -241,11 +242,22 @@ export class PartnerListComponent { type: 'string', title: '渠道销售', ui: { - placeholder: '请输入姓名或者手机号', + widget: 'select', + searchDebounceTime: 300, + searchLoadingText: '搜索中...', + allowClear: true, visibleIf: { expand: (value: boolean) => value + }, + onSearch: (q: any) => { + let str = q.replace(/^\s+|\s+$/g, ''); + if (str) { + return this.service.getChannel({ name: str }).toPromise(); + } else { + return of([]); + } } - } + } as SFSelectWidgetSchema }, partnerType: { type: 'string', @@ -367,13 +379,12 @@ export class PartnerListComponent { return [ { title: '合伙人名称', - index: 'enterpriseName', - width: 180, - format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '') + index: 'contactName', + width: 180 }, { title: '付款编码', index: 'payCode', width: 160 }, { 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: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, { title: '注册渠道', index: 'source', type: 'enum', enum: { 1: '合伙人注册', 2: '平台添加' }, width: 130 }, diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.html b/src/app/routes/supply-management/components/bulk/bulk.component.html index 570e07f3..483a6ed1 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.html +++ b/src/app/routes/supply-management/components/bulk/bulk.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-03-25 16:51:13 + * @LastEditTime : 2022-04-01 11:09:23 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\bulk\\bulk.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -76,7 +76,7 @@ [loading]="false" > -
{{ item?.createUserName }}/{{ item?.createUserPhone }}
+
{{ item?.createUserName }}{{ item?.createUserPhone ? '/' + item?.createUserPhone : ''}}
diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html index b192689d..30da689b 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html @@ -190,7 +190,7 @@ (运费{{ i?.totalFreight | currency }}含附加运费 {{ i?.totalSurcharge | currency }}) -
收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}/{{ i?.payeeCardNo }}
+
车队长:{{ i?.payeeName }}/{{ i?.payeePhone }}/{{ i?.payeeCardNo }}
diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html index 04fdad70..bee8f2fc 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html +++ b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html @@ -34,7 +34,7 @@ 已选择 {{ selectedRows.length }} 张发票   发票金额总计 {{totalCallNo }} - 清空 + 清空

{{i?.goodsInfos?.[0]?.freightPrice}}{{i?.goodsInfos?.[0]?.freightTypeLabel}}({{ i?.goodsInfos?.[0]?.settlementBasisLabel ? i?.goodsInfos?.[0]?.settlementBasisLabel + ',' :' ' }}{{i?.goodsInfos?.[0]?.ruleLabel}})

@@ -176,7 +176,7 @@ 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}%) -
收款人:{{ i?.payee?.name }}/{{ i?.payee?.phone }}/{{ i?.payee?.idNo }}
+
车队长:{{ i?.payee?.name }}/{{ i?.payee?.phone }}/{{ i?.payee?.idNo }}
diff --git a/src/app/routes/waybill-management/components/bulk/bulk.component.ts b/src/app/routes/waybill-management/components/bulk/bulk.component.ts index 3cf71479..e2c103eb 100644 --- a/src/app/routes/waybill-management/components/bulk/bulk.component.ts +++ b/src/app/routes/waybill-management/components/bulk/bulk.component.ts @@ -302,7 +302,7 @@ export class WaybillManagementBulkComponent implements OnInit { render: 'driverName' }, { - title: '收款人', + title: '车队长', className: 'text-left', width: '200px', render: 'payeeName', diff --git a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html index c0738c77..c4befd05 100644 --- a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html @@ -1,7 +1,7 @@