This commit is contained in:
wangshiming
2022-04-26 16:46:46 +08:00
parent 0c18408b3d
commit 9fd75c3dde
4 changed files with 29 additions and 49 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming
* @LastEditTime : 2022-04-26 15:50:41
* @LastEditTime : 2022-04-26 16:04:31
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -37,8 +37,11 @@
</sv>
<sv col="1">
<div style="width: 850px">
<app-rebate-table #table [(data)]="tabelData"></app-rebate-table>
<div style="width: 850px" *ngIf="configType == '1'">
<app-rebate-table #table [(data)]="tabelData" [type]="1"></app-rebate-table>
</div>
<div style="width: 850px" *ngIf="configType == '2'">
<app-rebate-table #table [(data)]="tabelData" [type]="2"></app-rebate-table>
</div>
</sv>

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-03-21 09:26:45
* @LastEditors : Shiming
* @LastEditTime : 2022-04-26 15:51:04
* @LastEditTime : 2022-04-26 16:37:57
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -25,6 +25,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
@ViewChild('table') table!: any;
titleText :string= '新增';
tabelData: any;
tabelType: any;
formData: any;
addStatus: boolean = false;
hiden: boolean = false;
@ -88,7 +89,6 @@ export class ParterRebateManageMentAddComponent implements OnInit {
text: '移除',
click: _record => this.delete(_record),
iif: ()=> {
console.log(this.hiden);
return !this.hiden
},
acl: { ability: ['AbnormalAppear-reply'] }
@ -98,7 +98,6 @@ export class ParterRebateManageMentAddComponent implements OnInit {
];
}
ngOnInit() {
console.log(this.ar.snapshot.queryParams.id);
if(this.ar.snapshot?.queryParams?.id) {
this.titleText= '查看'
this.hiden= true
@ -128,14 +127,11 @@ export class ParterRebateManageMentAddComponent implements OnInit {
this.partnerId = [];
if (res) {
if (Array.isArray(res)) {
console.log(res);
console.log(this.partnerPeopleList);
this.partnerPeopleList = this.partnerPeopleList.concat(res);
res.forEach((ele: any) => {
this.partnerId.push(ele?.id);
});
} else {
console.log(res);
this.partnerPeopleList = this.partnerPeopleList.concat(res);
this.partnerId.push(res?.id);
}
@ -148,9 +144,6 @@ export class ParterRebateManageMentAddComponent implements OnInit {
});
}
save() {
console.log(this.partnerId);
console.log(this.partnerId.join(','));
const params = {
accountingRate: this.accountingRate,
configName: this.configName,
@ -162,10 +155,8 @@ export class ParterRebateManageMentAddComponent implements OnInit {
remarke: this.remarke,
partnerType: this.partnerType
};
console.log(params);
this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => {
if (res) {
console.log(res);
this.service.msgSrv.success('新增成功!');
this.router.navigate(['/partner/rebate/setting']);
}
@ -173,7 +164,6 @@ 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;
@ -189,7 +179,6 @@ export class ParterRebateManageMentAddComponent implements OnInit {
})
}
changePartner(value: any) {
console.log(value);
if (value == '3') {
this.addStatus = true;
} else {