sheet changes : ps
This commit is contained in:
parent
440886a9ea
commit
e74d827fea
@ -75,16 +75,13 @@
|
||||
<!-- <mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-form-field *ngIf="pdMain.fk_product_id.value != '4'" style="width: 28%">
|
||||
|
||||
<mat-select placeholder="Sub Product Name" formControlName="fk_subproduct_id">
|
||||
<mat-option>
|
||||
Select
|
||||
</mat-option>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let SPL of subProductList" [value]="SPL.subproduct_id" >
|
||||
{{SPL.subproduct_name}}
|
||||
</mat-option>
|
||||
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<!-- <mat-error *ngIf="pdMain.fk_subproduct_id.hasError('required')">Sub Product Required.</mat-error> -->
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
subProductList: any;
|
||||
lenderList: any;
|
||||
lenderBranchList: any;
|
||||
customerSegmentAllList: any;
|
||||
customerSegmentList: any;
|
||||
stateList: any = [];
|
||||
cityList: any = [];
|
||||
@ -136,7 +137,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
this._pd.getCustomersDetails().subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.customerSegmentList = data.records
|
||||
this.customerSegmentAllList = data.records
|
||||
}
|
||||
}, error => this.errorMessage = <any>error);
|
||||
}
|
||||
@ -167,6 +168,8 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
this.subProductList = this.productList.filter(item => item.product_id == productID);
|
||||
this.subProductList = this.subProductList[0].subproducts;
|
||||
this.subProductList = this.subProductList.filter(item => item.is_others == 0);
|
||||
this.customerSegmentList = (productID != '4') ? (this.customerSegmentAllList, this._PDtriggerForm.controls['fk_subproduct_id'].setValue(''))
|
||||
: (this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self')), this._PDtriggerForm.controls['fk_subproduct_id'].setValue(''));
|
||||
}
|
||||
|
||||
|
||||
@ -253,7 +256,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
coapplicant_name: [null, Validators.compose([Validators.required])],
|
||||
coapplicant_mobile_no: [null,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
coapplicant_stdcode:[null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||
coapplicant_landline : [null,Validators.compose([Validators.minLength(12),Validators.maxLength(13)])],
|
||||
coapplicant_landline: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||
company_name:[null],
|
||||
relationship: [null],
|
||||
});
|
||||
@ -340,9 +343,14 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
this._PDtriggerForm.controls['fk_product_id'].setValidators([Validators.required]);
|
||||
this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
|
||||
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].setValidators([Validators.required]);
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity();
|
||||
|
||||
if(formValue.fk_product_id != '4'){
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].setValidators([Validators.required]);
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity();
|
||||
}
|
||||
else{
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].setValue('');
|
||||
}
|
||||
|
||||
this._PDtriggerForm.controls['fk_pd_type'].setValidators([Validators.required]);
|
||||
this._PDtriggerForm.controls['fk_pd_type'].updateValueAndValidity();
|
||||
@ -386,8 +394,13 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
this._PDtriggerForm.controls['fk_product_id'].clearValidators();
|
||||
this._PDtriggerForm.controls['fk_product_id'].updateValueAndValidity();
|
||||
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].clearValidators();
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity();
|
||||
if(this._PDtriggerForm.controls.fk_product_id.value != '4'){
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].clearValidators();
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity();
|
||||
}
|
||||
else{
|
||||
this._PDtriggerForm.controls['fk_subproduct_id'].setValue('');
|
||||
}
|
||||
|
||||
this._PDtriggerForm.controls['fk_pd_type'].clearValidators();
|
||||
this._PDtriggerForm.controls['fk_pd_type'].updateValueAndValidity();
|
||||
@ -473,7 +486,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
"pd_contact_mobileno": formValue.lender_contact_mobile,
|
||||
"pd_contact_landline": lender_landline_no,
|
||||
"fk_product_id": formValue.fk_product_id,
|
||||
"fk_subproduct_id": formValue.fk_subproduct_id,
|
||||
"fk_subproduct_id": formValue.fk_product_id != 4 ? formValue.fk_subproduct_id : '',
|
||||
"fk_pd_type": formValue.fk_pd_type,
|
||||
"fk_customer_segment": formValue.fk_customer_segment,
|
||||
"loan_amount": formValue.loan_amount,
|
||||
@ -489,6 +502,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
||||
var pd_applicant_details: any = [];
|
||||
var addresses_details: any = [];
|
||||
if (formValue.applicant_name) {
|
||||
pd_applicant_details.push({
|
||||
"applicant_name": formValue.applicant_name,
|
||||
@ -529,6 +543,20 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
pd_applicant_details.push(obj1)
|
||||
});
|
||||
|
||||
if (formValue.addresses.length > 0) {
|
||||
formValue.addresses.forEach((addressElement, itemIndex) => {
|
||||
let addressobj = {
|
||||
"addressline1": addressElement.addressline1.toUpperCase(),
|
||||
"fk_city": addressElement.fk_city,
|
||||
"fk_state": addressElement.fk_state,
|
||||
"pincode": addressElement.pincode,
|
||||
"other_pincode": addressElement.other_pincode,
|
||||
}
|
||||
addresses_details.push(addressobj);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// docs details
|
||||
let pd_form: FormData = new FormData();
|
||||
|
||||
@ -544,31 +572,21 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
AllFilesObj.push(element.doc_name);
|
||||
});
|
||||
pd_form.append("pd_details", JSON.stringify(pd_details))
|
||||
|
||||
if (pd_applicant_details.length > 0) {
|
||||
pd_form.append("pd_applicant_details", JSON.stringify(pd_applicant_details))
|
||||
}
|
||||
|
||||
if(addresses_details.length>0){
|
||||
pd_form.append("addresses", JSON.stringify(addresses_details));
|
||||
}
|
||||
|
||||
pd_form.append("pd_document_titles", JSON.stringify(AllFilesObj))
|
||||
|
||||
if (formValue.addtional_requirements.length > 0) {
|
||||
pd_form.append("addtional_requirements", JSON.stringify(formValue.addtional_requirements))
|
||||
}
|
||||
|
||||
// formValue.addresses.forEach((addressElement, itemIndex) => {
|
||||
// let addressobj = {
|
||||
// "addressline": addressElement.addressline.toUpperCase(),
|
||||
// "fk_city": addressElement.fk_city,
|
||||
// "fk_state": addressElement.fk_state,
|
||||
// "pincode": addressElement.pincode,
|
||||
// "other_pincode": addressElement.other_pincode,
|
||||
// }
|
||||
|
||||
// });
|
||||
|
||||
if (formValue.addresses.length > 0) {
|
||||
pd_form.append("addresses", JSON.stringify(formValue.addresses))
|
||||
}
|
||||
|
||||
this._pd.addPdDetails(pd_form).subscribe(result => {
|
||||
if (result.status == 200) {
|
||||
this.disableAfterSubmit = false;
|
||||
|
||||
@ -82,9 +82,9 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Lenderid">
|
||||
<mat-cell class="cell" *matCellDef="let details">
|
||||
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span>
|
||||
<span *ngIf="details.lender_short_name" mat-line> {{details.lender_short_name}} </span>
|
||||
<br>
|
||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span>
|
||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}<span *ngIf="details.subproduct_abbr">/{{details.subproduct_abbr}}</span></span>
|
||||
<br>
|
||||
<span *ngIf="details.loan_amount" class="fontsize">
|
||||
<i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
|
||||
|
||||
@ -78,8 +78,8 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Lenderid">
|
||||
<mat-cell class="cell" *matCellDef="let details">
|
||||
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span><br>
|
||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span> <br>
|
||||
<span *ngIf="details.lender_short_name" mat-line> {{details.lender_short_name}} </span><br>
|
||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}<span *ngIf="details.subproduct_abbr">/{{details.subproduct_abbr}}</span></span> <br>
|
||||
<span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@ -86,7 +86,8 @@
|
||||
<!-- <mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 29%">
|
||||
<!-- <mat-form-field style="width: 29%"> -->
|
||||
<mat-form-field *ngIf="pdMain.fk_product_id.value != '4'" style="width: 29%">
|
||||
|
||||
<mat-select placeholder="Sub product Name" formControlName="fk_subproduct_id">
|
||||
<mat-option>Select</mat-option>
|
||||
|
||||
@ -17,6 +17,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
productList:any;
|
||||
subProductList:any;
|
||||
lenderList:any;
|
||||
customerSegmentAllList:any;
|
||||
customerSegmentList:any;
|
||||
stateList:any;
|
||||
cityList:any = [];
|
||||
@ -100,7 +101,6 @@ export class EditPdMasterComponent implements OnInit {
|
||||
if(this.data.records.fk_product_id){
|
||||
this.getSubproductList(this.data.records.fk_product_id);
|
||||
}
|
||||
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}
|
||||
@ -108,7 +108,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
this._pd.getCustomersDetails().subscribe(
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.customerSegmentList=data.records
|
||||
this.customerSegmentAllList=data.records
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}
|
||||
@ -158,7 +158,6 @@ export class EditPdMasterComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// let getpincodeid = this.data.records.pincode != '' ? this.data.records.pincode != null ? (this.pincodeList.filter(data => data.pincode == this.data.records.pincode).pincode_id)
|
||||
// : this.data.records.pincode
|
||||
// : this.data.records.pincode;
|
||||
@ -205,14 +204,19 @@ export class EditPdMasterComponent implements OnInit {
|
||||
}
|
||||
this.getCityList(val.fk_state,index);
|
||||
this.getPincode(val.pincode_id,index);
|
||||
|
||||
console.log('this.addressesList.length',this.addressesList.length);
|
||||
this.addressesDeactivited[this.addressesList.length] = true;
|
||||
addressesArray.push(this.createAddresses(obj));
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.addressesDeactivited[0] = true;
|
||||
addressesArray.push(this.createAddresses(null));
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.addressesDeactivited[0] = true;
|
||||
addressesArray.push(this.createAddresses(null));
|
||||
}
|
||||
});
|
||||
@ -225,6 +229,9 @@ export class EditPdMasterComponent implements OnInit {
|
||||
|
||||
this.subProductList= this.productList.filter(item => item.product_id == productID);
|
||||
this.subProductList=this.subProductList[0].subproducts;
|
||||
this.customerSegmentList=(productID != '4')?this.customerSegmentAllList:this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self'));
|
||||
// this.customerSegmentList = (productID != '4')?this.customerSegmentAllList:(this.customerSegmentAllList.filter(s => (s.customer_segment).includes('Self')),this._EditPDtriggerForm.controls['fk_subproduct_id'].setValue(''));
|
||||
|
||||
}
|
||||
|
||||
// //get city list details based on state id
|
||||
@ -272,12 +279,8 @@ export class EditPdMasterComponent implements OnInit {
|
||||
}
|
||||
};
|
||||
addAddresses(index) {
|
||||
console.log(index);
|
||||
this.addressesDeactivited[index] = true;
|
||||
console.log('this.addressesDeactivited[index]',this.addressesDeactivited[index]);
|
||||
this.addresses = this._EditPDtriggerForm.get('addresses') as FormArray;
|
||||
this.addresses.push(this.createAddresses(null));
|
||||
|
||||
}
|
||||
|
||||
removeAddresses(index: number,strflag : any) {
|
||||
|
||||
@ -75,8 +75,8 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Lenderid">
|
||||
<mat-cell class="cell" *matCellDef="let details">
|
||||
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span><br>
|
||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span> <br>
|
||||
<span *ngIf="details.lender_short_name" mat-line> {{details.lender_short_name}} </span><br>
|
||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}<span *ngIf="details.subproduct_abbr">/{{details.subproduct_abbr}}</span></span> <br>
|
||||
<span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@ -77,8 +77,8 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Lenderid">
|
||||
<mat-cell class="cell" *matCellDef="let details">
|
||||
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span><br>
|
||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span> <br>
|
||||
<span *ngIf="details.lender_short_name" mat-line> {{details.lender_short_name}} </span><br>
|
||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}<span *ngIf="details.subproduct_abbr">/{{details.subproduct_abbr}}</span></span> <br>
|
||||
<span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@ -76,8 +76,8 @@
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Lenderid">
|
||||
<mat-cell class="cell" *matCellDef="let details">
|
||||
<span *ngIf="details.lender_full_name" mat-line> {{details.lender_full_name}} </span><br>
|
||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}/{{details.subproduct_abbr}}</span> <br>
|
||||
<span *ngIf="details.lender_short_name" mat-line> {{details.lender_short_name}} </span><br>
|
||||
<span *ngIf="details.product_abbr" mat-line class="fontsize"> {{details.product_abbr}}<span *ngIf="details.subproduct_abbr">/{{details.subproduct_abbr}}</span></span> <br>
|
||||
<span *ngIf="details.loan_amount" class="fontsize"><i class="fa-1x fa fa-rupee"></i> {{details.loan_amount}}</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@ -1158,7 +1158,7 @@
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<mat-card *ngIf="businessForm.controls.others_activity_details['controls'].length>0">
|
||||
<!--<mat-card *ngIf="businessForm.controls.others_activity_details['controls'].length>0">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Other Details</mat-card-title>
|
||||
</mat-card-header>
|
||||
@ -1185,7 +1185,7 @@
|
||||
Add More Products
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</mat-card>-->
|
||||
<mat-card *ngIf="ExportFlag">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Export Sale As a % Total Sales</mat-card-title>
|
||||
|
||||
@ -166,7 +166,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
const retailControl: any = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
|
||||
const wholesaleControl: any = <FormArray>this.businessForm.controls['wholesale_trading_activity_details'];
|
||||
const serviceProviderControl: any = <FormArray>this.businessForm.controls['service_provider_activity_details'];
|
||||
const othersControl: any = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
// const othersControl: any = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
|
||||
if (data.status == 200) {
|
||||
let DocArray: any;
|
||||
@ -553,25 +553,26 @@ export class BusinessInfoComponent implements OnInit {
|
||||
businessVal.service_provider_activity_details=[];
|
||||
|
||||
}
|
||||
if(data.records.others_activity_details){
|
||||
//others type of Activity_details comment
|
||||
// if(data.records.others_activity_details){
|
||||
|
||||
// update others activity details
|
||||
let selectedOthers = Object.keys(data.records.others_activity_details).map(function (key) {
|
||||
return data.records.others_activity_details[key];
|
||||
});
|
||||
if(selectedOthers.length > 0) {
|
||||
selectedOthers.forEach((element,index)=>{
|
||||
othersControl.push(this.createOthersActivity());
|
||||
});
|
||||
businessVal.others_activity_details=selectedOthers;
|
||||
}
|
||||
else{
|
||||
businessVal.others_activity_details=[];
|
||||
}
|
||||
}
|
||||
else {
|
||||
businessVal.others_activity_details=[];
|
||||
}
|
||||
// // update others activity details
|
||||
// let selectedOthers = Object.keys(data.records.others_activity_details).map(function (key) {
|
||||
// return data.records.others_activity_details[key];
|
||||
// });
|
||||
// if(selectedOthers.length > 0) {
|
||||
// selectedOthers.forEach((element,index)=>{
|
||||
// othersControl.push(this.createOthersActivity());
|
||||
// });
|
||||
// businessVal.others_activity_details=selectedOthers;
|
||||
// }
|
||||
// else{
|
||||
// businessVal.others_activity_details=[];
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// businessVal.others_activity_details=[];
|
||||
// }
|
||||
if(businessVal.applicant_use_pos_machines == 'yes'){
|
||||
this.businessForm.controls.no_of_pos_machines.setValue(businessVal.no_of_pos_machines);
|
||||
const posControl: any = <FormArray>this.businessForm.controls['pos_machines_details'];
|
||||
@ -660,7 +661,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
retail_trading_activity_details: this.fb.array([]),
|
||||
wholesale_trading_activity_details: this.fb.array([]),
|
||||
service_provider_activity_details: this.fb.array([]),
|
||||
others_activity_details: this.fb.array([]),
|
||||
// others_activity_details: this.fb.array([]),
|
||||
});
|
||||
}
|
||||
|
||||
@ -724,15 +725,15 @@ export class BusinessInfoComponent implements OnInit {
|
||||
serviceControl.push(this.createServiceActivity());
|
||||
}
|
||||
|
||||
if(event.value.exist_status==true && event.value.type_of_activity_id==1){
|
||||
let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
othersControl.controls = [];
|
||||
othersControl.setValue([]);
|
||||
}
|
||||
else if(event.value.exist_status==false && event.value.type_of_activity_id==1){
|
||||
let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
othersControl.push(this.createOthersActivity());
|
||||
}
|
||||
// if(event.value.exist_status==true && event.value.type_of_activity_id==1){
|
||||
// let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
// othersControl.controls = [];
|
||||
// othersControl.setValue([]);
|
||||
// }
|
||||
// else if(event.value.exist_status==false && event.value.type_of_activity_id==1){
|
||||
// let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
// othersControl.push(this.createOthersActivity());
|
||||
// }
|
||||
// check activity type for make dosument sighted filed dynamically
|
||||
this.businessForm.value.manufacturing_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl(this.businessForm.value.export_import_cert, Validators.required)) : this.businessForm.removeControl('export_import_cert');
|
||||
this.businessForm.value.manufacturing_activity_details.length > 0 ? this.businessForm.addControl('factory_cert', new FormControl(this.businessForm.value.factory_cert, Validators.required)) : this.businessForm.removeControl('factory_cert');
|
||||
@ -1208,7 +1209,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
data.records.forEach(val => {
|
||||
let entityTypeControl = <FormArray>this.businessForm.controls['select_business_activity_type'];
|
||||
if (val.isactive == 1) {
|
||||
if (val.isactive == 1 && val.type_of_activity_id != 1) {
|
||||
this.activityData.push(val);
|
||||
}
|
||||
})
|
||||
@ -1325,15 +1326,15 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
// add more others details
|
||||
addMoreOthersActivity() {
|
||||
let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
othersControl.push(this.createOthersActivity());
|
||||
}
|
||||
// addMoreOthersActivity() {
|
||||
// let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
// othersControl.push(this.createOthersActivity());
|
||||
// }
|
||||
|
||||
deleteOthersActivity(index) {
|
||||
let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
othersControl.removeAt(index);
|
||||
}
|
||||
// deleteOthersActivity(index) {
|
||||
// let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
// othersControl.removeAt(index);
|
||||
// }
|
||||
|
||||
// update partner group other form control
|
||||
changePartnerGroup(value,key) {
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<!-- <mat-select placeholder="is the Stock is Observed ?" formControlName="stock_observed" > -->
|
||||
<mat-select placeholder="Stock" formControlName="stock_observed">
|
||||
<mat-select placeholder="Stock" formControlName="stock_observed" (selectionChange)="selectedValueofStockObserved($event.value,a,1)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No Stock Observed</mat-option>
|
||||
@ -105,7 +105,7 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<!-- <mat-select placeholder="is the Goods is Observed ?" formControlName="goods_observed" > -->
|
||||
<mat-select placeholder="Stock" formControlName="goods_observed">
|
||||
<mat-select placeholder="Stock" formControlName="goods_observed" (selectionChange)="selectedValueofStockObserved($event.value,b,2)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No Stock Observed</mat-option>
|
||||
@ -183,7 +183,7 @@
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed">
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed" (selectionChange)="selectedValueofStockObserved($event.value,e,3)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No Stock Observed</mat-option>
|
||||
@ -274,7 +274,7 @@
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed" >
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed" (selectionChange)="selectedValueofStockObserved($event.value,g,4)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No stock observed</mat-option>
|
||||
|
||||
@ -483,7 +483,13 @@ tradingFormCreation(val) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
selectedValueofStockObserved(selectedvalue : any,index : number,flag : number){
|
||||
console.log('selectedvalue',selectedvalue);
|
||||
console.log('index',index);
|
||||
console.log('flag',flag);
|
||||
}
|
||||
|
||||
initRetailDetails(datas) {
|
||||
|
||||
const tradedGoods = <FormArray>this.stockForms.controls['retail_details']['controls'][0].controls['retail_traded_goods'];
|
||||
@ -777,7 +783,7 @@ tradingFormCreation(val) {
|
||||
this._pd.getAllMasterDatas('UOM').subscribe(data => {
|
||||
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
if (val.isactive == 1 && val.is_land_uom == 0 || val.is_land_uom == 2) {
|
||||
this.uomData.push(val);
|
||||
}
|
||||
})
|
||||
|
||||
@ -233,7 +233,7 @@
|
||||
</div>
|
||||
<div fxlayout="row" *ngIf="trdCreditCardFlag">
|
||||
<mat-form-field style="width: 90%">
|
||||
<input matInput placeholder="What % of Total Trade is done on Credit?" formControlName="trading_products_total_payments_percent_on_credit"
|
||||
<input matInput placeholder="What % of Total Purchase is done on Credit?" formControlName="trading_products_total_payments_percent_on_credit"
|
||||
type="number" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user