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.

262 lines
8.3 KiB
Plaintext

11 months ago
unit u_rp_tai_seai;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, XPMenu, Menus, DB, ADODB, bsSkinCtrls, dxDBGrid,
dxDBTLCl, dxGrClms, dxTL, dxDBCtrl, dxCntner, ExtCtrls;
type
Tfrm_rp_tai_seai = class(TForm)
Panel1: TPanel;
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;
dxDBGrid1Column29: TdxDBGridMaskColumn;
dxDBGrid1Column31: 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;
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;
dxDBGrid1Column77: TdxDBGridColumn;
dxDBGrid1Column78: TdxDBGridColumn;
dxDBGrid1Column79: TdxDBGridColumn;
dxDBGrid1Column81: TdxDBGridColumn;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
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 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 FormShow(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
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_seai: Tfrm_rp_tai_seai;
implementation
uses my_sys_function, u_main, u_data_share;
{$R *.dfm}
procedure Tfrm_rp_tai_seai.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_rp_tai_seai.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_rp_tai_seai.Hide;
frm_rp_tai_seai.ManualFloat(frm_rp_tai_seai.BoundsRect );
frm_main.freeTabs('frm_rp_tai_seai');
action:=cafree;
frm_rp_tai_seai:=nil;
end;
procedure Tfrm_rp_tai_seai.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_seai.N1Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>̨<EFBFBD><CCA8>',1,nil,nil,nil,nil,p_query_table1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_rp_tai_seai.N3Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>̨<EFBFBD><CCA8>',2,nil,nil,nil,nil,p_query_table1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_rp_tai_seai.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_seai.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_seai.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_seai.bsSkinButton10Click(Sender: TObject);
begin
query_seai(5,'0031');
end;
procedure Tfrm_rp_tai_seai.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_seai.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><CBBD><EFBFBD>',ANode.Strings[dxDBGrid1Column3.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_rp_tai_seai.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_rp_tai_seai.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_rp_tai_seai.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,46);
end;
procedure Tfrm_rp_tai_seai.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_rp_tai_seai.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort_pro(Column,p_query_table,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end.