替换containsAllLable
This commit is contained in:
		| @ -1,5 +1,11 @@ | ||||
| <nz-card> | ||||
|   <sf mode="search" [schema]="schema" [ui]="ui" [button]="'none'" (formSubmit)="st.load(1)" (formReset)="resetSF()" #sf> | ||||
|   <!-- <div nz-row> | ||||
|     <div [nzSpan]="" nz-col> | ||||
|  | ||||
|     </div> | ||||
|   </div> --> | ||||
|   <sf [schema]="schema" [mode]="'search'" [ui]="ui" [button]="'none'" (formSubmit)="st.load(1)" (formReset)="resetSF()" | ||||
|     #sf> | ||||
|     <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" | ||||
|       (click)="st?.load(1)">查询</button> | ||||
|     <button nz-button (click)="resetSF()">重置</button> | ||||
| @ -8,7 +14,7 @@ | ||||
|  | ||||
| </nz-card> | ||||
| <nz-card> | ||||
|   <st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{ x: '1200px' }" | ||||
|   <st #st [data]="service. $api_get_account_management_page" [columns]="columns" [scroll]="{ x: '1200px' }" | ||||
|     [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] }" | ||||
| @ -28,8 +34,6 @@ | ||||
|     <ng-template st-row="approvalStatus3" let-item> | ||||
|       <div class="text-right">{{item.yskmoney | currency:' '}}</div> | ||||
|     </ng-template> | ||||
|     <ng-template st-row="approvalStatus4" let-item> | ||||
|       <div class="text-right">{{item.armoney | currency:' '}}</div> | ||||
|     </ng-template> | ||||
|  | ||||
|   </st> | ||||
| </nz-card> | ||||
|  | ||||
| @ -2,7 +2,10 @@ import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { STColumn, STComponent } from '@delon/abc/st'; | ||||
| import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; | ||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { BussinessStatisticsService } from '../../../business-statistics/services/bussiness-statistics.service'; | ||||
| import { AccountManagemantService } from '../../services/account-managemant.service'; | ||||
| import { PartnerAccountManagementVirtualAccountDetailComponent } from '../virtual-account-detail/virtual-account-detail.component'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-partner-list', | ||||
| @ -16,7 +19,7 @@ export class PartnerAccountManagementListComponent implements OnInit { | ||||
|   @ViewChild('sf') private readonly sf!: SFComponent; | ||||
|   columns: STColumn[] = []; | ||||
|  | ||||
|   constructor(public service: BussinessStatisticsService) { } | ||||
|   constructor(public service: AccountManagemantService, public modal: NzModalService) { } | ||||
|   /** | ||||
|    * 查询参数 | ||||
|    */ | ||||
| @ -41,45 +44,36 @@ export class PartnerAccountManagementListComponent implements OnInit { | ||||
|           }, | ||||
|         }, | ||||
|         abnormalCause1: { | ||||
|           title: '类型', | ||||
|           title: '手机号', | ||||
|           type: 'string', | ||||
|           default: '', | ||||
|           enum: [ | ||||
|             { | ||||
|               label: '全部', | ||||
|               value: '' | ||||
|             }, | ||||
|             { | ||||
|               label: '个人', | ||||
|               value: '1' | ||||
|             }, | ||||
|             { | ||||
|               label: '企业', | ||||
|               value: '2' | ||||
|             } | ||||
|           ], | ||||
|           ui: { | ||||
|             widget: 'select' | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|       } | ||||
|     } | ||||
|     this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 } } }; | ||||
|     this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 12 } }, }; | ||||
|   } | ||||
|   /** | ||||
|  * 初始化数据列表 | ||||
|  */ | ||||
|   initST() { | ||||
|     this.columns = [ | ||||
|       { title: '合伙人名称', index: 'carNo', className: 'text-center', width: 150 }, | ||||
|       { title: '类型', render: 'carModelLabel', className: 'text-center', width: 150 }, | ||||
|       { title: '注册时间', index: 'carNo', className: 'text-center', width: 150 }, | ||||
|       { title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 }, | ||||
|       { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 }, | ||||
|       { title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 180 }, | ||||
|       { title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 180 }, | ||||
|       { title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 180 }, | ||||
|       { title: '累计收益(元)', render: 'approvalStatus4', className: 'text-right', sort: true, width: 180 }, | ||||
|       { title: '合伙人名称', index: 'carNo', className: 'text-center', width: 300 }, | ||||
|       { title: '手机号', render: 'carModelLabel', className: 'text-center', width: 200 }, | ||||
|       { title: '账户总额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 200 }, | ||||
|       { title: '待入账余额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 200 }, | ||||
|       { title: '可用余额(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 250 }, | ||||
|       { title: '虚拟账户', index: 'approvalStatus4', className: 'text-center', width: 200 }, | ||||
|       { | ||||
|         title: '操作', | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '虚拟账户明细', | ||||
|             click: (_record) => this.viewVirtual(_record) | ||||
|           } | ||||
|         ] | ||||
|       } | ||||
|     ]; | ||||
|   } | ||||
|  | ||||
| @ -90,6 +84,28 @@ export class PartnerAccountManagementListComponent implements OnInit { | ||||
|     }) | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * | ||||
|    * @param _record 当前行信息 | ||||
|    */ | ||||
|   viewVirtual(_record: any) { | ||||
|  | ||||
|     const modalRef = this.modal.create({ | ||||
|       nzTitle: '虚拟账户明细', | ||||
|       nzContent: PartnerAccountManagementVirtualAccountDetailComponent, | ||||
|       nzComponentParams: { | ||||
|         id: _record?.id | ||||
|       }, | ||||
|       nzWidth: '85%', | ||||
|       nzFooter: null | ||||
|     }); | ||||
|     modalRef.afterClose.subscribe(result => { | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * | ||||
|    */ | ||||
|   export() { | ||||
|  | ||||
|   } | ||||
|  | ||||
| @ -0,0 +1,27 @@ | ||||
| <nz-card> | ||||
|   <div nz-row> | ||||
|     <div nz-col [nzSpan]="_$expand ? 24 : 18"> | ||||
|       <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> | ||||
|     </div> | ||||
|     <div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right"> | ||||
|       <button nz-button nzType="primary" [disabled]="!sf.valid" (click)="st?.load(1)">查询</button> | ||||
|       <button nz-button (click)="resetSF()">重置</button> | ||||
|       <button nz-button (click)="export()" nzType="primary" nzGhost>导出</button> | ||||
|       <button nz-button nzType="link" (click)="expandToggle()"> | ||||
|         {{ !_$expand ? '展开' : '收起' }} | ||||
|         <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> | ||||
|       </button> | ||||
|     </div> | ||||
|   </div> | ||||
|   <div class="mt-sm"> | ||||
|     <st #st [data]="amService.$api_get_account_management_page" [columns]="columns" [columns]="columns" | ||||
|       [scroll]="{ x: '1200px' }" | ||||
|       [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]="amService.http.loading"></st> | ||||
|   </div> | ||||
| </nz-card> | ||||
| <div class="modal-footer text-center"> | ||||
|   <button nz-button type="button" nzType="primary" (click)="close()">确定</button> | ||||
| </div> | ||||
| @ -0,0 +1,24 @@ | ||||
| import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||
| import { PartnerAccountManagementVirtualAccountDetailComponent } from './virtual-account-detail.component'; | ||||
|  | ||||
| describe('PartnerAccountManagementVirtualAccountDetailComponent', () => { | ||||
|   let component: PartnerAccountManagementVirtualAccountDetailComponent; | ||||
|   let fixture: ComponentFixture<PartnerAccountManagementVirtualAccountDetailComponent>; | ||||
|  | ||||
|   beforeEach(waitForAsync(() => { | ||||
|     TestBed.configureTestingModule({ | ||||
|       declarations: [PartnerAccountManagementVirtualAccountDetailComponent] | ||||
|     }) | ||||
|       .compileComponents(); | ||||
|   })); | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     fixture = TestBed.createComponent(PartnerAccountManagementVirtualAccountDetailComponent); | ||||
|     component = fixture.componentInstance; | ||||
|     fixture.detectChanges(); | ||||
|   }); | ||||
|  | ||||
|   it('should create', () => { | ||||
|     expect(component).toBeTruthy(); | ||||
|   }); | ||||
| }); | ||||
| @ -0,0 +1,174 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { STColumn, STComponent } from '@delon/abc/st'; | ||||
| import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; | ||||
| import { _HttpClient } from '@delon/theme'; | ||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||
| import { ShipperBaseService } from 'src/app/shared/services/business/shipper-base.service'; | ||||
| import { AccountManagemantService } from '../../services/account-managemant.service'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-partner-virtual-account-detail', | ||||
|   templateUrl: './virtual-account-detail.component.html', | ||||
| }) | ||||
| export class PartnerAccountManagementVirtualAccountDetailComponent implements OnInit { | ||||
|   url = `/user`; | ||||
|   schema!: SFSchema; | ||||
|   ui!: SFUISchema; | ||||
|   @ViewChild('st') private readonly st!: STComponent; | ||||
|   @ViewChild('sf') private readonly sf!: SFComponent; | ||||
|   columns: STColumn[] = []; | ||||
|   id = ''; | ||||
|   _$expand = false; | ||||
|  | ||||
|   constructor(public shipperservice: ShipperBaseService, public amService: AccountManagemantService, private modalRef: NzModalRef) { } | ||||
|  | ||||
|   get reqParams() { | ||||
|     return { ...this.sf?.value }; | ||||
|   } | ||||
|   ngOnInit(): void { | ||||
|     this.initSF(); | ||||
|     this.initST(); | ||||
|   } | ||||
|  | ||||
|   initSF() { | ||||
|     this.schema = { | ||||
|       properties: { | ||||
|         _$expand: { | ||||
|           type: 'boolean', ui: { hidden: true } | ||||
|         }, | ||||
|         abnormalCause: { | ||||
|           title: '合伙人名称', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         abnormalCause1: { | ||||
|           title: '手机号', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|           }, | ||||
|         }, | ||||
|         abnormalCause2: { | ||||
|           title: '网络货运人', | ||||
|           type: 'string', | ||||
|           default: '', | ||||
|           ui: { | ||||
|             widget: 'select', | ||||
|             placeholder: '请选择', | ||||
|             allowClear: true, | ||||
|             asyncData: () => this.shipperservice.getNetworkFreightForwarder({}, true) | ||||
|           } | ||||
|  | ||||
|         }, | ||||
|         bankType: { | ||||
|           type: 'string', | ||||
|           title: '银行类型', | ||||
|           default: '', | ||||
|           ui: { | ||||
|             widget: 'dict-select', | ||||
|             params: { | ||||
|               dictKey: 'bankname:type' | ||||
|             }, | ||||
|             placeholder: '请选择', | ||||
|             allowClear: true, | ||||
|             containsAllLabel: true, | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value, | ||||
|             }, | ||||
|           }, | ||||
|         }, | ||||
|         abnormalCause3: { | ||||
|           title: '虚拟账户', | ||||
|           type: 'string', | ||||
|           ui: { | ||||
|             placeholder: '请输入', | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value | ||||
|             }, | ||||
|           }, | ||||
|         }, | ||||
|         createTime: { | ||||
|           type: 'string', | ||||
|           title: '创建时间', | ||||
|           ui: { | ||||
|             widget: 'sl-from-to', | ||||
|             type: 'date', | ||||
|             autoComplete: 'off', | ||||
|             format: 'yyyy-MM-dd', | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value | ||||
|             }, | ||||
|           } as SFDateWidgetSchema, | ||||
|         }, | ||||
|       } | ||||
|     } | ||||
|     this.ui = { '*': { spanLabelFixed: 100, grid: { span: 8, gutter: 4 } }, }; | ||||
|   } | ||||
|  | ||||
|   /** | ||||
| * 初始化数据列表 | ||||
| */ | ||||
|   initST() { | ||||
|     this.columns = [ | ||||
|       { title: '合伙人', index: 'carNo', className: 'text-center', width: 200 }, | ||||
|       { title: '手机号', render: 'carModelLabel', className: 'text-center', width: 150 }, | ||||
|       { title: '网络货运人', render: 'carModelLabel', className: 'text-center', width: 200 }, | ||||
|       { title: '银行类型', render: 'carModelLabel', className: 'text-center', width: 120 }, | ||||
|       { title: '虚拟账户', render: 'carModelLabel', className: 'text-center', width: 180 }, | ||||
|       { title: '可用余额', render: 'approvalStatus1', className: 'text-right', width: 180 }, | ||||
|       { title: '账户总余额', render: 'approvalStatus2', className: 'text-right', width: 180 }, | ||||
|       { title: '可用余额(元)', render: 'approvalStatus3', className: 'text-right', width: 180 }, | ||||
|       { title: '创建时间', index: 'approvalStatus4', className: 'text-center', width: 200 }, | ||||
|       { title: '状态', index: 'approvalStatus4', className: 'text-center', width: 120 }, | ||||
|       { | ||||
|         title: '操作', | ||||
|         width: 120, | ||||
|         buttons: [ | ||||
|           { | ||||
|             text: '查看明细', | ||||
|             click: (_record) => this.viewDetail(_record) | ||||
|           } | ||||
|         ] | ||||
|       } | ||||
|     ]; | ||||
|   } | ||||
|  | ||||
|   resetSF() { | ||||
|     this._$expand = false; | ||||
|     this.sf.reset(); | ||||
|     setTimeout(() => { | ||||
|       this.st.reset(); | ||||
|     }) | ||||
|   } | ||||
|   /** | ||||
| * 伸缩查询条件 | ||||
| */ | ||||
|   expandToggle() { | ||||
|     this._$expand = !this._$expand; | ||||
|     this.sf?.setValue('/_$expand', this._$expand); | ||||
|   } | ||||
|  | ||||
|   add(): void { | ||||
|     // this.modal | ||||
|     //   .createStatic(FormEditComponent, { i: { id: 0 } }) | ||||
|     //   .subscribe(() => this.st.reload()); | ||||
|   } | ||||
|   search() { | ||||
|     this.st.load(1); | ||||
|   } | ||||
|   export() { } | ||||
|   /** | ||||
|    * | ||||
|    * @param _record 当前行信息 | ||||
|    */ | ||||
|   viewDetail(_record: any) { | ||||
|  | ||||
|   } | ||||
|  | ||||
|   close() { | ||||
|     this.modalRef.destroy(); | ||||
|   } | ||||
|  | ||||
| } | ||||
| @ -6,6 +6,7 @@ import { BaseService } from '@shared'; | ||||
| }) | ||||
| export class AccountManagemantService extends BaseService { | ||||
|  | ||||
|   $api_get_account_management_page = `/api/fcc/ficoBrmH/list/page`; | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector) | ||||
|   } | ||||
|  | ||||
| @ -22,6 +22,7 @@ import { PartnerSalePartnerDetailComponent } from './business-statistics/compone | ||||
| import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; | ||||
| import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; | ||||
| import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; | ||||
| import { PartnerAccountManagementVirtualAccountDetailComponent } from './account-management/components/virtual-account-detail/virtual-account-detail.component'; | ||||
|  | ||||
| const routes: Routes = [ | ||||
|   { | ||||
| @ -63,7 +64,8 @@ const routes: Routes = [ | ||||
|     children: [ | ||||
|       { path: 'list', component: PartnerAccountManagementListComponent }, | ||||
|     ] | ||||
|   }]; | ||||
|   }, | ||||
| ]; | ||||
| @NgModule({ | ||||
|   imports: [RouterModule.forChild(routes)], | ||||
|   exports: [RouterModule] | ||||
|  | ||||
| @ -16,6 +16,7 @@ import { PartnerSalePartnerDetailComponent } from './business-statistics/compone | ||||
| import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; | ||||
| import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; | ||||
| import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; | ||||
| import { PartnerAccountManagementVirtualAccountDetailComponent } from './account-management/components/virtual-account-detail/virtual-account-detail.component'; | ||||
|  | ||||
| const COMPONENTS: any[] = [ | ||||
|   PartnerBusinessStatisticsIndexComponent, | ||||
| @ -32,7 +33,8 @@ const COMPONENTS: any[] = [ | ||||
|   PartnerSalePartnerDetailComponent, | ||||
|   PartnerPartnerCustomOrderDetailComponent, | ||||
|   PartnerPartnerOrderDetailComponent, | ||||
|   PartnerAccountManagementListComponent]; | ||||
|   PartnerAccountManagementListComponent, | ||||
|   PartnerAccountManagementVirtualAccountDetailComponent]; | ||||
|  | ||||
| @NgModule({ | ||||
|   declarations: [...COMPONENTS], | ||||
|  | ||||
		Reference in New Issue
	
	Block a user