Browse Source

其他台账 -- 全额计量台账

MaiXinRong 8 years ago
parent
commit
c7b8b4eecd
6 changed files with 165 additions and 40 deletions
  1. 56 28
      Frames/ProjectFme.dfm
  2. 18 6
      Frames/ProjectFme.pas
  3. 1 1
      Units/Connections.pas
  4. 42 4
      Units/DataBaseTables.pas
  5. 46 1
      Units/ProjectData.pas
  6. 2 0
      Units/UpdateDataBase.pas

+ 56 - 28
Frames/ProjectFme.dfm

@@ -2,7 +2,7 @@ object ProjectFrame: TProjectFrame
   Left = 0
   Left = 0
   Top = 0
   Top = 0
   Width = 1169
   Width = 1169
-  Height = 438
+  Height = 528
   Font.Charset = ANSI_CHARSET
   Font.Charset = ANSI_CHARSET
   Font.Color = clWindowText
   Font.Color = clWindowText
   Font.Height = -12
   Font.Height = -12
@@ -14,14 +14,14 @@ object ProjectFrame: TProjectFrame
     Left = 0
     Left = 0
     Top = 0
     Top = 0
     Width = 65
     Width = 65
-    Height = 438
+    Height = 528
     Align = alLeft
     Align = alLeft
     TabOrder = 0
     TabOrder = 0
     object dxsbViewControl: TdxSideBar
     object dxsbViewControl: TdxSideBar
       Left = 1
       Left = 1
       Top = 1
       Top = 1
       Width = 63
       Width = 63
-      Height = 436
+      Height = 526
       Align = alClient
       Align = alClient
       BkGround.BeginColor = clInactiveCaption
       BkGround.BeginColor = clInactiveCaption
       BkGround.EndColor = clGradientInactiveCaption
       BkGround.EndColor = clGradientInactiveCaption
@@ -86,14 +86,23 @@ object ProjectFrame: TProjectFrame
               Tag = 4
               Tag = 4
             end
             end
             item
             item
+              Caption = #20854#20182#21488#36134
+              Index = 5
+              IsDefault = False
+              LargeImage = 7
+              SmallImage = 7
+              StoredItem = dxsbsViewControlItem8
+              Tag = 5
+            end
+            item
               Caption = #25253#34920
               Caption = #25253#34920
               Hint = #25253#34920
               Hint = #25253#34920
-              Index = 5
+              Index = 6
               IsDefault = False
               IsDefault = False
               LargeImage = 6
               LargeImage = 6
               SmallImage = 6
               SmallImage = 6
               StoredItem = xbiReport
               StoredItem = xbiReport
-              Tag = 5
+              Tag = 6
             end>
             end>
         end>
         end>
       ActiveGroupIndex = 0
       ActiveGroupIndex = 0
@@ -116,13 +125,13 @@ object ProjectFrame: TProjectFrame
     Left = 65
     Left = 65
     Top = 0
     Top = 0
     Width = 1104
     Width = 1104
-    Height = 438
+    Height = 528
     Align = alClient
     Align = alClient
     TabOrder = 1
     TabOrder = 1
     object sprAssistant: TSplitter
     object sprAssistant: TSplitter
       Left = 904
       Left = 904
       Top = 22
       Top = 22
-      Height = 415
+      Height = 505
       Align = alRight
       Align = alRight
       Color = clBtnFace
       Color = clBtnFace
       ParentColor = False
       ParentColor = False
@@ -2725,7 +2734,7 @@ object ProjectFrame: TProjectFrame
       Left = 907
       Left = 907
       Top = 22
       Top = 22
       Width = 196
       Width = 196
-      Height = 415
+      Height = 505
       ActivePage = jpsAssistantBGL
       ActivePage = jpsAssistantBGL
       ActivePageIndex = 4
       ActivePageIndex = 4
       Align = alRight
       Align = alRight
@@ -2735,7 +2744,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 196
         Width = 196
-        Height = 415
+        Height = 505
         TabName = 'StandardBills'
         TabName = 'StandardBills'
         Caption = 'StandardBills'
         Caption = 'StandardBills'
       end
       end
@@ -2743,7 +2752,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 196
         Width = 196
-        Height = 415
+        Height = 505
         TabName = 'DealPayment'
         TabName = 'DealPayment'
         Caption = 'BlockLib'
         Caption = 'BlockLib'
       end
       end
