Explorar o código

Task #2122 项目属性,新增扣回开工预付款的起扣期数

MaiXinRong %!s(int64=6) %!d(string=hai) anos
pai
achega
8c826de9e3
Modificáronse 3 ficheiros con 354 adicións e 438 borrados
  1. 304 406
      Forms/ProjectPropertiesFrm.dfm
  2. 39 32
      Forms/ProjectPropertiesFrm.pas
  3. 11 0
      Units/ProjectProperty.pas

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 304 - 406
Forms/ProjectPropertiesFrm.dfm


+ 39 - 32
Forms/ProjectPropertiesFrm.pas

@@ -70,7 +70,6 @@ type
     lblSafeTitel: TLabel;
     pnlSafeBar: TPanel;
     lblUnlockPassword: TLabel;
-    imgValid: TImageList;
     pnlUnlockPassword: TPanel;
     pnlOrgPW: TPanel;
     leUnlockPassword: TLabeledEdit;
@@ -92,31 +91,11 @@ type
     cbShowDesignQuantity: TCheckBox;
     cbShowAlias: TCheckBox;
     tobtnCalcParameters: TToolButton;
-    pnlCalcParametersBar: TPanel;
-    lblCalcParametersTitel: TLabel;
-    leQuantityDigit: TLabeledEdit;
-    lblDigit: TLabel;
-    leTotalPriceDigit: TLabeledEdit;
-    udQuantity: TUpDown;
-    udTotalPrice: TUpDown;
-    gbPM_Digit: TGroupBox;
-    lePM_PriceDigit: TLabeledEdit;
-    udPM_PriceDigit: TUpDown;
     pnlReport: TPanel;
     leReport: TLabel;
     cbShowReportShading: TCheckBox;
     edtReportShading: TEdit;
     tobtnDateTime: TToolButton;
-    lblDateTime: TLabel;
-    pnlDateTime: TPanel;
-    lblBaseline: TLabel;
-    dtpBaseline: TDateTimePicker;
-    lblDeadline: TLabel;
-    dtpDeadline: TDateTimePicker;
-    lblDateHint: TLabel;
-    cbDealPayAloneDigiy: TCheckBox;
-    leDealPayTotalPriceDigit: TLabeledEdit;
-    udDealPayTotalPriceDigit: TUpDown;
     pnlReportView: TPanel;
     lblReportShowStateTitle: TLabel;
     pnlReportViewBar: TPanel;
@@ -140,6 +119,30 @@ type
     pnlViewPart2: TPanel;
     pnlApprovalCode: TPanel;
     cbShowApprovalCode: TCheckBox;
