fix bug
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-02-24 20:09:49
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-28 19:46:23
|
||||
* @LastEditTime : 2022-03-29 10:47:02
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -26,17 +26,17 @@
|
||||
</sv>
|
||||
<sv col="1">
|
||||
|
||||
<app-rebate-table ></app-rebate-table>
|
||||
<app-rebate-table #table [(data)]='tabelData'></app-rebate-table>
|
||||
</sv>
|
||||
<sv-title>关联合伙人配置</sv-title>
|
||||
<sv label="合伙人选择">
|
||||
<!-- <nz-select ngModel="lucy" style="max-width: 400px; min-width: 200px;">
|
||||
<nz-option nzValue="jack" nzLabel="Jack"></nz-option>
|
||||
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
|
||||
</nz-select> -->
|
||||
<input *ngIf="peopleStatus" nz-input disabled style=" max-width: 200px;" placeholder="请添加" [(ngModel)]="partnerPeople" />
|
||||
<nz-select [(ngModel)]="partnerType" style="max-width: 400px; min-width: 200px;">
|
||||
<nz-option nzValue="1" nzLabel="全部合伙人"></nz-option>
|
||||
<nz-option nzValue="2" nzLabel="新注册合伙人"></nz-option>
|
||||
<nz-option nzValue="3" nzLabel="自定义合伙人"></nz-option>
|
||||
</nz-select>
|
||||
<span style="color: #0000FF;" (click)="add()">添加</span>
|
||||
<st *ngIf="!peopleStatus" #st [data]="partnerPeopleList" [columns]="columns"
|
||||
<st *ngIf="partnerPeopleList?.length > 0" #st [data]="partnerPeopleList" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' } }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100] }" [loading]="false"
|
||||
@ -44,22 +44,25 @@
|
||||
</st>
|
||||
</sv>
|
||||
<sv label="优先级" col="1">
|
||||
<nz-select ngModel="lucy" style="max-width: 400px; min-width: 200px;">
|
||||
<nz-option nzValue="jack" nzLabel="Jack"></nz-option>
|
||||
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
|
||||
<nz-select [(ngModel)]="priority" style="max-width: 400px; min-width: 200px;">
|
||||
<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>
|
||||
<nz-option nzValue=4 nzLabel="4">4</nz-option>
|
||||
<nz-option nzValue=5 nzLabel="5">5</nz-option>
|
||||
</nz-select>
|
||||
</sv>
|
||||
<sv label="规则说明" col="1">
|
||||
<sf #sf mode="edit" [schema]="schema1" [ui]="{ '*': { spanLabelFixed: 10, grid: { span: 16 }} }"
|
||||
button="none"> </sf>
|
||||
</sv>
|
||||
<sv label="规则说明" col="1">
|
||||
<textarea style="max-width: 400px; min-width: 200px;" rows="4" nz-input [(ngModel)]="inputValue"></textarea>
|
||||
<sv label="备注" col="1">
|
||||
<textarea style="max-width: 400px; min-width: 200px;" rows="4" nz-input [(ngModel)]="remarke"></textarea>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<div class="align-center" style="margin-top: 15px;">
|
||||
<button nz-button nzType="primary" (click)="goBack()">取消</button>
|
||||
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit()"
|
||||
<button nz-button nzType="primary" style="margin-left: 48px" (click)="save()"
|
||||
acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交</button
|
||||
>
|
||||
</div>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-03-21 09:26:45
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-28 19:47:56
|
||||
* @LastEditTime : 2022-03-29 10:53:39
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -24,13 +24,17 @@ import { inRange } from '@delon/util';
|
||||
templateUrl: './add.component.html'
|
||||
})
|
||||
export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
@ViewChild('table') table!: any;
|
||||
tabelData: any;
|
||||
configName: string = '';
|
||||
accountingRate: Number = 2;
|
||||
partnerPeople: any;
|
||||
partnerType: string = '';
|
||||
remarke: string = '';
|
||||
accountingRate: Number = 0;
|
||||
priority: string = '';
|
||||
partnerPeopleList: any;
|
||||
peopleStatus: boolean = true;
|
||||
configType = '1';
|
||||
precision = 2;
|
||||
partnerId :Array<string> =[];
|
||||
inputValue = '';
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ -67,7 +71,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
initSF(data?: any) {
|
||||
this.schema1 = {
|
||||
properties: {
|
||||
content: {
|
||||
ruleDescription: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
@ -77,7 +81,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
height: 650
|
||||
}
|
||||
},
|
||||
default: data?.agreementContent || ''
|
||||
// default: data?.agreementContent || ''
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -85,7 +89,6 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.initSF();
|
||||
}
|
||||
submit() {}
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
@ -103,15 +106,19 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe((res: any) => {
|
||||
this.partnerId = [];
|
||||
if (res) {
|
||||
console.log(Array.isArray(res));
|
||||
console.log(res);
|
||||
if(Array.isArray(res)) {
|
||||
this.partnerPeopleList = res;
|
||||
this.peopleStatus = false
|
||||
res.forEach((ele: any) => {
|
||||
this.partnerId.push(ele?.id);
|
||||
})
|
||||
} else {
|
||||
this.partnerPeople = res?.enterpriseName;
|
||||
}
|
||||
this.partnerPeopleList = [res];
|
||||
this.partnerId.push(res?.id);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -123,12 +130,19 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
accountingRate: this.accountingRate,
|
||||
configName: this.configName,
|
||||
configType: this.configType,
|
||||
rebateConfigLineDTO: {}
|
||||
rebateConfigLineDTO: this.table.data,
|
||||
priority: this.priority,// 优先级
|
||||
partnerId: this.partnerId.join(','),
|
||||
ruleDescription: this.sf.value.ruleDescription,
|
||||
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'])
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user