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.

175 lines
4.9 KiB
Plaintext

unit u_rp_zj_hs;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, ExtCtrls, ComCtrls, bsSkinTabs, DB, ADODB,
dxExEdtr, dxDBTLCl, dxGrClms, dxDBGrid, dxTL, dxDBCtrl, dxCntner;
type
Tfrm_rp_zj_hs = class(TForm)
Panel1: TPanel;
bsSkinPanel2: TbsSkinPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
p_total: TADOStoredProc;
p_total1: TDataSource;
p_total_client1: TDataSource;
p_total_client: TADOStoredProc;
p_total_sales: TADOStoredProc;
p_total_sales1: TDataSource;
SaveDialog: TSaveDialog;
bsSkinPageControl4: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinTabSheet3: TbsSkinTabSheet;
dxDBGrid1: TdxDBGrid;
dxDBGridMaskColumn95: TdxDBGridMaskColumn;
dxDBGrid1Column23: TdxDBGridColumn;
dxDBGridColumn23: TdxDBGridColumn;
dxDBGridColumn24: TdxDBGridColumn;
dxDBGridColumn25: TdxDBGridColumn;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn96: TdxDBGridMaskColumn;
dxDBGrid2Column23: TdxDBGridColumn;
dxDBGridColumn44: TdxDBGridColumn;
dxDBGridColumn45: TdxDBGridColumn;
dxDBGridColumn46: TdxDBGridColumn;
dxDBGrid3: TdxDBGrid;
dxDBGrid3Column22: TdxDBGridColumn;
dxDBGridColumn65: TdxDBGridColumn;
dxDBGridColumn66: TdxDBGridColumn;
dxDBGridColumn67: TdxDBGridColumn;
bsSkinTabSheet4: TbsSkinTabSheet;
dxDBGrid4: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGridColumn1: TdxDBGridColumn;
dxDBGridColumn8: TdxDBGridColumn;
dxDBGridColumn9: TdxDBGridColumn;
dxDBGridColumn10: TdxDBGridColumn;
bsSkinTabSheet5: TbsSkinTabSheet;
dxDBGrid5: TdxDBGrid;
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
dxDBGridColumn2: TdxDBGridColumn;
dxDBGridColumn3: TdxDBGridColumn;
dxDBGridColumn4: TdxDBGridColumn;
dxDBGridColumn5: TdxDBGridColumn;
p_total_saleDept1: TDataSource;
p_total_saleDept: TADOStoredProc;
p_total_opdept: TADOStoredProc;
p_total_opdept1: TDataSource;
dxDBGrid1Column6: TdxDBGridColumn;
dxDBGrid2Column6: TdxDBGridColumn;
dxDBGrid4Column6: TdxDBGridColumn;
dxDBGrid5Column6: TdxDBGridColumn;
dxDBGrid3Column5: TdxDBGridColumn;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Panel1Resize(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure dxDBGrid2ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_rp_zj_hs: Tfrm_rp_zj_hs;
implementation
uses u_main, u_rp_no_seae_query,my_sys_function;
{$R *.dfm}
procedure Tfrm_rp_zj_hs.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_rp_zj_hs.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_rp_zj_hs.Hide;
frm_rp_zj_hs.ManualFloat(frm_rp_zj_hs.BoundsRect );
frm_main.freeTabs('frm_rp_zj_hs');
action:=cafree;
frm_rp_zj_hs:=nil;
end;
procedure Tfrm_rp_zj_hs.Panel1Resize(Sender: TObject);
var
i:integer;
begin
i:=round(bsSkinPanel2.Width/7);
bsSkinButton10.Width:=i;
bsSkinButton9.Width:=i;
bsSkinButton1.Width:=i;
end;
procedure Tfrm_rp_zj_hs.bsSkinButton10Click(Sender: TObject);
begin
try
frm_rp_no_seae_query:=tfrm_rp_no_seae_query.Create (self);
frm_rp_no_seae_query.Caption:='<27><><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>ͳ<EFBFBD><CDB3>';
no_seae_query_bs:=13;
no_seae_query_limited:='0033';
no_seae_query_fee:=3;
frm_rp_no_seae_query.ShowModal;
finally
frm_rp_no_seae_query.Free;
end;
end;
procedure Tfrm_rp_zj_hs.bsSkinButton1Click(Sender: TObject);
begin
with SaveDialog do
begin
DefaultExt :='xls';
Filter := '(*.xls)|*.xls';
if Execute then
begin
if bsSkinTabSheet1.Showing then
dxDBGrid1.SaveToXLS(FileName,true)
else if bsSkinTabSheet2.Showing then
dxDBGrid2.SaveToXLS(FileName,true)
else if bsSkinTabSheet3.Showing then
dxDBGrid3.SaveToXLS(FileName,true);
end;
end;
end;
procedure Tfrm_rp_zj_hs.bsSkinButton9Click(Sender: TObject);
begin
sys_print('Ƿ<><C7B7><EFBFBD>ۺϷ<DBBA><CFB7><EFBFBD>',2,nil,nil,nil,nil,p_total_client1,p_total_sales1,p_total1,nil,nil,nil,nil);
end;
procedure Tfrm_rp_zj_hs.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort_pro(Column,p_total_client,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_rp_zj_hs.dxDBGrid2ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort_pro(Column,p_total_sales,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
end;
end.