fix bug
This commit is contained in:
@ -360,7 +360,7 @@
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" nzWidth="1000px" (nzOnCancel)="handleCancel()">
|
||||
<ng-container *nzModalContent>
|
||||
<div *ngIf="!modalcontent">暂无附件信息</div>
|
||||
<div [innerHTML]="modalcontent"></div>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-06 20:20:26
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-28 20:30:13
|
||||
* @LastEditTime : 2022-03-29 11:09:00
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -247,7 +247,7 @@
|
||||
</nz-tabset>
|
||||
</nz-card>
|
||||
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" nzWidth="1000px" (nzOnCancel)="handleCancel()">
|
||||
<ng-container *nzModalContent>
|
||||
<div *ngIf="!modalcontent">暂无附件信息</div>
|
||||
<div [innerHTML]="modalcontent"></div>
|
||||
|
||||
@ -333,7 +333,7 @@
|
||||
</ng-template>
|
||||
</div>
|
||||
</nz-card>
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||
<nz-modal [(nzVisible)]="isVisible" nzWidth="1000px" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||
<ng-container *nzModalContent>
|
||||
<div *ngIf="!modalcontent">暂无附件信息</div>
|
||||
<div [innerHTML]="modalcontent"></div>
|
||||
|
||||
@ -230,7 +230,7 @@
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||
<nz-modal [(nzVisible)]="isVisible" nzWidth="1000px" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||
<ng-container *nzModalContent>
|
||||
<div *ngIf="!modalcontent">暂无附件信息</div>
|
||||
<div [innerHTML]="modalcontent"></div>
|
||||
|
||||
@ -1,6 +1,14 @@
|
||||
import { Component, OnInit, ViewChild, Type } from '@angular/core';
|
||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFRadioWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import {
|
||||
SFComponent,
|
||||
SFDateWidgetSchema,
|
||||
SFRadioWidgetSchema,
|
||||
SFSchema,
|
||||
SFSchemaEnum,
|
||||
SFSelectWidgetSchema,
|
||||
SFUISchema
|
||||
} from '@delon/form';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalService, NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { of } from 'rxjs';
|
||||
@ -28,8 +36,6 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
|
||||
editId = false;
|
||||
selectedIndex = 0;
|
||||
|
||||
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' },
|
||||
{
|
||||
@ -42,20 +48,22 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
|
||||
{ title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 },
|
||||
{ title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } },
|
||||
{
|
||||
title: '操作', width: '90px', fixed: 'right',
|
||||
title: '操作',
|
||||
width: '90px',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
text: '添加',
|
||||
click: _record => this.add(_record),
|
||||
acl: { ability: ['AbnormalAppear-reply'] }
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
}
|
||||
];
|
||||
|
||||
get reqParams() {
|
||||
// signStatus固定传20 代表签约完成
|
||||
let params: any = { ...this.sf?.value,signStatus: 20 };
|
||||
// signStatus固定传20 代表签约完成 signStatus: 20
|
||||
let params: any = { ...this.sf?.value, };
|
||||
return params;
|
||||
}
|
||||
|
||||
@ -67,12 +75,11 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
|
||||
public service: RebateManagementService,
|
||||
public shipperSrv: ShipperBaseService,
|
||||
private modal: NzModalService,
|
||||
private modals: NzModalRef,
|
||||
|
||||
) { }
|
||||
private modals: NzModalRef
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF()
|
||||
this.initSF();
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
@ -97,19 +104,19 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||
}
|
||||
|
||||
search() {
|
||||
this.st?.load(1)
|
||||
this.st?.load(1);
|
||||
}
|
||||
|
||||
selectedIndexChange(event: any) {
|
||||
if (this.selectedIndex === 0) {
|
||||
this.st?.load(1)
|
||||
this.st?.load(1);
|
||||
}
|
||||
}
|
||||
/**
|
||||
@ -121,8 +128,7 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
|
||||
// 回复操作
|
||||
add(item: any) {
|
||||
console.log(item);
|
||||
this.modals.destroy(item)
|
||||
|
||||
this.modals.destroy(item);
|
||||
}
|
||||
// 批量回复操作
|
||||
batchReply() {
|
||||
@ -130,6 +136,6 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
|
||||
// this.service.msgSrv.warning('请勾选数据!')
|
||||
// return;
|
||||
// }
|
||||
this.modals.destroy(this.selectedRows)
|
||||
this.modals.destroy(this.selectedRows);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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,14 +106,18 @@ 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'])
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-02-24 20:09:49
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-22 14:42:27
|
||||
* @LastEditTime : 2022-03-29 10:51:52
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\rebate-setting.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -47,8 +47,17 @@
|
||||
[loadingDelay]="500"
|
||||
[loading]="service.http.loading"
|
||||
>
|
||||
<ng-template st-row='name44' let-item let-index='index'>
|
||||
<div style="color: #f59a23;" (click)="feedback()">1223</div>
|
||||
<ng-template st-row='configType' let-item let-index='index'>
|
||||
<div *ngIf="item.configType == 1">按全部等级配置</div>
|
||||
<div *ngIf="item.configType == 2">按不同等级配置</div>
|
||||
</ng-template>
|
||||
<ng-template st-row='partnerType' let-item let-index='index'>
|
||||
<div *ngIf="item.partnerType == 1">全部合伙人</div>
|
||||
<div *ngIf="item.partnerType == 2">新注册合伙人</div>
|
||||
<div *ngIf="item.partnerType == 3">自定义合伙人</div>
|
||||
</ng-template>
|
||||
<ng-template st-row='stateLocked' let-item let-index='index'>
|
||||
<div >{{item?.stateLocked ? '启用' : '禁用'}}</div>
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
|
||||
@ -69,12 +69,12 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
month: {
|
||||
type: 'string',
|
||||
title: '时间月份',
|
||||
format: 'month',
|
||||
title: '配置名称',
|
||||
format: 'configName',
|
||||
},
|
||||
partnerId: {
|
||||
stateLocked: {
|
||||
type: 'string',
|
||||
title: '合伙人名称'
|
||||
title: '状态'
|
||||
},
|
||||
}
|
||||
};
|
||||
@ -89,12 +89,12 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
||||
initST() {
|
||||
this.columns = [
|
||||
{
|
||||
title: '月份',
|
||||
index: '配置名称'
|
||||
title: '配置名称',
|
||||
index: 'configName'
|
||||
},
|
||||
{
|
||||
title: '配置类型',
|
||||
index: 'configType'
|
||||
render: 'configType'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
@ -102,7 +102,7 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
title: '关联合伙人范围',
|
||||
index: 'partnerType'
|
||||
render: 'partnerType'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@ -118,7 +118,7 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
index: 'stateLocked'
|
||||
render: 'stateLocked'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@ -132,6 +132,12 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
text: '禁用',
|
||||
iif: (_record) =>{ return _record.stateLocked == true},
|
||||
click: _record => this.viewEvaluate(_record),
|
||||
},
|
||||
{
|
||||
text: '启用',
|
||||
iif: (_record) =>{ return _record.stateLocked == false},
|
||||
click: _record => this.viewEvaluate(_record),
|
||||
},
|
||||
]
|
||||
@ -142,10 +148,29 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
||||
*禁用
|
||||
*/
|
||||
viewEvaluate(item: any) {
|
||||
console.log(item.stateLocked);
|
||||
let title = ''
|
||||
let stateLocked: boolean;
|
||||
if(item.stateLocked) {
|
||||
title = '是否禁用该配置?'
|
||||
stateLocked = false
|
||||
} else {
|
||||
title = '是否启用该配置?'
|
||||
stateLocked = true
|
||||
}
|
||||
this.modal.confirm({
|
||||
nzTitle: '是否禁用该配置?',
|
||||
nzTitle: title,
|
||||
nzOnOk: () => {
|
||||
|
||||
const params = {
|
||||
id: item?.id,
|
||||
stateLocked: stateLocked,
|
||||
}
|
||||
this.service.request(this.service.$api_set_updateRebateConfig,params).subscribe((res: any) => {
|
||||
if(res) {
|
||||
this.service.msgSrv.success('设置成功!')
|
||||
this.st.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -21,6 +21,8 @@ export class RebateManagementService extends BaseService {
|
||||
public $api_get_rebateConfig = '/api/mdc/rebateConfig/list/page';
|
||||
// 保存返佣配置表
|
||||
public $api_save_rebateConfig = '/api/mdc/rebateConfig/save';
|
||||
// 启用/禁用返佣配置
|
||||
public $api_set_updateRebateConfig = '/api/mdc/rebateConfig/updateRebateConfig';
|
||||
// 查询合伙人信息-分页
|
||||
public $api_get_partner_page = '/api/mdc/partner/list/page';
|
||||
constructor(public injector: Injector) {
|
||||
|
||||
@ -247,7 +247,7 @@
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||
<nz-modal [(nzVisible)]="isVisible" nzWidth="1000px" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||
<ng-container *nzModalContent>
|
||||
<div *ngIf="!modalcontent">暂无附件信息</div>
|
||||
<div [innerHTML]="modalcontent"></div>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:31:52
|
||||
* @LastEditTime : 2022-03-24 13:49:56
|
||||
* @LastEditTime : 2022-03-29 11:10:08
|
||||
* @LastEditors : Shiming
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\vehicle-detail\\vehicle-detail.component.html
|
||||
@ -227,7 +227,7 @@
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||
<nz-modal [(nzVisible)]="isVisible" nzWidth="1000px" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||
<ng-container *nzModalContent>
|
||||
<div *ngIf="!modalcontent">暂无附件信息</div>
|
||||
<div [innerHTML]="modalcontent"></div>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-25 20:18:52
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-28 20:26:30
|
||||
* @LastEditTime : 2022-03-29 10:34:14
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -37,9 +37,8 @@
|
||||
</td>
|
||||
<td nzWidth="220px" nzAlign="center" >
|
||||
<div >
|
||||
<nz-select ngModel="gradeConfigId">
|
||||
<nz-option nzValue="jack" nzLabel="Jack154654564654"></nz-option>
|
||||
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option>
|
||||
<nz-select style="min-width: 150px;" [(ngModel)]="item.gradeConfigId" >
|
||||
<nz-option *ngFor="let item of grage" [nzValue]="item.id" [nzLabel]="item.gradeName"></nz-option>
|
||||
</nz-select>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@ -1,16 +1,30 @@
|
||||
import { debounceTime } from 'rxjs/operators';
|
||||
import { Subject } from 'rxjs';
|
||||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { BaseService } from '@shared';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
|
||||
import { EventEmitter} from '@angular/core'
|
||||
@Component({
|
||||
selector: 'app-rebate-table',
|
||||
templateUrl: './rebate-table.component.html',
|
||||
styleUrls: ['./rebate-table.component.less']
|
||||
})
|
||||
export class RebateTableComponent implements OnInit {
|
||||
data: any[] = [
|
||||
@Input() data: any =[];
|
||||
@Output()
|
||||
private dataChange: EventEmitter<any> = new EventEmitter();
|
||||
emit() {
|
||||
this.dataChange.emit(this.data)
|
||||
}
|
||||
headers: any[] = [];
|
||||
gradeConfigId: string ='';
|
||||
grage: any[] = [];
|
||||
formatterDollar = (value: number): string => `${value}`;
|
||||
changeSub = new Subject<string>();
|
||||
constructor(public service: BaseService, private cdr: ChangeDetectorRef) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.data = [
|
||||
{
|
||||
gradeConfigId: '',
|
||||
startAmount: 0,
|
||||
@ -18,24 +32,18 @@ export class RebateTableComponent implements OnInit {
|
||||
managementFeeRatio: 0,
|
||||
}
|
||||
];
|
||||
headers: any[] = [];
|
||||
formatterDollar = (value: number): string => `${value}`;
|
||||
changeSub = new Subject<string>();
|
||||
constructor(public service: BaseService, private cdr: ChangeDetectorRef) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.loadData();
|
||||
this.changeendAmountAction();
|
||||
}
|
||||
|
||||
loadData() {
|
||||
// this.service.request('/api/mdc/cuc/insuranceConfig/list').subscribe(res => {
|
||||
// if (res) {
|
||||
// console.log(res);
|
||||
// this.data = res;
|
||||
// this.cdr.detectChanges();
|
||||
// }
|
||||
// });
|
||||
this.service.request('/api/mdc/partnerGradeConfig/listPartnerGradeConfig').subscribe(res => {
|
||||
if (res) {
|
||||
console.log(res);
|
||||
this.grage = res;
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
});
|
||||
// this.service.request('/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys', [
|
||||
// "rebate.config.minrebatePrice"
|
||||
// ]).subscribe(res => {
|
||||
@ -66,12 +74,13 @@ export class RebateTableComponent implements OnInit {
|
||||
const num = Number(paras[0]);
|
||||
const i = Number(paras[1]);
|
||||
|
||||
if (num <= this.data[i].startAmount) {
|
||||
if (num <= this.data[i]?.startAmount) {
|
||||
console.log(this.data[i].endAmount);
|
||||
this.data[i].endAmount = null;
|
||||
setTimeout(() => {
|
||||
this.data[i].endAmount = this.data[i].startAmount + 1 ;
|
||||
this.data[i].endAmount = this.data[i]?.startAmount + 1 ;
|
||||
}, 0);
|
||||
this.changeNextstartAmount(this.data[i].startAmount + 1, i + 1);
|
||||
this.changeNextstartAmount(this.data[i]?.startAmount + 1, i + 1);
|
||||
return;
|
||||
}
|
||||
this.data[i].endAmount = num;
|
||||
|
||||
Reference in New Issue
Block a user