From 0230886f3ac40bba5b55b00f80d532852f01b969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E6=99=93=E4=BA=91?= Date: Wed, 9 Mar 2022 20:06:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E5=85=A5=E8=B4=A6=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../account-detail.component.html | 54 +++++++ .../account-detail.component.less | 21 +++ .../account-detail.component.spec.ts | 24 +++ .../account-detail.component.ts | 153 ++++++++++++++++++ .../components/list/list.component.html | 4 +- .../recorded-detail.component.html | 59 +++++++ .../recorded-detail.component.spec.ts | 24 +++ .../recorded-detail.component.ts | 146 +++++++++++++++++ .../virtual-account-detail.component.ts | 2 +- .../routes/partner/partner-routing.module.ts | 4 + src/app/routes/partner/partner.module.ts | 6 +- src/assets/mocks/menu-data.json | 12 +- 12 files changed, 502 insertions(+), 7 deletions(-) create mode 100644 src/app/routes/partner/account-management/components/account-detail/account-detail.component.html create mode 100644 src/app/routes/partner/account-management/components/account-detail/account-detail.component.less create mode 100644 src/app/routes/partner/account-management/components/account-detail/account-detail.component.spec.ts create mode 100644 src/app/routes/partner/account-management/components/account-detail/account-detail.component.ts create mode 100644 src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html create mode 100644 src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.spec.ts create mode 100644 src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts diff --git a/src/app/routes/partner/account-management/components/account-detail/account-detail.component.html b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.html new file mode 100644 index 00000000..e37a9ce3 --- /dev/null +++ b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.html @@ -0,0 +1,54 @@ + + + + {{accountInfo?.company}} + + + {{totalInfo?.balance |currency}} + + + {{totalInfo?.income |currency}} + + + {{totalInfo?.spending |currency}} + + + + {{accountInfo?.name}} {{accountInfo?.phone}} + + + +
+
+ +
+
+ + + + +
+
+
+ + +
- {{item.amount | currency }}
+
+ {{item.amount | currency }}
+
+
+ +
+
diff --git a/src/app/routes/partner/account-management/components/account-detail/account-detail.component.less b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.less new file mode 100644 index 00000000..a485bd4c --- /dev/null +++ b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.less @@ -0,0 +1,21 @@ +:host { + ::ng-deep { + .search-header { + nz-range-picker { + width: 100%; + } + } + } + + .table-content { + position: relative; + + .total-footer { + position: absolute; + bottom: 0; + height: 32px; + margin: 16px 0; + line-height: 32px; + } + } +} diff --git a/src/app/routes/partner/account-management/components/account-detail/account-detail.component.spec.ts b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.spec.ts new file mode 100644 index 00000000..1233feec --- /dev/null +++ b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerAccountManagementAccountDetailComponent } from './account-detail.component'; + +describe('PartnerAccountManagementAccountDetailComponent', () => { + let component: PartnerAccountManagementAccountDetailComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [PartnerAccountManagementAccountDetailComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerAccountManagementAccountDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/account-management/components/account-detail/account-detail.component.ts b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.ts new file mode 100644 index 00000000..589fc368 --- /dev/null +++ b/src/app/routes/partner/account-management/components/account-detail/account-detail.component.ts @@ -0,0 +1,153 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; +import { AccountManagemantService } from '../../services/account-managemant.service'; + +@Component({ + selector: 'app-partner-account-detail', + templateUrl: './account-detail.component.html', + styleUrls: ['./account-detail.component.less'] +}) +export class PartnerAccountManagementAccountDetailComponent implements OnInit { + totalInfo: any = { + balance: 0, + income: 1500, + spending: 2400, + total: 186 + }; + accountInfo = { + name: '张三', + phone: '13812345678', + company: '天津怡亚通物流科技有限公司(平安)' + } + + url = `/user`; + schema: SFSchema = {}; + ui!: SFUISchema; + _$expand = false; + @ViewChild('st') private readonly st!: STComponent; + @ViewChild('sf') private readonly sf!: SFComponent; + + + columns: STColumn[] = []; + + constructor(public service: AccountManagemantService) { } + + + get reqParams() { + return { ...this.sf?.value }; + } + ngOnInit(): void { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + _$expand: { + type: 'boolean', ui: { hidden: true } + }, + createTime: { + type: 'string', + title: '交易时间', + ui: { + widget: 'sl-from-to', + type: 'date', + autoComplete: 'off', + format: 'yyyy-MM-dd', + } as SFDateWidgetSchema, + }, + abnormalCause: { + title: '流水号', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + abnormalCause1: { + title: '交易单号', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + bankType: { + type: 'string', + title: '交易类型', + default: '', + ui: { + widget: 'dict-select', + params: { + dictKey: 'trade:type' + }, + placeholder: '请选择', + allowClear: true, + containsAllLabel: true, + visibleIf: { + _$expand: (value: boolean) => value, + }, + }, + }, + bankType1: { + type: 'string', + title: '收支类型', + default: '', + ui: { + widget: 'dict-select', + params: { + dictKey: 'income:type' + }, + placeholder: '请选择', + allowClear: true, + containsAllLabel: true, + visibleIf: { + _$expand: (value: boolean) => value, + }, + }, + }, + + } + } + 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: '备注', index: 'remark', className: 'text-center', width: 180 }, + { title: '收支类型', render: 'approvalStatus1', className: 'text-center', width: 180 }, + { title: '交易金额', render: 'amount', 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 }, + ]; + } + resetSF() { + this._$expand = false; + this.sf.reset(); + setTimeout(() => { + this.st.reset(); + }) + } + + /** +* 伸缩查询条件 +*/ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + + search() { + this.st.load(1); + } + export() { } +} diff --git a/src/app/routes/partner/account-management/components/list/list.component.html b/src/app/routes/partner/account-management/components/list/list.component.html index a32db2ca..9992f0ab 100644 --- a/src/app/routes/partner/account-management/components/list/list.component.html +++ b/src/app/routes/partner/account-management/components/list/list.component.html @@ -20,14 +20,14 @@ [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="service.http.loading"> - {{item.yskmoney}} + {{item.yskmoney}}
{{item.approvalStatus1 | currency:' '}}
{{item.yskmoney | currency:' + [routerLink]="'/partner/account-management/recorded-detail/'+item?.id">{{item.yskmoney | currency:' '}} diff --git a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html new file mode 100644 index 00000000..dd218401 --- /dev/null +++ b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html @@ -0,0 +1,59 @@ + + + + {{accountInfo?.company}} + + + {{totalInfo?.balance |currency}} + + + {{totalInfo?.income |currency}} + + + {{totalInfo?.spending |currency}} + + + + {{accountInfo?.name}} {{accountInfo?.phone}} + + + +
+ +
+
+ + +
- {{item.amount | currency }}
+
+ {{item.amount | currency }}
+
+
+ +
+
+ + +
+
+ {{accountInfo?.name}} + {{totalInfo?.spending |currency: ' '}} +
+ + +
{{item?.amount |currency :' '}}
+
+ +
+
+
diff --git a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.spec.ts b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.spec.ts new file mode 100644 index 00000000..95af39f8 --- /dev/null +++ b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PartnerAccountManagementRecordedDetailComponent } from './recorded-detail.component'; + +describe('PartnerAccountManagementRecordedDetailComponent', () => { + let component: PartnerAccountManagementRecordedDetailComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [PartnerAccountManagementRecordedDetailComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PartnerAccountManagementRecordedDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts new file mode 100644 index 00000000..49dfd681 --- /dev/null +++ b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts @@ -0,0 +1,146 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Router } from '@angular/router'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; +import { AccountManagemantService } from '../../services/account-managemant.service'; + +@Component({ + selector: 'app-partner-recorded-detail', + templateUrl: './recorded-detail.component.html', +}) +export class PartnerAccountManagementRecordedDetailComponent implements OnInit { + totalInfo: any = { + balance: 0, + income: 1500, + spending: 2400, + total: 186 + }; + accountInfo = { + name: '张三', + phone: '13812345678', + company: '天津怡亚通物流科技有限公司(平安)' + } + + url = `/user`; + schema: SFSchema = {}; + ui!: SFUISchema; + @ViewChild('st') private readonly st!: STComponent; + @ViewChild('sf') private readonly sf!: SFComponent; + + + columns: STColumn[] = []; + billDetailColumns: STColumn[] = []; + showBillDetail = false; + + constructor(public service: AccountManagemantService, public router: Router) { } + + + get reqParams() { + return { ...this.sf?.value }; + } + + get billDetailReqParams() { + return {}; + } + ngOnInit(): void { + this.initSF(); + this.initST(); + this.initBillDetailST(); + } + + initSF() { + this.schema = { + properties: { + + abnormalCause: { + title: '网络货运人', + type: 'string', + ui: { + placeholder: '请输入', + }, + }, + + } + } + this.ui = { '*': { spanLabelFixed: 120, 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: '已入账金额(元)', index: 'remark', className: 'text-center', width: 180 }, + { title: '代缴个税(元)', render: 'approvalStatus1', className: 'text-center', width: 180 }, + { title: '待入账金额(元)', render: 'amount', className: 'text-right', width: 180 }, + { + title: '操作', className: 'text-center', width: 300, + buttons: [ + { + text: '查看入账记录', + click: (_record) => this.viewBookedRecord(_record) + }, + { + text: '查看账单明细', + click: (_record) => this.viewAccountDetail(_record) + }, + ] + }, + ]; + } + + initBillDetailST() { + this.billDetailColumns = [ + { title: '账单月份', index: 'carNo', className: 'text-center', width: '40%' }, + { title: '返佣金额(元)', render: 'amount', className: 'text-center', width: '40%' }, + { + title: '操作', className: 'text-center', width: '20%', buttons: [ + { + text: '订单明细', + click: (_record) => this.router.navigate(['/']) + } + ] + }, + ] + } + + + resetSF() { + this.sf.reset(); + setTimeout(() => { + this.st.reset(); + }) + } + + + + search() { + this.st.load(1); + } + export() { } + + /** + * 查看入账记录 + * @param record 当前行 + */ + viewBookedRecord(record: any) { + + } + + /** + * 查看账单明细 + * @param record 当前行 + */ + viewAccountDetail(record: any) { + this.showBillDetail = true; + } + handleCancel() { + this.showBillDetail = false; + } + +} diff --git a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts index efd4933f..9a583480 100644 --- a/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts +++ b/src/app/routes/partner/account-management/components/virtual-account-detail/virtual-account-detail.component.ts @@ -164,7 +164,7 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On * @param _record 当前行信息 */ viewDetail(_record: any) { - + window.open(location.origin + '/#/partner/account-management/account-detail'); } close() { diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 3c836b4a..f70fd812 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -23,6 +23,8 @@ import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/ import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component'; +import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component'; +import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component'; const routes: Routes = [ { @@ -64,6 +66,8 @@ const routes: Routes = [ path: 'account-management', children: [ { path: 'list', component: PartnerAccountManagementListComponent }, + { path: 'account-detail', component: PartnerAccountManagementAccountDetailComponent }, + { path: 'recorded-detail/:id', component: PartnerAccountManagementRecordedDetailComponent } ] }, ]; diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index a2e956c4..7e3d1570 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -28,6 +28,8 @@ import { PartnerPartnerOrderDetailComponent } from './business-statistics/compon import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component'; import { PartnerAccountManagementVirtualAccountDetailComponent } from './account-management/components/virtual-account-detail/virtual-account-detail.component'; import { ParterRebateManageMentRecordComponent } from './rebate-management/components/rebate-record/rebate-record.component'; +import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component'; +import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -46,7 +48,9 @@ const COMPONENTS: any[] = [ PartnerPartnerCustomOrderDetailComponent, PartnerPartnerOrderDetailComponent, PartnerAccountManagementListComponent, - PartnerAccountManagementVirtualAccountDetailComponent]; + PartnerAccountManagementVirtualAccountDetailComponent, + PartnerAccountManagementAccountDetailComponent, + PartnerAccountManagementRecordedDetailComponent]; @NgModule({ declarations: [...COMPONENTS], diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index ef1ba117..3307c095 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -541,9 +541,15 @@ "text": "账户管理", "group": true, "children": [{ - "text": "账户管理", - "link": "/partner/account-management/list" - }] + "text": "账户管理", + "link": "/partner/account-management/list" + }, + { + "text": "账户明细", + "link": "/partner/account-management/account-detail", + "hide": true + } + ] } ] }