浏览代码

1 Bug #847 已被应用的调差工料,应不可删除
2 全部的界面,单位列,修改字体为“smartSimSun”

MaiXinRong 9 年之前
父节点
当前提交
235cc74b39

+ 1 - 0
DataModules/ProjectGLDm.dfm

@@ -13,6 +13,7 @@ object ProjectGLData: TProjectGLData
     Active = False
     Provider = sdpProjectGL
     AfterAddRecord = sddProjectGLAfterAddRecord
+    BeforeDeleteRecord = sddProjectGLBeforeDeleteRecord
     BeforeValueChange = sddProjectGLBeforeValueChange
     AfterValueChanged = sddProjectGLAfterValueChanged
     OnGetRecordClass = sddProjectGLGetRecordClass

+ 10 - 0
DataModules/ProjectGLDm.pas

@@ -19,6 +19,8 @@ type
     procedure sddProjectGLGetRecordClass(var ARecordClass: TsdRecordClass);
     procedure sdvProjectGLSetText(var Text: String; ARecord: TsdDataRecord;
       AValue: TsdValue; AColumn: TsdViewColumn; var Allow: Boolean);
+    procedure sddProjectGLBeforeDeleteRecord(ARecord: TsdDataRecord;
+      var Allow: Boolean);
   private
     FProjectData: TObject;
     FTempGLs: TList;
@@ -553,4 +555,12 @@ begin
   Result := FTempGLs.Count > 0;
 end;
 
+procedure TProjectGLData.sddProjectGLBeforeDeleteRecord(
+  ARecord: TsdDataRecord; var Allow: Boolean);
+begin
+  Allow := not CheckApplied(ARecord.ValueByName('ID').AsInteger);
+  if not Allow then
+    ErrorMessage('工料已被应用,不可删除。');
+end;
+
 end.

+ 6 - 0
Forms/BatchInsertBillsFrm.dfm

@@ -106,6 +106,8 @@ object BatchInsertBillsForm: TBatchInsertBillsForm
           DefaultFixedColWidth = 25
           Selection.AlphaBlend = False
           Selection.TransparentColor = False
+          FrozenCol = 0
+          FrozenRow = 0
           OnCellTextChanged = zgPositionCellTextChanged
           OnCustomPaste = zgPositionCustomPaste
           OnMouseDown = zgPositionMouseDown
@@ -153,6 +155,8 @@ object BatchInsertBillsForm: TBatchInsertBillsForm
           DefaultFixedColWidth = 60
           Selection.AlphaBlend = False
           Selection.TransparentColor = False
+          FrozenCol = 0
+          FrozenRow = 0
           OnCellTextChanged = zgBillsCellTextChanged
           OnMouseDown = zgPositionMouseDown
         end
@@ -257,6 +261,8 @@ object BatchInsertBillsForm: TBatchInsertBillsForm
         DefaultFixedColWidth = 25
         Selection.AlphaBlend = False
         Selection.TransparentColor = False
+        FrozenCol = 0
+        FrozenRow = 0
         OnMouseDown = zgDealBillsMouseDown
       end
       object pnlDealBillsSpr: TPanel

+ 1 - 0
Forms/BatchInsertBillsFrm.pas

@@ -338,6 +338,7 @@ begin
       zgBills.Cells[2, Row].Align := gaCenterLeft;
       zgBills.Cells[3, Row].Text := Rec.ValueByName('Units').AsString;
       zgBills.Cells[3, Row].Align := gaCenterLeft;
+      zgBills.Cells[3, Row].Font.Name := 'smartSimSun';
       zgBills.Cells[4, Row].Text := Rec.ValueByName('Price').AsString;
       zgBills.Cells[4, Row].Align := gaCenterRight;
     end;

+ 3 - 3
Forms/BatchReplaceBillsFrm.dfm

