This commit is contained in:
wangshiming
2022-03-29 11:10:12 +08:00
parent 4439f94956
commit ed90f4090a
14 changed files with 159 additions and 92 deletions

View File

@ -360,7 +360,7 @@
</div> </div>
</nz-card> </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> <ng-container *nzModalContent>
<div *ngIf="!modalcontent">暂无附件信息</div> <div *ngIf="!modalcontent">暂无附件信息</div>
<div [innerHTML]="modalcontent"></div> <div [innerHTML]="modalcontent"></div>

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-06 20:20:26 * @Date : 2021-12-06 20:20:26
* @LastEditors : Shiming * @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 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -247,7 +247,7 @@
</nz-tabset> </nz-tabset>
</nz-card> </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> <ng-container *nzModalContent>
<div *ngIf="!modalcontent">暂无附件信息</div> <div *ngIf="!modalcontent">暂无附件信息</div>
<div [innerHTML]="modalcontent"></div> <div [innerHTML]="modalcontent"></div>

View File

@ -333,7 +333,7 @@
</ng-template> </ng-template>
</div> </div>
</nz-card> </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> <ng-container *nzModalContent>
<div *ngIf="!modalcontent">暂无附件信息</div> <div *ngIf="!modalcontent">暂无附件信息</div>
<div [innerHTML]="modalcontent"></div> <div [innerHTML]="modalcontent"></div>

View File

@ -230,7 +230,7 @@
</div> </div>
</nz-card> </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> <ng-container *nzModalContent>
<div *ngIf="!modalcontent">暂无附件信息</div> <div *ngIf="!modalcontent">暂无附件信息</div>
<div [innerHTML]="modalcontent"></div> <div [innerHTML]="modalcontent"></div>

View File

