|
|
unit u_rp_ch_currency_change;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, bsSkinCtrls, wwdblook, RxLookup, wwdbdatetimepicker, StdCtrls,
|
|
|
dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, DB, ADODB, dxDBTLCl,
|
|
|
dxGrClms;
|
|
|
|
|
|
type
|
|
|
Tfrm_rp_ch_currency_change = class(TForm)
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
Label10: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label8: TLabel;
|
|
|
Label11: TLabel;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
p_accept_usdtormb: TADOStoredProc;
|
|
|
p_accept_usdtormb1: TDataSource;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1USDTORMB: TdxDBGridColumn;
|
|
|
p_accept_rmbtousd: TADOStoredProc;
|
|
|
p_accept_rmbtousd1: TDataSource;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
p_pay_usdtormb: TADOStoredProc;
|
|
|
p_pay_usdtormb1: TDataSource;
|
|
|
p_pay_rmbtousd: TADOStoredProc;
|
|
|
p_pay_rmbtousd1: TDataSource;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
dxDBGrid4: TdxDBGrid;
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn3: TdxDBGridColumn;
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_rp_ch_currency_change: Tfrm_rp_ch_currency_change;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_rp_ch_currency_change.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
if wwDBDateTimePicker1.text<>'' then
|
|
|
str:='where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
if wwDBDateTimePicker2.text<>'' then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+''''
|
|
|
else
|
|
|
str:=str+' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker3.text<>'' then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker4.text<>'' then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+'''';
|
|
|
end;
|
|
|
if str<>''then
|
|
|
str:=' and t_ch_fee_do.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from v_op_no '+str+')';
|
|
|
p_accept_usdtormb.close;
|
|
|
p_accept_usdtormb.Parameters.ParamByName('SQLStr').Value:=
|
|
|
'SELECT t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, SUM(t_ch_fee_do.ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) AS USDTORMB '+
|
|
|
'FROM t_ch_fee_do INNER JOIN '+
|
|
|
't_ch_fee ON t_ch_fee_do.CH_ID = t_ch_fee.CH_ID '+
|
|
|
'WHERE (t_ch_fee_do.<2E>ұ<EFBFBD> = '+''''+'RMB'+''''+') AND (t_ch_fee.<2E>ұ<EFBFBD> = '+''''+'USD'+''''+') AND '+
|
|
|
'(t_ch_fee_do.<2E><><EFBFBD><EFBFBD> = '+''''+'3'+''''+') '+str+
|
|
|
' GROUP BY t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
p_accept_usdtormb.open;
|
|
|
|
|
|
p_accept_rmbtousd.close;
|
|
|
p_accept_rmbtousd.Parameters.ParamByName('SQLStr').Value:=
|
|
|
'SELECT t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, SUM(t_ch_fee_do.ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) AS RMBTOUSD '+
|
|
|
'FROM t_ch_fee_do INNER JOIN '+
|
|
|
't_ch_fee ON t_ch_fee_do.CH_ID = t_ch_fee.CH_ID '+
|
|
|
'WHERE (t_ch_fee_do.<2E>ұ<EFBFBD> = '+''''+'USD'+''''+') AND (t_ch_fee.<2E>ұ<EFBFBD> = '+''''+'RMB'+''''+') AND '+
|
|
|
'(t_ch_fee_do.<2E><><EFBFBD><EFBFBD> = '+''''+'3'+''''+') '+str+
|
|
|
' GROUP BY t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
p_accept_rmbtousd.open;
|
|
|
|
|
|
p_pay_usdtormb.close;
|
|
|
p_pay_usdtormb.Parameters.ParamByName('SQLStr').Value:=
|
|
|
'SELECT t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, SUM(t_ch_fee_do.ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) AS USDTORMB '+
|
|
|
'FROM t_ch_fee_do INNER JOIN '+
|
|
|
't_ch_fee ON t_ch_fee_do.CH_ID = t_ch_fee.CH_ID '+
|
|
|
'WHERE (t_ch_fee_do.<2E>ұ<EFBFBD> = '+''''+'RMB'+''''+') AND (t_ch_fee.<2E>ұ<EFBFBD> = '+''''+'USD'+''''+') AND '+
|
|
|
'(t_ch_fee_do.<2E><><EFBFBD><EFBFBD> = '+''''+'4'+''''+') '+str+
|
|
|
' GROUP BY t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
p_pay_usdtormb.open;
|
|
|
|
|
|
p_pay_rmbtousd.close;
|
|
|
p_pay_rmbtousd.Parameters.ParamByName('SQLStr').Value:=
|
|
|
'SELECT t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, SUM(t_ch_fee_do.ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>) AS RMBTOUSD '+
|
|
|
'FROM t_ch_fee_do INNER JOIN '+
|
|
|
't_ch_fee ON t_ch_fee_do.CH_ID = t_ch_fee.CH_ID '+
|
|
|
'WHERE (t_ch_fee_do.<2E>ұ<EFBFBD> = '+''''+'USD'+''''+') AND (t_ch_fee.<2E>ұ<EFBFBD> = '+''''+'RMB'+''''+') AND '+
|
|
|
'(t_ch_fee_do.<2E><><EFBFBD><EFBFBD> = '+''''+'4'+''''+') '+str+
|
|
|
' GROUP BY t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
p_pay_rmbtousd.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_currency_change.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_currency_change.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
frm_rp_ch_currency_change.Hide;
|
|
|
frm_rp_ch_currency_change.ManualFloat(frm_rp_ch_currency_change.BoundsRect );
|
|
|
frm_main.freeTabs('frm_rp_ch_currency_change');
|
|
|
action:=cafree;
|
|
|
frm_rp_ch_currency_change:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_currency_change.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('<27>ұ<EFBFBD><D2B1><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3>',2,nil,nil,nil,nil,p_accept_usdtormb1,p_accept_rmbtousd1,p_pay_usdtormb1,p_pay_rmbtousd1,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
end.
|