Downloaded Button in Qc Completed : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-06-06 22:12:40 +05:30
parent 2610ba397b
commit e84b1fe9a0
4 changed files with 30 additions and 5 deletions

View File

@ -108,11 +108,15 @@ export class AddPdComponent implements OnInit, OnDestroy {
});
}
lenderShortName:string;
/** FOR Dropdowns */
selectedLender(lender) {
console.log('lender',lender);
this.lenderBranchList = lender['branches'];
this.lenderShortName = lender['short_name'];
this._PDtriggerForm.controls.pd_branch_id.setValue(null);
// this._PDtriggerForm.controls.pd_branch_id.setValue('Clix Capital Services Private Limited')
}
getLenderList() {
@ -129,7 +133,6 @@ export class AddPdComponent implements OnInit, OnDestroy {
data => {
if (data.status == 200) {
this.productList = data.records
}
}, error => this.errorMessage = <any>error);
}

View File

@ -36,6 +36,7 @@
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Re-generate Report" matTooltipPosition="above" (click)="reGeneratePFReport()"><mat-icon>autorenew</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Report" matTooltipPosition="above" (click)="downloadPDReport()"><mat-icon>get_app</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Report" matTooltipPosition="above" (click)="archivePDImages()"><mat-icon>save_alt</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdViewCompoent()" style="margin-right: 2px;"><mat-icon>close</mat-icon></button>
</mat-toolbar>

View File

@ -132,7 +132,7 @@ export class QcPdReportComponent implements OnInit {
};
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
if (data.dataStatus) {
this.notifier.notify('success', 'Your Changes Updated.!');
this.notifier.notify('success', 'Done Successfully..!');
// this.getPdReportVersionList();
} else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
@ -151,7 +151,7 @@ export class QcPdReportComponent implements OnInit {
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
if (data.dataStatus) {
console.log(data.records);
this.notifier.notify('success', 'Your Changes Updated.!');
this.notifier.notify('success', 'Done Successfully..!');
this.getPdReportVersionList();
} else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
@ -169,7 +169,25 @@ export class QcPdReportComponent implements OnInit {
this.pdTrigerService.generatePDReportPDF(data).subscribe(data => {
if (data.dataStatus) {
window.open(data.records);
this.notifier.notify('success', 'Your Changes Updated.!');
this.notifier.notify('success', 'Done Successfully..!');
} else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}
}, err => {
this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
});
}
archivePDImages(){
let data = {
"pd_id": this.startPD,
"form_id":""
};
this.pdTrigerService.archivePDImages(data).subscribe(data => {
if (data.dataStatus) {
window.open(data.records);
this.notifier.notify('success', 'Downloaded Successfully..!');
} else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}

View File

@ -599,6 +599,9 @@ export class QcService {
return this._http.post<any>(this.apiUrl + "generatePDReportPDF", { "records": pdId });
}
archivePDImages(Dtl : any): Observable<any> {
return this._http.post<any>(this.apiUrl + "archivePDImages", { "records": Dtl });
}
getHTMLContent(id:any): Observable<any> {
return this._http.post<any>(this.apiUrl+"getHTMLContent", {"pd_id":id});