edit
This commit is contained in:
		| @ -9,20 +9,21 @@ | ||||
| <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 nzValue="天津怡亚通物流科技有限公司(平安)" [nzTitle]="'张三(13812345678'" | ||||
|                 [nzValueStyle]="{'font-size':'16px','font-weight':'bold'}" class="bold"> | ||||
|             </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 nzValue="100,000,000.00 元" [nzTitle]="'账户余额'" | ||||
|                 [nzValueStyle]="{'font-size':'16px',color:'red'}"> | ||||
|             </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 nzValue="100,000.00 元" [nzTitle]="'收入金额'" [nzValueStyle]="{'font-size':'16px',color:'red'}"> | ||||
|             </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 nzValue="100,000.00 元" [nzTitle]="'支出金额'" [nzValueStyle]="{'font-size':'16px',color:'red'}"> | ||||
|             </nz-statistic> | ||||
|         </nz-col> | ||||
|     </nz-row> | ||||
| @ -39,7 +40,7 @@ | ||||
|             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 (click)="exportList()"> 导出</button> | ||||
|             <button nz-button nzType="link" (click)="expandToggle()"> | ||||
|                 {{ !_$expand ? '展开' : '收起' }} | ||||
|                 <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> | ||||
| @ -49,9 +50,9 @@ | ||||
| </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 }" | ||||
|     <st #st [data]="service.$mock_url" [columns]="columns" | ||||
|         [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams, process: beforeReq }" | ||||
|         [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> | ||||
|         [loading]="service.http.loading" [scroll]="{ x:'1200px',y: '300px' }"></st> | ||||
| </nz-card> | ||||
| @ -14,6 +14,14 @@ | ||||
|     nz-range-picker { | ||||
|         width: 100%; | ||||
|     } | ||||
|  | ||||
|     .bold { | ||||
|         .ant-statistic-title { | ||||
|             font-weight: 600; | ||||
|             color      : #000; | ||||
|             font-size  : 16px; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| .expend-options { | ||||
| @ -26,7 +34,7 @@ | ||||
|         max-width : 400px; | ||||
|         position  : absolute; | ||||
|         right     : 0; | ||||
|         bottom    : 30px; | ||||
|         bottom    : 25px; | ||||
|     } | ||||
|  | ||||
| } | ||||
| @ -1,9 +1,10 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { Router } from '@angular/router'; | ||||
| import { STComponent, STColumn, STChange } from '@delon/abc/st'; | ||||
| import { STComponent, STColumn, STChange, STRequestOptions } 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'; | ||||
| import { FreightAccountService } from '../../../services/freight-account.service'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-driver-account-detail', | ||||
| @ -16,130 +17,24 @@ export class DriverAccountDetailComponent implements OnInit { | ||||
|   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: '' | ||||
|       } | ||||
|     } | ||||
|   }; | ||||
|   columns: STColumn[] = this.initST(); | ||||
|   searchSchema: SFSchema = this.initSF(); | ||||
|  | ||||
|   reqParams = {}; | ||||
|   _$expand = false; | ||||
|   constructor(public service: TicketService) {} | ||||
|   constructor(public service: FreightAccountService) {} | ||||
|  | ||||
|   ngOnInit(): void {} | ||||
|  | ||||
|   stChange(e: STChange): void { | ||||
|     switch (e.type) { | ||||
|       case 'filter': | ||||
|         this.st.load(); | ||||
|         break; | ||||
|   beforeReq = (requestOptions: STRequestOptions) => { | ||||
|     if (this.sf) { | ||||
|       this.reqParams = { ...this.sf.value }; | ||||
|     } | ||||
|     return requestOptions; | ||||
|   }; | ||||
|  | ||||
|   exportList() { | ||||
|     this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps }); | ||||
|   } | ||||
|  | ||||
|   goBack() { | ||||
| @ -161,4 +56,97 @@ export class DriverAccountDetailComponent implements OnInit { | ||||
|     this._$expand = !this._$expand; | ||||
|     this.sf?.setValue('/expand', this._$expand); | ||||
|   } | ||||
|  | ||||
|   private initSF(): SFSchema { | ||||
|     return { | ||||
|       properties: { | ||||
|         expand: { | ||||
|           type: 'boolean', | ||||
|           ui: { | ||||
|             hidden: true | ||||
|           } | ||||
|         }, | ||||
|         createTime: { | ||||
|           title: '交易时间', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             widget: 'date', | ||||
|             mode: 'range', | ||||
|             format: 'yyyy-MM-dd' | ||||
|           } as SFDateWidgetSchema | ||||
|         }, | ||||
|         orderSn2: { | ||||
|           type: 'string', | ||||
|           title: '流水号', | ||||
|           ui: { | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         orderSn3: { | ||||
|           type: 'string', | ||||
|           title: '关联单号', | ||||
|           ui: { | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         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: '' | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   private initST(): STColumn[] { | ||||
|     return [ | ||||
|       { title: '交易时间', index: 'updatedAt', type: 'date' }, | ||||
|       { title: '流水号', index: 'callNo' }, | ||||
|       { title: '交易类型', index: 'callNo' }, | ||||
|       { title: '关联单号', index: 'callNo' }, | ||||
|       { title: '收支类型', index: 'callNo' }, | ||||
|       { title: '交易金额', index: 'callNo' }, | ||||
|       { title: '账户余额', index: 'callNo' } | ||||
|     ]; | ||||
|   } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user