fix bug
This commit is contained in:
@ -0,0 +1,172 @@
|
||||
import { ModalHelper } from '@delon/theme';
|
||||
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';
|
||||
import { ParterRebateManageMenRecordDetailComponent } from '../../model/record-detail/record-detail.component';
|
||||
import { ParterRebateManageMenAbnormalFeedbackComponent } from '../../model/abnormal-feedback/abnormal-feedback.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-channel-rebate-management-setting',
|
||||
templateUrl: './rebate-setting.component.html'
|
||||
})
|
||||
export class ParterRebateManageMentSettingComponent 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 modal: 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 } },
|
||||
month: {
|
||||
type: 'string',
|
||||
title: '时间月份',
|
||||
format: 'month',
|
||||
},
|
||||
phone: {
|
||||
type: 'string',
|
||||
title: '合伙人名称'
|
||||
},
|
||||
}
|
||||
};
|
||||
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: '异常反馈',
|
||||
render: 'name44'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
width: '90px',
|
||||
className: 'text-left',
|
||||
buttons: [
|
||||
{
|
||||
text: '明细',
|
||||
click: _record => this.viewEvaluate(_record),
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
/**
|
||||
*查看明细
|
||||
*/
|
||||
viewEvaluate(item: any) {
|
||||
const modal = this.modal.create({
|
||||
nzTitle: '明细',
|
||||
nzWidth: 1200,
|
||||
nzContent: ParterRebateManageMenRecordDetailComponent,
|
||||
nzComponentParams: { },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe((res: any) => {
|
||||
if (res) {
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
*异常反馈
|
||||
*/
|
||||
feedback(item?: any) {
|
||||
const modal = this.modal.create({
|
||||
nzTitle: '异常反馈',
|
||||
nzWidth: 580,
|
||||
nzContent: ParterRebateManageMenAbnormalFeedbackComponent,
|
||||
nzComponentParams: { i: item },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe((res: any) => {
|
||||
if (res) {
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
this.st.load(1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user