unit u_ch_invoice_query;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, bsSkinCtrls, RxLookup, wwdbdatetimepicker,
StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb, ComCtrls, bsSkinTabs, DB,
ADODB, wwdblook;
type
Tfrm_ch_invoice_query = class(TForm)
bsSkinButton1: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
Label12: TLabel;
Label13: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
Label18: TLabel;
Label19: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
wwDBComboBox7: TwwDBComboBox;
Edit3: TEdit;
wwDBComboBox8: TwwDBComboBox;
Edit5: TEdit;
wwDBComboBox16: TwwDBComboBox;
Edit6: TEdit;
wwDBComboBox9: TwwDBComboBox;
Edit7: TEdit;
wwDBComboBox10: TwwDBComboBox;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBComboBox12: TwwDBComboBox;
wwDBDateTimePicker6: TwwDBDateTimePicker;
wwDBDateTimePicker7: TwwDBDateTimePicker;
wwDBComboBox13: TwwDBComboBox;
wwDBDateTimePicker8: TwwDBDateTimePicker;
wwDBComboBox20: TwwDBComboBox;
wwDBComboBox24: TwwDBComboBox;
RxDBLookupCombo5: TRxDBLookupCombo;
wwDBComboBox22: TwwDBComboBox;
RxDBLookupCombo6: TRxDBLookupCombo;
RxDBLookupCombo7: TRxDBLookupCombo;
wwDBComboBox23: TwwDBComboBox;
wwDBComboBox25: TwwDBComboBox;
RxDBLookupCombo8: TRxDBLookupCombo;
bsSkinTabSheet2: TbsSkinTabSheet;
Label25: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
Label33: TLabel;
Label34: TLabel;
Label35: TLabel;
Label36: TLabel;
wwDBComboBox26: TwwDBComboBox;
Edit8: TEdit;
wwDBComboBox27: TwwDBComboBox;
Edit9: TEdit;
wwDBComboBox28: TwwDBComboBox;
Edit10: TEdit;
wwDBComboBox29: TwwDBComboBox;
Edit11: TEdit;
wwDBComboBox30: TwwDBComboBox;
wwDBDateTimePicker9: TwwDBDateTimePicker;
wwDBComboBox31: TwwDBComboBox;
wwDBDateTimePicker10: TwwDBDateTimePicker;
wwDBComboBox32: TwwDBComboBox;
wwDBDateTimePicker11: TwwDBDateTimePicker;
wwDBComboBox33: TwwDBComboBox;
wwDBDateTimePicker12: TwwDBDateTimePicker;
RxDBLookupCombo9: TRxDBLookupCombo;
wwDBComboBox34: TwwDBComboBox;
RxDBLookupCombo10: TRxDBLookupCombo;
wwDBComboBox35: TwwDBComboBox;
wwDBComboBox36: TwwDBComboBox;
RxDBLookupCombo11: TRxDBLookupCombo;
wwDBComboBox37: TwwDBComboBox;
RxDBLookupCombo12: TRxDBLookupCombo;
bsSkinTabSheet3: TbsSkinTabSheet;
Label37: TLabel;
Label38: TLabel;
Label39: TLabel;
Label40: TLabel;
Label41: TLabel;
Label42: TLabel;
Label43: TLabel;
Label44: TLabel;
Label45: TLabel;
Label46: TLabel;
Label47: TLabel;
Label48: TLabel;
wwDBComboBox38: TwwDBComboBox;
Edit12: TEdit;
wwDBComboBox39: TwwDBComboBox;
Edit13: TEdit;
Edit14: TEdit;
wwDBComboBox40: TwwDBComboBox;
Edit15: TEdit;
wwDBComboBox41: TwwDBComboBox;
wwDBComboBox42: TwwDBComboBox;
wwDBDateTimePicker13: TwwDBDateTimePicker;
wwDBComboBox43: TwwDBComboBox;
wwDBDateTimePicker14: TwwDBDateTimePicker;
wwDBDateTimePicker15: TwwDBDateTimePicker;
wwDBComboBox44: TwwDBComboBox;
wwDBDateTimePicker16: TwwDBDateTimePicker;
wwDBComboBox45: TwwDBComboBox;
wwDBComboBox46: TwwDBComboBox;
RxDBLookupCombo13: TRxDBLookupCombo;
wwDBComboBox47: TwwDBComboBox;
RxDBLookupCombo14: TRxDBLookupCombo;
RxDBLookupCombo15: TRxDBLookupCombo;
wwDBComboBox48: TwwDBComboBox;
RxDBLookupCombo16: TRxDBLookupCombo;
wwDBComboBox49: TwwDBComboBox;
bsSkinTabSheet4: TbsSkinTabSheet;
Label49: TLabel;
Label50: TLabel;
Label51: TLabel;
Label52: TLabel;
Label53: TLabel;
Label54: TLabel;
Label55: TLabel;
Label56: TLabel;
Label57: TLabel;
Label58: TLabel;
Label59: TLabel;
Label60: TLabel;
wwDBComboBox50: TwwDBComboBox;
Edit16: TEdit;
wwDBComboBox51: TwwDBComboBox;
Edit17: TEdit;
Edit18: TEdit;
wwDBComboBox52: TwwDBComboBox;
Edit19: TEdit;
wwDBComboBox53: TwwDBComboBox;
wwDBComboBox54: TwwDBComboBox;
wwDBDateTimePicker17: TwwDBDateTimePicker;
wwDBComboBox55: TwwDBComboBox;
wwDBDateTimePicker18: TwwDBDateTimePicker;
wwDBDateTimePicker19: TwwDBDateTimePicker;
wwDBComboBox56: TwwDBComboBox;
wwDBDateTimePicker20: TwwDBDateTimePicker;
wwDBComboBox57: TwwDBComboBox;
wwDBComboBox58: TwwDBComboBox;
RxDBLookupCombo17: TRxDBLookupCombo;
wwDBComboBox59: TwwDBComboBox;
RxDBLookupCombo18: TRxDBLookupCombo;
RxDBLookupCombo19: TRxDBLookupCombo;
wwDBComboBox60: TwwDBComboBox;
RxDBLookupCombo20: TRxDBLookupCombo;
wwDBComboBox61: TwwDBComboBox;
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinGroupBox2: TbsSkinGroupBox;
Label63: TLabel;
Label64: TLabel;
Label65: TLabel;
Label68: TLabel;
Label70: TLabel;
Label72: TLabel;
wwDBComboBox64: TwwDBComboBox;
RxDBLookupCombo21: TRxDBLookupCombo;
wwDBComboBox67: TwwDBComboBox;
RxDBLookupCombo22: TRxDBLookupCombo;
wwDBDateTimePicker21: TwwDBDateTimePicker;
RxDBLookupCombo24: TRxDBLookupCombo;
wwDBDateTimePicker24: TwwDBDateTimePicker;
wwDBComboBox68: TwwDBComboBox;
wwDBComboBox69: TwwDBComboBox;
wwDBComboBox71: TwwDBComboBox;
wwDBComboBox73: TwwDBComboBox;
wwDBComboBox74: TwwDBComboBox;
Label62: TLabel;
wwDBComboBox63: TwwDBComboBox;
Edit21: TEdit;
Label71: TLabel;
wwDBComboBox70: TwwDBComboBox;
Edit22: TEdit;
Label6: TLabel;
wwDBComboBox15: TwwDBComboBox;
Edit2: TEdit;
Label10: TLabel;
wwDBComboBox18: TwwDBComboBox;
wwDBDateTimePicker1: TwwDBDateTimePicker;
Label5: TLabel;
wwDBComboBox6: TwwDBComboBox;
wwDBDateTimePicker2: TwwDBDateTimePicker;
wwDBDateTimePicker4: TwwDBDateTimePicker;
wwDBComboBox11: TwwDBComboBox;
Label11: TLabel;
Label14: TLabel;
wwDBComboBox14: TwwDBComboBox;
RxDBLookupCombo3: TRxDBLookupCombo;
RxDBLookupCombo4: TRxDBLookupCombo;
wwDBDateTimePicker3: TwwDBDateTimePicker;
wwDBComboBox19: TwwDBComboBox;
wwDBComboBox5: TwwDBComboBox;
Label8: TLabel;
Label4: TLabel;
Label1: TLabel;
wwDBComboBox1: TwwDBComboBox;
Label2: TLabel;
wwDBComboBox2: TwwDBComboBox;
wwDBComboBox3: TwwDBComboBox;
Label3: TLabel;
wwDBComboBox4: TwwDBComboBox;
wwDBComboBox17: TwwDBComboBox;
Label7: TLabel;
wwDBComboBox21: TwwDBComboBox;
Edit4: TEdit;
Label9: TLabel;
wwDBComboBox62: TwwDBComboBox;
t_ch_invoice_head: TADOQuery;
t_ch_invoice_head1: TDataSource;
wwDBLookupCombo1: TwwDBLookupCombo;
Edit1: TEdit;
Label61: TLabel;
wwDBComboBox65: TwwDBComboBox;
RxDBLookupCombo1: TRxDBLookupCombo;
Label66: TLabel;
wwDBComboBox66: TwwDBComboBox;
RxDBLookupCombo2: TRxDBLookupCombo;
Label67: TLabel;
wwDBComboBox72: TwwDBComboBox;
RxDBLookupCombo23: TRxDBLookupCombo;
Label69: TLabel;
wwDBComboBox75: TwwDBComboBox;
RxDBLookupCombo25: TRxDBLookupCombo;
wwDBComboBox76: TwwDBComboBox;
Label73: TLabel;
wwDBComboBox77: TwwDBComboBox;
Label74: TLabel;
wwDBComboBox78: TwwDBComboBox;
Edit20: TEdit;
procedure FormShow(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure wwDBComboBox63KeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_ch_invoice_query: Tfrm_ch_invoice_query;
inv_query_type:integer;
inv_query_limited:string;
inv_query_op_limited:string;
implementation
uses u_data_share, u_ch_invoice, my_sys_function, u_ch_balance_accept,
u_ch_invoice_jk;
{$R *.dfm}
procedure Tfrm_ch_invoice_query.FormShow(Sender: TObject);
begin
wwDBComboBox63.text:='ģ<> <C4A3> ';
wwDBComboBox21.text:='ģ<> <C4A3> ';
wwDBComboBox69.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox70.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox71.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox73.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox18.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox19.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox64.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox74.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox1.text:='ģ<> <C4A3> ';
wwDBComboBox67.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox15.text:='ģ<> <C4A3> ';
wwDBComboBox6.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox11.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox14.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox62.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox7.text:='ģ<> <C4A3> ';
wwDBComboBox16.text:='ģ<> <C4A3> ';
wwDBComboBox10.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox20.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox24.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox25.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox8.text:='ģ<> <C4A3> ';
wwDBComboBox9.text:='ģ<> <C4A3> ';
wwDBComboBox12.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox13.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox22.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox23.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox26.text:='ģ<> <C4A3> ';
wwDBComboBox28.text:='ģ<> <C4A3> ';
wwDBComboBox30.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox32.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox35.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox36.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox27.text:='ģ<> <C4A3> ';
wwDBComboBox29.text:='ģ<> <C4A3> ';
wwDBComboBox31.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox33.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox34.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox37.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox38.text:='ģ<> <C4A3> ';
wwDBComboBox39.text:='ģ<> <C4A3> ';
wwDBComboBox40.text:='ģ<> <C4A3> ';
wwDBComboBox41.text:='ģ<> <C4A3> ';
wwDBComboBox42.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox43.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox44.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox45.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox46.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox47.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox48.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox49.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox50.text:='ģ<> <C4A3> ';
wwDBComboBox51.text:='ģ<> <C4A3> ';
wwDBComboBox52.text:='ģ<> <C4A3> ';
wwDBComboBox53.text:='ģ<> <C4A3> ';
wwDBComboBox54.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox55.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox56.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox57.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox58.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox59.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox60.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox61.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox65.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox66.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox72.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox75.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox78.Text:='ģ<> <C4A3> ';
wwDBComboBox4.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox2.text:='<27> <> <EFBFBD> <EFBFBD> ';
wwDBComboBox77.text:='<27> <> <EFBFBD> <EFBFBD> ';
frm_data_share.t_crm_client_all.requery;
frm_data_share.t_code_currency.requery;
frm_data_share.t_sys_employee.requery;
t_ch_invoice_head.OPEN;
end;
procedure Tfrm_ch_invoice_query.bsSkinButton10Click(Sender: TObject);
begin
Edit21.text:='';
Edit4.text:='';
wwDBComboBox68.text:='';
Edit22.text:='';
wwDBDateTimePicker24.text:='';
RxDBLookupCombo24.ClearValue;
wwDBDateTimePicker1.text:='';
wwDBDateTimePicker3.text:='';
RxDBLookupCombo4.ClearValue;
RxDBLookupCombo21.ClearValue;
Edit1.text:='';
RxDBLookupCombo22.ClearValue;
wwDBDateTimePicker21.text:='';
Edit2.text:='';
wwDBDateTimePicker2.text:='';
wwDBDateTimePicker4.text:='';
RxDBLookupCombo3.ClearValue;
Edit1.text:='';
Edit3.text:='';
Edit6.text:='';
wwDBDateTimePicker5.Clear;
wwDBDateTimePicker8.Clear;
RxDBLookupCombo5.ClearValue;
RxDBLookupCombo8.ClearValue;
Edit5.text:='';
Edit7.text:='';
wwDBDateTimePicker6.Clear;
wwDBDateTimePicker7.Clear;
RxDBLookupCombo6.ClearValue;
RxDBLookupCombo7.ClearValue;
Edit8.text:='';
Edit10.text:='';
wwDBDateTimePicker9.Clear;
wwDBDateTimePicker11.Clear;
RxDBLookupCombo10.ClearValue;
RxDBLookupCombo11.ClearValue;
Edit9.text:='';
Edit11.text:='';
wwDBDateTimePicker10.Clear;
wwDBDateTimePicker12.Clear;
RxDBLookupCombo9.ClearValue;
RxDBLookupCombo12.ClearValue;
RxDBLookupCombo1.ClearValue;
RxDBLookupCombo2.ClearValue;
RxDBLookupCombo23.ClearValue;
RxDBLookupCombo25.ClearValue;
end;
procedure Tfrm_ch_invoice_query.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_ch_invoice_query.bsSkinButton1Click(Sender: TObject);
var
str,str_in,str_shen,op_string,str_invno:widestring;
begin
//str_in:=query_tiaojian(1,str_in,'<27> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> ',wwDBComboBox63.text,Edit21.text);
str_in:=query_tiaojian(1,str_in,'<27> ͻ<EFBFBD> <CDBB> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox64.text,RxDBLookupCombo21.DisplayValues[1]);
str_in:=query_tiaojian(1,str_in,'<27> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> ',wwDBComboBox69.text,wwDBComboBox68.text);
str_in:=query_tiaojian(1,str_in,'<27> <> Ʊ̧ͷ',wwDBComboBox1.text,wwDBLookupCombo1.text);
str_in:=query_tiaojian(2,str_in,'<27> ϼƽ <CFBC> <C6BD> <EFBFBD> ',wwDBComboBox70.text,Edit22.text);
str_in:=query_tiaojian(1,str_in,'<27> ұ<EFBFBD> ',wwDBComboBox74.text,RxDBLookupCombo22.DisplayValues[0]);
str_in:=query_tiaojian(1,str_in,'<27> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> ',wwDBComboBox71.text,wwDBDateTimePicker24.text);
str_in:=query_tiaojian(1,str_in,'<27> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> ',wwDBComboBox67.text,wwDBDateTimePicker21.text);
str_in:=query_tiaojian(1,str_in,'<27> Ƶ<EFBFBD> <C6B5> <EFBFBD> ',wwDBComboBox73.text,RxDBLookupCombo24.DisplayValues[0]);
str_in:=query_tiaojian(3,str_in,'<27> Ƿ<EFBFBD> <C7B7> ϳ <EFBFBD> ',wwDBComboBox2.text,wwDBComboBox3.text);
str_in:=query_tiaojian(3,str_in,'<27> Ƿ<EFBFBD> <C7B7> <EFBFBD> ӡ',wwDBComboBox4.text,wwDBComboBox17.text);
str_in:=query_tiaojian(1,str_in,'ί<> б <EFBFBD> <D0B1> <EFBFBD> ',wwDBComboBox62.text,Edit1.text);
str_in:=query_tiaojian(1,str_in,'<27> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> ',wwDBComboBox77.text,wwDBComboBox76.text);
if (Edit20.text<>'') then begin
str_invno:=query_tiaojian(1,str_invno,'<27> <> Ʊ<EFBFBD> <C6B1> ',wwDBComboBox78.text,Edit20.text);
end;
if (Edit21.text<>'')and(Edit4.text<>'') then
begin
if str_in='' then
str_in:='where <20> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> between '+''''+Edit21.text+''''+' and '+''''+Edit4.text+''''
else
str_in:=str_in+' and <20> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> between '+''''+Edit21.text+''''+' and '+''''+Edit4.text+'''';
end
else
begin
str_in:=query_tiaojian(1,str_in,'<27> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> ',wwDBComboBox63.text,Edit21.text);
str_in:=query_tiaojian(1,str_in,'<27> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> ',wwDBComboBox21.text,Edit4.text);
end;
str_shen:=query_tiaojian(1,str_shen,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox15.text,Edit2.text);
str_shen:=query_tiaojian(1,str_shen,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox18.text,wwDBDateTimePicker1.text);
str_shen:=query_tiaojian(1,str_shen,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox6.text,wwDBDateTimePicker2.text);
str_shen:=query_tiaojian(1,str_shen,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox19.text,wwDBDateTimePicker3.text);
str_shen:=query_tiaojian(1,str_shen,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox11.text,wwDBDateTimePicker4.text);
str_shen:=query_tiaojian(1,str_shen,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox5.text,RxDBLookupCombo4.DisplayValues[0]);
str_shen:=query_tiaojian(1,str_shen,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox14.text,RxDBLookupCombo3.DisplayValues[0]);
if bsSkinTabSheet1.Showing then
begin
op_string:=query_tiaojian(1,op_string,'ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox7.text,Edit3.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ',wwDBComboBox16.text,Edit6.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox10.text,wwDBDateTimePicker5.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ڼ<EFBFBD> ',wwDBComboBox20.text,wwDBDateTimePicker8.text);
op_string:=query_tiaojian(1,op_string,'<27> ͷ<EFBFBD> Ա',wwDBComboBox24.text,RxDBLookupCombo5.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> Ա',wwDBComboBox25.text,RxDBLookupCombo8.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'ί<> б <EFBFBD> <D0B1> <EFBFBD> ',wwDBComboBox8.text,Edit5.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ',wwDBComboBox9.text,Edit7.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox12.text,wwDBDateTimePicker6.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ڼ<EFBFBD> ',wwDBComboBox13.text,wwDBDateTimePicker7.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox22.text,RxDBLookupCombo6.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'¼<> <C2BC> <EFBFBD> <EFBFBD> ',wwDBComboBox23.text,RxDBLookupCombo7.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'<27> ֲ<EFBFBD> <D6B2> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox65.text,RxDBLookupCombo1.DisplayValue);
if trim(op_string)<>''then
op_string:='(select <20> <> <EFBFBD> <EFBFBD> from t_op_seae '+op_string+')';
end;
if bsSkinTabSheet2.Showing then
begin
op_string:=query_tiaojian(1,op_string,'ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox26.text,Edit8.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ',wwDBComboBox28.text,Edit10.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox30.text,wwDBDateTimePicker9.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ڼ<EFBFBD> ',wwDBComboBox32.text,wwDBDateTimePicker11.text);
op_string:=query_tiaojian(1,op_string,'<27> ͷ<EFBFBD> Ա',wwDBComboBox35.text,RxDBLookupCombo10.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> Ա',wwDBComboBox36.text,RxDBLookupCombo11.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'ί<> б <EFBFBD> <D0B1> <EFBFBD> ',wwDBComboBox27.text,Edit9.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ',wwDBComboBox29.text,Edit11.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox31.text,wwDBDateTimePicker10.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ڼ<EFBFBD> ',wwDBComboBox33.text,wwDBDateTimePicker12.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox34.text,RxDBLookupCombo9.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'¼<> <C2BC> <EFBFBD> <EFBFBD> ',wwDBComboBox37.text,RxDBLookupCombo12.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'<27> ֲ<EFBFBD> <D6B2> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox66.text,RxDBLookupCombo2.DisplayValue);
if trim(op_string)<>''then
op_string:='(select <20> <> <EFBFBD> <EFBFBD> from t_op_seai '+op_string+')';
end;
if bsSkinTabSheet3.Showing then
begin
op_string:=query_tiaojian(1,op_string,'ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox38.text,Edit12.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> ˵<EFBFBD> <CBB5> <EFBFBD> ',wwDBComboBox41.text,Edit15.text);
op_string:=query_tiaojian(1,op_string,'ί<> б <EFBFBD> <D0B1> <EFBFBD> ',wwDBComboBox39.text,Edit13.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> ˵<EFBFBD> <CBB5> <EFBFBD> ',wwDBComboBox40.text,Edit14.text);
op_string:=query_tiaojian(1,op_string,'һ <> ̿<EFBFBD> <CCBF> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox42.text,wwDBDateTimePicker13.text);
op_string:=query_tiaojian(1,op_string,'һ <> ̿<EFBFBD> <CCBF> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox43.text,wwDBDateTimePicker14.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ڼ<EFBFBD> ',wwDBComboBox45.text,wwDBDateTimePicker16.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ڼ<EFBFBD> ',wwDBComboBox44.text,wwDBDateTimePicker15.text);
op_string:=query_tiaojian(1,op_string,'<27> ͷ<EFBFBD> Ա',wwDBComboBox46.text,RxDBLookupCombo13.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> Ա',wwDBComboBox49.text,RxDBLookupCombo16.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox47.text,RxDBLookupCombo14.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'¼<> <C2BC> <EFBFBD> <EFBFBD> ',wwDBComboBox48.text,RxDBLookupCombo15.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'<27> ֲ<EFBFBD> <D6B2> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox72.text,RxDBLookupCombo23.DisplayValue);
if trim(op_string)<>''then
op_string:='(select <20> <> <EFBFBD> <EFBFBD> from t_op_aire '+op_string+')';
end;
if bsSkinTabSheet4.Showing then
begin
op_string:=query_tiaojian(1,op_string,'ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox50.text,Edit16.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> ˵<EFBFBD> <CBB5> <EFBFBD> ',wwDBComboBox53.text,Edit19.text);
op_string:=query_tiaojian(1,op_string,'ί<> б <EFBFBD> <D0B1> <EFBFBD> ',wwDBComboBox51.text,Edit17.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> ˵<EFBFBD> <CBB5> <EFBFBD> ',wwDBComboBox52.text,Edit18.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox54.text,wwDBDateTimePicker17.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox55.text,wwDBDateTimePicker18.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ڼ<EFBFBD> ',wwDBComboBox57.text,wwDBDateTimePicker20.text);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ڼ<EFBFBD> ',wwDBComboBox56.text,wwDBDateTimePicker19.text);
op_string:=query_tiaojian(1,op_string,'<27> ͷ<EFBFBD> Ա',wwDBComboBox58.text,RxDBLookupCombo17.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> Ա',wwDBComboBox61.text,RxDBLookupCombo20.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox59.text,RxDBLookupCombo18.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'¼<> <C2BC> <EFBFBD> <EFBFBD> ',wwDBComboBox60.text,RxDBLookupCombo19.DisplayValues[0]);
op_string:=query_tiaojian(1,op_string,'<27> ֲ<EFBFBD> <D6B2> <EFBFBD> <EFBFBD> <EFBFBD> ',wwDBComboBox75.text,RxDBLookupCombo25.DisplayValue);
if trim(op_string)<>''then
op_string:='(select <20> <> <EFBFBD> <EFBFBD> from t_op_airi '+op_string+')';
end;
if str_shen<>'' then
begin
str:='(select <20> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> from t_ch_invoice_shen '+str_shen;
if op_string<>''then
str:=str+' and <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> in (select <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> from t_ch_fee_do where <20> <> <EFBFBD> <EFBFBD> ='+''''+'1'+''''
+' and ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> in '+op_string+')';
str:=str+')';
end
else
begin
if op_string<>''then
str:='(select <20> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> from t_ch_invoice where <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> in (select <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> from t_ch_fee_do where <20> <> <EFBFBD> <EFBFBD> ='+''''+'1'+''''
+' and ҵ<> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> in '+op_string+'))';
end;
str_shen:=str;
///(case when t_ch_fee_do.ԭʼ <D4AD> <CABC> <EFBFBD> <EFBFBD> <0 then t_ch_fee_do.ԭʼ <D4AD> <CABC> <EFBFBD> <EFBFBD> end)<(t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> -t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ) )
if (str_in='') then begin
if str_invno<>''then
str_in:=str_in+' where <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> in (select <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> from t_ch_invoice_invno '+str_invno+')'
end else begin
if str_invno<>''then
str_in:=str_in+' and <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> in (select <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> from t_ch_invoice_invno '+str_invno+')';
end;
if str_in<>''then
begin
str:='select * from t_ch_invoice '+str_in;
if str_shen<>''then
str:=str+' and <20> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> in '+str_shen;
if inv_query_type=7 then
begin
str:=str+' and <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <>'''' and (<28> Ƿ<EFBFBD> <C7B7> շ<EFBFBD> =0 or <20> Ƿ<EFBFBD> <C7B7> շ<EFBFBD> is null) and (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> NOT IN (SELECT DISTINCT t_ch_fee_do.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '
+' FROM t_ch_fee_do INNER JOIN t_ch_fee ON t_ch_fee_do.CH_ID = t_ch_fee.CH_ID '
+' AND (case when t_ch_fee_do.ԭʼ <D4AD> <CABC> <EFBFBD> <EFBFBD> <0 then t_ch_fee_do.ԭʼ <D4AD> <CABC> <EFBFBD> <EFBFBD> end)<(t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> -t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> )'
//+' AND t_ch_fee_do.ԭʼ <D4AD> <CABC> <EFBFBD> <EFBFBD> >(t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> -t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ) '
+' AND t_ch_fee_do.<2E> <> <EFBFBD> <EFBFBD> = '+''''+'1'+''''+')) ';
end;
str:=str+' order by <20> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> ';
end
else
begin
str:='select * from t_ch_invoice ';
if str_shen<>''then begin
str:=str+' where <20> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> in '+str_shen;
if inv_query_type=7 then
begin
str:=str+' and <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <>'''' and (<28> Ƿ<EFBFBD> <C7B7> շ<EFBFBD> =0 or <20> Ƿ<EFBFBD> <C7B7> շ<EFBFBD> is null) and (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> NOT IN (SELECT DISTINCT t_ch_fee_do.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '
+' FROM t_ch_fee_do INNER JOIN t_ch_fee ON t_ch_fee_do.CH_ID = t_ch_fee.CH_ID '
+' AND (case when t_ch_fee_do.ԭʼ <D4AD> <CABC> <EFBFBD> <EFBFBD> <0 then t_ch_fee_do.ԭʼ <D4AD> <CABC> <EFBFBD> <EFBFBD> end)<(t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> -t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> )'
// +' AND t_ch_fee_do.ԭʼ <D4AD> <CABC> <EFBFBD> <EFBFBD> >(t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> -t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ) '
+'AND t_ch_fee_do.<2E> <> <EFBFBD> <EFBFBD> = '+''''+'1'+''''+')) ';
end;
end else begin
if inv_query_type=7 then
begin
str:=str+' where <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <>'''' and (<28> Ƿ<EFBFBD> <C7B7> շ<EFBFBD> =0 or <20> Ƿ<EFBFBD> <C7B7> շ<EFBFBD> is null) and (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> NOT IN (SELECT DISTINCT t_ch_fee_do.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '
+' FROM t_ch_fee_do INNER JOIN t_ch_fee ON t_ch_fee_do.CH_ID = t_ch_fee.CH_ID '
+' AND (case when t_ch_fee_do.ԭʼ <D4AD> <CABC> <EFBFBD> <EFBFBD> <0 then t_ch_fee_do.ԭʼ <D4AD> <CABC> <EFBFBD> <EFBFBD> end)<(t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> -t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> )'
//+'AND t_ch_fee_do.ԭʼ <D4AD> <CABC> <EFBFBD> <EFBFBD> >(t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> -t_ch_fee.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ) '
+'AND t_ch_fee_do.<2E> <> <EFBFBD> <EFBFBD> = '+''''+'1'+''''+')) ';
end;
end;
str:=str+' order by <20> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> ';
end;
//ShowMessage(str);
if inv_query_type=7 then
begin
frm_ch_balance_accept.t_ch_invoice_shen.Close;
frm_ch_balance_accept.t_ch_invoice_shen.sql.clear;
frm_ch_balance_accept.t_ch_invoice_shen.sql.add(str);
frm_ch_balance_accept.t_ch_invoice_shen.open;
if frm_ch_balance_accept.t_ch_invoice_shen.IsEmpty then
begin
showmessage('û<> м<EFBFBD> <D0BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 룡<EFBFBD> <EBA3A1> ');
exit;
end;
end else if inv_query_type=3 then
begin
frm_ch_invoice_jk.t_ch_invoice.close;
frm_ch_invoice_jk.t_ch_invoice.sql.clear;
frm_ch_invoice_jk.t_ch_invoice.sql.add(str);
frm_ch_invoice_jk.t_ch_invoice.open;
if frm_ch_invoice_jk.t_ch_invoice.isempty then
begin
showmessage('û<> м<EFBFBD> <D0BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ݣ<EFBFBD> <DDA3> <EFBFBD> ');
exit;
end;
end else begin
frm_ch_invoice.t_ch_invoice.close;
frm_ch_invoice.t_ch_invoice.sql.clear;
frm_ch_invoice.t_ch_invoice.sql.add(str);
frm_ch_invoice.t_ch_invoice.open;
if frm_ch_invoice.t_ch_invoice.isempty then
begin
showmessage('û<> м<EFBFBD> <D0BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ݣ<EFBFBD> <DDA3> <EFBFBD> ');
exit;
end;
end;
inv_query_type:=0;
close;
end;
procedure Tfrm_ch_invoice_query.wwDBComboBox63KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
frm_ch_invoice_query.bsSkinButton1Click(Sender);
end;
end;
end.