@ -1,6 +1,14 @@
import { Component, OnInit, ViewChild, Type } from '@angular/core'; import { Component, OnInit, ViewChild, Type } from '@angular/core';
import { STComponent, STColumn, STChange } from '@delon/abc/st'; 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 { ShipperBaseService } from '@shared';
import { NzModalService, NzModalRef } from 'ng-zorro-antd/modal'; import { NzModalService, NzModalRef } from 'ng-zorro-antd/modal';
import { of } from 'rxjs'; import { of } from 'rxjs';
@ -28,8 +36,6 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
editId = false; editId = false;
selectedIndex = 0; selectedIndex = 0;
columns: STColumn[] = [ columns: STColumn[] = [
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' }, { 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: 'contactMobile', className: 'text-center', width: 150 },
{ title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } },
{ {
title: '操作', width: '90px', fixed: 'right', title: '操作',
width: '90px',
fixed: 'right',
buttons: [ buttons: [
{ {
text: '添加', text: '添加',
click: _record => this.add(_record), click: _record => this.add(_record),
acl: { ability: ['AbnormalAppear-reply'] } acl: { ability: ['AbnormalAppear-reply'] }
}, }
] ]
}, }
]; ];
get reqParams() { get reqParams() {
// signStatus固定传20 代表签约完成 // signStatus固定传20 代表签约完成 signStatus: 20
let params: any = { ...this.sf?.value,signStatus: 20 }; let params: any = { ...this.sf?.value, };
return params; return params;
} }
@ -67,12 +75,11 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
public service: RebateManagementService, public service: RebateManagementService,
public shipperSrv: ShipperBaseService, public shipperSrv: ShipperBaseService,
private modal: NzModalService, private modal: NzModalService,
private modals: NzModalRef, private modals: NzModalRef
) {}
) { }
ngOnInit(): void { ngOnInit(): void {
this.initSF() this.initSF();
} }
initSF() { initSF() {
this.schema = { this.schema = {
@ -97,19 +104,19 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
} }
}, },
default: '' default: ''
},
} }
} }
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
} }
search() { search() {
this.st?.load(1) this.st?.load(1);
} }
selectedIndexChange(event: any) { selectedIndexChange(event: any) {
if (this.selectedIndex === 0) { if (this.selectedIndex === 0) {
this.st?.load(1) this.st?.load(1);
} }
} }
/** /**
@ -121,8 +128,7 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
// 回复操作 // 回复操作
add(item: any) { add(item: any) {
console.log(item); console.log(item);
this.modals.destroy(item) this.modals.destroy(item);
} }
// 批量回复操作 // 批量回复操作
batchReply() { batchReply() {
@ -130,6 +136,6 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit {
// this.service.msgSrv.warning('请勾选数据!') // this.service.msgSrv.warning('请勾选数据!')
// return; // return;
// } // }
this.modals.destroy(this.selectedRows) this.modals.destroy(this.selectedRows);
} }
} }

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-02-24 20:09:49 * @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming * @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 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -26,17 +26,17 @@
</sv> </sv>
<sv col="1"> <sv col="1">
&nbsp;&nbsp; &nbsp;&nbsp;
<app-rebate-table ></app-rebate-table> <app-rebate-table #table [(data)]='tabelData'></app-rebate-table>
</sv> </sv>
<sv-title>关联合伙人配置</sv-title> <sv-title>关联合伙人配置</sv-title>
&nbsp;&nbsp;<sv label="合伙人选择"> &nbsp;&nbsp;<sv label="合伙人选择">
<!-- <nz-select ngModel="lucy" style="max-width: 400px; min-width: 200px;"> <nz-select [(ngModel)]="partnerType" style="max-width: 400px; min-width: 200px;">
<nz-option nzValue="jack" nzLabel="Jack"></nz-option> <nz-option nzValue="1" nzLabel="全部合伙人"></nz-option>
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option> <nz-option nzValue="2" nzLabel="新注册合伙人"></nz-option>
</nz-select> --> <nz-option nzValue="3" nzLabel="自定义合伙人"></nz-option>
<input *ngIf="peopleStatus" nz-input disabled style=" max-width: 200px;" placeholder="请添加" [(ngModel)]="partnerPeople" /> </nz-select>
&nbsp;&nbsp;<span style="color: #0000FF;" (click)="add()">添加</span> &nbsp;&nbsp;<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' } }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' } }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100] }" [loading]="false" [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100] }" [loading]="false"
@ -44,22 +44,25 @@
</st> </st>
</sv> </sv>
&nbsp;&nbsp;<sv label="优先级" col="1"> &nbsp;&nbsp;<sv label="优先级" col="1">
<nz-select ngModel="lucy" style="max-width: 400px; min-width: 200px;"> <nz-select [(ngModel)]="priority" style="max-width: 400px; min-width: 200px;">
<nz-option nzValue="jack" nzLabel="Jack"></nz-option> <nz-option nzValue=1 nzLabel="1">1</nz-option>
<nz-option nzValue="lucy" nzLabel="Lucy"></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> </nz-select>
</sv> </sv>
&nbsp;&nbsp;<sv label="规则说明" col="1"> &nbsp;&nbsp;<sv label="规则说明" col="1">
<sf #sf mode="edit" [schema]="schema1" [ui]="{ '*': { spanLabelFixed: 10, grid: { span: 16 }} }" <sf #sf mode="edit" [schema]="schema1" [ui]="{ '*': { spanLabelFixed: 10, grid: { span: 16 }} }"
button="none"> </sf> button="none"> </sf>
</sv> </sv>
&nbsp;&nbsp;<sv label="规则说明" col="1"> &nbsp;&nbsp;<sv label="备注" col="1">
<textarea style="max-width: 400px; min-width: 200px;" rows="4" nz-input [(ngModel)]="inputValue"></textarea> <textarea style="max-width: 400px; min-width: 200px;" rows="4" nz-input [(ngModel)]="remarke"></textarea>
</sv> </sv>
</sv-container> </sv-container>
<div class="align-center" style="margin-top: 15px;"> <div class="align-center" style="margin-top: 15px;">
<button nz-button nzType="primary" (click)="goBack()">取消</button> <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 acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交</button
> >
</div> </div>

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-03-21 09:26:45 * @Date : 2022-03-21 09:26:45
* @LastEditors : Shiming * @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 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -24,13 +24,17 @@ import { inRange } from '@delon/util';
templateUrl: './add.component.html' templateUrl: './add.component.html'
}) })
export class ParterRebateManageMentAddComponent implements OnInit { export class ParterRebateManageMentAddComponent implements OnInit {
@ViewChild('table') table!: any;
tabelData: any;
configName: string = ''; configName: string = '';
accountingRate: Number = 2; partnerType: string = '';
partnerPeople: any; remarke: string = '';
accountingRate: Number = 0;
priority: string = '';
partnerPeopleList: any; partnerPeopleList: any;
peopleStatus: boolean = true;
configType = '1'; configType = '1';
precision = 2; precision = 2;
partnerId :Array<string> =[];
inputValue = ''; inputValue = '';
@ViewChild('st', { static: true }) @ViewChild('st', { static: true })
st!: STComponent; st!: STComponent;
@ -67,7 +71,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
initSF(data?: any) { initSF(data?: any) {
this.schema1 = { this.schema1 = {
properties: { properties: {
content: { ruleDescription: {
type: 'string', type: 'string',
title: '', title: '',
ui: { ui: {
@ -77,7 +81,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
height: 650 height: 650
} }
}, },
default: data?.agreementContent || '' // default: data?.agreementContent || ''
} }
} }
}; };
@ -85,7 +89,6 @@ export class ParterRebateManageMentAddComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.initSF(); this.initSF();
} }
submit() {}
goBack() { goBack() {
window.history.go(-1); window.history.go(-1);
} }
@ -103,15 +106,19 @@ export class ParterRebateManageMentAddComponent implements OnInit {
nzFooter: null nzFooter: null
}); });
modalRef.afterClose.subscribe((res: any) => { modalRef.afterClose.subscribe((res: any) => {
this.partnerId = [];
if (res) { if (res) {
console.log(Array.isArray(res)); console.log(Array.isArray(res));
console.log(res); console.log(res);
if(Array.isArray(res)) { if(Array.isArray(res)) {
this.partnerPeopleList = res; this.partnerPeopleList = res;
this.peopleStatus = false res.forEach((ele: any) => {
this.partnerId.push(ele?.id);
})
} else { } 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, accountingRate: this.accountingRate,
configName: this.configName, configName: this.configName,
configType: this.configType, 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) => { this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => {
if(res) { if(res) {
console.log(res); console.log(res);
this.service.msgSrv.success('新增成功!')
this.router.navigate(['/partner/rebate/setting'])
} }
}) })
} }

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-02-24 20:09:49 * @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming * @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 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\rebate-setting.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -47,8 +47,17 @@
[loadingDelay]="500" [loadingDelay]="500"
[loading]="service.http.loading" [loading]="service.http.loading"
> >
<ng-template st-row='name44' let-item let-index='index'> <ng-template st-row='configType' let-item let-index='index'>
<div style="color: #f59a23;" (click)="feedback()">1223</div> <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> </ng-template>
</st> </st>
</nz-card> </nz-card>

View File

@ -69,12 +69,12 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
_$expand: { type: 'boolean', ui: { hidden: true } }, _$expand: { type: 'boolean', ui: { hidden: true } },
month: { month: {
type: 'string', type: 'string',
title: '时间月份', title: '配置名称',
format: 'month', format: 'configName',
}, },
partnerId: { stateLocked: {
type: 'string', type: 'string',
title: '合伙人名称' title: '状态'
}, },
} }
}; };
@ -89,12 +89,12 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
initST() { initST() {
this.columns = [ this.columns = [
{ {
title: '月份', title: '配置名称',
index: '配置名称' index: 'configName'
}, },
{ {
title: '配置类型', title: '配置类型',
index: 'configType' render: 'configType'
}, },
{ {
title: '备注', title: '备注',
@ -102,7 +102,7 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
}, },
{ {
title: '关联合伙人范围', title: '关联合伙人范围',
index: 'partnerType' render: 'partnerType'
}, },
{ {
title: '创建时间', title: '创建时间',
@ -118,7 +118,7 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
}, },
{ {
title: '状态', title: '状态',
index: 'stateLocked' render: 'stateLocked'
}, },
{ {
title: '操作', title: '操作',
@ -132,6 +132,12 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
}, },
{ {
text: '禁用', text: '禁用',
iif: (_record) =>{ return _record.stateLocked == true},
click: _record => this.viewEvaluate(_record),
},
{
text: '启用',
iif: (_record) =>{ return _record.stateLocked == false},
click: _record => this.viewEvaluate(_record), click: _record => this.viewEvaluate(_record),
}, },
] ]
@ -142,10 +148,29 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
*禁用 *禁用
*/ */
viewEvaluate(item: any) { 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({ this.modal.confirm({
nzTitle: '是否禁用该配置?', nzTitle: title,
nzOnOk: () => { 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();
}
})
} }
}); });
} }

