|
@@ -25,6 +25,7 @@ type
|
|
actnCalculatePhasePay: TAction;
|
|
actnCalculatePhasePay: TAction;
|
|
actnSetDealPayPlan: TAction;
|
|
actnSetDealPayPlan: TAction;
|
|
actnCanCalc: TAction;
|
|
actnCanCalc: TAction;
|
|
|
|
+ actnWithoutCalcCurPay: TAction;
|
|
procedure zgParameterCellCanEdit(Sender: TObject; const ACoord: TPoint;
|
|
procedure zgParameterCellCanEdit(Sender: TObject; const ACoord: TPoint;
|
|
var Allow: Boolean);
|
|
var Allow: Boolean);
|
|
procedure imgHelpClick(Sender: TObject);
|
|
procedure imgHelpClick(Sender: TObject);
|
|
@@ -49,6 +50,8 @@ type
|
|
procedure actnSetDealPayPlanUpdate(Sender: TObject);
|
|
procedure actnSetDealPayPlanUpdate(Sender: TObject);
|
|
procedure actnCanCalcExecute(Sender: TObject);
|
|
procedure actnCanCalcExecute(Sender: TObject);
|
|
procedure actnCanCalcUpdate(Sender: TObject);
|
|
procedure actnCanCalcUpdate(Sender: TObject);
|
|
|
|
+ procedure actnWithoutCalcCurPayExecute(Sender: TObject);
|
|
|
|
+ procedure actnWithoutCalcCurPayUpdate(Sender: TObject);
|
|
private
|
|
private
|
|
FDealPaymentData: TDealPaymentData;
|
|
FDealPaymentData: TDealPaymentData;
|
|
|
|
|
|
@@ -164,6 +167,7 @@ begin
|
|
SetDxBtnAction(actnCalculatePhasePay, MainForm.dxbtnCalculatePhasePay);
|
|
SetDxBtnAction(actnCalculatePhasePay, MainForm.dxbtnCalculatePhasePay);
|
|
SetDxBtnAction(actnSetDealPayPlan, MainForm.dxbtnSetDealPayPlan);
|
|
SetDxBtnAction(actnSetDealPayPlan, MainForm.dxbtnSetDealPayPlan);
|
|
SetDxBtnAction(actnCanCalc, MainForm.dxbtnCanCalc);
|
|
SetDxBtnAction(actnCanCalc, MainForm.dxbtnCanCalc);
|
|
|
|
+ SetDxBtnAction(actnWithoutCalcCurPay, MainForm.dxbtnWithoutCalcCurPay);
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TDealPaymentFrame.actnCalculatePhasePayExecute(Sender: TObject);
|
|
procedure TDealPaymentFrame.actnCalculatePhasePayExecute(Sender: TObject);
|
|
@@ -190,6 +194,8 @@ begin
|
|
// 本期应付
|
|
// 本期应付
|
|
if Rec.ValueByName('CalcType').AsInteger = 1 then
|
|
if Rec.ValueByName('CalcType').AsInteger = 1 then
|
|
AColor := clSkyBlue
|
|
AColor := clSkyBlue
|
|
|
|
+ else if Rec.ValueByName('CalcType').AsInteger = 3 then
|
|
|
|
+ AColor := $00E6E6E6
|
|
// 本期实付
|
|
// 本期实付
|
|
//else if Rec.ValueByName('CalcType').AsInteger = 2 then
|
|
//else if Rec.ValueByName('CalcType').AsInteger = 2 then
|
|
else if iCurPhase = 0 then
|
|
else if iCurPhase = 0 then
|
|
@@ -438,4 +444,30 @@ begin
|
|
TAction(Sender).Caption := '停用';
|
|
TAction(Sender).Caption := '停用';
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TDealPaymentFrame.actnWithoutCalcCurPayExecute(Sender: TObject);
|
|
|
|
+var
|
|
|
|
+ Rec, PhaseRec: TsdDataRecord;
|
|
|
|
+begin
|
|
|
|
+ Rec := sdDealPayment.DataView.Current;
|
|
|
|
+ Rec.ValueByName('CalcType').AsInteger := 3;
|
|
|
|
+
|
|
|
|
+ TProjectData(FDealPaymentData.ProjectData).PhaseData.PhasePayData.CalculateAll;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TDealPaymentFrame.actnWithoutCalcCurPayUpdate(Sender: TObject);
|
|
|
|
+var
|
|
|
|
+ Rec: TsdDataRecord;
|
|
|
|
+begin
|
|
|
|
+ Rec := sdDealPayment.DataView.Current;
|
|
|
|
+ if not Assigned(Rec) or Rec.ValueByName('PreDefined').AsBoolean or
|
|
|
|
+ (Rec.ValueByName('CalcType').AsInteger <> 0) or
|
|
|
|
+ (Rec.ValueByName('Name').AsString = '本期完成计量') then
|
|
|
|
+ begin
|
|
|
|
+ TAction(Sender).Visible := False;
|
|
|
|
+ Exit;
|
|
|
|
+ end;
|
|
|
|
+ TAction(Sender).Visible := TProjectData(FDealPaymentData.ProjectData).ValidStageIsRefer and
|
|
|
|
+ (TProjectData(FDealPaymentData.ProjectData).PhaseIndex = Rec.ValueByName('CreatePhaseID').AsInteger);
|
|
|
|
+end;
|
|
|
|
+
|
|
end.
|
|
end.
|