@@ -2751,7 +2760,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 196
         Width = 196
-        Height = 415
+        Height = 505
         TabName = 'Search'
         TabName = 'Search'
         Caption = 'Seach'
         Caption = 'Seach'
       end
       end
@@ -2759,7 +2768,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 196
         Width = 196
-        Height = 415
+        Height = 505
         TabName = 'ZJJL'
         TabName = 'ZJJL'
         Caption = 'ZJJL'
         Caption = 'ZJJL'
       end
       end
@@ -2767,7 +2776,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 196
         Width = 196
-        Height = 415
+        Height = 505
         TabName = 'BGL'
         TabName = 'BGL'
         Caption = 'BGL'
         Caption = 'BGL'
       end
       end
@@ -2775,7 +2784,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 196
         Width = 196
-        Height = 415
+        Height = 505
         TabName = 'Checker'
         TabName = 'Checker'
         Caption = 'Checker'
         Caption = 'Checker'
       end
       end
@@ -2783,7 +2792,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 196
         Width = 196
-        Height = 415
+        Height = 505
         TabName = 'Bookmark'
         TabName = 'Bookmark'
         Caption = 'Bookmark'
         Caption = 'Bookmark'
       end
       end
@@ -2791,7 +2800,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 196
         Width = 196
-        Height = 415
+        Height = 505
         TabName = 'UpFile'
         TabName = 'UpFile'
         Caption = 'UpFile'
         Caption = 'UpFile'
       end
       end
@@ -2799,7 +2808,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 196
         Width = 196
-        Height = 415
+        Height = 505
         TabName = 'DealBills'
         TabName = 'DealBills'
         Caption = 'DealBills'
         Caption = 'DealBills'
       end
       end
@@ -2808,7 +2817,7 @@ object ProjectFrame: TProjectFrame
       Left = 1
       Left = 1
       Top = 22
       Top = 22
       Width = 903
       Width = 903
-      Height = 415
+      Height = 505
       ActivePage = jpsMainBillsCompile
       ActivePage = jpsMainBillsCompile
       ActivePageIndex = 0
       ActivePageIndex = 0
       Align = alClient
       Align = alClient
@@ -2818,7 +2827,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 903
         Width = 903
-        Height = 415
+        Height = 505
         TabName = 'BillsCompile'
         TabName = 'BillsCompile'
         Caption = 'BillsCompile'
         Caption = 'BillsCompile'
       end
       end
@@ -2827,7 +2836,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 903
         Width = 903
-        Height = 415
+        Height = 505
         TabName = 'BillsMeasure'
         TabName = 'BillsMeasure'
         Caption = 'Bills'
         Caption = 'Bills'
       end
       end
@@ -2836,7 +2845,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 903
         Width = 903
-        Height = 415
+        Height = 505
         TabName = 'BillsGather'
         TabName = 'BillsGather'
         Caption = 'PhaseCompare'
         Caption = 'PhaseCompare'
       end
       end
@@ -2845,7 +2854,7 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 903
         Width = 903
-        Height = 415
+        Height = 505
         TabName = 'PriceMargin'
         TabName = 'PriceMargin'
         Caption = 'PriceMargin'
         Caption = 'PriceMargin'
       end
       end
@@ -2854,10 +2863,19 @@ object ProjectFrame: TProjectFrame
         Left = 0
         Left = 0
         Top = 0
         Top = 0
         Width = 903
         Width = 903
-        Height = 415
+        Height = 505
         TabName = 'StageCompare'
         TabName = 'StageCompare'
         Caption = 'StageCompare'
         Caption = 'StageCompare'
       end
       end
+      object jpsMainOtherMeasure: TJimPage
+        Tag = -1
+        Left = 0
+        Top = 0
+        Width = 903
+        Height = 505
+        TabName = 'OtherMeasure'
+        Caption = 'OtherMeasure'
+      end
     end
     end
   end
   end
   object xpm: TXPMenu
   object xpm: TXPMenu
@@ -3127,9 +3145,10 @@ object ProjectFrame: TProjectFrame
       #21488#36134#20998#35299
       #21488#36134#20998#35299
       #35745#37327#21488#36134
       #35745#37327#21488#36134
       #28165#21333#27719#24635
       #28165#21333#27719#24635
