|
|
unit u_rp_ch_balance_rate;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, dxExEdtr, DB, ADODB, dxDBGrid, dxDBTLCl, dxGrClms, dxTL,
|
|
|
dxDBCtrl, dxCntner, Mask, wwdbedit, Wwdotdot, Wwdbcomb, StdCtrls,
|
|
|
wwdbdatetimepicker, RxLookup, bsSkinCtrls, ComCtrls, bsSkinTabs;
|
|
|
|
|
|
type
|
|
|
Tfrm_rp_ch_balance_rate = 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;
|
|
|
p_sales: TADOStoredProc;
|
|
|
p_sales1: TDataSource;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column17: TdxDBGridMaskColumn;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGrid2Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column2: TdxDBGridColumn;
|
|
|
p_client: TADOStoredProc;
|
|
|
p_client1: TDataSource;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
p_balance: TADOStoredProc;
|
|
|
p_balance1: TDataSource;
|
|
|
dxDBGrid4: TdxDBGrid;
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridColumn;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_rp_ch_balance_rate: Tfrm_rp_ch_balance_rate;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_rate.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_rate.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption+'1');
|
|
|
frm_rp_ch_balance_rate.Hide;
|
|
|
frm_rp_ch_balance_rate.ManualFloat(frm_rp_ch_balance_rate.BoundsRect );
|
|
|
frm_main.freeTabs('frm_rp_ch_balance_rate');
|
|
|
action:=cafree;
|
|
|
frm_rp_ch_balance_rate:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_rate.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,false,caption+'1');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_rate.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',2,nil,nil,nil,nil,p_detail1,p_sales1,p_client1,p_balance1,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_rate.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
RxDBLookupCombo4.ClearValue;
|
|
|
wwDBDateTimePicker1.text:='';
|
|
|
wwDBDateTimePicker2.text:='';
|
|
|
wwDBComboBox2.ItemIndex:=-1;
|
|
|
wwDBComboBox1.ItemIndex:=-1;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_ch_balance_rate.bsSkinButton10Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
str:=' where '+open_data('0039','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no');
|
|
|
if RxDBLookupCombo2.DisplayValue<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
|
if RxDBLookupCombo4.DisplayValue<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo4.DisplayValues[0]+'''';
|
|
|
if wwDBComboBox2.text<>''then
|
|
|
str:=str+' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBComboBox2.text+'''';
|
|
|
if wwDBComboBox1.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBComboBox1.text+'''';
|
|
|
if wwDBDateTimePicker1.Text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.Text+'''';
|
|
|
if wwDBDateTimePicker2.Text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.Text+'''';
|
|
|
p_detail.close;
|
|
|
p_detail.Parameters.ParamByName('SQLStr').value:='select * from v_fee_rate_op '+str
|
|
|
+' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
p_detail.open;
|
|
|
|
|
|
p_sales.close;
|
|
|
p_sales.Parameters.ParamByName('SQLStr').value:='select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_fee_rate_op '+str
|
|
|
+' group by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
p_sales.open;
|
|
|
|
|
|
p_client.close;
|
|
|
p_client.Parameters.ParamByName('SQLStr').value:='select <20><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>,SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_fee_rate_op '+str
|
|
|
+' group by <20><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD> order by <20><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>';
|
|
|
p_client.open;
|
|
|
|
|
|
p_balance.close;
|
|
|
p_balance.Parameters.ParamByName('SQLStr').value:='select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) AS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_fee_rate_op '+str
|
|
|
+' group by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
p_balance.open;
|
|
|
end;
|
|
|
|
|
|
end.
|