|
|
unit u_rp_dui_pay;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, dxExEdtr, dxDBGrid, dxDBTLCl, dxGrClms, dxTL, dxDBCtrl,
|
|
|
dxCntner, DB, ADODB, Mask, wwdbedit, Wwdotdot, Wwdbcomb, StdCtrls,
|
|
|
wwdbdatetimepicker, RxLookup, bsSkinCtrls;
|
|
|
|
|
|
type
|
|
|
Tfrm_rp_dui_pay = 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_pay: Tfrm_rp_dui_pay;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_rp_dui_pay.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dui_pay.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 '+''''+'2'+''''+' then '+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+''''+' else '
|
|
|
+'(case t_ch_dui.<2E><><EFBFBD><EFBFBD> when '+''''+'4'+''''+' then '+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+''''+' else '
|
|
|
+'(case t_ch_dui.<2E><><EFBFBD><EFBFBD> when '+''''+'6'+''''+' then '+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+''''+' else '
|
|
|
+'(case t_ch_dui.<2E><><EFBFBD><EFBFBD> when '+''''+'8'+''''+' 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 ('+''''+'2'+''''+','+''''+'4'+''''
|
|
|
+','+''''+'6'+''''+','+''''+'8'+''''+')'
|
|
|
+' 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)+'''';
|
|
|
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_pay.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3>',2,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dui_pay.FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_rp_dui_pay.Hide;
|
|
|
frm_rp_dui_pay.ManualFloat(frm_rp_dui_pay.BoundsRect );
|
|
|
frm_main.freeTabs('frm_rp_dui_pay');
|
|
|
action:=cafree;
|
|
|
frm_rp_dui_pay:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dui_pay.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_dui_pay.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
RxDBLookupCombo4.ClearValue;
|
|
|
wwDBDateTimePicker1.text:='';
|
|
|
wwDBDateTimePicker2.text:='';
|
|
|
wwDBComboBox2.ItemIndex:=-1;
|
|
|
wwDBComboBox1.ItemIndex:=-1;
|
|
|
end;
|
|
|
|
|
|
end.
|