|
|
unit u_web_user_audit;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, bsSkinCtrls, ExtCtrls, DB, ADODB, dxExEdtr, dxCntner, dxTL,
|
|
|
dxDBCtrl, dxDBGrid, ComCtrls, bsSkinTabs, RxLookup, StdCtrls, Mask,
|
|
|
DBCtrls, wwdbdatetimepicker, wwdblook, Menus,
|
|
|
dxDBTLCl, dxGrClms, bsdbctrls, XPMenu, Grids, Wwdbigrd, Wwdbgrid,
|
|
|
wwdbedit, Wwdotdot, Wwdbcomb;
|
|
|
|
|
|
type
|
|
|
Tfrm_web_user_audit = class(TForm)
|
|
|
Panel2: TPanel;
|
|
|
sys_user: TADOQuery;
|
|
|
sys_user1: TDataSource;
|
|
|
PopupMenu3: TPopupMenu;
|
|
|
N37: TMenuItem;
|
|
|
N38: TMenuItem;
|
|
|
N62: TMenuItem;
|
|
|
N25: TMenuItem;
|
|
|
N64: TMenuItem;
|
|
|
N63: TMenuItem;
|
|
|
N17: TMenuItem;
|
|
|
N18: TMenuItem;
|
|
|
N34: TMenuItem;
|
|
|
N35: TMenuItem;
|
|
|
N36: TMenuItem;
|
|
|
XPMenu1: TXPMenu;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
t_ch_fee1: TDataSource;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column10: TdxDBGridColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column114: TdxDBGridColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
Label9: TLabel;
|
|
|
Label3: TLabel;
|
|
|
Label7: TLabel;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
wwDBDateTimePicker5: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker6: TwwDBDateTimePicker;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton15: TbsSkinButton;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton38: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
dxDBGrid1Column14: TdxDBGridColumn;
|
|
|
t_op_seae_query: TADOQuery;
|
|
|
wwDBComboBox8: TwwDBComboBox;
|
|
|
Label1: TLabel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
Label6: TLabel;
|
|
|
Label2: TLabel;
|
|
|
Label4: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label8: TLabel;
|
|
|
Label10: TLabel;
|
|
|
Label11: TLabel;
|
|
|
Label12: TLabel;
|
|
|
Label13: TLabel;
|
|
|
Label14: TLabel;
|
|
|
Label15: TLabel;
|
|
|
Label16: TLabel;
|
|
|
DBEdit6: TDBEdit;
|
|
|
DBEdit7: TDBEdit;
|
|
|
DBEdit2: TDBEdit;
|
|
|
DBEdit1: TDBEdit;
|
|
|
DBEdit3: TDBEdit;
|
|
|
DBEdit4: TDBEdit;
|
|
|
DBEdit5: TDBEdit;
|
|
|
DBEdit8: TDBEdit;
|
|
|
DBEdit9: TDBEdit;
|
|
|
DBEdit10: TDBEdit;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
DBCheckBox1: TDBCheckBox;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure Panel2Resize(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure bsSkinButton38Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
procedure RxDBLookupCombo20KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure t_op_ctnAfterPost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton15Click(Sender: TObject);
|
|
|
procedure dxDBGrid1DblClick(Sender: TObject);
|
|
|
procedure dxDBGrid1Column9CustomDraw(Sender: TObject; ACanvas: TCanvas;
|
|
|
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
|
|
|
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
|
|
|
AFocused: Boolean; var ADone: Boolean);
|
|
|
procedure dxDBGrid1CustomDraw(Sender: TObject; ACanvas: TCanvas;
|
|
|
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
|
|
|
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
|
|
|
AFocused: Boolean; var ADone: Boolean);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
private
|
|
|
procedure t_billsalescharge(Sender: TField);
|
|
|
procedure OpFeeItem(bsNo:string);
|
|
|
procedure getsumstr;
|
|
|
|
|
|
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_web_user_audit: Tfrm_web_user_audit;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main,u_data_share, my_sys_function, u_sys_progress,
|
|
|
u_op_seae_oder_add, u_web_user_client_add;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_web_user_audit.OpFeeItem(bsno:string);
|
|
|
begin
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_web_user_audit.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_web_user_audit.Hide;
|
|
|
frm_web_user_audit.ManualFloat(frm_web_user_audit.BoundsRect );
|
|
|
frm_main.freeTabs('frm_web_user_audit');
|
|
|
action:=cafree;
|
|
|
frm_web_user_audit:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.Panel2Resize(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
i:=round(Panel2.Width/11);
|
|
|
bsSkinButton7.Width:=i;
|
|
|
bsSkinButton6.Width:=i;
|
|
|
bsSkinButton1.Width:=i;
|
|
|
bsSkinButton3.Width:=i;
|
|
|
bsSkinButton38.Width:=i;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
table_Prior(SYS_USER);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
table_next(SYS_USER);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.bsSkinButton38Click(Sender: TObject);
|
|
|
var
|
|
|
book1:Tbookmark;
|
|
|
begin
|
|
|
book1:=SYS_USER.GetBookmark;
|
|
|
SYS_USER.Requery;
|
|
|
SYS_USER.GotoBookmark(book1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
|
|
|
if not ASSIGNED(frm_sys_progress) then
|
|
|
frm_sys_progress:=tfrm_sys_progress.Create(self);
|
|
|
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<C8BA><F2A1A3A1><EFBFBD>';
|
|
|
frm_sys_progress.Show;
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=28;
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
frm_sys_progress.Update;
|
|
|
|
|
|
SYS_USER.Close;
|
|
|
SYS_USER.SQL.clear;
|
|
|
SYS_USER.SQL.Add('select *,case IDENTIFICATION_STATE when ''NotIndent'' then ''δ<>ύ'' when ''Identifying'' then ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
|
|
|
SYS_USER.SQL.Add('when ''Indentified'' then ''<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'' when ''Reject'' then ''<27><><EFBFBD><EFBFBD>'' else '''' end IDENTIFICATION_STATE_STR, ');
|
|
|
SYS_USER.SQL.Add('CASE when STATUS=''Active'' then ''<27><><EFBFBD><EFBFBD>'' else ''ͣ<><CDA3>'' end STATUS_STR from SYS_USER where IS_ADMIN=1 '
|
|
|
+' order by REG_TIME DESC');
|
|
|
SYS_USER.open;
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
frm_sys_progress.close;
|
|
|
frm_sys_progress:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.bsSkinButton10Click(Sender: TObject);
|
|
|
var
|
|
|
str:string;
|
|
|
begin
|
|
|
if wwDBComboBox8.Value<>''then
|
|
|
str:=str+' and IDENTIFICATION_STATE='+''''+wwDBComboBox8.Value+'''';
|
|
|
if RxDBLookupCombo2.DisplayValues[1]<>''then
|
|
|
str:=str+' and INFO_CLIENT='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
|
|
|
|
if wwDBDateTimePicker5.text<>''then
|
|
|
str:=str+' and REG_TIME>='+''''+wwDBDateTimePicker5.text+'''';
|
|
|
if wwDBDateTimePicker6.text<>''then
|
|
|
str:=str+' and REG_TIME<='+''''+wwDBDateTimePicker6.text+'''';
|
|
|
|
|
|
SYS_USER.Close;
|
|
|
SYS_USER.SQL.clear;
|
|
|
SYS_USER.SQL.Add('select *,case IDENTIFICATION_STATE when ''NotIndent'' then ''δ<>ύ'' when ''Identifying'' then ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
|
|
|
SYS_USER.SQL.Add('when ''Indentified'' then ''<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'' when ''Reject'' then ''<27><><EFBFBD><EFBFBD>'' else '''' end IDENTIFICATION_STATE_STR, ');
|
|
|
SYS_USER.SQL.Add('CASE when STATUS=''Active'' then ''<27><><EFBFBD><EFBFBD>'' else ''ͣ<><CDA3>'' end STATUS_STR from SYS_USER where IS_ADMIN=1 '
|
|
|
+str
|
|
|
+' order by REG_TIME DESC');
|
|
|
SYS_USER.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,101);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.RxDBLookupCombo20KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
// key_wwDBLookupCombo(Key,wwDBLookupCombo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.t_op_ctnAfterPost(DataSet: TDataSet);
|
|
|
begin
|
|
|
// update_ctn(t_op_ctn);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.bsSkinButton15Click(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
wwDBDateTimePicker5.text:='';
|
|
|
wwDBDateTimePicker6.text:='';
|
|
|
wwDBComboBox8.Text:='';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.dxDBGrid1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.t_billsalescharge(Sender: TField);
|
|
|
begin
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.dxDBGrid1Column9CustomDraw(Sender: TObject;
|
|
|
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
|
|
|
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
|
|
|
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
|
|
|
begin
|
|
|
if ANode.Strings[dxDBGrid1Column9.Index]='<27><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>' then
|
|
|
AColor:=clRed;
|
|
|
if ANode.Strings[dxDBGrid1Column9.Index]='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
|
|
|
AColor:=clYellow;
|
|
|
if ANode.Strings[dxDBGrid1Column9.Index]='<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>' then
|
|
|
AColor:=clGreen;
|
|
|
AFont.Color:=clblack;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.dxDBGrid1CustomDraw(Sender: TObject;
|
|
|
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
|
|
|
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
|
|
|
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
|
|
|
begin
|
|
|
if trim(ANode.Strings[dxDBGrid1Column9.Index])='<27><><EFBFBD>˲<EFBFBD>' then begin
|
|
|
AFont.Style:=AFont.Style+[fsStrikeOut];
|
|
|
AFont.Color:=clred;
|
|
|
end;
|
|
|
if trim(ANode.Strings[dxDBGrid1Column9.Index])='<27><><EFBFBD>ƺ<EFBFBD><C6BA><EFBFBD>' then begin
|
|
|
// AFont.Style:=AFont.Style+[fsStrikeOut];
|
|
|
AColor:=clFuchsia;
|
|
|
end;
|
|
|
if trim(ANode.Strings[dxDBGrid1Column9.Index])='<27>Ѹĸ<D1B8>' then begin
|
|
|
// AFont.Style:=AFont.Style+[fsStrikeOut];
|
|
|
AColor:=clYellow;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.getsumstr;
|
|
|
begin
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
SYS_USER.Edit;
|
|
|
SYS_USER['IDENTIFICATION_STATE']:='Indentified';
|
|
|
SYS_USER.Post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
|
|
|
SYS_USER.Edit;
|
|
|
if (SYS_USER.FieldByName('STATUS').AsString='Active') then
|
|
|
SYS_USER['STATUS']:='Disabled'
|
|
|
else SYS_USER['STATUS']:='Active';
|
|
|
SYS_USER.Post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_web_user_audit.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
try
|
|
|
frm_web_user_client_add:=tfrm_web_user_client_add.Create (self);
|
|
|
frm_web_user_client_add.data1.Enabled:=false;
|
|
|
frm_web_user_client_add.data1.DataSet:=SYS_USER;
|
|
|
frm_web_user_client_add.data1.Enabled:=true;
|
|
|
|
|
|
frm_web_user_client_add.ShowModal;
|
|
|
finally
|
|
|
frm_web_user_client_add.Free;
|
|
|
frm_web_user_client_add:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end.
|
|
|
|
|
|
|