|
@@ -683,10 +683,26 @@ procedure TBillsCompileData.sdvBillsCompileSetText(var Text: String;
|
|
|
SetTextErrorHint('该清单已经计量,不可修改清单编号');
|
|
|
end;
|
|
|
|
|
|
+ function CheckValidData: Boolean;
|
|
|
+ begin
|
|
|
+ Result := (AValue.AsString = Text);
|
|
|
+ if SameText(AColumn.FieldName, 'OrgQuantity') or
|
|
|
+ SameText(AColumn.FieldName, 'OrgTotalPrice') or
|
|
|
+ SameText(AColumn.FieldName, 'MisQuantity') or
|
|
|
+ SameText(AColumn.FieldName, 'MisTotalPrice') or
|
|
|
+ SameText(AColumn.FieldName, 'OthQuantity') or
|
|
|
+ SameText(AColumn.FieldName, 'OthTotalPrice') or
|
|
|
+ SameText(AColumn.FieldName, 'Price') then
|
|
|
+ begin
|
|
|
+ if (AValue.AsFloat = 0) and (Text = '') then
|
|
|
+ Result := False;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+
|
|
|
begin
|
|
|
if not Assigned(AValue) then Exit;
|
|
|
// 修改后数据与原数据相同则不提交
|
|
|
- if (AValue.AsString = Text) or ((AValue.AsFloat = 0) and (Text = '')) then Exit;
|
|
|
+ if not CheckValidData then Exit;
|
|
|
|
|
|
CheckLockedData;
|
|
|
if not Allow then Exit;
|