From b848978d70bcacd6c0e21aaf6ac491660af70e51 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 9 Mar 2022 14:49:59 +0800 Subject: [PATCH] fix bug --- .../components/list/particulars.component.ts | 6 +- .../rebate-record.component.html | 60 ++++++ .../rebate-record/rebate-record.component.ts | 188 ++++++++++++++++++ 3 files changed, 251 insertions(+), 3 deletions(-) create mode 100644 src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html create mode 100644 src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts diff --git a/src/app/routes/partner/rebate-management/components/list/particulars.component.ts b/src/app/routes/partner/rebate-management/components/list/particulars.component.ts index 88bc6e8f..55ed5dd9 100644 --- a/src/app/routes/partner/rebate-management/components/list/particulars.component.ts +++ b/src/app/routes/partner/rebate-management/components/list/particulars.component.ts @@ -136,7 +136,7 @@ export class ParterRebateManageMentParticularsComponent implements OnInit { index: 'name1' }, { - title: '返佣金额(元)', + title: '预估返佣金额(元)', index: 'name1' }, { @@ -152,11 +152,11 @@ export class ParterRebateManageMentParticularsComponent implements OnInit { index: 'name1' }, { - title: '合伙人名称', + title: '销售渠道', index: 'name1' }, { - title: '网络货运人', + title: '合伙人名称', index: 'name1' }, { diff --git a/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html new file mode 100644 index 00000000..0ebf82f0 --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.html @@ -0,0 +1,60 @@ + + + +
+ +
+ +
+ + + +
+ +
+
+ + + + +
+
+
+
+ + + + + + diff --git a/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts new file mode 100644 index 00000000..55ed5dd9 --- /dev/null +++ b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts @@ -0,0 +1,188 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { processSingleSort, ShipperBaseService } from '@shared'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { RebateManagementService } from '../../services/rebate-management.service'; + +@Component({ + selector: 'app-parter-channel-rebate-management-particulars', + templateUrl: './particulars.component.html' +}) +export class ParterRebateManageMentParticularsComponent implements OnInit { + schema: SFSchema = {}; + columns!: STColumn[]; + ui!: SFUISchema; + @ViewChild('st', { static: false }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + spuStatus = '1'; + _$expand = false; + data = [{ name1: 1111 }]; + constructor( + public router: Router, + public ar: ActivatedRoute, + public service: RebateManagementService, + private modalService: NzModalService, + public shipperservice: ShipperBaseService + ) {} + /** + * 查询字段个数 + */ + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + /** + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + /** + * 查询参数 + */ + get reqParams() { + const params: any = Object.assign({}, this.sf?.value || {}); + delete params._$expand; + return { + ...params, + deadlineTime: { + start: this.sf?.value?.deadlineTime?.[0] || '', + end: this.sf?.value?.deadlineTime?.[1] || '', + }, + }; + } + ngOnInit() { + this.initSF(); + this.initST(); + } + + initSF() { + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + name: { + type: 'string', + title: '订单号' + }, + phone: { + type: 'string', + title: '付款单号' + }, + phone2: { + type: 'string', + title: '下单客户' + }, + enterpriseInfoId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + _$expand: (value: boolean) => value + }, + allowClear: true, + asyncData: () => this.shipperservice.getNetworkFreightForwarder() + } + }, + phone3: { + type: 'string', + title: '合伙人名称', + ui: { + visibleIf: { + _$expand: (value: boolean) => value + }, + } + }, + deadlineTime: { + title: '时间范围', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + _$expand: (value: boolean) => value + }, + allowClear: true + } as SFDateWidgetSchema + } + } + }; + this.ui = { + '*': { + spanLabelFixed: 140, + grid: { span: 8, gutter: 4 } + } + }; + } + + initST() { + this.columns = [ + { + title: '订单号', + index: 'name1' + }, + { + title: '订单金额(元)', + index: 'name1' + }, + { + title: '付款金额(元)', + index: 'name1' + }, + { + title: '预估返佣金额(元)', + index: 'name1' + }, + { + title: '附加费率', + index: 'name1' + }, + { + title: '下单客户', + index: 'name1' + }, + { + title: '网络货运人', + index: 'name1' + }, + { + title: '销售渠道', + index: 'name1' + }, + { + title: '合伙人名称', + index: 'name1' + }, + { + title: '合伙人等级', + index: 'name1' + }, + { + title: '管理费比例', + index: 'name1' + }, + { + title: '固定结算费率', + index: 'name1' + }, + { + title: '返佣时间', + index: 'name1' + } + ]; + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this.st.load(1); + } +}