This commit is contained in:
wangshiming
2022-04-26 21:14:53 +08:00
parent 15b1ce3601
commit 5e593b9ec7
2 changed files with 33 additions and 25 deletions

View File

@ -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) => {

View File

@ -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<boolean>) => {
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) => {