Commit 03dea1fa by cam

finished making changes pervious discissed

removed clutter from search string, put search string into text box, added order date into status type, and moved location of check box on search form
parent 0bac9286
...@@ -24,18 +24,6 @@ object FViewOrders: TFViewOrders ...@@ -24,18 +24,6 @@ object FViewOrders: TFViewOrders
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object lblSearch: TWebLabel
Left = 594
Top = 116
Width = 47
Height = 13
Caption = 'Search = '
ElementID = 'lblsearch'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnAddOrder: TWebButton object btnAddOrder: TWebButton
Left = 59 Left = 59
Top = 79 Top = 79
...@@ -340,6 +328,20 @@ object FViewOrders: TFViewOrders ...@@ -340,6 +328,20 @@ object FViewOrders: TFViewOrders
DisplayText = 'Ship Done' DisplayText = 'Ship Done'
end> end>
end end
object edtSearch: TWebEdit
Left = 428
Top = 110
Width = 121
Height = 22
ChildOrder = 10
ElementClassName = 'form-control'
ElementID = 'edtsearch'
ElementFont = efCSS
Enabled = False
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object XDataWebClient1: TXDataWebClient object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 28 Left = 28
......
...@@ -36,11 +36,13 @@ ...@@ -36,11 +36,13 @@
<!-- Entries Label Section d-flex justify-content-between w-100 mt-2--> <!-- Entries Label Section d-flex justify-content-between w-100 mt-2-->
<div class="row"> <div class="row">
<div class="col text-start"> <div class="col-auto">
<label id="lblentries"></label> <label id="lblentries"></label>
</div> </div>
<div class="col text-end"> </div>
<label id="lblsearch"></label> <div class="row">
<div class="col-12">
<input id="edtsearch" type="text" class="form-control" style="width: 100%;"/>
</div> </div>
</div> </div>
......
...@@ -58,7 +58,7 @@ type ...@@ -58,7 +58,7 @@ type
wdbtcOrders: TWebDBTableControl; wdbtcOrders: TWebDBTableControl;
wcbPageSize: TWebComboBox; wcbPageSize: TWebComboBox;
wlcbOrderBy: TWebLookupComboBox; wlcbOrderBy: TWebLookupComboBox;
lblSearch: TWebLabel; edtSearch: TWebEdit;
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
procedure btnAddOrderClick(Sender: TObject); procedure btnAddOrderClick(Sender: TObject);
procedure btnSearchClick(Sender: TObject); procedure btnSearchClick(Sender: TObject);
...@@ -291,7 +291,7 @@ begin ...@@ -291,7 +291,7 @@ begin
orderType := newform.wcbOrderType.Text; orderType := newform.wcbOrderType.Text;
searchOptions := generateSearchOptions(); searchOptions := generateSearchOptions();
lblSearch.Caption := searchOptions; edtSearch.Text := searchOptions;
getOrders(searchOptions); getOrders(searchOptions);
end; end;
end end
...@@ -646,13 +646,13 @@ searchOptions: string; ...@@ -646,13 +646,13 @@ searchOptions: string;
begin begin
searchOptions := '&pagenumber=' + IntToStr(PageNumber) + searchOptions := '&pagenumber=' + IntToStr(PageNumber) +
'&pagesize=' + IntToStr(PageSize) + '&pagesize=' + IntToStr(PageSize) +
'&orderby=' + OrderBy + '&orderby=' + OrderBy;
//Status 1 //Status 1
'&filterType1=' + filterType1;
if ( (filterType1 <> '') and (filterType1 <> 'NONE') ) then if ( (filterType1 <> '') and (filterType1 <> 'NONE') ) then
begin begin
searchOptions := searchOptions + searchOptions := searchOptions +
'&filterType1=' + filterType1 +
'&null1=' + BoolToStr(null1); '&null1=' + BoolToStr(null1);
if (not (null1)) then if (not (null1)) then
begin begin
...@@ -664,11 +664,11 @@ begin ...@@ -664,11 +664,11 @@ begin
// Status2 // Status2
searchOptions := searchOptions +
'&filterType2=' + filterType2;
if ( (filterType2 <> '') and (filterType2 <> 'NONE') ) then if ( (filterType2 <> '') and (filterType2 <> 'NONE') ) then
begin begin
searchOptions := searchOptions + '&null2=' + BoolToStr(null2); searchOptions := searchOptions +
'&filterType2=' + filterType2 +
'&null2=' + BoolToStr(null2);
if (not (null2)) then if (not (null2)) then
begin begin
searchOptions := searchOptions + searchOptions := searchOptions +
...@@ -677,7 +677,8 @@ begin ...@@ -677,7 +677,8 @@ begin
end; end;
end; end;
if ( ( orderType <> '' ) AND ( orderType <> 'ANY' ) ) then console.log(orderType);
if ( ( orderType <> '' ) AND ( orderType <> 'Any' ) ) then
searchOptions := searchOptions + '&orderType=' + orderType; searchOptions := searchOptions + '&orderType=' + orderType;
if jobName <> '' then if jobName <> '' then
......
...@@ -40,7 +40,7 @@ object FSearch: TFSearch ...@@ -40,7 +40,7 @@ object FSearch: TFSearch
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object lblStartDate1: TWebLabel object lblStartDate1: TWebLabel
Left = 200 Left = 404
Top = 442 Top = 442
Width = 56 Width = 56
Height = 14 Height = 14
...@@ -55,7 +55,7 @@ object FSearch: TFSearch ...@@ -55,7 +55,7 @@ object FSearch: TFSearch
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object lblEndDate1: TWebLabel object lblEndDate1: TWebLabel
Left = 384 Left = 588
Top = 442 Top = 442
Width = 47 Width = 47
Height = 14 Height = 14
...@@ -100,8 +100,8 @@ object FSearch: TFSearch ...@@ -100,8 +100,8 @@ object FSearch: TFSearch
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object lblStartDate2: TWebLabel object lblStartDate2: TWebLabel
Left = 200 Left = 404
Top = 516 Top = 520
Width = 56 Width = 56
Height = 14 Height = 14
Caption = 'Start Date:' Caption = 'Start Date:'
...@@ -115,8 +115,8 @@ object FSearch: TFSearch ...@@ -115,8 +115,8 @@ object FSearch: TFSearch
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object lblEndDate2: TWebLabel object lblEndDate2: TWebLabel
Left = 384 Left = 588
Top = 516 Top = 520
Width = 47 Width = 47
Height = 14 Height = 14
Caption = 'End Date' Caption = 'End Date'
...@@ -277,6 +277,7 @@ object FSearch: TFSearch ...@@ -277,6 +277,7 @@ object FSearch: TFSearch
ItemIndex = -1 ItemIndex = -1
Items.Strings = ( Items.Strings = (
'NONE' 'NONE'
'ORDER DATE'
'PROOF DUE' 'PROOF DUE'
'PROOF DONE' 'PROOF DONE'
'ART DUE' 'ART DUE'
...@@ -326,7 +327,7 @@ object FSearch: TFSearch ...@@ -326,7 +327,7 @@ object FSearch: TFSearch
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object dtpStartDate1: TWebDateTimePicker object dtpStartDate1: TWebDateTimePicker
Left = 200 Left = 404
Top = 462 Top = 462
Width = 127 Width = 127
Height = 22 Height = 22
...@@ -348,7 +349,7 @@ object FSearch: TFSearch ...@@ -348,7 +349,7 @@ object FSearch: TFSearch
Text = '' Text = ''
end end
object dtpEndDate1: TWebDateTimePicker object dtpEndDate1: TWebDateTimePicker
Left = 384 Left = 588
Top = 462 Top = 462
Width = 135 Width = 135
Height = 22 Height = 22
...@@ -370,7 +371,7 @@ object FSearch: TFSearch ...@@ -370,7 +371,7 @@ object FSearch: TFSearch
Text = '' Text = ''
end end
object cbNull1: TWebCheckBox object cbNull1: TWebCheckBox
Left = 566 Left = 188
Top = 462 Top = 462
Width = 185 Width = 185
Height = 22 Height = 22
...@@ -409,6 +410,7 @@ object FSearch: TFSearch ...@@ -409,6 +410,7 @@ object FSearch: TFSearch
ItemIndex = -1 ItemIndex = -1
Items.Strings = ( Items.Strings = (
'NONE' 'NONE'
'ORDER DATE'
'PROOF DUE' 'PROOF DUE'
'PROOF DONE' 'PROOF DONE'
'ART DUE' 'ART DUE'
...@@ -421,8 +423,8 @@ object FSearch: TFSearch ...@@ -421,8 +423,8 @@ object FSearch: TFSearch
'SHIP DONE') 'SHIP DONE')
end end
object dtpStartDate2: TWebDateTimePicker object dtpStartDate2: TWebDateTimePicker
Left = 200 Left = 404
Top = 536 Top = 540
Width = 127 Width = 127
Height = 22 Height = 22
HeightStyle = ssAuto HeightStyle = ssAuto
...@@ -437,8 +439,8 @@ object FSearch: TFSearch ...@@ -437,8 +439,8 @@ object FSearch: TFSearch
Text = '' Text = ''
end end
object dtpEndDate2: TWebDateTimePicker object dtpEndDate2: TWebDateTimePicker
Left = 384 Left = 588
Top = 536 Top = 540
Width = 135 Width = 135
Height = 22 Height = 22
HeightStyle = ssAuto HeightStyle = ssAuto
...@@ -453,7 +455,7 @@ object FSearch: TFSearch ...@@ -453,7 +455,7 @@ object FSearch: TFSearch
Text = '' Text = ''
end end
object cbNull2: TWebCheckBox object cbNull2: TWebCheckBox
Left = 566 Left = 188
Top = 536 Top = 536
Width = 185 Width = 185
Height = 22 Height = 22
......
...@@ -217,7 +217,7 @@ begin ...@@ -217,7 +217,7 @@ begin
if startDate <> '' then if startDate <> '' then
begin begin
result := result + ' AND ' + quotedStr(endDate) + ' <= STATUS_DATE'; result := result + ' AND ' + quotedStr(startDate) + ' <= STATUS_DATE';
end; end;
if ( ( endDate <> '1899/12/30' ) AND ( endDate <> '' ) ) then if ( ( endDate <> '1899/12/30' ) AND ( endDate <> '' ) ) then
...@@ -268,18 +268,32 @@ end; ...@@ -268,18 +268,32 @@ end;
function TLookupService.generateStatusWhereSQL(status: TStatusSearchInfo): string; function TLookupService.generateStatusWhereSQL(status: TStatusSearchInfo): string;
begin begin
result := ' AND '; if status.filterType <> 'ORDER_DATE' then
if status.null then begin
begin if status.null then
result := result + 'not exists (select 1 from ' + status.statusTableLong + begin
' ' + status.statusTableShort + ' where ' result := result + ' AND not exists (select 1 from ' + status.statusTableLong +
+ status.statusTableShort +'.ORDER_ID = o.ORDER_ID ' + ' ' + status.statusTableShort + ' where '
'AND ' + status.statusTableShort + '.ORDER_STATUS = ' + + status.statusTableShort +'.ORDER_ID = o.ORDER_ID ' +
quotedStr(status.statusType) + ') AND ' + 'AND ' + status.statusTableShort + '.ORDER_STATUS = ' +
generateStatusSelectSQL(status.altStatusTableShort, status.altStatusTableLong, status.startDate, status.endDate, status.statusType); quotedStr(status.statusType) + ') AND ' +
generateStatusSelectSQL(status.altStatusTableShort, status.altStatusTableLong, status.startDate, status.endDate, status.statusType);
end
else
result := result + ' AND ' + generateStatusSelectSQL(status.statusTableShort, status.statusTableLong, status.startDate, status.endDate, status.statusType);
end end
else else
result := result + generateStatusSelectSQL(status.statusTableShort, status.statusTableLong, status.startDate, status.endDate, status.statusType); begin
if status.startDate <> '' then
begin
result := result + ' AND ' + quotedStr(status.startDate) + ' <= o.ORDER_DATE';
end;
if ( ( status.endDate <> '1899/12/30' ) AND ( status.endDate <> '' ) ) then
begin
result := result + ' AND ' + quotedStr(status.endDate) + ' >= o.ORDER_DATE';
end;
end;
end; end;
function TLookupService.generateOrdersSQL(searchOptions: string): TSQLQuery; function TLookupService.generateOrdersSQL(searchOptions: string): TSQLQuery;
......
[Settings] [Settings]
MemoLogLevel=4 MemoLogLevel=4
FileLogLevel=5 FileLogLevel=5
LogFileNum=63 LogFileNum=71
webClientVersion=1.0.0 webClientVersion=1.0.0
[Database] [Database]
--Server=192.168.159.132 Server=192.168.159.132
Server=192.168.102.130 --Server=192.168.102.130
--Server=192.168.75.133 --Server=192.168.75.133
--Database= --Database=
--Username= --Username=
......
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