View File

@ -21,6 +21,8 @@ export class RebateManagementService extends BaseService {
public $api_get_rebateConfig = '/api/mdc/rebateConfig/list/page'; public $api_get_rebateConfig = '/api/mdc/rebateConfig/list/page';
// 保存返佣配置表 // 保存返佣配置表
public $api_save_rebateConfig = '/api/mdc/rebateConfig/save'; 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'; public $api_get_partner_page = '/api/mdc/partner/list/page';
constructor(public injector: Injector) { constructor(public injector: Injector) {

View File

@ -247,7 +247,7 @@
</div> </div>
</nz-card> </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> <ng-container *nzModalContent>
<div *ngIf="!modalcontent">暂无附件信息</div> <div *ngIf="!modalcontent">暂无附件信息</div>
<div [innerHTML]="modalcontent"></div> <div [innerHTML]="modalcontent"></div>

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-03 15:31:52 * @Date: 2021-12-03 15:31:52
* @LastEditTime : 2022-03-24 13:49:56 * @LastEditTime : 2022-03-29 11:10:08
* @LastEditors : Shiming * @LastEditors : Shiming
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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 * @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\vehicle-detail\\vehicle-detail.component.html
@ -227,7 +227,7 @@
</div> </div>
</nz-card> </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> <ng-container *nzModalContent>
<div *ngIf="!modalcontent">暂无附件信息</div> <div *ngIf="!modalcontent">暂无附件信息</div>
<div [innerHTML]="modalcontent"></div> <div [innerHTML]="modalcontent"></div>

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-25 20:18:52 * @Date : 2022-01-25 20:18:52
* @LastEditors : Shiming * @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 * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -37,10 +37,9 @@
</td> </td>
<td nzWidth="220px" nzAlign="center" > <td nzWidth="220px" nzAlign="center" >
<div > <div >
<nz-select ngModel="gradeConfigId"> <nz-select style="min-width: 150px;" [(ngModel)]="item.gradeConfigId" >
<nz-option nzValue="jack" nzLabel="Jack154654564654"></nz-option> <nz-option *ngFor="let item of grage" [nzValue]="item.id" [nzLabel]="item.gradeName"></nz-option>
<nz-option nzValue="lucy" nzLabel="Lucy"></nz-option> </nz-select>
</nz-select>
</div> </div>
</td> </td>
<td nzWidth="220px" nzAlign="center" > <td nzWidth="220px" nzAlign="center" >

View File

@ -1,41 +1,49 @@
import { debounceTime } from 'rxjs/operators'; import { debounceTime } from 'rxjs/operators';
import { Subject } from 'rxjs'; 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 { BaseService } from '@shared';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { EventEmitter} from '@angular/core'
@Component({ @Component({
selector: 'app-rebate-table', selector: 'app-rebate-table',
templateUrl: './rebate-table.component.html', templateUrl: './rebate-table.component.html',
styleUrls: ['./rebate-table.component.less'] styleUrls: ['./rebate-table.component.less']
}) })
export class RebateTableComponent implements OnInit { export class RebateTableComponent implements OnInit {
data: any[] = [ @Input() data: any =[];
{ @Output()
gradeConfigId: '', private dataChange: EventEmitter<any> = new EventEmitter();
startAmount: 0, emit() {
endAmount: 0, this.dataChange.emit(this.data)
managementFeeRatio: 0, }
}
];
headers: any[] = []; headers: any[] = [];
gradeConfigId: string ='';
grage: any[] = [];
formatterDollar = (value: number): string => `${value}`; formatterDollar = (value: number): string => `${value}`;
changeSub = new Subject<string>(); changeSub = new Subject<string>();
constructor(public service: BaseService, private cdr: ChangeDetectorRef) {} constructor(public service: BaseService, private cdr: ChangeDetectorRef) {}
ngOnInit(): void { ngOnInit(): void {
this.data = [
{
gradeConfigId: '',
startAmount: 0,
endAmount: 0,
managementFeeRatio: 0,
}
];
this.loadData(); this.loadData();
this.changeendAmountAction(); this.changeendAmountAction();
} }
loadData() { loadData() {
// this.service.request('/api/mdc/cuc/insuranceConfig/list').subscribe(res => { this.service.request('/api/mdc/partnerGradeConfig/listPartnerGradeConfig').subscribe(res => {
// if (res) { if (res) {
// console.log(res); console.log(res);
// this.data = res; this.grage = res;
// this.cdr.detectChanges(); this.cdr.detectChanges();
// } }
// }); });
// this.service.request('/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys', [ // this.service.request('/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys', [
// "rebate.config.minrebatePrice" // "rebate.config.minrebatePrice"
// ]).subscribe(res => { // ]).subscribe(res => {
@ -66,12 +74,13 @@ export class RebateTableComponent implements OnInit {
const num = Number(paras[0]); const num = Number(paras[0]);
const i = Number(paras[1]); 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; this.data[i].endAmount = null;
setTimeout(() => { setTimeout(() => {
this.data[i].endAmount = this.data[i].startAmount + 1 ; this.data[i].endAmount = this.data[i]?.startAmount + 1 ;
}, 0); }, 0);
this.changeNextstartAmount(this.data[i].startAmount + 1, i + 1); this.changeNextstartAmount(this.data[i]?.startAmount + 1, i + 1);
return; return;
} }
this.data[i].endAmount = num; this.data[i].endAmount = num;