-      #23457#26680#27604#36739
       #26448#26009#35843#24046
       #26448#26009#35843#24046
+      #23457#26680#27604#36739
       #24418#35937#36827#24230
       #24418#35937#36827#24230
+      #20854#20182#21488#36134
       #25253#34920)
       #25253#34920)
     DefaultLargeImage = -1
     DefaultLargeImage = -1
     DefaultSmallImage = -1
     DefaultSmallImage = -1
@@ -3157,7 +3176,7 @@ object ProjectFrame: TProjectFrame
     object xbiStageCompare: TdxStoredSideItem
     object xbiStageCompare: TdxStoredSideItem
       Tag = 4
       Tag = 4
       Caption = #23457#26680#27604#36739
       Caption = #23457#26680#27604#36739
-      Category = 3
+      Category = 4
       Enabled = True
       Enabled = True
       Hint = #23457#26680#27604#36739
       Hint = #23457#26680#27604#36739
       LargeImage = 3
       LargeImage = 3
@@ -3173,9 +3192,9 @@ object ProjectFrame: TProjectFrame
       SmallImage = 5
       SmallImage = 5
     end
     end
     object xbiReport: TdxStoredSideItem
     object xbiReport: TdxStoredSideItem
-      Tag = 5
+      Tag = 6
       Caption = #25253#34920
       Caption = #25253#34920
-      Category = 6
+      Category = 7
       Enabled = True
       Enabled = True
       Hint = #25253#34920
       Hint = #25253#34920
       LargeImage = 6
       LargeImage = 6
@@ -3192,11 +3211,20 @@ object ProjectFrame: TProjectFrame
     object xbiPriceMargin: TdxStoredSideItem
     object xbiPriceMargin: TdxStoredSideItem
       Tag = 3
       Tag = 3
       Caption = #26448#26009#35843#24046
       Caption = #26448#26009#35843#24046
-      Category = 4
+      Category = 3
       Enabled = True
       Enabled = True
       LargeImage = 4
       LargeImage = 4
       SmallImage = 4
       SmallImage = 4
     end
     end
+    object dxsbsViewControlItem8: TdxStoredSideItem
+      Tag = 5
+      Caption = #20854#20182#21488#36134
+      Category = 6
+      Enabled = True
+      Hint = #20854#20182#21488#36134
+      LargeImage = 7
+      SmallImage = 7
+    end
   end
   end
   object ilstLarge: TImageList
   object ilstLarge: TImageList
     Height = 32
     Height = 32

+ 18 - 6
Frames/ProjectFme.pas

@@ -6,7 +6,7 @@ uses
   BillsCompileFme, BillsMeasureFme, PhaseCompareFme, DealPaymentFme,
   BillsCompileFme, BillsMeasureFme, PhaseCompareFme, DealPaymentFme,
   BillsGatherFme, ZJJLFme, BGLFme, ReportsFrm, SearchFme, BookmarkFme,
   BillsGatherFme, ZJJLFme, BGLFme, ReportsFrm, SearchFme, BookmarkFme,
   ProjectData, UtilMethods, Globals, mEncryptEditions, DealBillsFme,
   ProjectData, UtilMethods, Globals, mEncryptEditions, DealBillsFme,
-  PriceMarginFme,
+  PriceMarginFme, OtherMeasureFme,
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
   Dialogs, ImgList, XPMenu, Buttons, ComCtrls, ToolWin, ExtCtrls, JimPages,
   Dialogs, ImgList, XPMenu, Buttons, ComCtrls, ToolWin, ExtCtrls, JimPages,
   StdCtrls, JimCombos, dxsbar, ActnList, dxBar, OrderCheckerFme, CheckerFme,
   StdCtrls, JimCombos, dxsbar, ActnList, dxBar, OrderCheckerFme, CheckerFme,
@@ -81,6 +81,8 @@ type
     actnAllPeg: TAction;
     actnAllPeg: TAction;
     jpsMainPriceMargin: TJimPage;
     jpsMainPriceMargin: TJimPage;
     xbiPriceMargin: TdxStoredSideItem;
     xbiPriceMargin: TdxStoredSideItem;
+    dxsbsViewControlItem8: TdxStoredSideItem;
+    jpsMainOtherMeasure: TJimPage;
     procedure tobtnStandardBillsClick(Sender: TObject);
     procedure tobtnStandardBillsClick(Sender: TObject);
     procedure jcbPhaseChanged(Sender: TObject);
     procedure jcbPhaseChanged(Sender: TObject);
     procedure sbtnExpendClick(Sender: TObject);
     procedure sbtnExpendClick(Sender: TObject);
