Przeglądaj źródła

分部分项工料,提示,含有未录入本期实耗工料的项目节

MaiXinRong 9 lat temu
rodzic
commit
d3b67bf2e3

+ 33 - 0
DataModules/LeafXmjGlDm.pas

@@ -42,6 +42,8 @@ type
 
     function LeafXmjGLRec(AXmjID, AGLID: Integer): TLeafXmjGlRecord;
 
+    function CheckWithoutUsedQuantity(AIndex: Integer): Boolean;
+
     procedure LoadLeafXmjGLs(AGLID: Integer; vGLs: TList);
 
     function AddLeafXmjGl(AXmjID, AGLID: Integer): TLeafXmjGlRecord;
@@ -458,4 +460,35 @@ begin
     GetDisplayText;
 end;
 
+function TLeafXmjGlData.CheckWithoutUsedQuantity(AIndex: Integer): Boolean;
+var
+  vRec: TsdDataRecord;
+  vIdx: TsdIndex;
+  iRec, iFirst, iLast: Integer;
+  Rec: TLeafXmjGlRecord;
+  StageRec: TStageLeafXmjGlRecord;
+begin
+  Result := False;
+  if AIndex < sddLeafXmj.RecordCount then
+  begin
+    vRec := sddLeafXmj.Records[AIndex];
+    vIdx := sddLeafXmjGL.FindIndex('idxXmj');
+    iFirst := vIdx.FindKeyIndex(vRec.ValueByName('ID').AsInteger);
+    iLast := vIdx.FindKeyLastIndex(vRec.ValueByName('ID').AsInteger);
+    if iFirst >= 0 then
+    begin
+      for iRec := iFirst to iLast do
+      begin
+        Rec := TLeafXmjGlRecord(vIdx.Records[iRec]);
+        StageRec := TStageLeafXmjGlRecord(Rec.StageRec);
+        if Assigned(StageRec) and (StageRec.Quantity.AsFloat <> 0) and (StageRec.UsedQuantity.AsFloat = 0) then
+        begin
+          Result := True;
+          Break;
+        end;
+      end;
+    end;
+  end;
+end;
+
 end.

+ 81 - 56
Forms/MainFrm.dfm

@@ -1101,13 +1101,39 @@ object MainForm: TMainForm
       Hint = #26174#31034#20840#37096
       Visible = ivAlways
     end
