You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

270 lines
8.7 KiB
Plaintext

11 months ago
unit u_rp_tai_seae;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, DB,
ADODB, wwdbdatetimepicker, StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb,
RxLookup, Menus, XPMenu, dxDBTLCl, dxGrClms, ExtCtrls;
type
Tfrm_rp_tai_seae = class(TForm)
Panel1: TPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
p_query_table: TADOStoredProc;
p_query_table1: TDataSource;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
XPMenu1: TXPMenu;
SaveDialog: TSaveDialog;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridDateColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column21: TdxDBGridMaskColumn;
dxDBGrid1Column23: TdxDBGridMaskColumn;
dxDBGrid1Column24: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridMaskColumn;
dxDBGrid1Column26: TdxDBGridDateColumn;
dxDBGrid1Column27: TdxDBGridDateColumn;
dxDBGrid1Column28: TdxDBGridDateColumn;
dxDBGrid1Column29: TdxDBGridMaskColumn;
dxDBGrid1Column31: TdxDBGridMaskColumn;
dxDBGrid1Column43: TdxDBGridMaskColumn;
dxDBGrid1Column51: TdxDBGridMaskColumn;
dxDBGrid1Column54: TdxDBGridMaskColumn;
dxDBGrid1Column55: TdxDBGridMaskColumn;
dxDBGrid1Column56: TdxDBGridColumn;
dxDBGrid1Column57: TdxDBGridColumn;
dxDBGrid11: TdxDBGridMaskColumn;
dxDBGrid12: TdxDBGridMaskColumn;
dxDBGrid13: TdxDBGridMaskColumn;
dxDBGrid14: TdxDBGridMaskColumn;
dxDBGrid15: TdxDBGridMaskColumn;
dxDBGrid16: TdxDBGridMaskColumn;
dxDBGrid17: TdxDBGridMaskColumn;
dxDBGrid18: TdxDBGridMaskColumn;
dxDBGrid19: TdxDBGridMaskColumn;
dxDBGrid110: TdxDBGridMaskColumn;
dxDBGrid1Column80: TdxDBGridMaskColumn;
dxDBGrid1TEU: TdxDBGridMaskColumn;
dxDBGrid1Column82: TdxDBGridMaskColumn;
dxDBGrid1Column83: TdxDBGridMaskColumn;
dxDBGrid1Column84: TdxDBGridDateColumn;
dxDBGrid1Column88: TdxDBGridMaskColumn;
dxDBGrid1Column89: TdxDBGridMaskColumn;
dxDBGrid1Column90: TdxDBGridMaskColumn;
dxDBGrid1Column92: TdxDBGridMaskColumn;
dxDBGrid1Column93: TdxDBGridMaskColumn;
dxDBGrid1Column85: TdxDBGridMaskColumn;
dxDBGrid1Column87: TdxDBGridMaskColumn;
dxDBGrid1Column86: TdxDBGridMaskColumn;
dxDBGrid1USD: TdxDBGridColumn;
dxDBGrid1Column97: TdxDBGridColumn;
dxDBGrid1Column98: TdxDBGridColumn;
dxDBGrid1RMB: TdxDBGridColumn;
dxDBGrid1Column100: TdxDBGridColumn;
dxDBGrid1Column101: TdxDBGridColumn;
dxDBGrid1Column102: TdxDBGridColumn;
dxDBGrid1Column103: TdxDBGridColumn;
dxDBGrid1Column104: TdxDBGridColumn;
dxDBGrid1Column105: TdxDBGridColumn;
dxDBGrid1Column106: TdxDBGridColumn;
dxDBGrid1Column107: TdxDBGridColumn;
dxDBGrid1Column108: TdxDBGridColumn;
dxDBGrid1Column109: TdxDBGridColumn;
dxDBGrid1Column110: TdxDBGridColumn;
dxDBGrid1Column111: TdxDBGridColumn;
dxDBGrid1Column112: TdxDBGridColumn;
dxDBGrid1Column113: TdxDBGridColumn;
dxDBGrid1Column114: TdxDBGridColumn;
dxDBGrid1Column115: TdxDBGridColumn;
dxDBGrid1Column116: TdxDBGridColumn;
dxDBGrid1Column117: TdxDBGridMaskColumn;
dxDBGrid1Column81: TdxDBGridColumn;
dxDBGrid1Column91: TdxDBGridColumn;
dxDBGrid1Column94: TdxDBGridColumn;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
dxDBGrid1Column73: TdxDBGridColumn;
dxDBGrid1Column74: TdxDBGridColumn;
dxDBGrid1Column75: TdxDBGridColumn;
dxDBGrid1Column76: TdxDBGridColumn;
dxDBGrid1Column77: TdxDBGridColumn;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton9Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure dxDBGrid1Column4CustomDraw(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 Panel1Resize(Sender: TObject);
procedure dxDBGrid1Column3CustomDraw(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 N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_rp_tai_seae: Tfrm_rp_tai_seae;
implementation
uses u_main, u_data_share, my_sys_function;
{$R *.dfm}
procedure Tfrm_rp_tai_seae.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_rp_tai_seae.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_rp_tai_seae.Hide;
frm_rp_tai_seae.ManualFloat(frm_rp_tai_seae.BoundsRect );
frm_main.freeTabs('frm_rp_tai_seae');
action:=cafree;
frm_rp_tai_seae:=nil;
end;
procedure Tfrm_rp_tai_seae.bsSkinButton9Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton9.ClientToScreen(Point(0,bsSkinButton9.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_rp_tai_seae.N1Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>̨<EFBFBD><CCA8>',1,nil,nil,nil,nil,p_query_table1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_rp_tai_seae.N3Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>̨<EFBFBD><CCA8>',2,nil,nil,nil,nil,p_query_table1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_rp_tai_seae.N5Click(Sender: TObject);
begin
with SaveDialog do
begin
DefaultExt :='xls';
Filter := '(*.xls)|*.xls';
if Execute then
dxDBGrid1.SaveToXLS(FileName,true);
end;
end;
procedure Tfrm_rp_tai_seae.bsSkinButton10Click(Sender: TObject);
begin
query_seae(5,'0031');
end;
procedure Tfrm_rp_tai_seae.FormShow(Sender: TObject);
begin
loadreggrid(dxdbgrid1,true,caption);
if frm_data_share.t_load_employee.FieldByName('Ӧ<><D3A6>').asboolean then
dxDBGrid1.Bands[2].Visible:=true
else
dxDBGrid1.Bands[2].Visible:=false;
if frm_data_share.t_load_employee.FieldByName('Ӧ<><D3A6>').asboolean then
dxDBGrid1.Bands[3].Visible:=true
else
dxDBGrid1.Bands[3].Visible:=false;
if frm_data_share.t_load_employee.FieldByName('<27><><EFBFBD><EFBFBD>').asboolean then
dxDBGrid1.Bands[4].Visible:=true
else
dxDBGrid1.Bands[4].Visible:=false;
end;
procedure Tfrm_rp_tai_seae.dxDBGrid1Column4CustomDraw(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
AColor:=dxgrid_color_fee(ANode.strings[dxDBGrid1Column4.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_rp_tai_seae.Panel1Resize(Sender: TObject);
begin
bsSkinButton10.Left:=Panel1.Width-3*bsSkinButton5.Width-32;
bsSkinButton9.Left:=Panel1.Width-2*bsSkinButton5.Width-26;
bsSkinButton5.Left:=Panel1.Width-bsSkinButton5.Width-20;
end;
procedure Tfrm_rp_tai_seae.dxDBGrid1Column3CustomDraw(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
AColor:=dxgrid_color('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>',ANode.Strings[dxDBGrid1Column3.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_rp_tai_seae.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_rp_tai_seae.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_rp_tai_seae.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,30);
end;
procedure Tfrm_rp_tai_seae.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_rp_tai_seae.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort_pro(Column,p_query_table,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end.