This commit is contained in:
wangshiming
2022-03-28 20:29:22 +08:00
parent cb50d0c36b
commit ac7eb6e3db
9 changed files with 191 additions and 240 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming
* @LastEditTime : 2022-03-28 15:39:27
* @LastEditTime : 2022-03-28 19:46:23
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -14,26 +14,34 @@
<!-- 数据列表 -->
<sv-container col="1">
&nbsp;&nbsp;<sv label="配置名称"> <input style="max-width: 400px;" nz-input placeholder="请输入" [(ngModel)]="setValue" /></sv>
&nbsp;&nbsp;<sv label="配置名称"> <input style="max-width: 400px;" nz-input placeholder="请输入" [(ngModel)]="configName" /></sv>
<sv-title>固定结算费率配置</sv-title>
&nbsp;&nbsp;<sv label="固定结算费率"> <nz-input-number [(ngModel)]="toFixedValue" [nzPrecision]="precision" nzPlaceHolder="请输入"></nz-input-number>&nbsp;%</sv>
&nbsp;&nbsp;<sv label="固定结算费率"> <nz-input-number [(ngModel)]="accountingRate" [nzPrecision]="precision" nzPlaceHolder="请输入"></nz-input-number>&nbsp;%</sv>
<sv-title>业务量和管理费比例配置</sv-title>
&nbsp;&nbsp;<sv label="选择配置类型">
<nz-radio-group [(ngModel)]="radioValue">
<label nz-radio nzValue="A">按全部等级配置</label>
<label nz-radio nzValue="B">按不同等级配置</label>
<nz-radio-group [(ngModel)]="configType">
<label nz-radio nzValue="1">按全部等级配置</label>
<label nz-radio nzValue="2">按不同等级配置</label>
</nz-radio-group>
</sv>
<sv col="1">
&nbsp;&nbsp;<app-rebate-table></app-rebate-table>
&nbsp;&nbsp;
<app-rebate-table ></app-rebate-table>
</sv>
<sv-title>关联合伙人配置</sv-title>
&nbsp;&nbsp;<sv label="合伙人选择">
<nz-select ngModel="lucy" style="max-width: 400px; min-width: 200px;">
<!-- <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>
&nbsp;&nbsp;<span (click)="add()">添加</span>
</nz-select> -->
<input *ngIf="peopleStatus" nz-input disabled style=" max-width: 200px;" placeholder="请添加" [(ngModel)]="partnerPeople" />
&nbsp;&nbsp;<span style="color: #0000FF;" (click)="add()">添加</span>
<st *ngIf="!peopleStatus" #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"
[scroll]="{ x: '1000' }">
</st>
</sv>
&nbsp;&nbsp;<sv label="优先级" col="1">
<nz-select ngModel="lucy" style="max-width: 400px; min-width: 200px;">
@ -49,17 +57,11 @@
<textarea style="max-width: 400px; min-width: 200px;" rows="4" nz-input [(ngModel)]="inputValue"></textarea>
</sv>
</sv-container>
<div>
<button>返回</button>
<button>提交</button>
</div>
<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()"
acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交</button
>
</div>
</div>
</nz-card>
<nz-card>
<div class="align-center">
<button nz-button nzType="primary" (click)="goBack()">取消</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit()"
acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交</button
>
</div>
</nz-card>

View File

@ -7,4 +7,10 @@
font-weight: 700;
}
}
.align-center {
display: flex;
align-items: center;
justify-content: center;
}
}

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-03-21 09:26:45
* @LastEditors : Shiming
* @LastEditTime : 2022-03-28 14:45:41
* @LastEditTime : 2022-03-28 19:47:56
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -17,17 +17,23 @@ import { processSingleSort, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { RebateManagementService } from '../../../services/rebate-management.service';
import { ParterRebateManageMentAddPartnerListComponent } from '../add-partnerlist/add-partnerlist.component';
import { inRange } from '@delon/util';
@Component({
selector: 'app-parter-channel-rebate-management-add',
styleUrls: ['./add.component.less'],
templateUrl: './add.component.html'
})
export class ParterRebateManageMentAddComponent implements OnInit {
setValue: string = '';
toFixedValue: Number = 2;
radioValue = 'A';
configName: string = '';
accountingRate: Number = 2;
partnerPeople: any;
partnerPeopleList: any;
peopleStatus: boolean = true;
configType = '1';
precision = 2;
inputValue = '';
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema1!: SFSchema;
constructor(
@ -37,6 +43,27 @@ export class ParterRebateManageMentAddComponent implements OnInit {
private modal: NzModalService,
public shipperservice: ShipperBaseService
) {}
columns: STColumn[] = [
{
title: '合伙人名称',
index: 'enterpriseName',
width: 180,
format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '')
},
{ title: '联系人', index: 'contactName', width: 150, format: item => (item.partnerType ? `${item.contactName}` : '') },
{ 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',
buttons: [
{
text: '移除',
click: _record => this.delete(_record),
acl: { ability: ['AbnormalAppear-reply'] }
},
]
},
];
initSF(data?: any) {
this.schema1 = {
properties: {
@ -63,21 +90,46 @@ export class ParterRebateManageMentAddComponent implements OnInit {
window.history.go(-1);
}
/**
*申请退款
*合伙人选择
*/
add(item?: any) {
const modalRef = this.modal.create({
nzTitle: '申请退款',
nzTitle: '合伙人选择',
nzWidth: 1000,
nzContent: ParterRebateManageMentAddPartnerListComponent,
nzComponentParams: {
i: item,
},
nzFooter: null
});
modalRef.afterClose.subscribe((res: boolean) => {
modalRef.afterClose.subscribe((res: any) => {
if (res) {
console.log(Array.isArray(res));
console.log(res);
if(Array.isArray(res)) {
this.partnerPeopleList = res;
this.peopleStatus = false
} else {
this.partnerPeople = res?.enterpriseName;
}
}
});
}
delete(item: any) {
console.log(item);
}
save () {
const params = {
accountingRate: this.accountingRate,
configName: this.configName,
configType: this.configType,
rebateConfigLineDTO: {}
}
this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => {
if(res) {
console.log(res);
}
})
}
}