fix bug
This commit is contained in:
@ -5,7 +5,6 @@ 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';
|
||||
const DataSet = require('@antv/data-set');
|
||||
@Component({
|
||||
selector: 'app-datatable-compliance-index',
|
||||
templateUrl: './index.component.html',
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
<g2-custom delay="100" (render)="render($event)"></g2-custom>
|
||||
<nz-divider></nz-divider>
|
||||
|
||||
<g2-custom delay="100" (render)="render2($event)"></g2-custom>
|
||||
|
||||
@ -0,0 +1,168 @@
|
||||
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';
|
||||
const DataSet = require('@antv/data-set');
|
||||
import { Chart } from '@antv/g2';
|
||||
@Component({
|
||||
selector: 'app-financetable-curve',
|
||||
templateUrl: './curve.component.html',
|
||||
styleUrls: ['./curve.component.less']
|
||||
})
|
||||
export class FinanceTableCurveComponent implements OnInit {
|
||||
constructor(private service: DataService, private ngZone: NgZone) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
handleClick(data: G2MiniAreaClickItem): void {
|
||||
this.service.msgSrv.info(`${data.item.x} - ${data.item.y}`);
|
||||
}
|
||||
|
||||
render(el: ElementRef<HTMLDivElement>): void {
|
||||
this.ngZone.runOutsideAngular(() => this.initBar(el.nativeElement));
|
||||
}
|
||||
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({
|
||||
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' }
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
chart
|
||||
.interval()
|
||||
.position('月份*月均降雨量')
|
||||
.color('name')
|
||||
.adjust([
|
||||
{
|
||||
type: 'dodge',
|
||||
marginRatio: 0
|
||||
}
|
||||
]);
|
||||
|
||||
chart.render();
|
||||
}
|
||||
|
||||
render2(el: ElementRef<HTMLDivElement>): 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]
|
||||
},
|
||||
value: {
|
||||
min: 0,
|
||||
nice: true
|
||||
}
|
||||
});
|
||||
// 图表下方图形文字自定义
|
||||
chart.legend({
|
||||
items: [
|
||||
{
|
||||
name: '平均附加费率',
|
||||
value: 'node_load1',
|
||||
marker: {
|
||||
symbol: 'circle',
|
||||
style: { fill: '#6193f7' }
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
// 提示自定义
|
||||
chart.tooltip({
|
||||
showCrosshairs: true,
|
||||
shared: true
|
||||
});
|
||||
|
||||
//数据格式化
|
||||
chart.axis('value', {
|
||||
label: {
|
||||
formatter: val => {
|
||||
return val + ' %';
|
||||
}
|
||||
}
|
||||
});
|
||||
// 在x*y的坐标点上按z值绘制线条, 如果z值相同将使用直线连接
|
||||
chart
|
||||
.line()
|
||||
.position('data*value')
|
||||
.color('label')
|
||||
.tooltip('label*value', (name: any, value: any) => {
|
||||
return {
|
||||
name: name,
|
||||
value: value + '%'
|
||||
};
|
||||
});
|
||||
// 在x*y的坐标上按z值绘制圆点
|
||||
// chart.point().position('data*value').size(4).color('label').shape('circle');
|
||||
chart.render();
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,68 @@
|
||||
<!-- 页头 -->
|
||||
<page-header-wrapper [title]="'数据报表'"></page-header-wrapper>
|
||||
<nz-card>
|
||||
<sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
|
||||
<st #st [data]="url" [columns]="columns"></st>
|
||||
<page-header-wrapper [title]="'财务报表'"></page-header-wrapper>
|
||||
<nz-card nzTitle="财务报表" [nzExtra]="extraTemplate">
|
||||
<ng-template #extraTemplate>
|
||||
<div class="chooseBox">
|
||||
<!-- <button nz-button nzType="primary" (click)="exportFun()">导出</button> -->
|
||||
<div class="timeBox">
|
||||
<nz-radio-group [(ngModel)]="mode" nzButtonStyle="solid" (ngModelChange)="changeData()">
|
||||
<label nz-radio-button nzValue="year">年</label>
|
||||
<label nz-radio-button nzValue="month">月</label>
|
||||
<label nz-radio-button nzValue="date">日</label>
|
||||
<label nz-radio-button nzValue="define">自定义</label>
|
||||
</nz-radio-group>
|
||||
<div class="dateBox">
|
||||
<nz-date-picker [(ngModel)]="date" [nzMode]="mode" [nzFormat]="dateFormat" *ngIf="mode !== 'define'" [nzDisabledDate]="disabledDate" (ngModelChange)="onChange($event)"></nz-date-picker>
|
||||
<nz-range-picker [(ngModel)]="defineDate" [nzFormat]="dateFormat" *ngIf="mode === 'define'" [nzDisabledDate]="disabledDate" (ngModelChange)="onChange($event)"></nz-range-picker>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ng-template>
|
||||
<st #st multiSort [columns]="columns" [ps]="20" [data]="service.$api_listFinancialReportPage"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[scroll]="{ x: '1200px' }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [20, 50, 100] }" [loading]="false">
|
||||
<ng-template st-row="czcgje" let-item let-index="index">
|
||||
{{item.czcgje | currency}}
|
||||
</ng-template>
|
||||
<ng-template st-row="yingsje" let-item let-index="index">
|
||||
{{item.yingsje | currency}}
|
||||
</ng-template>
|
||||
<ng-template st-row="yisje" let-item let-index="index">
|
||||
{{item.yisje | currency}}
|
||||
</ng-template>
|
||||
<ng-template st-row="yingfyf" let-item let-index="index">
|
||||
{{item.yingfyf | currency}}
|
||||
</ng-template>
|
||||
<ng-template st-row="yifyf" let-item let-index="index">
|
||||
{{item.yifyf | currency}}
|
||||
</ng-template>
|
||||
<ng-template st-row="ykpje" let-item let-index="index">
|
||||
{{item.ykpje | currency}}
|
||||
</ng-template>
|
||||
<ng-template st-row="dkpje" let-item let-index="index">
|
||||
{{item.dkpje | currency}}
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="运营报表" [nzExtra]="extraTemplate01">
|
||||
<ng-template #extraTemplate01>
|
||||
<div class="chooseBox">
|
||||
<nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="changeCurve()">
|
||||
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option>
|
||||
</nz-select>
|
||||
<div class="timeBox">
|
||||
<nz-radio-group [(ngModel)]="modeNext" nzButtonStyle="solid" (ngModelChange)="changeDataNext()">
|
||||
<label nz-radio-button nzValue="year">年</label>
|
||||
<label nz-radio-button nzValue="month">月</label>
|
||||
</nz-radio-group>
|
||||
<div class="dateBox">
|
||||
<nz-date-picker [nzDisabledDate]="disabledDate" [(ngModel)]="dateNext" [nzMode]="modeNext" (ngModelChange)="onChangeNext($event)"></nz-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<app-financetable-curve></app-financetable-curve>
|
||||
</nz-card>
|
||||
@ -0,0 +1,11 @@
|
||||
.chooseBox{
|
||||
display: flex;
|
||||
}
|
||||
.timeBox{
|
||||
display: flex;
|
||||
margin: 0 0 0 10px;
|
||||
}
|
||||
.dateBox{
|
||||
display: inline-block;
|
||||
margin: 0 0 0 10px;
|
||||
}
|
||||
@ -1,45 +1,124 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFSchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { DatePipe, ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { DataService } from '../../services/data.service';
|
||||
import { differenceInCalendarDays } from 'date-fns';
|
||||
|
||||
@Component({
|
||||
selector: 'app-datatable-financetable',
|
||||
templateUrl: './financetable.component.html',
|
||||
styleUrls: ['./financetable.component.less'],
|
||||
providers: [DatePipe]
|
||||
})
|
||||
export class DatatableFinancetableComponent implements OnInit {
|
||||
url = `/user`;
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
no: {
|
||||
type: 'string',
|
||||
title: '编号'
|
||||
}
|
||||
}
|
||||
};
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
type = 1;
|
||||
mode = 'year';
|
||||
date: any = null;
|
||||
defineDate = [];
|
||||
time: any = ['2022-01-01 00:00:00']
|
||||
dateFormat = 'yyyy-MM-dd';
|
||||
dateNext: any = null;
|
||||
modeNext = 'year';
|
||||
timeNext: any = ['2022-01-01 00:00:00']
|
||||
today = new Date();
|
||||
enterpriseInfoId = ''
|
||||
enterpriseInfoIdPie = ''
|
||||
interManlist: any = []
|
||||
columns: STColumn[] = [
|
||||
{ title: '编号', index: 'no' },
|
||||
{ title: '调用次数', type: 'number', index: 'callNo' },
|
||||
{ title: '头像', type: 'img', width: '50px', index: 'avatar' },
|
||||
{ title: '时间', type: 'date', index: 'updatedAt' },
|
||||
{
|
||||
title: '',
|
||||
buttons: [
|
||||
// { text: '查看', click: (item: any) => `/form/${item.id}` },
|
||||
// { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' },
|
||||
]
|
||||
}
|
||||
{ title: '运营主体', index: 'networkTransporterName', className: 'text-center' },
|
||||
{ title: '客户预存款', index: 'czcgje',render: 'czcgje', className: 'text-center' },
|
||||
{ title: '应收金额', index: 'yingsje',render: 'yingsje', className: 'text-center' },
|
||||
{ title: '已收金额', index: 'yisje',render: 'yisje', className: 'text-center' },
|
||||
{ title: '应付运费', index: 'yingfyf', render: 'yingfyf',className: 'text-center' },
|
||||
{ title: '已付运费', index: 'yifyf',render: 'yifyf', className: 'text-center' },
|
||||
{ title: '已开票金额', index: 'ykpje',render: 'ykpje', className: 'text-center' },
|
||||
{ title: '待开票金额', index: 'dkpje',render: 'dkpje', className: 'text-center' },
|
||||
{ title: '应收附加费', index: 'yingsfjf', className: 'text-center' },
|
||||
{ title: '已收附加费', index: 'yisfjf', className: 'text-center' },
|
||||
{ title: '平均附加费率', index: 'fjfl', className: 'text-center' }
|
||||
];
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
if (this.mode === 'year') {
|
||||
this.type = 1
|
||||
} else if (this.mode === 'month') {
|
||||
this.type = 2
|
||||
} else if (this.mode === 'date') {
|
||||
this.type = 3
|
||||
} else {
|
||||
this.type = 4
|
||||
}
|
||||
let params: any = {
|
||||
time: this.time,
|
||||
type: this.type
|
||||
};
|
||||
|
||||
constructor(private http: _HttpClient, private modal: ModalHelper) { }
|
||||
delete params._$expand;
|
||||
return { ...params };
|
||||
}
|
||||
|
||||
ngOnInit(): void { }
|
||||
constructor(public service: DataService, private datePipe: DatePipe) { }
|
||||
ngOnInit(): void {
|
||||
this.initData()
|
||||
}
|
||||
initData() {
|
||||
this.service.getNetworkFreightForwarder().subscribe(res => {
|
||||
this.interManlist = res
|
||||
this.enterpriseInfoId = res[0].value
|
||||
this.enterpriseInfoIdPie = res[0].value
|
||||
})
|
||||
}
|
||||
|
||||
add(): void {
|
||||
// this.modal
|
||||
// .createStatic(FormEditComponent, { i: { id: 0 } })
|
||||
// .subscribe(() => this.st.reload());
|
||||
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']
|
||||
} else if (this.mode === 'month') {
|
||||
this.time = [this.datePipe.transform(this.date, 'yyyy-MM') + '-01 00:00:00']
|
||||
} else if (this.mode === 'date') {
|
||||
this.time = [this.datePipe.transform(this.date, 'yyyy-MM-dd') + ' 00:00:00']
|
||||
} else {
|
||||
this.time = [this.datePipe.transform(this.defineDate[0], 'yyyy-MM-dd') + '00:00:00', this.datePipe.transform(this.defineDate[1], 'yyyy-MM-dd') + ' 00:00:00']
|
||||
}
|
||||
this.st.reload({ ...this.reqParams });
|
||||
}
|
||||
disabledDate = (current: Date): boolean =>
|
||||
// Can not select days before today and today
|
||||
differenceInCalendarDays(current, this.today) > 0;
|
||||
exportFun() {
|
||||
|
||||
}
|
||||
changeCurve(){
|
||||
|
||||
}
|
||||
changePie(){
|
||||
|
||||
}
|
||||
changeDataNext() {
|
||||
if(this.mode === 'year') {
|
||||
this.dateFormat = 'yyyy'
|
||||
} else if(this.mode === 'month') {
|
||||
this.dateFormat = 'yyyy-MM'
|
||||
}
|
||||
}
|
||||
onChangeNext(result: any) {
|
||||
if(this.mode === 'year') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy') + '-01-01 00:00:00']
|
||||
} else if(this.mode === 'month') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00']
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -25,6 +25,7 @@ import { DatatableReportingFundInfoComponent } from './reporting/components/fund
|
||||
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';
|
||||
|
||||
const COMPONENTS: Type<void>[] = [
|
||||
DatatableDataindexComponent,
|
||||
@ -51,7 +52,9 @@ const COMPONENTS: Type<void>[] = [
|
||||
DatatableReportingFundInfoComponent,
|
||||
BusitableCurveComponent,
|
||||
OperationPillarComponent,
|
||||
OperationCurveComponent
|
||||
OperationCurveComponent,
|
||||
DatatableReportingFundInfoComponent,
|
||||
FinanceTableCurveComponent
|
||||
]
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<nz-spin [nzSpinning]="service.http.loading"></nz-spin>
|
||||
<st #st [scroll]="{x:'1000px'}" [data]="service.$api_get_order_reporting_page" [columns]="columns"
|
||||
<st #st [scroll]="{x:'1000px'}" [data]="service.$api_get_fund_valid_result" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [page]="{ show: false}" [loading]="false"
|
||||
[bordered]="true">
|
||||
|
||||
@ -19,7 +19,7 @@ export class DatatableReportingFundInfoComponent implements OnInit {
|
||||
|
||||
|
||||
get reqParams() {
|
||||
return {};
|
||||
return { capitalCode: this?.record?.orderCode };
|
||||
}
|
||||
constructor(public service: ReportingService, private modalRef: NzModalRef, public router: Router) {
|
||||
|
||||
@ -35,13 +35,34 @@ export class DatatableReportingFundInfoComponent implements OnInit {
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '序号', type: 'no', className: 'text-center', width: '60px', },
|
||||
{ title: '监管平台字段', index: 'orderStatus', className: 'text-center', width: '120px', },
|
||||
{ title: '系统字段', index: 'orderStatus', className: 'text-center', width: '100px', },
|
||||
{ title: '监管平台字段', index: 'thirdPartyFieldName', className: 'text-center', width: '120px', },
|
||||
{ title: '系统字段', index: 'checkFieldName', className: 'text-center', width: '100px', },
|
||||
{ title: '归属模块', index: 'orderStatus', className: 'text-center', width: '120px', },
|
||||
{ title: '是否必填', index: 'orderStatus', className: 'text-center', width: '100px', },
|
||||
{ title: '上传值', index: 'orderStatus', className: 'text-center', width: '150px', },
|
||||
{ title: '本地校验', index: 'orderStatus', className: 'text-center', width: '100px', },
|
||||
{ title: '错误内容', index: 'orderStatus', className: 'text-center', width: '150px', },
|
||||
{
|
||||
title: '是否必填',
|
||||
index: 'orderStatus',
|
||||
className: 'text-center',
|
||||
width: '100px',
|
||||
type: 'enum',
|
||||
enum: {
|
||||
'0': '非必填',
|
||||
'1': '必填',
|
||||
},
|
||||
},
|
||||
{ title: '上传值', index: 'fieldValue', className: 'text-center', width: '150px', },
|
||||
{
|
||||
title: '本地校验',
|
||||
index: 'checkStatus',
|
||||
className: 'text-center',
|
||||
type: 'enum',
|
||||
enum: {
|
||||
'0': '校验中',
|
||||
'1': '通过',
|
||||
'2': '不通过'
|
||||
},
|
||||
width: '100px',
|
||||
},
|
||||
{ title: '错误内容', index: 'remark', className: 'text-center', width: '150px', },
|
||||
]
|
||||
}
|
||||
|
||||
@ -71,4 +92,5 @@ export class DatatableReportingFundInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -28,7 +28,8 @@
|
||||
<st #st [scroll]="{x:'1200px'}" [data]="service.$api_get_fund_reporting_page" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10,20, 50, 100] }" [loading]="false">
|
||||
[page]="{ show: true, showSize: true, pageSizes: [1,10,20, 50, 100] }" [loading]="false"
|
||||
(change)="changeSt($event)">
|
||||
<ng-template st-row="uploadStatus" let-item>
|
||||
<span [ngClass]="{'text-red-dark':item?.uploadStatus === '4'}">{{item?.billStatusLabel}}</span>
|
||||
</ng-template>
|
||||
@ -48,10 +49,10 @@
|
||||
<span *ngIf="item?.billStatus !== '2'">{{item?.billStatusLabel}}</span>
|
||||
</ng-template>
|
||||
<ng-template st-row="tolalAmount" let-item let-index="index">
|
||||
<div class="text-right">{{item?.tolalAmount | currency :' '}}</div>
|
||||
<div class="text-right">{{item?.tolalAmount | currency }}</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="payAmount" let-item let-index="index">
|
||||
<div class="text-right">{{item?.payAmount | currency :' '}}</div>
|
||||
<div class="text-right">{{item?.payAmount | currency }}</div>
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STComponent, STData } from '@delon/abc/st';
|
||||
import { STChange, STColumn, STComponent, STData } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { ReportingService } from '../../services/reporting.service';
|
||||
import { DatatableReportingFundInfoComponent } from '../fund-info/fund-info.component';
|
||||
import { DatatableReportingUploadSettingComponent } from '../upload-setting/upload-setting.component';
|
||||
import { DatatableReportingVerifyResultComponent } from '../verify-result/verify-result.component';
|
||||
|
||||
@ -28,8 +29,9 @@ export class DatatableFundReportingComponent implements OnInit {
|
||||
{ name: '异常', value: '4' },
|
||||
{ name: '全部', value: '' }
|
||||
];
|
||||
selectedIndex = ''; //选择的项目
|
||||
selectedIndex = '1'; //选择的项目
|
||||
serviceTel = '';
|
||||
selectedRows: any[] = [];
|
||||
constructor(
|
||||
public service: ReportingService,
|
||||
private router: Router,
|
||||
@ -51,7 +53,7 @@ export class DatatableFundReportingComponent implements OnInit {
|
||||
*/
|
||||
get reqParams() {
|
||||
const params = Object.assign({}, this.sf?.value || {}, {
|
||||
representationsStatus: this.selectedIndex,
|
||||
uploadStatus: this.selectedIndex
|
||||
});
|
||||
delete params._$expand;
|
||||
return { ...params };
|
||||
@ -60,9 +62,9 @@ export class DatatableFundReportingComponent implements OnInit {
|
||||
/**
|
||||
* 选中行
|
||||
*/
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter((item: any) => item.checked) || [];
|
||||
}
|
||||
// get selectedRows() {
|
||||
// return this.st?.list.filter((item: any) => item.checked) || [];
|
||||
// }
|
||||
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
@ -217,12 +219,12 @@ export class DatatableFundReportingComponent implements OnInit {
|
||||
{ title: '', type: 'checkbox', className: 'text-center', width: '60px', },
|
||||
{ title: '上传状态', render: 'uploadStatus', className: 'text-center', width: '120px', },
|
||||
{ title: '本地校验', render: 'verifyStatus', className: 'text-center', width: '120px', },
|
||||
{ title: '流水单号', index: 'serialNumberCode', className: 'text-center', width: '150px', },
|
||||
{ title: '流水单号', index: 'serialNumberCode', className: 'text-center', width: '190px', },
|
||||
{
|
||||
title: '订单号',
|
||||
render: 'orderCode',
|
||||
className: 'text-center',
|
||||
width: '150px',
|
||||
width: '180px',
|
||||
},
|
||||
{ title: '运单号', render: 'wayBillCode', className: 'text-center', width: '150px', },
|
||||
{
|
||||
@ -237,15 +239,15 @@ export class DatatableFundReportingComponent implements OnInit {
|
||||
{ title: '车牌颜色', index: 'carColor', className: 'text-center', width: '180px' },
|
||||
{ title: '总金额', render: 'tolalAmount', className: 'text-center', width: '250px' },
|
||||
|
||||
{ title: '付款方式', index: 'payType', className: 'text-center', width: '180px' },
|
||||
{ title: '付款方式', index: 'payTypeLabel', className: 'text-center', width: '180px' },
|
||||
{ title: '车队长', index: 'payee', className: 'text-center', width: '250px' },
|
||||
{ title: '收款账户', index: 'collectionAccount', className: 'text-center', width: '200px' },
|
||||
|
||||
{ title: '收款银行', index: 'bankTypeLabel', className: 'text-center', width: '200px' },
|
||||
|
||||
{ title: '银行流水号', index: 'bankSerialNumber', className: 'text-center', width: '150px' },
|
||||
{ title: '银行流水号', index: 'bankSerialNumber', className: 'text-center', width: '180px' },
|
||||
{ title: '实际支付金额', render: 'payAmount', className: 'text-center', width: '150px' },
|
||||
{ title: '交易时间', index: 'transactionTime', className: 'text-center', width: '150px' },
|
||||
{ title: '交易时间', index: 'transactionTime', className: 'text-center', width: '180px' },
|
||||
{ title: '上传次数', index: 'uploadFrequency', className: 'text-center', width: '120px' },
|
||||
{ title: '上传时间', index: 'uploadTime', className: 'text-center', width: '180px' },
|
||||
];
|
||||
@ -268,9 +270,11 @@ export class DatatableFundReportingComponent implements OnInit {
|
||||
nzOkText: '确定',
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {
|
||||
this.service.request(this.service.$api_recall_reporting, { rows: this.selectedRows }).subscribe((res: any) => {
|
||||
const ids = this.selectedRows.map(i => i?.id);
|
||||
this.service.request(this.service.$api_fund_reporting_recall, ids).subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('撤销成功');
|
||||
|
||||
this.search();
|
||||
}
|
||||
})
|
||||
@ -281,7 +285,7 @@ export class DatatableFundReportingComponent implements OnInit {
|
||||
}
|
||||
|
||||
selectChange(item: any) {
|
||||
this.selectedIndex = item?.representationsStatus || '';
|
||||
this.selectedIndex = item?.value || '';
|
||||
setTimeout(() => {
|
||||
this.st.load(1);
|
||||
})
|
||||
@ -326,7 +330,8 @@ export class DatatableFundReportingComponent implements OnInit {
|
||||
this.openWainingModal('请选择需要上传的数据');
|
||||
return;
|
||||
}
|
||||
this.service.request(this.service.$api_recall_reporting, { rows: this.selectedRows }).subscribe((res: any) => {
|
||||
const ids = this.selectedRows.map(i => i?.id);
|
||||
this.service.request(this.service.$api_fund_reporting_upload, ids).subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('上传成功');
|
||||
this.search();
|
||||
@ -354,13 +359,13 @@ export class DatatableFundReportingComponent implements OnInit {
|
||||
/**
|
||||
* 查看校验结果
|
||||
*/
|
||||
viewResult(item: any) {
|
||||
viewResult(record: any) {
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '校验结果',
|
||||
nzWidth: 1200,
|
||||
nzContent: DatatableReportingVerifyResultComponent,
|
||||
nzContent: DatatableReportingFundInfoComponent,
|
||||
nzComponentParams: {
|
||||
record: item
|
||||
record
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
@ -380,6 +385,7 @@ export class DatatableFundReportingComponent implements OnInit {
|
||||
|
||||
|
||||
search() {
|
||||
this.selectedRows = [];
|
||||
this.st.load(1);
|
||||
}
|
||||
|
||||
@ -398,5 +404,45 @@ export class DatatableFundReportingComponent implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
changeSt(e: STChange): void {
|
||||
|
||||
if (e.type === 'checkbox') {
|
||||
const checkRows = (e.checkbox as STData[]) || [];
|
||||
//判断当前页是否有选中的行
|
||||
if (checkRows.length === 0) {
|
||||
// 当前页没有存在已勾选的行,移除之前所记录的当前页的行
|
||||
const stList = this.st.list;
|
||||
stList.forEach(item => {
|
||||
this.selectedRows = this.selectedRows.filter((e: any) => e.id !== item.id);
|
||||
})
|
||||
} else {
|
||||
//添加新增的行
|
||||
checkRows.forEach((item: any) => {
|
||||
const newSelectedList = this.selectedRows.filter((r: any) => r.id === item.id);
|
||||
if (newSelectedList.length === 0) {
|
||||
this.selectedRows.push(item);
|
||||
|
||||
}
|
||||
})
|
||||
// 移除取消选中的行
|
||||
const stList = this.st.list;
|
||||
stList.forEach(item => {
|
||||
if (!item.checked) {
|
||||
const index = this.selectedRows.findIndex(_item => item.id === _item.id);
|
||||
if (index !== -1) this.selectedRows.splice(index, 1);
|
||||
}
|
||||
})
|
||||
}
|
||||
} else if (e.type === 'loaded') {
|
||||
// 页面加载时勾选
|
||||
(e?.loaded || []).forEach((r: any) => {
|
||||
this.selectedRows.forEach((x) => {
|
||||
if (x.id === r.id) {
|
||||
r.checked = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -12,7 +12,10 @@ export class ReportingService extends BaseService {
|
||||
$api_get_upload_setting = ``; // 修改上传设置
|
||||
$api_upload_setting_save = ``; // 修改上传设置
|
||||
|
||||
$api_get_fund_reporting_page = `/api/fcc/fundUploadHead/list/page`;
|
||||
$api_get_fund_reporting_page = `/api/fcc/fundUploadHead/list/page`; // 资金上报列表
|
||||
$api_fund_reporting_upload = `/api/fcc/fundUploadHead/uploadFundNumber`; // 资金批量上传
|
||||
$api_fund_reporting_recall = `/api/fcc/fundUploadHead/recallUploadFundNumber`; //资金批量撤回
|
||||
$api_get_fund_valid_result = `/api/fcc/capitalFieldCheck/getCapitalFieldCheckList`; // 查询资金校验表
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user