@@ -7,12 +7,12 @@ object BatchReplaceBillsForm: TBatchReplaceBillsForm
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
-  Font.Height = -11
-  Font.Name = 'MS Sans Serif'
+  Font.Height = -12
+  Font.Name = 'smartSimSun'
   Font.Style = []
   OldCreateOrder = False
   PixelsPerInch = 96
-  TextHeight = 13
+  TextHeight = 12
   object pnlBills: TPanel
     Left = 0
     Top = 92

+ 1 - 1
Forms/SelectDetailGLsFrm.dfm

@@ -237,7 +237,7 @@ object SelectDetailGLsForm: TSelectDetailGLsForm
         Font.Charset = GB2312_CHARSET
         Font.Color = clWindowText
         Font.Height = -12
-        Font.Name = #23435#20307
+        Font.Name = 'smartSimSun'
         Font.Style = []
         FieldName = 'Units'
         Width = 45

+ 5 - 1
Frames/BGLFme.dfm

@@ -88,6 +88,8 @@ object BGLFrame: TBGLFrame
       DefaultFixedRowHeight = 25
       Selection.AlphaBlend = False
       Selection.TransparentColor = False
+      FrozenCol = 0
+      FrozenRow = 0
       OnMouseDown = zgBGBillsMouseDown
       Align = alClient
     end
@@ -123,6 +125,8 @@ object BGLFrame: TBGLFrame
         DefaultFixedRowHeight = 25
         Selection.AlphaBlend = False
         Selection.TransparentColor = False
+        FrozenCol = 0
+        FrozenRow = 0
         OnCopy = zgBGLCopy
         OnPaste = zgBGLPaste
         OnMouseDown = zgBGLMouseDown
@@ -345,7 +349,7 @@ object BGLFrame: TBGLFrame
         Font.Charset = GB2312_CHARSET
         Font.Color = clWindowText
         Font.Height = -12
-        Font.Name = #23435#20307
+        Font.Name = 'smartSimSun'
         Font.Style = []
         FieldName = 'Units'
         Width = 35

+ 1 - 1
Frames/BillsCompileFme.dfm

@@ -257,7 +257,7 @@ object BillsCompileFrame: TBillsCompileFrame
         Font.Charset = GB2312_CHARSET
         Font.Color = clWindowText
         Font.Height = -12
-        Font.Name = #23435#20307
+        Font.Name = 'smartSimSun'
         Font.Style = []
         FieldName = 'Units'
         Width = 55

+ 5 - 1
Frames/BillsGatherFme.dfm

@@ -40,6 +40,8 @@ object BillsGatherFrame: TBillsGatherFrame
       DefaultColWidth = 73
       Selection.AlphaBlend = False
       Selection.TransparentColor = False
+      FrozenCol = 0
+      FrozenRow = 0
       OnCellGetColor = zgBillsGatherCellGetColor
       Align = alClient
     end
@@ -97,6 +99,8 @@ object BillsGatherFrame: TBillsGatherFrame
       DefaultFixedRowHeight = 25
       Selection.AlphaBlend = False
       Selection.TransparentColor = False
+      FrozenCol = 0
+      FrozenRow = 0
       Align = alClient
     end
   end
@@ -173,7 +177,7 @@ object BillsGatherFrame: TBillsGatherFrame
         Font.Charset = GB2312_CHARSET
         Font.Color = clWindowText
         Font.Height = -12
-        Font.Name = #23435#20307
+        Font.Name = 'smartSimSun'
         Font.Style = []
         FieldName = 'Units'
         Width = 45

+ 1 - 1
Frames/BillsMeasureFme.dfm

@@ -218,7 +218,7 @@ object BillsMeasureFrame: TBillsMeasureFrame
         Font.Charset = GB2312_CHARSET
         Font.Color = clWindowText
         Font.Height = -12
-        Font.Name = #23435#20307
+        Font.Name = 'smartSimSun'
         Font.Style = []
         FieldName = 'Units'
         Width = 55

