소스 검색

Task #1558 BillsGather -- RelaXmj, Add Column: EndDealQuantity/EndQcQuantity/EndGatherQuantity/Percent

MaiXinRong 8 년 전
부모
커밋
4b8c2272f5
4개의 변경된 파일114개의 추가작업 그리고 3개의 파일을 삭제
  1. 16 1
      DataModules/BillsGatherDm.dfm
  2. 2 0
      DataModules/BillsGatherDm.pas
  3. 82 2
      Frames/BillsGatherFme.dfm
  4. 14 0
      Units/GclBillsGatherModel.pas

+ 16 - 1
DataModules/BillsGatherDm.dfm

@@ -435,7 +435,10 @@ object BillsGatherData: TBillsGatherData
       6F74616C5072696365094669656C644E616D650613456E64476174686572546F
       74616C50726963650844617461547970650206084461746153697A6502080549
       734B6579080F4E65656450726F636573734E616D650909507265636973696F6E
-      02000453697A6502000000}
+      02000453697A6502000001044E616D65060750657263656E74094669656C644E
+      616D65060750657263656E740844617461547970650206084461746153697A65
+      02080549734B6579080F4E65656450726F636573734E616D6509095072656369
+      73696F6E02000453697A6502000000}
   end
   object sdvDetailGclBills: TsdDataView
     Active = False
@@ -477,6 +480,18 @@ object BillsGatherData: TBillsGatherData
       end
       item
         FieldName = 'CurGatherQuantity'
+      end
+      item
+        FieldName = 'EndDealQuantity'
+      end
+      item
+        FieldName = 'EndQcQuantity'
+      end
+      item
+        FieldName = 'EndGatherQuantity'
+      end
+      item
+        FieldName = 'Percent'
       end>
     OnFilterRecord = sdvDetailGclBillsFilterRecord
     OnGetText = sdvGclBillsGetText

+ 2 - 0
DataModules/BillsGatherDm.pas

@@ -251,6 +251,8 @@ procedure TBillsGatherData.WriteGatherRecord(AGcls, AXmjs: TList);
       Rec.ValueByName('EndGatherQuantity').AsFloat := vDetailGcl.EndGatherQuantity;
       Rec.ValueByName('EndGatherTotalPrice').AsFloat := vDetailGcl.EndGatherTotalPrice;
 
+      Rec.ValueByName('Percent').AsFloat := vDetailGcl.Percent;
+
       Rec.ValueByName('AddDealQuantity').AsFloat := vDetailGcl.AddDealQuantity;
       Rec.ValueByName('AddDealTotalPrice').AsFloat := vDetailGcl.AddDealTotalPrice;
       Rec.ValueByName('AddQcQuantity').AsFloat := vDetailGcl.AddQcQuantity;

+ 82 - 2
Frames/BillsGatherFme.dfm

@@ -128,11 +128,12 @@ object BillsGatherFrame: TBillsGatherFrame
           Height = 172
           Options = [goRangeSelect, goRowSizing, goColSizing, goCellNotMaintainData, goFixedRowShowNo, goFixedColShowNo, goAlwaysShowSelection]
           OptionsEx = []
-          ColCount = 10
+          ColCount = 14
+          RowCount = 6
+          FixedRowCount = 2
           ShowGridLine = False
           DefaultColWidth = 73
           DefaultFixedColWidth = 25
-          DefaultFixedRowHeight = 35
           Selection.AlphaBlend = False
           Selection.TransparentColor = False
           FrozenCol = 0
@@ -239,6 +240,7 @@ object BillsGatherFrame: TBillsGatherFrame
       item
         Title.Caption = #39033#30446#33410#32534#21495
         Title.CaptionAcrossCols = '1'
+        Title.CaptionAcrossRows = 2
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
         Title.Font.Height = -12
@@ -256,6 +258,7 @@ object BillsGatherFrame: TBillsGatherFrame
       item
         Title.Caption = #26729#21495
         Title.CaptionAcrossCols = '1'
+        Title.CaptionAcrossRows = 2
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
         Title.Font.Height = -12
@@ -274,6 +277,7 @@ object BillsGatherFrame: TBillsGatherFrame
       item
         Title.Caption = #25968#37327
         Title.CaptionAcrossCols = '1'
