|
|
unit u_rp_dg_except;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, ADODB, dxExEdtr, dxDBTLCl, dxGrClms, dxDBGrid, dxTL,
|
|
|
dxDBCtrl, dxCntner, StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb,
|
|
|
RxLookup, wwdbdatetimepicker, bsSkinCtrls, Menus, XPMenu, wwdblook;
|
|
|
|
|
|
type
|
|
|
Tfrm_rp_dg_except = class(TForm)
|
|
|
qrymast: TADOQuery;
|
|
|
dsrmast: TDataSource;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
Label10: TLabel;
|
|
|
Label5: TLabel;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
dxDBGrid1LE_ID: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column17: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridMaskColumn;
|
|
|
t_crm_client_cd: TADOQuery;
|
|
|
dsr_crm_client_cd1: TDataSource;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
N73: TMenuItem;
|
|
|
N48: TMenuItem;
|
|
|
XPMenu1: TXPMenu;
|
|
|
Label12: TLabel;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
Label1: TLabel;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
Label125: TLabel;
|
|
|
wwDBLookupCombo49: TwwDBLookupCombo;
|
|
|
Label30: TLabel;
|
|
|
Edit7: TEdit;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
Label2: TLabel;
|
|
|
Label3: TLabel;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
Label4: TLabel;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
Label6: TLabel;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_rp_dg_except: Tfrm_rp_dg_except;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
{$R *.dfm}
|
|
|
uses u_main,my_sys_function ;
|
|
|
|
|
|
procedure Tfrm_rp_dg_except.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption+'1');
|
|
|
frm_rp_dg_except.Hide;
|
|
|
frm_rp_dg_except.ManualFloat(frm_rp_dg_except.BoundsRect );
|
|
|
frm_main.freeTabs('frm_rp_dg_except');
|
|
|
action:=cafree;
|
|
|
frm_rp_dg_except:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dg_except.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
wwDBDateTimePicker1.Clear ;
|
|
|
wwDBDateTimePicker2.Clear ;
|
|
|
RxDBLookupCombo1.ClearValue ;
|
|
|
RxDBLookupCombo4.ClearValue ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dg_except.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
with qrymast,sql do
|
|
|
begin
|
|
|
close ; clear ;
|
|
|
add('select e.ID,d.<2E><><EFBFBD><EFBFBD>,e.[<5B><><EFBFBD><EFBFBD>],e.[<5B>ϴ<EFBFBD>ʱ<EFBFBD><CAB1>],e.[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],e.[ԭ<><D4AD>],e.[<5B><><EFBFBD><EFBFBD>],e.[<5B><EFBFBD>ʱ<EFBFBD><CAB1>],e.[<5B><EFBFBD><DEB8><EFBFBD>] ');
|
|
|
add(',d.ί<>е<EFBFBD>λ,d.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ,d.[<5B><><EFBFBD><EFBFBD>],d.[<5B><><EFBFBD><EFBFBD>],d.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,d.<2E><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,d.Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>,d.UNNO,d.<2E>걨Ա');
|
|
|
add(' from t_op_seae_dg_except e');
|
|
|
add(' left join t_op_seae_dg d on (d.<2E><><EFBFBD><EFBFBD>=e.<2E><><EFBFBD><EFBFBD>)');
|
|
|
add('where (1=1) ');
|
|
|
if wwDBDateTimePicker1.TEXT<>''then
|
|
|
begin
|
|
|
add(' and d.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.TEXT+'''');
|
|
|
end;
|
|
|
if wwDBDateTimePicker2.TEXT<>''then
|
|
|
begin
|
|
|
add(' and d.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.TEXT+'''');
|
|
|
end;
|
|
|
if RxDBLookupCombo1.DisplayValues[1]<>''then
|
|
|
begin
|
|
|
add(' and d.<2E><><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo1.DisplayValues[1]+'''');
|
|
|
end;
|
|
|
if RxDBLookupCombo4.DisplayValues[1]<>''then
|
|
|
begin
|
|
|
add(' and d.ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo4.DisplayValues[1]+'''');
|
|
|
end;
|
|
|
if wwDBDateTimePicker3.TEXT<>''then
|
|
|
begin
|
|
|
add(' and d.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker3.TEXT+'''');
|
|
|
end;
|
|
|
if wwDBDateTimePicker4.TEXT<>''then
|
|
|
begin
|
|
|
add(' and d.¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker4.TEXT+'''');
|
|
|
end;
|
|
|
if wwDBLookupCombo49.TEXT<>''then
|
|
|
begin
|
|
|
add(' and d.<2E><><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo49.TEXT+'''');
|
|
|
end;
|
|
|
if Edit7.TEXT<>''then
|
|
|
begin
|
|
|
add(' and d.<2E><><EFBFBD><EFBFBD> like '+'''%'+Edit7.TEXT+'%''');
|
|
|
end;
|
|
|
|
|
|
if RxDBLookupCombo2.DisplayValues[1]<>''then
|
|
|
begin
|
|
|
add(' and d.<2E>걨Ա='+''''+RxDBLookupCombo2.DisplayValues[1]+'''');
|
|
|
end;
|
|
|
if RxDBLookupCombo3.DisplayValues[1]<>''then
|
|
|
begin
|
|
|
add(' and d.<2E><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo3.DisplayValues[1]+'''');
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
open ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dg_except.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,true,caption+'1');
|
|
|
t_crm_client_cd.Open ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dg_except.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dg_except.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('Σ<><CEA3>Ʒ<EFBFBD>걨<EFBFBD>쳣ͳ<ECB3A3><CDB3>',2,nil,nil,nil,nil,nil,dsrmast,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dg_except.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dg_except.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dg_except.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,213);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dg_except.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
end.
|