فهرست منبع

Task #1305 全额计量,新增数据&显示调整。

MaiXinRong 10 سال پیش
والد
کامیت
2f374a2b3f
5فایلهای تغییر یافته به همراه145 افزوده شده و 13 حذف شده
  1. 14 1
      DataModules/OtherMeasureOnceDm.dfm
  2. 61 7
      Frames/OtherMeasureFme.dfm
  3. 61 2
      Frames/OtherMeasureFme.pas
  4. 1 1
      Units/Connections.pas
  5. 8 2
      Units/DataBaseTables.pas

+ 14 - 1
DataModules/OtherMeasureOnceDm.dfm

@@ -47,7 +47,14 @@ object OtherMeasureOnceData: TOtherMeasureOnceData
       53697A6502000001044E616D65060D4372656174655374616765494409466965
       6C644E616D65060D437265617465537461676549440844617461547970650203
       084461746153697A6502040549734B6579080F4E65656450726F636573734E61
-      6D650909507265636973696F6E02000453697A6502000000}
+      6D650909507265636973696F6E02000453697A6502000001044E616D65060A49
+      73417070726F76616C094669656C644E616D65060A4973417070726F76616C08
+      44617461547970650205084461746153697A6502010549734B6579080F4E6565
+      6450726F636573734E616D650909507265636973696F6E02000453697A650200
+      0001044E616D65060A43616C6344657461696C094669656C644E616D65060A43
+      616C6344657461696C0844617461547970650218084461746153697A6503FF00
+      0549734B6579080F4E65656450726F636573734E616D65090950726563697369
+      6F6E02000453697A6502000000}
   end
   object sdvOnce: TsdDataView
     Active = False
@@ -71,6 +78,12 @@ object OtherMeasureOnceData: TOtherMeasureOnceData
       end
       item
         FieldName = 'OmDateTime'
+      end
+      item
+        FieldName = 'IsApproval'
+      end
+      item
+        FieldName = 'CalcDetail'
       end>
     OnGetText = sdvOnceGetText
     OnSetText = sdvOnceSetText

+ 61 - 7
Frames/OtherMeasureFme.dfm

@@ -104,7 +104,7 @@ object OtherMeasureFrame: TOtherMeasureFrame
           Height = 682
           Options = [goRangeSelect, goRowSizing, goColSizing, goCellNotMaintainData, goFixedRowShowNo, goFixedColShowNo, goAlwaysShowSelection]
           OptionsEx = []
-          ColCount = 7
+          ColCount = 9
           ShowGridLine = False
           DefaultColWidth = 73
           DefaultFixedColWidth = 35
@@ -113,7 +113,25 @@ object OtherMeasureFrame: TOtherMeasureFrame
           Selection.TransparentColor = False
           FrozenCol = 0
           FrozenRow = 0
+          OnGetCellText = zgOnceGetCellText
+          OnGetCellEditor = zgOnceGetCellEditor
+          OnEditorLoadCell = zgOnceEditorLoadCell
+          OnEditorSaveCell = zgOnceEditorSaveCell
           Align = alClient
