|
@@ -5,7 +5,7 @@ interface
|
|
|
uses
|
|
|
BillsCompileDm, UtilMethods, BillsClipboard, sdIDTree, BatchReplaceBillsFrm,
|
|
|
CheckAndClearFrm, DealBillsFrm, BillsPasteSelectFrm,
|
|
|
- sdDB, BillsTree,
|
|
|
+ sdDB, BillsTree, sdIDTreeCells,
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, ActnList, sdGridDBA, sdGridTreeDBA, dxBar, ZJGrid, StdCtrls,
|
|
|
ExtCtrls;
|
|
@@ -68,7 +68,7 @@ type
|
|
|
procedure actnImportGclBillsToXmjExecute(Sender: TObject);
|
|
|
procedure actnImportPlaneFxBillsToXmjExecute(Sender: TObject);
|
|
|
procedure zgBillsCompileCellTextChanged(Sender: TObject; Col,
|
|
|
- Row: Integer);
|
|
|
+ Row: Integer);
|
|
|
private
|
|
|
FBillsCompileData: TBillsCompileData;
|
|
|
FShowIDField: Boolean;
|
|
@@ -82,6 +82,8 @@ type
|
|
|
|
|
|
procedure SetShowIDField(AValue: Boolean);
|
|
|
|
|
|
+ procedure ExpandMouseDown(AGridCell: TzjCell);
|
|
|
+
|
|
|
procedure BeginExpandNode;
|
|
|
procedure EndExpandNode;
|
|
|
|
|
@@ -214,6 +216,7 @@ begin
|
|
|
stdBillsCompile.IDTree := FBillsCompileData.BillsCompileTree;
|
|
|
with TProjectData(FBillsCompileData.ProjectData) do
|
|
|
stdBillsCompile.Column('LockedInfo').ReadOnly := ProjProperties.PhaseCount > 0;
|
|
|
+ zgBillsCompile.OnExpandMouseDown := ExpandMouseDown;
|
|
|
end;
|
|
|
|
|
|
destructor TBillsCompileFrame.Destroy;
|
|
@@ -229,7 +232,13 @@ begin
|
|
|
dxpmBillsCompile.PopupFromCursorPos
|
|
|
else
|
|
|
begin
|
|
|
-
|
|
|
+ if CheckExprsColumn then
|
|
|
+ laEdtExprs.Text := zgBillsCompile.CurCell.EditText
|
|
|
+ else
|
|
|
+ laEdtExprs.Text := '';
|
|
|
+ with stdBillsCompile.DataView do
|
|
|
+ if Assigned(Current) then
|
|
|
+ laEdtExprs.ReadOnly := Current.ValueByName('LockedInfo').AsBoolean;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
@@ -283,10 +292,7 @@ begin
|
|
|
iCol := zgBillsCompile.CurCol-zgBillsCompile.FixedColCount;
|
|
|
Result := (iCol = stdBillsCompile.VisibleCol('OrgQuantity'))
|
|
|
or (iCol = stdBillsCompile.VisibleCol('MisQuantity'))
|
|
|
- or (iCol = stdBillsCompile.VisibleCol('OthQuantity'))
|
|
|
- or (iCol = stdBillsCompile.VisibleCol('OrgTotalPrice'))
|
|
|
- or (iCol = stdBillsCompile.VisibleCol('MisTotalPrice'))
|
|
|
- or (iCol = stdBillsCompile.VisibleCol('OthTotalPirce'));
|
|
|
+ or (iCol = stdBillsCompile.VisibleCol('OthQuantity'));
|
|
|
end;
|
|
|
|
|
|
procedure TBillsCompileFrame.laEdtExprsKeyDown(Sender: TObject;
|
|
@@ -541,6 +547,7 @@ end;
|
|
|
|
|
|
procedure TBillsCompileFrame.BeginExpandNode;
|
|
|
begin
|
|
|
+ zgBillsCompile.BeginUpdate;
|
|
|
zgBillsCompile.OnCellGetColor := nil;
|
|
|
BeginUpdateWindow(zgBillsCompile.Handle);
|
|
|
stdBillsCompile.DisableControl;
|
|
@@ -551,7 +558,7 @@ begin
|
|
|
stdBillsCompile.EnableControl;
|
|
|
EndUpdateWindow(zgBillsCompile.Handle);
|
|
|
zgBillsCompile.OnCellGetColor := zgBillsCompileCellGetColor;
|
|
|
- zgBillsCompile.Invalidate;
|
|
|
+ zgBillsCompile.EndUpdate;
|
|
|
end;
|
|
|
|
|
|
procedure TBillsCompileFrame.RefreshPhase_Stage;
|
|
@@ -609,6 +616,38 @@ begin
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
+procedure TBillsCompileFrame.ExpandMouseDown(AGridCell: TzjCell);
|
|
|
+
|
|
|
+ procedure CommonExpand(vNode: TsdIDTreeNode);
|
|
|
+ begin
|
|
|
+ AGridCell.Grid.BeginUpdate;
|
|
|
+ vNode.Expanded := not vNode.Expanded;
|
|
|
+ AGridCell.Grid.EndUpdate;
|
|
|
+ AGridCell.Grid.InvalidateView(AGridCell.ViewRect);
|
|
|
+ end;
|
|
|
+
|
|
|
+ procedure QuikExpand(vNode: TsdIDTreeNode);
|
|
|
+ begin
|
|
|
+ Screen.Cursor := crHourGlass;
|
|
|
+ BeginExpandNode;
|
|
|
+ try
|
|
|
+ vNode.Expanded := not vNode.Expanded;
|
|
|
+ finally
|
|
|
+ EndExpandNode;
|
|
|
+ Screen.Cursor := crDefault;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+
|
|
|
+var
|
|
|
+ stnNode: TsdIDTreeNode;
|
|
|
+begin
|
|
|
+ stnNode := TsdIDTreeCell(AGridCell).TreeNode;
|
|
|
+ if stnNode.PosterityCount > 10000 then
|
|
|
+ QuikExpand(stnNode)
|
|
|
+ else
|
|
|
+ CommonExpand(stnNode);
|
|
|
+end;
|
|
|
+
|
|
|
procedure TBillsCompileFrame.zgBillsCompileCellTextChanged(Sender: TObject;
|
|
|
Col, Row: Integer);
|
|
|
begin
|