解决冲突
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-21 13:49:22
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-27 10:56:40
|
||||
* @LastEditTime : 2022-04-27 11:29:10
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\basic-setting\\basic-setting.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
<div nz-row [nzGutter]="8">
|
||||
<div nz-col nzSpan="20" style="overflow: scroll">
|
||||
<nz-card class="card-height" [nzBordered]="null" nzSize="small" *ngIf="selectedTab === 0">
|
||||
<h3 style="font-weight: 600">提现手续费配置</h3>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col nzSpan="24" se-container [labelWidth]="125" [se-container]="1">
|
||||
<se label="个人提现手续费" style="margin:15px 0 0 0">
|
||||
<div>
|
||||
按照提现金额收取
|
||||
<nz-input-number [(ngModel)]="personValue" [nzMin]="0" [nzMax]="100" [nzPrecision]="2" [nzStep]="0.01"></nz-input-number>
|
||||
<span> %手续费 </span>
|
||||
</div>
|
||||
</se>
|
||||
<se label="企业提现手续费" style="margin:15px 0 0 0;">
|
||||
<div>
|
||||
按照提现金额收取
|
||||
<nz-input-number
|
||||
[(ngModel)]="enterpriseValue"
|
||||
[nzMin]="0"
|
||||
[nzMax]="100"
|
||||
[nzPrecision]="2"
|
||||
[nzStep]="0.01"
|
||||
></nz-input-number>
|
||||
<span> %手续费 </span>
|
||||
</div>
|
||||
</se>
|
||||
</div>
|
||||
</div>
|
||||
<h3 style="font-weight: 600;margin:15px 0 0 0;" class="mb-md">合伙人提现配置</h3>
|
||||
<div nz-row nzGutter="8" class="audit">
|
||||
<div nz-col nzSpan="24" se-container>
|
||||
<se label="提现审核" style="margin:15px 0 0 0;">
|
||||
<nz-radio-group [(ngModel)]="auditValue">
|
||||
<label nz-radio [nzValue]="false" class="mt-sm">关闭</label>
|
||||
<label nz-radio [nzValue]="true" class="mt-sm">开启</label>
|
||||
</nz-radio-group>
|
||||
</se>
|
||||
<se label="审核时间" style="margin:15px 0 0 0;">
|
||||
<div se-container [se-container]="1" style="margin-left: 0px">
|
||||
<nz-radio-group style="display: block" [(ngModel)]="auditTime" (ngModelChange)="changeAuto(auditTime)">
|
||||
<label nz-radio [nzValue]="1" class="mt-sm">全天</label>
|
||||
<label nz-radio [nzValue]="2" class="mt-sm">自定义</label>
|
||||
</nz-radio-group>
|
||||
</div>
|
||||
</se>
|
||||
<div style="margin-left: 200px">
|
||||
<ng-container *ngTemplateOutlet="auditTimes"> </ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h3 style="font-weight: 600;margin:15px 0 0 0;" class="mb-md">客户定义配置</h3>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col nzSpan="24">
|
||||
<span>客户</span>
|
||||
<nz-input-number style="margin: 0 10px; " [(ngModel)]="personValue" [nzMin]="0" [nzMax]="3000" [nzPrecision]="2" [nzStep]="0.1"></nz-input-number>
|
||||
<span>天内没有交易订单的视为“沉默客户”</span>
|
||||
</div>
|
||||
<div nz-col nzSpan="24" style="margin-top: 10px;">
|
||||
<span>客户</span>
|
||||
<nz-input-number style="margin: 0 10px; " [(ngModel)]="personValue" [nzMin]="0" [nzMax]="3000" [nzPrecision]="2" [nzStep]="0.1"></nz-input-number>
|
||||
<span>天内没有交易订单的视为“流失客户”</span>
|
||||
</div>
|
||||
<div nz-col nzSpan="24">
|
||||
<span style="color: #797979; font-size: 14px;">说明:交易订单指从司机已接单开始的订单。</span>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
<div class="mb-md save-btn">
|
||||
<button class="ml-lg" nz-button nzSize="large" nzType="primary">保存</button>
|
||||
<button class="ml-lg" nz-button nzSize="large">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ng-template #auditTimes let-data="data" let-title="title">
|
||||
<div *ngIf="auditTimeStatus" >
|
||||
<div style="display: flex">
|
||||
<nz-radio-group [(ngModel)]="everyDay" (ngModelChange)="everyDayChange(everyDay)" style="display: block">
|
||||
<label nz-radio [nzValue]="1" class="mt-sm"
|
||||
>每天<span *ngIf="TimeStatus" style="margin-left: 30px; color: #0200ff; cursor: pointer" (click)="addEvery()">添加时间段</span></label
|
||||
>
|
||||
</nz-radio-group>
|
||||
<br />
|
||||
<div *ngIf="TimeStatus">
|
||||
<div *ngFor="let item of everyDayData; let i = index">
|
||||
<div style="margin-top: 15px;">
|
||||
<input type="time" [(ngModel)]="item.startTime" placeHolder="开始时间" style="margin-left: 23px" />
|
||||
<label class="ml-sm mr-sm"> --</label>
|
||||
<input type="time" [(ngModel)]="item.endTime" placeHolder="结束时间" style="margin-left: 0" class="mr-xl" />
|
||||
|
||||
<label class="ml-sm mr-sm" style=" color: #0200ff; cursor: pointer" *ngIf="i !== 0" (click)="delEvery(i)">删除</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div >
|
||||
<nz-radio-group [(ngModel)]="MonthDay" (ngModelChange)="MonthDayChange(MonthDay)" style="display: block">
|
||||
<label nz-radio [nzValue]="2" class="mt-sm"
|
||||
>每周<span *ngIf="!TimeStatus" style="margin-left: 30px; color: #0200ff; cursor: pointer" (click)="addMonth()">添加星期</span></label
|
||||
>
|
||||
</nz-radio-group>
|
||||
<div *ngIf="!TimeStatus">
|
||||
<div *ngFor="let item of MonthDayData; let i = index">
|
||||
<nz-checkbox-group style="margin-top: 15px;" [(ngModel)]="item.month" (ngModelChange)="changeMonth(item.month)"></nz-checkbox-group>
|
||||
<br />
|
||||
<div *ngFor="let ite of item.Times; let ii = index">
|
||||
<div style="margin-top: 15px;">
|
||||
<input type="time" [(ngModel)]="ite.startTime" placeHolder="开始时间" style="margin-left: 23px" />
|
||||
<label class="ml-sm mr-sm"> --</label>
|
||||
<input type="time" [(ngModel)]="ite.endTime" placeHolder="结束时间" style="margin-left: 0" class="mr-xl" />
|
||||
<label class="ml-sm mr-sm" style=" color: #0200ff; cursor: pointer" (click)="addMonthEvery(i)">添加时间段</label>
|
||||
<label *ngIf="ii !== 0" class="ml-sm mr-sm" style=" color: #0200ff; cursor: pointer" (click)="delMonth(i,ii)">删除</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
@ -0,0 +1,25 @@
|
||||
:host {
|
||||
::ng-deep {
|
||||
.card-height {
|
||||
min-height: 600px;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
width : 100%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.block-radio {
|
||||
display : flex;
|
||||
min-height : 32px;
|
||||
}
|
||||
|
||||
input {
|
||||
width : 100px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.audit .ant-form-item-label{
|
||||
width: 81px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
329
src/app/routes/sys-setting/components/config/config.component.ts
Normal file
329
src/app/routes/sys-setting/components/config/config.component.ts
Normal file
@ -0,0 +1,329 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { SFComponent, SFSchema, SFUploadWidgetSchema } from '@delon/form';
|
||||
import { NzUploadFile } from 'ng-zorro-antd/upload';
|
||||
import { Observable, Observer, of } from 'rxjs';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
const IMAGECONFIG = {
|
||||
previewFile: (file: NzUploadFile) => of(file.url),
|
||||
action: apiConf.waterFileUpload,
|
||||
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||
fileSize: 5120,
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFileWatermarkPath',
|
||||
urlReName: 'data.fullFileWatermarkPath',
|
||||
widget: 'upload',
|
||||
name: 'multipartFile',
|
||||
multiple: false,
|
||||
listType: 'picture-card'
|
||||
} as SFUploadWidgetSchema;
|
||||
@Component({
|
||||
selector: 'app-parterl-config',
|
||||
templateUrl: './config.component.html',
|
||||
styleUrls: ['./config.component.less']
|
||||
})
|
||||
export class PartnerSystemConfigComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
@ViewChild('sf2', { static: false }) sf2!: SFComponent;
|
||||
formDate: any = {
|
||||
isAudit: false,
|
||||
isEveryDay: false,
|
||||
isEveryWeek: false
|
||||
};
|
||||
personValue!: number;
|
||||
enterpriseValue!: number;
|
||||
auditValue!: number;
|
||||
auditTime!: any;
|
||||
auditTimeStatus: boolean = false
|
||||
everyDay: boolean = false
|
||||
MonthDay: boolean = false
|
||||
time: Date | null = null;
|
||||
defaultOpenValue = new Date(0, 0, 0, 0, 0, 0);
|
||||
tabs = [
|
||||
{
|
||||
name: '基础配置'
|
||||
},
|
||||
{
|
||||
name: '分享配置'
|
||||
}
|
||||
];
|
||||
selectedTab = 0;
|
||||
TimeStatus: boolean = true
|
||||
everyDayData: Array<any> =[];
|
||||
MonthDayData: any = [
|
||||
{month: [
|
||||
{ label: '周一', value: '周一', },
|
||||
{ label: '周二', value: '周二' },
|
||||
{ label: '周三', value: '周三' },
|
||||
{ label: '周四', value: '周四' },
|
||||
{ label: '周五', value: '周五' },
|
||||
{ label: '周六', value: '周六' },
|
||||
{ label: '周日', value: '周日' }
|
||||
], Times:[ {
|
||||
startTime: [],
|
||||
endTime: [],
|
||||
}]}
|
||||
]
|
||||
|
||||
checkOptionsOne = [
|
||||
{ label: '周一', value: '周一', checked: true },
|
||||
{ label: '周二', value: '周二' },
|
||||
{ label: '周三', value: '周三' },
|
||||
{ label: '周四', value: '周四' },
|
||||
{ label: '周五', value: '周五' },
|
||||
{ label: '周六', value: '周六' },
|
||||
{ label: '周日', value: '周日' }
|
||||
];
|
||||
|
||||
i: any;
|
||||
schema!: SFSchema;
|
||||
schema2!: SFSchema;
|
||||
|
||||
// IMAGECONFIG = {
|
||||
// widget: 'upload',
|
||||
// action: `/scm/cms/cms/upload/multipartFile/fileModel`,
|
||||
// limit: 1,
|
||||
// limitFileCount: 1,
|
||||
// resReName: 'url',
|
||||
// urlReName: 'url',
|
||||
// data: {
|
||||
// appId: this.service.envSrv.getEnvironment().appId
|
||||
// },
|
||||
// multiple: false,
|
||||
// listType: 'picture-card',
|
||||
// showRequired: true
|
||||
// };
|
||||
|
||||
constructor(private service: SystemService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.initSF();
|
||||
this.everyDayData = [
|
||||
{
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
}
|
||||
]
|
||||
}
|
||||
addEvery() {
|
||||
this.everyDayData.push(
|
||||
{
|
||||
startTime: [],
|
||||
endTime: [],
|
||||
}
|
||||
)
|
||||
}
|
||||
delEvery(index: number) {
|
||||
this.everyDayData.splice(index, 1)
|
||||
|
||||
}
|
||||
addMonthEvery(value: any) {
|
||||
this.MonthDayData[value].Times.push(
|
||||
{
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
}
|
||||
)
|
||||
}
|
||||
addMonth() {
|
||||
this.MonthDayData.push(
|
||||
{month: [
|
||||
{ label: '周一', value: '周一', },
|
||||
{ label: '周二', value: '周二' },
|
||||
{ label: '周三', value: '周三' },
|
||||
{ label: '周四', value: '周四' },
|
||||
{ label: '周五', value: '周五' },
|
||||
{ label: '周六', value: '周六' },
|
||||
{ label: '周日', value: '周日' }
|
||||
], Times:[{
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
}]}
|
||||
)
|
||||
|
||||
}
|
||||
delMonth(value: number,index: number) {
|
||||
this.MonthDayData[value].Times.splice(index, 1)
|
||||
}
|
||||
changeType(type: number): void {
|
||||
this.selectedTab = type;
|
||||
}
|
||||
changeMonth(type: any): void {
|
||||
console.log(type);
|
||||
console.log( this.MonthDayData);
|
||||
}
|
||||
everyDayChange(type: any): void {
|
||||
console.log(type);
|
||||
if(type) {
|
||||
this.MonthDay = false
|
||||
this.TimeStatus = true
|
||||
}
|
||||
}
|
||||
MonthDayChange(type: any): void {
|
||||
console.log(type);
|
||||
if(type) {
|
||||
this.everyDay = false
|
||||
this.TimeStatus = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
initSF() {
|
||||
|
||||
this.schema = {
|
||||
properties: {
|
||||
roadTransportPhoto: { title: '', type: 'string', ui: { hidden: true } },
|
||||
roadTransportPhotoWatermark: {
|
||||
type: 'string',
|
||||
title: '分享海报',
|
||||
ui: {
|
||||
...IMAGECONFIG,
|
||||
descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸 750px* 1624 px)。',
|
||||
change: args => {
|
||||
if (args.type === 'success') {
|
||||
this.sf.setValue('/roadTransportPhoto', args.fileList[0].response.data.fullFilePath);
|
||||
}
|
||||
},
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
share: { title: '', type: 'string', ui: { hidden: true } },
|
||||
shareWatermark: {
|
||||
type: 'string',
|
||||
title: '分享图',
|
||||
ui: {
|
||||
...IMAGECONFIG,
|
||||
descriptionI18n: '支持JPG、PNG格式,文件小于2M( 建议尺寸 856px * 688px)。',
|
||||
change: args => {
|
||||
if (args.type === 'success') {
|
||||
this.sf.setValue('/share', args.fileList[0].response.data.fullFilePath);
|
||||
}
|
||||
},
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
take: { title: '', type: 'string', ui: { hidden: true } },
|
||||
takeWatermark: {
|
||||
type: 'string',
|
||||
title: '受邀海报',
|
||||
ui: {
|
||||
...IMAGECONFIG,
|
||||
descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸 750px* 1624 px)。',
|
||||
change: args => {
|
||||
if (args.type === 'success') {
|
||||
this.sf.setValue('/take', args.fileList[0].response.data.fullFilePath);
|
||||
}
|
||||
},
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
complianceRemark: {
|
||||
title: '分享文案',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
placeholder: '请不要超过50个字',
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 }
|
||||
}
|
||||
}
|
||||
},
|
||||
required: ['roadTransportPhotoWatermark', 'shareWatermark', 'takeWatermark', 'complianceRemark']
|
||||
};
|
||||
this.schema2 = {
|
||||
properties: {
|
||||
roadTransportPhoto: { title: '', type: 'string', ui: { hidden: true } },
|
||||
roadTransportPhotoWatermark: {
|
||||
type: 'string',
|
||||
title: '分享海报',
|
||||
ui: {
|
||||
...IMAGECONFIG,
|
||||
descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸750px* 1624 px)。',
|
||||
change: args => {
|
||||
if (args.type === 'success') {
|
||||
this.sf2.setValue('/roadTransportPhoto', args.fileList[0].response.data.fullFilePath);
|
||||
}
|
||||
},
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
share: { title: '', type: 'string', ui: { hidden: true } },
|
||||
shareWatermark: {
|
||||
type: 'string',
|
||||
title: '分享图',
|
||||
ui: {
|
||||
...IMAGECONFIG,
|
||||
descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸 856px * 688px)。',
|
||||
change: args => {
|
||||
if (args.type === 'success') {
|
||||
this.sf2.setValue('/share', args.fileList[0].response.data.fullFilePath);
|
||||
}
|
||||
},
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
take: { title: '', type: 'string', ui: { hidden: true } },
|
||||
takeWatermark: {
|
||||
type: 'string',
|
||||
title: '受邀海报',
|
||||
ui: {
|
||||
...IMAGECONFIG,
|
||||
descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸750px* 1624 px)。',
|
||||
change: args => {
|
||||
if (args.type === 'success') {
|
||||
this.sf2.setValue('/take', args.fileList[0].response.data.fullFilePath);
|
||||
}
|
||||
},
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
complianceRemark: {
|
||||
title: '分享文案',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
placeholder: '请不要超过50个字',
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 }
|
||||
}
|
||||
}
|
||||
},
|
||||
required: ['roadTransportPhotoWatermark', 'shareWatermark', 'takeWatermark', 'complianceRemark']
|
||||
};
|
||||
}
|
||||
private uploadBefore = (file: any, fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt1M = file.size / 1024 / 1024 < 2;
|
||||
const fileType = 'image/png,image/jpeg';
|
||||
if (fileType.indexOf(file.type) === -1) {
|
||||
this.service.msgSrv.warning('图片格式不正确!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
if (!isLt1M) {
|
||||
// this.service.msgSrv.warning('图片需小于1M');
|
||||
this.service.msgSrv.warning('图片大小超过2M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt1M);
|
||||
observer.complete();
|
||||
});
|
||||
};
|
||||
changeAuto(value: any) {
|
||||
console.log(value);
|
||||
if(value == '2') {
|
||||
this.auditTimeStatus = true
|
||||
} else {
|
||||
this.auditTimeStatus = false
|
||||
}
|
||||
}
|
||||
private getImageModel(args: any, key: any) {
|
||||
return [
|
||||
{
|
||||
uid: key,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: args.fileList[0].response.url,
|
||||
response: {
|
||||
url: args.fileList[0].response.url
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:23:05
|
||||
* @LastEditTime : 2022-03-09 14:08:38
|
||||
* @LastEditTime : 2022-04-27 11:28:48
|
||||
* @LastEditors : Shiming
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\sys-setting.module.ts
|
||||
@ -38,6 +38,7 @@ import { OrganizationManagementComponent } from './components/organization-manag
|
||||
import { OrganizationModalComponent } from './components/organization-management/organization-modal/organization-modal.component';
|
||||
import { ApiAuthModalComponent } from './components/organization-management/api-auth-modal/api-auth-modal.component';
|
||||
import { MenuTreeComponent } from './components/organization-management/menu-tree/menu-tree.component';
|
||||
import { PartnerSystemConfigComponent } from './components/config/config.component';
|
||||
|
||||
const COMPONENTS = [
|
||||
StaffManagementComponent,
|
||||
@ -57,7 +58,8 @@ const COMPONENTS = [
|
||||
InsuranceSetComponent,
|
||||
NoTeManagementComponent,
|
||||
SmsTemplateComponent,
|
||||
OrganizationManagementComponent
|
||||
OrganizationManagementComponent,
|
||||
PartnerSystemConfigComponent
|
||||
];
|
||||
const NOTROUTECOMPONENTS = [
|
||||
BuyerTranspowerComponent,
|
||||
|
||||
Reference in New Issue
Block a user