Commit 6ad3395e by cam

benchmark for set status, and cutting die order page

need to clean up set status to match the original program and need to fix cutting die edits not being enabled.
parent c3f1ba54
...@@ -3,7 +3,7 @@ object FAddOrder: TFAddOrder ...@@ -3,7 +3,7 @@ object FAddOrder: TFAddOrder
Height = 477 Height = 477
OnShow = WebFormShow OnShow = WebFormShow
object WebLabel1: TWebLabel object WebLabel1: TWebLabel
Left = 278 Left = 310
Top = 44 Top = 44
Width = 35 Width = 35
Height = 15 Height = 15
...@@ -12,7 +12,7 @@ object FAddOrder: TFAddOrder ...@@ -12,7 +12,7 @@ object FAddOrder: TFAddOrder
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object WebLabel2: TWebLabel object WebLabel2: TWebLabel
Left = 414 Left = 452
Top = 44 Top = 44
Width = 58 Width = 58
Height = 15 Height = 15
...@@ -21,7 +21,7 @@ object FAddOrder: TFAddOrder ...@@ -21,7 +21,7 @@ object FAddOrder: TFAddOrder
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object edtSearch: TWebEdit object edtSearch: TWebEdit
Left = 278 Left = 310
Top = 62 Top = 62
Width = 121 Width = 121
Height = 22 Height = 22
...@@ -30,7 +30,7 @@ object FAddOrder: TFAddOrder ...@@ -30,7 +30,7 @@ object FAddOrder: TFAddOrder
OnChange = edtSearchChange OnChange = edtSearchChange
end end
object edtID: TWebEdit object edtID: TWebEdit
Left = 414 Left = 452
Top = 62 Top = 62
Width = 69 Width = 69
Height = 22 Height = 22
...@@ -196,7 +196,7 @@ object FAddOrder: TFAddOrder ...@@ -196,7 +196,7 @@ object FAddOrder: TFAddOrder
DesignTimeSampleData = True DesignTimeSampleData = True
end end
object cbCorrugatedPlate: TWebCheckBox object cbCorrugatedPlate: TWebCheckBox
Left = 26 Left = 0
Top = 63 Top = 63
Width = 113 Width = 113
Height = 22 Height = 22
...@@ -207,8 +207,8 @@ object FAddOrder: TFAddOrder ...@@ -207,8 +207,8 @@ object FAddOrder: TFAddOrder
OnClick = cbCorrugatedPlateClick OnClick = cbCorrugatedPlateClick
end end
object cbWebPlate: TWebCheckBox object cbWebPlate: TWebCheckBox
Left = 152 Left = 124
Top = 64 Top = 63
Width = 83 Width = 83
Height = 22 Height = 22
Caption = 'Web Plate' Caption = 'Web Plate'
...@@ -239,6 +239,17 @@ object FAddOrder: TFAddOrder ...@@ -239,6 +239,17 @@ object FAddOrder: TFAddOrder
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = btnConfirmClick OnClick = btnConfirmClick
end end
object cbCuttingDie: TWebCheckBox
Left = 221
Top = 63
Width = 83
Height = 22
Caption = 'Cutting Die'
ChildOrder = 3
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = cbCuttingDieClick
end
object XDataWebClient1: TXDataWebClient object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 730 Left = 730
......
...@@ -31,6 +31,7 @@ type ...@@ -31,6 +31,7 @@ type
xdwdsCustomersSHORT_NAME: TStringField; xdwdsCustomersSHORT_NAME: TStringField;
wdsCustomers: TWebDataSource; wdsCustomers: TWebDataSource;
xdwdsCustomersADDRESS: TStringField; xdwdsCustomersADDRESS: TStringField;
cbCuttingDie: TWebCheckBox;
procedure WebFormShow(Sender: TObject); procedure WebFormShow(Sender: TObject);
procedure TMSFNCGrid1SelectedCell(Sender: TObject; ACol, ARow: Integer); procedure TMSFNCGrid1SelectedCell(Sender: TObject; ACol, ARow: Integer);
procedure edtSearchChange(Sender: TObject); procedure edtSearchChange(Sender: TObject);
...@@ -38,6 +39,7 @@ type ...@@ -38,6 +39,7 @@ type
procedure cbWebPlateClick(Sender: TObject); procedure cbWebPlateClick(Sender: TObject);
procedure btnConfirmClick(Sender: TObject); procedure btnConfirmClick(Sender: TObject);
procedure btnCancelClick(Sender: TObject); procedure btnCancelClick(Sender: TObject);
procedure cbCuttingDieClick(Sender: TObject);
private private
[async] procedure getCustomers; [async] procedure getCustomers;
procedure PopulateGridManually; procedure PopulateGridManually;
...@@ -77,11 +79,19 @@ end; ...@@ -77,11 +79,19 @@ end;
procedure TFAddOrder.cbCorrugatedPlateClick(Sender: TObject); procedure TFAddOrder.cbCorrugatedPlateClick(Sender: TObject);
begin begin
cbWebPlate.Checked := False; cbWebPlate.Checked := False;
cbCuttingDie.Checked := False;
end;
procedure TFAddOrder.cbCuttingDieClick(Sender: TObject);
begin
cbCorrugatedPlate.Checked := False;
cbWebPlate.Checked := False;
end; end;
procedure TFAddOrder.cbWebPlateClick(Sender: TObject); procedure TFAddOrder.cbWebPlateClick(Sender: TObject);
begin begin
cbCorrugatedPlate.Checked := False; cbCorrugatedPlate.Checked := False;
cbCuttingDie.Checked := False;
end; end;
procedure TFAddOrder.edtSearchChange(Sender: TObject); procedure TFAddOrder.edtSearchChange(Sender: TObject);
......
...@@ -51,7 +51,8 @@ type ...@@ -51,7 +51,8 @@ type
procedure ShowForm( AFormClass: TWebFormClass ); procedure ShowForm( AFormClass: TWebFormClass );
procedure EditUser( Mode, Username, Password, Name, Status, Email, procedure EditUser( Mode, Username, Password, Name, Status, Email,
Access, Rights, Perspective, QB: string); Access, Rights, Perspective, QB: string);
procedure ViewOrderEntry(orderInfo, customerInfo, mode: string); procedure ViewOrderEntryCorrugated(orderInfo, customerInfo, mode: string);
procedure ViewOrderEntryCuttingDie(orderInfo, customerInfo, mode: string);
procedure ViewOrders(info: string); procedure ViewOrders(info: string);
procedure ShowUserForm(Info: string); procedure ShowUserForm(Info: string);
end; end;
...@@ -70,7 +71,8 @@ uses ...@@ -70,7 +71,8 @@ uses
View.Users, View.Users,
View.EditUser, View.EditUser,
View.Orders, View.Orders,
View.OrderEntryCorrugated; View.OrderEntryCorrugated,
View.OrderEntryCuttingDie;
{$R *.dfm} {$R *.dfm}
...@@ -227,12 +229,20 @@ begin ...@@ -227,12 +229,20 @@ begin
end; end;
procedure TFViewMain.ViewOrderEntry(orderInfo, customerInfo, mode: string); procedure TFViewMain.ViewOrderEntryCorrugated(orderInfo, customerInfo, mode: string);
begin begin
lblAppTitle.Caption := 'Koehler-Gibson Order Entry'; lblAppTitle.Caption := 'Koehler-Gibson Order Entry';
if Assigned(FChildForm) then if Assigned(FChildForm) then
FChildForm.Free; FChildForm.Free;
FChildForm := TFOrderEntry.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode); FChildForm := TFOrderEntryCorrugated.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode);
end;
procedure TFViewMain.ViewOrderEntryCuttingDie(orderInfo, customerInfo, mode: string);
begin
lblAppTitle.Caption := 'Koehler-Gibson Order Entry';
if Assigned(FChildForm) then
FChildForm.Free;
FChildForm := TFOrderEntryCuttingDie.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode);
end; end;
procedure TFViewMain.ShowUserForm(Info: string); procedure TFViewMain.ShowUserForm(Info: string);
......
object FOrderEntry: TFOrderEntry object FOrderEntryCorrugated: TFOrderEntryCorrugated
Width = 1018 Width = 1018
Height = 764 Height = 764
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
...@@ -990,8 +990,8 @@ object FOrderEntry: TFOrderEntry ...@@ -990,8 +990,8 @@ object FOrderEntry: TFOrderEntry
end end
object XDataWebClient1: TXDataWebClient object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 244 Left = 160
Top = 44 Top = 18
end end
object tmrScrollTop: TWebTimer object tmrScrollTop: TWebTimer
Interval = 100 Interval = 100
...@@ -1001,8 +1001,8 @@ object FOrderEntry: TFOrderEntry ...@@ -1001,8 +1001,8 @@ object FOrderEntry: TFOrderEntry
end end
object XDataWebDataSet1: TXDataWebDataSet object XDataWebDataSet1: TXDataWebDataSet
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 324 Left = 90
Top = 104 Top = 20
object XDataWebDataSet1ORDER_ID: TIntegerField object XDataWebDataSet1ORDER_ID: TIntegerField
FieldName = 'ORDER_ID' FieldName = 'ORDER_ID'
end end
...@@ -1279,8 +1279,8 @@ object FOrderEntry: TFOrderEntry ...@@ -1279,8 +1279,8 @@ object FOrderEntry: TFOrderEntry
end end
object WebDataSource1: TWebDataSource object WebDataSource1: TWebDataSource
DataSet = XDataWebDataSet1 DataSet = XDataWebDataSet1
Left = 216 Left = 22
Top = 104 Top = 10
end end
object wdsShipTo: TWebDataSource object wdsShipTo: TWebDataSource
DataSet = xdwdsShipTo DataSet = xdwdsShipTo
......
...@@ -12,7 +12,7 @@ uses ...@@ -12,7 +12,7 @@ uses
Data.DB, XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.DB; Data.DB, XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.DB;
type type
TFOrderEntry = class(TWebForm) TFOrderEntryCorrugated = class(TWebForm)
pnlMessage: TWebPanel; pnlMessage: TWebPanel;
lblMessage: TWebLabel; lblMessage: TWebLabel;
btnCloseNotification: TWebButton; btnCloseNotification: TWebButton;
...@@ -216,7 +216,7 @@ type ...@@ -216,7 +216,7 @@ type
end; end;
var var
FOrderEntry: TFOrderEntry; FOrderEntryCorrugated: TFOrderEntryCorrugated;
implementation implementation
...@@ -225,7 +225,7 @@ implementation ...@@ -225,7 +225,7 @@ implementation
uses uses
View.Home, View.Main; View.Home, View.Main;
procedure TFOrderEntry.btnConfirmClick(Sender: TObject); procedure TFOrderEntryCorrugated.btnConfirmClick(Sender: TObject);
// Converts all the information on the page into a JSON to then send to the server // Converts all the information on the page into a JSON to then send to the server
var var
colorList: TJSONArray; colorList: TJSONArray;
...@@ -269,8 +269,8 @@ begin ...@@ -269,8 +269,8 @@ begin
XDataWebDataSet1staff_fields_art_due.Value := DateTimeToStr(dtpArtDue.Date); XDataWebDataSet1staff_fields_art_due.Value := DateTimeToStr(dtpArtDue.Date);
XDataWebDataSet1staff_fields_mount_due.Value := DateTimeToStr(dtpMountDue.Date); XDataWebDataSet1staff_fields_mount_due.Value := DateTimeToStr(dtpMountDue.Date);
XDataWebDataSet1staff_fields_plate_due.Value := DateTimeToStr(dtpPlateDue.Date); XDataWebDataSet1staff_fields_plate_due.Value := DateTimeToStr(dtpPlateDue.Date);
XDataWebDataSet1supplied_by_customer_order_date.Value := DateTimeToStr(dtpOrderDate.Date); XDataWebDataSet1staff_fields_order_date.Value := DateTimeToStr(dtpOrderDate.Date);
XDataWebDataSet1proofing_approved_date.Value := DateTimeToStr(dtpOrderDate.Date); XDataWebDataSet1proofing_approved_date.Value := DateTimeToStr(dtpApprovedDate.Date);
// Convert all check boxes to strings because the database stores them as strings // Convert all check boxes to strings because the database stores them as strings
if cbFTP.Checked then if cbFTP.Checked then
...@@ -363,7 +363,7 @@ begin ...@@ -363,7 +363,7 @@ begin
FViewMain.ViewOrders('Success'); FViewMain.ViewOrders('Success');
end; end;
procedure TFOrderEntry.AddCorrugatedOrder(orderJSON: TJSONObject); procedure TFOrderEntryCorrugated.AddCorrugatedOrder(orderJSON: TJSONObject);
// sends the order JSON object to the server // sends the order JSON object to the server
var var
Response: TXDataClientResponse; Response: TXDataClientResponse;
...@@ -372,27 +372,27 @@ begin ...@@ -372,27 +372,27 @@ begin
[orderJSON.ToString])); [orderJSON.ToString]));
end; end;
class function TFOrderEntry.CreateForm(AElementID, orderInfo, customerInfo, mode: string): TWebForm; class function TFOrderEntryCorrugated.CreateForm(AElementID, orderInfo, customerInfo, mode: string): TWebForm;
var var
localMode: string; localMode: string;
begin begin
localMode := mode; localMode := mode;
Application.CreateForm(TFOrderEntry, AElementID, Result, Application.CreateForm(TFOrderEntryCorrugated, AElementID, Result,
procedure(AForm: TObject) procedure(AForm: TObject)
begin begin
with TFOrderEntry(AForm) do with TFOrderEntryCorrugated(AForm) do
begin begin
HideNotification; HideNotification;
TFOrderEntry(AForm).customerID := customerInfo; TFOrderEntryCorrugated(AForm).customerID := customerInfo;
TFOrderEntry(AForm).orderID := orderInfo; TFOrderEntryCorrugated(AForm).orderID := orderInfo;
TFOrderEntry(AForm).mode := localMode; TFOrderEntryCorrugated(AForm).mode := localMode;
end; end;
end end
); );
end; end;
procedure TFOrderEntry.addColorRow(num: string; Color: string; LPI: string; Size: string); procedure TFOrderEntryCorrugated.addColorRow(num: string; Color: string; LPI: string; Size: string);
// Java script code to add a row of colors when a button is clicked // Java script code to add a row of colors when a button is clicked
// all variables are information to be placed in the boxes when loading an order. // all variables are information to be placed in the boxes when loading an order.
// TODO: convert to Delphi // TODO: convert to Delphi
...@@ -445,17 +445,17 @@ begin ...@@ -445,17 +445,17 @@ begin
end; end;
end; end;
procedure TFOrderEntry.WebButton1Click(Sender: TObject); procedure TFOrderEntryCorrugated.WebButton1Click(Sender: TObject);
begin begin
addColorRow('','','',''); addColorRow('','','','');
end; end;
procedure TFOrderEntry.btnCancelClick(Sender: TObject); procedure TFOrderEntryCorrugated.btnCancelClick(Sender: TObject);
begin begin
FViewMain.ViewOrders(''); FViewMain.ViewOrders('');
end; end;
procedure TFOrderEntry.WebFormCreate(Sender: TObject); procedure TFOrderEntryCorrugated.WebFormCreate(Sender: TObject);
begin begin
if not DMConnection.ApiConnection.Connected then if not DMConnection.ApiConnection.Connected then
begin begin
...@@ -464,7 +464,7 @@ begin ...@@ -464,7 +464,7 @@ begin
end; end;
end; end;
procedure TFOrderEntry.getOrder(Order_ID: string); procedure TFOrderEntryCorrugated.getOrder(Order_ID: string);
// retrieves an order from the server then loads the info into the page // retrieves an order from the server then loads the info into the page
var var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
...@@ -550,13 +550,9 @@ begin ...@@ -550,13 +550,9 @@ begin
else else
cbColorCopy.checked := false; cbColorCopy.checked := false;
console.log(XDataWebDataSet1supplied_by_customer_ftp.AsString);
if XDataWebDataSet1supplied_by_customer_ftp.AsString <> '' then if XDataWebDataSet1supplied_by_customer_ftp.AsString <> '' then
begin begin
console.log('hit');
cbFTP.Checked := true; cbFTP.Checked := true;
console.log(cbFTP.Checked);
end end
else else
cbFTP.Checked := false; cbFTP.Checked := false;
...@@ -605,15 +601,12 @@ begin ...@@ -605,15 +601,12 @@ begin
else else
cbStripMount.Checked := false; cbStripMount.Checked := false;
console.log(mode);
console.log(XDataWebDataSet1COMPANY_ID.AsString);
if mode = 'EDIT' then if mode = 'EDIT' then
CustomerID := XDataWebDataSet1COMPANY_ID.AsString; CustomerID := XDataWebDataSet1COMPANY_ID.AsString;
console.log(CustomerID);
end; end;
procedure TFOrderEntry.getCustomer(customerID: string); procedure TFOrderEntryCorrugated.getCustomer(customerID: string);
// gets a customer from the database then loads the appropiate fields // gets a customer from the database then loads the appropiate fields
var var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
...@@ -635,7 +628,7 @@ begin ...@@ -635,7 +628,7 @@ begin
end; end;
procedure TFOrderEntry.WebFormShow(Sender: TObject); procedure TFOrderEntryCorrugated.WebFormShow(Sender: TObject);
begin begin
if mode <> 'ADD' then if mode <> 'ADD' then
getOrder(orderID) getOrder(orderID)
...@@ -644,12 +637,12 @@ begin ...@@ -644,12 +637,12 @@ begin
HideNotification(); HideNotification();
end; end;
procedure TFOrderEntry.HideNotification; procedure TFOrderEntryCorrugated.HideNotification;
begin begin
pnlMessage.ElementHandle.hidden := True; pnlMessage.ElementHandle.hidden := True;
end; end;
procedure TFOrderEntry.ShowNotification(Notification: string); procedure TFOrderEntryCorrugated.ShowNotification(Notification: string);
begin begin
if Notification <> '' then if Notification <> '' then
begin begin
...@@ -659,14 +652,14 @@ begin ...@@ -659,14 +652,14 @@ begin
end; end;
procedure TFOrderEntry.tmrScrollTopTimer(Sender: TObject); procedure TFOrderEntryCorrugated.tmrScrollTopTimer(Sender: TObject);
begin begin
tmrScrollTop.Enabled := False; tmrScrollTop.Enabled := False;
window.scrollTo(0, 0); window.scrollTo(0, 0);
end; end;
initialization initialization
RegisterClass(TFOrderEntry); RegisterClass(TFOrderEntryCorrugated);
end. end.
<div class="col-12 col-md-8">
<div class="row">
<div class=col-sm>
<div id="pnl_message" class="alert alert-danger">
<button id="view.login.message.button" type="button" class="btn-close" aria-label="Close"></button>
<span id="view.login.message.label"></span>
</div>
</div>
</div>
<h4 class="custom-h4 mt-3">Company</h4>
<hr class="custom-hr">
<div class="row">
<div class="col-auto">
<label for="wdbe_first_name" class="form-label mt-2">Company Name:</label>
<input id="edtcompanyname" type="text" class="form-control" style="width: 300px;"/>
</div>
<div class="col-auto">
<label for="wdbe_first_name" class="form-label mt-2">Account Company Name:</label>
<input id="edtaccountcompanyname"type="text" class="form-control" style="width: 150px"/>
</div>
<div class="col-auto">
<label for="wdbe_first_name" class="form-label mt-2">In Quickbooks?:</label>
<input id="edtinquickbooks"type="text" class="form-control" style="width: 150px"/>
</div>
</div>
<h4 class="custom-h4 mt-3">Staff Fields</h4>
<hr class="custom-hr">
<div class="row">
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Order Date:</label>
<input class="form-control input-sm" id="dtporderdate" type="date">
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Proof Date:</label>
<input class="form-control input-sm" id="dtpproofdate" type="date">
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Ship Date:</label>
<input class="form-control input-sm" id="dtpshipdate" type="date">
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Ship Via:</label>
<input id="edtshipvia" type="text" class="form-control"/>
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Quantity:</label>
<input id="edtquantity" class="form-control input-sm" style="width: 100px"/>
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Price:</label>
<input id="edtprice" class="form-control input-sm" style="width: 100px" type="number" min="0"/>
</div>
<div>
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Invoice To:</label>
<input id="edtinvoiceto" class="form-control input-sm"/>
</div>
<div>
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Ship To:</label>
<select id="wcbshipto" class='form-select'></select>
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">PO Number:</label>
<input id="edtponumber" class="form-control input-sm" width='50%'/>
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Job Name:</label>
<input id="edtjobname" class="form-control input-sm" width='50%'/>
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QuickBooks Item:</label>
<input id="edtquickbooksitem" class="form-control input-sm" width='50%'/>
</div>
</div>
<h4 class="custom-h4 mt-3">General</h4>
<hr class="custom-hr">
<div class="row">
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label">Special Instructions</label>
<textarea id="edtspecialinstructions" class="form-control" style=" width: 500px; height: 150px;"></textarea>
</div>
</div>
<div class="row">
<div class="col-auto">
<button id="btnconfirm" class="btn btn-primary btn-sm float-end my-2">Confirm</button>
</div>
<div class="col-auto">
<button id="btncancel" class="btn btn-primary btn-sm float-end my-2">Cancel</button>
</div>
</div>
</div>
...@@ -75,7 +75,7 @@ type ...@@ -75,7 +75,7 @@ type
procedure ClearTable(); procedure ClearTable();
procedure GeneratePagination(TotalPages: Integer); procedure GeneratePagination(TotalPages: Integer);
function GenerateSearchOptions(): string; function GenerateSearchOptions(): string;
procedure orderEntry(orderInfo, customerInfo, mode: string); procedure orderEntry(orderInfo, customerInfo, mode, orderType: string);
procedure HideNotification(); procedure HideNotification();
procedure ShowNotification(Notification: string); procedure ShowNotification(Notification: string);
procedure ShowAddOrderForm(); procedure ShowAddOrderForm();
...@@ -242,7 +242,15 @@ begin ...@@ -242,7 +242,15 @@ begin
procedure(AValue: TModalResult) procedure(AValue: TModalResult)
begin begin
if newform.confirm then if newform.confirm then
orderEntry('', newForm.edtID.Text, 'ADD'); begin
if newform.cbCorrugatedPlate.Checked then
orderType := 'corrugated'
else if newform.cbWebPlate.Checked then
orderType := 'web'
else
orderType := 'cutting';
orderEntry('', newForm.edtID.Text, 'ADD', orderType);
end;
end end
); );
end; end;
...@@ -351,7 +359,8 @@ procedure TFViewOrders.wdbtcOrdersDblClickCell(Sender: TObject; ACol, ...@@ -351,7 +359,8 @@ procedure TFViewOrders.wdbtcOrdersDblClickCell(Sender: TObject; ACol,
ARow: Integer); ARow: Integer);
begin begin
OrderID := wdbtcOrders.Cells[0, ARow]; OrderID := wdbtcOrders.Cells[0, ARow];
orderEntry(OrderID, '', 'EDIT'); orderType := wdbtcOrders.Cells[3, ARow].Split([' '])[0];
orderEntry(OrderID, '', 'EDIT', orderType);
end; end;
procedure TFViewOrders.GeneratePagination(TotalPages: Integer); procedure TFViewOrders.GeneratePagination(TotalPages: Integer);
...@@ -611,9 +620,14 @@ begin ...@@ -611,9 +620,14 @@ begin
end; end;
procedure TFViewOrders.orderEntry(orderInfo, customerInfo, mode: string); procedure TFViewOrders.orderEntry(orderInfo, customerInfo, mode, orderType: string);
begin begin
FViewMain.ViewOrderEntry(orderInfo, customerInfo, mode); if orderType = 'corrugated' then
FViewMain.ViewOrderEntryCorrugated(orderInfo, customerInfo, mode)
else if orderType = 'web' then
orderType := orderType
else
FViewMain.ViewOrderEntryCuttingDie(orderInfo, customerInfo, mode);
end; end;
procedure TFViewOrders.btnCloseNotificationClick(Sender: TObject); procedure TFViewOrders.btnCloseNotificationClick(Sender: TObject);
...@@ -676,7 +690,6 @@ begin ...@@ -676,7 +690,6 @@ begin
end; end;
end; end;
console.log(orderType);
if ( ( orderType <> '' ) AND ( orderType <> 'Any' ) ) then if ( ( orderType <> '' ) AND ( orderType <> 'Any' ) ) then
searchOptions := searchOptions + '&orderType=' + orderType; searchOptions := searchOptions + '&orderType=' + orderType;
......
...@@ -17,10 +17,11 @@ uses ...@@ -17,10 +17,11 @@ uses
View.Users in 'View.Users.pas' {FViewUsers: TWebForm} {*.html}, View.Users in 'View.Users.pas' {FViewUsers: TWebForm} {*.html},
View.EditUser in 'View.EditUser.pas' {FViewEditUser: TWebForm} {*.html}, View.EditUser in 'View.EditUser.pas' {FViewEditUser: TWebForm} {*.html},
View.Orders in 'View.Orders.pas' {FViewOrders: TWebForm} {*.html}, View.Orders in 'View.Orders.pas' {FViewOrders: TWebForm} {*.html},
View.OrderEntryCorrugated in 'View.OrderEntryCorrugated.pas' {FOrderEntry: TWebForm} {*.html}, View.OrderEntryCorrugated in 'View.OrderEntryCorrugated.pas' {FOrderEntryCorrugated: TWebForm} {*.html},
View.AddOrder in 'View.AddOrder.pas' {FAddOrder: TWebForm} {*.html}, View.AddOrder in 'View.AddOrder.pas' {FAddOrder: TWebForm} {*.html},
View.Search in 'View.Search.pas' {FSearch: TWebForm} {*.html}, View.Search in 'View.Search.pas' {FSearch: TWebForm} {*.html},
View.SetStatus in 'View.SetStatus.pas' {FSetStatus: TWebForm} {*.html}; View.SetStatus in 'View.SetStatus.pas' {FSetStatus: TWebForm} {*.html},
View.OrderEntryCuttingDie in 'View.OrderEntryCuttingDie.pas' {FOrderEntryCuttingDie: TWebForm} {*.html};
{$R *.res} {$R *.res}
......
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
<DesignClass>TWebForm</DesignClass> <DesignClass>TWebForm</DesignClass>
</DCCReference> </DCCReference>
<DCCReference Include="View.OrderEntryCorrugated.pas"> <DCCReference Include="View.OrderEntryCorrugated.pas">
<Form>FOrderEntry</Form> <Form>FOrderEntryCorrugated</Form>
<FormType>dfm</FormType> <FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass> <DesignClass>TWebForm</DesignClass>
</DCCReference> </DCCReference>
...@@ -185,6 +185,11 @@ ...@@ -185,6 +185,11 @@
<FormType>dfm</FormType> <FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass> <DesignClass>TWebForm</DesignClass>
</DCCReference> </DCCReference>
<DCCReference Include="View.OrderEntryCuttingDie.pas">
<Form>FOrderEntryCuttingDie</Form>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<None Include="index.html"/> <None Include="index.html"/>
<None Include="css\app.css"/> <None Include="css\app.css"/>
<None Include="config\config.json"/> <None Include="config\config.json"/>
......
[Settings] [Settings]
MemoLogLevel=4 MemoLogLevel=4
FileLogLevel=5 FileLogLevel=5
LogFileNum=91 LogFileNum=95
webClientVersion=1.0.0 webClientVersion=1.0.0
[Database] [Database]
......
Markdown is supported
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