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.

644 lines
22 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_dui_query;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, ComCtrls, bsSkinTabs, wwdbdatetimepicker,
RxLookup, StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb, bsSkinCtrls;
type
Tfrm_rp_dui_query = class(TForm)
bsSkinButton1: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinGroupBox1: TbsSkinGroupBox;
Label6: TLabel;
Label9: TLabel;
Label5: TLabel;
Label4: TLabel;
Label10: TLabel;
wwDBComboBox15: TwwDBComboBox;
Edit2: TEdit;
wwDBComboBox21: TwwDBComboBox;
RxDBLookupCombo2: TRxDBLookupCombo;
wwDBComboBox6: TwwDBComboBox;
wwDBDateTimePicker2: TwwDBDateTimePicker;
RxDBLookupCombo4: TRxDBLookupCombo;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBComboBox18: TwwDBComboBox;
wwDBComboBox5: TwwDBComboBox;
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinNotebook1: TbsSkinNotebook;
Label12: TLabel;
wwDBComboBox7: TwwDBComboBox;
Edit3: TEdit;
Label13: TLabel;
wwDBComboBox8: TwwDBComboBox;
Edit5: TEdit;
Label15: TLabel;
wwDBComboBox16: TwwDBComboBox;
Edit6: TEdit;
Label16: TLabel;
wwDBComboBox9: TwwDBComboBox;
Edit7: TEdit;
wwDBDateTimePicker6: TwwDBDateTimePicker;
wwDBComboBox12: TwwDBComboBox;
Label18: TLabel;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBComboBox10: TwwDBComboBox;
Label17: TLabel;
Label20: TLabel;
wwDBComboBox20: TwwDBComboBox;
wwDBDateTimePicker8: TwwDBDateTimePicker;
Label19: TLabel;
wwDBComboBox13: TwwDBComboBox;
wwDBDateTimePicker7: TwwDBDateTimePicker;
RxDBLookupCombo6: TRxDBLookupCombo;
wwDBComboBox22: TwwDBComboBox;
Label22: TLabel;
RxDBLookupCombo5: TRxDBLookupCombo;
wwDBComboBox24: TwwDBComboBox;
Label21: TLabel;
Label24: TLabel;
wwDBComboBox25: TwwDBComboBox;
RxDBLookupCombo8: TRxDBLookupCombo;
Label23: TLabel;
wwDBComboBox23: TwwDBComboBox;
RxDBLookupCombo7: TRxDBLookupCombo;
Label25: TLabel;
wwDBComboBox26: TwwDBComboBox;
Edit8: TEdit;
Label26: TLabel;
wwDBComboBox27: TwwDBComboBox;
Edit9: TEdit;
Edit11: TEdit;
wwDBComboBox29: TwwDBComboBox;
Label28: TLabel;
Edit10: TEdit;
wwDBComboBox28: TwwDBComboBox;
Label27: TLabel;
Label29: TLabel;
wwDBComboBox30: TwwDBComboBox;
wwDBDateTimePicker9: TwwDBDateTimePicker;
Label30: TLabel;
wwDBComboBox31: TwwDBComboBox;
wwDBDateTimePicker10: TwwDBDateTimePicker;
wwDBDateTimePicker12: TwwDBDateTimePicker;
wwDBComboBox33: TwwDBComboBox;
Label32: TLabel;
wwDBDateTimePicker11: TwwDBDateTimePicker;
wwDBComboBox32: TwwDBComboBox;
Label31: TLabel;
Label34: TLabel;
wwDBComboBox35: TwwDBComboBox;
RxDBLookupCombo10: TRxDBLookupCombo;
Label33: TLabel;
wwDBComboBox34: TwwDBComboBox;
RxDBLookupCombo9: TRxDBLookupCombo;
RxDBLookupCombo12: TRxDBLookupCombo;
wwDBComboBox37: TwwDBComboBox;
Label36: TLabel;
RxDBLookupCombo11: TRxDBLookupCombo;
wwDBComboBox36: TwwDBComboBox;
Label35: TLabel;
Label37: TLabel;
wwDBComboBox38: TwwDBComboBox;
Edit12: TEdit;
Label38: TLabel;
wwDBComboBox39: TwwDBComboBox;
Edit13: TEdit;
Label40: TLabel;
wwDBComboBox41: TwwDBComboBox;
Edit15: TEdit;
Label39: TLabel;
wwDBComboBox40: TwwDBComboBox;
Edit14: TEdit;
wwDBDateTimePicker14: TwwDBDateTimePicker;
wwDBComboBox43: TwwDBComboBox;
Label42: TLabel;
wwDBComboBox42: TwwDBComboBox;
Label41: TLabel;
Label44: TLabel;
wwDBComboBox45: TwwDBComboBox;
wwDBDateTimePicker16: TwwDBDateTimePicker;
Label43: TLabel;
wwDBComboBox44: TwwDBComboBox;
wwDBDateTimePicker15: TwwDBDateTimePicker;
RxDBLookupCombo14: TRxDBLookupCombo;
wwDBComboBox47: TwwDBComboBox;
Label46: TLabel;
RxDBLookupCombo13: TRxDBLookupCombo;
wwDBComboBox46: TwwDBComboBox;
Label45: TLabel;
Label48: TLabel;
wwDBComboBox49: TwwDBComboBox;
RxDBLookupCombo16: TRxDBLookupCombo;
Label47: TLabel;
wwDBComboBox48: TwwDBComboBox;
RxDBLookupCombo15: TRxDBLookupCombo;
wwDBDateTimePicker13: TwwDBDateTimePicker;
Label49: TLabel;
wwDBComboBox50: TwwDBComboBox;
Edit16: TEdit;
Label50: TLabel;
wwDBComboBox51: TwwDBComboBox;
Edit17: TEdit;
Edit18: TEdit;
wwDBComboBox52: TwwDBComboBox;
Label51: TLabel;
Edit19: TEdit;
wwDBComboBox53: TwwDBComboBox;
Label52: TLabel;
Label53: TLabel;
wwDBComboBox54: TwwDBComboBox;
wwDBDateTimePicker17: TwwDBDateTimePicker;
Label54: TLabel;
wwDBComboBox55: TwwDBComboBox;
wwDBDateTimePicker18: TwwDBDateTimePicker;
wwDBDateTimePicker19: TwwDBDateTimePicker;
wwDBComboBox56: TwwDBComboBox;
Label55: TLabel;
wwDBDateTimePicker20: TwwDBDateTimePicker;
wwDBComboBox57: TwwDBComboBox;
Label56: TLabel;
Label57: TLabel;
wwDBComboBox58: TwwDBComboBox;
RxDBLookupCombo17: TRxDBLookupCombo;
Label58: TLabel;
wwDBComboBox59: TwwDBComboBox;
RxDBLookupCombo18: TRxDBLookupCombo;
RxDBLookupCombo19: TRxDBLookupCombo;
wwDBComboBox60: TwwDBComboBox;
Label59: TLabel;
RxDBLookupCombo20: TRxDBLookupCombo;
wwDBComboBox61: TwwDBComboBox;
Label60: TLabel;
Label3: TLabel;
wwDBComboBox4: TwwDBComboBox;
Edit4: TEdit;
procedure FormShow(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_rp_dui_query: Tfrm_rp_dui_query;
dui_query_num:integer;
implementation
uses u_main, u_data_share, u_rp_dui_seae_accept, u_rp_dui_seae_pay,
u_rp_dui_seai_accept, u_rp_dui_seai_pay, u_rp_dui_aire_accept,
u_rp_dui_aire_pay, u_rp_dui_airi_accept, u_rp_dui_airi_pay,
my_sys_function;
{$R *.dfm}
procedure Tfrm_rp_dui_query.FormShow(Sender: TObject);
begin
case dui_query_num of
1,2:
begin
bsSkinNotebook1.PageIndex:=0;
end;
3,4:
begin
bsSkinNotebook1.PageIndex:=1;
end;
5,6:
begin
bsSkinNotebook1.PageIndex:=2;
end;
7,8:
begin
bsSkinNotebook1.PageIndex:=3;
end;
end;
wwDBComboBox15.text:='ģ<><C4A3>';
wwDBComboBox18.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox5.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox21.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox4.text:='ģ<><C4A3>';
wwDBComboBox6.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>';
frm_data_share.t_crm_client_all.requery;
frm_data_share.t_sys_employee.requery;
end;
procedure Tfrm_rp_dui_query.bsSkinButton10Click(Sender: TObject);
begin
Edit2.text:='';
wwDBDateTimePicker1.Clear;
RxDBLookupCombo4.ClearValue;
Edit4.text:='';
RxDBLookupCombo2.ClearValue;
wwDBDateTimePicker2.Clear;
Edit3.text:='';
Edit5.text:='';
Edit6.text:='';
Edit7.text:='';
Edit8.text:='';
Edit9.text:='';
Edit10.text:='';
Edit11.text:='';
Edit12.text:='';
Edit13.text:='';
Edit14.text:='';
Edit15.text:='';
Edit16.text:='';
Edit17.text:='';
Edit18.text:='';
Edit19.text:='';
wwDBDateTimePicker5.Clear;
wwDBDateTimePicker6.Clear;
wwDBDateTimePicker7.Clear;
wwDBDateTimePicker8.Clear;
wwDBDateTimePicker9.Clear;
wwDBDateTimePicker10.Clear;
wwDBDateTimePicker11.Clear;
wwDBDateTimePicker12.Clear;
wwDBDateTimePicker13.Clear;
wwDBDateTimePicker14.Clear;
wwDBDateTimePicker15.Clear;
wwDBDateTimePicker16.Clear;
wwDBDateTimePicker17.Clear;
wwDBDateTimePicker18.Clear;
wwDBDateTimePicker19.Clear;
wwDBDateTimePicker20.Clear;
RxDBLookupCombo5.ClearValue;
RxDBLookupCombo6.ClearValue;
RxDBLookupCombo7.ClearValue;
RxDBLookupCombo8.ClearValue;
RxDBLookupCombo9.ClearValue;
RxDBLookupCombo10.ClearValue;
RxDBLookupCombo11.ClearValue;
RxDBLookupCombo12.ClearValue;
RxDBLookupCombo13.ClearValue;
RxDBLookupCombo14.ClearValue;
RxDBLookupCombo15.ClearValue;
RxDBLookupCombo16.ClearValue;
RxDBLookupCombo17.ClearValue;
RxDBLookupCombo18.ClearValue;
RxDBLookupCombo19.ClearValue;
RxDBLookupCombo20.ClearValue;
end;
procedure Tfrm_rp_dui_query.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_rp_dui_query.bsSkinButton1Click(Sender: TObject);
var
shen_string,op_string:widestring;
begin
shen_string:='';
op_string:='';
shen_string:='where <20><><EFBFBD><EFBFBD>='+inttostr(dui_query_num);
shen_string:=shen_string+' and '+open_data('0032','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no');
shen_string:=query_tiaojian(1,shen_string,'<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>',wwDBComboBox15.text,Edit2.text);
shen_string:=query_tiaojian(1,shen_string,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
shen_string:=query_tiaojian(1,shen_string,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox5.text,RxDBLookupCombo4.DisplayValues[0]);
shen_string:=query_tiaojian(1,shen_string,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox4.text,Edit4.text);
shen_string:=query_tiaojian(1,shen_string,'<27><><EFBFBD>ʿͻ<CABF>',wwDBComboBox21.text,RxDBLookupCombo2.DisplayValues[1]);
shen_string:=query_tiaojian(1,shen_string,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
if bsSkinNotebook1.PageIndex=0 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]);
if trim(op_string)<>''then
begin
op_string:='(select <20><><EFBFBD><EFBFBD> from t_op_seae '+op_string+')';
end;
end;
if bsSkinNotebook1.PageIndex=1 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]);
if trim(op_string)<>''then
op_string:='(select <20><><EFBFBD><EFBFBD> from t_op_seai '+op_string+')';
end;
if bsSkinNotebook1.PageIndex=2 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]);
if trim(op_string)<>''then
op_string:='(select <20><><EFBFBD><EFBFBD> from t_op_aire '+op_string+')';
end;
if bsSkinNotebook1.PageIndex=3 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]);
if trim(op_string)<>''then
op_string:='(select <20><><EFBFBD><EFBFBD> from t_op_airi '+op_string+')';
end;
if op_string<>''then
begin
op_string:='(select <20><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD> from t_ch_dui_bill where <20><><EFBFBD><EFBFBD> in '+op_string+')';
shen_string:=shen_string+' and <20><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD> in '+op_string;
end;
shen_string:='select * from t_ch_dui '+shen_string+' order by <20><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD> desc';
case dui_query_num of
1:
begin
with frm_rp_dui_seae_accept do
begin
modify_all:=true;
t_ch_dui.close;
t_ch_dui.sql.clear;
t_ch_dui.sql.text:=shen_string;
t_ch_dui.open;
modify_all:=false;
if t_ch_dui.IsEmpty then
begin
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3A1>');
exit;
end;
end;
end;
2:
begin
with frm_rp_dui_seae_pay do
begin
modify_all:=true;
t_ch_dui.close;
t_ch_dui.sql.clear;
t_ch_dui.sql.text:=shen_string;
t_ch_dui.open;
modify_all:=false;
if t_ch_dui.IsEmpty then
begin
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3A1>');
exit;
end;
if t_ch_dui.fieldbyname('DM_ID').asstring<>''then
if t_ch_dui_format.Locate('DM_ID',t_ch_dui.fieldbyname('DM_ID').asinteger,[])then
begin
dui_grid(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,dxdbgrid2);
t_bill_fee.close;
t_bill_fee.Parameters.ParamByName('SQLStr').value:=dui_sql(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,'t_op_seae',t_ch_dui.fieldbyname('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').asstring);
t_bill_fee.open;
end;
end;
end;
3:
begin
with frm_rp_dui_seai_accept do
begin
modify_all:=true;
t_ch_dui.close;
t_ch_dui.sql.clear;
t_ch_dui.sql.text:=shen_string;
t_ch_dui.open;
modify_all:=false;
if t_ch_dui.IsEmpty then
begin
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3A1>');
exit;
end;
if t_ch_dui.fieldbyname('DM_ID').asstring<>''then
if t_ch_dui_format.Locate('DM_ID',t_ch_dui.fieldbyname('DM_ID').asinteger,[])then
begin
dui_grid(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,dxdbgrid2);
t_bill_fee.close;
t_bill_fee.Parameters.ParamByName('SQLStr').value:=dui_sql(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,'t_op_seai',t_ch_dui.fieldbyname('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').asstring);
t_bill_fee.open;
end;
end;
end;
4:
begin
with frm_rp_dui_seai_pay do
begin
modify_all:=true;
t_ch_dui.close;
t_ch_dui.sql.clear;
t_ch_dui.sql.text:=shen_string;
t_ch_dui.open;
modify_all:=false;
if t_ch_dui.IsEmpty then
begin
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3A1>');
exit;
end;
if t_ch_dui.fieldbyname('DM_ID').asstring<>''then
if t_ch_dui_format.Locate('DM_ID',t_ch_dui.fieldbyname('DM_ID').asinteger,[])then
begin
dui_grid(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,dxdbgrid2);
t_bill_fee.close;
t_bill_fee.Parameters.ParamByName('SQLStr').value:=dui_sql(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,'t_op_seai',t_ch_dui.fieldbyname('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').asstring);
t_bill_fee.open;
end;
end;
end;
5:
begin
with frm_rp_dui_aire_accept do
begin
modify_all:=true;
t_ch_dui.close;
t_ch_dui.sql.clear;
t_ch_dui.sql.text:=shen_string;
t_ch_dui.open;
modify_all:=false;
if t_ch_dui.IsEmpty then
begin
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3A1>');
exit;
end;
if t_ch_dui.fieldbyname('DM_ID').asstring<>''then
if t_ch_dui_format.Locate('DM_ID',t_ch_dui.fieldbyname('DM_ID').asinteger,[])then
begin
dui_grid(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,dxdbgrid2);
t_bill_fee.close;
t_bill_fee.Parameters.ParamByName('SQLStr').value:=dui_sql(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,'t_op_aire',t_ch_dui.fieldbyname('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').asstring);
t_bill_fee.open;
end;
end;
end;
6:
begin
with frm_rp_dui_aire_pay do
begin
modify_all:=true;
t_ch_dui.close;
t_ch_dui.sql.clear;
t_ch_dui.sql.text:=shen_string;
t_ch_dui.open;
modify_all:=false;
if t_ch_dui.IsEmpty then
begin
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3A1>');
exit;
end;
if t_ch_dui.fieldbyname('DM_ID').asstring<>''then
if t_ch_dui_format.Locate('DM_ID',t_ch_dui.fieldbyname('DM_ID').asinteger,[])then
begin
dui_grid(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,dxdbgrid2);
t_bill_fee.close;
t_bill_fee.Parameters.ParamByName('SQLStr').value:=dui_sql(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,'t_op_aire',t_ch_dui.fieldbyname('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').asstring);
t_bill_fee.open;
end;
end;
end;
7:
begin
with frm_rp_dui_airi_accept do
begin
modify_all:=true;
t_ch_dui.close;
t_ch_dui.sql.clear;
t_ch_dui.sql.text:=shen_string;
t_ch_dui.open;
modify_all:=false;
if t_ch_dui.IsEmpty then
begin
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3A1>');
exit;
end;
if t_ch_dui.fieldbyname('DM_ID').asstring<>''then
if t_ch_dui_format.Locate('DM_ID',t_ch_dui.fieldbyname('DM_ID').asinteger,[])then
begin
dui_grid(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,dxdbgrid2);
t_bill_fee.close;
t_bill_fee.Parameters.ParamByName('SQLStr').value:=dui_sql(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,'t_op_airi',t_ch_dui.fieldbyname('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').asstring);
t_bill_fee.open;
end;
end;
end;
8:
begin
with frm_rp_dui_airi_pay do
begin
modify_all:=true;
t_ch_dui.close;
t_ch_dui.sql.clear;
t_ch_dui.sql.text:=shen_string;
t_ch_dui.open;
modify_all:=false;
if t_ch_dui.IsEmpty then
begin
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3A1>');
exit;
end;
if t_ch_dui.fieldbyname('DM_ID').asstring<>''then
if t_ch_dui_format.Locate('DM_ID',t_ch_dui.fieldbyname('DM_ID').asinteger,[])then
begin
dui_grid(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,dxdbgrid2);
t_bill_fee.close;
t_bill_fee.Parameters.ParamByName('SQLStr').value:=dui_sql(t_ch_dui_format.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring,'t_op_airi',t_ch_dui.fieldbyname('<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>').asstring);
t_bill_fee.open;
end;
end;
end;
end;
close;
end;
end.