|
@@ -6,7 +6,9 @@ uses
|
|
|
BillsDm, StandardBillsFme,
|
|
|
SysUtils, Classes, sdDB, BillsTree, sdIDTree, DB;
|
|
|
|
|
|
-type
|
|
|
+type
|
|
|
+ TRefreshGridRowEvent = procedure (ARowIndex: Integer) of object;
|
|
|
+
|
|
|
TBillsCompileData = class(TDataModule)
|
|
|
sdvBillsCompile: TsdDataView;
|
|
|
procedure sdvBillsCompileGetText(var Text: String;
|
|
@@ -28,6 +30,7 @@ type
|
|
|
FBillsCompileTree: TCompileBillsIDTree;
|
|
|
|
|
|
FOnRecChange: TRecChangeEvent;
|
|
|
+ FRefreshRow: TRefreshGridRowEvent;
|
|
|
|
|
|
function GatherChildrenOrg(ANode: TsdIDTreeNode): Double;
|
|
|
procedure UpdateRecordOrg(ABillsID: Integer; ATotalPrice: Double);
|
|
@@ -96,6 +99,7 @@ type
|
|
|
property Active: Boolean read GetActive;
|
|
|
|
|
|
property OnRecChange: TRecChangeEvent read FOnRecChange write SetOnRecChange;
|
|
|
+ property RefreshRow: TRefreshGridRowEvent read FRefreshRow write FRefreshRow;
|
|
|
end;
|
|
|
|
|
|
implementation
|
|
@@ -372,9 +376,9 @@ begin
|
|
|
else if SameText(AValue.FieldName, 'IsGatherZJJL') then
|
|
|
begin
|
|
|
Allow := (TProjectData(FProjectData).ProjProperties.PhaseCount = 0) or TProjectData(FProjectData).CanUnlockInfo;
|
|
|
+ vNode := TBillsIDTreeNode(BillsCompileTree.FindNode(AValue.Owner.ValueByName('ID').AsInteger));
|
|
|
if Allow then
|
|
|
- begin
|
|
|
- vNode := TBillsIDTreeNode(BillsCompileTree.FindNode(AValue.Owner.ValueByName('ID').AsInteger));
|
|
|
+ begin
|
|
|
if CheckParentExist(vNode) then
|
|
|
begin
|
|
|
if QuestMessage('父项已勾选,继续将取消父项勾选。') then
|
|
@@ -392,6 +396,8 @@ begin
|
|
|
end
|
|
|
else
|
|
|
WarningMessage('开始计量后,计量汇总列不可编辑,如需修改,请先解锁。');
|
|
|
+ if not Allow and Assigned(FRefreshRow) then
|
|
|
+ RefreshRow(vNode.MajorIndex);
|
|
|
end;
|
|
|
end;
|
|
|
|