Merge branch 'feature/partner' of https://gitlab.eascs.com/tms-ui/tms-obc-web into feature/partner
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { SFAutoCompleteWidgetSchema, SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { map } from 'rxjs/operators';
|
||||
@ -38,18 +38,37 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
||||
title: '',
|
||||
ui: { hidden: true }
|
||||
},
|
||||
name1: {
|
||||
title: '业务员选择',
|
||||
name: {
|
||||
title: '渠道销售姓名',
|
||||
type: 'string',
|
||||
enum: [
|
||||
{ label: '王武', value: '1'},
|
||||
],
|
||||
maxLength: 12,
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder:'请选择'
|
||||
} as SFSelectWidgetSchema,
|
||||
placeholder:'请输入'
|
||||
}
|
||||
},
|
||||
name2: {
|
||||
phoneNumber: {
|
||||
title: '手机号',
|
||||
type: 'string',
|
||||
maxLength: 11,
|
||||
ui: {
|
||||
placeholder:'请输入'
|
||||
}
|
||||
},
|
||||
employeeVO: {
|
||||
title: '关联OA员工',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'autocomplete',
|
||||
placeholder:'请选择',
|
||||
asyncData: () => this.service.request(this.service.$api_fuzzyQuery).pipe(
|
||||
map((res: any) => {
|
||||
console.log('111',res)
|
||||
return [];
|
||||
})
|
||||
)
|
||||
} as SFAutoCompleteWidgetSchema,
|
||||
},
|
||||
isAuthorization: {
|
||||
type: 'string',
|
||||
title: '授权登录运营后台',
|
||||
enum: [
|
||||
@ -59,21 +78,31 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'radio',
|
||||
} as SFRadioWidgetSchema,
|
||||
default: 'A',
|
||||
default: '0',
|
||||
},
|
||||
name: {
|
||||
title: '',
|
||||
roleIds: {
|
||||
title: '角色',
|
||||
type: 'string',
|
||||
enum: [
|
||||
{ label: '管理员', value: '1'},
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder:'授权角色',
|
||||
visibleIf: { name2: (value: string) => value === '1' }
|
||||
} as SFSelectWidgetSchema,
|
||||
placeholder: '授权角色',
|
||||
mode: 'multiple',
|
||||
maxMultipleCount: 5,
|
||||
asyncData: () => {
|
||||
return this.service.request(this.service.$api_getAppRoleList).pipe(
|
||||
map((res: any) => {
|
||||
return res
|
||||
.filter((role: any) => role.roleCode !== 'Administrator')
|
||||
.map((item: any) => {
|
||||
return { label: item.roleName, value: item.id };
|
||||
});
|
||||
})
|
||||
);
|
||||
},
|
||||
visibleIf: { isAuthorization: (value: string) => value === '1' }
|
||||
},
|
||||
},
|
||||
name3: {
|
||||
remark: {
|
||||
type: 'string',
|
||||
title: '备注',
|
||||
maxLength: 50,
|
||||
@ -84,15 +113,16 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
||||
} as SFTextareaWidgetSchema,
|
||||
},
|
||||
},
|
||||
required: ['name1', 'name2']
|
||||
required: ['name', 'phoneNumber', 'employeeVO', 'roleIds', 'remark']
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 150,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$name:{ spanLabelFixed: 10, grid: { span: 12 }},
|
||||
$name2:{ grid: { span: 12 }},
|
||||
$isAuthorization:{ grid: { span: 12 }},
|
||||
$roleIds:{ spanLabelFixed: 10, grid: { span: 12 }},
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
@ -103,12 +133,12 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
||||
save() {
|
||||
this.sf.validator({ emitError: true });
|
||||
if(!this.sf.valid) return;
|
||||
// this.service.request('', { ...this.sf.value }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.modalRef.destroy(true);
|
||||
// } else {
|
||||
// this.service.msgSrv.error(res.msg);
|
||||
// }
|
||||
// });
|
||||
this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => {
|
||||
if (res) {
|
||||
this.modalRef.destroy(true);
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<!-- 数据列表 -->
|
||||
<st
|
||||
#st
|
||||
[data]="data"
|
||||
[data]="service.$api_getPage"
|
||||
[columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
|
||||
@ -47,7 +47,7 @@ export class ParterChannelSalesListComponent implements OnInit {
|
||||
type: 'string',
|
||||
title: '销售渠道姓名'
|
||||
},
|
||||
phone: {
|
||||
telephone: {
|
||||
type: 'string',
|
||||
title: '手机号'
|
||||
},
|
||||
@ -88,7 +88,7 @@ export class ParterChannelSalesListComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
title: '邀请码',
|
||||
index: 'name1'
|
||||
index: 'inviteCode'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
@ -5,6 +5,17 @@ import { BaseService } from '@shared';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ChannelSalesService extends BaseService {
|
||||
|
||||
// 保存渠道销售管理
|
||||
$api_save = '/api/mdc/channelSalesManagement/save';
|
||||
|
||||
// 查询渠道销售管理表
|
||||
$api_getPage = '/api/mdc/channelSalesManagement/list/page';
|
||||
// OA员工模糊查询
|
||||
$api_fuzzyQuery = '/api/mdc/channelSalesManagement/fuzzyQuery';
|
||||
// 获取角色列表
|
||||
$api_getAppRoleList = '/api/mdc/cuc/roleInfo/getRoleList';
|
||||
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
|
||||
@ -38,19 +38,15 @@ export class ParterLevelConfigEditComponent implements OnInit {
|
||||
title: '',
|
||||
ui: { hidden: true }
|
||||
},
|
||||
name: {
|
||||
title: '合伙人等级',
|
||||
gradeName: {
|
||||
title: '等级名称',
|
||||
type: 'string',
|
||||
enum: [
|
||||
{ label: '管理员', value: '1'},
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder:'请选择',
|
||||
visibleIf: { name2: (value: string) => value === '1' }
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
name3: {
|
||||
sortId: {
|
||||
title: '排序',
|
||||
type: 'string',
|
||||
},
|
||||
remark: {
|
||||
type: 'string',
|
||||
title: '备注',
|
||||
maxLength: 50,
|
||||
@ -61,7 +57,7 @@ export class ParterLevelConfigEditComponent implements OnInit {
|
||||
} as SFTextareaWidgetSchema,
|
||||
},
|
||||
},
|
||||
required: ['name1', 'name2']
|
||||
required: ['gradeName', 'sortId', 'remark']
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
@ -77,12 +73,12 @@ export class ParterLevelConfigEditComponent implements OnInit {
|
||||
save() {
|
||||
this.sf.validator({ emitError: true });
|
||||
if(!this.sf.valid) return;
|
||||
// this.service.request('', { ...this.sf.value }).subscribe(res => {
|
||||
// if (res) {
|
||||
// this.modalRef.destroy(true);
|
||||
// } else {
|
||||
// this.service.msgSrv.error(res.msg);
|
||||
// }
|
||||
// });
|
||||
this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => {
|
||||
if (res) {
|
||||
this.modalRef.destroy(true);
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<!-- 数据列表 -->
|
||||
<st
|
||||
#st
|
||||
[data]="data"
|
||||
[data]="service.$api_getList"
|
||||
[columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
|
||||
@ -43,13 +43,17 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
name: {
|
||||
gradeName: {
|
||||
type: 'string',
|
||||
title: '等级姓名'
|
||||
},
|
||||
phone: {
|
||||
stateLocked: {
|
||||
type: 'string',
|
||||
title: '状态'
|
||||
title: '状态',
|
||||
enum:[{label:'是',value:'1'},{label:'否',value:'2'}],
|
||||
ui:{
|
||||
widget:'select'
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
@ -64,11 +68,11 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
this.columns = [
|
||||
{
|
||||
title: '等级姓名',
|
||||
index: 'name1'
|
||||
index: 'gradeName'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
index: 'name1'
|
||||
index: 'remark'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
@ -76,7 +80,7 @@ export class ParterLevelConfigListComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
title: '启用时间',
|
||||
index: 'name1'
|
||||
index: 'enableTime'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
|
||||
@ -5,6 +5,14 @@ import { BaseService } from '@shared';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ChannelSalesService extends BaseService {
|
||||
// 查询合伙人等级配置表
|
||||
$api_getList = '/api/mdc/partnerGradeConfig/list/page';
|
||||
// 获取合伙人等级配置表
|
||||
$api_getPartnerGradeConfig = '/api/mdc/partnerGradeConfig/get';
|
||||
// 保存合伙人等级配置表
|
||||
$api_save = '/api/mdc/partnerGradeConfig/save';
|
||||
// 删除合伙人等级配置表
|
||||
$api_del = '/api/mdc/partnerGradeConfig/deletebatch';
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
|
||||
@ -4,13 +4,51 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-02-24 20:09:49
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-11 15:25:00
|
||||
* @LastEditTime : 2022-03-21 13:53:31
|
||||
* @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]="'新增'"> </page-header-wrapper>
|
||||
<nz-card>
|
||||
<div nz-row>
|
||||
|
||||
<!-- 数据列表 -->
|
||||
12121212
|
||||
<app-rebate-table></app-rebate-table>
|
||||
<sv-container col="1">
|
||||
<sv label="配置名称"> <input style="max-width: 400px;" nz-input placeholder="请输入" [(ngModel)]="setValue" /></sv>
|
||||
<sv-title>固定结算费率配置</sv-title>
|
||||
<sv label="固定结算费率"> <nz-input-number [(ngModel)]="toFixedValue" [nzPrecision]="precision" nzPlaceHolder="请输入"></nz-input-number> %</sv>
|
||||
<sv-title>业务量和管理费比例配置</sv-title>
|
||||
<sv label="选择配置类型">
|
||||
<nz-radio-group [(ngModel)]="radioValue">
|
||||
<label nz-radio nzValue="A">按全部等级配置</label>
|
||||
<label nz-radio nzValue="B">按不同等级配置</label>
|
||||
</nz-radio-group>
|
||||
</sv>
|
||||
<sv col="1">
|
||||
<app-rebate-table></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>
|
||||
<span >添加</span>
|
||||
</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>
|
||||
</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>
|
||||
</sv-container>
|
||||
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
:host {
|
||||
::ng-deep {
|
||||
.sv__label {
|
||||
color: #000;
|
||||
}
|
||||
.sv__title {
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,13 @@
|
||||
/*
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-03-21 09:26:45
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-21 13:44:34
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
import { ModalHelper } from '@delon/theme';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
@ -8,10 +18,17 @@ import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { RebateManagementService } from '../../../services/rebate-management.service';
|
||||
@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';
|
||||
precision = 2;
|
||||
inputValue= '';
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema1!: SFSchema;
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
@ -19,7 +36,25 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
private modal: NzModalService,
|
||||
public shipperservice: ShipperBaseService,
|
||||
) {}
|
||||
|
||||
initSF(data?: any) {
|
||||
this.schema1 = {
|
||||
properties: {
|
||||
content: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'tinymce',
|
||||
loadingTip: 'loading...',
|
||||
config: {
|
||||
height: 650
|
||||
}
|
||||
},
|
||||
default: data?.agreementContent || ''
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
ngOnInit() {
|
||||
this.initSF()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user