family detail : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-01-21 00:00:37 +05:30
parent 3ea3ca5a4a
commit 6c8c655746
3 changed files with 41 additions and 2 deletions

View File

@ -291,9 +291,24 @@
<div>
<h5>Residence Details</h5>
<mat-form-field>
<input matInput placeholder="Place" formControlName="residence_place" required>
<mat-select matInput placeholder="State" formControlName="residence_state" required (selectionChange)="getCity($event.value)" >
<mat-option value="{{s.state_id}}" *ngFor="let s of stateData">
{{s.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select matInput placeholder="City" formControlName="residence_city" required (selectionChange)="getPinCode($event)" >
<mat-option *ngFor="let c of cityData" [value]="c" >
{{c.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Place" formControlName="residence_place" required>
</mat-form-field>
<!-- <mat-form-field>
<input matInput placeholder="City" formControlName="residence_city" required>
</mat-form-field>
<mat-form-field>
@ -301,7 +316,7 @@
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Pin" formControlName="residence_pin" required>
</mat-form-field>
</mat-form-field> -->
<mat-form-field>
<input matInput placeholder="Number of yrs" formControlName="residence_No_of_years" type="number" required>

View File

@ -324,6 +324,9 @@ export class FamilyDetailsComponent implements OnInit {
//personMetData: any = [];
ownerShipData: any = [];
customerSegData: any = [];
stateData: any = [];
cityData:any =[];
PincodeData:any=[];
// earnMemberArrCount :any ;
// nonEarnMemberArrCount :any ;
count: number;
@ -344,6 +347,9 @@ export class FamilyDetailsComponent implements OnInit {
//this.getMasterDetails('PERSONSMET',3);
this.getMasterDetails('RESIDENCEOWNERSHIP', 4);
this.getMasterDetails('CUSTOMERSEGMENT', 5);
this.getMasterDetails('STATE', 6);
this.getMasterDetails('CITY', 7);
this.getMasterDetails('PINCODE', 8);
this.initFamilyFormDetails();
let params: any = {};
params.pd_id = this.pdid;
@ -619,11 +625,26 @@ export class FamilyDetailsComponent implements OnInit {
else if (type == 5) {
this.customerSegData = data.records.filter(item => item.isactive == 1);
}
else if (type == 6) {
this.stateData = data.records.filter(item => item.isactive == 1);
}
else if(type == 7){
this.cityData = data.records.filter(item => item.isactive == 1);
}
}
});
}
getCity(e){
console.log(e);
this.cityData = this.cityData.filter(city=>city.fk_state_id == e);
}
getPinCode(e){
console.log(e);
}
submitFamily() {
if (!this.familyForm.valid) {
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');

View File

@ -112,6 +112,7 @@ export class FinancialInfoComponent implements OnInit {
let retriveData = value.records;
// this.isReadOnly = true;
if(value.records.is_financial_statements == 'yes'){
/** Backend Data of Asper Statement */
let result = Object.keys(value.records.date_per_financial).map(function(key) {
return value.records.date_per_financial[key];
@ -131,6 +132,7 @@ export class FinancialInfoComponent implements OnInit {
//financial_date.push(this.createDate());
financial_date.push(this.createDate(''));
}
}
/** Backend Data of Asper Customer */
let result_val = Object.keys(value.records.estimated_value).map(function(key) {
@ -139,6 +141,7 @@ export class FinancialInfoComponent implements OnInit {
if (result_val.length > 0) {
result_val.forEach((val,index) => {
// console.log('val.estimate_sales_average',val.estimate_sales_average);
//console.log('dedrf',val.estimate_annual_sale);
// this.AV_annualSalesInwords[index] = this._pd.convertNumberToWords(val.estimate_annual_sale);
// this.AV_netProfitAmtInwords[index] = this._pd.convertNumberToWords(val.estimate_net_profit);