You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

180 lines
5.1 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit u_rp_yunfeibl_seae;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
RxMemDS, bsSkinCtrls, TeEngine, Series, TeeProcs, Chart, DbChart, DB,
ADODB, Menus, XPMenu, ExtCtrls,teeprevi, StdCtrls, Dialogs, ExtDlgs,
Mask, wwdbedit, Wwdotdot, Wwdbcomb, dxExEdtr, dxTL, dxDBCtrl, dxDBGrid,
dxCntner, wwdblook, RxLookup, wwdbdatetimepicker;
type
Tfrm_rp_yunfeibl_seae = class(TForm)
Panel1: TPanel;
p_client: TADOStoredProc;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton9: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinPanel3: TbsSkinPanel;
DBChart1: TDBChart;
LineSeries2: TBarSeries;
p_client1: TDataSource;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridColumn;
dxDBGrid1Column2: TdxDBGridColumn;
bsSkinButton1: TbsSkinButton;
SaveDialog1: TSaveDialog;
bsSkinPanel4: TbsSkinPanel;
bsSkinButton10: TbsSkinButton;
Label2: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
Label3: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
RxDBLookupCombo16: TRxDBLookupCombo;
Label38: TLabel;
Label25: TLabel;
wwDBComboBox31: TwwDBComboBox;
Label37: TLabel;
RxDBLookupCombo15: TRxDBLookupCombo;
wwDBComboBox1: TwwDBComboBox;
Label1: TLabel;
wwDBLookupCombo52: TwwDBLookupCombo;
Label124: TLabel;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure RxDBLookupCombo16Enter(Sender: TObject);
procedure RxDBLookupCombo16Exit(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_rp_yunfeibl_seae: Tfrm_rp_yunfeibl_seae;
fen_seae_str:widestring;
implementation
uses u_main, my_sys_function, u_sys_progress;
{$R *.dfm}
procedure Tfrm_rp_yunfeibl_seae.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_rp_yunfeibl_seae.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_rp_yunfeibl_seae.Hide;
frm_rp_yunfeibl_seae.ManualFloat(frm_rp_yunfeibl_seae.BoundsRect );
frm_main.freeTabs('frm_rp_yunfeibl_seae');
action:=cafree;
frm_rp_yunfeibl_seae:=nil;
end;
procedure Tfrm_rp_yunfeibl_seae.bsSkinButton9Click(Sender: TObject);
begin
chartpreview(frm_rp_yunfeibl_seae,dbchart1);
end;
procedure Tfrm_rp_yunfeibl_seae.bsSkinButton1Click(Sender: TObject);
begin
if SaveDialog1.Execute then
frm_rp_yunfeibl_seae.GetFormImage.SaveToFile(SaveDialog1.FileName+'.bmp');
end;
procedure Tfrm_rp_yunfeibl_seae.bsSkinButton10Click(Sender: TObject);
var
Str_bill,CNTRSTR:String;
begin
RxDBLookupCombo16.LookupDisplay:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
// RxDBLookupCombo1.LookupField:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
if wwDBDateTimePicker1.text<>'' then
begin
if str_bill='' then
str_bill:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+''''
else
str_bill:=str_bill+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
end;
if wwDBDateTimePicker2.text<>'' then
begin
if str_bill='' then
str_bill:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+''''
else
str_bill:=str_bill+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
end;
if RxDBLookupCombo16.DisplayValue<>'' then
begin
if str_bill='' then
str_bill:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo16.DisplayValues[1]+''''
else
str_bill:=str_bill+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo16.DisplayValues[1]+'''';
end;
if wwDBComboBox31.Text<>'' then
begin
if str_bill='' then
str_bill:=' where <20>ո<EFBFBD>='+''''+wwDBComboBox31.Text+''''
else
str_bill:=str_bill+' and <20>ո<EFBFBD>='+''''+wwDBComboBox31.Text+'''';
end;
if RxDBLookupCombo15.DisplayValue<>'' then
begin
if str_bill='' then
str_bill:=' where ԭʼ<D4AD>ұ<EFBFBD>='+''''+RxDBLookupCombo15.DisplayValue+''''
else
str_bill:=str_bill+' and ԭʼ<D4AD>ұ<EFBFBD>='+''''+RxDBLookupCombo15.DisplayValue+'''';
end;
if wwDBLookupCombo52.Text<>'' then
begin
if str_bill='' then
str_bill:=' where ж<><D0B6><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo52.Text+''''
else
str_bill:=str_bill+' and ж<><D0B6><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo52.Text+'''';
end;
if wwDBComboBox1.Text<>'' then
begin
CntrStr:=StringReplace(wwDBComboBox1.Text,'''','''''',[rfReplaceAll]);
if str_bill='' then
str_bill:=' where <20><>׼='+''''+CntrStr+''''
else
str_bill:=str_bill+' and <20><>׼='+''''+CntrStr+'''';
end;
p_client.close;
p_client.Parameters.ParamByName('SQLStr').value:=
'select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>)/sum(<28><><EFBFBD><EFBFBD>) as ƽ<><C6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_fee_fenxi_items '
+str_bill+' group by <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
p_client.open;
// RxDBLookupCombo1.LookupField:='<27><><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_rp_yunfeibl_seae.RxDBLookupCombo16Enter(Sender: TObject);
begin
// RxDBLookupCombo16.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_rp_yunfeibl_seae.RxDBLookupCombo16Exit(Sender: TObject);
begin
// RxDBLookupCombo16.LookupDisplay:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
end.