+    object dxbtnHighLightWithoutUsedQuantity: TdxBarButton
+      Caption = #26412#26399#23454#32791#26410#35760
+      Category = 0
+      Hint = #26412#26399#23454#32791#26410#35760
+      Visible = ivAlways
+    end
+    object dxsiHighLight: TdxBarSubItem
+      Caption = #25552#31034
+      Category = 0
+      Visible = ivAlways
+      ItemLinks = <
+        item
+          Item = dxbtnWithoutHighLight
+          Visible = True
+        end
+        item
+          Item = dxbtnHighLightWithoutUsedQuantity
+          Visible = True
+        end>
+    end
+    object dxbtnWithoutHighLight: TdxBarButton
+      Caption = #21462#28040#25552#31034
+      Category = 0
+      Hint = #21462#28040#25552#31034
+      Visible = ivAlways
+    end
   end
   object Images: TImageList
     DrawingStyle = dsTransparent
     Left = 408
     Top = 128
     Bitmap = {
-      494C010135003B00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
+      494C010136003B00040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
       000000000000360000002800000040000000F0000000010020000000000000F0
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
@@ -1239,129 +1265,129 @@ object MainForm: TMainForm
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       000000000000F4CFC400F3E6E30000000000F4DAD400F89F8800F4DAD4000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000FA7C5A00FF36
       0000FF360000FF360000F5C3B50000000000F5C3B500FF360000FF360000F988
-      6900000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      690000000000000000000000000000000000000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       000000000000000000000000000000000000000000000000000000000000FE41
       0E00FF360000FF360000F5C3B50000000000F3E6E300F7AC9800FC653D00FF36
-      0000FD592D000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      0000FD592D00000000000000000000000000000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000F9947900FF36
       0000FD4E1E00FF360000F5C3B50000000000000000000000000000000000FA7C
-      5A00FF360000F994790000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      5A00FF360000F99479000000000000000000000000FF000000FF000000FF0000
+      00FF000000FF000000FF5252FAFF0C0CF9FF0C0CF9FF5252FAFF000000FF0000
+      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       00000000000000000000000000000000000000000000F3E6E300FE410E00FD4E
       1E0000000000FA7C5A00F5C3B500000000000000000000000000000000000000
-      0000FD592D00FF360000F3E6E300000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      0000FD592D00FF360000F3E6E30000000000000000FF000000FF000000FF0000
+      00FF000000FF1010F9FF0000F9FF0000F9FF0000F9FF0000F9FF1010F9FF0000
+      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       00000000000000000000000000000000000000000000F7AB9700FF360000F6B7
       A6000000000000000000F3E6E300000000000000000000000000000000000000
-      0000F7AB9700FF360000F7AB9700000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      0000F7AB9700FF360000F7AB970000000000000000FF000000FF000000FF0000
+      00FF5252FAFF0000F9FF0000F9FF0000F9FF0000F9FF0000F9FF0000F9FF5252
+      FAFF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       00000000000000000000000000000000000000000000F9947900FF360000F4CF
       C400000000000000000000000000000000000000000000000000000000000000
-      0000F4CFC400FF360000F9947900000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      0000F4CFC400FF360000F994790000000000000000FF000000FF000000FF0000
+      00FF0E0EF9FF0000F9FF0000F9FF0000F9FF0000F9FF0000F9FF0000F9FF0C0C
+      F9FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       00000000000000000000000000000000000000000000F9947900FF360000F4CF
       C400000000000000000000000000000000000000000000000000000000000000
-      0000F4CFC400FF360000F9947900000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      0000F4CFC400FF360000F994790000000000000000FF000000FF000000FF0000
+      00FF0E0EF9FF0000F9FF0000F9FF0000F9FF0000F9FF0000F9FF0000F9FF0C0C
+      F9FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       00000000000000000000000000000000000000000000F7AB9700FF360000F7AB
       97000000000000000000000000000000000000000000F3E6E300000000000000
-      0000F7AB9700FF360000F7AB9700000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      0000F7AB9700FF360000F7AB970000000000000000FF000000FF000000FF0000
+      00FF5252FAFF0000F9FF0000F9FF0000F9FF0000F9FF0000F9FF0000F9FF5252
+      FAFF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       00000000000000000000000000000000000000000000F3E6E300FF360000FD59
       2D000000000000000000000000000000000000000000F5C3B500FA7C5A000000
-      0000FD4D1D00FE420F00F3E6E300000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      0000FD4D1D00FE420F00F3E6E30000000000000000FF000000FF000000FF0000
+      00FF000000FF1010F9FF0000F9FF0000F9FF0000F9FF0000F9FF1010F9FF0000
+      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000F9886900FF36
       0000FA7C5A0000000000000000000000000000000000F5C3B500FF360000FD4D
-      1D00FF360000F994790000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      1D00FF360000F99479000000000000000000000000FF000000FF000000FF0000
+      00FF000000FF000000FF5252FAFF0E0EF9FF0E0EF9FF5252FAFF000000FF0000
+      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       000000000000000000000000000000000000000000000000000000000000FD59
       2D00FF360000FC643C00F6B7A600F3E6E30000000000F5C3B500FF360000FF36
-      0000FE420F000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      0000FE420F00000000000000000000000000000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       000000000000000000000000000000000000000000000000000000000000F3E6
       E300F9896A00FF360000FF360000F5C3B50000000000F5C3B500FF360000FF36
-      0000FF360000FA7C5A0000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      0000FF360000FA7C5A000000000000000000000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       000000000000F4DAD400F8A08900F4DAD40000000000F3E6E300F5C4B6000000
+      000000000000000000000000000000000000000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
+      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
@@ -3035,11 +3061,11 @@ object MainForm: TMainForm
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000FFFF000000000000F91F000000000000
-      C10F000000000000E107000000000000C1E300000000000089F1000000000000
-      8DF10000000000008FF10000000000008FF10000000000008FB1000000000000
-      8F91000000000000C783000000000000E087000000000000E083000000000000
-      F89F000000000000FFFF000000000000FFFF0000F00FF00FFFFF0000C007C007
+      00000000000000000000000000000000FFFFFFFF00000000F91FFFFF00000000
+      C10FFFFF00000000E107FFFF00000000C1E3FC3F0000000089F1F81F00000000
+      8DF1F00F000000008FF1F00F000000008FF1F00F000000008FB1F00F00000000
+      8F91F81F00000000C783FC3F00000000E087FFFF00000000E083FFFF00000000
+      F89FFFFF00000000FFFFFFFF00000000FFFF0000F00FF00FFFFF0000C007C007
       800100008003800300000000800180013FFC000000000000000C000000000000
       0084000000000000008400000000000000000000000000000000000000000000
       00000000000000003FFC00000000000000000000800180010001000080038003
@@ -3091,8 +3117,7 @@ object MainForm: TMainForm
       00008001C001001F00008001C001000F00008001C001000F00008001C001000F
       00008001C001000700008001C001000700008001C001000300008001C0010003
       000080018001000100008001800107C3000080018001FFC700008001C003FF87
-      00008001C007FF0FFFFF8001C00FFC3F00000000000000000000000000000000
-      000000000000}
+      00008001C007FF0FFFFF8001C00FFC3F}
   end
   object ActionManager1: TActionManager
     Images = Images

