edit
This commit is contained in:
@ -1,12 +1,9 @@
|
||||
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 { SystemStaffStaffModalComponent } from 'src/app/routes/sys-setting/components/staff-management/staff-modal/staff-modal.component';
|
||||
import { SystemService } from 'src/app/routes/sys-setting/services/system.service';
|
||||
import { FreightAccountService } from '../../services/freight-account.service';
|
||||
import { SettingFinancialComponent } from './setting-financial/setting-financial.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-platform-account',
|
||||
@ -18,40 +15,22 @@ export class PlatformAccountComponent implements OnInit {
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
columns: STColumn[] = this.initST();
|
||||
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
|
||||
searchSchema: SFSchema = this.initSF();
|
||||
|
||||
columns: STColumn[] = this.initST();
|
||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
||||
|
||||
constructor(public service: FreightAccountService, private router: Router, private nzModalService: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'filter':
|
||||
this.st.load();
|
||||
break;
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, { ...this.sf.value });
|
||||
}
|
||||
}
|
||||
|
||||
settingFinanical(item: any) {
|
||||
const modal = this.nzModalService.create({
|
||||
nzContent: SettingFinancialComponent,
|
||||
nzComponentParams: item ? { i: { ...item, roleId: '1,2,3', name: '用户名', phone: 18555555555 } } : { i: { id: 0 } },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe(res => {
|
||||
this.st.load();
|
||||
});
|
||||
}
|
||||
|
||||
routeTo(item?: any) {
|
||||
this.router.navigate(['/financial-management/driver-account-detail/1']);
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
@ -192,7 +171,7 @@ export class PlatformAccountComponent implements OnInit {
|
||||
buttons: [
|
||||
{
|
||||
text: '查看明细',
|
||||
click: item => this.routeTo(item)
|
||||
click: item => this.router.navigate(['/financial-management/platform-account/detail/' + item.id])
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user