@@ -107,6 +109,8 @@ type
     FBillsGatherFrame: TBillsGatherFrame;
     FBillsGatherFrame: TBillsGatherFrame;
     FPriceMarginFrame: TPriceMarginFrame;
     FPriceMarginFrame: TPriceMarginFrame;
     FPhaseCompareFrame: TPhaseCompareFrame;
     FPhaseCompareFrame: TPhaseCompareFrame;
+    FOtherMeasureFrame: TOtherMeasureFrame;
+
     FCheckerFrame: TCheckerFrame;
     FCheckerFrame: TCheckerFrame;
 
 
     FDealPaymentFrame: TDealPaymentFrame;
     FDealPaymentFrame: TDealPaymentFrame;
@@ -180,6 +184,7 @@ type
     property BillsMeasureFrame: TBillsMeasureFrame read FBillsMeasureFrame;
     property BillsMeasureFrame: TBillsMeasureFrame read FBillsMeasureFrame;
     property BillsGatherFrame: TBillsGatherFrame read FBillsGatherFrame;
     property BillsGatherFrame: TBillsGatherFrame read FBillsGatherFrame;
     property PriceMarginFrame: TPriceMarginFrame read FPriceMarginFrame;
     property PriceMarginFrame: TPriceMarginFrame read FPriceMarginFrame;
+    property OtherMeasureFrame: TOtherMeasureFrame read FOtherMeasureFrame;
 
 
     property CheckerFrame: TCheckerFrame read FCheckerFrame;
     property CheckerFrame: TCheckerFrame read FCheckerFrame;
     property UpFileManageView: TUpFileManageView read FUpFileManageView write SetUpFileManageView;
     property UpFileManageView: TUpFileManageView read FUpFileManageView write SetUpFileManageView;
@@ -256,6 +261,7 @@ destructor TProjectFrame.Destroy;
 begin
 begin
   FBookmarkFrame.Free;
   FBookmarkFrame.Free;
   FZJJLFrame.Free;
   FZJJLFrame.Free;
+  FOtherMeasureFrame.Free;
   FBillsGatherFrame.Free;
   FBillsGatherFrame.Free;
   FDealPaymentFrame.Free;
   FDealPaymentFrame.Free;
   FBillsCompileFrame.Free;
   FBillsCompileFrame.Free;
@@ -532,7 +538,7 @@ procedure TProjectFrame.dxsbViewControlItemClick(Sender: TObject;
     BeforeChangeView;
     BeforeChangeView;
     case Item.Tag of
     case Item.Tag of
       0, 2: jpsMain.ActivePageIndex := Item.Tag;
       0, 2: jpsMain.ActivePageIndex := Item.Tag;
-      1, 3: if CheckMeasureEdition then jpsMain.ActivePageIndex := Item.Tag;
+      1, 3, 5: if CheckMeasureEdition then jpsMain.ActivePageIndex := Item.Tag;
     end;
     end;
     AfterChangeView;
     AfterChangeView;
   end;
   end;
@@ -600,10 +606,10 @@ begin
   bCloseCompare := (Item.Tag in [0..3]) and (jpsMain.ActivePageIndex = 4);
   bCloseCompare := (Item.Tag in [0..3]) and (jpsMain.ActivePageIndex = 4);
 
 
   case Item.Tag of
   case Item.Tag of
-    0..2: ChangeView;
+    0..2, 5: ChangeView;
     3: DisplayPriceMargin;
     3: DisplayPriceMargin;
     4: DisplayCompare;
     4: DisplayCompare;
-    5: DisplayReports;
+    6: DisplayReports;
   end;
   end;
 
 
   if bCloseCompare then
   if bCloseCompare then
@@ -1152,10 +1158,16 @@ begin
   CreateBillsFrame;
   CreateBillsFrame;
   UpdateSysProgress(130, '正在解析数据');
   UpdateSysProgress(130, '正在解析数据');
   CreateDealPaymentFrame;
   CreateDealPaymentFrame;
-  UpdateSysProgress(140, '正在解析数据');
+  UpdateSysProgress(135, '正在解析数据');
   CreateBillsGatherFrame;
   CreateBillsGatherFrame;
+  UpdateSysProgress(140, '正在解析数据');
+  CreatePriceMarginFrame;                
+  UpdateSysProgress(145, '正在解析数据');
+
+  FOtherMeasureFrame := TOtherMeasureFrame.Create(FProjectData);
+  AlignControl(FOtherMeasureFrame, jpsMainOtherMeasure, alClient);
   UpdateSysProgress(150, '正在解析数据');
   UpdateSysProgress(150, '正在解析数据');
-  CreatePriceMarginFrame;
+
 
 
   FZJJLFrame := TZJJLFrame.Create(Self, FProjectData.PhaseData.ZJJLData);
   FZJJLFrame := TZJJLFrame.Create(Self, FProjectData.PhaseData.ZJJLData);
   FZJJLFrame.DataReadOnly := FProjectData.PhaseData.StageDataReadOnly;
   FZJJLFrame.DataReadOnly := FProjectData.PhaseData.StageDataReadOnly;

+ 1 - 1
Units/Connections.pas

@@ -8,7 +8,7 @@ uses
 const
 const
   ProductName = 'Measure';
   ProductName = 'Measure';
   EmptyFileVersion = '1.0.0.0';
   EmptyFileVersion = '1.0.0.0';
-  FileVersion = '1.0.1.6';
+  FileVersion = '1.0.1.7';
   EncryptVersion = 'Auto1.0';
   EncryptVersion = 'Auto1.0';
   SAdoConnectStr = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;' +
   SAdoConnectStr = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;' +
                    'User ID=Admin;Password='''';Persist Security Info=True';
                    'User ID=Admin;Password='''';Persist Security Info=True';

+ 42 - 4
Units/DataBaseTables.pas

@@ -691,12 +691,50 @@ const
     (FieldName: 'PrePhasePay'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
     (FieldName: 'PrePhasePay'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
   );
   );
 
 
+  {其他台账 -- 全额计量}
+  SOtherMeasureOnce = 'OtherMeasureOnce';
+  tdOtherMeasureOnce: array [0..7] of TScFieldDef = (
+    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
+    // 排序
+    (FieldName: 'SerialNo'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 编号
+    (FieldName: 'Code'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 名称
+    (FieldName: 'Name'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 台账类型
+    (FieldName: 'MType'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 金额
+    (FieldName: 'TotalPrice'; FieldType: ftDouble; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 备注
+    (FieldName: 'MemoStr'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 创建日期
+    (FieldName: 'CreatePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
+  );
+
+  {其他台账 -- 分期计量}
+  SOtherMeasurePhase = 'OtherMeasurePhase';
+  tdOtherMeasurePhase: array [0..6] of TScFieldDef =(
+    (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
+    // 排序
+    (FieldName: 'SerialNo'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 编号
+    (FieldName: 'Code'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 名称
+    (FieldName: 'Name'; FieldType: ftString; Size: 200; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 台账类型
+    (FieldName: 'MType'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 备注
+    (FieldName: 'MemoStr'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 创建日期
+    (FieldName: 'CreatePhaseID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
+  );
+
   {PhaseData}
   {PhaseData}
 
 
-  // Refer  :原报
-  // Audit1 :1审
-  // Audit2 :2审
-  // Audit3 :3审
+  // Refer  : 原报
+  // Audit1 : 1审
+  // Audit2 : 2审
+  // Audit3 : 3审
   // ......
   // ......
   SRefer = 'Refer';
   SRefer = 'Refer';
   SAudit = 'Audit';
   SAudit = 'Audit';

+ 46 - 1
Units/ProjectData.pas

@@ -7,7 +7,7 @@ uses
   PhaseCompareDm, DealPaymentDm, SearchDm, DealBillsDm, MainDataListDm,
   PhaseCompareDm, DealPaymentDm, SearchDm, DealBillsDm, MainDataListDm,
   BillsGatherDm, BGLDm, StaffDm, BillsCompileDm, BillsMeasureDm,
   BillsGatherDm, BGLDm, StaffDm, BillsCompileDm, BillsMeasureDm,
   BillsBookmarkDm, UpFileManageUnit, ProjectGLDm, PriceMarginBillsDm,
   BillsBookmarkDm, UpFileManageUnit, ProjectGLDm, PriceMarginBillsDm,
-  DetailGLDm,
+  DetailGLDm, OtherMeasureOnceDm,
   Classes, SysUtils, ADODB, sdDB, Checker;
   Classes, SysUtils, ADODB, sdDB, Checker;
 
 
 type
 type
@@ -46,6 +46,8 @@ type
     FDetailGLData: TDetailGLData;
     FDetailGLData: TDetailGLData;
     FPriceMarginBillsData: TPriceMarginBillsData;
     FPriceMarginBillsData: TPriceMarginBillsData;
 
 
+    FOtherMeasureOnceData: TOtherMeasureOnceData;
+
     FCanUnlockInfo: Boolean;
     FCanUnlockInfo: Boolean;
 
 
     FWebID: Integer;
     FWebID: Integer;
@@ -128,6 +130,8 @@ type
     procedure OpenForReport2(const AFileName: string);
     procedure OpenForReport2(const AFileName: string);
     {OpenForReport3: OpenForReport2的基础上打开最后一个审核人数据,打开BillsMeasureTree不打开BillsCompileTree,链接BillsMeasureTree跟StageData}
     {OpenForReport3: OpenForReport2的基础上打开最后一个审核人数据,打开BillsMeasureTree不打开BillsCompileTree,链接BillsMeasureTree跟StageData}
     procedure OpenForReport3(const AFileName: string);
     procedure OpenForReport3(const AFileName: string);
+    {OpenForGather: BillsData, BillsMeasureTree, DealPaymentData, BGLData, PhaseData(根据PhaseIndex指定打开)}
+    procedure OpenForGather(const AFileName: string; APhaseIndex: Integer = -1);
     //-----------------------  End ---后台打开 ------------------------
     //-----------------------  End ---后台打开 ------------------------
 
 
     procedure SaveDebugFile(const AFileName: string);
     procedure SaveDebugFile(const AFileName: string);
@@ -209,6 +213,8 @@ type
     property DetailGLData: TDetailGLData read FDetailGLData;
     property DetailGLData: TDetailGLData read FDetailGLData;
     property PriceMarginBillsData: TPriceMarginBillsData read FPriceMarginBillsData;
     property PriceMarginBillsData: TPriceMarginBillsData read FPriceMarginBillsData;
 
 
+    property OtherMeasureOnceData: TOtherMeasureOnceData read FOtherMeasureOnceData;
+
     // 台账、合同支付
     // 台账、合同支付
     property AllowInsert: Boolean read GetAllowInsert;
     property AllowInsert: Boolean read GetAllowInsert;
     property BaseDataReadOnly: Boolean read GetBaseDataReadOnly;
     property BaseDataReadOnly: Boolean read GetBaseDataReadOnly;
@@ -289,6 +295,7 @@ begin
   FProjectGLData := TProjectGLData.Create(Self);
   FProjectGLData := TProjectGLData.Create(Self);
   FDetailGLData := TDetailGLData.Create(Self);
   FDetailGLData := TDetailGLData.Create(Self);
   FPriceMarginBillsData := TPriceMarginBillsData.Create(Self);
   FPriceMarginBillsData := TPriceMarginBillsData.Create(Self);
+  FOtherMeasureOnceData := TOtherMeasureOnceData.Create(Self);
   FAttachmentData := TUpFiles.Create;
   FAttachmentData := TUpFiles.Create;
   FPhaseIndex := 0;
   FPhaseIndex := 0;
 end;
 end;
@@ -309,6 +316,7 @@ destructor TProjectData.Destroy;
 begin
 begin
   try
   try
     FCheckers.Free;
     FCheckers.Free;
+    FOtherMeasureOnceData.Free;
     FPriceMarginBillsData.Free;
     FPriceMarginBillsData.Free;
     FDetailGLData.Free;
     FDetailGLData.Free;
     FProjectGLData.Free;
     FProjectGLData.Free;
@@ -449,6 +457,7 @@ begin
 
 
   //FBillsGatherData.RefreshBills;
   //FBillsGatherData.RefreshBills;
   FMainListData.Open(FConnection.Connection);
   FMainListData.Open(FConnection.Connection);
+  FOtherMeasureOnceData.Open(FConnection.Connection);
   UpdateSysProgress(200, '就绪');
   UpdateSysProgress(200, '就绪');
 
 
   if _IsDebugView then
   if _IsDebugView then
@@ -493,6 +502,9 @@ begin
     FBillsCompileData.ReLockBaseData;
     FBillsCompileData.ReLockBaseData;
     UpdateSysProgress(110, '正在保存数据');
     UpdateSysProgress(110, '正在保存数据');
     FBillsData.Save;
     FBillsData.Save;
+    UpdateSysProgress(165, '正在保存数据');
+
+    FOtherMeasureOnceData.Save;
     UpdateSysProgress(170, '正在保存数据');
     UpdateSysProgress(170, '正在保存数据');
 
 
     FProjProperties.AuditCompany := FStaffData.FinalStaffCompany;
     FProjProperties.AuditCompany := FStaffData.FinalStaffCompany;
@@ -1737,12 +1749,21 @@ procedure TProjectData.ResetFloatDigitView;
     FBGLData.cdsBGBillsViewUsedQuantity.DisplayFormat := FProjProperties.QuantityFormat;
     FBGLData.cdsBGBillsViewUsedQuantity.DisplayFormat := FProjProperties.QuantityFormat;
   end;
   end;
 
 
+  procedure SetOtherMeasureDigit;
+  begin
+    with FOtherMeasureOnceData.sdvOnce do
+    begin
+      Columns.FindColumn('TotalPrice').DisplayFormat := FProjProperties.TotalPriceFormat;
+    end;
+  end;
+
 begin
 begin
   SetBillsCompileDigit;
   SetBillsCompileDigit;
   SetBillsMeasureDigit;
   SetBillsMeasureDigit;
   SetDealPaymentDigit;
   SetDealPaymentDigit;
   SetBillsGatherDigit;
   SetBillsGatherDigit;
   SetBGLDigit;
   SetBGLDigit;
+  SetOtherMeasureDigit;
 end;
 end;
 
 
 function TProjectData.GetStageDataReadOnly: Boolean;
 function TProjectData.GetStageDataReadOnly: Boolean;
@@ -1955,4 +1976,28 @@ begin
     Result := False;
     Result := False;
 end;
 end;
 
 
+procedure TProjectData.OpenForGather(const AFileName: string;
+  APhaseIndex: Integer = -1);
+begin
+  FProjectID := -1;
+  UnZipFile(AFileName, TempPath);
+  FConnection.Open(MainFileName);
+  UpdateProjectDataBase;
+  FProjProperties.Open(FConnection.Connection);
+  UpdateOldData;
+  FBillsData.Open(FConnection.Connection);
+  FBillsCompileData.Open;
+  FDealPaymentData.Open(FConnection.Connection);
+  FBGLData.Open(FConnection.Connection);
+  if ProjProperties.PhaseCount > 0 then
+  begin
+    if (APhaseIndex <= ProjProperties.PhaseCount) and (APhaseIndex > 0) then
+      FPhaseIndex := APhaseIndex
+    else
+      FPhaseIndex := ProjProperties.PhaseCount;
+    FPhaseData.SimpleOpen2(Format('%sPhase%d.dat', [TempPath, FPhaseIndex]));
+  end;
+  FBillsMeasureData.ResetTreeNodeStageRec;
+end;
+
 end.
 end.

+ 2 - 0
Units/UpdateDataBase.pas

@@ -98,6 +98,8 @@ begin
     Updater.AddTableDef(SProjectGL, @tdProjectGL, Length(tdProjectGL), False, False);
     Updater.AddTableDef(SProjectGL, @tdProjectGL, Length(tdProjectGL), False, False);
     Updater.AddTableDef(SGLPrice, @tdGLPrice, Length(tdGLPrice), False, False);
     Updater.AddTableDef(SGLPrice, @tdGLPrice, Length(tdGLPrice), False, False);
     Updater.AddTableDef(SDetailGL, @tdDetailGL, Length(tdDetailGL), False, False);
     Updater.AddTableDef(SDetailGL, @tdDetailGL, Length(tdDetailGL), False, False);
+    Updater.AddTableDef(SOtherMeasureOnce, @tdOtherMeasureOnce, Length(tdOtherMeasureOnce), False, False);
+    Updater.AddTableDef(SOtherMeasurePhase, @tdOtherMeasurePhase, Length(tdOtherMeasurePhase), False, False);
     Updater.ExcuteUpdate;
     Updater.ExcuteUpdate;
   finally
   finally
     Updater.Free;
     Updater.Free;