add pd changes
This commit is contained in:
parent
42dba214e9
commit
62f0fff6fa
@ -20,7 +20,7 @@
|
|||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-form-field style="width: 28%">
|
<mat-form-field style="width: 28%">
|
||||||
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" (selectionChange)="getContactPerson()">
|
<mat-select placeholder="Lender Name" formControlName="fk_lender_id" (selectionChange)="getContactPerson();getProCusType($event.value)">
|
||||||
<!-- (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)" -->
|
<!-- (selectionChange)="getBillingDetails(pdMain.fk_lender_id.value)" -->
|
||||||
<mat-option> Select </mat-option>
|
<mat-option> Select </mat-option>
|
||||||
<mat-option (click)="selectedLender(LL)" *ngFor="let LL of lenderList" [value]="LL.entity_id" >
|
<mat-option (click)="selectedLender(LL)" *ngFor="let LL of lenderList" [value]="LL.entity_id" >
|
||||||
|
|||||||
@ -96,16 +96,26 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
getProCusType(){
|
getProCusType(entity_id,flag?){
|
||||||
console.log("u",this.userDetails)
|
console.log("u",this.userDetails)
|
||||||
this._pd.getEntityPreferences(this.userDetails.fk_entity_id).subscribe(Response=>{
|
this._pd.getEntityPreferences(entity_id).subscribe(Response=>{
|
||||||
if(Response['dataStatus']){
|
if(Response['dataStatus']){
|
||||||
this.pdTypeList=Response['records'].pd_types
|
this.pdTypeList=Response['records'].pd_types
|
||||||
this.customerSegmentAllList=Response['records'].customer_segments
|
this.customerSegmentAllList=Response['records'].customer_segments
|
||||||
this.productAllList=Response['records'].products
|
this.productAllList=Response['records'].products
|
||||||
|
this.productList=this.productAllList
|
||||||
this.finInstitutionList=Response['records'].financial_institutions
|
this.finInstitutionList=Response['records'].financial_institutions
|
||||||
}
|
if(flag == true){
|
||||||
this.loadFormData();
|
this.loadFormData();
|
||||||
|
}
|
||||||
|
this.getSubproductList(Response['records'].default_product)
|
||||||
|
this._PDtriggerForm.controls['fk_product_id'].setValue(Response['records'].default_product);
|
||||||
|
this._PDtriggerForm.controls['fk_subproduct_id'].setValue(Response['records'].default_sub_product);
|
||||||
|
this._PDtriggerForm.controls['fk_customer_segment'].setValue(Response['records'].default_customer_segment);
|
||||||
|
// this._PDtriggerForm.controls['fk_pd_type'].setValue(Response['records'].default_pd_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
getUserDetails(){
|
getUserDetails(){
|
||||||
@ -114,7 +124,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
this.userDetails=res['records'][0];
|
this.userDetails=res['records'][0];
|
||||||
}
|
}
|
||||||
// console.log(this.userDetails)
|
// console.log(this.userDetails)
|
||||||
this.getProCusType()
|
this.getProCusType(this.userDetails.fk_entity_id,true)
|
||||||
this.sales_and_credit_person.credit_person=[{userid:this.userDetails.userid,user_name:this.userDetails.user_first_name+' '+this.userDetails.user_last_name}]
|
this.sales_and_credit_person.credit_person=[{userid:this.userDetails.userid,user_name:this.userDetails.user_first_name+' '+this.userDetails.user_last_name}]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -211,12 +221,12 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
this._PDtriggerForm.controls['fk_customer_segment'].setValue('');
|
this._PDtriggerForm.controls['fk_customer_segment'].setValue('');
|
||||||
this._PDtriggerForm.controls['loan_amount'].setValue('');
|
this._PDtriggerForm.controls['loan_amount'].setValue('');
|
||||||
|
|
||||||
if(this.lenderShortName == "IIB"){ //FOR INDUSLAND BANK
|
// if(this.lenderShortName == "IIB"){ //FOR INDUSLAND BANK
|
||||||
// console.log("entered");
|
// // console.log("entered");
|
||||||
this._PDtriggerForm.controls['fk_product_id'].setValue("3")
|
// this._PDtriggerForm.controls['fk_product_id'].setValue("3")
|
||||||
this._PDtriggerForm.controls['fk_pd_type'].setValue("1");
|
// this._PDtriggerForm.controls['fk_pd_type'].setValue("1");
|
||||||
this.getSubproductList("3")
|
// this.getSubproductList("3")
|
||||||
}
|
// }
|
||||||
// console.log("len",lender)
|
// console.log("len",lender)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,11 +325,11 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.lenderShortName == 'CLIX' && productabbr != ''){
|
// if(this.lenderShortName == 'CLIX' && productabbr != ''){
|
||||||
this._PDtriggerForm.controls['fk_pd_type'].setValue('1');
|
// this._PDtriggerForm.controls['fk_pd_type'].setValue('1');
|
||||||
this._PDtriggerForm.controls['fk_customer_segment'].setValue('5');
|
// this._PDtriggerForm.controls['fk_customer_segment'].setValue('5');
|
||||||
this._PDtriggerForm.controls['loan_amount'].setValue(0);
|
// this._PDtriggerForm.controls['loan_amount'].setValue(0);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user