ConstTypeUnit.pas 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. unit ConstTypeUnit;
  2. interface
  3. uses
  4. Classes;
  5. type
  6. { ptBudgetEstimate: 概算,ptEstimate1: 建议估算 ptEstimate2: 可行性估算 ptBillsBudget: 清单预算 ptFinal: 决算} // 2012.3.1 HXY新加 ptBillsBudget, ptFinal两个字段
  7. TScProjType = (ptBills, ptBudget, ptBudgetEstimate, ptEstimate2, ptEstimate1, ptBillsBudget, ptFinal);
  8. TOpenType = (otNew, otOpen);
  9. TBidLotOperation = (boAdd, boDelete, boReName);
  10. TFormType = (ftImportStdLib, ftImportSmb);
  11. {Internal Save DataStruct}
  12. TBillsOrderItem = class
  13. private
  14. FID: Integer;
  15. FMajorIndex: Integer;
  16. FCharpterID: Integer;
  17. FHasChildren: Boolean;
  18. public
  19. property ID: Integer read FID write FID;
  20. property MajorIndex: Integer read FMajorIndex write FMajorIndex;
  21. property CharpterID: Integer read FCharpterID write FCharpterID;
  22. property HasChildren: Boolean read FHasChildren write FHasChildren;
  23. end;
  24. // Modified By MaiXinRong 2012-03-19 第二部分中800章的数量与单价
  25. TFloatItem = class
  26. public
  27. Quantity2: Double;
  28. UnitPrice2: Double;
  29. end;
  30. {Copy Bills -------Paste Bills}
  31. TBillIDRecord = class
  32. private
  33. FOldID: Integer;
  34. FNewID: Integer;
  35. FParentID: Integer;
  36. FNextSiblingID: Integer;
  37. FParentChanged: Boolean;
  38. FNextSiblingChanged: Boolean;
  39. FCode: string;
  40. FName: string;
  41. FUnits: string;
  42. FMemoStr: string;
  43. FQuantity: Double;
  44. FQuantity2: Double;
  45. FUnitPrice: Currency;
  46. FTotalPrice: Currency;
  47. FUnitPrice2: Currency;
  48. FTotalPrice2: Currency;
  49. FB_Code: string;
  50. FDesignQuantity: Currency;
  51. FDesignQuantity2: Currency;
  52. FDesignPrice: Currency;
  53. FList: TList;
  54. public
  55. constructor Create;
  56. destructor Destroy; override;
  57. property OldID: Integer read FOldID write FOldID;
  58. property NewID: Integer read FNewID write FNewID;
  59. property ParentID: Integer read FParentID write FParentID;
  60. property NextSiblingID: Integer read FNextSiblingID write FNextSiblingID;
  61. property ParentChanged: Boolean read FParentChanged write FParentChanged;
  62. property NextSiblingChanged: Boolean read FNextSiblingChanged write FNextSiblingChanged;
  63. property Code: string read FCode write FCode;
  64. property B_Code: string read FB_Code write FB_Code;
  65. property Name: string read FName write FName;
  66. property Units: string read FUnits write FUnits;
  67. property MemoStr: string read FMemoStr write FMemoStr;
  68. property Quantity: Double read FQuantity write FQuantity;
  69. property Quantity2: Double read FQuantity2 write FQuantity2;
  70. property UnitPrice: Currency read FUnitPrice write FUnitPrice;
  71. property TotalPrice: Currency read FTotalPrice write FTotalPrice;
  72. property UnitPrice2: Currency read FUnitPrice2 write FUnitPrice2;
  73. property TotalPrice2: Currency read FTotalPrice2 write FTotalPrice2;
  74. property DesignQuantity: Currency read FDesignQuantity write FDesignQuantity;
  75. property DesignQuantity2: Currency read FDesignQuantity2 write FDesignQuantity2;
  76. property DesignPrice: Currency read FDesignPrice write FDesignPrice;
  77. property List: TList read FList;
  78. end;
  79. TDQRecord = class
  80. private
  81. FName: string;
  82. FUnits: string;
  83. FDQuantity: Double;
  84. FDQuantity2: Double;
  85. FMemostr: string;
  86. public
  87. property Name: string read FName write FName;
  88. property Units: string read FUnits write FUnits;
  89. property DQuantity: Double read FDQuantity write FDQuantity;
  90. property DQuantity2: Double read FDQuantity2 write FDQuantity2;
  91. property MemoStr: string read FMemostr write FMemostr;
  92. end;
  93. {Bills Position}
  94. PIDRecord = ^TIDRecord;
  95. TIDRecord = record
  96. PreID: Integer; // 前兄弟ID
  97. NextID: Integer; // 后兄弟ID
  98. end;
  99. { Third Part Bills }
  100. PBillsConfigRecord = ^TBillsConfigRecord;
  101. TBillsConfigRecord = record
  102. ID: Integer;
  103. ParentID: Integer;
  104. NextID: Integer;
  105. Code: string;
  106. BCode: string;
  107. Name: string;
  108. Units: string;
  109. Exprs: string;
  110. IsPreDefine: Boolean;
  111. ParentModified: Boolean;
  112. NextModified: Boolean;
  113. end;
  114. {All kinds of Events}
  115. TInternalEvent = procedure of object;
  116. TControlUIEvent = procedure (AEnabled: Boolean; AETree: Boolean = True) of object;
  117. TOpenProjectProc = procedure (const aName, aShortName: string; aProjType, aID: Integer) of object;
  118. implementation
  119. uses
  120. ConstMethodUnit;
  121. { TBillIDRecord }
  122. constructor TBillIDRecord.Create;
  123. begin
  124. FList := TList.Create;
  125. end;
  126. destructor TBillIDRecord.Destroy;
  127. begin
  128. ClearObjectList(FList);
  129. FList.Free;
  130. inherited;
  131. end;
  132. end.