浏览代码

Merge branch 'master' of http://192.168.1.12:3000/maixinrong/measure

builder 8 年之前
父节点
当前提交
affbc7e062
共有 2 个文件被更改,包括 494 次插入0 次删除
  1. 425 0
      Frames/OtherMeasureFme.dfm
  2. 69 0
      Frames/OtherMeasureFme.pas

+ 425 - 0
Frames/OtherMeasureFme.dfm

@@ -0,0 +1,425 @@
+object OtherMeasureFrame: TOtherMeasureFrame
+  Left = 0
+  Top = 0
+  Width = 1120
+  Height = 703
+  TabOrder = 0
+  object pnlRelaXmjType: TPanel
+    Left = 0
+    Top = 0
+    Width = 1120
+    Height = 21
+    Align = alTop
+    BevelOuter = bvNone
+    TabOrder = 0
+    object tbToolsButton: TToolBar
+      Left = 0
+      Top = 0
+      Width = 146
+      Height = 21
+      Align = alLeft
+      AutoSize = True
+      ButtonHeight = 21
+      ButtonWidth = 73
+      Caption = 'tbToolsButton'
+      EdgeBorders = []
+      Flat = True
+      ShowCaptions = True
+      TabOrder = 0
+      object tobtnPhase: TToolButton
+        Left = 0
+        Top = 0
+        Caption = ' '#20998#26399#35745#37327
+        Down = True
+        ImageIndex = 0
+        Style = tbsCheck
+        OnClick = tobtnPhaseClick
+      end
+      object tobtnOnce: TToolButton
+        Tag = 1
+        Left = 73
+        Top = 0
+        Caption = '   '#20840#39069#35745#37327'   '
+        ImageIndex = 1
+        Style = tbsCheck
+        OnClick = tobtnPhaseClick
+      end
+    end
+  end
+  object pnlOtherMeasure: TPanel
+    Left = 0
+    Top = 21
+    Width = 1120
+    Height = 682
+    Align = alClient
+    BevelOuter = bvNone
+    TabOrder = 1
+    object jpsOtherMeasure: TJimPages
+      Left = 0
+      Top = 0
+      Width = 1120
+      Height = 682
+      ActivePage = jpsOtherMeasurePhase
+      ActivePageIndex = 0
+      Align = alClient
+      object jpsOtherMeasurePhase: TJimPage
+        Left = 0
+        Top = 0
+        Width = 1120
+        Height = 682
+        TabName = 'Phase'
+        Caption = #20998#26399
+        object zgPhase: TZJGrid
+          Left = 0
+          Top = 0
+          Width = 1120
+          Height = 682
+          Options = [goRangeSelect, goRowSizing, goColSizing, goCellNotMaintainData, goFixedRowShowNo, goFixedColShowNo, goAlwaysShowSelection]
+          OptionsEx = []
+          ColCount = 10
+          ShowGridLine = False
+          DefaultColWidth = 73
+          DefaultFixedColWidth = 35
+          DefaultFixedRowHeight = 25
+          Selection.AlphaBlend = False
+          Selection.TransparentColor = False
+          FrozenCol = 0
+          FrozenRow = 0
+          Align = alClient
+        end
+      end
+      object jpsOtherMeasureOnce: TJimPage
+        Left = 0
+        Top = 0
+        Width = 1120
+        Height = 682
+        TabName = 'Once'
+        Caption = #19968#27425
+        object zgOnce: TZJGrid
+          Left = 0
+          Top = 0
+          Width = 1120
+          Height = 682
+          Options = [goRangeSelect, goRowSizing, goColSizing, goCellNotMaintainData, goFixedRowShowNo, goFixedColShowNo, goAlwaysShowSelection]
+          OptionsEx = []
+          ColCount = 6
+          ShowGridLine = False
+          DefaultColWidth = 73
+          DefaultFixedColWidth = 35
+          DefaultFixedRowHeight = 25
+          Selection.AlphaBlend = False
+          Selection.TransparentColor = False
+          FrozenCol = 0
+          FrozenRow = 0
+          Align = alClient
+        end
+      end
+    end
+  end
+  object xpm: TXPMenu
+    DimLevel = 30
+    GrayLevel = 10
+    Font.Charset = DEFAULT_CHARSET
+    Font.Color = clMenuText
+    Font.Height = -12
+    Font.Name = #23435#20307
+    Font.Style = []
+    Color = clBtnFace
+    IconBackColor = clBtnFace
+    MenuBarColor = clBtnFace
+    SelectColor = 38640
+    SelectBorderColor = clHighlight
+    SelectFontColor = clMenuText
+    DisabledColor = clInactiveCaption
+    SeparatorColor = clBtnFace
+    CheckedColor = clHighlight
+    IconWidth = 24
+    DrawSelect = True
+    UseSystemColors = False
+    OverrideOwnerDraw = False
+    Gradient = False
+    FlatMenu = False
+    AutoDetect = True
+    XPControls = [xcToolbar]
+    Active = True
+    ControlUseTrueXPStyle = True
+    BtnRoundArc = 5
+    BtnOutLineBorderColor = 7552000
+    BtnInnerBorderMoveColor = 3257087
+    BtnInnerBorderFocusColor = 15183500
+    BtnSurfaceNormalColor = 16251903
+    BtnSurfaceDownColor = 14608359
+    BtnSurfaceBottomLineColor = 14608359
+    BtnSurfaceDownBottomLineColor = 15199215
+    RdoChkControlChkColor = 41472
+    ComboBoxChkColor = 9201994
+    ComboboxSurfaceMoveColor = 16771030
+    ControlDisabledBorderColor = 11913158
+    Left = 143
+    Top = 8
+  end
+  object saOnce: TsdGridDBA
+    Columns = <
+      item
+        Title.Caption = #32534#21495
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taLeftJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'Code'
+        ReadOnly = False
+      end
+      item
+        Title.Caption = #21517#31216
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taLeftJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'Name'
+        Width = 260
+        ReadOnly = False
+      end
+      item
+        Title.Caption = #31867#22411
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taLeftJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'MType'
+        Width = 80
+        ReadOnly = False
+      end
+      item
+        Title.Caption = #37329#39069
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taRightJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'TotalPrice'
+        Width = 80
+        ReadOnly = False
+      end
+      item
+        Title.Caption = #22791#27880
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taLeftJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'MemoStr'
+        Width = 130
+        ReadOnly = False
+      end>
+    Grid = zgOnce
+    ExtendRowCount = 3
+    Left = 320
+    Top = 168
+  end
+  object saPhase: TsdGridDBA
+    Columns = <
+      item
+        Title.Caption = #32534#21495
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taLeftJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'Code'
+        ReadOnly = False
+      end
+      item
+        Title.Caption = #21517#31216
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taLeftJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'Name'
+        Width = 260
+        ReadOnly = False
+      end
+      item
+        Title.Caption = #31867#22411
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taLeftJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'MType'
+        Width = 80
+        ReadOnly = False
+      end
+      item
+        Title.Caption = #21488#36134#37329#39069
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taRightJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'TotalPrice'
+        Width = 85
+        ReadOnly = False
+      end
+      item
+        Title.Caption = #25130#27490#19978#26399#37329#39069
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taRightJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'PreTotalPrice'
+        Width = 85
+        ReadOnly = True
+      end
+      item
+        Title.Caption = #26412#26399#37329#39069
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taRightJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'CurTotalPrice'
+        Width = 85
+        ReadOnly = False
+      end
+      item
+        Title.Caption = #25130#27490#26412#26399#37329#39069
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taRightJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'EndTotalPrice'
+        Width = 85
+        ReadOnly = True
+      end
+      item
+        Title.Caption = #32047#35745#37329#39069
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taRightJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'AddTotalPrice'
+        Width = 85
+        ReadOnly = True
+      end
+      item
+        Title.Caption = #22791#27880
+        Title.CaptionAcrossCols = '1'
+        Title.Font.Charset = GB2312_CHARSET
+        Title.Font.Color = clWindowText
+        Title.Font.Height = -12
+        Title.Font.Name = #23435#20307
+        Title.Font.Style = []
+        Alignment = taLeftJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'MemoStr'
+        Width = 130
+        ReadOnly = False
+      end>
+    Grid = zgPhase
+    ExtendRowCount = 3
+    Left = 224
+    Top = 168
+  end
+end

