|
|
unit u_rp_dui_accept;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, ADODB, ComCtrls, bsSkinTabs, bsSkinCtrls, dxExEdtr,
|
|
|
dxCntner, dxTL, dxDBCtrl, dxDBGrid, StdCtrls, wwdbdatetimepicker,
|
|
|
RxLookup, Mask, wwdbedit, Wwdotdot, Wwdbcomb, dxDBTLCl, dxGrClms;
|
|
|
|
|
|
type
|
|
|
Tfrm_rp_dui_accept = class(TForm)
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
Label9: TLabel;
|
|
|
Label10: TLabel;
|
|
|
Label4: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label1: TLabel;
|
|
|
Label2: TLabel;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
wwDBComboBox2: TwwDBComboBox;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
p_detail: TADOStoredProc;
|
|
|
p_detail1: TDataSource;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridDateColumn;
|
|
|
dxDBGrid1RMB: TdxDBGridColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
dxDBGrid1USD: TdxDBGridColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridColumn;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_rp_dui_accept: Tfrm_rp_dui_accept;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_rp_dui_accept.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dui_accept.bsSkinButton10Click(Sender: TObject);
|
|
|
var
|
|
|
str1:widestring;
|
|
|
str_tiaojian:widestring;
|
|
|
begin
|
|
|
str1:='SELECT t_ch_dui.<2E><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>,'
|
|
|
+'(case t_ch_dui.<2E><><EFBFBD><EFBFBD> when '+''''+'1'+''''+' then '+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+''''+' else '
|
|
|
+'(case t_ch_dui.<2E><><EFBFBD><EFBFBD> when '+''''+'3'+''''+' then '+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+''''+' else '
|
|
|
+'(case t_ch_dui.<2E><><EFBFBD><EFBFBD> when '+''''+'5'+''''+' then '+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+''''+' else '
|
|
|
+'(case t_ch_dui.<2E><><EFBFBD><EFBFBD> when '+''''+'7'+''''+' then '+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+''''+' else '
|
|
|
+''''+''''+' end) end) end) end) as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_ch_dui.<2E><><EFBFBD>ʿͻ<CABF>,'
|
|
|
+'t_ch_dui.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_ch_dui.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_ch_dui.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_ch_dui.֧<><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, v_dui_fee_all.RMB<4D><42><EFBFBD><EFBFBD>, v_dui_fee_all.RMB<4D><42><EFBFBD><EFBFBD>,'
|
|
|
+'v_dui_fee_all.RMBδ<42><CEB4>, v_dui_fee_all.USD<53><44><EFBFBD><EFBFBD>, v_dui_fee_all.USD<53><44><EFBFBD><EFBFBD>,'
|
|
|
+'v_dui_fee_all.USDδ<44><CEB4> '
|
|
|
+'FROM t_ch_dui INNER JOIN '
|
|
|
+'v_dui_fee_all ON t_ch_dui.<2E><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD> = v_dui_fee_all.<2E><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD> '
|
|
|
+'where t_ch_dui.<2E><><EFBFBD><EFBFBD> in ('+''''+'1'+''''+','+''''+'3'+''''
|
|
|
+','+''''+'5'+''''+','+''''+'7'+''''+','+''''+'9'+''''+')'
|
|
|
+' and '+open_data('0039','t_ch_dui.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no');
|
|
|
|
|
|
if RxDBLookupCombo2.DisplayValue<>''then
|
|
|
str_tiaojian:=' and t_ch_dui.<2E><><EFBFBD>ʿͻ<CABF>='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
|
if RxDBLookupCombo4.DisplayValue<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and t_ch_dui.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo4.DisplayValues[0]+'''';
|
|
|
if wwDBDateTimePicker1.Text<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and t_ch_dui.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.Text+'''';
|
|
|
if wwDBDateTimePicker2.Text<>''then
|
|
|
str_tiaojian:=str_tiaojian+' and t_ch_dui.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.Text+'''';
|
|
|
if wwDBComboBox2.ItemIndex<>-1 then
|
|
|
str_tiaojian:=str_tiaojian+' and t_ch_dui.<2E><><EFBFBD><EFBFBD>='+''''
|
|
|
+inttostr((wwDBComboBox2.ItemIndex+1)*2-1)+'''';
|
|
|
if wwDBComboBox1.ItemIndex<>-1 then
|
|
|
begin
|
|
|
case wwDBComboBox1.ItemIndex of
|
|
|
0:
|
|
|
begin
|
|
|
str_tiaojian:=str_tiaojian+' and (v_dui_fee_all.RMBδ<42><CEB4><>0 or v_dui_fee_all.USDδ<44><CEB4><>0)';
|
|
|
end;
|
|
|
1:
|
|
|
begin
|
|
|
str_tiaojian:=str_tiaojian+' and v_dui_fee_all.RMBδ<42><CEB4>=0 and v_dui_fee_all.USDδ<44><CEB4>=0';
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
p_detail.close;
|
|
|
p_detail.Parameters.ParamByName('SQLStr').value:=str1+str_tiaojian;
|
|
|
p_detail.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dui_accept.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('Ӧ<>ն<EFBFBD><D5B6><EFBFBD>ͳ<EFBFBD><CDB3>',2,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dui_accept.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_rp_dui_accept.Hide;
|
|
|
frm_rp_dui_accept.ManualFloat(frm_rp_dui_accept.BoundsRect );
|
|
|
frm_main.freeTabs('frm_rp_dui_accept');
|
|
|
action:=cafree;
|
|
|
frm_rp_dui_accept:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dui_accept.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dui_accept.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
RxDBLookupCombo4.ClearValue;
|
|
|
wwDBDateTimePicker1.text:='';
|
|
|
wwDBDateTimePicker2.text:='';
|
|
|
wwDBComboBox2.ItemIndex:=-1;
|
|
|
wwDBComboBox1.ItemIndex:=-1;
|
|
|
end;
|
|
|
|
|
|
end.
|