mirror of
https://github.com/dyiop/astute.git
synced 2025-04-06 21:30:20 -04:00
Add files via upload
This commit is contained in:
parent
4ec6f0c883
commit
7e2f0cb669
|
@ -170,7 +170,7 @@
|
|||
<div class="modal-footer">
|
||||
<button class="btn btn-success" type="button"
|
||||
[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
|
||||
</button>
|
||||
|
@ -201,13 +201,22 @@
|
|||
</div>
|
||||
</div>
|
||||
<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">
|
||||
<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 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">
|
||||
<input type="date" class="form-control" [value]="selected.podate" #podate>
|
||||
</div>
|
||||
|
@ -323,7 +332,7 @@
|
|||
<div class="modal-footer">
|
||||
<button class="btn btn-success" type="button"
|
||||
[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
|
||||
</button>
|
||||
|
|
|
@ -19,6 +19,7 @@ export class SalesOrderComponent implements OnInit {
|
|||
// {headerName: 'Customer ID', field: 'customerId'},
|
||||
{headerName: 'Customer Name', field: 'customerName'},
|
||||
{headerName: 'Contract Number', field: 'contractNum'},
|
||||
{headerName: 'SO Title', field: 'title'},
|
||||
{headerName: 'Contract Amount', field: 'contractAmt'},
|
||||
{headerName: 'SO Date', field: 'podate'}
|
||||
];
|
||||
|
@ -31,14 +32,15 @@ export class SalesOrderComponent implements OnInit {
|
|||
this.refreshData();
|
||||
}
|
||||
|
||||
addPo(projNum, ponum, podate, customerid, contractnum, contractamt, ref) {
|
||||
addPo(projNum, ponum, podate, customerid, contractnum, contractamt, title, ref ) {
|
||||
const poData = {
|
||||
"astuteProjectNumber": projNum,
|
||||
"poNum": ponum,
|
||||
"PODate": this.formatDate(new Date(podate)),
|
||||
"customerId": customerid,
|
||||
"contractNum": contractnum,
|
||||
"contractAmt": contractamt,
|
||||
"contractAmt": contractamt,
|
||||
"title": title,
|
||||
}
|
||||
console.log (poData.PODate);
|
||||
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 = {
|
||||
"astuteProjectNumber": projNum,
|
||||
"poNum": ponum,
|
||||
"PODate": this.formatDate(new Date(podate)),
|
||||
"contractNum": contractnum,
|
||||
"contractAmt": contractamt,
|
||||
"title": title,
|
||||
}
|
||||
console.log(poData);
|
||||
this.astuteClientService.updatePO(ponum, poData).then((data) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user