|
@@ -3,7 +3,7 @@ unit BillsTree;
|
|
interface
|
|
interface
|
|
|
|
|
|
uses
|
|
uses
|
|
- sdIDTree, sdDB, mDataRecord;
|
|
|
|
|
|
+ sdIDTree, sdDB, mDataRecord, ZhAPI;
|
|
|
|
|
|
type
|
|
type
|
|
TBillsIDTreeNode = class(TsdIDTreeNode)
|
|
TBillsIDTreeNode = class(TsdIDTreeNode)
|
|
@@ -40,6 +40,9 @@ type
|
|
function CountPriceEnable: Boolean;
|
|
function CountPriceEnable: Boolean;
|
|
function TotalPriceEnable: Boolean;
|
|
function TotalPriceEnable: Boolean;
|
|
|
|
|
|
|
|
+ procedure RecodeChildrenCode(const AParentCode: string);
|
|
|
|
+ procedure RecodeChildrenB_Code(const AParentCode: string);
|
|
|
|
+
|
|
property Rec: TBillsRecord read GetRec;
|
|
property Rec: TBillsRecord read GetRec;
|
|
|
|
|
|
property ChapterParent: TBillsIDTreeNode read GetChapterParent;
|
|
property ChapterParent: TBillsIDTreeNode read GetChapterParent;
|
|
@@ -357,6 +360,42 @@ begin
|
|
or (Rec.AddPcTotalPrice.AsFloat <> 0);
|
|
or (Rec.AddPcTotalPrice.AsFloat <> 0);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TBillsIDTreeNode.RecodeChildrenB_Code(const AParentCode: string);
|
|
|
|
+var
|
|
|
|
+ iChild: Integer;
|
|
|
|
+ vChild: TBillsIDTreeNode;
|
|
|
|
+begin
|
|
|
|
+ if (AParentCode = '') then Exit;
|
|
|
|
+
|
|
|
|
+ for iChild := 0 to Self.ChildCount - 1 do
|
|
|
|
+ begin
|
|
|
|
+ vChild := TBillsIDTreeNode(Self.ChildNodes[iChild]);
|
|
|
|
+ if vChild.Rec.B_Code.AsString <> '' then
|
|
|
|
+ begin
|
|
|
|
+ vChild.Rec.SetStrValue(vChild.Rec.B_Code, AParentCode + '-' + GetLastSetmentOfCode(AParentCode));
|
|
|
|
+ vChild.Rec.SetBoolValue(vChild.Rec.LockedInfo, False);
|
|
|
|
+ end;
|
|
|
|
+ end;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TBillsIDTreeNode.RecodeChildrenCode(const AParentCode: string);
|
|
|
|
+var
|
|
|
|
+ iChild: Integer;
|
|
|
|
+ vChild: TBillsIDTreeNode;
|
|
|
|
+begin
|
|
|
|
+ if (AParentCode = '') then Exit;
|
|
|
|
+
|
|
|
|
+ for iChild := 0 to Self.ChildCount - 1 do
|
|
|
|
+ begin
|
|
|
|
+ vChild := TBillsIDTreeNode(Self.ChildNodes[iChild]);
|
|
|
|
+ if vChild.Rec.Code.AsString <> '' then
|
|
|
|
+ begin
|
|
|
|
+ vChild.Rec.SetStrValue(vChild.Rec.Code, AParentCode + '-' + GetLastSetmentOfCode(AParentCode));
|
|
|
|
+ vChild.Rec.SetBoolValue(vChild.Rec.LockedInfo, False);
|
|
|
|
+ end;
|
|
|
|
+ end;
|
|
|
|
+end;
|
|
|
|
+
|
|
function TBillsIDTreeNode.TotalPriceEnable: Boolean;
|
|
function TBillsIDTreeNode.TotalPriceEnable: Boolean;
|
|
begin
|
|
begin
|
|
Result := not HasCountPrice;
|
|
Result := not HasCountPrice;
|