Bladeren bron

Merge branch 'master' of http://192.168.1.41:3000/MaiXinRong/Measure

builder 5 jaren geleden
bovenliggende
commit
6648b86628

+ 2 - 2
DataModules/BillsCompileDm.pas

@@ -1298,7 +1298,7 @@ var
     sBillsJson = '"id": %d, "pid": %d, "order": %d, "full_path": "%s", "level": %d, "is_leaf" : %d, ' +
     sBillsJson = '"id": %d, "pid": %d, "order": %d, "full_path": "%s", "level": %d, "is_leaf" : %d, ' +
                  '"code": "%s", "b_code": "%s", "name": "%s", "unit": "%s"';
                  '"code": "%s", "b_code": "%s", "name": "%s", "unit": "%s"';
   begin
   begin
-    Result := Format(sBillsJson, [ANode.Rec.ID.AsInteger, ANode.Rec.ParentID.AsInteger, AOrder, AFullPath, ANode.Level, Integer(not ANode.HasChildren),
+    Result := Format(sBillsJson, [ANode.Rec.ID.AsInteger, ANode.Rec.ParentID.AsInteger, AOrder, AFullPath, ANode.Level + 1, Integer(not ANode.HasChildren),
          ANode.Rec.Code.AsString, ANode.Rec.B_Code.AsString, ANode.Rec.Name.AsString, ANode.Rec.Units.AsString]);
          ANode.Rec.Code.AsString, ANode.Rec.B_Code.AsString, ANode.Rec.Name.AsString, ANode.Rec.Units.AsString]);
   end;
   end;
 
 
@@ -1311,7 +1311,7 @@ var
     if AParentPath = '' then
     if AParentPath = '' then
       sNodePath := IntToStr(ANode.ID)
       sNodePath := IntToStr(ANode.ID)
     else
     else
-      sNodePath := AParentPath + '.' + IntToStr(ANode.ID);
+      sNodePath := AParentPath + '-' + IntToStr(ANode.ID);
 
 
     sgs.Strings[sgs.Count - 1] := sgs.Strings[sgs.Count - 1] + '{';
     sgs.Strings[sgs.Count - 1] := sgs.Strings[sgs.Count - 1] + '{';
     sgs.Add(Format('  %s', [AnsiToUtf8(GetNodeData(TBillsIDTreeNode(ANode), AOrder, sNodePath))]));
     sgs.Add(Format('  %s', [AnsiToUtf8(GetNodeData(TBillsIDTreeNode(ANode), AOrder, sNodePath))]));

+ 22 - 7
DataModules/BillsMeasureDm.pas

@@ -73,6 +73,7 @@ type
     function FindNodeWithZJJL(ANode: TsdIDTreeNode): TsdIDTreeNode;
     function FindNodeWithZJJL(ANode: TsdIDTreeNode): TsdIDTreeNode;
 
 
     procedure CalcMeasureFilter;
     procedure CalcMeasureFilter;
+    procedure ClearCurQcQty(ANode: TMeasureBillsIDTreeNode);
 
 
     // 计算 修改各期原报审核数据时,需对累计数据做增量
     // 计算 修改各期原报审核数据时,需对累计数据做增量
     procedure UpdateRecordDeal(ABillsID: Integer; AQuantity, ATotalPrice: Double);
     procedure UpdateRecordDeal(ABillsID: Integer; AQuantity, ATotalPrice: Double);
