Browse Source

Project Properties: ShowOverRange

MaiXinRong 8 years atrás
parent
commit
a5326de0d1

+ 40 - 3
Forms/ProjectPropertiesFrm.dfm

@@ -1,7 +1,7 @@
 object ProjectPropertiesForm: TProjectPropertiesForm
   Left = 663
   Top = 261
-  ActiveControl = leProjectName
+  ActiveControl = cbShowAlias
   BorderIcons = [biSystemMenu]
   BorderStyle = bsSingle
   Caption = #39033#30446#23646#24615
@@ -120,8 +120,8 @@ object ProjectPropertiesForm: TProjectPropertiesForm
     Top = 63
     Width = 530
     Height = 255
-    ActivePage = jpsPropertiesBase
-    ActivePageIndex = 0
+    ActivePage = jpsPropertiesView
+    ActivePageIndex = 2
     Align = alTop
     Caption = 'jpsProperties'
     object jpsPropertiesBase: TJimPage
@@ -1443,6 +1443,43 @@ object ProjectPropertiesForm: TProjectPropertiesForm
           TabOrder = 3
         end
       end
+      object pnlOverRange: TPanel
+        Left = 1
+        Top = 197
+        Width = 529
+        Height = 45
+        BevelOuter = bvNone
+        TabOrder = 6
+        object Label1: TLabel
+          Left = 7
+          Top = 5
+          Width = 48
+          Height = 12
+          Caption = #36229#35745#21151#33021
+          Font.Charset = ANSI_CHARSET
+          Font.Color = clBlue
+          Font.Height = -12
+          Font.Name = #23435#20307
+          Font.Style = []
+          ParentFont = False
+        end
+        object Panel2: TPanel
+          Left = 64
+          Top = 11
+          Width = 455
+          Height = 2
+          BevelOuter = bvLowered
+          TabOrder = 0
+        end
+        object cbShowOverRange: TCheckBox
+          Left = 40
+          Top = 26
+          Width = 121
+          Height = 17
+          Caption = #24213#33394#26631#32418#25552#31034
+          TabOrder = 1
+        end
+      end
     end
   end
   object xpm: TXPMenu

+ 6 - 0
Forms/ProjectPropertiesFrm.pas

@@ -132,6 +132,10 @@ type
     leCLegal_2: TLabeledEdit;
     leCDate_2: TLabeledEdit;
     lblConstructor_2: TLabel;
+    pnlOverRange: TPanel;
+    Label1: TLabel;
+    Panel2: TPanel;
+    cbShowOverRange: TCheckBox;
     procedure btnOkClick(Sender: TObject);
     procedure leContractPriceClick(Sender: TObject);
     procedure msbBaseMouseWheel(Sender: TObject; Shift: TShiftState;
@@ -250,6 +254,7 @@ begin
   cbShowBGLCode.Checked := FProjProperties.ShowBGLCode;
   cbShowDesignQuantity.Checked := FProjProperties.ShowDesignQuantity;
   cbShowAlias.Checked := FProjProperties.ShowAlias;
+  cbShowOverRange.Checked := FProjProperties.ShowOverRange;
 
   cbShowReportShading.Checked := FProjProperties.ShowReportShading;
   edtReportShading.Enabled := cbShowReportShading.Checked;
@@ -657,6 +662,7 @@ begin
   FProjProperties.ShowBGLCode := cbShowBGLCode.Checked;
   FProjProperties.ShowDesignQuantity := cbShowDesignQuantity.Checked;
   FProjProperties.ShowAlias := cbShowAlias.Checked;
+  FProjProperties.ShowOverRange := cbShowOverRange.Checked;
   // ˢнçÃæÏÔʾ
   FProjectFrame.RefreshColumnDisplay;
 end;

+ 1 - 1
Frames/BillsGatherFme.pas

@@ -193,7 +193,7 @@ begin
       AColor := $00646AFE;}
      if bSimilarBills then
        AColor := $0000FFFF; // »ÆÉ«
-     if CheckOverRange(ACoord.Y - zgGclBills.FixedRowCount) then
+     if TProjectData(FBillsGatherData.ProjectData).ProjProperties.ShowOverRange and CheckOverRange(ACoord.Y - zgGclBills.FixedRowCount) then
        AColor := $00505AFF; // ºìÉ«
   end;
 end;

+ 1 - 1
Frames/BillsMeasureFme.pas

@@ -243,7 +243,7 @@ begin
       AColor := $00A7FDFD;
   end;
   // 叶子节点,累计合同计量超过0号台账,整行数据的底色变为暗红提示用户
-  if not stnNode.HasChildren then
+  if TProjectData(FBillsMeasureData.ProjectData).ProjProperties.ShowOverRange and not stnNode.HasChildren then
   begin
     with stnNode.Rec do
     begin

+ 10 - 0
Units/ProjectProperty.pas

@@ -90,6 +90,7 @@ type
     FCLegal_2: string;
     FSName_2: string;
     FSDate_2: string;
+    FShowOverRange: Boolean;
 
     function GetDisplayFormat(ADigit: Integer): string;
 
@@ -134,6 +135,7 @@ type
     procedure SetReportShowState(const Value: Boolean);
     procedure SetReportShowStateText(const Value: string);
     procedure SetReportShowStateWithoutReply(const Value: Boolean);
+    procedure SetShowOverRange(const Value: Boolean);
   public
     constructor Create(AProjectData: TObject);
     destructor Destroy; override;
@@ -259,6 +261,7 @@ type
     property ShowBGLCode: Boolean read FShowBGLCode write SetShowBGLCode;
     property ShowDesignQuantity: Boolean read FShowDesignQuantity write SetShowDesignQuantity;
     property ShowAlias: Boolean read FShowAlias write SetShowAlias;
+    property ShowOverRange: Boolean read FShowOverRange write SetShowOverRange;
 
     property ShowReportShading: Boolean read FShowReportShading write SetShowReportShading;
     property ReportShading: string read FReportShading write SetReportShading;
@@ -553,6 +556,7 @@ begin
   FShowBGLCode := GetBoolPropertyDef('ShowBGLCode', True);
   FShowDesignQuantity := GetBoolPropertyDef('ShowDesignQuantity', False);
   FShowAlias := GetBoolPropertyDef('ShowAlias', False);
+  FShowOverRange := GetBoolPropertyDef('ShowOverRange', False);
 
   FShowReportShading := GetBoolPropertyDef('ShowReportShading', False);
   FReportShading := GetStrPropertyDef('ReportShading', '');
@@ -762,6 +766,12 @@ begin
   FPropertyInqurity.Value['ShowDesignQuantity'] := Value;
 end;
 
+procedure TProjProperties.SetShowOverRange(const Value: Boolean);
+begin
+  FShowOverRange := Value;
+  FPropertyInqurity.Value['ShowOverRange'] := Value;
+end;
+
 procedure TProjProperties.SetShowPriceChange(const Value: Boolean);
 begin
   FShowPriceChange := Value;