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 { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
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 { _HttpClient } from '@delon/theme';
|
||||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
@ -38,18 +38,37 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
|||||||
title: '',
|
title: '',
|
||||||
ui: { hidden: true }
|
ui: { hidden: true }
|
||||||
},
|
},
|
||||||
name1: {
|
name: {
|
||||||
title: '业务员选择',
|
title: '渠道销售姓名',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
enum: [
|
maxLength: 12,
|
||||||
{ label: '王武', value: '1'},
|
|
||||||
],
|
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
placeholder:'请输入'
|
||||||
placeholder:'请选择'
|
}
|
||||||
} as SFSelectWidgetSchema,
|
|
||||||
},
|
},
|
||||||
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',
|
type: 'string',
|
||||||
title: '授权登录运营后台',
|
title: '授权登录运营后台',
|
||||||
enum: [
|
enum: [
|
||||||
@ -59,21 +78,31 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'radio',
|
widget: 'radio',
|
||||||
} as SFRadioWidgetSchema,
|
} as SFRadioWidgetSchema,
|
||||||
default: 'A',
|
default: '0',
|
||||||
},
|
},
|
||||||
name: {
|
roleIds: {
|
||||||
title: '',
|
title: '角色',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
enum: [
|
|
||||||
{ label: '管理员', value: '1'},
|
|
||||||
],
|
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder:'授权角色',
|
placeholder: '授权角色',
|
||||||
visibleIf: { name2: (value: string) => value === '1' }
|
mode: 'multiple',
|
||||||
} as SFSelectWidgetSchema,
|
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',
|
type: 'string',
|
||||||
title: '备注',
|
title: '备注',
|
||||||
maxLength: 50,
|
maxLength: 50,
|
||||||
@ -84,15 +113,16 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
|||||||
} as SFTextareaWidgetSchema,
|
} as SFTextareaWidgetSchema,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
required: ['name1', 'name2']
|
required: ['name', 'phoneNumber', 'employeeVO', 'roleIds', 'remark']
|
||||||
};
|
};
|
||||||
this.ui = {
|
this.ui = {
|
||||||
'*': {
|
'*': {
|
||||||
spanLabelFixed: 150,
|
spanLabelFixed: 150,
|
||||||
grid: { span: 24 }
|
grid: { span: 24 }
|
||||||
},
|
},
|
||||||
$name:{ spanLabelFixed: 10, grid: { span: 12 }},
|
$isAuthorization:{ grid: { span: 12 }},
|
||||||
$name2:{ grid: { span: 12 }},
|
$roleIds:{ spanLabelFixed: 10, grid: { span: 12 }},
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -103,12 +133,12 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
|||||||
save() {
|
save() {
|
||||||
this.sf.validator({ emitError: true });
|
this.sf.validator({ emitError: true });
|
||||||
if(!this.sf.valid) return;
|
if(!this.sf.valid) return;
|
||||||
// this.service.request('', { ...this.sf.value }).subscribe(res => {
|
this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => {
|
||||||
// if (res) {
|
if (res) {
|
||||||
// this.modalRef.destroy(true);
|
this.modalRef.destroy(true);
|
||||||
// } else {
|
} else {
|
||||||
// this.service.msgSrv.error(res.msg);
|
this.service.msgSrv.error(res.msg);
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
<st
|
<st
|
||||||
#st
|
#st
|
||||||
[data]="data"
|
[data]="service.$api_getPage"
|
||||||
[columns]="columns"
|
[columns]="columns"
|
||||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||||
|
|||||||
@ -47,7 +47,7 @@ export class ParterChannelSalesListComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
title: '销售渠道姓名'
|
title: '销售渠道姓名'
|
||||||
},
|
},
|
||||||
phone: {
|
telephone: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '手机号'
|
title: '手机号'
|
||||||
},
|
},
|
||||||
@ -88,7 +88,7 @@ export class ParterChannelSalesListComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '邀请码',
|
title: '邀请码',
|
||||||
index: 'name1'
|
index: 'inviteCode'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
|||||||
@ -5,6 +5,17 @@ import { BaseService } from '@shared';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class ChannelSalesService extends BaseService {
|
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) {
|
constructor(public injector: Injector) {
|
||||||
super(injector);
|
super(injector);
|
||||||
|
|||||||
@ -38,19 +38,15 @@ export class ParterLevelConfigEditComponent implements OnInit {
|
|||||||
title: '',
|
title: '',
|
||||||
ui: { hidden: true }
|
ui: { hidden: true }
|
||||||
},
|
},
|
||||||
name: {
|
gradeName: {
|
||||||
title: '合伙人等级',
|
title: '等级名称',
|
||||||
type: 'string',
|
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',
|
type: 'string',
|
||||||
title: '备注',
|
title: '备注',
|
||||||
maxLength: 50,
|
maxLength: 50,
|
||||||
@ -61,7 +57,7 @@ export class ParterLevelConfigEditComponent implements OnInit {
|
|||||||
} as SFTextareaWidgetSchema,
|
} as SFTextareaWidgetSchema,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
required: ['name1', 'name2']
|
required: ['gradeName', 'sortId', 'remark']
|
||||||
};
|
};
|
||||||
this.ui = {
|
this.ui = {
|
||||||
'*': {
|
'*': {
|
||||||
@ -77,12 +73,12 @@ export class ParterLevelConfigEditComponent implements OnInit {
|
|||||||
save() {
|
save() {
|
||||||
this.sf.validator({ emitError: true });
|
this.sf.validator({ emitError: true });
|
||||||
if(!this.sf.valid) return;
|
if(!this.sf.valid) return;
|
||||||
// this.service.request('', { ...this.sf.value }).subscribe(res => {
|
this.service.request(this.service.$api_save, { ...this.sf.value }).subscribe(res => {
|
||||||
// if (res) {
|
if (res) {
|
||||||
// this.modalRef.destroy(true);
|
this.modalRef.destroy(true);
|
||||||
// } else {
|
} else {
|
||||||
// this.service.msgSrv.error(res.msg);
|
this.service.msgSrv.error(res.msg);
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
<st
|
<st
|
||||||
#st
|
#st
|
||||||
[data]="data"
|
[data]="service.$api_getList"
|
||||||
[columns]="columns"
|
[columns]="columns"
|
||||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||||
|
|||||||
@ -43,13 +43,17 @@ export class ParterLevelConfigListComponent implements OnInit {
|
|||||||
initSF() {
|
initSF() {
|
||||||
this.schema = {
|
this.schema = {
|
||||||
properties: {
|
properties: {
|
||||||
name: {
|
gradeName: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '等级姓名'
|
title: '等级姓名'
|
||||||
},
|
},
|
||||||
phone: {
|
stateLocked: {
|
||||||
type: 'string',
|
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 = [
|
this.columns = [
|
||||||
{
|
{
|
||||||
title: '等级姓名',
|
title: '等级姓名',
|
||||||
index: 'name1'
|
index: 'gradeName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '备注',
|
title: '备注',
|
||||||
index: 'name1'
|
index: 'remark'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
@ -76,7 +80,7 @@ export class ParterLevelConfigListComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '启用时间',
|
title: '启用时间',
|
||||||
index: 'name1'
|
index: 'enableTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
|
|||||||
@ -5,6 +5,14 @@ import { BaseService } from '@shared';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class ChannelSalesService extends BaseService {
|
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) {
|
constructor(public injector: Injector) {
|
||||||
super(injector);
|
super(injector);
|
||||||
|
|||||||
@ -4,13 +4,51 @@
|
|||||||
* @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-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
|
* @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.
|
||||||
-->
|
-->
|
||||||
<page-header-wrapper [title]="''"> </page-header-wrapper>
|
<page-header-wrapper [title]="'新增'"> </page-header-wrapper>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
|
<div nz-row>
|
||||||
|
|
||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
12121212
|
<sv-container col="1">
|
||||||
<app-rebate-table></app-rebate-table>
|
<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>
|
</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 { ModalHelper } from '@delon/theme';
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
@ -8,10 +18,17 @@ import { NzModalService } from 'ng-zorro-antd/modal';
|
|||||||
import { RebateManagementService } from '../../../services/rebate-management.service';
|
import { RebateManagementService } from '../../../services/rebate-management.service';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-parter-channel-rebate-management-add',
|
selector: 'app-parter-channel-rebate-management-add',
|
||||||
|
styleUrls: ['./add.component.less'],
|
||||||
templateUrl: './add.component.html'
|
templateUrl: './add.component.html'
|
||||||
})
|
})
|
||||||
export class ParterRebateManageMentAddComponent implements OnInit {
|
export class ParterRebateManageMentAddComponent implements OnInit {
|
||||||
|
setValue: string = '';
|
||||||
|
toFixedValue: Number = 2;
|
||||||
|
radioValue = 'A';
|
||||||
|
precision = 2;
|
||||||
|
inputValue= '';
|
||||||
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
|
schema1!: SFSchema;
|
||||||
constructor(
|
constructor(
|
||||||
public router: Router,
|
public router: Router,
|
||||||
public ar: ActivatedRoute,
|
public ar: ActivatedRoute,
|
||||||
@ -19,7 +36,25 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
|||||||
private modal: NzModalService,
|
private modal: NzModalService,
|
||||||
public shipperservice: ShipperBaseService,
|
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() {
|
ngOnInit() {
|
||||||
|
this.initSF()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user