edit
This commit is contained in:
		| @ -19,11 +19,12 @@ | ||||
|             </nz-statistic> | ||||
|         </nz-col> | ||||
|         <nz-col [nzXl]="5" [nzLg]="8" [nzSm]="12"> | ||||
|             <nz-statistic nzValue="100,000.00 元" [nzTitle]="'收入金额'" [nzValueStyle]="{'font-size':'16px',color:'red'}"> | ||||
|             <nz-statistic  [nzValue]="(info?.incomeAmount || 0) +'元'" [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':'16px',color:'red'}"> | ||||
|             <nz-statistic [nzValue]="(info?.payAmount || 0) +'元'" [nzTitle]="'支出金额'" | ||||
|                 [nzValueStyle]="{'font-size':'16px',color:'red'}"> | ||||
|             </nz-statistic> | ||||
|         </nz-col> | ||||
|     </nz-row> | ||||
| @ -49,9 +50,9 @@ | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card class="content-box" nzBordered> | ||||
|     <st #st [data]="service.$mock_url" [columns]="columns" | ||||
|     <st #st [data]="service.$api_get_balance_by_shipper" [columns]="columns" | ||||
|         [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' },  process: beforeReq }" | ||||
|         [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||
|         [res]="{ reName: { list: 'data.records', total: 'data.total' } ,  process: afterReq }" | ||||
|         [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" | ||||
|         [loading]="service.http.loading" [scroll]="{ x:'1200px',y: '300px' }"></st> | ||||
| </nz-card> | ||||
| @ -1,7 +1,7 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { Router } from '@angular/router'; | ||||
| import { ActivatedRoute, Router } from '@angular/router'; | ||||
| import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; | ||||
| import { SFComponent, SFDateWidgetSchema, SFSchema } from '@delon/form'; | ||||
| import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema } from '@delon/form'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { FreightAccountService } from '../../../services/freight-account.service'; | ||||
|  | ||||
| @ -18,18 +18,32 @@ export class FreightAccountDetailComponent implements OnInit { | ||||
|   columns: STColumn[] = this.initST(); | ||||
|   searchSchema: SFSchema = this.initSF(); | ||||
|  | ||||
|   info: any = {}; | ||||
|  | ||||
|   _$expand = false; | ||||
|   constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} | ||||
|   constructor(public service: FreightAccountService, private nzModalService: NzModalService, private route: ActivatedRoute) {} | ||||
|  | ||||
|   ngOnInit(): void {} | ||||
|  | ||||
|   beforeReq = (requestOptions: STRequestOptions) => { | ||||
|     Object.assign(requestOptions.body, { transactionNumber: this.route.snapshot.params.id }); | ||||
|     if (this.sf) { | ||||
|       Object.assign(requestOptions.body, { ...this.sf.value }); | ||||
|     } | ||||
|     return requestOptions; | ||||
|   }; | ||||
|  | ||||
|   afterReq = (data: any[], rawData?: any) => { | ||||
|     console.log(data, rawData); | ||||
|     if (rawData?.success) { | ||||
|       this.info = { | ||||
|         incomeAmount: rawData.data.rawData, | ||||
|         payAmount: rawData.data.payAmount | ||||
|       }; | ||||
|     } | ||||
|     return data; | ||||
|   }; | ||||
|  | ||||
|   exportList() { | ||||
|     this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps }); | ||||
|   } | ||||
| @ -72,81 +86,69 @@ export class FreightAccountDetailComponent implements OnInit { | ||||
|             format: 'yyyy-MM-dd' | ||||
|           } as SFDateWidgetSchema | ||||
|         }, | ||||
|         orderSn2: { | ||||
|         transactionNumber: { | ||||
|           type: 'string', | ||||
|           title: '流水号', | ||||
|           ui: { | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         orderSn3: { | ||||
|         businessNumber: { | ||||
|           type: 'string', | ||||
|           title: '关联单号', | ||||
|           ui: { | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         receiveName: { | ||||
|         tradeType: { | ||||
|           type: 'string', | ||||
|           title: '交易类型', | ||||
|           enum: [ | ||||
|             { label: '全部', value: '' }, | ||||
|             { label: '订单支付', value: '订单支付' }, | ||||
|             { label: '余额充值', value: '余额充值' }, | ||||
|             { label: '余额提现', value: '余额提现' }, | ||||
|             { label: '资金分配', value: '资金分配' }, | ||||
|             { label: '资金回收', value: '资金回收' } | ||||
|             { label: '整车订单退款', value: '1' }, | ||||
|             { label: '整车订单支付', value: '2' }, | ||||
|             { label: '提现失败退回', value: '3' }, | ||||
|             { label: '提现', value: '4' }, | ||||
|             { label: '充值', value: '5' }, | ||||
|             { label: '运货订单结算F', value: '5' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             change: (i: any) => { | ||||
|               this.sf.value.receiveName = i; | ||||
|               this.sf?.setValue('/receiveName', i); | ||||
|             }, | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           }, | ||||
|           default: '' | ||||
|         }, | ||||
|         receiveName2: { | ||||
|         incomeType: { | ||||
|           type: 'string', | ||||
|           title: '收支类型', | ||||
|           enum: [ | ||||
|             { label: '全部', value: '' }, | ||||
|             { label: '收入', value: '收入' }, | ||||
|             { label: '支出', value: '支出' } | ||||
|             { label: '收入', value: '1' }, | ||||
|             { label: '支出', value: '2' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             change: (i: any) => { | ||||
|               this.sf.value.receiveName2 = i; | ||||
|               this.sf?.setValue('/receiveName2', i); | ||||
|             }, | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           }, | ||||
|           default: '' | ||||
|         }, | ||||
|         receiveName3: { | ||||
|         projectId: { | ||||
|           title: '项目', | ||||
|           type: 'string', | ||||
|           title: '所属项目', | ||||
|           enum: [{ label: '全部', value: '' }], | ||||
|           default: '', | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             change: (i: any) => { | ||||
|               this.sf.value.receiveName3 = i; | ||||
|               this.sf?.setValue('/receiveName3', i); | ||||
|             }, | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           }, | ||||
|           default: '' | ||||
|             }, | ||||
|             asyncData: () => this.service.getEnterpriseProject() | ||||
|           } as SFSelectWidgetSchema | ||||
|         } | ||||
|       } | ||||
|     }; | ||||
| @ -155,13 +157,18 @@ export class FreightAccountDetailComponent implements OnInit { | ||||
|   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' }, | ||||
|       { title: '账户余额', index: 'callNo' } | ||||
|       { title: '流水号', index: 'transactionNumber' }, | ||||
|       { | ||||
|         title: '交易类型', | ||||
|         index: 'tradeType', | ||||
|         type: 'enum', | ||||
|         enum: { 1: '整车订单退款', 2: '整车订单支付', 3: '提现失败退回', 4: '提现', 5: '充值', 6: '运货订单结算' } | ||||
|       }, | ||||
|       { title: '关联单号', index: 'businessNumber' }, | ||||
|       { title: '所属项目', index: 'projectId' }, | ||||
|       { title: '收支类型', index: 'incomeType', type: 'enum', enum: { 1: '收入', 2: '支出' } }, | ||||
|       { title: '交易金额', index: 'amount' }, | ||||
|       { title: '账户余额', index: 'accountBalance' } | ||||
|     ]; | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -22,7 +22,7 @@ | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card class="content-box"> | ||||
|     <st #st [data]="service.$mock_url" [columns]="columns" | ||||
|     <st #st [data]="service.$api_get_account_balance" [columns]="columns" | ||||
|         [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' },  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] }" | ||||
|  | ||||
| @ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { Router } from '@angular/router'; | ||||
| import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; | ||||
| import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; | ||||
| import { ShipperBaseService } from '@shared'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { SystemService } from 'src/app/routes/sys-setting/services/system.service'; | ||||
| import { FreightAccountService } from '../../services/freight-account.service'; | ||||
| @ -23,11 +24,12 @@ export class FreightAccountComponent implements OnInit { | ||||
|  | ||||
|   _$expand = false; | ||||
|  | ||||
|   constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {} | ||||
|   constructor(public service: FreightAccountService, private router: Router) {} | ||||
|  | ||||
|   ngOnInit(): void {} | ||||
|  | ||||
|   beforeReq = (requestOptions: STRequestOptions) => { | ||||
|     Object.assign(requestOptions.body, { accountType: 1 }); | ||||
|     if (this.sf) { | ||||
|       Object.assign(requestOptions.body, { ...this.sf.value }); | ||||
|     } | ||||
| @ -63,7 +65,7 @@ export class FreightAccountComponent implements OnInit { | ||||
|             hidden: true | ||||
|           } | ||||
|         }, | ||||
|         receiveName: { | ||||
|         tenantName: { | ||||
|           type: 'string', | ||||
|           title: '企业名称', | ||||
|           ui: { placeholder: '请输入' } | ||||
| @ -80,35 +82,37 @@ export class FreightAccountComponent implements OnInit { | ||||
|             placeholder: '请输入' | ||||
|           } | ||||
|         }, | ||||
|         page2: { | ||||
|         ltdid: { | ||||
|           type: 'string', | ||||
|           title: '网络货运人', | ||||
|           enum: [{ label: '全部', value: '全部' }], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|             }, | ||||
|             allowClear: true, | ||||
|             asyncData: () => this.service.getNetworkFreightForwarder() | ||||
|           } | ||||
|         }, | ||||
|         receiveName2: { | ||||
|         bankType: { | ||||
|           type: 'string', | ||||
|           title: '银行类型', | ||||
|           enum: [{ label: '全部', value: '全部' }], | ||||
|           enum: [ | ||||
|             { label: '全部', value: null }, | ||||
|             { label: '平安银行', value: '1' }, | ||||
|             { label: '浦发银行', value: '2' } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             change: (i: any) => { | ||||
|               this.sf.value.receiveName2 = i; | ||||
|               this.sf?.setValue('/receiveName2', i); | ||||
|             }, | ||||
|             visibleIf: { | ||||
|               expand: (value: boolean) => value | ||||
|             } | ||||
|           } | ||||
|           }, | ||||
|           default: null | ||||
|         }, | ||||
|         page3: { | ||||
|         virtualAccount: { | ||||
|           type: 'string', | ||||
|           title: '虚拟账户', | ||||
|           ui: { | ||||
| @ -136,24 +140,29 @@ export class FreightAccountComponent implements OnInit { | ||||
|  | ||||
|   private initST(): STColumn[] { | ||||
|     return [ | ||||
|       { title: '企业名称', index: 'description' }, | ||||
|       { title: '企业名称', index: 'tenantName' }, | ||||
|       { title: '联系人', index: 'description' }, | ||||
|       { title: '联系人电话', index: 'description' }, | ||||
|       { title: '网络货运人', index: 'description' }, | ||||
|       { title: '银行类型', index: 'description' }, | ||||
|       { title: '虚拟账户', index: 'description' }, | ||||
|       { title: '可用余额', index: 'description' }, | ||||
|       { title: '冻结余额', index: 'description' }, | ||||
|       { title: '网络货运人', index: 'ltdid' }, | ||||
|       { title: '银行类型', index: 'bankType', type: 'enum', enum: { 1: '平安银行', 2: '浦发银行' } }, | ||||
|       { title: '虚拟账户', index: 'virtualAccount' }, | ||||
|       { title: '可用余额', index: 'availableBalance' }, | ||||
|       { title: '冻结余额', index: 'freezeBalance' }, | ||||
|       { title: '累计消费金额', index: 'description' }, | ||||
|       { title: '账户总余额', render: 'description1' }, | ||||
|       { title: '创建时间', index: 'updatedAt', type: 'date', width: 150 }, | ||||
|       { title: '状态', render: 'description1' }, | ||||
|       { title: '账户总余额', render: 'availableBalance' }, | ||||
|       { title: '创建时间', index: 'createTime', type: 'date', width: 150 }, | ||||
|       { | ||||
|         title: '状态', | ||||
|         render: 'stateLocked', | ||||
|         type: 'badge', | ||||
|         badge: { 0: { text: '正常', color: 'success' }, 1: { text: '锁定', color: 'warning' } } | ||||
|       }, | ||||
|       { | ||||
|         title: '操作', | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '查看明细', | ||||
|             click: item => this.router.navigate(['/financial-management/freight-account/detail/1']) | ||||
|             click: item => this.router.navigate(['/financial-management/freight-account/detail/' + item.id]) | ||||
|           } | ||||
|         ] | ||||
|       } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user