+          object cbIsApproval: TComboBox
+            Left = 544
+            Top = 128
+            Width = 145
+            Height = 21
+            Ctl3D = False
+            ItemHeight = 13
+            ParentCtl3D = False
+            TabOrder = 2
+            Visible = False
+            Items.Strings = (
+              #26159
+              #21542)
+          end
         end
       end
     end
@@ -180,7 +198,24 @@ object OtherMeasureFrame: TOtherMeasureFrame
         ReadOnly = False
       end
       item
-        Title.Caption = #21517#31216
+        Title.Caption = #26102#38388
+        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 = 'OmDateTime'
+        ReadOnly = False
+      end
+      item
+        Title.Caption = #39033#30446
         Title.CaptionAcrossCols = '1'
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
@@ -198,7 +233,7 @@ object OtherMeasureFrame: TOtherMeasureFrame
         ReadOnly = False
       end
       item
-        Title.Caption = #31867#22411
+        Title.Caption = #25152#23646#31867#22411#65306#26032#24314'/'#20859#25252
         Title.CaptionAcrossCols = '1'
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
@@ -212,11 +247,11 @@ object OtherMeasureFrame: TOtherMeasureFrame
         Font.Name = #23435#20307
         Font.Style = []
         FieldName = 'MType'
-        Width = 80
+        Width = 135
         ReadOnly = False
       end
       item
-        Title.Caption = #37329#39069
+        Title.Caption = #21512#21516#37329#39069
         Title.CaptionAcrossCols = '1'
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
@@ -234,7 +269,25 @@ object OtherMeasureFrame: TOtherMeasureFrame
         ReadOnly = False
       end
       item
-        Title.Caption = #26085#26399
+        Title.Caption = #26159#21542#21521#20844#21496#25253#25209
+        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 = taCenter
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'IsApproval'
+        Width = 120
+        ReadOnly = False
+      end
+      item
+        Title.Caption = #25104#26412#27979#31639#35814#24773#65288#33509#26377#25991#20214#32534#21495#65292#35831#27880#26126#65289
         Title.CaptionAcrossCols = '1'
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
@@ -247,7 +300,8 @@ object OtherMeasureFrame: TOtherMeasureFrame
         Font.Height = -12
         Font.Name = #23435#20307
         Font.Style = []
-        FieldName = 'OmDateTime'
+        FieldName = 'CalcDetail'
+        Width = 230
         ReadOnly = False
       end
       item

+ 61 - 2
Frames/OtherMeasureFme.pas

@@ -5,7 +5,7 @@ interface
 uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
   Dialogs, JimPages, XPMenu, ComCtrls, ToolWin, ExtCtrls, sdGridDBA, ZJGrid,
-  ProjectData;
+  ProjectData, StdCtrls, ZJCells;
 
 type
   TOtherMeasureFrame = class(TFrame)
@@ -22,14 +22,23 @@ type
     zgOnce: TZJGrid;
     saOnce: TsdGridDBA;
     saPhase: TsdGridDBA;
+    cbIsApproval: TComboBox;
     procedure tobtnPhaseClick(Sender: TObject);
     procedure zgPhaseKeyDown(Sender: TObject; var Key: Word;
       Shift: TShiftState);
     procedure zgPhaseCellGetColor(Sender: TObject; ACoord: TPoint;
       var AColor: TColor);
+    procedure zgOnceGetCellEditor(Sender: TObject; ACoord: TPoint;
+      var AControl: TWinControl);
+    procedure zgOnceEditorLoadCell(Sender: TObject; ACoord: TPoint;
+      AControl: TWinControl);
+    procedure zgOnceEditorSaveCell(Sender: TObject; ACoord: TPoint;
+      AControl: TWinControl);
+    procedure zgOnceGetCellText(Sender: TObject; const ACoord: TPoint;
+      var Value: String; DisplayText: Boolean);
   private
     FProjectData: TProjectData;
-    { Private declarations }
+    function GetOnceVisbleColumn(const AColName: string): Integer;
   public
     constructor Create(AProjectData: TProjectData);
     destructor Destroy; override;
@@ -50,6 +59,8 @@ begin
   FProjectData := AProjectData;
   saPhase.DataView := FProjectData.OtherMeasurePhaseData.sdvPhase;
   saOnce.DataView := FProjectData.OtherMeasureOnceData.sdvOnce;
+
+  zgOnce.CellClass.Cols[GetOnceVisbleColumn('IsApproval')] := TZjComboCell;
 end;
 
 destructor TOtherMeasureFrame.Destroy;
@@ -96,4 +107,52 @@ begin
     AColor := clWindow;
 end;
 
+procedure TOtherMeasureFrame.zgOnceGetCellEditor(Sender: TObject;
+  ACoord: TPoint; var AControl: TWinControl);
+begin
+  if ACoord.X = GetOnceVisbleColumn('IsApproval') then
+    AControl := cbIsApproval;
+end;
+
+procedure TOtherMeasureFrame.zgOnceEditorLoadCell(Sender: TObject;
+  ACoord: TPoint; AControl: TWinControl);
+begin
+  if ACoord.X = GetOnceVisbleColumn('IsApproval') then
+  begin
+    cbIsApproval.ItemIndex := cbIsApproval.Items.IndexOf(zgOnce.Cells[ACoord.X, ACoord.Y].Text);
+    if cbIsApproval.Text = '' then
+      cbIsApproval.Text := '·ñ';
+  end;
+end;
+
+procedure TOtherMeasureFrame.zgOnceEditorSaveCell(Sender: TObject;
+  ACoord: TPoint; AControl: TWinControl);
+begin
+  if ACoord.X = GetOnceVisbleColumn('IsApproval') then
+  begin
+    if cbIsApproval.ItemIndex = 0 then
+      zgOnce.Cells[ACoord.X, ACoord.Y].Text := 'True'
+    else
+      zgOnce.Cells[ACoord.X, ACoord.Y].Text := 'False';
+  end;
+end;
+
+procedure TOtherMeasureFrame.zgOnceGetCellText(Sender: TObject;
+  const ACoord: TPoint; var Value: String; DisplayText: Boolean);
+begin
+  if (ACoord.X = GetOnceVisbleColumn('IsApproval')) and (ACoord.Y > 0) then
+  begin
+    if Value = 'True' then
+      Value := 'ÊÇ'
+    else
+      Value := '·ñ';
+  end;
+end;
+
+function TOtherMeasureFrame.GetOnceVisbleColumn(
+  const AColName: string): Integer;
+begin
+  Result := zgOnce.FixedColCount + saOnce.VisibleCol(AColName);
+end;
+
 end.

+ 1 - 1
Units/Connections.pas

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

+ 8 - 2
Units/DataBaseTables.pas

@@ -693,7 +693,7 @@ const
 
   {其他台账 -- 全额计量}
   SOtherMeasureOnce = 'OtherMeasureOnce';
-  tdOtherMeasureOnce: array [0..9] of TScFieldDef = (
+  tdOtherMeasureOnce: array [0..11] of TScFieldDef = (
     (FieldName: 'ID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: True; PrimaryKey: True; ForceUpdate: False),
     // 排序
     (FieldName: 'SerialNo'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
@@ -712,7 +712,13 @@ const
     // 创建审核人
     (FieldName: 'CreateStageID'; FieldType: ftInteger; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
     // 日期
-    (FieldName: 'OmDateTime'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
+    (FieldName: 'OmDateTime'; FieldType: ftString; Size: 50; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    {------------------- Begin 四川交投专用 ---------------------------}
+    // 是否向公司报批
+    (FieldName: 'IsApproval'; FieldType: ftBoolean; Size: 0; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False),
+    // 成本测算详情
+    (FieldName: 'CalcDetail'; FieldType: ftString; Size: 255; Precision: 0; NotNull: False; PrimaryKey: False; ForceUpdate: False)
+    {------------------- End   四川交投专用 ---------------------------}
   );
 
   {其他台账 -- 分期计量}