@@ -352,22 +353,28 @@ procedure TBillsMeasureData.sdvBillsMeasureSetText(var Text: String;
   var
   var
     vNode: TBillsIDTreeNode;
     vNode: TBillsIDTreeNode;
   begin
   begin
-    // 变更应选择变更令
-    if SameText(AField , 'Qc') or SameText(AField , 'Pc') then
-      Allow := SelectAndUpdateBGL(GetBillsID, AValue.Owner, StrToFloatDef(Text, 0), AField);
-    if not Allow then Exit;
-
     if CheckStringNull(Text) or CheckNumeric(Text) then
     if CheckStringNull(Text) or CheckNumeric(Text) then
     begin
     begin
+      Text := FloatToStr(QuantityRoundTo(StrToFloatDef(Text, 0)));
+
+      // 变更应选择变更令
+      if SameText(AField , 'Qc') or SameText(AField , 'Pc') then
+        Allow := SelectAndUpdateBGL(GetBillsID, AValue.Owner, StrToFloatDef(Text, 0), AField);
+      if not Allow then Exit;
+
       AValue.Owner.ValueByName(AField + 'Flag').AsInteger := 0;
       AValue.Owner.ValueByName(AField + 'Flag').AsInteger := 0;
       AValue.Owner.ValueByName(AField + 'Formula').AsString := '';
       AValue.Owner.ValueByName(AField + 'Formula').AsString := '';
-      Text := FloatToStr(QuantityRoundTo(StrToFloatDef(Text, 0)));
     end
     end
     else
     else
     begin
     begin
+      Text := FloatToStr(QuantityRoundTo(EvaluateExprs(Text)));
+      // 变更应选择变更令
+      if SameText(AField , 'Qc') or SameText(AField , 'Pc') then
+        Allow := SelectAndUpdateBGL(GetBillsID, AValue.Owner, StrToFloatDef(Text, 0), AField);
+      if not Allow then Exit;
+
       AValue.Owner.ValueByName(AField + 'Flag').AsInteger := 1;
       AValue.Owner.ValueByName(AField + 'Flag').AsInteger := 1;
       AValue.Owner.ValueByName(AField + 'Formula').AsString := Text;
       AValue.Owner.ValueByName(AField + 'Formula').AsString := Text;
-      Text := FloatToStr(QuantityRoundTo(EvaluateExprs(Text)));
     end;
     end;
 
 
     ANode.Rec.SetIntValue(ANode.Rec.CalcType, 0);
     ANode.Rec.SetIntValue(ANode.Rec.CalcType, 0);
@@ -1261,4 +1268,12 @@ begin
   end;
   end;
 end;
 end;
 
 
+procedure TBillsMeasureData.ClearCurQcQty(ANode: TMeasureBillsIDTreeNode);
+begin
+  if not Assigned(ANode) or not Assigned(ANode.StageRec) then Exit;
+  if (ANode.StageRec.QcQuantity.AsFloat = 0) then Exit;
+  SelectAndUpdateBGL(ANode.ID, ANode.StageRec, 0, 'Qc');
+  ANode.StageRec.QcQuantity.Clear;
+end;
+
 end.
 end.

+ 2 - 3
DataModules/StandardBillsDm.pas

@@ -110,8 +110,7 @@ var
     sBillsJson = '"id": %d, "pid": %d, "order": %d, "full_path": "%s", "level": %d, "is_leaf" : %d, ' +
     sBillsJson = '"id": %d, "pid": %d, "order": %d, "full_path": "%s", "level": %d, "is_leaf" : %d, ' +
                  '"code": "%s", "b_code": "%s", "name": "%s", "unit": "%s"';
                  '"code": "%s", "b_code": "%s", "name": "%s", "unit": "%s"';
   begin
   begin
-    Result := Format(sBillsJson, [ANode.ID, ANode.Rec.ValueByName('ParentID').AsInteger, AOrder, AFullPath,
-         ANode.Rec.ValueByName('BillsLevel').AsInteger, Integer(not ANode.HasChildren),
+    Result := Format(sBillsJson, [ANode.ID, ANode.ParentID, AOrder, AFullPath, ANode.Level + 1, Integer(not ANode.HasChildren),
          ANode.Rec.ValueByName('Code').AsString, ANode.Rec.ValueByName('B_Code').AsString,
          ANode.Rec.ValueByName('Code').AsString, ANode.Rec.ValueByName('B_Code').AsString,
          ANode.Rec.ValueByName('Name').AsString, ANode.Rec.ValueByName('Unit').AsString]);
          ANode.Rec.ValueByName('Name').AsString, ANode.Rec.ValueByName('Unit').AsString]);
   end;
   end;
@@ -125,7 +124,7 @@ var
     if AParentPath = '' then
     if AParentPath = '' then
       sNodePath := IntToStr(ANode.ID)
       sNodePath := IntToStr(ANode.ID)
     else
     else
-      sNodePath := AParentPath + '.' + IntToStr(ANode.ID);
+      sNodePath := AParentPath + '-' + IntToStr(ANode.ID);
 
 
     sgs.Strings[sgs.Count - 1] := sgs.Strings[sgs.Count - 1] + '{';
     sgs.Strings[sgs.Count - 1] := sgs.Strings[sgs.Count - 1] + '{';
     sgs.Add(Format('  %s', [AnsiToUtf8(GetNodeData(ANode, AOrder, sNodePath))]));
     sgs.Add(Format('  %s', [AnsiToUtf8(GetNodeData(ANode, AOrder, sNodePath))]));

+ 1 - 1
Dprs/CSL/Measure_Cloud.cfg

@@ -31,7 +31,7 @@
 -M
 -M
 -$M16384,1048576
 -$M16384,1048576
 -K$00400000
 -K$00400000
--E"C:\Program Files (x86)\李뷘흡숭\셕좆連마 (데샙경+暾경) 1"
+-E"C:\Program Files (x86)\李뷘흡숭\李뷘써炬엄炬셕좆寧竟뺏흡숭(暾경)"
 -N"C:\DelphiTemp"
 -N"C:\DelphiTemp"
 -LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
 -LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
 -LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
 -LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"

+ 9 - 8
Dprs/CSL/Measure_Cloud.dof

@@ -90,7 +90,7 @@ MaxStackSize=1048576
 ImageBase=4194304
 ImageBase=4194304
 ExeDescription=
 ExeDescription=
 [Directories]
 [Directories]
-OutputDir=C:\Program Files (x86)\纵横软件\计量支付 (单机版+云版) 1
+OutputDir=C:\Program Files (x86)\纵横软件\纵横结算决算计量一体化软件(云版)
 UnitOutputDir=C:\DelphiTemp
 UnitOutputDir=C:\DelphiTemp
 PackageDLLOutputDir=
 PackageDLLOutputDir=
 PackageDCPOutputDir=
 PackageDCPOutputDir=
@@ -115,7 +115,7 @@ AutoIncBuild=0
 MajorVer=3
 MajorVer=3
 MinorVer=1
 MinorVer=1
 Release=7
 Release=7
-Build=2369
+Build=2246
 Debug=0
 Debug=0
 PreRelease=0
 PreRelease=0
 Special=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=936
 [Version Info Keys]
 [Version Info Keys]
 CompanyName=珠海纵横创新软件有限公司
 CompanyName=珠海纵横创新软件有限公司
 FileDescription=纵横结算决算计量一体化云版
 FileDescription=纵横结算决算计量一体化云版
-FileVersion=3.1.7.2369
+FileVersion=3.1.7.2246
 InternalName=
 InternalName=
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalCopyright=版权所有(C)珠海纵横创新软件有限公司2003-2016
 LegalTrademarks=Measure
 LegalTrademarks=Measure
@@ -149,8 +149,9 @@ Count=2
 Item0=C:\DelphiTemp
 Item0=C:\DelphiTemp
 Item1=..\..\Dcus
 Item1=..\..\Dcus
 [HistoryLists\hlOutputDirectorry]
 [HistoryLists\hlOutputDirectorry]
-Count=4
-Item0=C:\Program Files (x86)\纵横软件\计量支付 (单机版+云版) 1
-Item1=C:\Program Files (x86)\纵横软件\纵横结算决算计量一体化软件(云版)渭武
-Item2=D:\SmartCostExe\Measure\PWFree
-Item3=D:\SmartCostExe\Measure
+Count=5
+Item0=C:\Program Files (x86)\纵横软件\纵横结算决算计量一体化软件(云版)
+Item1=C:\Program Files (x86)\纵横软件\计量支付 (单机版+云版) 1
+Item2=C:\Program Files (x86)\纵横软件\纵横结算决算计量一体化软件(云版)渭武
+Item3=D:\SmartCostExe\Measure\PWFree
+Item4=D:\SmartCostExe\Measure

+ 3 - 1
Dprs/CSL/Measure_Cloud.dpr

@@ -248,7 +248,9 @@ uses
   AttachmentInfoDm in '..\..\DataModules\AttachmentInfoDm.pas' {AttachmentInfoData: TDataModule},
   AttachmentInfoDm in '..\..\DataModules\AttachmentInfoDm.pas' {AttachmentInfoData: TDataModule},
   DealPayFinalDm in '..\..\DataModules\DealPayFinalDm.pas' {DealPayFinalData: TDataModule},
   DealPayFinalDm in '..\..\DataModules\DealPayFinalDm.pas' {DealPayFinalData: TDataModule},
   rmWuJiuZqzfGatherDm in '..\..\DataModules\ReportMemoryDm\rmWuJiuZqzfGatherDm.pas' {rmWuJiuZqzfGatherData: TDataModule},
   rmWuJiuZqzfGatherDm in '..\..\DataModules\ReportMemoryDm\rmWuJiuZqzfGatherDm.pas' {rmWuJiuZqzfGatherData: TDataModule},
-  MScrollBox in '..\..\..\SmartCost\Components\MBaseControl\Source\MScrollBox.pas';
+  MScrollBox in '..\..\..\SmartCost\Components\MBaseControl\Source\MScrollBox.pas',
+  rmBGBillsGatherDm in '..\..\DataModules\ReportMemoryDm\rmBGBillsGatherDm.pas' {rmBGBillsGatherData: TDataModule},
+  rmBillsPhaseGatherDm in '..\..\DataModules\ReportMemoryDm\rmBillsPhaseGatherDm.pas' {rmBillsPhaseGatherData: TDataModule};
 
 
 {$R *.res}
 {$R *.res}
 
 

BIN
Dprs/CSL/Measure_Cloud.res


+ 3 - 2
Frames/BillsMeasureFme.dfm

@@ -64,6 +64,7 @@ object BillsMeasureFrame: TBillsMeasureFrame
       FrozenCol = 0
       FrozenCol = 0
       FrozenRow = 0
       FrozenRow = 0
       OnCurrentChanged = zgBillsMeasureCurrentChanged
       OnCurrentChanged = zgBillsMeasureCurrentChanged
+      OnCellCanEdit = zgBillsMeasureCellCanEdit
       OnCellButtonClick = zgBillsMeasureCellButtonClick
       OnCellButtonClick = zgBillsMeasureCellButtonClick
       OnCustomPaste = zgBillsMeasureCustomPaste
       OnCustomPaste = zgBillsMeasureCustomPaste
       OnCellGetColor = zgBillsMeasureCellGetColor
       OnCellGetColor = zgBillsMeasureCellGetColor
@@ -372,7 +373,7 @@ object BillsMeasureFrame: TBillsMeasureFrame
         Font.Style = []
         Font.Style = []
         FieldName = 'CurQcQuantity'
         FieldName = 'CurQcQuantity'
         Width = 60
         Width = 60
-        ReadOnly = False
+        ReadOnly = True
       end
       end
       item
       item
         Title.Caption = '|'#37329#39069
         Title.Caption = '|'#37329#39069
@@ -427,7 +428,7 @@ object BillsMeasureFrame: TBillsMeasureFrame
         Font.Style = []
         Font.Style = []
         FieldName = 'CurPcQuantity'
         FieldName = 'CurPcQuantity'
         Width = 60
         Width = 60
-        ReadOnly = False
+        ReadOnly = True
       end
       end
       item
       item
         Title.Caption = '|'#37329#39069
         Title.Caption = '|'#37329#39069

+ 24 - 7
Frames/BillsMeasureFme.pas

@@ -7,7 +7,7 @@ uses
   ColVisibleManager,
   ColVisibleManager,
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
   Dialogs, ZJGrid, ComCtrls, ToolWin, StdCtrls, ExtCtrls, sdGridDBA,
   Dialogs, ZJGrid, ComCtrls, ToolWin, StdCtrls, ExtCtrls, sdGridDBA,
-  sdGridTreeDBA, sdDB, ActnList, dxBar, sdIDTree, JimLabels;
+  sdGridTreeDBA, sdDB, ActnList, dxBar, sdIDTree, JimLabels, ZJCells;
 
 
 type
 type
   TBillsMeasureFrame = class(TFrame)
   TBillsMeasureFrame = class(TFrame)
@@ -61,6 +61,8 @@ type
     procedure actnLocateZJJLExecute(Sender: TObject);
     procedure actnLocateZJJLExecute(Sender: TObject);
     procedure actnLocateZJJLUpdate(Sender: TObject);
     procedure actnLocateZJJLUpdate(Sender: TObject);
     procedure actnCalculateAllUpdate(Sender: TObject);
     procedure actnCalculateAllUpdate(Sender: TObject);
+    procedure zgBillsMeasureCellCanEdit(Sender: TObject;
+      const ACoord: TPoint; var Allow: Boolean);
   private
   private
     FBillsMeasureData: TBillsMeasureData;
     FBillsMeasureData: TBillsMeasureData;
     FShowPriceChange: Boolean;
     FShowPriceChange: Boolean;
@@ -133,7 +135,7 @@ implementation
 
 
 uses
 uses
   MainFrm, ProjectFme, ProjectData, ExportExcel, BGLDm, BGLSelectFrm,
   MainFrm, ProjectFme, ProjectData, ExportExcel, BGLDm, BGLSelectFrm,
-  Types, ZhAPI, BillsTree, mDataRecord, ConditionalDefines;
+  Types, ZhAPI, BillsTree, mDataRecord, ConditionalDefines, Math;
 
 
 { TBillsFrame }
 { TBillsFrame }
 
 
@@ -317,11 +319,11 @@ var
 begin
 begin
   iCol := zgBillsMeasure.CurCol - zgBillsMeasure.FixedColCount;
   iCol := zgBillsMeasure.CurCol - zgBillsMeasure.FixedColCount;
   Result := (iCol = stdBillsMeasure.VisibleCol('CurDealQuantity'))
   Result := (iCol = stdBillsMeasure.VisibleCol('CurDealQuantity'))
-         or (iCol = stdBillsMeasure.VisibleCol('CurDealTotalPrice'))
-         or (iCol = stdBillsMeasure.VisibleCol('CurQcQuantity'))
-         or (iCol = stdBillsMeasure.VisibleCol('CurQcTotalPrice'))
-         or (iCol = stdBillsMeasure.VisibleCol('CurPcQuantity'))
-         or (iCol = stdBillsMeasure.VisibleCol('CurPcTotalPrice'));
+         or (iCol = stdBillsMeasure.VisibleCol('CurDealTotalPrice'));
+         //or (iCol = stdBillsMeasure.VisibleCol('CurQcQuantity'))
+         //or (iCol = stdBillsMeasure.VisibleCol('CurQcTotalPrice'))
+         //or (iCol = stdBillsMeasure.VisibleCol('CurPcQuantity'))
+         //or (iCol = stdBillsMeasure.VisibleCol('CurPcTotalPrice'));
 end;
 end;
 
 
 procedure TBillsMeasureFrame.zgBillsMeasureCellButtonClick(Sender: TObject;
 procedure TBillsMeasureFrame.zgBillsMeasureCellButtonClick(Sender: TObject;
@@ -468,6 +470,14 @@ begin
   if (ssCtrl in Shift) and (ssShift in Shift) and (ssAlt in Shift)
   if (ssCtrl in Shift) and (ssShift in Shift) and (ssAlt in Shift)
       and (Key in [66, 98]) then
       and (Key in [66, 98]) then
     ShowIsGather := not ShowIsGather;
     ShowIsGather := not ShowIsGather;
+
+  if (zgBillsMeasure.CurCol = 11) then
+  begin
+    if (Key in [48..57]) then
+      zgBillsMeasureCellButtonClick(Sender, zgBillsMeasure.CurCol, zgBillsMeasure.CurRow)
+    else if (Key in [8, 46]) then
+      FBillsMeasureData.ClearCurQcQty(TMeasureBillsIDTreeNode(stdBillsMeasure.IDTree.Selected));
+  end;
 end;
 end;
 
 
 procedure TBillsMeasureFrame.actnSetStageBookmarkExecute(Sender: TObject);
 procedure TBillsMeasureFrame.actnSetStageBookmarkExecute(Sender: TObject);
@@ -829,4 +839,11 @@ begin
   CanExecute := QuestMessage('请确认是否执行删除操作');
   CanExecute := QuestMessage('请确认是否执行删除操作');
 end;
 end;
 
 
+procedure TBillsMeasureFrame.zgBillsMeasureCellCanEdit(Sender: TObject;
+  const ACoord: TPoint; var Allow: Boolean);
+begin
+  if (ACoord.X = 11) then
+    Allow := False;
+end;
+
 end.
 end.