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.
143 lines
4.3 KiB
Plaintext
143 lines
4.3 KiB
Plaintext
unit u_ch_zhipiao_query;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, wwdbdatetimepicker, StdCtrls, RxLookup, wwdblook, bsSkinCtrls,
|
|
BusinessSkinForm;
|
|
|
|
type
|
|
Tfrm_ch_zhipiao_query = class(TForm)
|
|
Label13: TLabel;
|
|
RxDBLookupCombo5: TRxDBLookupCombo;
|
|
Label6: TLabel;
|
|
Edit1: TEdit;
|
|
Label10: TLabel;
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
Label5: TLabel;
|
|
bsSkinButton1: TbsSkinButton;
|
|
bsSkinButton10: TbsSkinButton;
|
|
bsSkinButton5: TbsSkinButton;
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
Label9: TLabel;
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
Label1: TLabel;
|
|
Edit2: TEdit;
|
|
Label37: TLabel;
|
|
ComboBox1: TComboBox;
|
|
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_ch_zhipiao_query: Tfrm_ch_zhipiao_query;
|
|
zhipiao_query_type:integer;
|
|
|
|
|
|
implementation
|
|
|
|
uses my_sys_function, u_data_share, u_ch_balance_pay, u_ch_balance_accept;
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure Tfrm_ch_zhipiao_query.bsSkinButton5Click(Sender: TObject);
|
|
begin
|
|
close;
|
|
end;
|
|
|
|
procedure Tfrm_ch_zhipiao_query.bsSkinButton10Click(Sender: TObject);
|
|
begin
|
|
Edit1.text:='';
|
|
Edit2.text:='';
|
|
RxDBLookupCombo5.ClearValue;
|
|
wwDBDateTimePicker1.text:='';
|
|
wwDBDateTimePicker2.text:='';
|
|
RxDBLookupCombo2.ClearValue;
|
|
ComboBox1.Text:='';
|
|
end;
|
|
|
|
procedure Tfrm_ch_zhipiao_query.bsSkinButton1Click(Sender: TObject);
|
|
var
|
|
str:widestring;
|
|
begin
|
|
case zhipiao_query_type of
|
|
1: begin
|
|
str:='SELECT * FROM t_ch_zhipiao where 1=1 ';
|
|
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 RxDBLookupCombo2.DisplayValue<>''then
|
|
str:=str+' and ¿Í»§Ãû³Æ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
if Edit2.text<>''then
|
|
str:=str+' and ֧Ʊ½ð¶î='+Edit2.text;
|
|
if ComboBox1.Text<>'' then
|
|
str:=str+' and ±Ò±ð='+''''+ComboBox1.Text+'''';
|
|
frm_ch_balance_pay.t_ch_zhipiao.close;
|
|
frm_ch_balance_pay.t_ch_zhipiao.sql.text:=str;
|
|
frm_ch_balance_pay.t_ch_zhipiao.open;
|
|
if frm_ch_balance_pay.t_ch_zhipiao.isempty then
|
|
showmessage('ûÓмìË÷³öÐÅÏ¢£¡£¡')
|
|
else
|
|
close;
|
|
|
|
end;
|
|
2: begin
|
|
str:='SELECT * FROM t_ch_jinzhang where 1=1 ';
|
|
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 RxDBLookupCombo2.DisplayValue<>''then
|
|
str:=str+' and ¿Í»§Ãû³Æ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
if Edit2.text<>''then
|
|
str:=str+' and Ʊ¾Ý½ð¶î='+Edit2.text;
|
|
if ComboBox1.Text<>'' then
|
|
str:=str+' and ±Ò±ð='+''''+ComboBox1.Text+'''';
|
|
frm_ch_balance_accept.t_ch_jinzhang.close;
|
|
frm_ch_balance_accept.t_ch_jinzhang.sql.text:=str;
|
|
frm_ch_balance_accept.t_ch_jinzhang.open;
|
|
if frm_ch_balance_accept.t_ch_jinzhang.isempty then
|
|
showmessage('ûÓмìË÷³öÐÅÏ¢£¡£¡')
|
|
else
|
|
close;
|
|
|
|
end;
|
|
|
|
end;
|
|
{
|
|
if frm_info_price_manage.t_price_ship.isempty then
|
|
showmessage('ûÓмìË÷³öÐÅÏ¢£¡£¡')
|
|
else
|
|
close;
|
|
}
|
|
end;
|
|
|
|
procedure Tfrm_ch_zhipiao_query.Edit1KeyPress(Sender: TObject;
|
|
var Key: Char);
|
|
begin
|
|
if key=#13 then
|
|
begin
|
|
key:=#0;
|
|
frm_ch_zhipiao_query.bsSkinButton1Click(Sender);
|
|
end;
|
|
end;
|
|
|
|
end.
|