+ 3 - 1
Frames/DealBillsFme.dfm

@@ -26,6 +26,8 @@ object DealBillsFrame: TDealBillsFrame
       DefaultFixedColWidth = 25
       Selection.AlphaBlend = False
       Selection.TransparentColor = False
+      FrozenCol = 0
+      FrozenRow = 0
       OnMouseDown = zgDealBillsMouseDown
       Align = alClient
     end
@@ -107,7 +109,7 @@ object DealBillsFrame: TDealBillsFrame
         Font.Charset = GB2312_CHARSET
         Font.Color = clWindowText
         Font.Height = -12
-        Font.Name = #23435#20307
+        Font.Name = 'smartSimSun'
         Font.Style = []
         FieldName = 'Units'
         Width = 45

+ 1 - 1
Frames/PhaseCompareFme.dfm

@@ -104,7 +104,7 @@ object PhaseCompareFrame: TPhaseCompareFrame
         Font.Charset = GB2312_CHARSET
         Font.Color = clWindowText
         Font.Height = -12
-        Font.Name = #23435#20307
+        Font.Name = 'smartSimSun'
         Font.Style = []
         FieldName = 'Units'
         Width = 50

+ 2 - 2
Frames/PriceMarginBillsFme.dfm

@@ -254,7 +254,7 @@ object PriceMarginBillsFrame: TPriceMarginBillsFrame
         Font.Charset = GB2312_CHARSET
         Font.Color = clWindowText
         Font.Height = -12
-        Font.Name = #23435#20307
+        Font.Name = 'smartSimSun'
         Font.Style = []
         FieldName = 'Units'
         Width = 45
@@ -613,7 +613,7 @@ object PriceMarginBillsFrame: TPriceMarginBillsFrame
         Font.Charset = GB2312_CHARSET
         Font.Color = clWindowText
         Font.Height = -12
-        Font.Name = #23435#20307
+        Font.Name = 'smartSimSun'
         Font.Style = []
         FieldName = 'Units'
         Width = 45

+ 1 - 1
Frames/ProjectGLFme.dfm

@@ -77,7 +77,7 @@ object ProjectGLFrame: TProjectGLFrame
         Font.Charset = GB2312_CHARSET
         Font.Color = clWindowText
         Font.Height = -12
-        Font.Name = #23435#20307
+        Font.Name = 'smartSimSun'
         Font.Style = []
         FieldName = 'Units'
         Width = 45

+ 3 - 1
Frames/SearchFme.dfm

@@ -153,6 +153,8 @@ object SearchFrame: TSearchFrame
         DefaultFixedRowHeight = 35
         Selection.AlphaBlend = False
         Selection.TransparentColor = False
+        FrozenCol = 0
+        FrozenRow = 0
         OnMouseDown = zgSearchResultMouseDown
         Align = alClient
       end
@@ -227,7 +229,7 @@ object SearchFrame: TSearchFrame
         Font.Charset = GB2312_CHARSET
         Font.Color = clWindowText
         Font.Height = -12
-        Font.Name = #23435#20307
+        Font.Name = 'smartSimSun'
         Font.Style = []
         FieldName = 'Units'
         Width = 40

+ 3 - 1
Frames/StandardBillsFme.dfm

@@ -87,6 +87,8 @@ object StandardBillsFrame: TStandardBillsFrame
     DefaultFixedColWidth = 28
     Selection.AlphaBlend = False
     Selection.TransparentColor = False
+    FrozenCol = 0
+    FrozenRow = 0
     OnMouseDown = zgBillsMouseDown
     Align = alClient
   end
@@ -215,7 +217,7 @@ object StandardBillsFrame: TStandardBillsFrame
         Font.Charset = GB2312_CHARSET
         Font.Color = clWindowText
         Font.Height = -12
-        Font.Name = #23435#20307
+        Font.Name = 'smartSimSun'
         Font.Style = []
         FieldName = 'Unit'
         Width = 50