This commit is contained in:
wangshiming
2022-04-29 16:23:23 +08:00
parent 23d6ad6150
commit 1f9af1e116
12 changed files with 75 additions and 47 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-03-21 09:26:45
* @LastEditors : Shiming
* @LastEditTime : 2022-04-27 14:14:32
* @LastEditTime : 2022-04-29 16:23:18
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -143,29 +143,29 @@ export class ParterRebateManageMentAddComponent implements OnInit {
});
}
save() {
// if(!this.configName) {
// this.service.msgSrv.warning('请输入配置名称!');
// return
// }
// if(!this.accountingRate) {
// this.service.msgSrv.warning('请输入固定结算费率!');
// return
// }
// if(!this.partnerType) {
// this.service.msgSrv.warning('请选择合伙人范围!');
// return
// }
// if(this.partnerType == '3' && this.partnerPeopleList?.length == 0) {
// this.service.msgSrv.warning('请选择合伙人!');
// return
// }
// let real = false;
// this.table.data.forEach((element: any) => {
// if (element.startAmount > element.endAmount) {
// real = true;
// return;
// }
// });
if(!this.configName) {
this.service.msgSrv.warning('请输入配置名称!');
return
}
if(!this.accountingRate) {
this.service.msgSrv.warning('请输入固定结算费率!');
return
}
if(!this.partnerType) {
this.service.msgSrv.warning('请选择合伙人范围!');
return
}
if(this.partnerType == '3' && this.partnerPeopleList?.length == 0) {
this.service.msgSrv.warning('请选择合伙人!');
return
}
let real = false;
this.table.data.forEach((element: any) => {
if (element.startAmount > element.endAmount) {
real = true;
return;
}
});
// if (real) {
// this.service.msgSrv.warning('初始业务量不能超过到达业务量!');
// return;
@ -184,12 +184,12 @@ export class ParterRebateManageMentAddComponent implements OnInit {
};
console.log(params);
// this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => {
// if (res) {
// this.service.msgSrv.success('新增成功!');
// this.router.navigate(['/partner/rebate/setting']);
// }
// });
this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => {
if (res) {
this.service.msgSrv.success('新增成功!');
this.router.navigate(['/partner/rebate/setting']);
}
});
}
initData(id: string) {
this.service.request(this.service.$api_get_getPartnerRebateConfigInfo, { id: id }).subscribe((res: any) => {

View File

@ -23,7 +23,7 @@
></sf>
<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 nzType="primary" [disabled]="service.http.loading" acl [acl-ability]="['VEHICLE-LIST-search']">导出</button>
<button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button>
</div>
</div>
@ -34,7 +34,7 @@
<!-- +新增 -->
<div class="d-flex justify-content-end mb-sm">
<div>
<button nz-button nzType="primary" (click)="configAction()">新增</button>
<button nz-button nzType="primary" (click)="configAction()" acl [acl-ability]="['VEHICLE-LIST-search']">新增</button>
</div>
</div>
<st

View File

@ -125,15 +125,18 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
buttons: [
{
text: '查看',
acl: { ability: ['VEHICLE-LIST-view'] },
click: _record => this.configAction(_record),
},
{
text: '禁用',
acl: { ability: ['VEHICLE-LIST-view'] },
iif: (_record) =>{ return _record.stateLocked == true && (_record.partnerType == 3 || _record.partnerType == 2)},
click: _record => this.viewEvaluate(_record),
},
{
text: '启用',
acl: { ability: ['VEHICLE-LIST-view'] },
iif: (_record) =>{ return _record.stateLocked == false},
click: _record => this.viewEvaluate(_record),
},