This commit is contained in:
wangshiming
2022-04-25 19:58:39 +08:00
parent f4743c180b
commit 636a725c08
3 changed files with 36 additions and 10 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-03-21 09:26:45
* @LastEditors : Shiming
* @LastEditTime : 2022-04-25 16:19:24
* @LastEditTime : 2022-04-25 19:56:41
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -23,8 +23,11 @@ import { ParterRebateManageMentAddPartnerListComponent } from '../add-partnerlis
})
export class ParterRebateManageMentAddComponent implements OnInit {
@ViewChild('table') table!: any;
titleText :string= '新增';
tabelData: any;
formData: any;
addStatus: boolean = false;
hiden: boolean = false;
configName: string = '';
partnerType: string = '';
remarke: string = '';
@ -88,8 +91,13 @@ export class ParterRebateManageMentAddComponent implements OnInit {
};
}
ngOnInit() {
console.log(this.ar.snapshot);
console.log(this.ar.snapshot.queryParams.id);
if(this.ar.snapshot?.queryParams?.id) {
this.titleText= '查看'
this.hiden= true
this.initData(this.ar.snapshot?.queryParams?.id);
}
this.addStatus = false;
this.initSF();
}
@ -156,6 +164,22 @@ export class ParterRebateManageMentAddComponent implements OnInit {
}
});
}
initData(id:string) {
this.service.request(this.service.$api_get_getPartnerRebateConfigInfo, {id: id}).subscribe((res: any) => {
console.log(res);
if(res) {
this.configName = res?.configName;
this.accountingRate = res?.accountingRate;
this.accountingRate = res?.accountingRate;
this.configType = res?.configType + '';
this.tabelData = res?.partnerRebateConfigLineVOList;
this.partnerType = res?.partnerType + '';
this.partnerPeopleList = res?.partnerListVOs;
this.priority = res?.priority + '';
this.formData = res?.ruleDescription;
}
})
}
changePartner(value: any) {
console.log(value);
if (value == '3') {