merge
This commit is contained in:
commit
1b5f7503c5
File diff suppressed because one or more lines are too long
@ -437,15 +437,14 @@
|
|||||||
<div formArrayName="servicing_details">
|
<div formArrayName="servicing_details">
|
||||||
<div *ngFor="let dtl of stockForm.controls.servicing_details['controls']; let par=index" [formGroupName]="par">
|
<div *ngFor="let dtl of stockForm.controls.servicing_details['controls']; let par=index" [formGroupName]="par">
|
||||||
<div formArrayName="service_provider">
|
<div formArrayName="service_provider">
|
||||||
<div *ngFor="let serv of dtl.controls.service_provider['controls']; let chd=index;let last = last" [formGroupName]="chd">
|
<div *ngFor="let serv of dtl.controls.service_provider['controls']; let c=index;let last = last" [formGroupName]="c">
|
||||||
<mat-card-subtitle>Service Provider #{{chd+1}}</mat-card-subtitle>
|
<mat-card-subtitle>Service Provider #{{c+1}}</mat-card-subtitle>
|
||||||
<mat-card-content class="matcard">
|
<mat-card-content class="matcard">
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<input matInput autocomplete="off" placeholder="Name" formControlName="service_provider_name">
|
<input matInput autocomplete="off" placeholder="Name" formControlName="service_provider_name">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<mat-select placeholder="Stock" formControlName="service_provider_observed"
|
<mat-select placeholder="Stock" formControlName="service_provider_observed">
|
||||||
>
|
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option value="yes">Add Stock Details</mat-option>
|
<mat-option value="yes">Add Stock Details</mat-option>
|
||||||
<mat-option value="no">No stock observed</mat-option>
|
<mat-option value="no">No stock observed</mat-option>
|
||||||
@ -478,16 +477,16 @@
|
|||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed"
|
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed"
|
||||||
formControlName="estimated_service_provider_value" type="number"
|
formControlName="estimated_service_provider_value" type="number"
|
||||||
(keyup)="inWords($event.target.value,5,chd)">
|
(keyup)="inWords($event.target.value,5,c)">
|
||||||
<mat-hint align="start" style="font-size:70%" *ngIf="serv.get('estimated_service_provider_value').value != ''">{{"₹"}}
|
<mat-hint align="start" style="font-size:70%" *ngIf="serv.get('estimated_service_provider_value').value != ''">{{"₹"}}
|
||||||
{{S_GoodsValueInWords[g]}} Only</mat-hint>
|
{{S_GoodsValueInWords[c]}} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</span>
|
</span>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-card-actions>
|
<mat-card-actions>
|
||||||
<ion-buttons end>
|
<ion-buttons end>
|
||||||
<ion-col col-3 offset-3>
|
<ion-col col-3 offset-3>
|
||||||
<a (click)="deleteTradedGoods(chd,3)" *ngIf="dtl.controls.service_provider.controls.length>1">
|
<a (click)="deleteTradedGoods(c,3)" *ngIf="dtl.controls.service_provider.controls.length>1">
|
||||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||||
</a>
|
</a>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
|
|||||||
@ -707,7 +707,7 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
if (val.estimated_service_provider_value) {
|
if (val.estimated_service_provider_value) {
|
||||||
this.inWords(val.estimated_service_provider_value, 5, index);
|
this.inWords(val.estimated_service_provider_value, 5, index);
|
||||||
}
|
}
|
||||||
this.checkComments(val.service_provider_observed, 5, index);
|
this.checkSPComment(val.service_provider_observed, 5, index);
|
||||||
service.push(this.createServiceProvider(val));
|
service.push(this.createServiceProvider(val));
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -850,8 +850,37 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
not_stock_of_ws: any = [];
|
not_stock_of_ws: any = [];
|
||||||
not_stock_of_sp: any = [];
|
not_stock_of_sp: any = [];
|
||||||
|
|
||||||
|
checkSPComment(value, flag, index) {
|
||||||
|
|
||||||
|
if (flag == 5) {
|
||||||
|
|
||||||
|
this.ServiceCounterArray[index] = value != "" ? 1 : 0
|
||||||
|
this.not_stock_of_sp[index] = value == "yes" ? 1 : 0;
|
||||||
|
|
||||||
|
let SPOverallCount = this.ServiceCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||||
|
this.SPCommentCard = SPOverallCount > 0 ? true : false;
|
||||||
|
|
||||||
|
let not_stock3 = this.not_stock_of_rm.reduce((sum, val) => sum + +val, 0);
|
||||||
|
|
||||||
|
if(not_stock3 > 0){
|
||||||
|
|
||||||
|
this.SPsufficientList[0].disabled = false;
|
||||||
|
this.SPsufficientList[2].disabled = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(not_stock3 == 0){
|
||||||
|
|
||||||
|
this.SPsufficientList[0].disabled = true;
|
||||||
|
this.SPsufficientList[2].disabled = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
checkComments(value, flag, index) {
|
checkComments(value, flag, index) {
|
||||||
|
|
||||||
|
console.log(value, flag, index);
|
||||||
|
|
||||||
if (flag == 1) {
|
if (flag == 1) {
|
||||||
|
|
||||||
this.ManufacturingCounterArray[index] = value != "" ? 1 : 0;
|
this.ManufacturingCounterArray[index] = value != "" ? 1 : 0;
|
||||||
@ -890,30 +919,6 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
this.WholeSaleCounterArray[index] = value != "" ? 1 : 0
|
this.WholeSaleCounterArray[index] = value != "" ? 1 : 0
|
||||||
this.not_stock_of_ws[index] = value == "yes" ? 1 : 0;
|
this.not_stock_of_ws[index] = value == "yes" ? 1 : 0;
|
||||||
}
|
}
|
||||||
if (flag == 5) {
|
|
||||||
console.log('adf');
|
|
||||||
this.ServiceCounterArray[index] = value != "" ? 1 : 0
|
|
||||||
this.not_stock_of_sp[index] = value == "yes" ? 1 : 0;
|
|
||||||
|
|
||||||
let SPOverallCount = this.ServiceCounterArray.reduce((sum, val) => sum + +val, 0);
|
|
||||||
this.SPCommentCard = SPOverallCount > 0 ? true : false;
|
|
||||||
|
|
||||||
let not_stock3 = this.not_stock_of_rm.reduce((sum, val) => sum + +val, 0);
|
|
||||||
|
|
||||||
if(not_stock3 > 0){
|
|
||||||
|
|
||||||
this.SPsufficientList[0].disabled = false;
|
|
||||||
this.SPsufficientList[2].disabled = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(not_stock3 == 0){
|
|
||||||
|
|
||||||
this.SPsufficientList[0].disabled = true;
|
|
||||||
this.SPsufficientList[2].disabled = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
let FGOverallCount = this.FinishedCounterArray.reduce((sum, val) => sum + +val, 0);
|
let FGOverallCount = this.FinishedCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||||
let RTGOverallCount = this.RetailCounterArray.reduce((sum, val) => sum + +val, 0);
|
let RTGOverallCount = this.RetailCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||||
let WTGOverallCount = this.WholeSaleCounterArray.reduce((sum, val) => sum + +val, 0);
|
let WTGOverallCount = this.WholeSaleCounterArray.reduce((sum, val) => sum + +val, 0);
|
||||||
|
|||||||
@ -331,12 +331,10 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
|
<mat-select placeholder="service provider Name" formControlName="service_provider_name">
|
||||||
<mat-select placeholder="Trading Product Name" formControlName="service_provider_name">
|
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let tp of business_serviceProvider" [value]="tp.name">{{ tp.name }}</mat-option>
|
<mat-option *ngFor="let msp of m_serviceProvider" [value]="msp.name">{{ msp.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="Supplier Name" formControlName="service_provider_supplier_name">
|
<input matInput placeholder="Supplier Name" formControlName="service_provider_supplier_name">
|
||||||
|
|||||||
@ -30,7 +30,7 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
|
|
||||||
business_manufacturingProducts: any = [];
|
business_manufacturingProducts: any = [];
|
||||||
business_tradingProducts: any = [];
|
business_tradingProducts: any = [];
|
||||||
business_serviceProvider: any = [];
|
m_serviceProvider: any = [];
|
||||||
|
|
||||||
m_titleList: any = [];
|
m_titleList: any = [];
|
||||||
m_paymentList: any = [];
|
m_paymentList: any = [];
|
||||||
@ -65,8 +65,7 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
this.initFormLoadDetails(datas.type_of_activity);
|
this.initFormLoadDetails(datas.type_of_activity);
|
||||||
this.business_manufacturingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 2 ){return data}}).map(data=> [...data.prodcuts]);
|
this.business_manufacturingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 2 ){return data}}).map(data=> [...data.prodcuts]);
|
||||||
// this.business_tradingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 3){return data}}).map(data=> [...data.prodcuts]);
|
// this.business_tradingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 3){return data}}).map(data=> [...data.prodcuts]);
|
||||||
this.business_serviceProvider = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 5){return data}}).map(data=> [...data.prodcuts]);
|
this.m_serviceProvider = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 5){return data}}).map(data=> [...data.prodcuts]);
|
||||||
|
|
||||||
let api = Object.keys(datas.type_of_activity).map(function (key) {
|
let api = Object.keys(datas.type_of_activity).map(function (key) {
|
||||||
return datas.type_of_activity[key];
|
return datas.type_of_activity[key];
|
||||||
});
|
});
|
||||||
@ -84,17 +83,13 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
this.business_tradingProducts.push(val.prodcuts);
|
this.business_tradingProducts.push(val.prodcuts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 5) {
|
|
||||||
if(val.prodcuts){
|
|
||||||
this.business_serviceProvider.push(val.prodcuts);
|
|
||||||
console.log(this.business_serviceProvider);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.business_tradingProducts = [].concat.apply([], this.business_tradingProducts);
|
this.business_tradingProducts = [].concat.apply([], this.business_tradingProducts);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
this.toast.pdTriggerappmessage('No Category Records Found.!');
|
this.toast.pdTriggerappmessage('No Category Records Found.!');
|
||||||
|
|||||||
@ -5,6 +5,15 @@
|
|||||||
</button>
|
</button>
|
||||||
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
|
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
|
||||||
<ion-buttons end>
|
<ion-buttons end>
|
||||||
|
<a (click)="capture()">
|
||||||
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
|
</a>
|
||||||
|
<a (click)="submitCurrentloan(currentLoans.value)" *ngIf="!complete_status">
|
||||||
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
|
</a>
|
||||||
|
</ion-buttons>
|
||||||
|
|
||||||
|
|
||||||
<!-- <a (click)="capture()">
|
<!-- <a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
@ -12,8 +21,6 @@
|
|||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a> -->
|
</a> -->
|
||||||
|
|
||||||
</ion-buttons>
|
|
||||||
|
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
@ -34,7 +41,9 @@
|
|||||||
<button color="primary" class="fab_exp" ion-fab><ion-icon name="fn-save"></ion-icon></button>
|
<button color="primary" class="fab_exp" ion-fab><ion-icon name="fn-save"></ion-icon></button>
|
||||||
</ion-fab-list>
|
</ion-fab-list>
|
||||||
</ion-fab> -->
|
</ion-fab> -->
|
||||||
<ion-fab bottom right >
|
|
||||||
|
|
||||||
|
<!-- <ion-fab bottom right >
|
||||||
<button ion-fab mini color="optblue"><ion-icon name="arrow-dropup"></ion-icon></button>
|
<button ion-fab mini color="optblue"><ion-icon name="arrow-dropup"></ion-icon></button>
|
||||||
<ion-fab-list side="top">
|
<ion-fab-list side="top">
|
||||||
<button ion-fab class="fab_exp">
|
<button ion-fab class="fab_exp">
|
||||||
@ -46,7 +55,9 @@
|
|||||||
<ion-label>Save</ion-label>
|
<ion-label>Save</ion-label>
|
||||||
</button>
|
</button>
|
||||||
</ion-fab-list>
|
</ion-fab-list>
|
||||||
</ion-fab>
|
</ion-fab> -->
|
||||||
|
|
||||||
|
|
||||||
<div [ngSwitch]="tab">
|
<div [ngSwitch]="tab">
|
||||||
<mat-card *ngSwitchCase="'1'" #picContent>
|
<mat-card *ngSwitchCase="'1'" #picContent>
|
||||||
|
|
||||||
|
|||||||
@ -128,9 +128,7 @@
|
|||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col end>
|
<ion-col end>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<button *ngIf="!buttonClick" float-right ion-button large color="optblue" icon-left clear (click)="addRec(1)">Add Applicant
|
<button *ngIf="!buttonClick" float-right ion-button color="optblue" (click)="addRec(1)">Add Applicant</button>
|
||||||
<!-- <ion-icon name="person-add"></ion-icon> -->
|
|
||||||
</button>
|
|
||||||
<button *ngIf="buttonClick" float-right ion-button large color="optblue" icon-left clear (click)="addRec(1)">Close
|
<button *ngIf="buttonClick" float-right ion-button large color="optblue" icon-left clear (click)="addRec(1)">Close
|
||||||
<ion-icon name="md-close"></ion-icon></button>
|
<ion-icon name="md-close"></ion-icon></button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user