修改CommonFiltersByTv 函数,增加变量控制

This commit is contained in:
sgwp 2025-03-08 16:47:21 +08:00
parent cba09a0003
commit 634f9a5dfb
3 changed files with 20 additions and 11 deletions

View File

@ -3699,16 +3699,22 @@ var
i: integer;
JSONObject: TJSONObject;
MFields: TStringList;
RemovalNull: Boolean;
begin
Result := '';
JSONObject := TJSONObject.ParseJSONValue(JsonArgs) as TJSONObject;
MFields := TStringList.Create();
ExtractStrings(['|'], [' '], PChar(JSONObject.S['Fields']), MFields);
RemovalNull := JSONObject.B['RemovalNull'];
for i := 0 to Tv1.ColumnCount - 1 do
begin
if MFields.IndexOf(Tv1.Columns[i].DataBinding.FieldName) >= 0 then
begin
Result := Result + 'and isnull(' + Tv1.Columns[i].DataBinding.FieldName + ','''')=' + quotedStr(Trim(Tv1.DataController.DataSet.FieldByName(Tv1.Columns[i].DataBinding.FieldName).AsString)) + ' ';
if RemovalNull then
Result := Result + ' and isnull(' + Tv1.Columns[i].DataBinding.FieldName + ','''') = ' + quotedStr(Trim(Tv1.DataController.DataSet.FieldByName(Tv1.Columns[i].DataBinding.FieldName).AsString)) + ' '
else
Result := Result + ' and ' + Tv1.Columns[i].DataBinding.FieldName + ' = ' + quotedStr(Trim(Tv1.DataController.DataSet.FieldByName(Tv1.Columns[i].DataBinding.FieldName).AsString)) + ' ';
end;
end;
MFields.Free;
@ -3903,8 +3909,7 @@ begin
begin
Close;
sql.Clear;
sql.Add('select item_value,data_type from sy_module_param_set where dll_name=''' +
Trim(DllName) + ''' and config_name=''' + Trim(ConfigName) + '''');
sql.Add('select item_value,data_type from sy_module_param_set where dll_name=''' +Trim(DllName) + ''' and config_name=''' + Trim(ConfigName) + '''');
Open;
if RecordCount > 0 then
begin
@ -3920,15 +3925,17 @@ begin
Result:=True;
end;
end
else if Trim(FieldByName('data_type').AsString)='ÕûÊý' then
begin
Result:=StrToIntDef(Trim(FieldByName('item_value').AsString),0);
end
else
begin
Result:=Trim(FieldByName('item_value').AsString);
end;
end;
end;
end;
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
/// 粘贴剪贴板中的数据到表格

View File

@ -8,7 +8,7 @@ uses
Data.Win.ADODB, cxGraphics, U_WindowFormdesign, cxEdit, Vcl.ExtCtrls,
cxControls, cxProgressBar, cxLookAndFeels, cxLookAndFeelPainters, cxContainer,
dxSkinsCore, dxSkinsDefaultPainters, dxSkinWXI, dxSkinSharpPlus,
System.JSON;
System.JSON, dxSkinMySkin_WXI, dxSkinOffice2013White;
type
TfrmBaseList = class(TForm)
@ -73,8 +73,8 @@ begin
fModuleId:=StringReplace(Trim(jsonObject.GetValue('moduleId').ToString),'"','',[rfReplaceAll]);
fModuleSubId:=StringReplace(trim(jsonObject.GetValue('moduleSubId').ToString),'"','',[rfReplaceAll]);
gTeamWorker:=StringReplace(trim(jsonObject.GetValue('teamWorkerId').ToString),'"','',[rfReplaceAll]);
if Parameters1=' ѯ' then
fParameters10:=' ѯ'
if Parameters1='²éѯ' then
fParameters10:='²éѯ'
else
fParameters10:='';
finally
@ -82,7 +82,7 @@ begin
end;
end;
//
//ÖØÃüÃû´°¿Ú
if trim(formName)<>'' then
self.Name:=self.Name+trim(formName);
fFormId:= FormID ;
@ -106,7 +106,8 @@ var
begin
self.Color:=clBtnFace;
//getSystemIni();
self.DoubleBuffered:=gIsUseSkin;
if gIsUseSkin and not gIsNoUseBuffer then
self.DoubleBuffered:=true;
if gFontSize<9 then
begin
mFontSize := 9;
@ -119,7 +120,7 @@ begin
self.Font.Size := gFontSize;
if trim(gFontName)<>'' then
self.Font.Name:=gFontName;
// ڱ ɫ
// ´°¿Ú±³¾°É«
fWindowDesign := TWindowFormdesign.Create();
end;

View File

@ -14,6 +14,7 @@ var
gFontSize:integer;
gFontName:string;
gIsUseSkin:boolean;
gIsNoUseBuffer:boolean;
gStructVer:string;
gSystemId:string;
gIsYsUse:boolean;