-
-
+
-
diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.less b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.less
index d8a7024c..c5f2b1ea 100644
--- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.less
+++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.less
@@ -20,3 +20,18 @@
padding-right: 16px;
}
}
+
+.expend-options {
+ margin-top: 0px;
+}
+
+
+@media (min-width: 1200px) {
+ .expend-options {
+ max-width: 400px;
+ position : absolute;
+ right : 0;
+ bottom : 25px;
+ }
+
+}
\ No newline at end of file
diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts
index 44588236..0cfd1dc9 100644
--- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts
+++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts
@@ -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-withdrawals-record',
@@ -11,131 +12,14 @@ import { TicketService } from 'src/app/routes/ticket-management/services/system.
styleUrls: ['./withdrawals-record.component.less']
})
export class WithdrawalsRecordComponent implements OnInit {
- url = `/rule?_allow_anonymous=true`;
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
@ViewChild('auditModal', { static: false })
auditModal!: any;
- columns: STColumn[] = [
- { title: '', index: 'key', type: 'checkbox' },
- { title: '提现时间', index: 'no' },
- { title: '提现单号', index: 'callNo' },
- { title: '账户主体', index: 'callNo' },
- { title: '账户名称', index: 'callNo' },
- { title: '虚拟账户', index: 'callNo' },
- { title: '账户类型', index: 'callNo' },
- { title: '提现金额', index: 'callNo' },
- { title: '提现手续费', index: 'callNo' },
- { title: '银行账户', index: 'callNo' },
- { title: '提现状态', index: 'callNo' },
- {
- title: '操作',
- buttons: [
- {
- text: '审核',
- click: item => this.auditAction(item)
- },
- {
- text: '详情',
- click: item => this.routeTo(item)
- }
- ]
- }
- ];
- searchSchema: SFSchema = {
- properties: {
- expand: {
- type: 'boolean',
- ui: {
- hidden: true
- }
- },
- orderSn: {
- type: 'string',
- title: '提现单号',
- ui: {
- autocomplete: 'off'
- }
- },
- receiveName: {
- type: 'string',
- title: '提现状态',
- enum: [
- { 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);
- }
- }
- },
- createTime: {
- title: '提现时间',
- type: 'string',
- ui: {
- widget: 'date',
- mode: 'range',
- format: 'yyyy-MM-dd'
- } as SFDateWidgetSchema
- },
- orderSn2: {
- type: 'string',
- title: '账户名称',
- ui: {
- placeholder: '请输入',
- autocomplete: 'off',
- visibleIf: {
- expand: (value: boolean) => value
- }
- }
- },
- 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
- }
- }
- },
- receiveName3: {
- type: 'string',
- title: '账户主体',
- enum: [{ label: '全部', value: '全部' }],
- ui: {
- widget: 'select',
- placeholder: '请选择',
- change: (i: any) => {
- this.sf.value.receiveName3 = i;
- this.sf?.setValue('/receiveName3', i);
- },
- visibleIf: {
- expand: (value: boolean) => value
- }
- }
- }
- }
- };
+ columns: STColumn[] = this.initST();
+ searchSchema: SFSchema = this.initSF();
reqParams = {};
@@ -143,19 +27,23 @@ export class WithdrawalsRecordComponent implements OnInit {
selectedRows: any[] = [];
totalCallNo = 0;
- constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
+ constructor(public service: FreightAccountService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
+ beforeReq = (requestOptions: STRequestOptions) => {
+ if (this.sf) {
+ this.reqParams = { ...this.sf.value };
+ }
+ return requestOptions;
+ };
+
stChange(e: STChange): void {
switch (e.type) {
case 'checkbox':
this.selectedRows = e.checkbox!;
this.totalCallNo = this.selectedRows.reduce((total, cv) => total + cv.callNo, 0);
break;
- case 'filter':
- this.st.load();
- break;
}
}
@@ -163,10 +51,6 @@ export class WithdrawalsRecordComponent implements OnInit {
add(): void {}
- routeTo(item: any) {
- this.router.navigate(['/financial-management/withdrawals-detail/1']);
- }
-
auditAction(item: any) {
const modal = this.nzModalService.create({
nzTitle: '审核',
@@ -224,4 +108,131 @@ export class WithdrawalsRecordComponent implements OnInit {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
+
+ private initSF(): SFSchema {
+ return {
+ properties: {
+ expand: {
+ type: 'boolean',
+ ui: {
+ hidden: true
+ }
+ },
+ orderSn: {
+ type: 'string',
+ title: '提现单号',
+ ui: {
+ placeholder: '请输入'
+ }
+ },
+ receiveName: {
+ type: 'string',
+ title: '提现状态',
+ enum: [
+ { label: '全部', value: '全部' },
+ { label: '待审核', value: '待审核' },
+ { label: '处理中', value: '处理中' },
+ { label: '已完成', value: '已完成' },
+ { label: '已拒绝', value: '已拒绝' }
+ ],
+ ui: {
+ widget: 'select',
+ placeholder: '请选择'
+ }
+ },
+ createTime: {
+ title: '提现时间',
+ type: 'string',
+ ui: {
+ widget: 'date',
+ mode: 'range',
+ format: 'yyyy-MM-dd'
+ } as SFDateWidgetSchema
+ },
+ orderSn2: {
+ type: 'string',
+ title: '账户名称',
+ ui: {
+ placeholder: '请输入',
+ visibleIf: {
+ expand: (value: boolean) => value
+ }
+ }
+ },
+ receiveName2: {
+ type: 'string',
+ title: '账户类型',
+ enum: [
+ { label: '全部', value: '全部' },
+ { label: '货主账户', value: '货主账户' },
+ { label: '司机账户', value: '司机账户' }
+ ],
+ ui: {
+ widget: 'select',
+ placeholder: '请选择',
+ visibleIf: {
+ expand: (value: boolean) => value
+ }
+ }
+ },
+ receiveName3: {
+ type: 'string',
+ title: '网络货运人',
+ enum: [{ label: '全部', value: '全部' }],
+ ui: {
+ widget: 'select',
+ placeholder: '请选择',
+ visibleIf: {
+ expand: (value: boolean) => value
+ }
+ }
+ },
+ orderSn23: {
+ type: 'string',
+ title: '银行类型',
+ ui: {
+ placeholder: '请输入',
+ visibleIf: {
+ expand: (value: boolean) => value
+ }
+ }
+ }
+ }
+ };
+ }
+
+ private initST(): STColumn[] {
+ return [
+ { title: '', index: 'key', type: 'checkbox' },
+ { title: '提现时间', index: 'no' },
+ { title: '提现单号', index: 'callNo' },
+ { title: '网络货运人', index: 'callNo' },
+ { title: '银行类型', index: 'callNo' },
+ { title: '账户类型', index: 'callNo' },
+ { title: '账户名称', index: 'callNo' },
+ { title: '虚拟账户', index: 'callNo' },
+ { title: '提现金额', index: 'callNo' },
+ { title: '提现银行账户', index: 'callNo' },
+ { title: '提现状态', index: 'callNo' },
+ { title: '银行流水号', index: 'callNo' },
+ { title: '失败原因', index: 'callNo' },
+ {
+ title: '操作',
+ buttons: [
+ {
+ text: '审核',
+ click: item => this.auditAction(item)
+ },
+ {
+ text: '查看回单'
+ // click: item => this.auditAction(item)
+ },
+ {
+ text: '详情',
+ click: item => this.router.navigate(['/financial-management/withdrawals-record/detail/1'])
+ }
+ ]
+ }
+ ];
+ }
}
diff --git a/src/app/routes/financial-management/financial-managemen-routing.module.ts b/src/app/routes/financial-management/financial-managemen-routing.module.ts
index 8027248a..b6f4d89b 100644
--- a/src/app/routes/financial-management/financial-managemen-routing.module.ts
+++ b/src/app/routes/financial-management/financial-managemen-routing.module.ts
@@ -2,7 +2,6 @@ import { FreightAccountComponent } from './components/freight-account/freight-ac
import { DriverAccountComponent } from './components/driver-account/driver-account.component';
import { RechargeRecordComponent } from './components/recharge-record/recharge-record.component';
import { WithdrawalsRecordComponent } from './components/withdrawals-record/withdrawals-record.component';
-import { MainAccountComponent } from './components/main-account/main-account.component';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { FreightAccountDetailComponent } from './components/freight-account/freight-account-detail/freight-account-detail.component';
@@ -11,13 +10,12 @@ import { WithdrawalsDetailComponent } from './components/withdrawals-record/with
const routes: Routes = [
{ path: 'freight-account', component: FreightAccountComponent },
- { path: 'freight-account-detail/:id', component: FreightAccountDetailComponent },
+ { path: 'freight-account/detail/:id', component: FreightAccountDetailComponent },
{ path: 'driver-account', component: DriverAccountComponent },
- { path: 'driver-account-detail/:id', component: DriverAccountDetailComponent },
+ { path: 'driver-account/detail/:id', component: DriverAccountDetailComponent },
{ path: 'recharge-record', component: RechargeRecordComponent },
{ path: 'withdrawals-record', component: WithdrawalsRecordComponent },
- { path: 'withdrawals-detail/:id', component: WithdrawalsDetailComponent },
- { path: 'main-account', component: MainAccountComponent }
+ { path: 'withdrawals-record/detail/:id', component: WithdrawalsDetailComponent },
];
@NgModule({
diff --git a/src/app/routes/financial-management/financial-management.module.ts b/src/app/routes/financial-management/financial-management.module.ts
index ec200d1e..4b64f8ac 100644
--- a/src/app/routes/financial-management/financial-management.module.ts
+++ b/src/app/routes/financial-management/financial-management.module.ts
@@ -4,7 +4,6 @@ import { FreightAccountComponent } from './components/freight-account/freight-ac
import { DriverAccountComponent } from './components/driver-account/driver-account.component';
import { RechargeRecordComponent } from './components/recharge-record/recharge-record.component';
import { WithdrawalsRecordComponent } from './components/withdrawals-record/withdrawals-record.component';
-import { MainAccountComponent } from './components/main-account/main-account.component';
import { SharedModule } from '@shared';
import { FinancialManagementRoutingModule } from './financial-managemen-routing.module';
import { FreightAccountDetailComponent } from './components/freight-account/freight-account-detail/freight-account-detail.component';
@@ -17,7 +16,6 @@ const ROUTESCOMPONENTS = [
DriverAccountComponent,
RechargeRecordComponent,
WithdrawalsRecordComponent,
- MainAccountComponent,
WithdrawalsDetailComponent
];
diff --git a/src/app/routes/financial-management/services/freight-account.service.ts b/src/app/routes/financial-management/services/freight-account.service.ts
new file mode 100644
index 00000000..6f376729
--- /dev/null
+++ b/src/app/routes/financial-management/services/freight-account.service.ts
@@ -0,0 +1,13 @@
+import { Injectable, Injector } from '@angular/core';
+import { BaseService } from '@shared';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class FreightAccountService extends BaseService {
+ $mock_url = '/rule?_allow_anonymous=true';
+
+ constructor(public injector: Injector) {
+ super(injector);
+ }
+}
diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json
index 66f78c8d..2eeccc71 100644
--- a/src/assets/mocks/menu-data.json
+++ b/src/assets/mocks/menu-data.json
@@ -253,28 +253,34 @@
"children": [
{
"text": "货主账户",
- "icon": "anticon anticon-dashboard",
"link": "/financial-management/freight-account"
},
+ {
+ "text": "货主账户详情",
+ "hide": true,
+ "link": "/financial-management/freight-account/detail/:id"
+ },
{
"text": "司机账户",
- "icon": "anticon anticon-dashboard",
"link": "/financial-management/driver-account"
},
+ {
+ "text": "司机账户详情",
+ "hide": true,
+ "link": "/financial-management/driver-account/detail/:id"
+ },
{
"text": "充值记录",
- "icon": "anticon anticon-dashboard",
"link": "/financial-management/recharge-record"
},
{
"text": "提现记录",
- "icon": "anticon anticon-dashboard",
"link": "/financial-management/withdrawals-record"
},
{
- "text": "账户主体",
- "icon": "anticon anticon-dashboard",
- "link": "/financial-management/main-account"
+ "text": "提现详情",
+ "hide": true,
+ "link": "/financial-management/withdrawals-record/detail/:id"
}
]
},