unit u_rp_in_airi; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, dxExEdtr, ADODB, DB, bsSkinCtrls, dxDBTLCl, dxGrClms, dxDBGrid, dxTL, dxDBCtrl, dxCntner, ComCtrls, bsSkinTabs, ExtCtrls, XPMenu, Menus; type Tfrm_rp_in_airi = class(TForm) Panel1: TPanel; bsSkinPageControl1: TbsSkinPageControl; bsSkinTabSheet1: TbsSkinTabSheet; dxDBGrid1: TdxDBGrid; dxDBGrid1Column1: TdxDBGridMaskColumn; dxDBGrid1Column54: TdxDBGridMaskColumn; dxDBGrid1Column11: TdxDBGridMaskColumn; dxDBGrid1Column13: TdxDBGridMaskColumn; dxDBGrid1Column14: TdxDBGridMaskColumn; dxDBGrid1Column15: TdxDBGridMaskColumn; dxDBGrid1USD: TdxDBGridColumn; dxDBGrid1Column3: TdxDBGridColumn; dxDBGrid1Column4: TdxDBGridColumn; dxDBGrid1RMB: TdxDBGridColumn; dxDBGrid1Column6: TdxDBGridColumn; dxDBGrid1Column7: TdxDBGridColumn; dxDBGrid1Column8: TdxDBGridColumn; dxDBGrid1Column9: TdxDBGridColumn; dxDBGrid1Column10: TdxDBGridColumn; dxDBGrid1Column12: TdxDBGridDateColumn; dxDBGrid1Column18: TdxDBGridMaskColumn; dxDBGrid1Column21: TdxDBGridMaskColumn; dxDBGrid1Column22: TdxDBGridDateColumn; dxDBGrid1Column23: TdxDBGridMaskColumn; dxDBGrid1Column24: TdxDBGridMaskColumn; dxDBGrid1Column25: TdxDBGridMaskColumn; dxDBGrid1Column26: TdxDBGridMaskColumn; dxDBGrid1Column28: TdxDBGridColumn; dxDBGrid1Column53: TdxDBGridMaskColumn; dxDBGrid1Column55: TdxDBGridMaskColumn; dxDBGrid1Column57: TdxDBGridMaskColumn; dxDBGrid1Column59: TdxDBGridMaskColumn; bsSkinTabSheet2: TbsSkinTabSheet; dxDBGrid6: TdxDBGrid; dxDBGridMaskColumn95: TdxDBGridMaskColumn; dxDBGridColumn17: TdxDBGridColumn; dxDBGridColumn18: TdxDBGridColumn; dxDBGridColumn19: TdxDBGridColumn; dxDBGridColumn20: TdxDBGridColumn; dxDBGridColumn21: TdxDBGridColumn; dxDBGridColumn22: TdxDBGridColumn; dxDBGridColumn23: TdxDBGridColumn; dxDBGridColumn24: TdxDBGridColumn; dxDBGridColumn25: TdxDBGridColumn; bsSkinTabSheet3: TbsSkinTabSheet; dxDBGrid7: TdxDBGrid; dxDBGridMaskColumn96: TdxDBGridMaskColumn; dxDBGridColumn38: TdxDBGridColumn; dxDBGridColumn39: TdxDBGridColumn; dxDBGridColumn40: TdxDBGridColumn; dxDBGridColumn41: TdxDBGridColumn; dxDBGridColumn42: TdxDBGridColumn; dxDBGridColumn43: TdxDBGridColumn; dxDBGridColumn44: TdxDBGridColumn; dxDBGridColumn45: TdxDBGridColumn; dxDBGridColumn46: TdxDBGridColumn; bsSkinPanel2: TbsSkinPanel; bsSkinButton10: TbsSkinButton; bsSkinButton9: TbsSkinButton; bsSkinButton5: TbsSkinButton; p_bill: TADOStoredProc; p_client: TADOStoredProc; p_client1: TDataSource; p_sales: TADOStoredProc; p_sales1: TDataSource; SaveDialog: TSaveDialog; p_bill1: TDataSource; ADOQuery1: TADOQuery; dxDBGrid1Column29: TdxDBGridColumn; dxDBGrid1Column30: TdxDBGridColumn; dxDBGrid1Column31: TdxDBGridColumn; PopupMenu2: TPopupMenu; N10: TMenuItem; N11: TMenuItem; N14: TMenuItem; N13: TMenuItem; N12: TMenuItem; N15: TMenuItem; N16: TMenuItem; XPMenu1: TXPMenu; procedure bsSkinButton5Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Panel1Resize(Sender: TObject); procedure FormShow(Sender: TObject); procedure bsSkinButton9Click(Sender: TObject); procedure bsSkinButton10Click(Sender: TObject); 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); procedure dxDBGrid6ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); procedure dxDBGrid7ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); private { Private declarations } public { Public declarations } end; var frm_rp_in_airi: Tfrm_rp_in_airi; implementation uses u_main, my_sys_function, u_rp_airi_query; {$R *.dfm} procedure Tfrm_rp_in_airi.bsSkinButton5Click(Sender: TObject); begin close; end; procedure Tfrm_rp_in_airi.FormClose(Sender: TObject; var Action: TCloseAction); begin savereggrid(dxdbgrid1,caption); frm_rp_in_airi.Hide; frm_rp_in_airi.ManualFloat(frm_rp_in_airi.BoundsRect ); frm_main.freeTabs('frm_rp_in_airi'); action:=cafree; frm_rp_in_airi:=nil; end; procedure Tfrm_rp_in_airi.Panel1Resize(Sender: TObject); begin bsSkinPanel2.Left:=Panel1.Width-bsSkinPanel2.Width; end; procedure Tfrm_rp_in_airi.FormShow(Sender: TObject); begin loadreggrid(dxdbgrid1,false,caption); end; procedure Tfrm_rp_in_airi.bsSkinButton9Click(Sender: TObject); begin sys_print('空运进口发票统计',2,nil,nil,nil,nil,p_bill1,p_client1,p_sales1,NIL,nil,nil,nil); end; procedure Tfrm_rp_in_airi.bsSkinButton10Click(Sender: TObject); begin try frm_rp_airi_query:=tfrm_rp_airi_query.Create (self); rp_airi_query_num:=2; rp_airi_query_type:=3; rp_airi_query_limited:='0035'; rp_airi_query_str:='空运进口发票'; frm_rp_airi_query.ShowModal; finally frm_rp_airi_query.Free; end; end; procedure Tfrm_rp_in_airi.N10Click(Sender: TObject); begin update_grid_view_no(dxdbgrid1); end; procedure Tfrm_rp_in_airi.N14Click(Sender: TObject); begin update_grid_view_all(dxdbgrid1); end; procedure Tfrm_rp_in_airi.N12Click(Sender: TObject); begin update_grid(dxdbgrid1,72); end; procedure Tfrm_rp_in_airi.N16Click(Sender: TObject); begin grid_save_xls(dxdbgrid1); end; procedure Tfrm_rp_in_airi.dxDBGrid1ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_bill,'业务编号'); end; procedure Tfrm_rp_in_airi.dxDBGrid6ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_client,'客户名称'); end; procedure Tfrm_rp_in_airi.dxDBGrid7ColumnSorting(Sender: TObject; Column: TdxDBTreeListColumn; var Allow: Boolean); begin Column_sort_pro(Column,p_sales,'揽货人'); end; end.