Jelajahi Sumber

用户同时选中多个数量金额,按Delete时,如原值为空或者0时,不响应该输入

MaiXinRong 9 tahun lalu
induk
melakukan
66d594e777
2 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 1 1
      DataModules/BillsCompileDm.pas
  2. 2 0
      DataModules/BillsMeasureDm.pas

+ 1 - 1
DataModules/BillsCompileDm.pas

@@ -677,7 +677,7 @@ procedure TBillsCompileData.sdvBillsCompileSetText(var Text: String;
 begin
   if not Assigned(AValue) then Exit;
   // 修改后数据与原数据相同则不提交
-  if AValue.AsString = Text then Exit;
+  if (AValue.AsString = Text) or ((AValue.AsFloat = 0) and (Text = '')) then Exit;
 
   CheckLockedData;
   if not Allow then Exit;

+ 2 - 0
DataModules/BillsMeasureDm.pas

@@ -405,6 +405,8 @@ procedure TBillsMeasureData.sdvBillsMeasureSetText(var Text: String;
 
 begin
   if not Assigned(AValue) then Exit;
+  // 修改后数据与原数据相同则不提交
+  if (AValue.AsString = Text) or ((AValue.AsFloat = 0) and (Text = '')) then Exit;
 
   CheckLockedData;
   if not Allow then Exit;