+ 3 - 0
Forms/MainFrm.pas

@@ -163,6 +163,9 @@ type
     dxbtnFilterCur: TdxBarButton;
     dxbtnFilterEnd: TdxBarButton;
     dxbtnWithoutFilter: TdxBarButton;
+    dxbtnHighLightWithoutUsedQuantity: TdxBarButton;
+    dxsiHighLight: TdxBarSubItem;
+    dxbtnWithoutHighLight: TdxBarButton;
     procedure FormCreate(Sender: TObject);
     procedure FormDestroy(Sender: TObject);
     procedure jtsProjectsChange(Sender: TObject; NewTab: Integer;

+ 36 - 1
Frames/LeafXmjGlFme.dfm

@@ -11,7 +11,7 @@ object LeafXmjGlFrame: TLeafXmjGlFrame
     Height = 392
     Options = [goRangeSelect, goRowSizing, goColSizing, goCellNotMaintainData, goFixedRowShowNo, goFixedColShowNo, goAlwaysShowSelection]
     OptionsEx = []
-    ColCount = 9
+    ColCount = 10
     RowCount = 6
     FixedRowCount = 2
     ShowGridLine = False
@@ -21,6 +21,7 @@ object LeafXmjGlFrame: TLeafXmjGlFrame
     Selection.TransparentColor = False
     FrozenCol = 0
     FrozenRow = 0
+    OnDrawCellText = zgLeafXmjDrawCellText
     OnMouseDown = zgLeafXmjMouseDown
     Align = alClient
   end
@@ -86,6 +87,25 @@ object LeafXmjGlFrame: TLeafXmjGlFrame
   object saLeafXmj: TsdGridDBA
     Columns = <
       item
+        Title.Caption = #25552#31034
+        Title.CaptionAcrossCols = '1'
+        Title.CaptionAcrossRows = 2
+        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 = 'Hint'
+        Width = 40
+        ReadOnly = True
+      end
+      item
         Title.Caption = #25152#23646#39033#30446#33410'|'#32534#21495
         Title.CaptionAcrossCols = '3'
         Title.Font.Charset = GB2312_CHARSET
@@ -510,6 +530,10 @@ object LeafXmjGlFrame: TLeafXmjGlFrame
       item
         Item = MainForm.dxbtnFilterLeafXmj
         Visible = True
+      end
+      item
+        Item = MainForm.dxsiHighLight
+        Visible = True
       end>
     UseOwnFont = False
     OnPopup = dxpmLeafXmjPopup
@@ -537,5 +561,16 @@ object LeafXmjGlFrame: TLeafXmjGlFrame
       OnExecute = actnFilterCurExecute
       OnUpdate = actnFilterCurUpdate
     end
+    object actnHighLightWithoutUsedQuantity: TAction
+      Tag = 1
+      Caption = #26412#26399#23454#32791#26410#35760
+      OnExecute = actnWithoutHighLightExecute
+      OnUpdate = actnWithoutHighLightUpdate
+    end
+    object actnWithoutHighLight: TAction
+      Caption = #21462#28040#25552#31034
+      OnExecute = actnWithoutHighLightExecute
+      OnUpdate = actnWithoutHighLightUpdate
+    end
   end
 end

+ 69 - 0
Frames/LeafXmjGlFme.pas

@@ -24,11 +24,18 @@ type
     actnFilterCur: TAction;
     actnFilterEnd: TAction;
     actnWithoutFilter: TAction;
+    actnHighLightWithoutUsedQuantity: TAction;
+    actnWithoutHighLight: TAction;
     procedure dxpmLeafXmjPopup(Sender: TObject);
     procedure actnFilterCurUpdate(Sender: TObject);
     procedure actnFilterCurExecute(Sender: TObject);
     procedure zgLeafXmjMouseDown(Sender: TObject; Button: TMouseButton;
       Shift: TShiftState; X, Y: Integer);
+    procedure zgLeafXmjDrawCellText(ACanvas: TCanvas; const ARect: TRect;
+      const ACoord: TPoint; AGrid: TZJGrid; const Text: String;
+      var ADefaultDraw: Boolean);
+    procedure actnWithoutHighLightExecute(Sender: TObject);
+    procedure actnWithoutHighLightUpdate(Sender: TObject);
   private
     FLeafXmjGlData: TLeafXmjGlData;
   public
@@ -72,6 +79,9 @@ begin
   SetDxBtnAction(actnWithoutFilter, MainForm.dxbtnWithoutFilter);
   SetDxBtnAction(actnFilterCur, MainForm.dxbtnFilterCur);
   SetDxBtnAction(actnFilterEnd, MainForm.dxbtnFilterEnd);
+
+  SetDxBtnAction(actnWithoutHighLight, MainForm.dxbtnWithoutHighLight);
+  SetDxBtnAction(actnHighLightWithoutUsedQuantity, MainForm.dxbtnHighLightWithoutUsedQuantity);
 end;
 
 procedure TLeafXmjGlFrame.actnFilterCurUpdate(Sender: TObject);
@@ -106,4 +116,63 @@ begin
   FLeafXmjGlData.RefreshLeafXmj;
 end;
 
+procedure TLeafXmjGlFrame.zgLeafXmjDrawCellText(ACanvas: TCanvas;
+  const ARect: TRect; const ACoord: TPoint; AGrid: TZJGrid;
+  const Text: String; var ADefaultDraw: Boolean);
+
+  procedure GetBitmap(var AImage: TBitmap);
+  begin
+    if (TProjectData(FLeafXmjGlData.ProjectData).ProjProperties.LeafXmjGlHighLight = 1) and
+      FLeafXmjGlData.CheckWithoutUsedQuantity(ACoord.Y - zgLeafXmj.FixedRowCount) then
+      MainForm.Images.GetBitmap(53, AImage)
+    else
+      AImage := nil;
+  end;
+
+const
+  rIconWidth = 16;
+  rIconHeight = 16;
+var
+  Img: TBitmap;
+  Cell: TZjCell;
+  rImg: TRect;
+begin
+  if (ACoord.X = 1) and (ACoord.Y > zgLeafXmj.FixedRowCount - 1) then
+  begin
+    Cell := zgLeafXmj.Cells[ACoord.X, ACoord.Y];
+    Img := TBitmap.Create;
+    try
+      GetBitmap(Img);
+      rImg := Rect(ARect.left + (ARect.Right - ARect.Left - rIconWidth) div 2,
+          ARect.Top + (ARect.Bottom - ARect.Top - rIconHeight) div 2,
+          ARect.left + (ARect.Right - ARect.Left - rIconWidth) div 2 + rIconWidth,
+          ARect.Bottom - (ARect.Bottom - ARect.Top - rIconHeight) div 2);
+      ACanvas.StretchDraw(rImg, Img);
+      ADefaultDraw := False;
+    finally
+      Img.Free;
+    end;
+  end;
+end;
+
+procedure TLeafXmjGlFrame.actnWithoutHighLightExecute(Sender: TObject);
+begin
+  TProjectData(FLeafXmjGlData.ProjectData).ProjProperties.LeafXmjGlHighLight := TAction(Sender).Tag;
+  zgLeafXmj.InvalidateCol(1);
+end;
+
+procedure TLeafXmjGlFrame.actnWithoutHighLightUpdate(Sender: TObject);
+begin
+  if TProjectData(FLeafXmjGlData.ProjectData).ProjProperties.LeafXmjGlHighLight = TAction(Sender).Tag then
+  begin
+    if TAction(Sender).ImageIndex <> 43 then
+      TAction(Sender).ImageIndex := 43;
+  end
+  else
+  begin
+    if TAction(Sender).ImageIndex <> -1 then
+      TAction(Sender).ImageIndex := -1;
+  end;
+end;
+
 end.

+ 11 - 0
Units/ProjectProperty.pas

@@ -80,6 +80,7 @@ type
     FBaseline: string;
     FDeadline: string;
     FLeafXmjGlFilterType: Integer;
+    FLeafXmjGlHighLight: Integer;
 
     function GetBoolPropertyDef(const AName: string; ADef: Boolean): Boolean;
     function GetIntPropertyDef(const AName: string; ADef: Integer): Integer;
@@ -126,6 +127,7 @@ type
     procedure SetBaseline(const Value: string);
     procedure SetDeadline(const Value: string);
     procedure SetleafXmjGlFilterType(const Value: Integer);
+    procedure SetLeafXmjGlHighLight(const Value: Integer);
   public
     constructor Create(AProjectData: TObject);
     destructor Destroy; override;
@@ -230,6 +232,8 @@ type
 
     // 0: 是否存在工料 1: 本期 2: 截至本期
     property LeafXmjGlFilterType: Integer read FLeafXmjGlFilterType write SetleafXmjGlFilterType;
+    // 0: 不高亮 1: 本期应耗存在,本期实耗未记
+    property LeafXmjGlHighLight: Integer read FLeafXmjGlHighLight write SetLeafXmjGlHighLight;
 
     property ShowReportShading: Boolean read FShowReportShading write SetShowReportShading;
     property ReportShading: string read FReportShading write SetReportShading;
@@ -500,6 +504,7 @@ begin
   FShowAlias := GetBoolPropertyDef('ShowAlias', False);
 
   FLeafXmjGlFilterType := GetIntPropertyDef('LeafXmjGlFilterType', 0);
+  FLeafXmjGlHighLight := GetIntPropertyDef('LeafXmjGlHighLight', 0);
 
   FShowReportShading := GetBoolPropertyDef('ShowReportShading', False);
   FReportShading := GetStrPropertyDef('ReportShading', '');
@@ -615,6 +620,12 @@ begin
   FPropertyInqurity.Value['LeafXmjGlFilterType'] := Value;
 end;
 
+procedure TProjProperties.SetLeafXmjGlHighLight(const Value: Integer);
+begin
+  FLeafXmjGlHighLight := Value;
+  FPropertyInqurity.Value['LeafXmjGlHighLight'] := Value;
+end;
+
 procedure TProjProperties.SetLockedLedgerData(const Value: Boolean);
 begin
   FLockedLedgerData := Value;