Browse Source

显示相关

MaiXinRong 5 years ago
parent
commit
f70d515ceb

+ 5 - 2
DataModules/PhasePayDm.pas

@@ -193,12 +193,13 @@ var
   // 金额列名, 公式列名
   sTPField, sFField, sPreField: string;
   iID: Integer;
-  fTotalPrice, fStartedPrice: Double;
+  fTotalPrice, fStartedPrice, fBeforeCalcTotalPrice: Double;
 begin
   Rec := sddPhasePay.FindKey('idxID', AID);
   sTPField := 'TotalPrice' + IntToStr(TPhaseData(FPhaseData).StageIndex);
   sFField := 'Formula' + IntToStr(TPhaseData(FPhaseData).StageIndex);
   sPreField := 'PreTotalPrice' + IntToStr(TPhaseData(FPhaseData).StageIndex);
+  fBeforeCalcTotalPrice := Rec.ValueByName(sTPField).AsFloat;
 
   if not Rec.ValueByName('StopCalc').AsBoolean then
   begin
@@ -245,7 +246,9 @@ begin
       else
         Rec.ValueByName(sTPField).AsFloat := 0;
     end;
-  end;}
+  end;}   
+  with TProjectData(TPhaseData(FPhaseData).ProjectData).DealPaymentData do
+    UpdateTotalPrice(AID, Rec.ValueByName(sTPField).AsFloat - fBeforeCalcTotalPrice);
   // 计算截止数据
   Rec.ValueByName('End' + sTPField).AsFloat := FDecimal.TotalPrice.RoundTo(Rec.ValueByName(sTPField).AsFloat
       + Rec.ValueByName('Pre' + sTPField).AsFloat);

+ 2 - 2
Forms/OptionFrm.dfm

@@ -177,8 +177,8 @@ object OptionForm: TOptionForm
       object imgHelp: TImage
         Left = 425
         Top = 26
-        Width = 16
-        Height = 16
+        Width = 32
+        Height = 32
         Cursor = crHandPoint
         Anchors = [akTop, akRight]
         AutoSize = True

+ 2 - 1
Forms/OptionFrm.pas

@@ -60,7 +60,7 @@ implementation
 {$R *.dfm}
 
 uses
-  Globals, ConfigDoc;
+  Globals, ConfigDoc, MainFrm;
 
 procedure ModifiedOptions;
 var
@@ -105,6 +105,7 @@ begin
     ExcelWithMis := cbExcelWithMis.Checked;
     GatherZJJLSelect := rgGatherZJJLSelect.ItemIndex;
   end;
+  MainForm.CurProjectFrame.BillsGatherFrame.zgGclBills.Invalidate;
 end;
 
 procedure TOptionForm.cbAutoSaveClick(Sender: TObject);

+ 1 - 1
Frames/BillsGatherFme.pas

@@ -167,7 +167,7 @@ procedure TBillsGatherFrame.zgGclBillsCellGetColor(Sender: TObject;
   begin
     vQtyDecimal := TProjectData(FBillsGatherData.ProjectData).ProjProperties.DecimalManager.Common.Quantity;
     fCompare := vQtyDecimal.RoundTo(AQty * SupportManager.ConfigInfo.OverRangePercent / 100);
-    Result := vQtyDecimal.RoundTo(ACompareQty - AQty) > vQtyDecimal.CompareValue;
+    Result := vQtyDecimal.RoundTo(ACompareQty - fCompare) > vQtyDecimal.CompareValue;
   end;
 
   function CheckOverRange(ARecIndex: Integer): Boolean;

+ 1 - 1
Frames/BillsMeasureFme.pas

@@ -284,7 +284,7 @@ begin
         AColor := $00646AFE;
     end;
   end;
-  if (ACoord.Y = stdBillsMeasure.IDTree.Selected.MajorIndex + 2) then
+  if Assigned(stdBillsMeasure.IDTree.Selected) and (ACoord.Y = stdBillsMeasure.IDTree.Selected.MajorIndex + 2) then
     AColor := $00cdfaff;
 end;