Browse Source

Merge branch '3.1.5' of http://192.168.1.12:3000/MaiXinRong/Measure into 3.1.5

CSL 9 years ago
parent
commit
fe9f960cc3
4 changed files with 21 additions and 5 deletions
  1. 5 2
      DataModules/DealPaymentDm.pas
  2. 2 2
      Frames/ProjectFme.pas
  3. 3 1
      Units/ProjectData.pas
  4. 11 0
      Units/ProjectProperty.pas

+ 5 - 2
DataModules/DealPaymentDm.pas

@@ -332,7 +332,7 @@ procedure TDealPaymentData.sdvDealPaymentNeedLookupRecord(
       AID := ARecord.ValueByName('ID').AsInteger;
       APayRec.ValueByName(sFField).AsString := ANewText;
       ARecord.ValueByName('Formula').AsString := ANewText;
-      fTotalPrice := FPayFormula.Calculate(ANewText);
+      fTotalPrice := FPayFormula.Calculate(ANewText, ARecord.ValueByName('StartedPrice').AsFloat);
       if CheckStartedPrice(AID) then
         APayRec.ValueByName(sTPField).AsFloat := GetAllowTotalPrice(AID, fTotalPrice);
     end;
@@ -454,7 +454,10 @@ procedure TDealPaymentData.sdvDealPaymentSetText(var Text: string;
       Rec.ValueByName('Formula').AsString := Text;
       AValue.Owner.ValueByName(sFField).AsString := Text;
       AID := ARecord.ValueByName('ID').AsInteger;
-      fTotalPrice := FPayFormula.Calculate(Text) - AValue.AsFloat;
+      if ARecord.ValueByName('Pre' + AValue.FieldName).AsFloat = 0 then
+        fTotalPrice := FPayFormula.Calculate(Text, Rec.ValueByName('StartedPrice').AsFloat) - AValue.AsFloat
+      else
+        fTotalPrice := FPayFormula.Calculate(Text) - AValue.AsFloat;
       if CheckStartedPrice(AID) then
         Text := FloatToStr(AValue.AsFloat + GetAllowTotalPrice(AID, fTotalPrice))
       else

+ 2 - 2
Frames/ProjectFme.pas

@@ -1042,9 +1042,9 @@ begin
         TipMessage('^_^ 恭喜!数据已成功上传到云端服务器。', ProgressProHandle);
       end
       else
-        WarningMessage(PChar('数据上传失败请重试!服务器故障:' + sResult), ProgressProHandle);
+        WarningMessage('数据上传失败请重试!服务器故障:' + sResult, ProgressProHandle);
     except
-      WarningMessage(PChar('数据上传失败请重试!网络较差,数据文件无法送达云端:' + sResult), ProgressProHandle);
+      WarningMessage('数据上传失败请重试!网络较差,数据文件无法送达云端:' + sResult, ProgressProHandle);
     end;
   finally
     ProgressProFree;

+ 3 - 1
Units/ProjectData.pas

@@ -1224,8 +1224,10 @@ procedure TProjectData.ImportCloudTenderFile(const AFileName: string);
   procedure EndCopyData;
   begin
     OpenAllData;
-    ReConnectTree;
+    FProjProperties.Reload;
     FProjProperties.UpdateFlag := 1;
+    ReConnectTree;
+    ResetFloatDigitView;
     BillsCompileData.CalculateAll;
   end;
 

+ 11 - 0
Units/ProjectProperty.pas

@@ -121,6 +121,7 @@ type
 
     procedure Open(AConnection: TADOConnection);
     procedure Save;
+    procedure Reload;
 
     {Submit-Audit-Reply}
     // ¹²¼ÆÖÕÉó¼ÆÁ¿ÆÚÊý
@@ -484,6 +485,16 @@ begin
   FUpdateFlag := GetIntPropertyDef('UpdateFlag', 0);
 end;
 
+procedure TProjProperties.Reload;
+begin
+  LoadBaseProperties;
+  LoadViewProperties;
+  LoadDealInfo;
+  LoadTechParameters;
+  LoadCalcParameters;
+  FUnlockInfoPassword := GetStrPropertyDef('UnlockInfoPassword', '');
+end;
+
 procedure TProjProperties.Save;
 begin
   SaveDealInfo;