code revert : ps
This commit is contained in:
parent
4b99096f81
commit
8e423f89e4
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
|||||||
#Sat Jun 29 12:07:39 IST 2019
|
#Sat Jul 06 14:19:51 IST 2019
|
||||||
base.0=S\:\\pd_office\\pd_officer\\platforms\\android\\app\\build\\intermediates\\transforms\\dexMerger\\debug\\0
|
base.0=S\:\\pd_office\\pd_officer\\platforms\\android\\app\\build\\intermediates\\transforms\\dexMerger\\debug\\0
|
||||||
path.1=classes2.dex
|
path.1=classes2.dex
|
||||||
renamed.1=classes2.dex
|
renamed.1=classes2.dex
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -79,8 +79,14 @@
|
|||||||
<div formArrayName="main_raw_materials">
|
<div formArrayName="main_raw_materials">
|
||||||
<div *ngFor="let items of item.controls.main_raw_materials['controls']; let l=index;let last =last"
|
<div *ngFor="let items of item.controls.main_raw_materials['controls']; let l=index;let last =last"
|
||||||
[formGroupName]="l">
|
[formGroupName]="l">
|
||||||
|
<ion-row>
|
||||||
|
<div style="width: 85%;">
|
||||||
<mat-card-subtitle>Manufacturing Product #{{l+1}}</mat-card-subtitle>
|
<mat-card-subtitle>Manufacturing Product #{{l+1}}</mat-card-subtitle>
|
||||||
|
</div>
|
||||||
|
<div style="width: 10%;">
|
||||||
<button mini ion-fab color="optblue" slot="fixed" (click)="captureTheClientPics('Manufacturing Product',l,items.get('manufacturing_client_name').value)"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button>
|
<button mini ion-fab color="optblue" slot="fixed" (click)="captureTheClientPics('Manufacturing Product',l,items.get('manufacturing_client_name').value)"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button>
|
||||||
|
</div>
|
||||||
|
</ion-row>
|
||||||
<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%">
|
||||||
@ -199,8 +205,14 @@
|
|||||||
<div formArrayName="trading_products">
|
<div formArrayName="trading_products">
|
||||||
<div *ngFor="let items of item.controls.trading_products['controls']; let l=index;let last =last"
|
<div *ngFor="let items of item.controls.trading_products['controls']; let l=index;let last =last"
|
||||||
[formGroupName]="l">
|
[formGroupName]="l">
|
||||||
|
<ion-row>
|
||||||
|
<div style="width: 85%;">
|
||||||
<mat-card-subtitle>Trading Product #{{l+1}}</mat-card-subtitle>
|
<mat-card-subtitle>Trading Product #{{l+1}}</mat-card-subtitle>
|
||||||
|
</div>
|
||||||
|
<div style="width: 10%;">
|
||||||
<button mini ion-fab color="optblue" slot="fixed" (click)="captureTheClientPics('Trading Product',l,items.get('trade_client_name').value)"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button>
|
<button mini ion-fab color="optblue" slot="fixed" (click)="captureTheClientPics('Trading Product',l,items.get('trade_client_name').value)"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button>
|
||||||
|
</div>
|
||||||
|
</ion-row>
|
||||||
<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%">
|
||||||
@ -325,8 +337,14 @@
|
|||||||
<div formArrayName="service_products">
|
<div formArrayName="service_products">
|
||||||
<div *ngFor="let items of item.controls.service_products['controls']; let l=index;let last =last"
|
<div *ngFor="let items of item.controls.service_products['controls']; let l=index;let last =last"
|
||||||
[formGroupName]="l">
|
[formGroupName]="l">
|
||||||
|
<ion-row>
|
||||||
|
<div style="width: 85%;">
|
||||||
<mat-card-subtitle>Service Provider #{{l+1}}</mat-card-subtitle>
|
<mat-card-subtitle>Service Provider #{{l+1}}</mat-card-subtitle>
|
||||||
|
</div>
|
||||||
|
<div style="width: 10%;">
|
||||||
<button mini ion-fab color="optblue" slot="fixed" (click)="captureTheClientPics('Service Provider',l,items.get('service_provider_client_name').value)"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button>
|
<button mini ion-fab color="optblue" slot="fixed" (click)="captureTheClientPics('Service Provider',l,items.get('service_provider_client_name').value)"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button>
|
||||||
|
</div>
|
||||||
|
</ion-row>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
|
|||||||
@ -431,42 +431,38 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<!-- <mat-card *ngIf="servicingForm || SPCommentCard">
|
<mat-card *ngIf="servicingForm || SPCommentCard">
|
||||||
<div *ngIf="servicingForm">
|
<div *ngIf="servicingForm">
|
||||||
<mat-card-title><h5>Service Provider Details</h5></mat-card-title>
|
<mat-card-title><h5>Service Provider Details</h5></mat-card-title>
|
||||||
<div formArrayName="servicing_details">
|
<div formArrayName="servicing_details">
|
||||||
<div *ngFor="let spd of stockForms.controls.servicing_details['controls']; let k=index"
|
<div *ngFor="let dtl of stockForm.controls.servicing_details['controls']; let par=index" [formGroupName]="par">
|
||||||
[formGroupName]="k">
|
|
||||||
<div formArrayName="service_provider">
|
<div formArrayName="service_provider">
|
||||||
<div *ngFor="let sp of spd.controls.service_provider['controls']; let g=index;let last = last"
|
<div *ngFor="let serv of dtl.controls.service_provider['controls']; let c=index;let last = last" [formGroupName]="c">
|
||||||
[formGroupName]="g">
|
<mat-card-subtitle>Service Provider #{{c+1}}</mat-card-subtitle>
|
||||||
<mat-card-subtitle>Service Provider #{{g+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">
|
||||||
(selectionChange)="checkComments($event.value,5,g)" required>
|
|
||||||
<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>
|
||||||
|
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<span *ngIf="tradetg.get('traded_goods_observed').value == 'yes'">
|
<span *ngIf="serv.get('service_provider_observed').value == 'yes'">
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<input matInput autocomplete="off" placeholder="Estimated Quantity"
|
<input matInput autocomplete="off" placeholder="Estimated Quantity"
|
||||||
formControlName="traded_goods_quantity" type="number">
|
formControlName="service_provider_quantity" type="number">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<mat-select placeholder="Unit of Mearsurement" formControlName="traded_goods_uom">
|
<mat-select placeholder="Unit of Mearsurement" formControlName="service_provider_uom">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option>
|
<mat-option>
|
||||||
<ngx-mat-select-search formControlName="uomSearch"
|
<ngx-mat-select-search formControlName="uomSearch"
|
||||||
[placeholderLabel]="'Search Unit'"
|
[placeholderLabel]="'Search Unit'"
|
||||||
[noEntriesFoundLabel]="'No Matching Result'" (keyup)="searchFun(tradetg,a)">
|
[noEntriesFoundLabel]="'No Matching Result'" (keyup)="searchFun(serv,a)">
|
||||||
<ion-icon name="md-close" ngxMatSelectSearchClear></ion-icon>
|
<ion-icon name="md-close" ngxMatSelectSearchClear></ion-icon>
|
||||||
</ngx-mat-select-search>
|
</ngx-mat-select-search>
|
||||||
</mat-option>
|
</mat-option>
|
||||||
@ -474,28 +470,28 @@
|
|||||||
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomDataValue">{{uom.name}}</mat-option>
|
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomDataValue">{{uom.name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="tradetg.get('traded_goods_uom').value == 1" style="width:100%">
|
<mat-form-field *ngIf="serv.get('service_provider_uom').value == 1" style="width:100%">
|
||||||
<input matInput autocomplete="off" placeholder="Specify UOM"
|
<input matInput autocomplete="off" placeholder="Specify UOM"
|
||||||
formControlName="traded_goods_other_uom">
|
formControlName="service_provider_other_uom">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<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_traded_goods_value" type="number"
|
formControlName="estimated_service_provider_value" type="number"
|
||||||
(keyup)="inWords($event.target.value,4,g)">
|
(keyup)="inWords($event.target.value,5,c)">
|
||||||
<mat-hint align="start" style="font-size:70%" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"₹"}}
|
<mat-hint align="start" style="font-size:70%" *ngIf="serv.get('estimated_service_provider_value').value != ''">{{"₹"}}
|
||||||
{{T_tradedGoodsValueInWords[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(g,2)" *ngIf="td.controls.trading_traded_goods.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>
|
||||||
<ion-col col-2 offset-1>
|
<ion-col col-2 offset-1>
|
||||||
<a (click)="addTradedGoods(2)" *ngIf="last">
|
<a (click)="addTradedGoods(3)" *ngIf="last">
|
||||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||||
</a>
|
</a>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
@ -506,27 +502,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="TGCommentCard">
|
<div *ngIf="SPCommentCard">
|
||||||
<br>
|
<br>
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<mat-placeholder>Is the stock of finished / traded goods observed, sufficient considering the size of operations</mat-placeholder><br/>
|
<mat-placeholder>Is the stock of finished / goods observed, sufficient considering the size of operations</mat-placeholder><br/>
|
||||||
<mat-select formControlName="is_sufficiant_finished_and_traded_goods">
|
<mat-select formControlName="is_sufficiant_service_goods">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let val of TGsufficientList" [value]="val.value" [disabled]="val.isdisabled">
|
<mat-option *ngFor="let val of SPsufficientList" [value]="val.value" [disabled]="val.isdisabled">
|
||||||
{{val.isdisplayvalue}}
|
{{val.isdisplayvalue}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field appearance="outline" style="width: 100%" *ngIf="this.stockForm.controls.is_sufficiant_finished_and_traded_goods.value == 'no'">
|
<mat-form-field appearance="outline" style="width: 100%" *ngIf="this.stockForms.controls.is_sufficiant_service_goods.value == 'no'">
|
||||||
<mat-label> <i>Please comment on the stock level observed?</i> </mat-label>
|
<mat-label> <i>Please comment on the stock level observed?</i> </mat-label>
|
||||||
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed" formControlName="finished_and_traded_goods_remarks"></textarea>
|
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed"
|
||||||
|
formControlName="service_goods_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</mat-card> -->
|
</mat-card>
|
||||||
<mat-card *ngIf="serviceProviderForm">
|
<!-- <mat-card *ngIf="serviceProviderForm">
|
||||||
<mat-card-title><h5>Service Provider Details</h5></mat-card-title>
|
<mat-card-title><h5>Service Provider Details</h5></mat-card-title>
|
||||||
<div style="text-align: center; margin: 12px;">Service Provider Details Not applicable here !!</div>
|
<div style="text-align: center; margin: 12px;">Service Provider Details Not applicable here !!</div>
|
||||||
</mat-card>
|
</mat-card> -->
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-label>Remarks</mat-label>
|
<mat-label>Remarks</mat-label>
|
||||||
|
|||||||
@ -38,22 +38,28 @@ export class PdQuestionStockInfoPage {
|
|||||||
M_goodsValueInWords: any = [];
|
M_goodsValueInWords: any = [];
|
||||||
R_tradedGoodsValueInWords: any = [];
|
R_tradedGoodsValueInWords: any = [];
|
||||||
T_tradedGoodsValueInWords: any = [];
|
T_tradedGoodsValueInWords: any = [];
|
||||||
|
S_GoodsValueInWords: any = [];
|
||||||
mrmCommentFlag: any = [];
|
mrmCommentFlag: any = [];
|
||||||
mfgCommentFlag: any = [];
|
mfgCommentFlag: any = [];
|
||||||
rtrdCommentFlag: any = [];
|
rtrdCommentFlag: any = [];
|
||||||
wtrdCommentFlag: any = [];
|
wtrdCommentFlag: any = [];
|
||||||
serviceProviderForm: Boolean = false;
|
spdCommentFlag: any = [];
|
||||||
|
|
||||||
|
// serviceProviderForm: Boolean = false;
|
||||||
suppliers_raw_materials: any = [];
|
suppliers_raw_materials: any = [];
|
||||||
suppliers_retail_trade_details: any = [];
|
suppliers_retail_trade_details: any = [];
|
||||||
suppliers_wholesale_trade_details: any = [];
|
suppliers_wholesale_trade_details: any = [];
|
||||||
suppliers_finished_goods: any = [];
|
suppliers_finished_goods: any = [];
|
||||||
|
suppliers_service_providers : any = [];
|
||||||
|
|
||||||
protected _onDestroy = new Subject<void>();
|
protected _onDestroy = new Subject<void>();
|
||||||
|
|
||||||
RMCommentCard: boolean = false;
|
RMCommentCard: boolean = false;
|
||||||
TGCommentCard: boolean = false
|
TGCommentCard: boolean = false;
|
||||||
|
SPCommentCard: boolean = false;
|
||||||
public RMsufficientList: any = [{value:"yes",isdisplayvalue:"Yes",disabled:false},{value:"no",isdisplayvalue:"No",disabled:false},{value:"not applicable",isdisplayvalue:"Stock not required to be maintained",disabled:false}];
|
public RMsufficientList: any = [{value:"yes",isdisplayvalue:"Yes",disabled:false},{value:"no",isdisplayvalue:"No",disabled:false},{value:"not applicable",isdisplayvalue:"Stock not required to be maintained",disabled:false}];
|
||||||
public TGsufficientList: any = [{value:"yes",isdisplayvalue:"Yes",isdisabled:false},{value:"no",isdisplayvalue:"No",isdisabled:false},{value:"not applicable",isdisplayvalue:"Stock not required to be maintained",isdisabled:false}];
|
public TGsufficientList: any = [{value:"yes",isdisplayvalue:"Yes",isdisabled:false},{value:"no",isdisplayvalue:"No",isdisabled:false},{value:"not applicable",isdisplayvalue:"Stock not required to be maintained",isdisabled:false}];
|
||||||
|
public SPsufficientList: any = [{value:"yes",isdisplayvalue:"Yes",isdisabled:false},{value:"no",isdisplayvalue:"No",isdisabled:false},{value:"not applicable",isdisplayvalue:"Stock not required to be maintained",isdisabled:false}];
|
||||||
imageDisplay: any[];
|
imageDisplay: any[];
|
||||||
imageBucket: any=[];
|
imageBucket: any=[];
|
||||||
tab: string='0';
|
tab: string='0';
|
||||||
@ -111,6 +117,9 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
let type3length = type3[0].hasOwnProperty("products") ? type3[0].products.length : 0;
|
let type3length = type3[0].hasOwnProperty("products") ? type3[0].products.length : 0;
|
||||||
let type4 = record.from_business.filter(data => data.type_of_activity_id == 4);
|
let type4 = record.from_business.filter(data => data.type_of_activity_id == 4);
|
||||||
let type4length = type4[0].hasOwnProperty("products") ? type4[0].products.length : 0;
|
let type4length = type4[0].hasOwnProperty("products") ? type4[0].products.length : 0;
|
||||||
|
let type5 = record.from_business.filter(data => data.type_of_activity_id == 5);
|
||||||
|
let type5length = type5[0].hasOwnProperty("products") ? type5[0].products.length : 0;
|
||||||
|
console.log('type5length',type5,type5length);
|
||||||
|
|
||||||
|
|
||||||
let rm_api = record.from_supplier.hasOwnProperty("raw_material") ? record.from_supplier.raw_material : [];
|
let rm_api = record.from_supplier.hasOwnProperty("raw_material") ? record.from_supplier.raw_material : [];
|
||||||
@ -148,6 +157,9 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record,type2length)]),
|
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record,type2length)]),
|
||||||
retail_details: this.fb.array([this.retailFormCreation(type3length)]),
|
retail_details: this.fb.array([this.retailFormCreation(type3length)]),
|
||||||
trade_details: this.fb.array([this.tradingFormCreation(type4length)]),
|
trade_details: this.fb.array([this.tradingFormCreation(type4length)]),
|
||||||
|
servicing_details: this.fb.array([this.servicingFormCreation(type5length)]),
|
||||||
|
is_sufficiant_service_goods: [dataForm.hasOwnProperty('is_sufficiant_service_goods') ? dataForm.is_sufficiant_service_goods : ''],
|
||||||
|
service_goods_remarks: [dataForm.hasOwnProperty('service_goods_remarks') ? dataForm.service_goods_remarks : '' ]
|
||||||
});
|
});
|
||||||
if (api.length > 0) {
|
if (api.length > 0) {
|
||||||
api.forEach(val => {
|
api.forEach(val => {
|
||||||
@ -182,7 +194,16 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 5) {
|
if (val.type_of_activity_id == 5) {
|
||||||
if (val.products) {
|
if (val.products) {
|
||||||
this.serviceProviderForm = true;
|
// this.serviceProviderForm = true;
|
||||||
|
let servicing_temparr = [];
|
||||||
|
if(dataForm.hasOwnProperty('service_provider')){
|
||||||
|
servicing_temparr['service_provider'] = dataForm.servicing_details[0].service_provider;
|
||||||
|
this.initServicingDetails(servicing_temparr);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.suppliers_service_providers = val.products;
|
||||||
|
this.initServicingDetails(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -204,6 +225,9 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record,type2length)]),
|
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record,type2length)]),
|
||||||
retail_details: this.fb.array([this.retailFormCreation(type3length)]),
|
retail_details: this.fb.array([this.retailFormCreation(type3length)]),
|
||||||
trade_details: this.fb.array([this.tradingFormCreation(type4length)]),
|
trade_details: this.fb.array([this.tradingFormCreation(type4length)]),
|
||||||
|
servicing_details: this.fb.array([this.servicingFormCreation(type5length)]),
|
||||||
|
is_sufficiant_service_goods: [''],
|
||||||
|
service_goods_remarks: ['']
|
||||||
});
|
});
|
||||||
if (api.length > 0) {
|
if (api.length > 0) {
|
||||||
api.forEach(val => {
|
api.forEach(val => {
|
||||||
@ -232,8 +256,10 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 5) {
|
if (val.type_of_activity_id == 5) {
|
||||||
if (val.products) {
|
if (val.products) {
|
||||||
// this.suppliers_service_product = val.products;
|
|
||||||
this.serviceProviderForm = true;
|
this.suppliers_service_providers = val.products;
|
||||||
|
this.initServicingDetails(null);
|
||||||
|
// this.serviceProviderForm = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -260,6 +286,10 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
retail_details: this.fb.array([this.retailFormCreation(type3length)]),
|
retail_details: this.fb.array([this.retailFormCreation(type3length)]),
|
||||||
|
|
||||||
trade_details: this.fb.array([this.tradingFormCreation(type4length)]),
|
trade_details: this.fb.array([this.tradingFormCreation(type4length)]),
|
||||||
|
servicing_details: this.fb.array([this.servicingFormCreation(type5length)]),
|
||||||
|
|
||||||
|
is_sufficiant_service_goods: [''],
|
||||||
|
service_goods_remarks: ['']
|
||||||
});
|
});
|
||||||
if (api.length > 0) {
|
if (api.length > 0) {
|
||||||
api.forEach(val => {
|
api.forEach(val => {
|
||||||
@ -289,8 +319,9 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
}
|
}
|
||||||
if (val.type_of_activity_id == 5) {
|
if (val.type_of_activity_id == 5) {
|
||||||
if (val.products) {
|
if (val.products) {
|
||||||
// this.suppliers_service_product = val.products;
|
this.suppliers_service_providers = val.products;
|
||||||
this.serviceProviderForm = true;
|
this.initServicingDetails(null);
|
||||||
|
// this.serviceProviderForm = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -391,6 +422,26 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
servicingForm: Boolean = false;
|
||||||
|
servicingFormCreation(val) {
|
||||||
|
console.log('inside servicingFormCreation',val);
|
||||||
|
let arr = val
|
||||||
|
// let arr = val.filter(data => data.type_of_activity_id == 4);
|
||||||
|
if (arr > 0){
|
||||||
|
console.log('IF');
|
||||||
|
this.servicingForm = true;
|
||||||
|
return this.fb.group({
|
||||||
|
service_provider: this.fb.array([])
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log('Else');
|
||||||
|
return this.fb.group({
|
||||||
|
service_provider: this.fb.array([])
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
initManufacturingDetails(datas) {
|
initManufacturingDetails(datas) {
|
||||||
const rawMaterial = <FormArray>this.stockForm.controls['manufacturing_details']['controls'][0].controls['manufacturing_raw_materials'];
|
const rawMaterial = <FormArray>this.stockForm.controls['manufacturing_details']['controls'][0].controls['manufacturing_raw_materials'];
|
||||||
const finishedGoods = <FormArray>this.stockForm.controls['manufacturing_details']['controls'][0].controls['manufacturing_finished_goods'];
|
const finishedGoods = <FormArray>this.stockForm.controls['manufacturing_details']['controls'][0].controls['manufacturing_finished_goods'];
|
||||||
@ -405,8 +456,8 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
'raw_uom': '',
|
'raw_uom': '',
|
||||||
'other_uom': '',
|
'other_uom': '',
|
||||||
'raw_value': '',
|
'raw_value': '',
|
||||||
'is_sufficiant_raw': '',
|
// 'is_sufficiant_raw': '',
|
||||||
'rawmaterial_remarks': ''
|
// 'rawmaterial_remarks': ''
|
||||||
};
|
};
|
||||||
rawMaterial.push(this.createRawmaterial(Ref_RawMaterials));
|
rawMaterial.push(this.createRawmaterial(Ref_RawMaterials));
|
||||||
});
|
});
|
||||||
@ -423,8 +474,8 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
'goods_uom': '',
|
'goods_uom': '',
|
||||||
'goods_other_uom': '',
|
'goods_other_uom': '',
|
||||||
'goods_value': '',
|
'goods_value': '',
|
||||||
'is_sufficiant_goods': '',
|
// 'is_sufficiant_goods': '',
|
||||||
'finishedgoods_remarks': ''
|
// 'finishedgoods_remarks': ''
|
||||||
};
|
};
|
||||||
finishedGoods.push(this.createGoods(Ref_Finished_Goods));
|
finishedGoods.push(this.createGoods(Ref_Finished_Goods));
|
||||||
});
|
});
|
||||||
@ -473,8 +524,8 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
uomSearch:[null],
|
uomSearch:[null],
|
||||||
other_uom: [''],
|
other_uom: [''],
|
||||||
raw_value: [''],
|
raw_value: [''],
|
||||||
is_sufficiant_raw: [''],
|
// is_sufficiant_raw: [''],
|
||||||
rawmaterial_remarks: ['']
|
// rawmaterial_remarks: ['']
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
@ -485,8 +536,8 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
uomSearch:[null],
|
uomSearch:[null],
|
||||||
other_uom: [records.other_uom],
|
other_uom: [records.other_uom],
|
||||||
raw_value: [records.raw_value],
|
raw_value: [records.raw_value],
|
||||||
is_sufficiant_raw: [records.is_sufficiant_raw],
|
// is_sufficiant_raw: [records.is_sufficiant_raw],
|
||||||
rawmaterial_remarks: [records.rawmaterial_remarks]
|
// rawmaterial_remarks: [records.rawmaterial_remarks]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -504,8 +555,8 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
'traded_goods_uom': '',
|
'traded_goods_uom': '',
|
||||||
'traded_goods_other_uom': '',
|
'traded_goods_other_uom': '',
|
||||||
'estimated_traded_goods_value': '',
|
'estimated_traded_goods_value': '',
|
||||||
'is_sufficiant_traded_goods': '',
|
// 'is_sufficiant_traded_goods': '',
|
||||||
'traded_goods_remarks': ''
|
// 'traded_goods_remarks': ''
|
||||||
};
|
};
|
||||||
tradedGoods.push(this.createTradedGoods(Ref_Trade_Goods));
|
tradedGoods.push(this.createTradedGoods(Ref_Trade_Goods));
|
||||||
});
|
});
|
||||||
@ -541,8 +592,8 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
uomSearch:[null],
|
uomSearch:[null],
|
||||||
goods_other_uom: [''],
|
goods_other_uom: [''],
|
||||||
goods_value: [''],
|
goods_value: [''],
|
||||||
is_sufficiant_goods: [''],
|
// is_sufficiant_goods: [''],
|
||||||
finishedgoods_remarks: ['']
|
// finishedgoods_remarks: ['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -554,8 +605,8 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
uomSearch:[null],
|
uomSearch:[null],
|
||||||
goods_other_uom: [records.goods_other_uom],
|
goods_other_uom: [records.goods_other_uom],
|
||||||
goods_value: [records.goods_value],
|
goods_value: [records.goods_value],
|
||||||
is_sufficiant_goods: [records.is_sufficiant_goods],
|
// is_sufficiant_goods: [records.is_sufficiant_goods],
|
||||||
finishedgoods_remarks: [records.finishedgoods_remarks]
|
// finishedgoods_remarks: [records.finishedgoods_remarks]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -572,8 +623,8 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
'traded_goods_uom': '',
|
'traded_goods_uom': '',
|
||||||
'traded_goods_other_uom': '',
|
'traded_goods_other_uom': '',
|
||||||
'estimated_traded_goods_value': '',
|
'estimated_traded_goods_value': '',
|
||||||
'is_sufficiant_traded_goods': '',
|
// 'is_sufficiant_traded_goods': '',
|
||||||
'traded_goods_remarks': ''
|
// 'traded_goods_remarks': ''
|
||||||
};
|
};
|
||||||
tradedGoods.push(this.createTradedGoods(Ref_Trade_Goods));
|
tradedGoods.push(this.createTradedGoods(Ref_Trade_Goods));
|
||||||
});
|
});
|
||||||
@ -609,8 +660,8 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
uomSearch:[null],
|
uomSearch:[null],
|
||||||
traded_goods_other_uom: [''],
|
traded_goods_other_uom: [''],
|
||||||
estimated_traded_goods_value: [''],
|
estimated_traded_goods_value: [''],
|
||||||
is_sufficiant_traded_goods: [''],
|
// is_sufficiant_traded_goods: [''],
|
||||||
traded_goods_remarks: ['']
|
// traded_goods_remarks: ['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -622,8 +673,78 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
uomSearch:[null],
|
uomSearch:[null],
|
||||||
traded_goods_other_uom: [records.traded_goods_other_uom],
|
traded_goods_other_uom: [records.traded_goods_other_uom],
|
||||||
estimated_traded_goods_value: [records.estimated_traded_goods_value],
|
estimated_traded_goods_value: [records.estimated_traded_goods_value],
|
||||||
is_sufficiant_traded_goods: [records.is_sufficiant_traded_goods],
|
// is_sufficiant_traded_goods: [records.is_sufficiant_traded_goods],
|
||||||
traded_goods_remarks: [records.traded_goods_remarks]
|
// traded_goods_remarks: [records.traded_goods_remarks]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
initServicingDetails(datas) {
|
||||||
|
const service = <FormArray>this.stockForm.controls['servicing_details']['controls'][0].controls['service_provider'];
|
||||||
|
if (datas === null) {
|
||||||
|
|
||||||
|
if (this.suppliers_service_providers.length > 0) {
|
||||||
|
this.suppliers_service_providers.forEach(val => {
|
||||||
|
let Serv_Prov_Goods: any = {
|
||||||
|
'service_provider_name': val,
|
||||||
|
'service_provider_observed': '',
|
||||||
|
'service_provider_quantity': '',
|
||||||
|
'service_provider_uom': '',
|
||||||
|
'service_provider_other_uom': '',
|
||||||
|
'estimated_service_provider_value': ''
|
||||||
|
}
|
||||||
|
|
||||||
|
service.push(this.createServiceProvider(Serv_Prov_Goods));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
service.push(this.createServiceProvider(null));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (datas.service_provider !== undefined) {
|
||||||
|
datas.service_provider.forEach((val, index) => {
|
||||||
|
if (val.estimated_service_provider_value) {
|
||||||
|
this.inWords(val.estimated_service_provider_value, 5, index);
|
||||||
|
}
|
||||||
|
this.checkSPComment(val.service_provider_observed, 5, index);
|
||||||
|
service.push(this.createServiceProvider(val));
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
service.push(this.createServiceProvider(null));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
createServiceProvider(records) {
|
||||||
|
|
||||||
|
if (records === null) {
|
||||||
|
|
||||||
|
return this.fb.group({
|
||||||
|
service_provider_name: [''],
|
||||||
|
service_provider_observed: [''],
|
||||||
|
service_provider_quantity: [''],
|
||||||
|
service_provider_uom: [''],
|
||||||
|
uomSearch:[null],
|
||||||
|
service_provider_other_uom: [''],
|
||||||
|
estimated_service_provider_value: [''],
|
||||||
|
// traded_goods_value: [''],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
return this.fb.group({
|
||||||
|
service_provider_name: [records.service_provider_name],
|
||||||
|
service_provider_observed: [records.service_provider_observed],
|
||||||
|
service_provider_quantity: [records.service_provider_quantity],
|
||||||
|
service_provider_uom: [records.service_provider_uom],
|
||||||
|
uomSearch:[null],
|
||||||
|
service_provider_other_uom: [records.service_provider_other_uom],
|
||||||
|
estimated_service_provider_value: [records.estimated_service_provider_value],
|
||||||
|
// traded_goods_value: [records.traded_goods_value],
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -676,6 +797,11 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
control.push(this.createTradedGoods(null));
|
control.push(this.createTradedGoods(null));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 3: {
|
||||||
|
const control = <FormArray>this.stockForm.controls['servicing_details']['controls'][0].controls['service_provider'];
|
||||||
|
control.push(this.createServiceProvider(null));
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -698,6 +824,11 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
control.removeAt(index);
|
control.removeAt(index);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 3: {
|
||||||
|
const control = <FormArray>this.stockForm.controls['servicing_details']['controls'][0].controls['service_provider'];
|
||||||
|
control.removeAt(index);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -711,14 +842,45 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
FinishedCounterArray: any = [];
|
FinishedCounterArray: any = [];
|
||||||
RetailCounterArray: any = [];
|
RetailCounterArray: any = [];
|
||||||
WholeSaleCounterArray: any = [];
|
WholeSaleCounterArray: any = [];
|
||||||
|
ServiceCounterArray: any = [];
|
||||||
|
|
||||||
not_stock_of_rm: any = [];
|
not_stock_of_rm: any = [];
|
||||||
not_stock_of_fg: any = [];
|
not_stock_of_fg: any = [];
|
||||||
not_stock_of_tg: any = [];
|
not_stock_of_tg: any = [];
|
||||||
not_stock_of_ws: any = [];
|
not_stock_of_ws: 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);
|
console.log(value, flag, index);
|
||||||
|
|
||||||
if (flag == 1) {
|
if (flag == 1) {
|
||||||
|
|
||||||
this.ManufacturingCounterArray[index] = value != "" ? 1 : 0;
|
this.ManufacturingCounterArray[index] = value != "" ? 1 : 0;
|
||||||
@ -833,6 +995,10 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
case 4:
|
case 4:
|
||||||
this.T_tradedGoodsValueInWords[i] = this.constant.convertNumberToWords(e);
|
this.T_tradedGoodsValueInWords[i] = this.constant.convertNumberToWords(e);
|
||||||
break;
|
break;
|
||||||
|
case 5:
|
||||||
|
this.S_GoodsValueInWords[i] = this.constant.convertNumberToWords(e);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,8 +80,14 @@
|
|||||||
<div formArrayName="main_raw_materials">
|
<div formArrayName="main_raw_materials">
|
||||||
<div *ngFor="let items of item.controls.main_raw_materials['controls']; let l=index let last =last"
|
<div *ngFor="let items of item.controls.main_raw_materials['controls']; let l=index let last =last"
|
||||||
[formGroupName]="l">
|
[formGroupName]="l">
|
||||||
|
<ion-row>
|
||||||
|
<div style="width: 85%;">
|
||||||
<mat-card-subtitle>Raw Material #{{l+1}}</mat-card-subtitle>
|
<mat-card-subtitle>Raw Material #{{l+1}}</mat-card-subtitle>
|
||||||
|
</div>
|
||||||
|
<div style="width: 10%;">
|
||||||
<button mini ion-fab color="optblue" slot="fixed" (click)="captureTheSupplierPics('Raw Material',l,items.get('manufacturing_supplier_name').value)"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button>
|
<button mini ion-fab color="optblue" slot="fixed" (click)="captureTheSupplierPics('Raw Material',l,items.get('manufacturing_supplier_name').value)"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button>
|
||||||
|
</div>
|
||||||
|
</ion-row>
|
||||||
<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%">
|
||||||
@ -191,8 +197,15 @@
|
|||||||
<div formArrayName="trading_products">
|
<div formArrayName="trading_products">
|
||||||
<div *ngFor="let items of item.controls.trading_products['controls']; let l=index; let last = last"
|
<div *ngFor="let items of item.controls.trading_products['controls']; let l=index; let last = last"
|
||||||
[formGroupName]="l">
|
[formGroupName]="l">
|
||||||
|
<ion-row>
|
||||||
|
<div style="width: 85%;">
|
||||||
<mat-card-subtitle>Trading Product #{{l+1}}</mat-card-subtitle>
|
<mat-card-subtitle>Trading Product #{{l+1}}</mat-card-subtitle>
|
||||||
|
</div>
|
||||||
|
<div style="width: 10%;">
|
||||||
<button mini ion-fab color="optblue" slot="fixed" (click)="captureTheSupplierPics('Trading Product',l,items.get('trade_supplier_name').value)"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button>
|
<button mini ion-fab color="optblue" slot="fixed" (click)="captureTheSupplierPics('Trading Product',l,items.get('trade_supplier_name').value)"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button>
|
||||||
|
</div>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
<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%">
|
||||||
@ -295,6 +308,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
<mat-card *ngIf="servicingForm">
|
<mat-card *ngIf="servicingForm">
|
||||||
|
|
||||||
<mat-card-title>
|
<mat-card-title>
|
||||||
@ -302,18 +316,24 @@
|
|||||||
</mat-card-title>
|
</mat-card-title>
|
||||||
|
|
||||||
<div formArrayName="servicing_details">
|
<div formArrayName="servicing_details">
|
||||||
<div *ngFor="let serv of supplierInfoForm.controls.servicing_details['controls']; let i=index" [formGroupName]="i">
|
<div *ngFor="let item of supplierInfoForm.controls.servicing_details['controls']; let i=index" [formGroupName]="i">
|
||||||
<div formArrayName="service_providers">
|
<div formArrayName="service_providers">
|
||||||
<div *ngFor="let ser of serv.controls.service_providers['controls']; let s=index; let last = last"
|
<div *ngFor="let items of item.controls.service_providers['controls']; let l=index; let last = last"
|
||||||
[formGroupName]="s">
|
[formGroupName]="l">
|
||||||
<mat-card-subtitle>Service Provider #{{s+1}}</mat-card-subtitle>
|
<ion-row>
|
||||||
|
<div style="width: 85%;">
|
||||||
|
<mat-card-subtitle>Service Provider #{{l+1}}</mat-card-subtitle>
|
||||||
|
</div>
|
||||||
|
<div style="width: 10%;">
|
||||||
|
<button mini ion-fab color="optblue" slot="fixed" (click)="captureTheSupplierPics('Service Provider',l,items.get('service_provider_supplier_name').value)"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button>
|
||||||
|
</div>
|
||||||
|
</ion-row>
|
||||||
<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 Provide Name" formControlName="service_provider_name">
|
<mat-select placeholder="service provider Name" formControlName="service_provider_name">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let sp of business_serviceProvider" [value]="sp.name">{{sp.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%">
|
||||||
@ -333,7 +353,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select placeholder="Contact Person Designation" formControlName="person_designation"
|
<mat-select placeholder="Contact Person Designation" formControlName="person_designation"
|
||||||
(selectionChange)="selectedPersonDesignation(ser,$event.value,3)">
|
(selectionChange)="selectedPersonDesignation(items,$event.value,3)">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let comrelShip of m_companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
<mat-option *ngFor="let comrelShip of m_companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||||
{{comrelShip.name}}
|
{{comrelShip.name}}
|
||||||
@ -341,7 +361,7 @@
|
|||||||
<!-- <mat-option value="1" > Not Applicable </mat-option> -->
|
<!-- <mat-option value="1" > Not Applicable </mat-option> -->
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%" *ngIf="ser.get('person_designation').value == 1">
|
<mat-form-field style="width: 100%" *ngIf="items.get('person_designation').value == 1">
|
||||||
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
|
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
@ -362,7 +382,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<mat-select placeholder="Payment Terms" formControlName="service_provider_payment_type"
|
<mat-select placeholder="Payment Terms" formControlName="service_provider_payment_type"
|
||||||
(selectionChange)="selectedPaymentTerms(ser,$event.value,3);checkCard($event.value,3,s);">
|
(selectionChange)="selectedPaymentTerms(items,$event.value,3);checkCard($event.value,3,l);">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let pm of m_paymentList" [value]="pm.id">{{ pm.name }}</mat-option>
|
<mat-option *ngFor="let pm of m_paymentList" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
@ -376,7 +396,7 @@
|
|||||||
<mat-option value="Payment made through Cash and Banking channels.">Payment made through Cash and Banking Channels.</mat-option>
|
<mat-option value="Payment made through Cash and Banking channels.">Payment made through Cash and Banking Channels.</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<span *ngIf="items.get('trade_product_payment_type').value == 3">
|
<span *ngIf="items.get('service_provider_payment_type').value == 3">
|
||||||
<mat-label>No.of days of Credit Provided by Supplier </mat-label>
|
<mat-label>No.of days of Credit Provided by Supplier </mat-label>
|
||||||
<mat-form-field style="width: 100%">
|
<mat-form-field style="width: 100%">
|
||||||
<input matInput placeholder="Days From" formControlName="service_provider_credit_days_from" type="number">
|
<input matInput placeholder="Days From" formControlName="service_provider_credit_days_from" type="number">
|
||||||
@ -389,8 +409,7 @@
|
|||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<ion-buttons end>
|
<ion-buttons end>
|
||||||
<ion-col col-3 offset-3>
|
<ion-col col-3 offset-3>
|
||||||
<a (click)="removeServiceProvider(s)"
|
<a (click)="removeServiceProvider(l)" *ngIf="item.controls.service_providers.controls.length > 1">
|
||||||
*ngIf="serv.controls.service_providers.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>
|
||||||
|
|||||||
@ -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 = [];
|
||||||
@ -61,11 +61,11 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
if(data.dataStatus){
|
if(data.dataStatus){
|
||||||
|
|
||||||
let datas = data.records;
|
let datas = data.records;
|
||||||
|
console.log('datas',datas);
|
||||||
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];
|
||||||
});
|
});
|
||||||
@ -89,6 +89,8 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
|
|
||||||
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.!');
|
||||||
this.noRecordsFound = false;
|
this.noRecordsFound = false;
|
||||||
@ -102,14 +104,13 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
this.getdropList();
|
this.getdropList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ionViewDidLoad() {
|
ionViewDidLoad() {
|
||||||
console.log('ionViewDidLoad PdQuestionSupplierInfoPage');
|
console.log('ionViewDidLoad PdQuestionSupplierInfoPage');
|
||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
serviceProviderForm: Boolean = false;
|
// serviceProviderForm: Boolean = false;
|
||||||
initFormLoadDetails(record) {
|
initFormLoadDetails(record) {
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
params.parent_pdid = this.pdDetails.parent_pd_id
|
params.parent_pdid = this.pdDetails.parent_pd_id
|
||||||
@ -120,6 +121,7 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
this.qustCat.retiverForm(params).subscribe(
|
this.qustCat.retiverForm(params).subscribe(
|
||||||
data => {
|
data => {
|
||||||
if (data['dataStatus'] == true) {
|
if (data['dataStatus'] == true) {
|
||||||
|
|
||||||
let dataForm = data['records'];
|
let dataForm = data['records'];
|
||||||
if (dataForm !== undefined) {
|
if (dataForm !== undefined) {
|
||||||
this.supplierInfoForm = this.fb.group({
|
this.supplierInfoForm = this.fb.group({
|
||||||
@ -168,9 +170,9 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
let arr2 = record.filter(data => data.type_of_activity_id == 5);
|
let arr2 = record.filter(data => data.type_of_activity_id == 5);
|
||||||
if (arr2.length > 0) {
|
if (arr2.length > 0) {
|
||||||
// this.serviceProviderForm = true;
|
// this.serviceProviderForm = true;
|
||||||
if (dataForm.trade_details[0] != null) {
|
if (dataForm.servicing_details[0] != null) {
|
||||||
let api_service_provider = dataForm.servicing_details[0].service_provider;
|
let api_service_providers = dataForm.servicing_details[0].service_providers;
|
||||||
this.initServiceProvidersDetails(api_service_provider);
|
this.initServiceProvidersDetails(api_service_providers);
|
||||||
this.supplierInfoForm.controls['servicing_details']['controls'][0].controls['service_providers_total_payments_percent_on_credit'].setValue(dataForm.servicing_details[0].service_providers_total_payments_percent_on_credit || null);
|
this.supplierInfoForm.controls['servicing_details']['controls'][0].controls['service_providers_total_payments_percent_on_credit'].setValue(dataForm.servicing_details[0].service_providers_total_payments_percent_on_credit || null);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -180,6 +182,7 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
}
|
}
|
||||||
this.noRecordsFound = true;
|
this.noRecordsFound = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.supplierInfoForm = this.fb.group({
|
this.supplierInfoForm = this.fb.group({
|
||||||
parent_pdid: [this.pdDetails.parent_pd_id],
|
parent_pdid: [this.pdDetails.parent_pd_id],
|
||||||
pdid: [this.pdDetails.pd_id],
|
pdid: [this.pdDetails.pd_id],
|
||||||
@ -210,6 +213,7 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
this.noRecordsFound = true;
|
this.noRecordsFound = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
console.log(' data in else part');
|
||||||
this.supplierInfoForm = this.fb.group({
|
this.supplierInfoForm = this.fb.group({
|
||||||
parent_pdid: [this.pdDetails.parent_pd_id],
|
parent_pdid: [this.pdDetails.parent_pd_id],
|
||||||
pdid: [this.pdDetails.pd_id],
|
pdid: [this.pdDetails.pd_id],
|
||||||
@ -234,7 +238,6 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
}
|
}
|
||||||
let arr2 = record.filter(data => data.type_of_activity_id == 5);
|
let arr2 = record.filter(data => data.type_of_activity_id == 5);
|
||||||
if (arr2.length > 0) {
|
if (arr2.length > 0) {
|
||||||
// this.serviceProviderForm = true;
|
|
||||||
this.initServiceProvidersDetails(null);
|
this.initServiceProvidersDetails(null);
|
||||||
this.supplierInfoForm.controls['servicing_details']['controls'][0].controls['service_providers_total_payments_percent_on_credit'].setValue(null);
|
this.supplierInfoForm.controls['servicing_details']['controls'][0].controls['service_providers_total_payments_percent_on_credit'].setValue(null);
|
||||||
}
|
}
|
||||||
@ -277,14 +280,18 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
|
|
||||||
servicingForm: Boolean = false;
|
servicingForm: Boolean = false;
|
||||||
servicingFormCreation(val) {
|
servicingFormCreation(val) {
|
||||||
|
|
||||||
let arr = val.filter(data => data.type_of_activity_id == 5);
|
let arr = val.filter(data => data.type_of_activity_id == 5);
|
||||||
|
console.log(arr,arr.length);
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
|
console.log('IF');
|
||||||
this.servicingForm = true;
|
this.servicingForm = true;
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
service_providers: this.fb.array([]),
|
service_providers: this.fb.array([]),
|
||||||
service_providers_total_payments_percent_on_credit: []
|
service_providers_total_payments_percent_on_credit: []
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
console.log('ELSE');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -404,11 +411,14 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initServiceProvidersDetails(datas) {
|
initServiceProvidersDetails(datas) {
|
||||||
|
console.log('datas',datas);
|
||||||
const control = <FormArray>this.supplierInfoForm.controls['servicing_details']['controls'][0].controls['service_providers'];
|
const control = <FormArray>this.supplierInfoForm.controls['servicing_details']['controls'][0].controls['service_providers'];
|
||||||
|
|
||||||
if (datas === null) {
|
if (datas === null) {
|
||||||
|
console.log('initServiceProvidersDetails if null');
|
||||||
control.push(this.initServiceProviders(null));
|
control.push(this.initServiceProviders(null));
|
||||||
} else {
|
} else {
|
||||||
|
console.log('else not null');
|
||||||
datas.forEach((val, inx) => {
|
datas.forEach((val, inx) => {
|
||||||
this.checkCard(val.service_provider_payment_type, 3, inx);
|
this.checkCard(val.service_provider_payment_type, 3, inx);
|
||||||
control.push(this.initServiceProviders(val));
|
control.push(this.initServiceProviders(val));
|
||||||
@ -417,7 +427,9 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initServiceProviders(records) {
|
initServiceProviders(records) {
|
||||||
|
console.log('initServiceProviders',records);
|
||||||
if (records === null) {
|
if (records === null) {
|
||||||
|
console.log('if');
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
service_provider_name: [''],
|
service_provider_name: [''],
|
||||||
service_provider_supplier_name: [''],
|
service_provider_supplier_name: [''],
|
||||||
@ -435,6 +447,7 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
service_provider_credit_days_to: [''],
|
service_provider_credit_days_to: [''],
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
console.log('else');
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
service_provider_name: [records.service_provider_name],
|
service_provider_name: [records.service_provider_name],
|
||||||
person_title_name: [records.person_title_name],
|
person_title_name: [records.person_title_name],
|
||||||
@ -686,8 +699,8 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
|
|
||||||
|
|
||||||
captureTheSupplierPics(materialName, index, supplierName) {
|
captureTheSupplierPics(materialName, index, supplierName) {
|
||||||
console.log('ds');
|
|
||||||
// alert('dsa');
|
|
||||||
if (supplierName != '') {
|
if (supplierName != '') {
|
||||||
// 'Raw Material','l',items.get('manufacturing_supplier_name').value
|
// 'Raw Material','l',items.get('manufacturing_supplier_name').value
|
||||||
this.cameraProvider.getpicture().then(res => {
|
this.cameraProvider.getpicture().then(res => {
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user