+        Title.CaptionAcrossRows = 2
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
         Title.Font.Height = -12
@@ -292,6 +296,7 @@ object BillsGatherFrame: TBillsGatherFrame
       item
         Title.Caption = #26412#26399#23436#25104#35745#37327#25968#37327
         Title.CaptionAcrossCols = '1'
+        Title.CaptionAcrossRows = 2
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
         Title.Font.Height = -12
@@ -308,8 +313,79 @@ object BillsGatherFrame: TBillsGatherFrame
         ReadOnly = False
       end
       item
+        Title.Caption = #25130#27490#26412#26399'|'#21512#21516#35745#37327#25968#37327
+        Title.CaptionAcrossCols = '3'
+        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 = 'EndDealQuantity'
+        ReadOnly = False
+      end
+      item
+        Title.Caption = '|'#25968#37327#21464#26356#35745#37327
+        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 = 'EndQcQuantity'
+        ReadOnly = False
+      end
+      item
+        Title.Caption = '|'#23436#25104#35745#37327#25968#37327
+        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 = 'EndGatherQuantity'
+        ReadOnly = False
+      end
+      item
+        Title.Caption = #23436#25104#29575'(%)'
+        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 = taRightJustify
+        Font.Charset = GB2312_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = #23435#20307
+        Font.Style = []
+        FieldName = 'Percent'
+        Width = 80
+        ReadOnly = False
+      end
+      item
         Title.Caption = #21333#20301#24037#31243
         Title.CaptionAcrossCols = '1'
+        Title.CaptionAcrossRows = 2
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
         Title.Font.Height = -12
@@ -327,6 +403,7 @@ object BillsGatherFrame: TBillsGatherFrame
       item
         Title.Caption = #20998#37096#24037#31243
         Title.CaptionAcrossCols = '1'
+        Title.CaptionAcrossRows = 2
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
         Title.Font.Height = -12
@@ -344,6 +421,7 @@ object BillsGatherFrame: TBillsGatherFrame
       item
         Title.Caption = #20998#39033#24037#31243
         Title.CaptionAcrossCols = '1'
+        Title.CaptionAcrossRows = 2
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
         Title.Font.Height = -12
@@ -361,6 +439,7 @@ object BillsGatherFrame: TBillsGatherFrame
       item
         Title.Caption = #35745#37327#21333#20803
         Title.CaptionAcrossCols = '1'
+        Title.CaptionAcrossRows = 2
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
         Title.Font.Height = -12
@@ -378,6 +457,7 @@ object BillsGatherFrame: TBillsGatherFrame
       item
         Title.Caption = #22270'('#20876')'#21495
         Title.CaptionAcrossCols = '1'
+        Title.CaptionAcrossRows = 2
         Title.Font.Charset = GB2312_CHARSET
         Title.Font.Color = clWindowText
         Title.Font.Height = -12

+ 14 - 0
Units/GclBillsGatherModel.pas

@@ -86,6 +86,7 @@ type
     FPM_TotalPrice: Double;
 
     FLeafXmj: TLeafXmjNode;
+    function GetPercent: Double;
   public
     constructor Create(AID: Integer);
 
@@ -124,6 +125,8 @@ type
     property EndGatherQuantity: Double read FEndGatherQuantity write FEndGatherQuantity;
     property EndGatherTotalPrice: Double read FEndGatherTotalPrice write FEndGatherTotalPrice;
 
+    property Percent: Double read GetPercent;
+
     property AddDealQuantity: Double read FAddDealQuantity write FAddDealQuantity;
     property AddDealTotalPrice: Double read FAddDealTotalPrice write FAddDealTotalPrice;
     property AddQcQuantity: Double read FAddQcQuantity write FAddQcQuantity;
@@ -952,6 +955,17 @@ begin
   FID := AID;
 end;
 
+function TDetailGclNode.GetPercent: Double;
+var
+  fTotal: Double;
+begin
+  fTotal := abs(FQuantity + FEndQcQuantity);
+  if fTotal <> 0 then
+    Result := CommonRoundTo(abs(FEndGatherQuantity) / fTotal * 100, -2)
+  else
+    Result := 0;
+end;
+
 { TDetailBGLNode }
 
 constructor TDetailBGLNode.Create(AID: Integer);