mirror of
https://github.com/dyiop/astute.git
synced 2025-04-09 06:40:20 -04:00
Add files via upload
This commit is contained in:
parent
4ec6f0c883
commit
7e2f0cb669
|
@ -170,7 +170,7 @@
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-success" type="button"
|
<button class="btn btn-success" type="button"
|
||||||
[disabled]="!(ponum.value && podate.value && customerid.value && contractnum.value && contractamt.value)"
|
[disabled]="!(ponum.value && podate.value && customerid.value && contractnum.value && contractamt.value)"
|
||||||
(click)="addPo(projNum.value, ponum.value, podate.value, customerid.value, contractnum.value, contractamt.value, new)"
|
(click)="addPo(projNum.value, ponum.value, podate.value, customerid.value, contractnum.value, contractamt.value, potitle.value, new)"
|
||||||
>
|
>
|
||||||
Add
|
Add
|
||||||
</button>
|
</button>
|
||||||
|
@ -201,13 +201,22 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">PO Number</label>
|
<label class="col-sm-2 col-form-label">SO Title</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="text" class="form-control" placeholder="PO Number" [value]="selected.ponum" #ponum disabled>
|
<select class="form-control" [value]="selected.title" #customerid disabled>
|
||||||
|
<option *ngFor="let customer of customers" [value]="customer.title">{{customer.title}}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-2 col-form-label">PO Date</label>
|
<label class="col-sm-2 col-form-label">SO Number</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" placeholder="SO Number" [value]="selected.ponum" #ponum disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-2 col-form-label">SO Date</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="date" class="form-control" [value]="selected.podate" #podate>
|
<input type="date" class="form-control" [value]="selected.podate" #podate>
|
||||||
</div>
|
</div>
|
||||||
|
@ -323,7 +332,7 @@
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-success" type="button"
|
<button class="btn btn-success" type="button"
|
||||||
[disabled]="!(ponum.value && podate.value && contractnum.value && contractamt.value)"
|
[disabled]="!(ponum.value && podate.value && contractnum.value && contractamt.value)"
|
||||||
(click)="editPo(projNum.value, ponum.value, podate.value, contractnum.value, contractamt.value, edit)"
|
(click)="editPo(projNum.value, ponum.value, podate.value, contractnum.value, contractamt.value, potitle.value, edit)"
|
||||||
>
|
>
|
||||||
Update
|
Update
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -19,6 +19,7 @@ export class SalesOrderComponent implements OnInit {
|
||||||
// {headerName: 'Customer ID', field: 'customerId'},
|
// {headerName: 'Customer ID', field: 'customerId'},
|
||||||
{headerName: 'Customer Name', field: 'customerName'},
|
{headerName: 'Customer Name', field: 'customerName'},
|
||||||
{headerName: 'Contract Number', field: 'contractNum'},
|
{headerName: 'Contract Number', field: 'contractNum'},
|
||||||
|
{headerName: 'SO Title', field: 'title'},
|
||||||
{headerName: 'Contract Amount', field: 'contractAmt'},
|
{headerName: 'Contract Amount', field: 'contractAmt'},
|
||||||
{headerName: 'SO Date', field: 'podate'}
|
{headerName: 'SO Date', field: 'podate'}
|
||||||
];
|
];
|
||||||
|
@ -31,14 +32,15 @@ export class SalesOrderComponent implements OnInit {
|
||||||
this.refreshData();
|
this.refreshData();
|
||||||
}
|
}
|
||||||
|
|
||||||
addPo(projNum, ponum, podate, customerid, contractnum, contractamt, ref) {
|
addPo(projNum, ponum, podate, customerid, contractnum, contractamt, title, ref ) {
|
||||||
const poData = {
|
const poData = {
|
||||||
"astuteProjectNumber": projNum,
|
"astuteProjectNumber": projNum,
|
||||||
"poNum": ponum,
|
"poNum": ponum,
|
||||||
"PODate": this.formatDate(new Date(podate)),
|
"PODate": this.formatDate(new Date(podate)),
|
||||||
"customerId": customerid,
|
"customerId": customerid,
|
||||||
"contractNum": contractnum,
|
"contractNum": contractnum,
|
||||||
"contractAmt": contractamt,
|
"contractAmt": contractamt,
|
||||||
|
"title": title,
|
||||||
}
|
}
|
||||||
console.log (poData.PODate);
|
console.log (poData.PODate);
|
||||||
this.astuteClientService.createPO(poData).then((data) => {
|
this.astuteClientService.createPO(poData).then((data) => {
|
||||||
|
@ -70,13 +72,14 @@ export class SalesOrderComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
editPo(projNum, ponum, podate, contractnum, contractamt, ref) {
|
editPo(projNum, ponum, podate, contractnum, contractamt, title, ref) {
|
||||||
const poData = {
|
const poData = {
|
||||||
"astuteProjectNumber": projNum,
|
"astuteProjectNumber": projNum,
|
||||||
"poNum": ponum,
|
"poNum": ponum,
|
||||||
"PODate": this.formatDate(new Date(podate)),
|
"PODate": this.formatDate(new Date(podate)),
|
||||||
"contractNum": contractnum,
|
"contractNum": contractnum,
|
||||||
"contractAmt": contractamt,
|
"contractAmt": contractamt,
|
||||||
|
"title": title,
|
||||||
}
|
}
|
||||||
console.log(poData);
|
console.log(poData);
|
||||||
this.astuteClientService.updatePO(ponum, poData).then((data) => {
|
this.astuteClientService.updatePO(ponum, poData).then((data) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user