+ 69 - 0
Frames/OtherMeasureFme.pas

@@ -0,0 +1,69 @@
+unit OtherMeasureFme;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, JimPages, XPMenu, ComCtrls, ToolWin, ExtCtrls, sdGridDBA, ZJGrid,
+  ProjectData;
+
+type
+  TOtherMeasureFrame = class(TFrame)
+    pnlRelaXmjType: TPanel;
+    tbToolsButton: TToolBar;
+    tobtnPhase: TToolButton;
+    tobtnOnce: TToolButton;
+    xpm: TXPMenu;
+    pnlOtherMeasure: TPanel;
+    jpsOtherMeasure: TJimPages;
+    jpsOtherMeasurePhase: TJimPage;
+    jpsOtherMeasureOnce: TJimPage;
+    zgPhase: TZJGrid;
+    zgOnce: TZJGrid;
+    saOnce: TsdGridDBA;
+    saPhase: TsdGridDBA;
+    procedure tobtnPhaseClick(Sender: TObject);
+  private
+    FProjectData: TProjectData;
+    { Private declarations }
+  public
+    constructor Create(AProjectData: TProjectData);
+    destructor Destroy; override;
+
+    procedure ResetViewControl;
+  end;
+
+implementation
+
+{$R *.dfm}
+
+constructor TOtherMeasureFrame.Create(AProjectData: TProjectData);
+begin
+  inherited Create(nil);
+  FProjectData := AProjectData;
+  saPhase.DataView := FProjectData.OtherMeasurePhaseData.sdvPhase;
+  saOnce.DataView := FProjectData.OtherMeasureOnceData.sdvOnce;
+end;
+
+destructor TOtherMeasureFrame.Destroy;
+begin
+  inherited;
+end;
+
+procedure TOtherMeasureFrame.ResetViewControl;
+begin
+  saPhase.Columns.ColumnByName('CurTotalPrice').ReadOnly := TProjectData(FProjectData).StageDataReadOnly;
+  if TProjectData(FProjectData).AllowInsert then
+    saPhase.Options := [aoAllowInsert, aoAllowEdit, aoAllowDelete, aoAutoInsert, aoAllowUpMove, aoAllowDownMove]
+  else
+    saPhase.Options := [];
+end;
+
+procedure TOtherMeasureFrame.tobtnPhaseClick(Sender: TObject);
+begin
+  jpsOtherMeasure.ActivePageIndex := TToolButton(Sender).Tag;
+  tobtnPhase.Down := tobtnPhase.Tag = TToolButton(Sender).Tag;
+  tobtnOnce.Down := tobtnOnce.Tag = TToolButton(Sender).Tag;
+end;
+
+end.