From 0f4a05e2bfdf3c1444d42aa09e43480ada305807 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 25 Apr 2022 15:40:16 +0800 Subject: [PATCH 1/9] fix bug --- .../components/role-management/edit/edit.component.ts | 3 --- .../components/role-management/menu/menu.component.ts | 10 +++++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts index f595ee0a..50b3e8db 100644 --- a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts +++ b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts @@ -105,9 +105,6 @@ console.log(this.params.infoUrl) authority: auths.authority, authorityAssistId: auths.authorityAssistId }; - if(this.changeValue) { - params.isUpdateAuthority = 1 - } if (this.params.id === 0) { delete params.id; diff --git a/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts b/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts index 3ac047cb..e5d0309a 100644 --- a/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts +++ b/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts @@ -329,9 +329,15 @@ export class SettingMenuComponent implements OnInit, OnChanges { } // 再次请求,需要判断暂存权限数组是否已有此权限 againGetBtn(id: any, origin: any) { - if (this.authority && this.authority.length === 0) { + if (this.authority && this.authority.length !== 0) { + console.log('1111'); + const buttonAuthorityIds: any = []; + console.log(origin); + console.log(origin.checked); + if (origin.checked) { + origin.buttonInfoList.forEach((btnItem: { functionButtonId: any; checked: boolean }) => { btnItem.checked = true; buttonAuthorityIds.push(btnItem.functionButtonId); @@ -339,6 +345,8 @@ export class SettingMenuComponent implements OnInit, OnChanges { this.authority.push({ authorityId: origin.key, buttonAuthorityIds, isUpdateAuthority: 1 }); } } else { + console.log('22222'); + if (origin.checked) { //菜单勾选情况下 if (this.authority.some(item => item.authorityId === id)) { From ac0832aa50aeec03b9317c2d1c2a4c7f2b4fd866 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 25 Apr 2022 15:58:23 +0800 Subject: [PATCH 2/9] fix bug --- .../components/rebate-setting/add/add.component.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts index 15e68e18..54c686a7 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-21 09:26:45 * @LastEditors : Shiming - * @LastEditTime : 2022-04-22 15:01:43 + * @LastEditTime : 2022-04-25 15:52:41 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -131,13 +131,16 @@ export class ParterRebateManageMentAddComponent implements OnInit { }); } save() { + console.log(this.partnerId); + console.log(this.partnerId.join(',')); + const params = { accountingRate: this.accountingRate, configName: this.configName, configType: this.configType, rebateConfigLineDTO: this.table.data, priority: this.priority, // 优先级 - partnerId: this.partnerId.join(','), + partnerIds: this.partnerId, ruleDescription: this.sf.value.ruleDescription, remarke: this.remarke, partnerType: this.partnerType @@ -153,8 +156,10 @@ export class ParterRebateManageMentAddComponent implements OnInit { } changePartner(value: any) { console.log(value); - if (value) { + if (value == '3') { this.addStatus = true; + } else { + this.addStatus = false; } } } From ff6fd0b8011b83d081cc99ef4d54dd7e985237b0 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 25 Apr 2022 16:11:28 +0800 Subject: [PATCH 3/9] fix bug --- .../withdrawals-record/withdrawals-record.component.ts | 8 ++++++-- .../withdrawals-record/withdrawals-record.component.ts | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts index 75a921ef..5d92af1f 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts @@ -206,9 +206,13 @@ export class WithdrawalsRecordComponent { accountType: { type: 'string', title: '账户类型', + enum: [ + {label: '全部', value: ''}, + {label: '个人合伙人', value: '4'}, + {label: '企业合伙人', value: '5'} + ], ui: { - widget: 'dict-select', - params: { dictKey: 'bank:type' }, + widget: 'select', placeholder: '请选择', visibleIf: { expand: (value: boolean) => value diff --git a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts index ad7c8ead..b26884f4 100644 --- a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts @@ -236,9 +236,13 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni accountType: { type: 'string', title: '账户类型', + enum: [ + {label: '全部', value: ''}, + {label: '个人合伙人', value: '4'}, + {label: '企业合伙人', value: '5'} + ], ui: { - widget: 'dict-select', - params: { dictKey: 'bank:type' }, + widget: 'select', placeholder: '请选择', visibleIf: { expand: (value: boolean) => value From f4743c180be320742c3b0f3838c5fbd7b87d43e1 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 25 Apr 2022 17:21:34 +0800 Subject: [PATCH 4/9] fix bug --- .../withdrawals-record.component.ts | 9 ------- .../rebate-setting/add/add.component.ts | 4 ++- .../rebate-setting.component.ts | 8 +++--- .../role-management/edit/edit.component.ts | 1 + .../role-management/menu/menu.component.ts | 27 +++++++++++++++++-- 5 files changed, 33 insertions(+), 16 deletions(-) diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts index 5d92af1f..6f683bd3 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-record.component.ts @@ -177,15 +177,6 @@ export class WithdrawalsRecordComponent { placeholder: '请输入' } }, - // refundStatus: { - // type: 'string', - // title: '提现状态', - // ui: { - // widget: 'dict-select', - // params: { dictKey: 'refund:apply:status' }, - // placeholder: '请选择' - // } - // }, createTime: { title: '提现时间', type: 'string', diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts index 54c686a7..d97495d1 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-21 09:26:45 * @LastEditors : Shiming - * @LastEditTime : 2022-04-25 15:52:41 + * @LastEditTime : 2022-04-25 16:19:24 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -88,6 +88,8 @@ export class ParterRebateManageMentAddComponent implements OnInit { }; } ngOnInit() { + console.log(this.ar.snapshot); + this.addStatus = false; this.initSF(); } diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts index ee9b5b9d..5e7828bc 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts @@ -125,7 +125,7 @@ export class ParterRebateManageMentSettingComponent implements OnInit { buttons: [ { text: '查看', - click: _record => this.viewEvaluate(_record), + click: _record => this.configAction(_record), }, { text: '禁用', @@ -187,9 +187,9 @@ export class ParterRebateManageMentSettingComponent implements OnInit { } }); } - configAction() { - this.router.navigate(['/partner/rebate/setting/add/', 1]) - } + configAction(value?: any) { + this.router.navigate(['/partner/rebate/setting/add/', '0'], {queryParams: value}) + } /** * 重置表单 */ diff --git a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts index 50b3e8db..b91344a8 100644 --- a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts +++ b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts @@ -62,6 +62,7 @@ export class SettingRoleEditComponent implements OnInit { } getRoleInfo() { + this.roleInfoData = [] const params = { id: this.params.id }; diff --git a/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts b/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts index e5d0309a..8b031d24 100644 --- a/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts +++ b/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts @@ -19,6 +19,7 @@ export class SettingMenuComponent implements OnInit, OnChanges { defaultCheckedKeys: any[] = []; functionList: any[] = []; allChecked = false; + changeIFT = false; indeterminate = true; @Input() type = 'edit'; @Input() source = ''; @@ -58,7 +59,7 @@ export class SettingMenuComponent implements OnInit, OnChanges { }); } addAuthority(origin: { id: any; all: any }, node: { buttonInfoList: any[] }, item?: { checked: any; functionButtonId: any }) { - console.log(origin,node); + console.log(origin); if (this.authority?.length && this.authority.filter(authItem => authItem.authorityId === origin.id).length) { // 判断此菜单权限是否已经存在权限列表中 @@ -69,6 +70,23 @@ export class SettingMenuComponent implements OnInit, OnChanges { menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型 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 (menuItem.buttonAuthorityIds.indexOf(item.functionButtonId) === -1) { @@ -329,7 +347,12 @@ export class SettingMenuComponent implements OnInit, OnChanges { } // 再次请求,需要判断暂存权限数组是否已有此权限 againGetBtn(id: any, origin: any) { - if (this.authority && this.authority.length !== 0) { + console.log(id,origin); + + console.log(this.authority); + console.log(this.authority.length); + + if ((this.authority && this.authority.length !== 0)) { console.log('1111'); const buttonAuthorityIds: any = []; From 636a725c08ecd0225a8a5d0ad87e37cc6389fa03 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 25 Apr 2022 19:58:39 +0800 Subject: [PATCH 5/9] fix bug --- .../rebate-setting/add/add.component.html | 12 ++++---- .../rebate-setting/add/add.component.ts | 30 +++++++++++++++++-- .../services/rebate-management.service.ts | 4 ++- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html index 08f89e5b..8aa67c55 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -4,11 +4,11 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-04-24 13:42:10 + * @LastEditTime : 2022-04-25 19:58:03 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> - + @@ -51,7 +51,7 @@ - + 1 2 3 @@ -61,17 +61,17 @@ - - + -
+
{ + console.log(res); + if(res) { + this.configName = res?.configName; + this.accountingRate = res?.accountingRate; + this.accountingRate = res?.accountingRate; + this.configType = res?.configType + ''; + this.tabelData = res?.partnerRebateConfigLineVOList; + this.partnerType = res?.partnerType + ''; + this.partnerPeopleList = res?.partnerListVOs; + this.priority = res?.priority + ''; + this.formData = res?.ruleDescription; + } + }) + } changePartner(value: any) { console.log(value); if (value == '3') { diff --git a/src/app/routes/partner/rebate-management/services/rebate-management.service.ts b/src/app/routes/partner/rebate-management/services/rebate-management.service.ts index fd12644c..b67abe19 100644 --- a/src/app/routes/partner/rebate-management/services/rebate-management.service.ts +++ b/src/app/routes/partner/rebate-management/services/rebate-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-10 11:19:00 * @LastEditors : Shiming - * @LastEditTime : 2022-03-29 11:26:38 + * @LastEditTime : 2022-04-25 19:23:25 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\services\\rebate-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -27,6 +27,8 @@ export class RebateManagementService extends BaseService { // 运营端查询合伙人返佣 public $api_get_getIncomeByBillpage = '/api/bpc/partnerIncomeHead/getIncomeByBillpage'; + // 获取返佣模板信息 + public $api_get_getPartnerRebateConfigInfo = '/api/mdc/rebateConfig/getPartnerRebateConfigInfo';   // 查询合伙人信息-分页 public $api_get_partner_page = '/api/mdc/partner/list/page'; constructor(public injector: Injector) { From 5b1d5d7ea874eaceb2d509f5dce169b483391230 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 10:21:05 +0800 Subject: [PATCH 6/9] fix bug --- .../components/edit/edit.component.ts | 4 + .../components/list/list.component.html | 11 ++ .../components/list/list.component.ts | 34 ++++-- .../components/config/config.component.html | 106 +++++++----------- .../components/config/config.component.ts | 71 +++--------- .../role-management/edit/edit.component.ts | 2 +- .../role-management/menu/menu.component.ts | 50 ++------- 7 files changed, 106 insertions(+), 172 deletions(-) diff --git a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts index bd01de45..1ae908ee 100644 --- a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts +++ b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts @@ -34,6 +34,10 @@ export class ParterChannelSalesEditComponent implements OnInit { this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => { if(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(); } }); diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.html b/src/app/routes/partner/channel-sales/components/list/list.component.html index 589c32e9..8b7dd971 100644 --- a/src/app/routes/partner/channel-sales/components/list/list.component.html +++ b/src/app/routes/partner/channel-sales/components/list/list.component.html @@ -1,3 +1,13 @@ + -

货主端配置

-

图片配置

- - - - - -
可输入字符
- -
-
-

短信配置

+

提现手续费配置

- -

配置用户端登陆页注册帐号、修改密码、修改手机号时的短信内容

- + +
+ 按照提现金额收取 + + + %手续费 + +
+
+ +
+ 按照提现金额收取 + + + %手续费 + +
-

通知配置

+

合伙人提现配置

-
- - - +
+ + + + + + +
-

客服电话配置

+

客服电话配置

@@ -84,10 +86,6 @@

通知配置

- - - -
@@ -146,42 +144,24 @@
- +
- - - + + + - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
+
+ + + + + + + + + +
\ No newline at end of file diff --git a/src/app/routes/partner/system-config/components/config/config.component.ts b/src/app/routes/partner/system-config/components/config/config.component.ts index 27a32a88..b7489b98 100644 --- a/src/app/routes/partner/system-config/components/config/config.component.ts +++ b/src/app/routes/partner/system-config/components/config/config.component.ts @@ -4,7 +4,7 @@ import { Observable, Observer } from 'rxjs'; import { ConfigService } from '../../services/config.service'; @Component({ - selector: 'app-config', + selector: 'app-parterl-config', templateUrl: './config.component.html', styleUrls: ['./config.component.less'] }) @@ -15,12 +15,17 @@ export class PartnerSystemConfigComponent implements OnInit { isEveryDay: false, isEveryWeek: false }; + personValue!: number; + enterpriseValue!: number; + auditValue!: number; + auditTime!: any; + auditTimeStatus: boolean = false tabs = [ { - name: '货主端配置' + name: '基础配置' }, { - name: '司机端配置' + name: '分享配置' } ]; selectedTab = 0; @@ -37,7 +42,6 @@ export class PartnerSystemConfigComponent implements OnInit { i: any; schema!: SFSchema; - schema2!: SFSchema; imageConfig = { widget: 'upload', @@ -64,61 +68,8 @@ export class PartnerSystemConfigComponent implements OnInit { } initSF() { + 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: { sysMinLogo: { type: 'string', @@ -221,7 +172,11 @@ export class PartnerSystemConfigComponent implements OnInit { required: ['sysMinLogo', 'sysMaxLogo', 'sysMaxLogo1', 'sysMaxLogo2', 'sysMaxLogo3', 'sysMaxLogo4'] }; } + auditTimeChange(ss: any,value: any) { + console.log(value); + this.auditTimeStatus = true + } private uploadBefore = (file: any, fileList: any) => { return new Observable((observer: Observer) => { const isLt1M = file.size / 1024 / 1024 < 2; diff --git a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts index b91344a8..9d00f002 100644 --- a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts +++ b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts @@ -83,7 +83,7 @@ console.log(this.params.infoUrl) close() { this.modal.destroy(); } - changeIF(value: boolean) { + changeIF(value: any) { console.log(value); console.log('54545'); this.changeValue = true diff --git a/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts b/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts index 8b031d24..4f6c67a5 100644 --- a/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts +++ b/src/app/routes/sys-setting/components/role-management/menu/menu.component.ts @@ -1,5 +1,5 @@ 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 { NzTreeComponent } from 'ng-zorro-antd/tree'; import { SystemService } from '../../../services/system.service'; @@ -19,7 +19,6 @@ export class SettingMenuComponent implements OnInit, OnChanges { defaultCheckedKeys: any[] = []; functionList: any[] = []; allChecked = false; - changeIFT = false; indeterminate = true; @Input() type = 'edit'; @Input() source = ''; @@ -27,7 +26,6 @@ export class SettingMenuComponent implements OnInit, OnChanges { @Input() isAuthorityIdDTOList: any[] = []; @Input() authorityAssistId: any[] = []; @Input() roleId: any; - @Output() changeIF= new EventEmitter(); @Output() changeData = new EventEmitter(); constructor(public service: SystemService, private cdr: ChangeDetectorRef, private envSrv: EAEnvironmentService) {} ngOnChanges(changes: SimpleChanges): void { @@ -36,9 +34,9 @@ export class SettingMenuComponent implements OnInit, OnChanges { this.authority = this.isAuthorityIdDTOList || []; } } - if (changes.authorityAssistId) { - this.defaultCheckedKeys = [...this.authorityAssistId]; - } + // if (changes.authorityAssistId) { + // this.defaultCheckedKeys = [...this.authorityAssistId]; + // } } 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 }) { - console.log(origin); + console.log(origin,node); if (this.authority?.length && this.authority.filter(authItem => authItem.authorityId === origin.id).length) { // 判断此菜单权限是否已经存在权限列表中 // 当前操作菜单id存在权限列表里 this.authority.forEach(menuItem => { + console.log(menuItem); + console.log(item); if (menuItem.authorityId === origin.id) { menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型 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 (menuItem.buttonAuthorityIds.indexOf(item.functionButtonId) === -1) { // 如果该按钮在数据权限数组中不存在 - console.log('不存在'); - menuItem.buttonAuthorityIds.push(item.functionButtonId); } } else { - console.log('存在'); if (menuItem.buttonAuthorityIds && menuItem.buttonAuthorityIds.length) { menuItem.buttonAuthorityIds.forEach((btnItem: any, index: any) => { if (btnItem === item.functionButtonId) { @@ -347,20 +326,9 @@ export class SettingMenuComponent implements OnInit, OnChanges { } // 再次请求,需要判断暂存权限数组是否已有此权限 againGetBtn(id: any, origin: any) { - console.log(id,origin); - - console.log(this.authority); - console.log(this.authority.length); - - if ((this.authority && this.authority.length !== 0)) { - console.log('1111'); - + if (this.authority && this.authority.length === 0) { const buttonAuthorityIds: any = []; - console.log(origin); - console.log(origin.checked); - if (origin.checked) { - origin.buttonInfoList.forEach((btnItem: { functionButtonId: any; checked: boolean }) => { btnItem.checked = true; buttonAuthorityIds.push(btnItem.functionButtonId); @@ -368,8 +336,6 @@ export class SettingMenuComponent implements OnInit, OnChanges { this.authority.push({ authorityId: origin.key, buttonAuthorityIds, isUpdateAuthority: 1 }); } } else { - console.log('22222'); - if (origin.checked) { //菜单勾选情况下 if (this.authority.some(item => item.authorityId === id)) { From a8a1d9ed65cc4d66d084d0a34703b310fbe92f70 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 10:59:33 +0800 Subject: [PATCH 7/9] fix bug --- .../components/edit/edit.component.ts | 23 +++++++++++++------ .../components/list/list.component.ts | 1 + .../rebate-setting/add/add.component.html | 18 +++++++-------- .../rebate-setting/add/add.component.ts | 8 +++++-- 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts index 1ae908ee..bd12ea3a 100644 --- a/src/app/routes/partner/channel-sales/components/edit/edit.component.ts +++ b/src/app/routes/partner/channel-sales/components/edit/edit.component.ts @@ -33,16 +33,25 @@ export class ParterChannelSalesEditComponent implements OnInit { if(!this.sts) { this.service.request(this.service.$api_getChannelSalesInfo, {id:this.i?.id}).subscribe(res => { if(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(); + let value1 = Object.assign({}, res) + delete value1.employeeVO; + this.record = value1; + console.log(value1); + console.log(this.record); + + let value = res.employeeVO; + let yeeVO = {label: value.empName+"/"+value.empNo, value: value.empNo} + console.log(yeeVO); + + setTimeout(()=>{ + this.sf.getProperty('/employeeVO')!.schema.enum = [yeeVO]; + this.sf.getProperty('/employeeVO')!.widget.reset([yeeVO]); + }) + + this.initSF(); } }); } - this.initSF(); } initSF() { diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.ts b/src/app/routes/partner/channel-sales/components/list/list.component.ts index 2a5a8db1..88b791a4 100644 --- a/src/app/routes/partner/channel-sales/components/list/list.component.ts +++ b/src/app/routes/partner/channel-sales/components/list/list.component.ts @@ -122,6 +122,7 @@ export class ParterChannelSalesListComponent implements OnInit { title: '操作', className: 'text-center', width: '120px', + fixed: 'right', buttons: [ { text: '编辑', diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html index 8aa67c55..0482f6e6 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-04-25 19:58:03 + * @LastEditTime : 2022-04-26 10:53:50 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -12,16 +12,16 @@ - + 固定结算费率配置 -  % +  % 业务量和管理费比例配置 - + @@ -36,7 +36,7 @@ 关联合伙人配置 - + @@ -51,7 +51,7 @@ - + 1 2 3 @@ -60,13 +60,13 @@ - - + - + diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts index d85611c3..71097915 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-21 09:26:45 * @LastEditors : Shiming - * @LastEditTime : 2022-04-25 19:56:41 + * @LastEditTime : 2022-04-26 10:58:58 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -67,6 +67,7 @@ export class ParterRebateManageMentAddComponent implements OnInit { { text: '移除', click: _record => this.delete(_record), + iif: ()=> this.hiden, acl: { ability: ['AbnormalAppear-reply'] } } ] @@ -78,7 +79,9 @@ export class ParterRebateManageMentAddComponent implements OnInit { ruleDescription: { type: 'string', title: '', + disabled: this.hiden, ui: { + widget: 'tinymce', loadingTip: 'loading...', config: { @@ -176,7 +179,8 @@ export class ParterRebateManageMentAddComponent implements OnInit { this.partnerType = res?.partnerType + ''; this.partnerPeopleList = res?.partnerListVOs; this.priority = res?.priority + ''; - this.formData = res?.ruleDescription; + this.formData = {ruleDescription: res?.ruleDescription}; + this.remarke = res.remark; } }) } From 019dd90757d63e3fc0818e3fe4ba3fc0fa42ba1d Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 11:06:31 +0800 Subject: [PATCH 8/9] fix bug --- .../rebate-setting/add/add.component.ts | 56 ++++++++++--------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts index 71097915..01389bd2 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-21 09:26:45 * @LastEditors : Shiming - * @LastEditTime : 2022-04-26 10:58:58 + * @LastEditTime : 2022-04-26 11:06:25 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -49,30 +49,7 @@ export class ParterRebateManageMentAddComponent implements OnInit { private modal: NzModalService, public shipperservice: ShipperBaseService ) {} - columns: STColumn[] = [ - { - title: '合伙人名称', - index: 'enterpriseName', - width: 180, - format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '') - }, - { title: '联系人', index: 'contactName', width: 150, format: item => (item.partnerType ? `${item.contactName}` : '') }, - { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, - { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, - { - title: '操作', - width: '90px', - fixed: 'right', - buttons: [ - { - text: '移除', - click: _record => this.delete(_record), - iif: ()=> this.hiden, - acl: { ability: ['AbnormalAppear-reply'] } - } - ] - } - ]; + columns: STColumn[] =[] initSF(data?: any) { this.schema1 = { properties: { @@ -92,13 +69,40 @@ export class ParterRebateManageMentAddComponent implements OnInit { } } }; + this.columns= [ + { + title: '合伙人名称', + index: 'enterpriseName', + width: 180, + format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '') + }, + { title: '联系人', index: 'contactName', width: 150, format: item => (item.partnerType ? `${item.contactName}` : '') }, + { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, + { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, + { + title: '操作', + width: '120px', + fixed: 'right', + buttons: [ + { + text: '移除', + click: _record => this.delete(_record), + iif: ()=> { + console.log(this.hiden); + return !this.hiden + }, + acl: { ability: ['AbnormalAppear-reply'] } + } + ] + } + ]; } ngOnInit() { console.log(this.ar.snapshot.queryParams.id); if(this.ar.snapshot?.queryParams?.id) { this.titleText= '查看' this.hiden= true - + this.initSF(); this.initData(this.ar.snapshot?.queryParams?.id); } this.addStatus = false; From 5cddd9a9566a06364d0915856664b3ecc1f6b681 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 11:07:18 +0800 Subject: [PATCH 9/9] fix bug --- .../components/rebate-setting/add/add.component.ts | 4 ++-- .../components/rebate-setting/rebate-setting.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts index 01389bd2..bddf0dca 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-21 09:26:45 * @LastEditors : Shiming - * @LastEditTime : 2022-04-26 11:06:25 + * @LastEditTime : 2022-04-26 11:04:46 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -81,7 +81,7 @@ export class ParterRebateManageMentAddComponent implements OnInit { { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, { title: '操作', - width: '120px', + width: '90px', fixed: 'right', buttons: [ { diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts index 5e7828bc..49a1d8d0 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts @@ -120,7 +120,7 @@ export class ParterRebateManageMentSettingComponent implements OnInit { { title: '操作', fixed: 'right', - width: '90px', + width: '120px', className: 'text-left', buttons: [ {