|
|
unit u_rp_rp_sea_daili;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, bsSkinCtrls, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
|
|
|
RxLookup, StdCtrls, wwdbdatetimepicker, Mask, wwdbedit, Wwdotdot,
|
|
|
Wwdbcomb, DB, ADODB, dxDBTLCl, dxGrClms, Menus;
|
|
|
|
|
|
type
|
|
|
Tfrm_rp_rp_sea_daili = class(TForm)
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
Label13: TLabel;
|
|
|
RxDBLookupCombo5: TRxDBLookupCombo;
|
|
|
Label10: TLabel;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
Label5: TLabel;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
Label1: TLabel;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
wwDBComboBox2: TwwDBComboBox;
|
|
|
Label2: TLabel;
|
|
|
Label14: TLabel;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
p_daili: TADOStoredProc;
|
|
|
p_daili1: TDataSource;
|
|
|
dxDBGrid1Column1: TdxDBGridColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridColumn;
|
|
|
dxDBGrid11: TdxDBGridColumn;
|
|
|
dxDBGrid12: TdxDBGridColumn;
|
|
|
dxDBGrid13: TdxDBGridColumn;
|
|
|
dxDBGrid14: TdxDBGridColumn;
|
|
|
dxDBGrid15: TdxDBGridColumn;
|
|
|
dxDBGrid16: TdxDBGridColumn;
|
|
|
dxDBGrid17: TdxDBGridColumn;
|
|
|
dxDBGrid18: TdxDBGridColumn;
|
|
|
dxDBGrid19: TdxDBGridColumn;
|
|
|
dxDBGrid110: TdxDBGridColumn;
|
|
|
dxDBGrid1Column26: TdxDBGridColumn;
|
|
|
dxDBGrid1TEU: TdxDBGridColumn;
|
|
|
dxDBGrid1Column28: TdxDBGridColumn;
|
|
|
dxDBGrid1Column29: TdxDBGridColumn;
|
|
|
dxDBGrid1Column30: TdxDBGridColumn;
|
|
|
dxDBGrid1Column31: TdxDBGridColumn;
|
|
|
dxDBGrid1Column32: TdxDBGridColumn;
|
|
|
dxDBGrid1Column33: TdxDBGridColumn;
|
|
|
dxDBGrid1Column34: TdxDBGridColumn;
|
|
|
dxDBGrid1Column35: TdxDBGridColumn;
|
|
|
dxDBGrid1Column36: TdxDBGridColumn;
|
|
|
dxDBGrid1Column37: TdxDBGridColumn;
|
|
|
dxDBGrid1Column38: TdxDBGridColumn;
|
|
|
dxDBGrid1Column39: TdxDBGridColumn;
|
|
|
dxDBGrid1Column40: TdxDBGridColumn;
|
|
|
dxDBGrid1Column41: TdxDBGridColumn;
|
|
|
dxDBGrid1USD: TdxDBGridColumn;
|
|
|
dxDBGrid1Column44: TdxDBGridColumn;
|
|
|
dxDBGrid1Column45: TdxDBGridColumn;
|
|
|
dxDBGrid1RMB: TdxDBGridColumn;
|
|
|
dxDBGrid1Column47: TdxDBGridColumn;
|
|
|
dxDBGrid1Column48: TdxDBGridColumn;
|
|
|
dxDBGrid1Column49: TdxDBGridColumn;
|
|
|
dxDBGrid1Column50: TdxDBGridColumn;
|
|
|
dxDBGrid1Column51: TdxDBGridColumn;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure FormShow(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_rp_sea_daili: Tfrm_rp_rp_sea_daili;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, u_data_share, my_sys_function;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_rp_rp_sea_daili.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_rp_sea_daili.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
if RxDBLookupCombo5.DisplayValue='' then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
str:=' where v_ch_fee_no_sea.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo5.DisplayValues[1]+''''
|
|
|
+' and v_sea.<2E><><EFBFBD><EFBFBD>=v_sea.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and v_ch_fee_no_sea.<2E><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><>0';
|
|
|
if wwDBComboBox1.text<>''then
|
|
|
begin
|
|
|
str:=str+' and v_sea.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBComboBox1.text+'''';
|
|
|
end;
|
|
|
if wwDBComboBox2.text<>''then
|
|
|
begin
|
|
|
if wwDBComboBox2.text='<27>շ<EFBFBD><D5B7>ʵ<EFBFBD>'then
|
|
|
begin
|
|
|
str:=str+' and v_ch_fee_no_sea.<2E>ϼ<EFBFBD>δ<EFBFBD><CEB4><>0';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str:=str+' and v_ch_fee_no_sea.<2E>ϼ<EFBFBD>δ<EFBFBD><CEB4><>0';
|
|
|
end;
|
|
|
end;
|
|
|
if wwDBDateTimePicker1.text<>''then
|
|
|
begin
|
|
|
str:=str+' and v_sea.<2E><><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker2.text<>''then
|
|
|
begin
|
|
|
str:=str+' and v_sea.<2E><><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
|
|
|
end;
|
|
|
if RxDBLookupCombo3.DisplayValue<>''then
|
|
|
begin
|
|
|
str:=str+' and v_sea.<2E><><EFBFBD><EFBFBD>Ա'+''''+RxDBLookupCombo3.DisplayValue+'''';
|
|
|
end;
|
|
|
|
|
|
str:='SELECT v_sea.*, v_ch_fee_no_sea.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, v_ch_fee_no_sea.δ<><CEB4>USD,'
|
|
|
+'v_ch_fee_no_sea.δ<><CEB4>USD, v_ch_fee_no_sea.<2E><><EFBFBD><EFBFBD>USD,'
|
|
|
+'v_ch_fee_no_sea.δ<><CEB4>RMB, v_ch_fee_no_sea.δ<><CEB4>RMB,'
|
|
|
+'v_ch_fee_no_sea.<2E><><EFBFBD><EFBFBD>RMB, v_ch_fee_no_sea.<2E>ϼ<EFBFBD>δ<EFBFBD><CEB4>,'
|
|
|
+'v_ch_fee_no_sea.<2E>ϼ<EFBFBD>δ<EFBFBD><CEB4>, v_ch_fee_no_sea.<2E><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD> '
|
|
|
+'FROM v_sea INNER JOIN '
|
|
|
+'v_ch_fee_no_sea ON v_sea.<2E><><EFBFBD><EFBFBD> = v_ch_fee_no_sea.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
|
|
|
+str;
|
|
|
p_daili.close;
|
|
|
p_daili.Parameters.ParamByName('SQLStr').value:=str;
|
|
|
p_daili.Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_rp_sea_daili.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo5.ClearValue;
|
|
|
wwDBComboBox1.Text:='';
|
|
|
wwDBComboBox2.Text:='';
|
|
|
wwDBDateTimePicker1.Text:='';
|
|
|
wwDBDateTimePicker2.Text:='';
|
|
|
RxDBLookupCombo3.ClearValue;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_rp_sea_daili.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('<27><><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>ͳ<EFBFBD><CDB3>',2,nil,nil,nil,nil,p_daili1,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_rp_sea_daili.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_rp_rp_sea_daili.Hide;
|
|
|
frm_rp_rp_sea_daili.ManualFloat(frm_rp_rp_sea_daili.BoundsRect );
|
|
|
frm_main.freeTabs('frm_rp_rp_sea_daili');
|
|
|
action:=cafree;
|
|
|
frm_rp_rp_sea_daili:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_rp_sea_daili.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,true,caption);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_rp_sea_daili.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_rp_sea_daili.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_rp_sea_daili.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,22);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_rp_sea_daili.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|