解决冲突
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-02-24 20:09:49
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-26 20:44:56
|
||||
* @LastEditTime : 2022-04-27 13:38:57
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -102,7 +102,7 @@
|
||||
style="max-width: 400px; min-width: 200px; margin-left: 40px"
|
||||
rows="4"
|
||||
nz-input
|
||||
[(ngModel)]="remarke"
|
||||
[(ngModel)]="remark"
|
||||
></textarea>
|
||||
</sv>
|
||||
</sv-container>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-03-21 09:26:45
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-26 21:06:50
|
||||
* @LastEditTime : 2022-04-27 13:44:19
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -23,7 +23,7 @@ import { ParterRebateManageMentAddPartnerListComponent } from '../add-partnerlis
|
||||
})
|
||||
export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
@ViewChild('table') table!: any;
|
||||
titleText :string= '新增';
|
||||
titleText: string = '新增';
|
||||
tabelData: any;
|
||||
tabelType: any;
|
||||
formData: any;
|
||||
@ -31,7 +31,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
hiden: boolean = false;
|
||||
configName: string = '';
|
||||
partnerType: string = '';
|
||||
remarke: string = '';
|
||||
remark: string = '';
|
||||
accountingRate: Number = 0;
|
||||
priority: string = '';
|
||||
partnerPeopleList: any = [];
|
||||
@ -50,7 +50,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
private modal: NzModalService,
|
||||
public shipperservice: ShipperBaseService
|
||||
) {}
|
||||
columns: STColumn[] =[]
|
||||
columns: STColumn[] = [];
|
||||
initSF(data?: any) {
|
||||
this.schema1 = {
|
||||
properties: {
|
||||
@ -59,7 +59,6 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
title: '',
|
||||
disabled: this.hiden,
|
||||
ui: {
|
||||
|
||||
widget: 'tinymce',
|
||||
loadingTip: 'loading...',
|
||||
config: {
|
||||
@ -70,7 +69,7 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
};
|
||||
this.columns= [
|
||||
this.columns = [
|
||||
{
|
||||
title: '合伙人名称',
|
||||
index: 'enterpriseName',
|
||||
@ -88,8 +87,8 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
{
|
||||
text: '移除',
|
||||
click: _record => this.delete(_record),
|
||||
iif: ()=> {
|
||||
return !this.hiden
|
||||
iif: () => {
|
||||
return !this.hiden;
|
||||
},
|
||||
acl: { ability: ['AbnormalAppear-reply'] }
|
||||
}
|
||||
@ -98,9 +97,9 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
];
|
||||
}
|
||||
ngOnInit() {
|
||||
if(this.ar.snapshot?.queryParams?.id) {
|
||||
this.titleText= '查看'
|
||||
this.hiden= true
|
||||
if (this.ar.snapshot?.queryParams?.id) {
|
||||
this.titleText = '查看';
|
||||
this.hiden = true;
|
||||
this.initSF();
|
||||
this.initData(this.ar.snapshot?.queryParams?.id);
|
||||
}
|
||||
@ -144,27 +143,34 @@ 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
|
||||
// }
|
||||
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
|
||||
}
|
||||
let real = false;
|
||||
this.table.data.forEach((element: any) => {
|
||||
console.log(element);
|
||||
|
||||
if (element.startAmount > element.endAmount) {
|
||||
real = true;
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (real) {
|
||||
this.service.msgSrv.warning('初始业务量不能超过到达业务量!');
|
||||
return;
|
||||
}
|
||||
|
||||
const params = {
|
||||
accountingRate: this.accountingRate,
|
||||
configName: this.configName,
|
||||
@ -173,19 +179,19 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
priority: this.priority, // 优先级
|
||||
partnerIds: this.partnerId,
|
||||
ruleDescription: this.sf.value.ruleDescription,
|
||||
remarke: this.remarke,
|
||||
remark: this.remark,
|
||||
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) => {
|
||||
if(res) {
|
||||
initData(id: string) {
|
||||
this.service.request(this.service.$api_get_getPartnerRebateConfigInfo, { id: id }).subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.configName = res?.configName;
|
||||
this.accountingRate = res?.accountingRate;
|
||||
this.accountingRate = res?.accountingRate;
|
||||
@ -194,10 +200,10 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
this.partnerType = res?.partnerType + '';
|
||||
this.partnerPeopleList = res?.partnerListVOs;
|
||||
this.priority = res?.priority + '';
|
||||
this.formData = {ruleDescription: res?.ruleDescription};
|
||||
this.remarke = res.remark;
|
||||
this.formData = { ruleDescription: res?.ruleDescription };
|
||||
this.remark = res.remark;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
changePartner(value: any) {
|
||||
if (value == '3') {
|
||||
@ -206,5 +212,4 @@ export class ParterRebateManageMentAddComponent implements OnInit {
|
||||
this.addStatus = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user