解决冲突
This commit is contained in:
@ -1,13 +1,46 @@
|
|||||||
|
<!--
|
||||||
|
* @Description :
|
||||||
|
* @Version : 1.0
|
||||||
|
* @Author : Shiming
|
||||||
|
* @Date : 2022-02-24 20:09:49
|
||||||
|
* @LastEditors : Shiming
|
||||||
|
* @LastEditTime : 2022-02-24 20:14:21
|
||||||
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\list\\particulars.component.html
|
||||||
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
|
-->
|
||||||
|
<page-header-wrapper [title]="''"> </page-header-wrapper>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<!-- 搜索区 -->
|
<div nz-row nzGutter="8">
|
||||||
|
<!-- 查询字段小于或等于3个时,不显示伸缩按钮 -->
|
||||||
|
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
|
||||||
<sf
|
<sf
|
||||||
#sf
|
#sf
|
||||||
[ui]="ui"
|
|
||||||
[schema]="schema"
|
[schema]="schema"
|
||||||
|
[ui]="ui"
|
||||||
[mode]="'search'"
|
[mode]="'search'"
|
||||||
|
[disabled]="!sf?.valid"
|
||||||
|
[loading]="service.http.loading"
|
||||||
(formSubmit)="st?.load(1)"
|
(formSubmit)="st?.load(1)"
|
||||||
(formReset)="resetSF()"
|
(formReset)="resetSF()"
|
||||||
></sf>
|
></sf>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 查询字段大于3个时,根据展开状态调整布局 -->
|
||||||
|
<ng-container *ngIf="queryFieldCount > 4">
|
||||||
|
<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" [nzLoading]="service.http.loading" (click)="st?.load(1);">查询</button>
|
||||||
|
<button nz-button nzType="primary" [disabled]="service.http.loading" >导出</button>
|
||||||
|
<button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button>
|
||||||
|
<button nz-button nzType="link" (click)="expandToggle()">
|
||||||
|
{{ !_$expand ? '展开' : '收起' }}
|
||||||
|
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card>
|
<nz-card>
|
||||||
|
|||||||
@ -19,22 +19,41 @@ export class ParterRebateManageMentParticularsComponent implements OnInit {
|
|||||||
@ViewChild('sf', { static: false })
|
@ViewChild('sf', { static: false })
|
||||||
sf!: SFComponent;
|
sf!: SFComponent;
|
||||||
spuStatus = '1';
|
spuStatus = '1';
|
||||||
|
_$expand = false;
|
||||||
data=[{name1:1111}]
|
data = [{ name1: 1111 }];
|
||||||
constructor(
|
constructor(
|
||||||
public router: Router,
|
public router: Router,
|
||||||
public ar: ActivatedRoute,
|
public ar: ActivatedRoute,
|
||||||
public service: RebateManagementService,
|
public service: RebateManagementService,
|
||||||
private modalService: NzModalService,
|
private modalService: NzModalService,
|
||||||
public shipperservice: ShipperBaseService
|
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() {
|
get reqParams() {
|
||||||
return { ...this.sf?.value };
|
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() {
|
ngOnInit() {
|
||||||
this.initSF();
|
this.initSF();
|
||||||
@ -44,6 +63,7 @@ export class ParterRebateManageMentParticularsComponent implements OnInit {
|
|||||||
initSF() {
|
initSF() {
|
||||||
this.schema = {
|
this.schema = {
|
||||||
properties: {
|
properties: {
|
||||||
|
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||||
name: {
|
name: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '订单号'
|
title: '订单号'
|
||||||
@ -63,15 +83,20 @@ export class ParterRebateManageMentParticularsComponent implements OnInit {
|
|||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value,
|
_$expand: (value: boolean) => value
|
||||||
},
|
},
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
|
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
phone3: {
|
phone3: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '合伙人名称'
|
title: '合伙人名称',
|
||||||
|
ui: {
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deadlineTime: {
|
deadlineTime: {
|
||||||
title: '时间范围',
|
title: '时间范围',
|
||||||
@ -81,15 +106,16 @@ export class ParterRebateManageMentParticularsComponent implements OnInit {
|
|||||||
mode: 'range',
|
mode: 'range',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value,
|
_$expand: (value: boolean) => value
|
||||||
},
|
|
||||||
allowClear: true,
|
|
||||||
} as SFDateWidgetSchema,
|
|
||||||
},
|
},
|
||||||
|
allowClear: true
|
||||||
|
} as SFDateWidgetSchema
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.ui = {
|
this.ui = {
|
||||||
'*': {
|
'*': {
|
||||||
|
spanLabelFixed: 140,
|
||||||
grid: { span: 8, gutter: 4 }
|
grid: { span: 8, gutter: 4 }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -148,8 +174,7 @@ export class ParterRebateManageMentParticularsComponent implements OnInit {
|
|||||||
{
|
{
|
||||||
title: '返佣时间',
|
title: '返佣时间',
|
||||||
index: 'name1'
|
index: 'name1'
|
||||||
},
|
}
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,6 +185,4 @@ export class ParterRebateManageMentParticularsComponent implements OnInit {
|
|||||||
this.sf.reset();
|
this.sf.reset();
|
||||||
this.st.load(1);
|
this.st.load(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user