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.
DONGSHENG6/信息资源/u_info_price_person_query.pas

97 lines
2.6 KiB
Plaintext

unit u_info_price_person_query;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, RxLookup, wwdblook, StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb,
bsSkinCtrls, BusinessSkinForm, wwdbdatetimepicker;
type
Tfrm_info_price_person_query = class(TForm)
Label1: TLabel;
wwDBComboBox1: TwwDBComboBox;
Label2: TLabel;
Label3: TLabel;
wwDBLookupCombo52: TwwDBLookupCombo;
RxDBLookupCombo2: TRxDBLookupCombo;
Label4: TLabel;
bsSkinButton1: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsBusinessSkinForm1: TbsBusinessSkinForm;
wwDBDateTimePicker1: TwwDBDateTimePicker;
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure wwDBLookupCombo52KeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_info_price_person_query: Tfrm_info_price_person_query;
implementation
uses u_info_price_person, u_main, my_sys_function;
{$R *.dfm}
procedure Tfrm_info_price_person_query.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_info_price_person_query.bsSkinButton10Click(
Sender: TObject);
begin
wwDBComboBox1.Text:='';
RxDBLookupCombo2.ClearValue;
wwDBDateTimePicker1.Text:='';
wwDBLookupCombo52.Text:='';
end;
procedure Tfrm_info_price_person_query.bsSkinButton1Click(Sender: TObject);
var
str:widestring;
begin
str:='where 录入人='+''''+employee+'''' ; //+open_data('3008','录入人','no','no','no','no');
if wwDBComboBox1.Text<>''then
str:=str+' and 收付类别='+''''+wwDBComboBox1.Text+'''';
if wwDBDateTimePicker1.Text<>''then
str:=str+' and 有效日期>='+''''+wwDBDateTimePicker1.Text+'''';
if wwDBLookupCombo52.Text<>''then
str:=str+' and 卸货港 like '+''''+'%'+wwDBLookupCombo52.Text+'%'+'''';
if RxDBLookupCombo2.DisplayValue<>''then
str:=str+' and 客户名称='+''''+RxDBLookupCombo2.DisplayValue+'''';
with frm_info_price_person do
begin
t_price_prerson.Close;
t_price_prerson.sql.clear;
t_price_prerson.sql.add('select * from t_price_prerson '+str);
t_price_prerson.sql.add(' order by 收付类别,客户名称');
t_price_prerson.open;
if t_price_prerson.IsEmpty then
begin
showmessage('没有检索到符合条件的数据!');
exit;
end;
end;
close;
end;
procedure Tfrm_info_price_person_query.wwDBLookupCombo52KeyPress(
Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
key:=#0;
frm_info_price_person_query.bsSkinButton1Click(Sender);
end;
end;
end.