|
|
unit u_rp_airi_query;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, dxExEdtr, DB, ADODB, BusinessSkinForm, dxDBCtrl, dxDBGrid, dxTL,
|
|
|
dxDBTLCl, dxGrClms, dxCntner, RxLookup, wwdbdatetimepicker, StdCtrls,
|
|
|
Mask, wwdbedit, Wwdotdot, Wwdbcomb, bsSkinCtrls, ComCtrls, bsSkinTabs;
|
|
|
|
|
|
type
|
|
|
Tfrm_rp_airi_query = class(TForm)
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
Label33: TLabel;
|
|
|
Label34: TLabel;
|
|
|
Label35: TLabel;
|
|
|
Label36: TLabel;
|
|
|
RxDBLookupCombo14: TRxDBLookupCombo;
|
|
|
wwDBComboBox39: TwwDBComboBox;
|
|
|
wwDBComboBox40: TwwDBComboBox;
|
|
|
query_bit: TwwDBComboBox;
|
|
|
query_str_int: TEdit;
|
|
|
query_date: TwwDBDateTimePicker;
|
|
|
RxDBLookupList1: TRxDBLookupList;
|
|
|
bsSkinGroupBox2: TbsSkinGroupBox;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridPickColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridPickColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGrid2SQ_ID: TdxDBGridMaskColumn;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
t_sys_queryfields: TADOQuery;
|
|
|
t_sys_queryfields1: TDataSource;
|
|
|
t_sys_query: TADOQuery;
|
|
|
t_sys_query1: TDataSource;
|
|
|
t_sys_query_detail: TADOQuery;
|
|
|
t_sys_query_detail1: TDataSource;
|
|
|
bsSkinGroupBox3: TbsSkinGroupBox;
|
|
|
Label6: TLabel;
|
|
|
wwDBComboBox15: TwwDBComboBox;
|
|
|
Edit1: TEdit;
|
|
|
Edit2: TEdit;
|
|
|
wwDBComboBox16: TwwDBComboBox;
|
|
|
Label1: TLabel;
|
|
|
Label7: TLabel;
|
|
|
wwDBComboBox17: TwwDBComboBox;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
wwDBComboBox18: TwwDBComboBox;
|
|
|
Label10: TLabel;
|
|
|
Label8: TLabel;
|
|
|
wwDBComboBox19: TwwDBComboBox;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
wwDBComboBox21: TwwDBComboBox;
|
|
|
Label9: TLabel;
|
|
|
Label19: TLabel;
|
|
|
wwDBComboBox22: TwwDBComboBox;
|
|
|
RxDBLookupCombo9: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo13: TRxDBLookupCombo;
|
|
|
wwDBComboBox32: TwwDBComboBox;
|
|
|
Label26: TLabel;
|
|
|
Label20: TLabel;
|
|
|
wwDBComboBox26: TwwDBComboBox;
|
|
|
Edit5: TEdit;
|
|
|
Edit6: TEdit;
|
|
|
wwDBComboBox27: TwwDBComboBox;
|
|
|
Label124: TLabel;
|
|
|
Label15: TLabel;
|
|
|
wwDBComboBox24: TwwDBComboBox;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo6: TRxDBLookupCombo;
|
|
|
wwDBComboBox25: TwwDBComboBox;
|
|
|
Label16: TLabel;
|
|
|
Label3: TLabel;
|
|
|
wwDBComboBox4: TwwDBComboBox;
|
|
|
Edit4: TEdit;
|
|
|
Edit3: TEdit;
|
|
|
wwDBComboBox5: TwwDBComboBox;
|
|
|
Label2: TLabel;
|
|
|
Label4: TLabel;
|
|
|
wwDBComboBox7: TwwDBComboBox;
|
|
|
wwDBComboBox2: TwwDBComboBox;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
wwDBComboBox6: TwwDBComboBox;
|
|
|
Label5: TLabel;
|
|
|
Label11: TLabel;
|
|
|
wwDBComboBox11: TwwDBComboBox;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
wwDBComboBox9: TwwDBComboBox;
|
|
|
Label12: TLabel;
|
|
|
Label18: TLabel;
|
|
|
wwDBComboBox8: TwwDBComboBox;
|
|
|
RxDBLookupCombo8: TRxDBLookupCombo;
|
|
|
Edit9: TEdit;
|
|
|
wwDBComboBox38: TwwDBComboBox;
|
|
|
Label32: TLabel;
|
|
|
Label22: TLabel;
|
|
|
wwDBComboBox28: TwwDBComboBox;
|
|
|
RxDBLookupCombo10: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo12: TRxDBLookupCombo;
|
|
|
wwDBComboBox29: TwwDBComboBox;
|
|
|
Label23: TLabel;
|
|
|
Label14: TLabel;
|
|
|
wwDBComboBox14: TwwDBComboBox;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo5: TRxDBLookupCombo;
|
|
|
wwDBComboBox13: TwwDBComboBox;
|
|
|
Label13: TLabel;
|
|
|
bsSkinGroupBox4: TbsSkinGroupBox;
|
|
|
Label27: TLabel;
|
|
|
Label29: TLabel;
|
|
|
Label37: TLabel;
|
|
|
Label38: TLabel;
|
|
|
wwDBComboBox31: TwwDBComboBox;
|
|
|
RxDBLookupCombo15: TRxDBLookupCombo;
|
|
|
wwDBComboBox33: TwwDBComboBox;
|
|
|
wwDBComboBox34: TwwDBComboBox;
|
|
|
RxDBLookupCombo16: TRxDBLookupCombo;
|
|
|
wwDBComboBox41: TwwDBComboBox;
|
|
|
wwDBComboBox42: TwwDBComboBox;
|
|
|
RxDBLookupCombo17: TRxDBLookupCombo;
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure RxDBLookupCombo14Change(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure RxDBLookupList1DblClick(Sender: TObject);
|
|
|
procedure t_sys_queryAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_sys_query_detailAfterScroll(DataSet: TDataSet);
|
|
|
procedure t_sys_query_detailBeforePost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure do_1(str_bill:widestring);
|
|
|
procedure do_2(str_bill:widestring);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_rp_airi_query: Tfrm_rp_airi_query;
|
|
|
rp_airi_query_num,rp_airi_query_type:integer;
|
|
|
rp_airi_query_str,rp_airi_query_limited:string;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, u_rp_in_airi, u_rp_no_airi, u_data_share, my_sys_function;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
procedure Tfrm_rp_airi_query.do_2(str_bill:widestring);
|
|
|
begin
|
|
|
frm_rp_in_airi.p_bill.close;
|
|
|
frm_rp_in_airi.p_bill.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
|
|
|
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
|
|
|
+' else 0 end) as <20>ѿ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
|
|
|
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as <20>ѿ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
|
|
|
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
+' sum(t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>ѿ<EFBFBD><D1BF>ϼ<EFBFBD>,'
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
|
|
|
+'t_op_airi.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ܴ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>, t_op_airi.ί<>б<EFBFBD><D0B1><EFBFBD>,'
|
|
|
+'t_op_airi.ί<>е<EFBFBD>λ, t_op_airi.<2E><><EFBFBD><EFBFBD>, '
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.ʼ<><CABC><EFBFBD><EFBFBD>, t_op_airi.Ŀ<>ĸ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD>, t_op_airi.<2E>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>,t_op_airi.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ͷ<EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>չ<EFBFBD>˾, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_ch_fee inner join t_op_airi on t_op_airi.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
|
|
|
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ܴ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>, t_op_airi.ί<>б<EFBFBD><D0B1><EFBFBD>, '
|
|
|
+'t_op_airi.ί<>е<EFBFBD>λ, t_op_airi.<2E><><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.ʼ<><CABC><EFBFBD><EFBFBD>, t_op_airi.Ŀ<>ĸ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD>, t_op_airi.<2E>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>,t_op_airi.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ͷ<EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>չ<EFBFBD>˾, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+default_sort_two(56,'t_op_airi','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
|
|
|
frm_rp_in_airi.p_bill.open;
|
|
|
|
|
|
frm_rp_in_airi.p_client.close;
|
|
|
frm_rp_in_airi.p_client.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
|
|
|
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
|
|
|
+' else 0 end) as <20>ѿ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
|
|
|
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as <20>ѿ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
|
|
|
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
+' sum(t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>ѿ<EFBFBD><D1BF>ϼ<EFBFBD>,'
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>'
|
|
|
+' FROM t_ch_fee inner join t_op_airi on t_op_airi.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
|
|
|
+' GROUP BY t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' order by t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
frm_rp_in_airi.p_client.open;
|
|
|
|
|
|
frm_rp_in_airi.p_sales.close;
|
|
|
frm_rp_in_airi.p_sales.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
|
|
|
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
|
|
|
+' else 0 end) as <20>ѿ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
|
|
|
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as <20>ѿ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
|
|
|
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
+' sum(t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>ѿ<EFBFBD><D1BF>ϼ<EFBFBD>,'
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>'
|
|
|
+' FROM t_ch_fee inner join t_op_airi on t_op_airi.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
|
|
|
+' GROUP BY t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' order by t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
frm_rp_in_airi.p_sales.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.do_1(str_bill:widestring);
|
|
|
begin
|
|
|
frm_rp_no_airi.p_accept_bill.close;
|
|
|
frm_rp_no_airi.p_accept_bill.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
|
|
|
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' else 0 end) as <20><><EFBFBD><EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as <20><><EFBFBD><EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
|
|
|
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<>պϼ<D5BA>,'
|
|
|
+' sum(t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD>պϼ<D5BA>,'
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<>պϼ<D5BA>,'
|
|
|
+'t_op_airi.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ܴ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>, t_op_airi.ί<>б<EFBFBD><D0B1><EFBFBD>, '
|
|
|
+'t_op_airi.ί<>е<EFBFBD>λ, t_op_airi.<2E><><EFBFBD><EFBFBD>, '
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.ʼ<><CABC><EFBFBD><EFBFBD>, t_op_airi.Ŀ<>ĸ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD>, t_op_airi.<2E>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ͷ<EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>չ<EFBFBD>˾, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, DATEDIFF([day],t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()) AS ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'(DATEDIFF([day],t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE())-isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0)) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_ch_fee inner join t_op_airi on t_op_airi.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> left join t_crm_client '
|
|
|
+' on t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> '
|
|
|
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
|
|
|
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ܴ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>, t_op_airi.ί<>б<EFBFBD><D0B1><EFBFBD>, '
|
|
|
+'t_op_airi.ί<>е<EFBFBD>λ, t_op_airi.<2E><><EFBFBD><EFBFBD>, '
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.ʼ<><CABC><EFBFBD><EFBFBD>, t_op_airi.Ŀ<>ĸ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD>, t_op_airi.<2E>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ͷ<EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>չ<EFBFBD>˾, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, DATEDIFF([day],t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE()),'
|
|
|
+'isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0),'
|
|
|
+'(DATEDIFF([day],t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, GETDATE())-isnull(t_crm_client.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0))'
|
|
|
+default_sort_two(56,'t_op_airi','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
|
|
|
frm_rp_no_airi.p_accept_bill.Open;
|
|
|
|
|
|
frm_rp_no_airi.p_accept_fee.close;
|
|
|
frm_rp_no_airi.p_accept_fee.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ұ<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as Ӧ<>ս<EFBFBD><D5BD><EFBFBD>,'
|
|
|
+'t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as <20><><EFBFBD>ս<EFBFBD><D5BD><EFBFBD>,(t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as δ<>ս<EFBFBD><D5BD><EFBFBD>,'
|
|
|
+'t_op_airi.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ܴ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>, t_op_airi.ί<>б<EFBFBD><D0B1><EFBFBD>, '
|
|
|
+'t_op_airi.ί<>е<EFBFBD>λ, t_op_airi.<2E><><EFBFBD><EFBFBD>, '
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.ʼ<><CABC><EFBFBD><EFBFBD>, t_op_airi.Ŀ<>ĸ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD>, t_op_airi.<2E>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>,t_op_airi.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ͷ<EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>չ<EFBFBD>˾, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_ch_fee inner join t_op_airi on t_op_airi.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
|
|
|
+default_sort_two(56,'t_op_airi','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
|
|
|
frm_rp_no_airi.p_accept_fee.Open;
|
|
|
|
|
|
frm_rp_no_airi.p_pay_bill.close;
|
|
|
frm_rp_no_airi.p_pay_bill.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
|
|
|
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' else 0 end) as <20>Ѹ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
|
|
|
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as <20>Ѹ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
|
|
|
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
|
|
|
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
+' sum(t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
|
|
|
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
|
|
|
+'t_op_airi.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ܴ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>, t_op_airi.ί<>б<EFBFBD><D0B1><EFBFBD>, '
|
|
|
+'t_op_airi.ί<>е<EFBFBD>λ, t_op_airi.<2E><><EFBFBD><EFBFBD>, '
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.ʼ<><CABC><EFBFBD><EFBFBD>, t_op_airi.Ŀ<>ĸ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD>, t_op_airi.<2E>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>,t_op_airi.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ͷ<EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>չ<EFBFBD>˾, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_ch_fee inner join t_op_airi on t_op_airi.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
|
|
|
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ܴ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>, t_op_airi.ί<>б<EFBFBD><D0B1><EFBFBD>, '
|
|
|
+'t_op_airi.ί<>е<EFBFBD>λ, t_op_airi.<2E><><EFBFBD><EFBFBD>, '
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.ʼ<><CABC><EFBFBD><EFBFBD>, t_op_airi.Ŀ<>ĸ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD>, t_op_airi.<2E>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>,t_op_airi.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ͷ<EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>չ<EFBFBD>˾, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+default_sort_two(56,'t_op_airi','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
|
|
|
frm_rp_no_airi.p_pay_bill.Open;
|
|
|
|
|
|
frm_rp_no_airi.p_pay_fee.close;
|
|
|
frm_rp_no_airi.p_pay_fee.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ұ<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as <20>Ѹ<EFBFBD><D1B8><EFBFBD><EFBFBD><EFBFBD>,(t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ܴ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>, t_op_airi.ί<>б<EFBFBD><D0B1><EFBFBD>, '
|
|
|
+'t_op_airi.ί<>е<EFBFBD>λ, t_op_airi.<2E><><EFBFBD><EFBFBD>, '
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.ʼ<><CABC><EFBFBD><EFBFBD>, t_op_airi.Ŀ<>ĸ<EFBFBD>, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD>, t_op_airi.<2E>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>,t_op_airi.<2E><><EFBFBD><EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_airi.<2E>ͷ<EFBFBD>Ա,'
|
|
|
+'t_op_airi.<2E><><EFBFBD>չ<EFBFBD>˾, t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_ch_fee inner join t_op_airi on t_op_airi.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
|
|
|
+default_sort_two(56,'t_op_airi','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
|
|
|
frm_rp_no_airi.p_pay_fee.Open;
|
|
|
|
|
|
frm_rp_no_airi.p_total_client.close;
|
|
|
frm_rp_no_airi.p_total_client.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
|
|
|
+' FROM t_ch_fee inner join t_op_airi on t_op_airi.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_bill+' GROUP BY t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> order by t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
frm_rp_no_airi.p_total_client.Open;
|
|
|
|
|
|
frm_rp_no_airi.p_total_sales.close;
|
|
|
frm_rp_no_airi.p_total_sales.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
|
|
|
+' FROM t_ch_fee inner join t_op_airi on t_op_airi.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_bill+' GROUP BY t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
frm_rp_no_airi.p_total_sales.Open;
|
|
|
|
|
|
frm_rp_no_airi.p_total.close;
|
|
|
frm_rp_no_airi.p_total.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT '+''''+'<27>ϼ<EFBFBD>'+''''+' as ˳<><CBB3>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
|
|
|
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
|
|
|
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
|
|
|
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
|
|
|
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
|
|
|
+' FROM t_ch_fee inner join t_op_airi on t_op_airi.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_bill;
|
|
|
frm_rp_no_airi.p_total.Open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
wwDBComboBox15.text:='ģ<><C4A3>';
|
|
|
wwDBComboBox16.text:='ģ<><C4A3>';
|
|
|
wwDBComboBox4.text:='ģ<><C4A3>';
|
|
|
wwDBComboBox5.text:='ģ<><C4A3>';
|
|
|
wwDBComboBox17.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox7.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox18.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox6.text:='С<><D0A1>';
|
|
|
wwDBComboBox11.text:='С<><D0A1>';
|
|
|
wwDBComboBox19.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox21.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox22.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox24.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox25.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox26.text:='ģ<><C4A3>';
|
|
|
wwDBComboBox27.text:='ģ<><C4A3>';
|
|
|
wwDBComboBox9.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox8.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox13.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox14.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox28.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox29.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox32.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox38.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox31.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox33.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox41.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox42.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
|
frm_data_share.t_code_state.Filtered:=false;
|
|
|
frm_data_share.t_code_state.Filter:='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+'''';
|
|
|
frm_data_share.t_code_state.Filtered:=true;
|
|
|
frm_data_share.t_code_fee.Filtered:=false;
|
|
|
frm_data_share.t_code_fee.Filter:='<27><><EFBFBD><EFBFBD>=1';
|
|
|
frm_data_share.t_code_fee.Filtered:=true;
|
|
|
frm_data_share.t_code_state.first;
|
|
|
while not frm_data_share.t_code_state.eof do
|
|
|
begin
|
|
|
wwDBComboBox1.Items.Add(frm_data_share.t_code_state.fieldbyname('ҵ<><D2B5>״̬').asstring);
|
|
|
frm_data_share.t_code_state.next;
|
|
|
end;
|
|
|
wwDBComboBox1.Items.Add('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox1.Items.Add('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_sys_query.Parameters.ParamByName('<27><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>').Value:=rp_airi_query_str;
|
|
|
t_sys_query.Parameters.ParamByName('¼<><C2BC><EFBFBD><EFBFBD>').Value:=employee;
|
|
|
t_sys_query.open;
|
|
|
t_sys_query_detail.open;
|
|
|
t_sys_queryfields.open;
|
|
|
wwDBComboBox39.ItemIndex:=0;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
Edit1.text:='';
|
|
|
Edit2.text:='';
|
|
|
Edit3.text:='';
|
|
|
Edit4.text:='';
|
|
|
Edit5.text:='';
|
|
|
Edit6.text:='';
|
|
|
wwDBComboBox1.text:='';
|
|
|
wwDBComboBox2.text:='';
|
|
|
wwDBDateTimePicker1.Clear;
|
|
|
wwDBDateTimePicker2.Clear;
|
|
|
wwDBDateTimePicker3.Clear;
|
|
|
wwDBDateTimePicker4.Clear;
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
RxDBLookupCombo1.ClearValue;
|
|
|
RxDBLookupCombo9.ClearValue;
|
|
|
RxDBLookupCombo8.ClearValue;
|
|
|
RxDBLookupCombo4.ClearValue;
|
|
|
RxDBLookupCombo3.ClearValue;
|
|
|
RxDBLookupCombo6.ClearValue;
|
|
|
RxDBLookupCombo5.ClearValue;
|
|
|
RxDBLookupCombo10.ClearValue;
|
|
|
RxDBLookupCombo12.ClearValue;
|
|
|
RxDBLookupCombo15.ClearValue;
|
|
|
wwDBComboBox34.text:='';
|
|
|
RxDBLookupCombo16.ClearValue;
|
|
|
RxDBLookupCombo17.ClearValue;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
str:='';
|
|
|
if bsSkinTabSheet2.Showing then
|
|
|
begin
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox15.text,Edit1.text);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.ί<>б<EFBFBD><D0B1><EFBFBD>',wwDBComboBox4.text,Edit4.text);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>',wwDBComboBox16.text,Edit2.text);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>',wwDBComboBox5.text,Edit3.text);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.ҵ<><D2B5>״̬',wwDBComboBox17.text,wwDBComboBox1.text);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD><EFBFBD>״̬',wwDBComboBox7.text,wwDBComboBox2.text);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>',wwDBComboBox19.text,wwDBDateTimePicker3.text);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>',wwDBComboBox11.text,wwDBDateTimePicker4.text);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.ί<>е<EFBFBD>λ',wwDBComboBox21.text,RxDBLookupCombo2.DisplayValues[1]);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD>չ<EFBFBD>˾',wwDBComboBox9.text,RxDBLookupCombo1.DisplayValues[1]);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox22.text,RxDBLookupCombo9.DisplayValues[1]);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD><EFBFBD>',wwDBComboBox8.text,RxDBLookupCombo8.DisplayValues[1]);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.ʼ<><CABC><EFBFBD><EFBFBD>',wwDBComboBox26.text,edit5.text);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.Ŀ<>ĸ<EFBFBD>',wwDBComboBox27.text,edit6.text);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E>ͷ<EFBFBD>Ա',wwDBComboBox24.text,RxDBLookupCombo4.DisplayValue);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox14.text,RxDBLookupCombo3.DisplayValue);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD><EFBFBD>Ա',wwDBComboBox25.text,RxDBLookupCombo6.DisplayValue);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.¼<><C2BC><EFBFBD><EFBFBD>',wwDBComboBox13.text,RxDBLookupCombo5.DisplayValue);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>',wwDBComboBox28.text,RxDBLookupCombo10.DisplayValue);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox29.text,RxDBLookupCombo12.DisplayValue);
|
|
|
str:=query_tiaojian(1,str,'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox32.text,RxDBLookupCombo13.DisplayValues[1]);
|
|
|
str:=query_tiaojian(2,str,'t_op_airi.<2E>ܴ<EFBFBD>',wwDBComboBox38.text,Edit9.text);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if query_wanneng_error(t_sys_query_detail)then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><F2A1AFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD><CFA3><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
str:=query_wanneng(t_sys_query_detail);
|
|
|
end;
|
|
|
if rp_airi_query_limited<>'no'then
|
|
|
begin
|
|
|
if trim(str)='' then
|
|
|
begin
|
|
|
str:='where '+open_data(rp_airi_query_limited,'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','t_op_airi.<2E><><EFBFBD><EFBFBD>Ա','t_op_airi.<2E>ͷ<EFBFBD>Ա','no','no');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str:=str+' and '+open_data(rp_airi_query_limited,'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','t_op_airi.<2E><><EFBFBD><EFBFBD>Ա','t_op_airi.<2E>ͷ<EFBFBD>Ա','no','no');
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
case rp_airi_query_type of
|
|
|
1:
|
|
|
begin
|
|
|
if str='' then
|
|
|
str:='where t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
str:=str+' and t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
2:
|
|
|
begin
|
|
|
if str='' then
|
|
|
str:='where t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>0'
|
|
|
else
|
|
|
str:=str+' and t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>0';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
case rp_airi_query_num of
|
|
|
1:
|
|
|
begin
|
|
|
frm_rp_airi_query.do_1(str);
|
|
|
end;
|
|
|
2:
|
|
|
begin
|
|
|
frm_rp_airi_query.do_2(str);
|
|
|
end;
|
|
|
end;
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.RxDBLookupCombo14Change(Sender: TObject);
|
|
|
begin
|
|
|
query_str_int.text:='';
|
|
|
query_bit.text:='';
|
|
|
query_date.text:='';
|
|
|
if t_sys_queryfields.Locate('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo14.DisplayValue,[])then
|
|
|
begin
|
|
|
wwDBComboBox40.ItemIndex:=-1;
|
|
|
wwDBComboBox40.Items.Clear;
|
|
|
if (t_sys_queryfields.FieldByName('<27><><EFBFBD><EFBFBD>').asstring='varchar') then
|
|
|
begin
|
|
|
query_str_int.Visible:=true;
|
|
|
query_bit.Visible:=false;
|
|
|
query_date.Visible:=false;
|
|
|
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox40.Items.Add('ģ<><C4A3>');
|
|
|
wwDBComboBox40.ItemIndex:=2;
|
|
|
end;
|
|
|
if (t_sys_queryfields.FieldByName('<27><><EFBFBD><EFBFBD>').asstring='int') then
|
|
|
begin
|
|
|
query_str_int.Visible:=true;
|
|
|
query_bit.Visible:=false;
|
|
|
query_date.Visible:=false;
|
|
|
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox40.Items.Add('С<><D0A1>');
|
|
|
wwDBComboBox40.ItemIndex:=0;
|
|
|
end;
|
|
|
if (t_sys_queryfields.FieldByName('<27><><EFBFBD><EFBFBD>').asstring='bit') then
|
|
|
begin
|
|
|
query_str_int.Visible:=false;
|
|
|
query_bit.Visible:=true;
|
|
|
query_date.Visible:=false;
|
|
|
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox40.ItemIndex:=0;
|
|
|
end;
|
|
|
if (t_sys_queryfields.FieldByName('<27><><EFBFBD><EFBFBD>').asstring='date') then
|
|
|
begin
|
|
|
query_str_int.Visible:=false;
|
|
|
query_bit.Visible:=false;
|
|
|
query_date.Visible:=true;
|
|
|
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
wwDBComboBox40.Items.Add('С<><D0A1>');
|
|
|
wwDBComboBox40.ItemIndex:=0;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
query_str_int.Visible:=false;
|
|
|
query_bit.Visible:=false;
|
|
|
query_date.Visible:=false;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
if RxDBLookupCombo14.DisplayValue='' then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if wwDBComboBox39.ItemIndex=-1 then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if wwDBComboBox40.ItemIndex=-1 then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD>ͣ<EFBFBD><CDA3><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if query_str_int.Visible then
|
|
|
begin
|
|
|
if query_str_int.text='' then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if (t_sys_queryfields.FieldByName('<27><><EFBFBD><EFBFBD>').asstring='int') then
|
|
|
begin
|
|
|
try
|
|
|
strtoint(query_str_int.text);
|
|
|
except
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>ֵֻ<D6B5><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
if query_bit.Visible then
|
|
|
begin
|
|
|
if query_bit.ItemIndex=-1 then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if query_date.Visible then
|
|
|
begin
|
|
|
if query_date.text='' then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if t_sys_query.IsEmpty then
|
|
|
begin
|
|
|
t_sys_query.Insert;
|
|
|
t_sys_query.post;
|
|
|
end;
|
|
|
t_sys_query_detail.Append;
|
|
|
t_sys_query_detail['<27><>']:=t_sys_queryfields['<27><>'];
|
|
|
t_sys_query_detail['<27>ֶ<EFBFBD><D6B6><EFBFBD>']:=t_sys_queryfields['<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
if query_str_int.Visible then
|
|
|
begin
|
|
|
t_sys_query_detail['<27><><EFBFBD><EFBFBD>ֵ']:=query_str_int.text;
|
|
|
end;
|
|
|
if query_bit.Visible then
|
|
|
begin
|
|
|
t_sys_query_detail['<27><><EFBFBD><EFBFBD>ֵ']:=query_bit.text;
|
|
|
end;
|
|
|
if query_date.Visible then
|
|
|
begin
|
|
|
t_sys_query_detail['<27><><EFBFBD><EFBFBD>ֵ']:=query_date.text;
|
|
|
end;
|
|
|
t_sys_query_detail['<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>']:=t_sys_queryfields['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_sys_query_detail['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ']:=wwDBComboBox39.text;
|
|
|
t_sys_query_detail['<27><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>']:=wwDBComboBox40.text;
|
|
|
t_sys_query_detail.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
if not t_sys_query_detail.IsEmpty then
|
|
|
t_sys_query_detail.Delete;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.RxDBLookupList1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo14.DisplayValue:=RxDBLookupList1.DisplayValue;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.t_sys_queryAfterInsert(DataSet: TDataSet);
|
|
|
begin
|
|
|
t_sys_query['<27><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>']:=rp_airi_query_str;
|
|
|
t_sys_query['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_sys_query['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.t_sys_query_detailAfterScroll(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if (t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='varchar') then
|
|
|
begin
|
|
|
dxDBGrid1Column3.Items.Clear;
|
|
|
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
dxDBGrid1Column3.Items.Add('ģ<><C4A3>');
|
|
|
end;
|
|
|
if (t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='int') then
|
|
|
begin
|
|
|
dxDBGrid1Column3.Items.Clear;
|
|
|
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
dxDBGrid1Column3.Items.Add('С<><D0A1>');
|
|
|
end;
|
|
|
if (t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='bit') then
|
|
|
begin
|
|
|
dxDBGrid1Column3.Items.Clear;
|
|
|
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
if (t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='date') then
|
|
|
begin
|
|
|
dxDBGrid1Column3.Items.Clear;
|
|
|
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
dxDBGrid1Column3.Items.Add('С<><D0A1>');
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.t_sys_query_detailBeforePost(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='int' then
|
|
|
begin
|
|
|
try
|
|
|
strtoint(t_sys_query_detail.fieldbyname('<27><><EFBFBD><EFBFBD>ֵ').asstring);
|
|
|
except
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>ֵֻ<D6B5><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
if t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='date' then
|
|
|
begin
|
|
|
try
|
|
|
strtodate(t_sys_query_detail.fieldbyname('<27><><EFBFBD><EFBFBD>ֵ').asstring);
|
|
|
except
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>ֵֻ<D6B5><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
if t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='bit' then
|
|
|
begin
|
|
|
if (t_sys_query_detail.fieldbyname('<27><><EFBFBD><EFBFBD>ֵ').asstring<>'<27><>')
|
|
|
and(t_sys_query_detail.fieldbyname('<27><><EFBFBD><EFBFBD>ֵ').asstring<>'<27><>')then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>ֵֻ<D6B5><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\<5C><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if (t_sys_query_detail.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ').asstring<>'<27><>')
|
|
|
and(t_sys_query_detail.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ').asstring<>'<27><>')then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵֻ<CFB5><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\<5C><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
if (dxDBGrid1Column3.Items.IndexOf(t_sys_query_detail.fieldbyname('<27><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>').asstring)=-1)
|
|
|
and (t_sys_query_detail.state<>dsinsert) then
|
|
|
begin
|
|
|
showmessage('<27><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+dxDBGrid1Column3.Items.text+'<27><><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
t_sys_query.Insert;
|
|
|
t_sys_query.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_airi_query.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
while not t_sys_query_detail.eof do
|
|
|
begin
|
|
|
t_sys_query_detail.Delete;
|
|
|
end;
|
|
|
if not t_sys_query.Eof then
|
|
|
t_sys_query.delete;
|
|
|
end;
|
|
|
|
|
|
end.
|