This commit is contained in:
wangshiming
2022-04-26 10:21:05 +08:00
parent 636a725c08
commit 5b1d5d7ea8
7 changed files with 106 additions and 172 deletions

View File

@ -34,6 +34,10 @@ export class ParterChannelSalesEditComponent implements OnInit {
this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => { this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => {
if(res){ if(res){
this.record = res; this.record = res;
// this.sf.getProperty('/employeeVO')!.schema.enum = res;
// this.sf.getProperty('/employeeVO')!.widget.reset(res);
// this.sf.setValue('/employeeVO', this.enterpriseProjectIds);
this.initSF(); this.initSF();
} }
}); });

View File

@ -1,3 +1,13 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-04-21 13:49:22
* @LastEditors : Shiming
* @LastEditTime : 2022-04-26 09:47:43
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\channel-sales\\components\\list\\list.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<nz-card> <nz-card>
<!-- 搜索区 --> <!-- 搜索区 -->
<sf <sf
@ -16,6 +26,7 @@
<st <st
#st #st
[data]="service.$api_getPage" [data]="service.$api_getPage"
[scroll]="{x: '1200px'}"
[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' } }"

View File

@ -64,46 +64,64 @@ export class ParterChannelSalesListComponent implements OnInit {
this.columns = [ this.columns = [
{ {
title: '销售渠道姓名', title: '销售渠道姓名',
index: 'name' index: 'name',
width: '180px'
}, },
{ {
title: '手机号', title: '手机号',
index: 'telephone' index: 'telephone',
width: '150px'
},
{
title: '关联OA员工姓名',
index: 'empName',
width: '150px'
},
{
title: '关联OA员工手机号',
index: 'mobile',
width: '180px'
}, },
{ {
title: '所属组织', title: '所属组织',
index: 'organLable' index: 'organLable',
width: '300px'
}, },
{ {
title: '职级', title: '职级',
index: 'station' index: 'station',
width: '150px'
}, },
{ {
title: '等级', title: '等级',
index: 'postLevel' index: 'postLevel',
width: '150px'
}, },
{ {
title: '省市', title: '省市',
index: 'residencePlace' index: 'residencePlace',
width: '150px'
}, },
{ {
title: '邀请码', title: '邀请码',
index: 'inviteCode' index: 'inviteCode',
width: '150px'
}, },
{ {
title: '状态', title: '状态',
className: 'text-center', className: 'text-center',
index: 'stateLocked', index: 'stateLocked',
type: 'badge', type: 'badge',
width: '150px',
badge: { badge: {
true: { text: '冻结', color: 'error' }, true: { text: '冻结', color: 'error' },
false: { text: '正常', color: 'success' } false: { text: '正常', color: 'success' }
}, },
width: 130
}, },
{ {
title: '操作', title: '操作',
className: 'text-center', className: 'text-center',
width: '120px',
buttons: [ buttons: [
{ {
text: '编辑', text: '编辑',

View File

@ -11,41 +11,43 @@
<div nz-col nzSpan="20" style="overflow: scroll"> <div nz-col nzSpan="20" style="overflow: scroll">
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab===0 "> <nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab===0 ">
<h2 style="font-weight: 800;">货主端配置</h2> <h3 style="font-weight: 600;">提现手续费配置</h3>
<h3 style="font-weight: 600;margin-left: 120px;">图片配置</h3>
<sf style="margin-left: 30px" #sf mode="default" [formData]="i" [schema]="schema2"
[ui]="{ '*': { spanLabelFixed: 200,grid: { span: 24 }} }" button="none">
<ng-template sf-template="start" let-me let-ui="ui" let-schema="schema">
</ng-template>
<template id="tpl">
<span>so good </span>
</template>
<ng-template sf-template="time2" let-me let-ui="ui" let-schema="schema">
<div class="text-left">可输入字符</div>
<nz-range-picker extend nzFormat="HH:mm:ss"></nz-range-picker>
</ng-template>
</sf>
<h3 style="font-weight: 600;margin-left: 140px;" class="mb-md">短信配置</h3>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="230" [se-container]="1"> <div nz-col nzSpan="24" se-container [labelWidth]="230" [se-container]="1">
<se label="短信内容设置" style="margin-bottom: 0;"> <se label="个人提现手续费" style="margin-bottom: 0;">
<p style="margin-top: 6px;">配置用户端登陆页注册帐号、修改密码、修改手机号时的短信内容</p> <div>
<textarea nz-input rows="4" 按照提现金额收取
placeholder="【运多星】您的验证码XXXXXX。有效期10分钟请及时输入请勿向他人泄露您的验证码。如非本人操作请忽略。" <nz-input-number [(ngModel)]="personValue" [nzMin]="0" [nzMax]="100" [nzPrecision]='2' [nzStep]="0.01"></nz-input-number>
style="width: 400px;"></textarea> <span>
%手续费
</span>
</div>
</se>
<se label="企业提现手续费" style="margin-bottom: 0;">
<div>
按照提现金额收取
<nz-input-number [(ngModel)]="enterpriseValue" [nzMin]="0" [nzMax]="100" [nzPrecision]='2' [nzStep]="0.01"></nz-input-number>
<span>
%手续费
</span>
</div>
</se> </se>
</div> </div>
</div> </div>
<h3 style="font-weight: 600;margin-left: 140px;" class="mb-md">通知配置</h3> <h3 style="font-weight: 600;" class="mb-md">合伙人提现配置</h3>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col nzSpan="24"> <div nz-col nzSpan="24" se-container>
<ng-container *ngTemplateOutlet="textMessage;context:{$implicit: 'World', title:'用户实名认证审核'}"> <se label="提现审核" style="margin-bottom: 0;">
</ng-container> <nz-radio-group [(ngModel)]="auditValue">
<ng-container *ngTemplateOutlet="textMessage;context:{$implicit: 'World', title: '企业认证审核'}"> <label nz-radio [nzValue]="false" class="mt-sm">关闭</label>
<label nz-radio [nzValue]="true" class="mt-sm">开启</label>
</nz-radio-group>
</se>
<ng-container *ngTemplateOutlet="auditTimes;context:{$implicit: 'auto', title:'审核时间'}">
</ng-container> </ng-container>
</div> </div>
</div> </div>
<h3 style="font-weight: 600;margin-left: 140px;" class="mb-md">客服电话配置</h3> <h3 style="font-weight: 600;" class="mb-md">客服电话配置</h3>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="230"> <div nz-col nzSpan="24" se-container [labelWidth]="230">
<se label="客服电话" style="margin-bottom: 0;"> <se label="客服电话" style="margin-bottom: 0;">
@ -84,10 +86,6 @@
<h3 style="font-weight: 600;margin-left: 140px;" class="mb-md">通知配置</h3> <h3 style="font-weight: 600;margin-left: 140px;" class="mb-md">通知配置</h3>
<div nz-row nzGutter="8"> <div nz-row nzGutter="8">
<div nz-col nzSpan="24"> <div nz-col nzSpan="24">
<ng-container *ngTemplateOutlet="textMessage;context:{$implicit: 'World', title:'司机实名认证审核'}">
</ng-container>
<ng-container *ngTemplateOutlet="textMessage;context:{$implicit: 'World', title: '司机驾驶证证审核'}">
</ng-container>
<div se-container [labelWidth]="230" [se-container]="1"> <div se-container [labelWidth]="230" [se-container]="1">
<se class="mb-sm"> <se class="mb-sm">
<nz-radio-group [(ngModel)]="formDate.isAudit"> <nz-radio-group [(ngModel)]="formDate.isAudit">
@ -146,14 +144,15 @@
</div> </div>
</nz-card> </nz-card>
<ng-template #textMessage let-data="data" let-title="title"> <ng-template #auditTimes let-data="data" let-title="title">
<div se-container [labelWidth]="230" [se-container]="1"> <div se-container [labelWidth]="230" [se-container]="1">
<se [label]="title" style="margin-bottom: 0;"> <se [label]="title" style="margin-bottom: 0;">
<nz-radio-group [(ngModel)]="formDate.isAudit"> <nz-radio-group [(ngModel)]="auditTime">
<label nz-radio [nzValue]="false" class="mt-sm">审核通过系统通知</label> <label nz-radio [nzValue]="false" class="mt-sm">全天</label>
<label nz-radio [nzValue]="true" class="mt-sm">短信通知</label> <label nz-radio [nzValue]="true" class="mt-sm">自定义</label>
</nz-radio-group> </nz-radio-group>
</se> </se>
<div *ngIf="">
<se class="mb-sm"> <se class="mb-sm">
<label for="">通知标题 : </label> <label for="">通知标题 : </label>
<input nz-input placeholder="请不要超过20个汉字" style="width: 325px;" maxlength="20" /> <input nz-input placeholder="请不要超过20个汉字" style="width: 325px;" maxlength="20" />
@ -162,26 +161,7 @@
<label for="">通知内容 : </label> <label for="">通知内容 : </label>
<input nz-input placeholder="请不要超过50个汉字" style="width: 325px;" maxlength="50" /> <input nz-input placeholder="请不要超过50个汉字" style="width: 325px;" maxlength="50" />
</se> </se>
<se class="mb-sm">
<nz-radio-group [(ngModel)]="formDate.isAudit">
<label nz-radio [nzValue]="false" class="mt-sm">审核驳回系统通知</label>
<label nz-radio [nzValue]="true" class="mt-sm">短信通知</label>
</nz-radio-group>
</se>
<se class="mb-sm">
<label for="">通知标题 : </label>
<input nz-input placeholder="请不要超过20个汉字" style="width: 325px;" maxlength="20" />
</se>
<se class="mb-sm">
<label for="">通知内容 : </label>
<input nz-input placeholder="请不要超过50个汉字" style="width: 325px;" maxlength="50" />
</se>
<se class="mb-sm">
<div class=" d-flex">
<label for="">短信内容 : </label>
<textarea nz-input rows="3" placeholder="【运多星】您的账号XXXXXX。实名认证审核已被驳回请重新上传"
style="width: 325px;margin-left: 14px;"></textarea>
</div> </div>
</se>
</div> </div>
</ng-template> </ng-template>

View File

@ -4,7 +4,7 @@ import { Observable, Observer } from 'rxjs';
import { ConfigService } from '../../services/config.service'; import { ConfigService } from '../../services/config.service';
@Component({ @Component({
selector: 'app-config', selector: 'app-parterl-config',
templateUrl: './config.component.html', templateUrl: './config.component.html',
styleUrls: ['./config.component.less'] styleUrls: ['./config.component.less']
}) })
@ -15,12 +15,17 @@ export class PartnerSystemConfigComponent implements OnInit {
isEveryDay: false, isEveryDay: false,
isEveryWeek: false isEveryWeek: false
}; };
personValue!: number;
enterpriseValue!: number;
auditValue!: number;
auditTime!: any;
auditTimeStatus: boolean = false
tabs = [ tabs = [
{ {
name: '货主端配置' name: '基础配置'
}, },
{ {
name: '司机端配置' name: '分享配置'
} }
]; ];
selectedTab = 0; selectedTab = 0;
@ -37,7 +42,6 @@ export class PartnerSystemConfigComponent implements OnInit {
i: any; i: any;
schema!: SFSchema; schema!: SFSchema;
schema2!: SFSchema;
imageConfig = { imageConfig = {
widget: 'upload', widget: 'upload',
@ -64,61 +68,8 @@ export class PartnerSystemConfigComponent implements OnInit {
} }
initSF() { initSF() {
this.schema = { this.schema = {
properties: {
sysMinLogo: {
type: 'string',
title: '系统LOGO',
// enum: [],
ui: {
...this.imageConfig,
descriptionI18n: '大尺寸logo支持JPG、PNG格式文件小于2M建议尺寸300*170px。',
change: args => {
if (args.type === 'success') {
const avatar = this.getImageModel(args, 'sysMinLogo');
this.sf?.setValue('/sysMinLogo', avatar);
this.i.sysMinLogo = avatar;
}
},
beforeUpload: this.uploadBefore
} as SFUploadWidgetSchema
},
sysMaxLogo: {
type: 'string',
title: '用户默认头像',
ui: {
...this.imageConfig,
descriptionI18n: '支持JPG、PNG格式文件小于2M建议尺寸60*60px。',
change: args => {
if (args.type === 'success') {
const avatar = this.getImageModel(args, -1);
this.sf?.setValue('/sysMaxLogo', avatar);
this.i.sysMaxLogo = avatar;
}
},
beforeUpload: this.uploadBefore
} as SFUploadWidgetSchema
},
sysMaxLogo1: {
type: 'string',
title: '用户默认头像',
ui: {
...this.imageConfig,
descriptionI18n: '支持JPG、PNG格式文件小于5M建议尺寸375*773px。',
change: args => {
if (args.type === 'success') {
const avatar = this.getImageModel(args, -1);
this.sf?.setValue('/sysMaxLogo1', avatar);
this.i.sysMaxLogo1 = avatar;
}
},
beforeUpload: this.uploadBefore
} as SFUploadWidgetSchema
},
},
required: ['sysMinLogo', 'sysMaxLogo', 'sysMaxLogo1']
};
this.schema2 = {
properties: { properties: {
sysMinLogo: { sysMinLogo: {
type: 'string', type: 'string',
@ -221,7 +172,11 @@ export class PartnerSystemConfigComponent implements OnInit {
required: ['sysMinLogo', 'sysMaxLogo', 'sysMaxLogo1', 'sysMaxLogo2', 'sysMaxLogo3', 'sysMaxLogo4'] required: ['sysMinLogo', 'sysMaxLogo', 'sysMaxLogo1', 'sysMaxLogo2', 'sysMaxLogo3', 'sysMaxLogo4']
}; };
} }
auditTimeChange(ss: any,value: any) {
console.log(value);
this.auditTimeStatus = true
}
private uploadBefore = (file: any, fileList: any) => { private uploadBefore = (file: any, fileList: any) => {
return new Observable((observer: Observer<boolean>) => { return new Observable((observer: Observer<boolean>) => {
const isLt1M = file.size / 1024 / 1024 < 2; const isLt1M = file.size / 1024 / 1024 < 2;

View File

@ -83,7 +83,7 @@ console.log(this.params.infoUrl)
close() { close() {
this.modal.destroy(); this.modal.destroy();
} }
changeIF(value: boolean) { changeIF(value: any) {
console.log(value); console.log(value);
console.log('54545'); console.log('54545');
this.changeValue = true this.changeValue = true

View File

@ -1,5 +1,5 @@
import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core'; import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { _HttpClient } from '@delon/theme';
import { EAEnvironmentService } from '@shared'; import { EAEnvironmentService } from '@shared';
import { NzTreeComponent } from 'ng-zorro-antd/tree'; import { NzTreeComponent } from 'ng-zorro-antd/tree';
import { SystemService } from '../../../services/system.service'; import { SystemService } from '../../../services/system.service';
@ -19,7 +19,6 @@ export class SettingMenuComponent implements OnInit, OnChanges {
defaultCheckedKeys: any[] = []; defaultCheckedKeys: any[] = [];
functionList: any[] = []; functionList: any[] = [];
allChecked = false; allChecked = false;
changeIFT = false;
indeterminate = true; indeterminate = true;
@Input() type = 'edit'; @Input() type = 'edit';
@Input() source = ''; @Input() source = '';
@ -27,7 +26,6 @@ export class SettingMenuComponent implements OnInit, OnChanges {
@Input() isAuthorityIdDTOList: any[] = []; @Input() isAuthorityIdDTOList: any[] = [];
@Input() authorityAssistId: any[] = []; @Input() authorityAssistId: any[] = [];
@Input() roleId: any; @Input() roleId: any;
@Output() changeIF= new EventEmitter();
@Output() changeData = new EventEmitter(); @Output() changeData = new EventEmitter();
constructor(public service: SystemService, private cdr: ChangeDetectorRef, private envSrv: EAEnvironmentService) {} constructor(public service: SystemService, private cdr: ChangeDetectorRef, private envSrv: EAEnvironmentService) {}
ngOnChanges(changes: SimpleChanges): void { ngOnChanges(changes: SimpleChanges): void {
@ -36,9 +34,9 @@ export class SettingMenuComponent implements OnInit, OnChanges {
this.authority = this.isAuthorityIdDTOList || []; this.authority = this.isAuthorityIdDTOList || [];
} }
} }
if (changes.authorityAssistId) { // if (changes.authorityAssistId) {
this.defaultCheckedKeys = [...this.authorityAssistId]; // this.defaultCheckedKeys = [...this.authorityAssistId];
} // }
} }
ngOnInit() { ngOnInit() {
@ -59,44 +57,25 @@ export class SettingMenuComponent implements OnInit, OnChanges {
}); });
} }
addAuthority(origin: { id: any; all: any }, node: { buttonInfoList: any[] }, item?: { checked: any; functionButtonId: any }) { addAuthority(origin: { id: any; all: any }, node: { buttonInfoList: any[] }, item?: { checked: any; functionButtonId: any }) {
console.log(origin); console.log(origin,node);
if (this.authority?.length && this.authority.filter(authItem => authItem.authorityId === origin.id).length) { if (this.authority?.length && this.authority.filter(authItem => authItem.authorityId === origin.id).length) {
// 判断此菜单权限是否已经存在权限列表中 // 判断此菜单权限是否已经存在权限列表中
// 当前操作菜单id存在权限列表里 // 当前操作菜单id存在权限列表里
this.authority.forEach(menuItem => { this.authority.forEach(menuItem => {
console.log(menuItem);
console.log(item);
if (menuItem.authorityId === origin.id) { if (menuItem.authorityId === origin.id) {
menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型 menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型
if (item) { if (item) {
this.changeIF.emit(true);
this.changeIFT = true
// 判断此菜单下是否已有此按钮权限
// this.againGetBtn(id, origin);
const params = {
id: origin.id
};
this.service.request(this.service.$api_getFunctionButtonInfo, params).subscribe(res => {
if (res) {
let origins: any = {};
origins.buttonInfoList = res;
origins.all = false;
console.log(origins);
// 判断此菜单下是否已有此按钮权限
this.againGetBtn(origin.id, origins);
}
});
// 单选 // 单选
if (item.checked) { if (item.checked) {
if (menuItem.buttonAuthorityIds.indexOf(item.functionButtonId) === -1) { if (menuItem.buttonAuthorityIds.indexOf(item.functionButtonId) === -1) {
// 如果该按钮在数据权限数组中不存在 // 如果该按钮在数据权限数组中不存在
console.log('不存在');
menuItem.buttonAuthorityIds.push(item.functionButtonId); menuItem.buttonAuthorityIds.push(item.functionButtonId);
} }
} else { } else {
console.log('存在');
if (menuItem.buttonAuthorityIds && menuItem.buttonAuthorityIds.length) { if (menuItem.buttonAuthorityIds && menuItem.buttonAuthorityIds.length) {
menuItem.buttonAuthorityIds.forEach((btnItem: any, index: any) => { menuItem.buttonAuthorityIds.forEach((btnItem: any, index: any) => {
if (btnItem === item.functionButtonId) { if (btnItem === item.functionButtonId) {
@ -347,20 +326,9 @@ export class SettingMenuComponent implements OnInit, OnChanges {
} }
// 再次请求,需要判断暂存权限数组是否已有此权限 // 再次请求,需要判断暂存权限数组是否已有此权限
againGetBtn(id: any, origin: any) { againGetBtn(id: any, origin: any) {
console.log(id,origin); if (this.authority && this.authority.length === 0) {
console.log(this.authority);
console.log(this.authority.length);
if ((this.authority && this.authority.length !== 0)) {
console.log('1111');
const buttonAuthorityIds: any = []; const buttonAuthorityIds: any = [];
console.log(origin);
console.log(origin.checked);
if (origin.checked) { if (origin.checked) {
origin.buttonInfoList.forEach((btnItem: { functionButtonId: any; checked: boolean }) => { origin.buttonInfoList.forEach((btnItem: { functionButtonId: any; checked: boolean }) => {
btnItem.checked = true; btnItem.checked = true;
buttonAuthorityIds.push(btnItem.functionButtonId); buttonAuthorityIds.push(btnItem.functionButtonId);
@ -368,8 +336,6 @@ export class SettingMenuComponent implements OnInit, OnChanges {
this.authority.push({ authorityId: origin.key, buttonAuthorityIds, isUpdateAuthority: 1 }); this.authority.push({ authorityId: origin.key, buttonAuthorityIds, isUpdateAuthority: 1 });
} }
} else { } else {
console.log('22222');
if (origin.checked) { if (origin.checked) {
//菜单勾选情况下 //菜单勾选情况下
if (this.authority.some(item => item.authorityId === id)) { if (this.authority.some(item => item.authorityId === id)) {