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,11 +4,11 @@
* @Author : Shiming
* @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming
* @LastEditTime : 2022-04-24 13:42:10
* @LastEditTime : 2022-04-25 19:58:03
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'新增'"> </page-header-wrapper>
<page-header-wrapper [title]="titleText"> </page-header-wrapper>
<nz-card>
<!-- 数据列表 -->
<sv-container col="1">
@ -51,7 +51,7 @@
</sv>
<sv label="优先级" col="1">
<nz-select [(ngModel)]="priority" style="max-width: 400px; min-width: 200px;">
<nz-select [(ngModel)]="priority" style="max-width: 400px; min-width: 200px;margin-left: 28px;">
<nz-option nzValue=1 nzLabel="1">1</nz-option>
<nz-option nzValue=2 nzLabel="2">2</nz-option>
<nz-option nzValue=3 nzLabel="3">3</nz-option>
@ -61,17 +61,17 @@
</sv>
<sv label="规则说明" col="1">
<sf #sf mode="edit" [schema]="schema1" [ui]="{ '*': { spanLabelFixed: 10, grid: { span: 12 }} }"
<sf #sf mode="edit" [formData]="formData" [schema]="schema1" [ui]="{ '*': { spanLabelFixed: 10, grid: { span: 12 }} }"
button="none"> </sf>
</sv>
<sv label="备注" col="1" style="margin-top: 16px;">
<textarea style="max-width: 400px; min-width: 200px;" rows="4" nz-input [(ngModel)]="remarke"></textarea>
<textarea style="max-width: 400px; min-width: 200px;margin-left: 40px;" rows="4" nz-input [(ngModel)]="remarke"></textarea>
</sv>
</sv-container>
<div class="align-center" style="margin-top: 15px;">
<div class="align-center" style="margin-top: 15px;" *ngIf="!hiden">
<button nz-button nzType="primary" (click)="goBack()">取消</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="save()"
acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交</button

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') {

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-03-10 11:19:00
* @LastEditors : Shiming
* @LastEditTime : 2022-03-29 11:26:38
* @LastEditTime : 2022-04-25 19:23:25
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\services\\rebate-management.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -27,6 +27,8 @@ export class RebateManagementService extends BaseService {
// 运营端查询合伙人返佣
public $api_get_getIncomeByBillpage = '/api/bpc/partnerIncomeHead/getIncomeByBillpage';
// 获取返佣模板信息
public $api_get_getPartnerRebateConfigInfo = '/api/mdc/rebateConfig/getPartnerRebateConfigInfo';
  // 查询合伙人信息-分页
public $api_get_partner_page = '/api/mdc/partner/list/page';
constructor(public injector: Injector) {