unit u_info_price_query; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, wwdbdatetimepicker, StdCtrls, RxLookup, wwdblook, bsSkinCtrls, BusinessSkinForm; type Tfrm_info_price_query = class(TForm) Label124: TLabel; Label20: TLabel; wwDBLookupCombo3: TwwDBLookupCombo; wwDBLookupCombo52: TwwDBLookupCombo; Label13: TLabel; RxDBLookupCombo5: TRxDBLookupCombo; Label6: TLabel; Edit1: TEdit; Label10: TLabel; wwDBDateTimePicker1: TwwDBDateTimePicker; wwDBDateTimePicker2: TwwDBDateTimePicker; wwDBDateTimePicker4: TwwDBDateTimePicker; Label11: TLabel; Label5: TLabel; wwDBDateTimePicker3: TwwDBDateTimePicker; Label8: TLabel; bsSkinButton1: TbsSkinButton; bsSkinButton10: TbsSkinButton; bsSkinButton5: TbsSkinButton; bsBusinessSkinForm1: TbsBusinessSkinForm; Label9: TLabel; RxDBLookupCombo2: TRxDBLookupCombo; Label21: TLabel; RxDBLookupCombo20: TRxDBLookupCombo; wwDBLookupCombo1: TwwDBLookupCombo; Label1: TLabel; procedure bsSkinButton5Click(Sender: TObject); procedure bsSkinButton10Click(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); procedure Edit1KeyPress(Sender: TObject; var Key: Char); private { Private declarations } public { Public declarations } end; var frm_info_price_query: Tfrm_info_price_query; implementation uses u_info_price_manage, my_sys_function, u_data_share; {$R *.dfm} procedure Tfrm_info_price_query.bsSkinButton5Click(Sender: TObject); begin close; end; procedure Tfrm_info_price_query.bsSkinButton10Click(Sender: TObject); begin Edit1.text:=''; RxDBLookupCombo5.ClearValue; wwDBDateTimePicker1.text:=''; wwDBDateTimePicker2.text:=''; wwDBDateTimePicker3.text:=''; wwDBDateTimePicker4.text:=''; wwDBLookupCombo3.text:=''; wwDBLookupCombo52.text:=''; RxDBLookupCombo2.ClearValue; RxDBLookupCombo20.ClearValue; wwDBLookupCombo1.TEXT:=''; end; procedure Tfrm_info_price_query.bsSkinButton1Click(Sender: TObject); var str:widestring; begin str:='SELECT * FROM t_price_ship where '+open_data('3001','录入人','no','no','no','no'); if Edit1.text<>''then str:=str+' and 合约编号 like '+''''+'%'+Edit1.text+'%'+''''; if RxDBLookupCombo5.DisplayValue<>''then str:=str+' and 录入人='+''''+RxDBLookupCombo5.DisplayValue+''''; if wwDBDateTimePicker1.text<>''then str:=str+' and 有效日期>='+''''+wwDBDateTimePicker1.text+''''; if wwDBDateTimePicker2.text<>''then str:=str+' and 有效日期<='+''''+wwDBDateTimePicker2.text+''''; if wwDBDateTimePicker3.text<>''then str:=str+' and 录入日期>='+''''+wwDBDateTimePicker3.text+''''; if wwDBDateTimePicker4.text<>''then str:=str+' and 录入日期<='+''''+wwDBDateTimePicker4.text+''''; if wwDBLookupCombo3.text<>''then str:=str+' and 启运港 like '+''''+'%'+wwDBLookupCombo3.text+'%'+''''; if wwDBLookupCombo52.text<>''then str:=str+' and 目的港 like '+''''+'%'+wwDBLookupCombo52.text+'%'+''''; if wwDBLookupCombo1.text<>''then str:=str+' and 目的港中文 like '+''''+'%'+wwDBLookupCombo1.text+'%'+''''; if RxDBLookupCombo2.DisplayValue<>''then str:=str+' and 船公司='+''''+RxDBLookupCombo2.DisplayValues[1]+''''; if RxDBLookupCombo20.DisplayValue<>''then str:=str+' and 航线='+''''+RxDBLookupCombo20.DisplayValues[1]+''''; frm_info_price_manage.t_price_ship.close; frm_info_price_manage.t_price_ship.sql.Clear; frm_info_price_manage.t_price_ship.sql.add(str); frm_info_price_manage.t_price_ship.sql.add(' order by 运价编号'); frm_info_price_manage.t_price_ship.open; if frm_info_price_manage.t_price_ship.isempty then showmessage('没有检索出信息!!') else close; end; procedure Tfrm_info_price_query.Edit1KeyPress(Sender: TObject; var Key: Char); begin if key=#13 then begin key:=#0; frm_info_price_query.bsSkinButton1Click(Sender); end; end; end.