Commit 3384054b authored by TUM's avatar TUM
Browse files

multi location fqo

No related merge requests found
Pipeline #2852 canceled with stage
Showing with 41 additions and 2 deletions
+41 -2
......@@ -35,10 +35,15 @@
<div class="form-box">
<div class="text-right pb-3">
<button mat-raised-button color="primary" (click)="Save()">
<button mat-raised-button color="primary" (click)="Save()" style="margin-right: 20px;">
<i class="material-icons">save</i>
Create PO
</button>
<button mat-raised-button (click)="PoReport()" *ngIf="po_no">
<i class="material-icons">get_app</i>
Export Report
</button>
</div>
<auto-table [tableName]="'SNPP203'" [tableData]="tableData" [showPagination]="true" [stickyCol]="stickyColArray">
<ng-template let-header="header" #tblHeader>
......
......@@ -4,6 +4,7 @@ import { ModalService } from 'src/app/core/modal.service';
import { ActivatedRoute } from '@angular/router';
import { Globals } from 'src/app/core/global';
import { SelectionModel } from "@angular/cdk/collections";
import * as moment from "moment";
@Component({
......@@ -33,6 +34,7 @@ export class SNPP203Component implements OnInit {
public tableData: any = [];
public selection = new SelectionModel<any>(true, []);
public stickyColArray = ['SELECT', 'VENDOR', 'ACCEPT_PART_NO', 'PART_NAME', 'ORDER_QTY', 'ACCEPT_QTY', 'REMARKS'];
public po_no : string = null;
ngOnInit() {
this.param.PIC = this.global.GetTokenDetail("ssUserName");
this.Search();
......@@ -44,7 +46,6 @@ export class SNPP203Component implements OnInit {
this.http.post("IC","SNPP203_GetData",this.param)
.subscribe(res => {
this.tableData = res.Table;
console.log(this.tableData,"tableeeeeeeeee")
})
......@@ -82,6 +83,7 @@ export class SNPP203Component implements OnInit {
.subscribe(res =>{
if(res.STATUS == "DONE"){
this.modal.info("Create new PO complete <br> PO No = " + res.FROM_PO + " - " + res.TO_PO,this.viewref);
this.po_no = res.FROM_PO
this.selection.clear()
this.Search();
}else{
......@@ -110,5 +112,17 @@ export class SNPP203Component implements OnInit {
this.tableData.forEach(row =>this.selection.select(row));
}
public PoReport() {
this.global.GoToExportName("PMS_RPT_IC_SNPP203", {
P_COMPANY_CODE: this.global.GetTokenDetail("ssComCode"),
P_USER: this.global.GetTokenDetail("ssUserName")
} , "PO_DATA-" + moment().format("DD-MMM-YYYY"), "EXCELOPENXML"
);
}
}
......@@ -892,6 +892,15 @@
</ng-template>
</mat-tab>
<mat-tab label="MULTI LOCATION">
<ng-template matTabContent>
<div class="mt-2 mb-3">
<auto-table [tableName]="'SNSQ005_LOCATION'" [tableData]="dataListLocation" [showPagination]="false">
</auto-table>
</div>
</ng-template>
</mat-tab>
</mat-tab-group>
......
......@@ -45,6 +45,7 @@ export class SNSQ005_001Component implements OnInit {
public dataListBackOrder: any = [];
public dataListAllocate: any = [];
public dataListChainPart: any = [];
public dataListLocation: any = [];
public dataListSuspTF: any = [];
public dataListSusp: any = {};
......@@ -116,7 +117,10 @@ export class SNSQ005_001Component implements OnInit {
this.GetDataTab5();
} else if (this.iActiveTab == 6) {
this.GetDataTab6();
}else if (this.iActiveTab == 7) {
this.GetDataTab7();
}
}
......@@ -213,6 +217,13 @@ export class SNSQ005_001Component implements OnInit {
})
}
private GetDataTab7() {
this.http.get("IC", "SNSQ005_GetPartInfo_G7", this.partData.PART_NO)
.subscribe(result => {
this.dataListLocation = result.Table; // Tab 7
})
}
public OpenSuspend() {
this.dataListSuspTF = [];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment