Browse Source

Merge remote-tracking branch 'remotes/origin/ProjGather-beforeReportManagement'

Conflicts:
	Dprs/Pro/Measure.dof
	Dprs/Pro/Measure.res
	Dprs/Pro/Measure_Cloud.dof
	Dprs/Pro/Measure_Cloud.res
	Dprs/Pro/Measure_GuangDong.dof
	Dprs/Pro/Measure_GuangDong.res
	Dprs/Pro/Measure_GuangDong_Cloud.dof
	Dprs/Pro/Measure_GuangDong_Cloud.res
	Dprs/Pro/Measure_TZ.dof
	Dprs/Pro/Measure_TZ.res
	Dprs/Trail/Measure.dof
	Dprs/Trail/Measure.res
	Dprs/Trail/Measure_GuangDong.dof
	Dprs/Trail/Measure_GuangDong.res
	Forms/ReportsFrm.dfm
	Forms/ReportsFrm.pas
	Frames/ProjectFme.pas
MaiXinRong 7 years ago
parent
commit
c77599f39e
41 changed files with 9923 additions and 203 deletions
  1. 56 1
      DataModules/BillsMeasureDm.pas
  2. 0 1
      DataModules/DealPaymentDm.pas
  3. 2 2
      DataModules/PHPWebDm.dfm
  4. 8 9
      DataModules/PHPWebDm.pas
  5. 8 1
      DataModules/ProjectManagerDm.dfm
  6. 51 1
      DataModules/ProjectManagerDm.pas
  7. 2 1
      Dprs/PWFree/Measure_Cloud.dpr
  8. 2 1
      Dprs/PWFree/Measure_GuangDong_Cloud.dpr
  9. 2 1
      Dprs/Pro/Measure.dpr
  10. 2 1
      Dprs/Pro/Measure_Cloud.dpr
  11. 2 1
      Dprs/Pro/Measure_GuangDong.dpr
  12. 2 1
      Dprs/Pro/Measure_GuangDong_Cloud.dpr
  13. 2 2
      Dprs/Pro/Measure_GuangDong_TZ.dof
  14. 2 1
      Dprs/Pro/Measure_GuangDong_TZ.dpr
  15. BIN
      Dprs/Pro/Measure_GuangDong_TZ.res
  16. 2 1
      Dprs/Pro/Measure_TZ.dpr
  17. 2 1
      Dprs/Trail/Measure.dpr
  18. 2 1
      Dprs/Trail/Measure_GuangDong.dpr
  19. 32 14
      Forms/MainFrm.dfm
  20. 3 0
      Forms/MainFrm.pas
  21. 2 2
      Forms/ProgressHintFrm.dfm
  22. 133 47
      Forms/ProjectPropertiesFrm.dfm
  23. 30 10
      Forms/ProjectPropertiesFrm.pas
  24. 77 5
      Forms/ReportsFrm.dfm
  25. 85 9
      Forms/ReportsFrm.pas
  26. 19 0
      Forms/SelectOnlineSignPhaseFrm.pas
  27. 16 2
      Forms/SignOnlineReportsFrm.dfm
  28. 251 81
      Forms/SignOnlineReportsFrm.pas
  29. 9 0
      Frames/BillsGatherFme.dfm
  30. 17 0
      Frames/BillsGatherFme.pas
  31. 10 0
      Frames/BillsMeasureFme.dfm
  32. 25 0
      Frames/BillsMeasureFme.pas
  33. 2 1
      Frames/ProjectFme.pas
  34. 9 0
      Frames/ProjectManagerFme.dfm
  35. 52 0
      Frames/ProjectManagerFme.pas
  36. 4 1
      Units/DataBaseTables.pas
  37. 3 1
      Units/ProjectData.pas
  38. 40 2
      Units/ProjectProperty.pas
  39. 14 1
      Units/SignReports.pas
  40. 7502 0
      Units/superobject/superobject.pas
  41. 1441 0
      Units/superobject/superxmlparser.pas

+ 56 - 1
DataModules/BillsMeasureDm.pas

@@ -6,7 +6,9 @@ uses
   BillsDm, BillsTree, FormulaCalc, sdIDTree, StageDm,
   SysUtils, Classes, sdDB, DB;
 
-type
+type 
+  TLocateZJJLEvent = procedure (ABillsID: Integer) of object;
+
   TBillsMeasureData = class(TDataModule)
     sdvBillsMeasure: TsdDataView;
     procedure sdvBillsMeasureAfterOpen(Sender: TObject);
@@ -64,6 +66,8 @@ type
 
     function GatherRelaBGL(ANode: TsdIDTreeNode): string;
 
+    function FindNodeWithZJJL(ANode: TsdIDTreeNode): TsdIDTreeNode;
+
     // 计算 修改各期原报审核数据时,需对累计数据做增量
     procedure UpdateRecordDeal(ABillsID: Integer; AQuantity, ATotalPrice: Double);
     procedure UpdateRecordQc(ABillsID: Integer; AQuantity, ATotalPrice: Double);
@@ -1030,4 +1034,55 @@ begin
   end;
 end;
 
+function TBillsMeasureData.FindNodeWithZJJL(ANode: TsdIDTreeNode): TsdIDTreeNode;
+
+  function CheckNodeHasZJJL(ANode: TsdIDTreeNode): Boolean;
+  begin
+    Result := Assigned(TProjectData(FProjectData).PhaseData.ZJJLData.sddZJJL.Locate('BillsID', ANode.ID));
+  end;
+
+  function FindChildWithZJJL(ANode: TsdIDTreeNode): TsdIDTreeNode;
+  var
+    iChild: Integer;
+    vChild: TsdIDTreeNode;
+  begin
+    Result := nil;
+    for iChild := 0 to ANode.ChildCount - 1 do
+    begin
+      vChild := ANode.ChildNodes[iChild];
+      if CheckNodeHasZJJL(vChild) then
+        Result := vChild
+      else if vChild.HasChildren then
+        Result := FindChildWithZJJL(vChild);
+
+      if Assigned(Result) then
+        Break;
+    end;
+  end;
+
+  function FindParentWithZJJL(ANode: TsdIDTreeNode): TsdIDTreeNode;
+  var
+    vParent: TsdIDTreeNode;
+  begin
+    Result := nil;
+    vParent := ANode.Parent;
+    while Assigned(vParent) and not Assigned(Result) do
+    begin
+      if CheckNodeHasZJJL(vParent) then
+        Result := vParent;
+      vParent := vParent.Parent;
+    end;
+  end;
+
+begin
+  if not CheckNodeHasZJJL(ANode) then
+  begin
+    Result := FindChildWithZJJL(ANode);
+    if not Assigned(Result) then
+      Result := FindParentWithZJJL(ANode);
+  end
+  else
+    Result := ANode;
+end;
+
 end.

+ 0 - 1
DataModules/DealPaymentDm.pas

@@ -281,7 +281,6 @@ procedure TDealPaymentData.sdvDealPaymentGetText(var Text: String;
   begin
     if Assigned(AValue) then
     begin
-      Text := AValue.AsString;
       sField := GetFormulaField(AValue.FieldName);
       sFormula := AValue.Owner.ValueByName(sField).AsString;
       if (sField <> '') and (sFormula <> '') then

+ 2 - 2
DataModules/PHPWebDm.dfm

@@ -1,8 +1,8 @@
 object PHPWeb: TPHPWeb
   OldCreateOrder = False
   OnCreate = DataModuleCreate
-  Left = 771
-  Top = 216
+  Left = 772
+  Top = 217
   Height = 226
   Width = 281
 end

+ 8 - 9
DataModules/PHPWebDm.pas

@@ -152,7 +152,7 @@ implementation
 
 uses
   MD5Unit, IdMultipartFormData, VCLUnZip, VCLZip,
-  IniFiles, Forms, UtilMethods, Variants, ConstUnit, ScUtils;{, Controls, Windows}
+  IniFiles, Forms, UtilMethods, Variants, ConstUnit, ScUtils, superobject;{, Controls, Windows}
 
 var g_PHPWeb: TPHPWeb;
 
@@ -898,7 +898,7 @@ function TPHPWeb.UrlGet(AUrl: string; APostParam: TStrings;
 var
   i: Integer;
   ssResponse: TStringStream;
-  vJson: TCslJson;
+  vJ: ISuperObject;
   vIdHTTP: TIdHTTP;
 begin
   Result := -1;
@@ -910,17 +910,16 @@ begin
     if (Pos('200 OK', vIdHTTP.ResponseText) <> 0) then
     begin
       // Analyse Result Json
-      vJson := TCslJson.Create;
       try
-        vJson.Text := Utf8ToAnsi(ssResponse.DataString);
-        if SameText(vJson.Value['status'], 'true') then
+        vJ := SO(Utf8ToAnsi(ssResponse.DataString));
+        if SameText(vJ['status'].AsString, 'true') then
         begin
-          AResult := vJson.Value['info'];
+          AResult := vJ['info'].AsString;
           Result := 1;
         end
-        else if SameText(vJson.Value['status'], 'false') then
+        else if SameText(vJ['status'].AsString, 'false') then
         begin
-          AResult := vJson.Value['msg'];
+          AResult := vJ['msg'].AsString;
           Result := 0;
         end
         else
@@ -929,7 +928,7 @@ begin
           Result := 0;
         end;
       finally
-        vJson.Free;
+        vJ := nil;
       end;
     end;
   finally

+ 8 - 1
DataModules/ProjectManagerDm.dfm

@@ -99,7 +99,14 @@ object ProjectManagerData: TProjectManagerData
       65636973696F6E02000453697A6502000001044E616D6506065765624B657909
       4669656C644E616D6506065765624B6579084461746154797065020108446174
       6153697A6503FF000549734B6579080F4E65656450726F636573734E616D6509
-      09507265636973696F6E02000453697A6502000000}
+      09507265636973696F6E02000453697A6502000001044E616D65060B436F6D6D
+      6F6E4469676974094669656C644E616D65060B436F6D6D6F6E44696769740844
+      617461547970650203084461746153697A6502040549734B6579080F4E656564
+      50726F636573734E616D650909507265636973696F6E02000453697A65020000
+      01044E616D65060C4465616C5061794469676974094669656C644E616D65060C
+      4465616C50617944696769740844617461547970650203084461746153697A65
+      02040549734B6579080F4E65656450726F636573734E616D6509095072656369
+      73696F6E02000453697A6502000000}
   end
   object sdvProjectsInfo: TsdDataView
     Active = False

+ 51 - 1
DataModules/ProjectManagerDm.pas

@@ -331,13 +331,63 @@ procedure TProjectManagerData.sdvProjectsInfoGetText(var Text: String;
     end;
   end;
 
+  function GetFormatString(ADigitValue: TsdValue): string;
+  begin
+    if not ADigitValue.IsNull then
+    begin
+      case ADigitValue.AsInteger of
+        0: Result := '0';
+        1: Result := '0.#';
+        2: Result := '0.##';
+        3: Result := '0.###';
+        4: Result := '0.####';
+        5: Result := '0.#####';
+        6: Result := '0.######';
+        7: Result := '0.#######';
+        8: Result := '0.########';
+        9: Result := '0.#########';
+      else
+        Result := '0.##########';
+      end;
+    end
+    else
+      Result := '';
+  end;
+
+  function FormatCommonTotalPrice(ATotalPrice: Double): string;
+  var
+    sFormat: string;
+  begin
+    Result := Text;
+    sFormat := GetFormatString(ARecord.ValueByName('CommonDigit'));
+    if sFormat <> '' then
+      Result := FormatFloat(sFormat, ATotalPrice);
+  end;
+
+  function FormatDealPayTotalPrice(ATotalPrice: Double): string;
+  var
+    sFormat: string;
+  begin
+    Result := Text;
+    sFormat := GetFormatString(ARecord.ValueByName('DealPayDigit'));
+    if sFormat <> '' then
+      Result := FormatFloat(sFormat, ATotalPrice);
+  end;
+
 begin
   if not Assigned(ARecord) then Exit;
   if SameText(AColumn.FieldName, 'AuditStatus') then
     if ARecord.ValueByName('Type').AsInteger = 1 then
       Text := NumToAuditStatus(AValue.AsInteger)
     else
-      Text := '';
+      Text := ''
+  else if DisplayText then
+  begin
+    if Pos('TotalPrice', AColumn.FieldName) > 0 then
+      Text := FormatCommonTotalPrice(AValue.AsFloat)
+    else if SameText('PhasePay', AColumn.FieldName) then
+      Text := FormatDealPayTotalPrice(AValue.AsFloat);
+  end;
 end;
 
 procedure TProjectManagerData.DeleteAllTenderFiles(ANode: TsdIDTreeNode);

+ 2 - 1
Dprs/PWFree/Measure_Cloud.dpr

@@ -224,7 +224,8 @@ uses
   SetGuestFrm in '..\..\Forms\SetGuestFrm.pas' {SetGuestForm},
   ProjGatherDealPay in '..\..\ProjGather\ProjGatherDealPay.pas',
   ProjGatherProperties in '..\..\ProjGather\ProjGatherProperties.pas',
-  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule};
+  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule},
+  superobject in '..\..\Units\superobject\superobject.pas';
 
 {$R *.res}
 

+ 2 - 1
Dprs/PWFree/Measure_GuangDong_Cloud.dpr

@@ -223,7 +223,8 @@ uses
   SetGuestFrm in '..\..\Forms\SetGuestFrm.pas' {SetGuestForm},
   ProjGatherDealPay in '..\..\ProjGather\ProjGatherDealPay.pas',
   ProjGatherProperties in '..\..\ProjGather\ProjGatherProperties.pas',
-  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule};
+  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule},
+  superobject in '..\..\Units\superobject\superobject.pas';
 
 {$R *.res}
 

+ 2 - 1
Dprs/Pro/Measure.dpr

@@ -221,7 +221,8 @@ uses
   ReportHistoryFrm in '..\..\Forms\ReportHistoryFrm.pas' {ReportHistoryForm},
   ProjGatherDealPay in '..\..\ProjGather\ProjGatherDealPay.pas',
   ProjGatherProperties in '..\..\ProjGather\ProjGatherProperties.pas',
-  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule};
+  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule},
+  superobject in '..\..\Units\superobject\superobject.pas';
 
 {$R *.res}
 

+ 2 - 1
Dprs/Pro/Measure_Cloud.dpr

@@ -227,7 +227,8 @@ uses
   ReportHistoryFrm in '..\..\Forms\ReportHistoryFrm.pas' {ReportHistoryForm},
   ProjGatherDealPay in '..\..\ProjGather\ProjGatherDealPay.pas',
   ProjGatherProperties in '..\..\ProjGather\ProjGatherProperties.pas',
-  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule};
+  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule},
+  superobject in '..\..\Units\superobject\superobject.pas';
 
 {$R *.res}
 

+ 2 - 1
Dprs/Pro/Measure_GuangDong.dpr

@@ -221,7 +221,8 @@ uses
   ReportHistoryFrm in '..\..\Forms\ReportHistoryFrm.pas' {ReportHistoryForm}
   ProjGatherDealPay in '..\..\ProjGather\ProjGatherDealPay.pas',
   ProjGatherProperties in '..\..\ProjGather\ProjGatherProperties.pas',
-  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule};
+  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule},
+  superobject in '..\..\Units\superobject\superobject.pas';
 
 {$R *.res}
 

+ 2 - 1
Dprs/Pro/Measure_GuangDong_Cloud.dpr

@@ -226,7 +226,8 @@ uses
   ReportHistoryFrm in '..\..\Forms\ReportHistoryFrm.pas' {ReportHistoryForm},
   ProjGatherDealPay in '..\..\ProjGather\ProjGatherDealPay.pas',
   ProjGatherProperties in '..\..\ProjGather\ProjGatherProperties.pas',
-  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule};
+  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule},
+  superobject in '..\..\Units\superobject\superobject.pas';
 
 {$R *.res}
 

+ 2 - 2
Dprs/Pro/Measure_GuangDong_TZ.dof

@@ -115,7 +115,7 @@ AutoIncBuild=0
 MajorVer=3
 MinorVer=1
 Release=7
-Build=150
+Build=165
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横0号台账广东专业版
-FileVersion=3.1.7.150
+FileVersion=3.1.7.165
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure

+ 2 - 1
Dprs/Pro/Measure_GuangDong_TZ.dpr

@@ -221,7 +221,8 @@ uses
   ReportHistoryFrm in '..\..\Forms\ReportHistoryFrm.pas' {ReportHistoryForm}
   ProjGatherDealPay in '..\..\ProjGather\ProjGatherDealPay.pas',
   ProjGatherProperties in '..\..\ProjGather\ProjGatherProperties.pas',
-  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule};
+  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule},
+  superobject in '..\..\Units\superobject\superobject.pas';
 
 {$R *.res}
 

BIN
Dprs/Pro/Measure_GuangDong_TZ.res


+ 2 - 1
Dprs/Pro/Measure_TZ.dpr

@@ -221,7 +221,8 @@ uses
   ReportHistoryFrm in '..\..\Forms\ReportHistoryFrm.pas' {ReportHistoryForm},
   ProjGatherDealPay in '..\..\ProjGather\ProjGatherDealPay.pas',
   ProjGatherProperties in '..\..\ProjGather\ProjGatherProperties.pas',
-  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule};
+  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule},
+  superobject in '..\..\Units\superobject\superobject.pas';
 
 {$R *.res}
 

+ 2 - 1
Dprs/Trail/Measure.dpr

@@ -221,7 +221,8 @@ uses
   ReportHistoryFrm in '..\..\Forms\ReportHistoryFrm.pas' {ReportHistoryForm},
   ProjGatherDealPay in '..\..\ProjGather\ProjGatherDealPay.pas',
   ProjGatherProperties in '..\..\ProjGather\ProjGatherProperties.pas',
-  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule};
+  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule},
+  superobject in '..\..\Units\superobject\superobject.pas';
 
 {$R *.res}
 

+ 2 - 1
Dprs/Trail/Measure_GuangDong.dpr

@@ -221,7 +221,8 @@ uses
   ReportHistoryFrm in '..\..\Forms\ReportHistoryFrm.pas' {ReportHistoryForm},
   ProjGatherDealPay in '..\..\ProjGather\ProjGatherDealPay.pas',
   ProjGatherProperties in '..\..\ProjGather\ProjGatherProperties.pas',
-  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule};
+  rpgDealPayDm in '..\..\Report\ProjGather\rpgDealPayDm.pas' {rgpDealPayData: TDataModule},
+  superobject in '..\..\Units\superobject\superobject.pas';
 
 {$R *.res}
 

+ 32 - 14
Forms/MainFrm.dfm

@@ -1,6 +1,6 @@
 object MainForm: TMainForm
-  Left = 540
-  Top = 329
+  Left = 541
+  Top = 330
   Width = 750
   Height = 538
   ActiveControl = jpsMainProjectsManager
@@ -21,7 +21,7 @@ object MainForm: TMainForm
   object jtsProjects: TJimTabSet
     Left = 0
     Top = 49
-    Width = 734
+    Width = 742
     Height = 21
     Align = alTop
     BackgroundColor = clGradientInactiveCaption
@@ -45,8 +45,8 @@ object MainForm: TMainForm
   end
   object dxStatusBar: TdxStatusBar
     Left = 0
-    Top = 480
-    Width = 734
+    Top = 487
+    Width = 742
     Height = 20
     Panels = <
       item
@@ -78,12 +78,12 @@ object MainForm: TMainForm
     object dxStatusBarContainer2: TdxStatusBarContainerControl
       Left = 604
       Top = 2
-      Width = 128
+      Width = 136
       Height = 16
       object ProgressBar: TProgressBar
         Left = 0
         Top = 0
-        Width = 128
+        Width = 136
         Height = 16
         Align = alClient
         Max = 200
@@ -94,8 +94,8 @@ object MainForm: TMainForm
   object jpsMain: TJimPages
     Left = 0
     Top = 70
-    Width = 734
-    Height = 410
+    Width = 742
+    Height = 417
     ActivePage = jpsMainProjectsManager
     ActivePageIndex = 0
     Align = alClient
@@ -103,8 +103,8 @@ object MainForm: TMainForm
     object jpsMainProjectsManager: TJimPage
       Left = 0
       Top = 0
-      Width = 734
-      Height = 410
+      Width = 742
+      Height = 417
       TabName = 'ProjectsManager'
       Caption = 'ProjsMgr'
       object pnlUser: TPanel
@@ -201,8 +201,8 @@ object MainForm: TMainForm
     object jpsMainProjects: TJimPage
       Left = 0
       Top = 0
-      Width = 734
-      Height = 410
+      Width = 742
+      Height = 417
       TabName = 'Projects'
       Caption = 'Projects'
       object jpsProjects: TJimPages
@@ -220,7 +220,7 @@ object MainForm: TMainForm
     Font.Charset = DEFAULT_CHARSET
     Font.Color = clWindowText
     Font.Height = -12
-    Font.Name = #24494#36719#38597#40657
+    Font.Name = 'Microsoft YaHei UI'
     Font.Style = []
     Bars = <
       item
@@ -1107,6 +1107,24 @@ object MainForm: TMainForm
       Hint = #28155#21152#20851#27880#20154
       Visible = ivAlways
     end
+    object dxbtnLocateZJJL: TdxBarButton
+      Caption = #23450#20301#33267#20013#38388#35745#37327
+      Category = 0
+      Hint = #23450#20301#33267#20013#38388#35745#37327
+      Visible = ivAlways
+    end
+    object dxbtnEpure: TdxBarButton
+      Caption = #25554#20837#35745#37327#33609#22270
+      Category = 0
+      Hint = #25554#20837#35745#37327#33609#22270
+      Visible = ivAlways
+    end
+    object dxbtnLocateCompileBills: TdxBarButton
+      Caption = #23450#20301#33267#21488#36134#20998#35299
+      Category = 0
+      Hint = #23450#20301#33267#21488#36134#20998#35299
+      Visible = ivAlways
+    end
   end
   object Images: TImageList
     DrawingStyle = dsTransparent

+ 3 - 0
Forms/MainFrm.pas

@@ -165,6 +165,9 @@ type
     dxbtnHelpCenter: TdxBarButton;
     dxbtnLocateMeasureBills: TdxBarButton;
     dxbtnGuest: TdxBarButton;
+    dxbtnLocateZJJL: TdxBarButton;
+    dxbtnEpure: TdxBarButton;
+    dxbtnLocateCompileBills: TdxBarButton;
     procedure FormCreate(Sender: TObject);
     procedure FormDestroy(Sender: TObject);
     procedure jtsProjectsChange(Sender: TObject; NewTab: Integer;

+ 2 - 2
Forms/ProgressHintFrm.dfm

@@ -1,6 +1,6 @@
 object ProgressHintForm: TProgressHintForm
-  Left = 408
-  Top = 407
+  Left = 409
+  Top = 408
   BorderStyle = bsNone
   ClientHeight = 106
   ClientWidth = 540

+ 133 - 47
Forms/ProjectPropertiesFrm.dfm

@@ -225,7 +225,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           Width = 438
           Height = 247
           HorzScrollBar.Range = 401
-          VertScrollBar.Range = 1180
+          VertScrollBar.Range = 1348
           Align = alClient
           AutoScroll = False
           BevelInner = bvNone
@@ -263,20 +263,20 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           object lblConstructor: TLabel
             Left = 34
             Top = 192
-            Width = 60
+            Width = 66
             Height = 12
-            Caption = #25215#21253#21333#20301#65306
+            Caption = #25215#21253#21333#20301'1'#65306
           end
           object lblSupervisor: TLabel
             Left = 34
-            Top = 276
-            Width = 60
+            Top = 360
+            Width = 66
             Height = 12
-            Caption = #30417#29702#21333#20301#65306
+            Caption = #30417#29702#21333#20301'1'#65306
           end
           object lblTechParameters: TLabel
             Left = 7
-            Top = 371
+            Top = 539
             Width = 48
             Height = 12
             Caption = #25216#26415#21442#25968
@@ -289,14 +289,14 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblLoadLevel: TLabel
             Left = 34
-            Top = 393
+            Top = 561
             Width = 60
             Height = 12
             Caption = #20844#36335#31561#32423#65306
           end
           object lblDealPayTitle: TLabel
             Left = 7
-            Top = 531
+            Top = 699
             Width = 48
             Height = 12
             Caption = #21512#21516#25903#20184
@@ -309,7 +309,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblSafeTitel: TLabel
             Left = 7
-            Top = 635
+            Top = 803
             Width = 48
             Height = 12
             Caption = #25991#20214#23433#20840
@@ -322,14 +322,14 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblUnlockPassword: TLabel
             Left = 36
-            Top = 659
+            Top = 827
             Width = 84
             Height = 12
             Caption = #35299#38145#33410#28857#23494#30721#65306
           end
           object lblPasswordHint: TLabel
             Left = 128
-            Top = 660
+            Top = 828
             Width = 90
             Height = 12
             Caption = 'lblPasswordHint'
@@ -343,7 +343,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblCalcParametersTitel: TLabel
             Left = 7
-            Top = 763
+            Top = 931
             Width = 48
             Height = 12
             Caption = #35745#31639#21442#25968
@@ -356,14 +356,14 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblDigit: TLabel
             Left = 36
-            Top = 787
+            Top = 955
             Width = 84
             Height = 12
             Caption = #20445#30041#23567#25968#20301#25968#65306
           end
           object lblDateTime: TLabel
             Left = 7
-            Top = 936
+            Top = 1104
             Width = 48
             Height = 12
             Caption = #26102#38388#21442#25968
@@ -376,21 +376,21 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object lblBaseline: TLabel
             Left = 36
-            Top = 959
+            Top = 1127
             Width = 60
             Height = 12
             Caption = #36215#22987#26085#26399#65306
           end
           object lblDeadline: TLabel
             Left = 36
-            Top = 983
+            Top = 1152
             Width = 60
             Height = 12
             Caption = #25130#27490#26085#26399#65306
           end
           object lblDateHint: TLabel
-            Left = 37
-            Top = 1004
+            Left = 36
+            Top = 1174
             Width = 192
             Height = 12
             Caption = #24403#21069#25130#27490#26085#26399' '#65308' '#36215#22987#26085#26399#65292#35831#26680#26597
@@ -401,6 +401,20 @@ object ProjectPropertiesForm: TProjectPropertiesForm
             Font.Style = []
             ParentFont = False
           end
+          object lblSupervisor_2: TLabel
+            Left = 34
+            Top = 444
+            Width = 66
+            Height = 12
+            Caption = #30417#29702#21333#20301'2'#65306
+          end
+          object lblConstructor_2: TLabel
+            Left = 34
+            Top = 274
+            Width = 66
+            Height = 12
+            Caption = #25215#21253#21333#20301'2'#65306
+          end
           object pnlDealInfoBar: TPanel
             Left = 62
             Top = 9
@@ -519,7 +533,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leSName: TLabeledEdit
             Left = 101
-            Top = 291
+            Top = 375
             Width = 262
             Height = 18
             Ctl3D = False
@@ -531,7 +545,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leSLegal: TLabeledEdit
             Left = 101
-            Top = 331
+            Top = 415
             Width = 137
             Height = 18
             Ctl3D = False
@@ -543,7 +557,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leSDate: TLabeledEdit
             Left = 245
-            Top = 331
+            Top = 415
             Width = 119
             Height = 18
             Ctl3D = False
@@ -555,7 +569,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlTechParametersBar: TPanel
             Left = 62
-            Top = 376
+            Top = 544
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -563,7 +577,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leStartPeg: TLabeledEdit
             Left = 34
-            Top = 451
+            Top = 619
             Width = 132
             Height = 18
             Ctl3D = False
@@ -575,7 +589,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leEndPeg: TLabeledEdit
             Left = 176
-            Top = 451
+            Top = 619
             Width = 131
             Height = 18
             Ctl3D = False
@@ -587,7 +601,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leLength: TLabeledEdit
             Left = 34
-            Top = 491
+            Top = 659
             Width = 132
             Height = 18
             Ctl3D = False
@@ -599,7 +613,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leLaneCount: TLabeledEdit
             Left = 176
-            Top = 491
+            Top = 659
             Width = 132
             Height = 18
             Ctl3D = False
@@ -611,7 +625,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object cbLoadLevel: TComboBox
             Left = 34
-            Top = 410
+            Top = 578
             Width = 132
             Height = 20
             Ctl3D = False
@@ -628,7 +642,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlDealPayBar: TPanel
             Left = 62
-            Top = 537
+            Top = 705
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -636,7 +650,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leContractPrice: TLabeledEdit
             Left = 133
-            Top = 552
+            Top = 720
             Width = 117
             Height = 18
             BiDiMode = bdLeftToRight
@@ -654,7 +668,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leStartedSubsist: TLabeledEdit
             Left = 133
-            Top = 579
+            Top = 747
             Width = 118
             Height = 18
             Ctl3D = False
@@ -668,7 +682,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leMaterialSubsist: TLabeledEdit
             Left = 133
-            Top = 605
+            Top = 773
             Width = 119
             Height = 18
             Ctl3D = False
@@ -682,7 +696,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlSafeBar: TPanel
             Left = 62
-            Top = 641
+            Top = 809
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -690,7 +704,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlUnlockPassword: TPanel
             Left = 40
-            Top = 673
+            Top = 841
             Width = 361
             Height = 85
             BevelOuter = bvNone
@@ -930,7 +944,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlCalcParametersBar: TPanel
             Left = 62
-            Top = 769
+            Top = 937
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -938,7 +952,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leQuantityDigit: TLabeledEdit
             Left = 100
-            Top = 804
+            Top = 972
             Width = 87
             Height = 18
             EditLabel.Width = 36
@@ -950,7 +964,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leTotalPriceDigit: TLabeledEdit
             Left = 264
-            Top = 804
+            Top = 972
             Width = 87
             Height = 18
             EditLabel.Width = 36
@@ -962,7 +976,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object udQuantity: TUpDown
             Left = 187
-            Top = 804
+            Top = 972
             Width = 16
             Height = 18
             Associate = leQuantityDigit
@@ -972,7 +986,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object udTotalPrice: TUpDown
             Left = 351
-            Top = 804
+            Top = 972
             Width = 16
             Height = 18
             Associate = leTotalPriceDigit
@@ -981,7 +995,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object gbPM_Digit: TGroupBox
             Left = 52
-            Top = 883
+            Top = 1051
             Width = 349
             Height = 44
             Caption = #20215#24046
@@ -1011,7 +1025,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object pnlDateTime: TPanel
             Left = 62
-            Top = 942
+            Top = 1110
             Width = 339
             Height = 2
             BevelOuter = bvLowered
@@ -1019,7 +1033,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object dtpBaseline: TDateTimePicker
             Left = 104
-            Top = 955
+            Top = 1123
             Width = 105
             Height = 20
             Date = 0.457352881945553200
@@ -1030,7 +1044,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object dtpDeadline: TDateTimePicker
             Left = 104
-            Top = 979
+            Top = 1148
             Width = 105
             Height = 20
             Date = 0.457352881945553200
@@ -1041,7 +1055,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object cbDealPayAloneDigiy: TCheckBox
             Left = 62
-            Top = 831
+            Top = 999
             Width = 131
             Height = 17
             Caption = #21512#21516#25903#20184#21333#29420#35774#32622
@@ -1050,7 +1064,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leDealPayTotalPriceDigit: TLabeledEdit
             Left = 100
-            Top = 855
+            Top = 1023
             Width = 87
             Height = 18
             EditLabel.Width = 36
@@ -1062,7 +1076,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object udDealPayTotalPriceDigit: TUpDown
             Left = 187
-            Top = 855
+            Top = 1023
             Width = 16
             Height = 18
             Associate = leDealPayTotalPriceDigit
@@ -1071,7 +1085,7 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           end
           object leDealPhase: TLabeledEdit
             Left = 177
-            Top = 410
+            Top = 578
             Width = 131
             Height = 18
             Ctl3D = False
@@ -1081,6 +1095,78 @@ object ProjectPropertiesForm: TProjectPropertiesForm
             ParentCtl3D = False
             TabOrder = 38
           end
+          object leSName_2: TLabeledEdit
+            Left = 101
+            Top = 459
+            Width = 262
+            Height = 18
+            Ctl3D = False
+            EditLabel.Width = 60
+            EditLabel.Height = 12
+            EditLabel.Caption = #21333#20301#21517#31216#65306
+            ParentCtl3D = False
+            TabOrder = 39
+          end
+          object leSLegal_2: TLabeledEdit
+            Left = 101
+            Top = 499
+            Width = 137
+            Height = 18
+            Ctl3D = False
+            EditLabel.Width = 60
+            EditLabel.Height = 12
+            EditLabel.Caption = #27861#20154#20195#34920#65306
+            ParentCtl3D = False
+            TabOrder = 40
+          end
+          object leSDate_2: TLabeledEdit
+            Left = 245
+            Top = 499
+            Width = 119
+            Height = 18
+            Ctl3D = False
+            EditLabel.Width = 60
+            EditLabel.Height = 12
+            EditLabel.Caption = #31614#35746#26085#26399#65306
+            ParentCtl3D = False
+            TabOrder = 41
+          end
+          object leCName_2: TLabeledEdit
+            Left = 101
+            Top = 289
+            Width = 262
+            Height = 18
+            Ctl3D = False
+            EditLabel.Width = 60
+            EditLabel.Height = 12
+            EditLabel.Caption = #21333#20301#21517#31216#65306
+            ParentCtl3D = False
+            TabOrder = 42
+          end
+          object leCLegal_2: TLabeledEdit
+            Left = 101
+            Top = 330
+            Width = 137
+            Height = 18
+            Ctl3D = False
+            EditLabel.Width = 60
+            EditLabel.Height = 12
+            EditLabel.Caption = #27861#20154#20195#34920#65306
+            ParentCtl3D = False
+            TabOrder = 43
+          end
+          object leCDate_2: TLabeledEdit
+            Left = 245
+            Top = 330
+            Width = 119
+            Height = 18
+            Ctl3D = False
+            EditLabel.Width = 60
+            EditLabel.Height = 12
+            EditLabel.Caption = #31614#35746#26085#26399#65306
+            ParentCtl3D = False
+            TabOrder = 44
+          end
         end
       end
     end

+ 30 - 10
Forms/ProjectPropertiesFrm.pas

@@ -124,6 +124,14 @@ type
     edtReportShowStateText: TEdit;
     cbReportShowStageWithoutReply: TCheckBox;
     leDealPhase: TLabeledEdit;
+    leSName_2: TLabeledEdit;
+    lblSupervisor_2: TLabel;
+    leSLegal_2: TLabeledEdit;
+    leSDate_2: TLabeledEdit;
+    leCName_2: TLabeledEdit;
+    leCLegal_2: TLabeledEdit;
+    leCDate_2: TLabeledEdit;
+    lblConstructor_2: TLabel;
     procedure btnOkClick(Sender: TObject);
     procedure leContractPriceClick(Sender: TObject);
     procedure msbBaseMouseWheel(Sender: TObject; Shift: TShiftState;
@@ -338,15 +346,15 @@ end;
 
 procedure TProjectPropertiesForm.ResetContentsCheck;
 begin
-  if msbBase.VertScrollBar.Position < 355 then
+  if msbBase.VertScrollBar.Position < 523 then
     ResetContentsCheck(tobtnDealInfo.Tag)
-  else if msbBase.VertScrollBar.Position < 515 then
+  else if msbBase.VertScrollBar.Position < 683 then
     ResetContentsCheck(tobtnTechParameters.Tag)
-  else if msbBase.VertScrollBar.Position < 628 then
+  else if msbBase.VertScrollBar.Position < 796 then
     ResetContentsCheck(tobtnDealPayment.Tag)
-  else if msbBase.VertScrollBar.Position < 758 then
+  else if msbBase.VertScrollBar.Position < 926 then
     ResetContentsCheck(tobtnSafe.Tag)
-  else if msbBase.VertScrollBar.Position < 933 then
+  else if msbBase.VertScrollBar.Position < 1101 then
     ResetContentsCheck(tobtnCalcParameters.Tag)
   else
     ResetContentsCheck(tobtnDateTime.Tag);
@@ -363,15 +371,15 @@ begin
   if ATag = tobtnDealInfo.Tag then
     msbBase.VertScrollBar.Position := 0
   else if ATag = tobtnTechParameters.Tag then
-    msbBase.VertScrollBar.Position := 355
+    msbBase.VertScrollBar.Position := 523
   else if ATag = tobtnDealPayment.Tag then
-    msbBase.VertScrollBar.Position := 515
+    msbBase.VertScrollBar.Position := 683
   else if ATag = tobtnSafe.Tag then
-    msbBase.VertScrollBar.Position := 628
+    msbBase.VertScrollBar.Position := 796
   else if ATag = tobtnCalcParameters.Tag then
-    msbBase.VertScrollBar.Position := 758
+    msbBase.VertScrollBar.Position := 926
   else if ATag = tobtnDateTime.Tag then
-    msbBase.VertScrollBar.Position := 933;
+    msbBase.VertScrollBar.Position := 1101;
 end;
 
 procedure TProjectPropertiesForm.InitDealInfo;
@@ -386,9 +394,15 @@ begin
   leCName.Text := FProjProperties.CName;
   leCLegal.Text := FProjProperties.CLegal;
   leCDate.Text := FProjProperties.CDate;
+  leCName_2.Text := FProjProperties.CName_2;
+  leCLegal_2.Text := FProjProperties.CLegal_2;
+  leCDate_2.Text := FProjProperties.CDate_2;
   leSName.Text := FProjProperties.SName;
   leSLegal.Text := FProjProperties.SLegal;
   leSDate.Text := FProjProperties.SDate;
+  leSName_2.Text := FProjProperties.SName_2;
+  leSLegal_2.Text := FProjProperties.SLegal_2;
+  leSDate_2.Text := FProjProperties.SDate_2;
 end;
 
 procedure TProjectPropertiesForm.InitTechParameters;
@@ -413,9 +427,15 @@ begin
   FProjProperties.CName := leCName.Text;
   FProjProperties.CLegal := leCLegal.Text;
   FProjProperties.CDate := leCDate.Text;
+  FProjProperties.CName_2 := leCName_2.Text;
+  FProjProperties.CLegal_2 := leCLegal_2.Text;
+  FProjProperties.CDate_2 := leCDate_2.Text;
   FProjProperties.SName := leSName.Text;
   FProjProperties.SLegal := leSLegal.Text;
   FProjProperties.SDate := leSDate.Text;
+  FProjProperties.SName_2 := leSName_2.Text;
+  FProjProperties.SLegal_2 := leSLegal_2.Text;
+  FProjProperties.SDate_2 := leSDate_2.Text;
 end;
 
 procedure TProjectPropertiesForm.SaveTechParameters;

+ 77 - 5
Forms/ReportsFrm.dfm

@@ -1,6 +1,6 @@
 object ReportsForm: TReportsForm
-  Left = 180
-  Top = 198
+  Left = 233
+  Top = 208
   Align = alClient
   BorderIcons = [biSystemMenu]
   BorderStyle = bsSingle
@@ -105,9 +105,9 @@ object ReportsForm: TReportsForm
       TabOrder = 0
       object extvReport: TExTreeView
         Left = 0
-        Top = 35
+        Top = 57
         Width = 225
-        Height = 390
+        Height = 368
         Align = alClient
         Font.Charset = DEFAULT_CHARSET
         Font.Color = clWindowText
@@ -123,6 +123,7 @@ object ReportsForm: TReportsForm
         CheckMode = cmNoGray
         TabOrder = 0
         OnClick = extvReportClick
+        OnKeyDown = extvReportKeyDown
         Items.Data = {
           0600000033000000000000000100000001000000FFFFFFFF0000000000000000
           1AD6A7B1ED303220D6D0C6DAD6A7B8B6D6A4CAE9B1ED202E7372743400000000
@@ -196,6 +197,77 @@ object ReportsForm: TReportsForm
           end
         end
       end
+      object pnlSearch: TPanel
+        Left = 0
+        Top = 35
+        Width = 225
+        Height = 22
+        Align = alTop
+        BevelOuter = bvNone
+        TabOrder = 2
+        Visible = False
+        DesignSize = (
+          225
+          22)
+        object imgSearch: TImage
+          Left = 197
+          Top = 3
+          Width = 16
+          Height = 16
+          Cursor = crHandPoint
+          Anchors = [akTop, akRight]
+          AutoSize = True
+          Picture.Data = {
+            055449636F6E0000010001001010000001002000680400001600000028000000
+            1000000020000000010020000000000000000000000000000000000000000000
+            0000000000000000000000000000000000000000000000000000000000000000
+            D098A090C09090E0B06060FF802020E0801820E0A05850B0C098906000000000
+            000000000000000000000000000000000000000000000000C0808010C07870D0
+            D0B0A0FFC05830FFE0A080FFF0C8B0FFF0C0A0FFD09070FF903010FFB0787080
+            0000000000000000000000000000000000000000C0808070C08080FFE0C0B0FF
+            D07040FFFFD0B0FFFFFFF0FFE0C8C0FF904030FFFFE8D0FFF0B890FF903010FF
+            C09080600000000000000000C0888020C08080E0C09890FFE0E8E0FFE0B8A0FF
+            F0B090FFFFFFFFFFFFFFFFFFE0D0C0FFD0A090FFFFE8E0FFFFE0D0FFD09070FF
+            A05050B000000000C0788080C07880FFD0C8C0FFF0F8F0FFD0C8C0FFE08050FF
+            FFD0B0FFFFFFFFFFFFFFFFFFFFF0F0FF905040FFC08870FFFFE8E0FFF0C0A0FF
+            801810E0A08080E0C09090FFE0F0E0FFE0E8E0FFC09090FFC08880FFF08850FF
+            FFD0B0FFFFFFFFFFFFFFFFFFF0E8E0FFE0D0D0FF905040FFD0A890FFFFC0A0FF
+            902820E0C07870FFE0E8E0FFD0C0C0FFC07880FFC08080FFC08080FFF0A080FF
+            FFC0A0FFFFFFFFFFC08880FFA05840FFE0D0D0FFA05840FFC0A090FFE0A880FF
+            C06860FFC08080FFD0A8B0FFC08080FFD09090FFD09090FFD08890FFE0A8A0FF
+            FFA870FFFFC8B0FFF0E8E0FFC08880FFA05840FFC08880FFF0C8B0FFD07040FF
+            D09090F0D0A0A0FFD0A8B0FFD09090FFE0A0A0FFE098A0FFD09890FFD09090FF
+            E0A8A0FFFFA870FFFFC0A0FFFFE0D0FFFFE0D0FFFFC0A0FFE08850FFD0C0B0FF
+            E0E0E0FFD0A0A020D0A0A0FFF0D0D0FFD09890FFE0A8B0FFE0A8B0FFE0A8A0FF
+            E0A0A0FFE0B0B0FFF0A890FFFF9060FFF09050FFE0A080FFD09890FFC06870FF
+            C0B0B0FF00000000D0A0A030D0A0A0FFF0C8D0FFD09890FFE0B0B0FFF0B8B0FF
+            E0B0B0FFE0A8B0FFE0A0A0FFE0A0A0FFD09890FFD09090FFD08880FFC07070FF
+            C07070FF0000000000000000D0A0A030D0A0A0FFF0C8D0FFD09890FFE0B0B0FF
+            F0C0C0FFF0B8B0FFF0B0B0FFE0B0B0FFE0A8B0FFE0A0A0FFD098A0FFD09090FF
+            D08880E0000000000000000000000000D0A0A030D0A0A0FFF0C8D0FFD09890FF
+            F0B8B0FFF0C8C0FFF0C0C0FFF0C0C0FFF0B8C0FFE0B0B0FFD0A8A0FFD0808090
+            C080801000000000000000000000000000000000D0A0A030D0A0A0FFF0C8D0FF
+            D09890FFF0C0C0FFE0C0C0FFE0C0C0FFD0A8B0FFC08080A0C080801000000000
+            000000000000000000000000000000000000000000000000D0A0A030D0A0A0FF
+            F0D0D0FFE0A0A0FFD0A8A0FFC08080A0C0808020000000000000000000000000
+            00000000000000000000000000000000000000000000000000000000D0A0A020
+            D09090D0C08080A0C08080200000000000000000000000000000000000000000
+            00000000FE039C41F8019C41F0009C41C0009C4180009C4100009C4100009C41
+            00009C4100009C4100009C4180009C41C0009C41E0009C41F0039C41F80F9C41
+            FC3F9C41}
+          OnClick = imgSearchClick
+        end
+        object edtSearch: TEdit
+          Left = 2
+          Top = 2
+          Width = 193
+          Height = 18
+          Anchors = [akLeft, akTop, akRight]
+          Ctl3D = False
+          ParentCtl3D = False
+          TabOrder = 0
+        end
+      end
     end
     object sbReportsPreview: TScrollBox
       Left = 228
@@ -224,7 +296,7 @@ object ReportsForm: TReportsForm
     Font.Charset = DEFAULT_CHARSET
     Font.Color = clWindowText
     Font.Height = -12
-    Font.Name = #24494#36719#38597#40657
+    Font.Name = 'Microsoft YaHei UI'
     Font.Style = []
     Bars = <
       item

+ 85 - 9
Forms/ReportsFrm.pas

@@ -62,6 +62,9 @@ type
     pnlReports: TPanel;
     BatchPrintXml: TPrintComXML;
     btnRMgr: TToolButton;
+    pnlSearch: TPanel;
+    imgSearch: TImage;
+    edtSearch: TEdit;
     procedure PreviewComXMLGetDataConnection(var ADOCon: TADOConnection);
     procedure xlbRealSizeClick(Sender: TObject);
     procedure xlbOnePageClick(Sender: TObject);
@@ -94,6 +97,9 @@ type
       var ADataset: TDataSet);
     procedure btnRMgrClick(Sender: TObject);
     procedure FormActivate(Sender: TObject);
+    procedure imgSearchClick(Sender: TObject);
+    procedure extvReportKeyDown(Sender: TObject; var Key: Word;
+      Shift: TShiftState);
   private
     FProjectData: TProjectData;
     FCurPage: Integer;
@@ -583,7 +589,10 @@ begin
       Node := extvReport.Items[iIndex];
       if Node.HasChildren or (Node.Checked <> csChecked) or (Node.Data = nil) then Continue;
       vTemplateNode := TTemplateNode(Node.Data);
-      sOutputFileName := sPath + ExtractSimpleFileName(vTemplateNode.FileName) + '.xls';
+      if IsExcel2010 then
+        sOutputFileName := sPath + ExtractSimpleFileName(vTemplateNode.FileName) + '.xlsx'
+      else
+        sOutputFileName := sPath + ExtractSimpleFileName(vTemplateNode.FileName) + '.xls';
       if FileExists(vTemplateNode.FileName) then
         PrintReport(vTemplateNode, False, True, sOutputFileName, GetTemplateXlsFileName);
     end;
@@ -596,8 +605,16 @@ var
   sFileName: string;
 begin
   sFileName := extvReport.Selected.Text;
-  if (PrintStartPage <= PrintEndPage) and SaveFile(sFileName, '.xls') then
-    ExportXlsReport(PrintStartPage, PrintEndPage, sFileName, PreviewComXML);
+  if IsExcel2010 then
+  begin
+    if (PrintStartPage <= PrintEndPage) and SaveFile(sFileName, '.xlsx') then
+      ExportXlsReport(PrintStartPage, PrintEndPage, sFileName, PreviewComXML);
+  end
+  else
+  begin
+    if (PrintStartPage <= PrintEndPage) and SaveFile(sFileName, '.xls') then
+      ExportXlsReport(PrintStartPage, PrintEndPage, sFileName, PreviewComXML);
+  end;
 end;
 
 procedure TReportsForm.AfterExport;
@@ -759,7 +776,7 @@ begin
       end;
     end else
     begin
-      if (DrawType = 3) or (DrawType = 5) then
+      if (DrawType = DRAW_TYPE_EXCEL_XML) or (DrawType = DRAW_TYPE_EXCEL) or (DrawType = DRAW_TYPE_EXCEL_OE) then
       begin
         contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3);
       end else if (isPrinting) then
@@ -773,8 +790,6 @@ begin
           contentFontRec.FontName := ReportConfig.ContentFont.Name;
           contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3);
         end;
-//        contentFontRec.FontName := 'Arial Narrow';
-//        contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3) * 7 div 6;
       end else
       begin
         if (dataType = DATA_TYPE_DOUBLE) or (dataType = DATA_TYPE_FLOAT) then
@@ -786,7 +801,6 @@ begin
           contentFontRec.FontName := ReportConfig.ContentFont.Name;
           contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3);
         end;
-//        contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3) * 4 div 3;
       end;
     end;
   end;
@@ -1339,7 +1353,8 @@ procedure TReportsForm.InitFormView;
 begin
   rdbtnA3.Checked := SameText(rdbtnA3.Caption, ReportConfig.PageSize);
   rdbtnA4.Checked := SameText(rdbtnA4.Caption, ReportConfig.PageSize);
-  SetPrinterPageSize(ReportConfig.PageSize);
+  SetPrinterPageSize(ReportConfig.PageSize);   
+  pnlSearch.Visible := _IsDebugView;
   if G_IsCloud then
   begin
     btnRMgr.Visible := True;
@@ -1465,7 +1480,10 @@ begin
       iCount := 1;
       repeat
       begin
-        sFileName := Format('%s[%d].xls', [ExtractSimpleFileName(AFileName), iCount]);
+        if IsExcel2010 then
+          sFileName := Format('%s[%d].xlsx', [ExtractSimpleFileName(AFileName), iCount])
+        else
+          sFileName := Format('%s[%d].xls', [ExtractSimpleFileName(AFileName), iCount]);
         ExportPagesXlsReport(iStartPage, iEndPage, sFileName);
         iStartPage := iStartPage + 20;
         iEndPage := Min(iEndPage + 20, PrintEndPage);
@@ -1630,4 +1648,62 @@ begin
   end;
 end;
 
+procedure TReportsForm.imgSearchClick(Sender: TObject);
+
+  function SearchAfter(const AText: string; vBegin: TExTreeNode): TExTreeNode;
+  var
+    vNext: TExTreeNode;
+  begin
+    Result := nil;
+    vNext := vBegin.GetNext;
+    while Assigned(vNext) and not Assigned(Result) do
+    begin
+      if (Pos(AText, vNext.Text) > 0) then
+        Result := vNext;
+      vNext := vNext.GetNext;
+    end;
+  end;
+
+  function SearchBegin(const AText: string; vEnd: TExTreeNode): TExTreeNode;
+  var
+    vPre: TExTreeNode;
+  begin
+    Result := nil;
+    vPre := extvReport.Items.GetFirstNode;
+    while (vPre <> vEnd) and not Assigned(Result) do
+    begin
+      if (Pos(AText, vPre.Text) > 0) then
+        Result := vPre;
+      vPre := vPre.GetNext;
+    end;
+  end;
+
+  procedure SearchReportTemplate(const AText: string);
+  var
+    vNode: TExTreeNode;
+  begin
+    vNode := SearchAfter(AText, extvReport.Selected);
+    if not Assigned(vNode) then
+      vNode := SearchBegin(AText, extvReport.Selected);
+    if Assigned(vNode) then
+    begin
+      extvReport.Selected := vNode;
+      extvReport.OnClick(extvReport);
+    end
+    else
+      WarningMessage(Format('未找到含关键字“%s”的报表,请缩短关键字后查询', [AText]));
+  end;
+
+begin
+  SearchReportTemplate(edtSearch.Text);
+end;
+
+procedure TReportsForm.extvReportKeyDown(Sender: TObject; var Key: Word;
+  Shift: TShiftState);
+begin
+  if (ssCtrl in Shift) and (ssShift in Shift) and (ssAlt in Shift)
+      and (Key in [67, 99]) then // 'c', 'C'
+    extvReport.FullCollapse;
+end;
+
 end.

+ 19 - 0
Forms/SelectOnlineSignPhaseFrm.pas

@@ -23,6 +23,7 @@ type
   end;
 
 function SelectOnlineSignPhase(var APhase: Integer; AProjectRec: TsdDataRecord): Boolean;
+function SelectEpurePhase(var APhase: Integer; AProjectRec: TsdDataRecord): Boolean;
 
 implementation
 
@@ -36,6 +37,24 @@ begin
   vSelectFrm := TSelectOnlineSignPhaseForm.Create(nil);
   try
     vSelectFrm.Init(AProjectRec);
+    vSelectFrm.lblHint.Caption := '只能对已审批完成的标段进行签署报表生成';
+    Result := vSelectFrm.ShowModal = mrOk;
+    if Result then
+      APhase := vSelectFrm.PhaseIndex;
+  finally
+    vSelectFrm.Free;
+  end;
+end;
+
+function SelectEpurePhase(var APhase: Integer; AProjectRec: TsdDataRecord): Boolean;
+var
+  vSelectFrm: TSelectOnlineSignPhaseForm;
+begin
+  Result := False;
+  vSelectFrm := TSelectOnlineSignPhaseForm.Create(nil);
+  try
+    vSelectFrm.Init(AProjectRec);
+    vSelectFrm.lblHint.Caption := '只能对已审批完成的标段进行报表生成';
     Result := vSelectFrm.ShowModal = mrOk;
     if Result then
       APhase := vSelectFrm.PhaseIndex;

+ 16 - 2
Forms/SignOnlineReportsFrm.dfm

@@ -1,6 +1,6 @@
 object SignOnlineReportsForm: TSignOnlineReportsForm
-  Left = 319
-  Top = 308
+  Left = 183
+  Top = 222
   AutoScroll = False
   ClientHeight = 644
   ClientWidth = 1295
@@ -538,6 +538,20 @@ object SignOnlineReportsForm: TSignOnlineReportsForm
       ButtonStyle = pbsNoFrame
       OnClick = pbGenerateClick
     end
+    object lblEpureHint: TLabel
+      Left = 9
+      Top = 16
+      Width = 204
+      Height = 16
+      Caption = #35831#36873#25321#38656#35201#28155#21152#33609#22270#30340#25253#34920
+      Font.Charset = ANSI_CHARSET
+      Font.Color = clRed
+      Font.Height = -16
+      Font.Name = #23435#20307
+      Font.Style = [fsBold]
+      ParentFont = False
+      Visible = False
+    end
     object cbFillZero: TCheckBox
       Left = 974
       Top = 20

+ 251 - 81
Forms/SignOnlineReportsFrm.pas

@@ -8,13 +8,15 @@ uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
   Dialogs, sdIDTree, sdDB, ComCtrls, ExtCtrls, VirtualTrees, PrintCom,
   PrintComXML, MScrollBox, StdCtrls, Buttons, PNGButton, ieview,
-  imageenview, jpeg;
+  imageenview, jpeg, ConditionalDefines;
 
 const
   crNext = -25;
   crPrevious = -26; 
   offset = 150;
 type
+  TUploadType = (utSign, utEpure);
+
   TSignOnlineReportsForm = class(TForm)
     tvReports: TTreeView;
     pnlBottom: TPanel;
@@ -29,6 +31,7 @@ type
     lblPages: TLabel;
     pbGenerate: TPNGButton;
     ImageEnView1: TImageEnView;
+    lblEpureHint: TLabel;
     procedure FormShow(Sender: TObject);
     procedure tvReportsClick(Sender: TObject);
     procedure PreviewComXMLContentDisplay(var contentFontRec: TFontRec;
@@ -67,6 +70,8 @@ type
 
     FTempPath: string;
 
+    FUploadType: TUploadType;
+    FLoadListUrl: string;
     FPostedSignReports: TSignReports;
 
     procedure OnViewMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
@@ -74,9 +79,13 @@ type
 
     function SafeReportName(var AName: string): Boolean;
 
+    procedure ExportReportPage(APage: Integer; const APageFileName: string);
     procedure ExportReports(const AFileName: string);
     procedure ExportPdfReports(const AFileName: string);
 
+    procedure GenerateSignReport;
+    procedure GenerateEpureReport;
+
     procedure LoadReportTemplates;
 
     procedure PreviewPage(AImage: TImage; APageIndex: Integer);
@@ -97,19 +106,25 @@ type
     destructor Destroy; override;
 
     procedure Init(AProjNode: TsdIDTreeNode; ASignPhase: Integer);
+    // 特性初始化
+    procedure InitForSign;
+    procedure InitForEpure;
 
     property ProjectData: TProjectData read FProjectData;
     property CurPage: Integer read FCurPage write SetCurPage;
   end;
 
+// 在线签署
 procedure SignOnline(AProjectNode: TsdIDTreeNode; ASignPhase: Integer);
+// 插入计量草图(中间计量)
+procedure EpureOnline(AProjectNode: TsdIDTreeNode; AEpurePhase: Integer);
 
 implementation
 
 uses
   UtilMethods, TemplateManagerHelper, Globals, AuditSelectFrm,
   ScFileArchiver, ZhAPI, PHPWebDm, imageenio, ReportPdfHelper,
-  mProgressFrm, RenameSignReportFrm, Math;
+  mProgressFrm, RenameSignReportFrm, Math, superobject, ProgressHintFrm;
 
 {$R *.dfm}
 
@@ -120,12 +135,27 @@ begin
   vSignForm := TSignOnlineReportsForm.Create(nil);
   try
     vSignForm.Init(AProjectNode, ASignPhase);
+    vSignForm.InitForSign;
     vSignForm.ShowModal;
   finally
     vSignForm.Free;
   end;
 end;
 
+procedure EpureOnline(AProjectNode: TsdIDTreeNode; AEpurePhase: Integer);
+var
+  vEpureForm: TSignOnlineReportsForm;
+begin
+  vEpureForm := TSignOnlineReportsForm.Create(nil);
+  try
+    vEpureForm.Init(AProjectNode, AEpurePhase);
+    vEpureForm.InitForEpure;
+    vEpureForm.ShowModal;
+  finally
+    vEpureForm.Free;
+  end;
+end;
+
 { TSignOnlineReportsForm }
 
 destructor TSignOnlineReportsForm.Destroy;
@@ -173,8 +203,6 @@ begin
 
   FTempPath := GetAppTempPath + IntToStr(AProjNode.ID) + '\';
   CreateDirectoryInDeep(FTempPath);
-
-  FPostedSignReports.LoadAllSignReports(PhPWeb.MeasureURL + 'sign/list', FWebTenderID, FSignPhase);
 end;
 
 procedure TSignOnlineReportsForm.LoadReportTemplates;
@@ -214,7 +242,7 @@ begin
     cbFillZero.Visible := Assigned(vTemplate);
     pnlPageControl.Visible := Assigned(vTemplate);
 
-    FPostedSignReports.LoadAllSignReports(PhPWeb.MeasureURL + 'sign/list', FWebTenderID, FSignPhase);
+    FPostedSignReports.LoadAllSignReports(PhPWeb.MeasureURL + FLoadListUrl, FWebTenderID, FSignPhase);
     lblAlreadyUpload.Visible := Assigned(vTemplate) and Assigned(FPostedSignReports.FindSignReport(FSignPhase, vTemplate.TemplateName));
 
     ReportTemplateManager.Current := vTemplate;
@@ -876,11 +904,26 @@ begin
         contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3);
       end else if (isPrinting) then
       begin
-        contentFontRec.FontName := 'Arial Narrow';
-        contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3) * 7 div 6;
+        if (dataType = DATA_TYPE_DOUBLE) or (dataType = DATA_TYPE_FLOAT) then
+        begin
+          contentFontRec.FontName := 'Arial Narrow';
+          contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3) * 7 div 6;
+        end else
+        begin
+          contentFontRec.FontName := ReportConfig.ContentFont.Name;
+          contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3);
+        end;
       end else
       begin
-        contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3) * 4 div 3;
+        if (dataType = DATA_TYPE_DOUBLE) or (dataType = DATA_TYPE_FLOAT) then
+        begin
+          contentFontRec.FontName := 'Arial Narrow';
+          contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3) * 4 div 3;
+        end else
+        begin
+          contentFontRec.FontName := ReportConfig.ContentFont.Name;
+          contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3);
+        end;
       end;
     end;
   end;
@@ -997,29 +1040,6 @@ begin
 end;
 
 procedure TSignOnlineReportsForm.ExportReports(const AFileName: string);
-
-  procedure ExportReportPage(APage: Integer; const APageFileName: string);
-  var
-    bmp: TBitmap;
-    img: TJPEGImage;
-  begin
-    bmp := TBitmap.Create;
-    img := TJPEGImage.Create;
-    try
-      bmp.Height := PreviewComXML.ReportSize.Y;
-      bmp.Width := PreviewComXML.ReportSize.X;
-      PreviewComXML.PrintPreviewCanvas(APage, 0, bmp.Canvas, False);
-
-      img.Assign(bmp);
-      img.CompressionQuality := 100;
-      img.Compress;
-      img.SaveToFile(APageFileName);
-    finally
-      bmp.Free;
-      img.Free;
-    end;
-  end;
-
 var
   ATempFolder: String;
   i: Integer;
@@ -1056,55 +1076,11 @@ begin
 end;
 
 procedure TSignOnlineReportsForm.pbGenerateClick(Sender: TObject);
-var
-  sReportName, sZipFile, sPdfFile, sErrorMessage: string;
-  vInFields, vInValues: array [0..5] of string;
-  vUpFileFields, vUpFileNames: array [0..1] of string;
 begin
-  if PreviewComXML.TotalPages > 200 then
-  begin
-    TipMessage('该报表不支持在线签署功能。');
-    Exit;
-  end;
-
-  sReportName := ReportTemplateManager.Current.TemplateName;
-  if SafeReportName(sReportName) then
-  begin
-    CreateProgress('上传中,请等待...');
-    vInFields[0] := 'project';
-    vInValues[0] := IntToStr(FWebProjectID);
-    vInFields[1] := 'tender';
-    vInValues[1] := IntToStr(FWebTenderID);
-    vInFields[2] := 'phaseno';
-    vInValues[2] := IntToStr(FSignPhase);
-    vInFields[3] := 'name';
-    vInValues[3] := sReportName;
-    vInFields[4] := 'ownuid';
-    vInValues[4] := IntToStr(PHPWeb.UserID);
-    vInFields[5] := 'widhei';
-    vInValues[5] := Format('%d_%d', [Round(PreviewComXML.ReportSizeDou.X * 10), Round(PreviewComXML.ReportSizeDou.Y * 10)]);
-
-    vUpFileFields[0] := 'upfile';
-    vUpFileNames[0] := GetTempFileName(FTempPath, '.zip');
-    ExportReports(vUpFileNames[0]);
-    vUpFileFields[1] := 'upspdf';
-    vUpFileNames[1] := GetTempFileName(FTempPath, '.pdf');
-    PdfHelper.ExportAllPages(PreviewComXML, vUpFileNames[1]);
-
-    if PHPWeb.UploadFiles('sign/create', vInFields, vInValues, vUpFileFields, vUpFileNames, sErrorMessage) then
-    begin
-      FPostedSignReports.AddSignReport(FSignPhase, ReportTemplateManager.Current.TemplateName, 234);
-      lblAlreadyUpload.Visible := True;
-
-      CloseProgress;
-      TipMessage('上传完成。');
-    end
-    else
-    begin
-      CloseProgress;
-      WarningMessage(Format('%s, 上传数据失败,请重试。', [sErrorMessage]));
-    end;
-  end;
+  if FUploadType = utSign then
+    GenerateSignReport
+  else if FUploadType = utEpure then
+    GenerateEpureReport;
 end;
 
 procedure TSignOnlineReportsForm.OnViewMouseMove(Sender: TObject;
@@ -1178,7 +1154,7 @@ begin
   Result := False;
   sOrgName := AName;
   iCount := 0;
-  FPostedSignReports.LoadAllSignReports(PhPWeb.MeasureURL + 'sign/list', FWebTenderID, FSignPhase);
+  FPostedSignReports.LoadAllSignReports(PhPWeb.MeasureURL + FLoadListUrl, FWebTenderID, FSignPhase);
   while Assigned(FPostedSignReports.FindSignReport(FSignPhase, AName)) do
   begin
     Inc(iCount);
@@ -1192,7 +1168,201 @@ end;
 procedure TSignOnlineReportsForm.cbFillZeroClick(Sender: TObject);
 begin
   PreviewComXML.FillZero := cbFillZero.Checked;
-  PreviewPage(TImage(FPreviewList.Items[0]), FCurPage);
+  if Assigned(FPreviewList) and (FPreviewList.Count > 0) then
+    PreviewPage(TImage(FPreviewList.Items[0]), FCurPage);
+end;
+
+procedure TSignOnlineReportsForm.InitForEpure;
+begin
+  Caption := '插入计量草图';
+  FUploadType := utEpure;
+  lblEpureHint.Visible := True;
+
+  FLoadListUrl := 'sign/list';
+  FPostedSignReports.LoadAllSignReports(PhPWeb.MeasureURL + FLoadListUrl, FWebTenderID, FSignPhase);
+end;
+
+procedure TSignOnlineReportsForm.InitForSign;
+begin
+  Caption := '在线签署';
+  FUploadType := utSign;
+  lblEpureHint.Visible := False;
+
+  FLoadListUrl := 'sign/list';
+  FPostedSignReports.LoadAllSignReports(PhPWeb.MeasureURL + FLoadListUrl, FWebTenderID, FSignPhase);
+end;
+
+procedure TSignOnlineReportsForm.GenerateEpureReport;
+
+  function CreateOnlineEpureReport(const AReportName: string; var AResult: string): Boolean;
+  var
+    sgsParam: TStrings;
+    sMessage: string;
+    iResult: Integer;
+  begin
+    Result := False;
+    sgsParam := TStringList.Create;
+    try
+      sgsParam.Add(Format('project=%d', [FWebProjectID]));
+      sgsParam.Add(Format('tender=%d', [FWebTenderID]));
+      sgsParam.Add(Format('phaseno=%d', [FSignPhase]));
+      sgsParam.Add(Format('name=%s', [AReportName]));
+      sgsParam.Add(Format('ownuid=%d', [PHPWeb.UserID]));
+      sgsParam.Add(Format('widhei=%d_%d', [Round(PreviewComXML.ReportSizeDou.X * 10), Round(PreviewComXML.ReportSizeDou.Y * 10)]));
+      sgsParam.Add(Format('totalnum=%d', [PreviewComXML.TotalPages]));
+
+      iResult := PHPWeb.UrlGet(PHPWeb.MeasureURL + 'intermediate/create', sgsParam, AResult);
+      case iResult of
+        0: WarningMessage('网络错误:' + AResult);
+        -1: WarningMessage('网络错误:无法连接到云端');
+      end;
+      Result := (iResult = 1) and (AResult <> '');
+    finally
+      sgsParam.Free;
+    end;
+  end;
+
+  function UploadEpureReport(const ASignid, AMd5_sign: string): Boolean;
+  var
+    ATempFolder, sFileName, sMessage: String;
+    vInFields, vInValues: array [0..1] of string;
+    vUpFileFields, vUpFileNames: array [0..0] of string;
+    i: Integer;
+  begin
+    Result := False;
+    ATempFolder := GenerateTempFolder(GetTempFilePath);
+    vInFields[0] := 'signid';
+    vInValues[0] := ASignid;
+    vInFields[1] := 'md5_sign';
+    vInValues[1] := AMd5_sign;
+    ShowProgressHint('正在上传数据...', PreviewComXML.TotalPages);
+    try
+      for i := 1 to PreviewComXML.TotalPages do
+      begin
+        sFileName := Format('%s\%d.jpg', [ATempFolder, i]);
+        ExportReportPage(i, sFileName);
+
+        vUpFileFields[0] := 'imediate';
+        vUpFileNames[0] := sFileName;
+
+        if not PHPWeb.UploadFiles('intermediate/upload', vInFields, vInValues, vUpFileFields, vUpFileNames, sMessage) then
+        begin
+          WarningMessage(sMessage);
+          Abort;
+        end;
+        UpdateProgressPosition(i);
+      end;
+      Result := True;
+    finally
+      CloseProgressHint;
+      DeleteFileOrFolder(ATempFolder);
+    end;
+  end;
+
+var
+  sReportName, sResult: string;
+  vJ: ISuperObject;
+begin
+  sReportName := ReportTemplateManager.Current.TemplateName;
+  if SafeReportName(sReportName) then
+  begin
+    if CreateOnlineEpureReport(sReportName, sResult) then
+    begin
+      try
+        vJ := SO(sResult);
+        if UploadEpureReport(vJ['signid'].AsString, vJ['md5_sign'].AsString) then
+          TipMessage('上传完成。');
+      finally
+        FPostedSignReports.AddSignReport(FSignPhase, ReportTemplateManager.Current.TemplateName, PHPWeb.UserID);
+        lblAlreadyUpload.Visible := True;
+        vJ := nil;
+      end;
+    end;
+  end;
+end;
+
+procedure TSignOnlineReportsForm.GenerateSignReport;
+var
+  sReportName, sZipFile, sPdfFile, sErrorMessage: string;
+  vInFields, vInValues: array [0..5] of string;
+  vUpFileFields, vUpFileNames: array [0..1] of string;
+begin
+  if not _IsDebugView and (PreviewComXML.TotalPages > 200) then
+  begin
+    TipMessage('该报表不支持在线签署功能。');
+    Exit;
+  end;
+
+  sReportName := ReportTemplateManager.Current.TemplateName;
+  if SafeReportName(sReportName) then
+  begin
+    CreateProgress('上传中,请等待...');
+    vInFields[0] := 'project';
+    vInValues[0] := IntToStr(FWebProjectID);
+    vInFields[1] := 'tender';
+    vInValues[1] := IntToStr(FWebTenderID);
+    vInFields[2] := 'phaseno';
+    vInValues[2] := IntToStr(FSignPhase);
+    vInFields[3] := 'name';
+    vInValues[3] := sReportName;
+    vInFields[4] := 'ownuid';
+    vInValues[4] := IntToStr(PHPWeb.UserID);
+    vInFields[5] := 'widhei';
+    vInValues[5] := Format('%d_%d', [Round(PreviewComXML.ReportSizeDou.X * 10), Round(PreviewComXML.ReportSizeDou.Y * 10)]);
+
+    vUpFileFields[0] := 'upfile';
+    vUpFileNames[0] := GetTempFileName(FTempPath, '.zip');
+    ExportReports(vUpFileNames[0]);
+    vUpFileFields[1] := 'upspdf';
+    vUpFileNames[1] := GetTempFileName(FTempPath, '.pdf');
+    PdfHelper.ExportAllPages(PreviewComXML, vUpFileNames[1]);
+
+    if PHPWeb.UploadFiles('sign/create', vInFields, vInValues, vUpFileFields, vUpFileNames, sErrorMessage) then
+    begin
+      FPostedSignReports.AddSignReport(FSignPhase, ReportTemplateManager.Current.TemplateName, PHPWeb.UserID);
+      lblAlreadyUpload.Visible := True;
+
+      CloseProgress;
+      TipMessage('上传完成。');
+    end
+    else
+    begin
+      CloseProgress;
+      WarningMessage(Format('%s, 上传数据失败,请重试。', [sErrorMessage]));
+    end;
+  end;
+end;
+
+procedure TSignOnlineReportsForm.ExportReportPage(APage: Integer;
+  const APageFileName: string);
+var
+  bmp, bmpCut: TBitmap;
+  img: TJPEGImage;
+  iCutHeight, iCutWidth, iCutTop, iCutLeft, iCutRight, iCutBottom: Integer;
+begin
+  bmp := TBitmap.Create;
+  bmpCut := TBitmap.Create;
+  img := TJPEGImage.Create;
+  try
+    bmp.Height := PreviewComXML.ReportSize.Y;
+    bmp.Width := PreviewComXML.ReportSize.X;
+    PreviewComXML.PrintPreviewCanvas(APage, 0, bmp.Canvas, False);
+
+    iCutHeight := Round(PreviewComXML.ReportSize.Y / 200);
+    iCutWidth := Round(PreviewComXML.ReportSize.X / 200);
+    bmpCut.Height := PreviewComXML.ReportSize.Y - iCutHeight * 2;
+    bmpCut.Width := PreviewComXML.ReportSize.X - iCutWidth * 2;
+    bmpCut.Canvas.CopyRect(Rect(0, 0, bmpCut.Width, bmpCut.Height), bmp.Canvas, Rect(iCutWidth, iCutHeight, bmp.Width - iCutWidth, bmp.Height - iCutHeight));
+
+    img.Assign(bmpCut);
+    img.CompressionQuality := 100;
+    img.Compress;
+    img.SaveToFile(APageFileName);
+  finally
+    bmpCut.Free;
+    bmp.Free;
+    img.Free;
+  end;
 end;
 
 end.

+ 9 - 0
Frames/BillsGatherFme.dfm

@@ -1243,6 +1243,10 @@ object BillsGatherFrame: TBillsGatherFrame
       item
         Item = MainForm.dxbtnLocateMeasureBills
         Visible = True
+      end
+      item
+        Item = MainForm.dxbtnLocateCompileBills
+        Visible = True
       end>
     UseOwnFont = False
     OnPopup = dxpmDetailGclPopup
@@ -1257,5 +1261,10 @@ object BillsGatherFrame: TBillsGatherFrame
       OnExecute = actnLocateMeasureBillsExecute
       OnUpdate = actnLocateMeasureBillsUpdate
     end
+    object actnLocateCompileBills: TAction
+      Caption = #23450#20301#33267#21488#36134#20998#35299
+      OnExecute = actnLocateCompileBillsExecute
+      OnUpdate = actnLocateCompileBillsUpdate
+    end
   end
 end

+ 17 - 0
Frames/BillsGatherFme.pas

@@ -36,6 +36,7 @@ type
     dxpmDetailGcl: TdxBarPopupMenu;
     alBillsGather: TActionList;
     actnLocateMeasureBills: TAction;
+    actnLocateCompileBills: TAction;
     procedure zgGclBillsCellGetColor(Sender: TObject; ACoord: TPoint;
       var AColor: TColor);
     procedure tobtnDetailGclClick(Sender: TObject);
@@ -44,11 +45,14 @@ type
     procedure actnLocateMeasureBillsUpdate(Sender: TObject);
     procedure zgDetailGclMouseDown(Sender: TObject; Button: TMouseButton;
       Shift: TShiftState; X, Y: Integer);
+    procedure actnLocateCompileBillsExecute(Sender: TObject);
+    procedure actnLocateCompileBillsUpdate(Sender: TObject);
   private
     FBillsGatherData: TBillsGatherData;
     FShowPhaseData: Boolean;
     FShowPriceChange: Boolean;
     FOnLocateMeasureBills: TLocateBillsEvent;
+    FOnLocateCompileBills: TLocateBillsEvent;
 
     procedure SetColumnVisible(const AColumn: string; AVisible: Boolean);
 
@@ -64,6 +68,7 @@ type
     property ShowPhaseData: Boolean read FShowPhaseData write SetShowPhaseData;
 
     property OnLocateMeasureBills: TLocateBillsEvent read FOnLocateMeasureBills write FOnLocateMeasureBills;
+    property OnLocateCompileBills: TLocateBillsEvent read FOnLocateCompileBills write FOnLocateCompileBills;
   end;
 
 implementation
@@ -204,6 +209,7 @@ end;
 procedure TBillsGatherFrame.dxpmDetailGclPopup(Sender: TObject);
 begin
   SetDxBtnAction(actnLocateMeasureBills, MainForm.dxbtnLocateMeasureBills);
+  SetDxBtnAction(actnLocateCompileBills, MainForm.dxbtnLocateCompileBills);
 end;
 
 procedure TBillsGatherFrame.actnLocateMeasureBillsExecute(Sender: TObject);
@@ -224,5 +230,16 @@ begin
     dxpmDetailGcl.PopupFromCursorPos;
 end;
 
+procedure TBillsGatherFrame.actnLocateCompileBillsExecute(Sender: TObject);
+begin
+  if Assigned(saDetailGcl.DataView.Current) and Assigned(FOnLocateCompileBills) then
+    FOnLocateCompileBills(saDetailGcl.DataView.Current.ValueByName('RelaBillsID').AsInteger);
+end;
+
+procedure TBillsGatherFrame.actnLocateCompileBillsUpdate(Sender: TObject);
+begin
+  TAction(Sender).Enabled := Assigned(saDetailGcl.DataView.Current) and Assigned(FOnLocateCompileBills);
+end;
+
 end.
 

+ 10 - 0
Frames/BillsMeasureFme.dfm

@@ -1073,6 +1073,11 @@ object BillsMeasureFrame: TBillsMeasureFrame
       end
       item
         BeginGroup = True
+        Item = MainForm.dxbtnLocateZJJL
+        Visible = True
+      end
+      item
+        BeginGroup = True
         Item = MainForm.dxbtnExportGridToExcel
         Visible = True
       end>
@@ -1109,6 +1114,11 @@ object BillsMeasureFrame: TBillsMeasureFrame
       Caption = #21462#28040#38544#34255
       OnExecute = actnCancelHiddenColExecute
     end
+    object actnLocateZJJL: TAction
+      Caption = #23450#20301#33267#20013#38388#35745#37327
+      OnExecute = actnLocateZJJLExecute
+      OnUpdate = actnLocateZJJLUpdate
+    end
   end
   object dxpmBillsCol: TdxBarPopupMenu
     BarManager = MainForm.dxBarManager

+ 25 - 0
Frames/BillsMeasureFme.pas

@@ -28,6 +28,7 @@ type
     dxpmBillsCol: TdxBarPopupMenu;
     actnHiddenCol: TAction;
     actnCancelHiddenCol: TAction;
+    actnLocateZJJL: TAction;
     procedure dxpmBillsPopup(Sender: TObject);
     procedure zgBillsMeasureMouseDown(Sender: TObject; Button: TMouseButton;
       Shift: TShiftState; X, Y: Integer);
@@ -57,6 +58,8 @@ type
     procedure dxpmBillsColPopup(Sender: TObject);
     procedure actnHiddenColExecute(Sender: TObject);
     procedure actnCancelHiddenColExecute(Sender: TObject);
+    procedure actnLocateZJJLExecute(Sender: TObject);
+    procedure actnLocateZJJLUpdate(Sender: TObject);
   private
     FBillsMeasureData: TBillsMeasureData;
     FShowPriceChange: Boolean;
@@ -68,6 +71,7 @@ type
     FShowAlias: Boolean;
 
     FColVisibleManager: TBM_ColVisibleManager;
+    FOnLocateZJJL: TLocateZJJLEvent;
 
     procedure ExpandMouseDown(AGridCell: TzjCell);
 
@@ -110,6 +114,7 @@ type
     property ShowAlias: Boolean read FShowAlias write SetShowAlias;
 
     property OnAfterSetBookmark: TBookmarkRefreshEvent read FOnAfterSetBookmark write FOnAfterSetBookmark;
+    property OnLocateZJJL: TLocateZJJLEvent read FOnLocateZJJL write FOnLocateZJJL;
     property BillsMeasureData: TBillsMeasureData read FBillsMeasureData;
   end;
 
@@ -145,6 +150,7 @@ begin
   SetDxBtnAction(actnCalculateAll, MainForm.dxbtnCalculateAll);
   SetDxBtnAction(actnExportGridToExcel, MainForm.dxbtnExportGridToExcel);
   SetDxBtnAction(actnSetStageBookmark, MainForm.dxbtnSetBookmark);
+  SetDxBtnAction(actnLocateZJJL, MainForm.dxbtnLocateZJJL);
 end;
 
 procedure TBillsMeasureFrame.zgBillsMeasureMouseDown(Sender: TObject;
@@ -754,4 +760,23 @@ begin
   Result := (iCol = stdBillsMeasure.VisibleCol('MemoStr'));
 end;
 
+procedure TBillsMeasureFrame.actnLocateZJJLExecute(Sender: TObject);
+var
+  vNode: TsdIDTreeNode;
+begin
+  vNode := FBillsMeasureData.FindNodeWithZJJL(FBillsMeasureData.BillsMeasureTree.Selected);
+  if Assigned(vNode) then
+  begin
+    if Assigned(OnLocateZJJL) then
+      FOnLocateZJJL(vNode.ID);
+  end
+  else
+    WarningMessage('该节点及相关节点,均无中间计量数据');
+end;
+
+procedure TBillsMeasureFrame.actnLocateZJJLUpdate(Sender: TObject);
+begin
+  TAction(Sender).Enabled := TProjectData(FBillsMeasureData.ProjectData).PhaseData.Active;
+end;
+
 end.

+ 2 - 1
Frames/ProjectFme.pas

@@ -210,7 +210,8 @@ uses
   PhaseData, BGLDm, MainFrm, ZhAPI, SearchDm, PHPWebDm, ActiveX,
   ConstUnit, MD5Unit, sdIDTree, sdDB, mProgressFrm, ConditionalDefines,
   ProjectCommands, ProjectProperty, CheckerMemoFrm, BillsMeasureDm,
-  ProgressHintFrm, mProgressProFrm, ReportManagerFrm, ScFileArchiverConsts;
+  ProgressHintFrm, mProgressProFrm, ReportManagerFrm,
+  ScFileArchiverConsts;
 
 {$R *.dfm}
 

+ 9 - 0
Frames/ProjectManagerFme.dfm

@@ -495,6 +495,11 @@ object ProjectManagerFrame: TProjectManagerFrame
       OnExecute = actnGuestExecute
       OnUpdate = actnGuestUpdate
     end
+    object actnEpure: TAction
+      Caption = #25554#20837#35745#37327#33609#22270
+      OnExecute = actnEpureExecute
+      OnUpdate = actnEpureUpdate
+    end
   end
   object dxpmProjectManager: TdxBarPopupMenu
     BarManager = MainForm.dxBarManager
@@ -533,6 +538,10 @@ object ProjectManagerFrame: TProjectManagerFrame
         Visible = True
       end
       item
+        Item = MainForm.dxbtnEpure
+        Visible = True
+      end
+      item
         Item = MainForm.dxbtnGuest
         Visible = True
       end

+ 52 - 0
Frames/ProjectManagerFme.pas

@@ -65,6 +65,7 @@ type
     sbChecker: TScrollBox;
     actnSignOnline: TAction;
     actnGuest: TAction;
+    actnEpure: TAction;
     procedure actnOpenExecute(Sender: TObject);
     procedure actnDeleteExecute(Sender: TObject);
     procedure zgProjectsMouseDown(Sender: TObject; Button: TMouseButton;
@@ -97,6 +98,8 @@ type
     procedure actnSignOnlineUpdate(Sender: TObject);
     procedure actnGuestExecute(Sender: TObject);
     procedure actnGuestUpdate(Sender: TObject);
+    procedure actnEpureExecute(Sender: TObject);
+    procedure actnEpureUpdate(Sender: TObject);
   private
     FProjectManagerData: TProjectManagerData;
 
@@ -135,6 +138,7 @@ type
     FCheckerFrames: TObjectList;
 
     FSignOnlineSwitch: Integer;
+    FEpureOnlineSwitch: Integer;
 
     function ReceiveFile(const AFileName: string; AIsReback: Boolean = False): Boolean;
     function ImportFile(const AFileName: string; AFileMD5: string = ''): Boolean;
@@ -166,6 +170,7 @@ type
     procedure OnLineChecker(AAr: TOVArr; var ABegin, AEnd: Integer; var AOnLineEndIsOwner: Boolean);
 
     procedure LoadSignOnlineSwitch;
+    procedure LoadEpureOnlineSwitch;
   public
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
@@ -204,6 +209,7 @@ begin
   SetDxBtnAction(actnRename, MainForm.dxbtnRename);
   SetDxBtnAction(actnSignOnline, MainForm.dxbtnSignOnline);
   SetDxBtnAction(actnGuest, MainForm.dxbtnGuest);
+  SetDxBtnAction(actnEpure, MainForm.dxbtnEpure);
 end;
 
 constructor TProjectManagerFrame.Create(AOwner: TComponent);
@@ -225,6 +231,7 @@ begin
     Application.HintHidePause := 60000;
 
     LoadSignOnlineSwitch;
+    LoadEpureOnlineSwitch;
 
     tobtnImport.Visible := False;
     stdProjects.TreeOptions := stdProjects.TreeOptions - [aoAllowUpLevel, aoAllowDownLevel];
@@ -1973,4 +1980,49 @@ begin
   Result := not UserIsChecker(PHPWeb.UserID);
 end;
 
+procedure TProjectManagerFrame.actnEpureExecute(Sender: TObject);
+var
+  iPhase: Integer;
+begin
+  LoadEpureOnlineSwitch;
+  if (FEpureOnlineSwitch = 0) then
+    WarningMessage('云端未开启插入计量草图功能。')
+  else if SelectEpurePhase(iPhase, stdProjects.IDTree.Selected.Rec) then
+    EpureOnline(stdProjects.IDTree.Selected, iPhase);
+end;
+
+procedure TProjectManagerFrame.LoadEpureOnlineSwitch;
+var
+  iResult: Integer;
+  sResult: string;
+begin
+  FEpureOnlineSwitch := 0;
+  iResult := PHPWeb.UrlGet(PhPWeb.MeasureURL + 'intermediate/switch', nil, sResult);
+  case iResult of
+    1: FEpureOnlineSwitch := StrToIntDef(sResult, 0);
+    0: WarningMessage('网络错误:' + sResult);
+    -1: WarningMessage('网络错误:无法连接到云端');
+  end;
+end;
+
+procedure TProjectManagerFrame.actnEpureUpdate(Sender: TObject);
+
+  function HasCompletePhase(ARec: TsdDataRecord): Boolean;
+  begin
+    if (ARec.ValueByName('PhaseCount').AsInteger > 1) then
+      Result := True
+    else if (ARec.ValueByName('PhaseCount').AsInteger < 1) then
+      Result := False
+    else
+      Result := ARec.ValueByName('AuditStatus').AsInteger = -1;
+  end;
+
+begin
+  TAction(Sender).Visible := G_IsCloud and (not IsGuest) and (stdProjects.IDTree.Selected.Rec.ValueByName('WebAuthorID').AsInteger = PHPWeb.UserID);
+  TAction(Sender).Enabled := (FEpureOnlineSwitch = 1) and
+       Assigned(stdProjects.IDTree.Selected) and
+      (stdProjects.IDTree.Selected.Rec.ValueByName('Type').AsInteger = 1) and
+      HasCompletePhase(stdProjects.IDTree.Selected.Rec);
+end;
+
 end.

+ 4 - 1
Units/DataBaseTables.pas

@@ -28,7 +28,7 @@ const
   {ProjectManagerData}
   {项目管理}
   SProjectsInfo = 'ProjectsInfo';
-  tdProjectsInfo: array [0..24] of TScFieldDef =(
+  tdProjectsInfo: array [0..26] of TScFieldDef =(
     (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
     (FieldName: 'ParentID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
     (FieldName: 'NextSiblingID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: False; ForceUpdate: False),
@@ -58,6 +58,9 @@ const
     (FieldName: 'FileName'; FieldType: ftString; Size: 100; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
     // 创建日期
     (FieldName: 'CreateDate'; FieldType: ftString; Size: 20; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 金额小数
+    (FieldName: 'CommonDigit'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    (FieldName: 'DealPayDigit'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
 
     // 关联网络用的ID。标段和文件夹都有
     (FieldName: 'WebID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),

+ 3 - 1
Units/ProjectData.pas

@@ -266,7 +266,7 @@ implementation
 uses UtilMethods, Globals, ProjectCommands, sdIDTree, StageDm,
   ZJJLDm, PHPWebDm, XMLDoc, XMLIntf, ConstUnit, PasswordInputFrm,
   mProgressProFrm, mDataRecord, ConditionalDefines, DbTreeImport,
-  StrUtils, sdProvider;
+  StrUtils, sdProvider, CalcDecimal;
 
 { TProjectData }
 
@@ -529,6 +529,8 @@ begin
   InfoRec.ValueByName('PhasePay').AsFloat := PhaseRec.ValueByName('PhasePay').AsFloat;
   InfoRec.ValueByName('PhaseCount').AsInteger := FProjProperties.PhaseCount;
   InfoRec.ValueByName('AuditStatus').AsInteger := FProjProperties.AuditStatus;
+  InfoRec.ValueByName('CommonDigit').AsInteger := FProjProperties.DecimalManager.Common.TotalPrice.Digit;
+  InfoRec.ValueByName('DealPayDigit').AsInteger := FProjProperties.DecimalManager.DealPay.TotalPrice.Digit;
   ProjectManager.Save;
 end;
 

+ 40 - 2
Units/ProjectProperty.pas

@@ -84,6 +84,12 @@ type
     FReportShowStateWithoutReply: Boolean;
     FReportShowStateText: string;
     FDealPhase: string;
+    FSLegal_2: string;
+    FCName_2: string;
+    FCDate_2: string;
+    FCLegal_2: string;
+    FSName_2: string;
+    FSDate_2: string;
 
     function GetDisplayFormat(ADigit: Integer): string;
 
@@ -165,20 +171,35 @@ type
     property BLegal: string read FBLegal write FBLegal;
     // 签订日期
     property BDate: string read FBDate write FBDate;
-    // 施工单位
+    // 施工单位: 后改为承包单位1
     // 名称
     property CName: string read FCName write FCName;
     // 法人代表
     property CLegal: string read FCLegal write FCLegal;
     // 签订日期
     property CDate: string read FCDate write FCDate;
-    // 监理单位
+    // 承包单位2
+    // 名称
+    property CName_2: string read FCName_2 write FCName_2;
+    // 法人代表
+    property CLegal_2: string read FCLegal_2 write FCLegal_2;
+    // 签订日期
+    property CDate_2: string read FCDate_2 write FCDate_2;
+    // 监理单位:改为监理单位1
     // 名称
     property SName: string read FSName write FSName;
     // 法人代表
     property SLegal: string read FSLegal write FSLegal;
     // 签订日期
     property SDate: string read FSDate write FSDate;
+    // 监理单位2
+    // 名称
+    property SName_2: string read FSName_2 write FSName_2;
+    // 法人代表
+    property SLegal_2: string read FSLegal_2 write FSLegal_2;
+    // 签订日期
+    property SDate_2: string read FSDate_2 write FSDate_2;
+
 
     {技术参数}
     // 公路等级
@@ -494,15 +515,26 @@ begin
   FDealName := GetStrPropertyDef('DealName', '');
   FDealIndex := GetStrPropertyDef('DealIndex', '');
   FDealType := GetStrPropertyDef('DealType', '');
+
   FBName := GetStrPropertyDef('BName', '');
   FBLegal := GetStrPropertyDef('BLegal', '');
   FBDate := GetStrPropertyDef('BDate', '');
+
   FCName := GetStrPropertyDef('CName', '');
   FCLegal := GetStrPropertyDef('CLegal', '');
   FCDate := GetStrPropertyDef('CDate', '');
+
+  FCName_2 := GetStrPropertyDef('CName_2', '');
+  FCLegal_2 := GetStrPropertyDef('CLegal_2', '');
+  FCDate_2 := GetStrPropertyDef('CDate_2', '');
+
   FSName := GetStrPropertyDef('SName', '');
   FSLegal := GetStrPropertyDef('SLegal', '');
   FSDate := GetStrPropertyDef('SDate', '');
+
+  FSName_2 := GetStrPropertyDef('SName_2', '');
+  FSLegal_2 := GetStrPropertyDef('SLegal_2', '');
+  FSDate_2 := GetStrPropertyDef('SDate_2', '');
 end;
 
 procedure TProjProperties.LoadTechParameters;
@@ -593,9 +625,15 @@ begin
   FPropertyInqurity.Value['CName'] := FCName;
   FPropertyInqurity.Value['CLegal'] := FCLegal;
   FPropertyInqurity.Value['CDate'] := FCDate;
+  FPropertyInqurity.Value['CName_2'] := FCName_2;
+  FPropertyInqurity.Value['CLegal_2'] := FCLegal_2;
+  FPropertyInqurity.Value['CDate_2'] := FCDate_2;
   FPropertyInqurity.Value['SName'] := FSName;
   FPropertyInqurity.Value['SLegal'] := FSLegal;
   FPropertyInqurity.Value['SDate'] := FSDate;
+  FPropertyInqurity.Value['SName_2'] := FSName_2;
+  FPropertyInqurity.Value['SLegal_2'] := FSLegal_2;
+  FPropertyInqurity.Value['SDate_2'] := FSDate_2;
 end;
 
 procedure TProjProperties.SaveTechParameters;

+ 14 - 1
Units/SignReports.pas

@@ -3,7 +3,7 @@ unit SignReports;
 interface
 
 uses
-  Classes, CslJson;
+  Classes, CslJson, superobject;
 
 type
   TSignReport = class
@@ -107,7 +107,20 @@ var
   vJ: TCslJson;
   sPhaseNo, sName, sOwnerID: string;
   iPhaseNo, iOwnerID: Integer;
+  //iSO: ISuperObject;
 begin
+  {*
+  try
+    iSO := SO(AStr);
+    sPhaseNo := iSO['phaseno'].AsString;
+    sName := iSO['name'].AsString;
+    sOwnerID := iSO['ownuid'].AsString;
+    if (sPhaseNo <> '') and TryStrToInt(sPhaseNo, iPhaseNo) and (sName <> '') and (sOwnerID <> '') and TryStrToInt(sOwnerID, iOwnerID) then
+      AddSignReport(iPhaseNo, sName, iOwnerID);
+  finally
+    iSO := nil;
+  end;
+  *}
   vJ := TCslJson.Create;
   try
     vJ.Text := AStr;

File diff suppressed because it is too large
+ 7502 - 0
Units/superobject/superobject.pas


File diff suppressed because it is too large
+ 1441 - 0
Units/superobject/superxmlparser.pas