From 5e593b9ec7085fb7f4d979ab884f780ea8c1bc53 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 26 Apr 2022 21:14:53 +0800 Subject: [PATCH] fix bug --- .../rebate-setting/add/add.component.ts | 49 ++++++++++--------- .../components/list/edit/edit.component.ts | 9 +++- 2 files changed, 33 insertions(+), 25 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 2726272e..6e0b851b 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 20:52:29 + * @LastEditTime : 2022-04-26 21:06:50 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -145,23 +145,24 @@ export class ParterRebateManageMentAddComponent implements OnInit { } save() { console.log(this.configName); - if(!this.configName) { - this.service.msgSrv.warning('请输入配置名称!'); - return - } - if(!this.accountingRate) { - this.service.msgSrv.warning('请输入固定结算费率!'); - return - } - if(!this.partnerType) { - this.service.msgSrv.warning('请选择合伙人范围!'); - return - } - if(this.partnerType == '3' && this.partnerPeopleList?.length == 0) { - this.service.msgSrv.warning('请选择合伙人!'); - return - } - this.partnerPeopleList.forEach((element: any) => { + // if(!this.configName) { + // this.service.msgSrv.warning('请输入配置名称!'); + // return + // } + // if(!this.accountingRate) { + // this.service.msgSrv.warning('请输入固定结算费率!'); + // return + // } + // if(!this.partnerType) { + // this.service.msgSrv.warning('请选择合伙人范围!'); + // return + // } + // if(this.partnerType == '3' && this.partnerPeopleList?.length == 0) { + // this.service.msgSrv.warning('请选择合伙人!'); + // return + // } + this.table.data.forEach((element: any) => { + console.log(element); }); const params = { @@ -175,12 +176,12 @@ export class ParterRebateManageMentAddComponent implements OnInit { remarke: this.remarke, partnerType: this.partnerType }; - this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => { - if (res) { - this.service.msgSrv.success('新增成功!'); - this.router.navigate(['/partner/rebate/setting']); - } - }); + // this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => { + // if (res) { + // this.service.msgSrv.success('新增成功!'); + // this.router.navigate(['/partner/rebate/setting']); + // } + // }); } initData(id:string) { this.service.request(this.service.$api_get_getPartnerRebateConfigInfo, {id: id}).subscribe((res: any) => { diff --git a/src/app/routes/vehicle/components/list/edit/edit.component.ts b/src/app/routes/vehicle/components/list/edit/edit.component.ts index 95573d49..d614e420 100644 --- a/src/app/routes/vehicle/components/list/edit/edit.component.ts +++ b/src/app/routes/vehicle/components/list/edit/edit.component.ts @@ -56,7 +56,8 @@ export class VehicleComponentsListEditComponent implements OnInit { // 依据类型初始表单 this.schema = { properties: { - carProtocal: { + carProtocal: { title: '', type: 'string', ui: { hidden: true } }, + carProtocalWatermark: { type: 'string', title: '车主申明/挂靠协议', ui: { @@ -72,6 +73,11 @@ export class VehicleComponentsListEditComponent implements OnInit { appId: this.envSrv.env.appId, }, name: 'multipartFile', + change: args => { + if (args.type === 'success') { + this.sf.setValue('/carProtocal', args.fileList[0].response.data.fullFilePath); + } + }, beforeUpload: (file: any, fileList: any) => { return new Observable((observer: Observer) => { const isLt1M = file.size / 1024 / 1024 < 5; @@ -114,6 +120,7 @@ export class VehicleComponentsListEditComponent implements OnInit { const params ={ carProtocal: this.sf.value.carProtocal, + carProtocalWatermark: this.sf.value.carProtocalWatermark, id: this.i.id } this.service.request(this.service.$api_get_upLoadCarProtocal, params).subscribe((res) => {