+    leSubsistStart: TLabeledEdit;
+    pnlDateTimeRela: TPanel;
+    pnlDateTime: TPanel;
+    lblDateTime: TLabel;
+    dtpBaseline: TDateTimePicker;
+    lblBaseline: TLabel;
+    dtpDeadline: TDateTimePicker;
+    lblDeadline: TLabel;
+    lblDateHint: TLabel;
+    pnlTechRela: TPanel;
+    lblCalcParametersTitel: TLabel;
+    lblDigit: TLabel;
+    leQuantityDigit: TLabeledEdit;
+    udQuantity: TUpDown;
+    leTotalPriceDigit: TLabeledEdit;
+    udTotalPrice: TUpDown;
+    cbDealPayAloneDigiy: TCheckBox;
+    leDealPayTotalPriceDigit: TLabeledEdit;
+    udDealPayTotalPriceDigit: TUpDown;
+    gbPM_Digit: TGroupBox;
+    lePM_PriceDigit: TLabeledEdit;
+    udPM_PriceDigit: TUpDown;
+    pnlCalcParametersBar: TPanel;
+    udSubsistStart: TUpDown;
     procedure btnOkClick(Sender: TObject);
     procedure leContractPriceClick(Sender: TObject);
     procedure msbBaseMouseWheel(Sender: TObject; Shift: TShiftState;
@@ -301,17 +304,21 @@ begin
   leMaterialSubsist.Text := FloatToStr(FProjProperties.MaterialSubsist);
   leMaterialSubsist.ReadOnly := (FProjProperties.PhaseCount > 1) or ((FProjProperties.PhaseCount = 1) and (FProjProperties.AuditStatus <> 0));
   SetWindowLong(leMaterialSubsist.Handle, GWL_STYLE, GetWindowLong(leMaterialSubsist.Handle, GWL_STYLE) or ES_RIGHT);
+
+  udSubsistStart.Position := FProjProperties.SubsistStart;
+  SetWindowLong(leSubsistStart.Handle, GWL_STYLE, GetWindowLong(leSubsistStart.Handle, GWL_STYLE) or ES_RIGHT);
 end;
 
 procedure TProjectPropertiesForm.SaveDealPay;
 begin
+  FProjProperties.SubsistStart := udSubsistStart.Position;
   if (FProjProperties.PhaseCount > 1) or ((FProjProperties.PhaseCount = 1) and (FProjProperties.AuditStatus <> 0)) then Exit;
   FProjProperties.ContractPrice := StrToFloatDef(leContractPrice.Text, 0);
   FProjProperties.StartedSubsisit := StrToFloatDef(leStartedSubsist.Text, 0);
   FProjProperties.MaterialSubsist := StrToFloatDef(leMaterialSubsist.Text, 0);
   FProjectData.DealPaymentData.CalcStarted_RangePrice;
   if FProjectData.PhaseData.Active then
-    FProjectData.PhaseData.PhasePayData.CalculateAll;                              
+    FProjectData.PhaseData.PhasePayData.CalculateAll;
 end;
 
 procedure TProjectPropertiesForm.leContractPriceClick(Sender: TObject);
@@ -356,15 +363,15 @@ end;
 
 procedure TProjectPropertiesForm.ResetContentsCheck;
 begin
-  if msbBase.VertScrollBar.Position < 523 then
+  if msbBase.VertScrollBar.Position < 528 then
     ResetContentsCheck(tobtnDealInfo.Tag)
-  else if msbBase.VertScrollBar.Position < 683 then
+  else if msbBase.VertScrollBar.Position < 688 then
     ResetContentsCheck(tobtnTechParameters.Tag)
-  else if msbBase.VertScrollBar.Position < 796 then
+  else if msbBase.VertScrollBar.Position < 816 then
     ResetContentsCheck(tobtnDealPayment.Tag)
-  else if msbBase.VertScrollBar.Position < 926 then
+  else if msbBase.VertScrollBar.Position < 957 then
     ResetContentsCheck(tobtnSafe.Tag)
-  else if msbBase.VertScrollBar.Position < 1101 then
+  else if msbBase.VertScrollBar.Position < 1133 then
     ResetContentsCheck(tobtnCalcParameters.Tag)
   else
     ResetContentsCheck(tobtnDateTime.Tag);
@@ -381,15 +388,15 @@ begin
   if ATag = tobtnDealInfo.Tag then
     msbBase.VertScrollBar.Position := 0
   else if ATag = tobtnTechParameters.Tag then
-    msbBase.VertScrollBar.Position := 523
+    msbBase.VertScrollBar.Position := 528
   else if ATag = tobtnDealPayment.Tag then
-    msbBase.VertScrollBar.Position := 683
+    msbBase.VertScrollBar.Position := 688
   else if ATag = tobtnSafe.Tag then
-    msbBase.VertScrollBar.Position := 796
+    msbBase.VertScrollBar.Position := 816
   else if ATag = tobtnCalcParameters.Tag then
-    msbBase.VertScrollBar.Position := 926
+    msbBase.VertScrollBar.Position := 957
   else if ATag = tobtnDateTime.Tag then
-    msbBase.VertScrollBar.Position := 1101;
+    msbBase.VertScrollBar.Position := 1133;
 end;
 
 procedure TProjectPropertiesForm.InitDealInfo;

+ 11 - 0
Units/ProjectProperty.pas

@@ -92,6 +92,7 @@ type
     FSDate_2: string;
     FShowOverRange: Boolean;
     FShowApprovalCode: Boolean;
+    FSubsistStart: Integer;
 
     function GetDisplayFormat(ADigit: Integer): string;
 
@@ -138,6 +139,7 @@ type
     procedure SetReportShowStateWithoutReply(const Value: Boolean);
     procedure SetShowOverRange(const Value: Boolean);
     procedure SetShowApprovalCode(const Value: Boolean);
+    procedure SetSubsistStart(const Value: Integer);
   public
     constructor Create(AProjectData: TObject);
     destructor Destroy; override;
@@ -223,6 +225,8 @@ type
     property ContractPrice: Double read FContractPrice write SetContractPrice;
     property MaterialSubsist: Double read FMaterialSubsist write SetMaterialSubsist;
     property StartedSubsisit: Double read FStartedSubsist write SetStartedSubsist;
+    //property SubsistStart: Integer read FSubsistStart write SetSubsistStart;
+    property SubsistStart: Integer read FSubsistStart write SetSubsistStart;
 
     {密码}
     // 解锁台账编辑节点密码
@@ -467,6 +471,7 @@ begin
   FContractPrice := GetFloatPropertyDef('ContractPrice', 0);
   FStartedSubsist := GetFloatPropertyDef('StartedSubsist', 0);
   FMaterialSubsist := GetFloatPropertyDef('MaterialSubsist', 0);
+  FSubsistStart := GetIntPropertyDef('SubsistStart', 0);
   FZJJLPreText := GetStrPropertyDef('ZJJLPreText', '');
 end;
 
@@ -800,6 +805,12 @@ begin
   FPropertyInqurity.Value['StartedSubsist'] := Value;
 end;
 
+procedure TProjProperties.SetSubsistStart(const Value: Integer);
+begin
+  FSubsistStart := Value;
+  FPropertyInqurity.Value['SubsistStart'] := Value;
+end;
+
 procedure TProjProperties.SetTotalPriceDigit(const Value: Integer);
 begin
   FTotalPriceDigit := Value;