This commit is contained in:
Taric Xin
2021-12-07 19:39:28 +08:00
parent 647b288042
commit b5262f5a26
32 changed files with 1752 additions and 18 deletions

View File

@ -0,0 +1,57 @@
<page-header-wrapper [title]="'开票订单明细'" [logo]="logo">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
</page-header-wrapper>
<nz-card>
<nz-row [nzGutter]="16">
<nz-col [nzXl]="9" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="证件号码49040012345678903" [nzTitle]="'张三13812345678'"
[nzValueStyle]="{'font-size':'21px'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="100,000,000.00 元" [nzTitle]="'账户余额'" [nzValueStyle]="{'font-size':'21px'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="100,000.00 元" [nzTitle]="'收入金额'" [nzValueStyle]="{'font-size':'21px'}">
</nz-statistic>
</nz-col>
<nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12">
<nz-statistic nzValue="100,000.00 元" [nzTitle]="'支出金额'" [nzValueStyle]="{'font-size':'21px'}">
</nz-statistic>
</nz-col>
</nz-row>
</nz-card>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button> 导出</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
<nz-card class="content-box" nzBordered>
<st #st [data]="url" [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, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ x:'1200px',y: '300px' }" (change)="stChange($event)"></st>
</nz-card>

View File

@ -0,0 +1,28 @@
:host::ng-deep {
.search-box {
.ant-card-body {
padding-bottom: 18px;
}
}
.content-box {
.ant-card-body {
padding-top: 16px;
}
}
nz-range-picker {
width: 100%;
}
}
.expend-options {
margin-top: 0px;
}
@media (min-width: 990px) {
.expend-options {
margin-top: -40px;
}
}

View File

@ -0,0 +1,164 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STChange } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { TicketService } from 'src/app/routes/ticket-management/services/system.service';
@Component({
selector: 'app-driver-account-detail',
templateUrl: './driver-account-detail.component.html',
styleUrls: ['./driver-account-detail.component.less']
})
export class DriverAccountDetailComponent implements OnInit {
url = `/rule?_allow_anonymous=true`;
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = [
{ title: '交易时间', index: 'updatedAt', type: 'date' },
{ title: '流水号', index: 'callNo' },
{ title: '交易类型', index: 'callNo' },
{ title: '订单号', index: 'callNo' },
{ title: '所属项目', index: 'callNo' },
{ title: '收支类型', index: 'callNo' },
{ title: '交易金额', index: 'callNo' },
{ title: '账户余额', index: 'callNo' },
{ title: '无车承运人', index: 'callNo' }
];
searchSchema: SFSchema = {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
createTime: {
title: '交易时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
} as SFDateWidgetSchema
},
orderSn2: {
type: 'string',
title: '流水号',
ui: {
placeholder: '请输入',
autocomplete: 'off'
}
},
orderSn3: {
type: 'string',
title: '订单号',
ui: {
placeholder: '请输入',
autocomplete: 'off'
}
},
receiveName: {
type: 'string',
title: '交易类型',
enum: [
{ label: '全部', value: '' },
{ label: '订单支付', value: '订单支付' },
{ label: '余额充值', value: '余额充值' },
{ label: '余额提现', value: '余额提现' },
{ label: '资金分配', value: '资金分配' },
{ label: '资金回收', value: '资金回收' }
],
ui: {
widget: 'select',
placeholder: '请选择',
change: (i: any) => {
this.sf.value.receiveName = i;
this.sf?.setValue('/receiveName', i);
},
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
},
receiveName2: {
type: 'string',
title: '收支类型',
enum: [
{ label: '全部', value: '' },
{ label: '收入', value: '收入' },
{ label: '支出', value: '支出' }
],
ui: {
widget: 'select',
placeholder: '请选择',
change: (i: any) => {
this.sf.value.receiveName2 = i;
this.sf?.setValue('/receiveName2', i);
},
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
},
receiveName4: {
type: 'string',
title: '无车承运人',
enum: [{ label: '全部', value: '' }],
ui: {
widget: 'select',
placeholder: '请选择',
change: (i: any) => {
this.sf.value.receiveName4 = i;
this.sf?.setValue('/receiveName4', i);
},
visibleIf: {
expand: (value: boolean) => value
}
},
default: ''
}
}
};
reqParams = {};
_$expand = false;
constructor(public service: TicketService) {}
ngOnInit(): void {}
stChange(e: STChange): void {
switch (e.type) {
case 'filter':
this.st.load();
break;
}
}
goBack() {
history.go(-1);
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
}

View File

@ -0,0 +1,31 @@
<page-header-wrapper title="货主账户">
</page-header-wrapper>
<nz-card class="search-box">
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 110,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button> 导出</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
<nz-card class="content-box">
<st #st [data]="url" [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, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)">
</st>
</nz-card>

View File

@ -0,0 +1,29 @@
:host::ng-deep {
.search-box {
.ant-card-body {
padding-bottom: 18px;
}
}
.content-box {
.ant-card-body {
padding-top: 14px;
}
}
nz-range-picker {
width: 100%;
}
}
.expend-options {
margin-top: 0px;
}
@media (min-width: 1200px) {
.expend-options {
margin-top: -40px;
}
}

View File

@ -0,0 +1,112 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STChange } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { SystemService } from 'src/app/routes/sys-setting/services/system.service';
@Component({
selector: 'app-driver-account',
templateUrl: './driver-account.component.html',
styleUrls: ['./driver-account.component.less']
})
export class DriverAccountComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
url = `/rule?_allow_anonymous=true`;
searchSchema: SFSchema = {
properties: {
expand: {
type: 'boolean',
ui: {
hidden: true
}
},
receiveName: {
type: 'string',
title: '司机姓名',
ui: { placeholder: '请输入' }
},
phone: {
type: 'string',
title: '证件号码',
ui: { placeholder: '请输入' }
},
page: {
type: 'string',
title: '手机号',
ui: {
placeholder: '请输入'
}
},
createTime: {
title: '创建时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
} as SFDateWidgetSchema
}
}
};
columns: STColumn[] = [
{ title: '司机姓名', index: 'description' },
{ title: '证件号码', index: 'description' },
{ title: '手机号', index: 'description' },
{ title: '账户余额', index: 'description' },
{ title: '油卡余额', index: 'description' },
{ title: '创建时间', index: 'updatedAt', type: 'date' },
{
title: '操作',
buttons: [
{
text: '查看明细',
click: item => this.routeTo(item)
}
]
}
];
reqParams = { pageIndex: 1, pageSize: 10 };
_$expand = false;
constructor(public service: SystemService, private router: Router) {}
ngOnInit(): void {}
stChange(e: STChange): void {
switch (e.type) {
case 'filter':
this.st.load();
break;
}
}
routeTo(item?: any) {
this.router.navigate(['/financial-management/driver-account-detail/1']);
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
}