fix bug
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
<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>
|
||||
<nz-input-number [(ngModel)]="personServe" [nzMin]="0" [nzMax]="100" [nzPrecision]="2" [nzStep]="0.01"></nz-input-number>
|
||||
<span> %手续费 </span>
|
||||
</div>
|
||||
</se>
|
||||
@ -15,7 +15,7 @@
|
||||
<div>
|
||||
按照提现金额收取
|
||||
<nz-input-number
|
||||
[(ngModel)]="enterpriseValue"
|
||||
[(ngModel)]="enterpriseServe"
|
||||
[nzMin]="0"
|
||||
[nzMax]="100"
|
||||
[nzPrecision]="2"
|
||||
@ -52,12 +52,12 @@
|
||||
<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>
|
||||
<nz-input-number style="margin: 0 10px; " [(ngModel)]="silenceClient" [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>
|
||||
<nz-input-number style="margin: 0 10px; " [(ngModel)]="loseClient" [nzMin]="0" [nzMax]="3000" [nzPrecision]="2" [nzStep]="0.1"></nz-input-number>
|
||||
<span>天内没有交易订单的视为“流失客户”</span>
|
||||
</div>
|
||||
<div nz-col nzSpan="24">
|
||||
@ -66,15 +66,13 @@
|
||||
</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>
|
||||
<button class="ml-lg" nz-button nzSize="large" nzType="primary" (click)="save()">保存</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
|
||||
@ -92,7 +90,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div >
|
||||
<nz-radio-group [(ngModel)]="MonthDay" (ngModelChange)="MonthDayChange(MonthDay)" style="display: block">
|
||||
<label nz-radio [nzValue]="2" class="mt-sm"
|
||||
|
||||
@ -4,6 +4,8 @@ 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 NOJSONTYPE = new Set([8, 12, 13]);
|
||||
|
||||
const IMAGECONFIG = {
|
||||
previewFile: (file: NzUploadFile) => of(file.url),
|
||||
action: apiConf.waterFileUpload,
|
||||
@ -35,12 +37,16 @@ export class PartnerSystemConfigComponent implements OnInit, OnChanges {
|
||||
isEveryDay: false,
|
||||
isEveryWeek: false
|
||||
};
|
||||
personValue!: number;
|
||||
enterpriseValue!: number;
|
||||
auditValue!: number;
|
||||
auditTime!: any;
|
||||
auditTimeStatus: boolean = false;
|
||||
labelWidth = 250;
|
||||
|
||||
personServe!: number; // 个人提现手续费
|
||||
enterpriseServe!: number; // 企业提现手续费
|
||||
auditValue!: boolean; // 提现审核
|
||||
auditTime!: any; // 审核时间
|
||||
silenceClient!: number; // 沉默客户
|
||||
loseClient!: number; // 流失客户
|
||||
everyDay: boolean = false;
|
||||
auditTimeStatus: boolean = false;
|
||||
MonthDay: boolean = false;
|
||||
time: Date | null = null;
|
||||
defaultOpenValue = new Date(0, 0, 0, 0, 0, 0);
|
||||
@ -107,7 +113,9 @@ export class PartnerSystemConfigComponent implements OnInit, OnChanges {
|
||||
constructor(private service: SystemService) {}
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
if (changes.configList) {
|
||||
console.log(changes.configList);
|
||||
console.log(changes.configList.currentValue);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -322,6 +330,61 @@ export class PartnerSystemConfigComponent implements OnInit, OnChanges {
|
||||
this.auditTimeStatus = false;
|
||||
}
|
||||
}
|
||||
save() {
|
||||
console.log();
|
||||
let params : any = {
|
||||
personServe: this.personServe, // 个人提现手续费
|
||||
enterpriseServe: this.enterpriseServe, // 企业提现手续费
|
||||
auditValue: this.auditValue, // 提现审核
|
||||
auditTime: this.auditTime, // 审核时间
|
||||
silenceClient: this.silenceClient, // 沉默客户
|
||||
loseClient: this.loseClient // 流失客户
|
||||
};
|
||||
if(this.auditTime == '2') {
|
||||
// 每天
|
||||
if(this.everyDay){
|
||||
console.log(this.everyDayData);
|
||||
params.everyDayData = this.everyDayData
|
||||
} else if(this.MonthDay) {
|
||||
// 每周
|
||||
params.MonthDayData = this.MonthDayData
|
||||
console.log(this.MonthDayData);
|
||||
}
|
||||
}
|
||||
console.log( JSON.stringify(params));
|
||||
console.log( this.configList);
|
||||
const pra = Object.assign({}, ...this.configList)
|
||||
pra.remark = JSON.stringify(params)
|
||||
console.log(pra);
|
||||
|
||||
this.service.request(this.service.$api_update_config_batch, pra).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('修改配置成功');
|
||||
setTimeout(() => {
|
||||
this.getConfigList(this.selectedTab);
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
getConfigList(selectedTab: any) {
|
||||
this.selectedTab = selectedTab;
|
||||
this.service.request(this.service.$api_get_config_by_parent_id, { id: selectedTab?.id }).subscribe((res: Array<any>) => {
|
||||
if (res?.length > 0) {
|
||||
res = res.map(item => ({
|
||||
...item,
|
||||
remark: item.remark ? JSON.parse(item.remark) : null,
|
||||
itemValue: item?.itemValue ? (NOJSONTYPE.has(item?.itemType) ? item?.itemValue : JSON.parse(item?.itemValue)) : item?.itemValue,
|
||||
itemData: item.itemData ? JSON.parse(item.itemData) : item.itemData
|
||||
}));
|
||||
const hiddenType = res.find(item => item.itemType === 7 || item.itemType === 999);
|
||||
this.labelWidth = hiddenType ? 0 : 250;
|
||||
this.configList = res;
|
||||
} else {
|
||||
this.configList = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
private getImageModel(args: any, key: any) {
|
||||
return [
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:23:05
|
||||
* @LastEditTime : 2022-04-27 15:52:30
|
||||
* @LastEditTime : 2022-04-27 20:54:10
|
||||
* @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,
|
||||
@ -58,6 +59,7 @@ const COMPONENTS = [
|
||||
NoTeManagementComponent,
|
||||
SmsTemplateComponent,
|
||||
OrganizationManagementComponent,
|
||||
PartnerSystemConfigComponent
|
||||
];
|
||||
const NOTROUTECOMPONENTS = [
|
||||
BuyerTranspowerComponent,
|
||||
|
||||
Reference in New Issue
Block a user