|
@@ -24,6 +24,8 @@ type
|
|
|
procedure sddDealPaymentAfterValueChanged(AValue: TsdValue);
|
|
|
procedure sddDealPaymentBeforeDeleteRecord(ARecord: TsdDataRecord;
|
|
|
var Allow: Boolean);
|
|
|
+ procedure sdvDealPaymentBeforeAddRecord(ARecord: TsdDataRecord;
|
|
|
+ var Allow: Boolean);
|
|
|
private
|
|
|
FProjectData: TObject;
|
|
|
FPayFormula: TPayFormula;
|
|
@@ -476,8 +478,18 @@ procedure TDealPaymentData.sdvDealPaymentSetText(var Text: string;
|
|
|
|
|
|
begin
|
|
|
if not Assigned(AValue) then Exit;
|
|
|
+
|
|
|
+ Text := Trim(Text);
|
|
|
+ if SameText('Name', AValue.FieldName) and (Text = '') then
|
|
|
+ begin
|
|
|
+ ErrorMessage('合同支付项名称不允许为空,如需删除,请点击右键进行删除');
|
|
|
+ Allow := False;
|
|
|
+ Exit;
|
|
|
+ end;
|
|
|
+
|
|
|
CheckLockedData;
|
|
|
if not Allow then Exit;
|
|
|
+
|
|
|
if SameText('StartedPrice', AValue.FieldName) then
|
|
|
DoStartedPriceChanged;
|
|
|
if SameText('RangePrice', AValue.FieldName) then
|
|
@@ -735,4 +747,10 @@ begin
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
+procedure TDealPaymentData.sdvDealPaymentBeforeAddRecord(
|
|
|
+ ARecord: TsdDataRecord; var Allow: Boolean);
|
|
|
+begin
|
|
|
+ Allow := ARecord.ValueByName('Name').AsString <> '';
|
|
|
+end;
|
|
|
+
|
|
|
end.
|