|
|
unit u_fee_history;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, BusinessSkinForm, bsSkinCtrls, dxExEdtr, dxCntner, dxTL,
|
|
|
dxDBCtrl, dxDBGrid, DB, ADODB, dxDBTLCl, dxGrClms, RxLookup, StdCtrls,
|
|
|
wwdbdatetimepicker, Grids, DBGrids;
|
|
|
|
|
|
type
|
|
|
Tfrm_fee_history = class(TForm)
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinNotebook1: TbsSkinNotebook;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
t_ch_fee: TADOQuery;
|
|
|
t_ch_fee1: TDataSource;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
t_bill1: TDataSource;
|
|
|
t_bill: TADOQuery;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
Edit1: TEdit;
|
|
|
Edit2: TEdit;
|
|
|
Label6: TLabel;
|
|
|
Label1: TLabel;
|
|
|
Label9: TLabel;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
Label3: TLabel;
|
|
|
Edit4: TEdit;
|
|
|
Edit3: TEdit;
|
|
|
Label2: TLabel;
|
|
|
Label10: TLabel;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column17: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column19: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column20: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column63: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column64: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column65: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column66: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column67: TdxDBGridMaskColumn;
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
bsSkinPanel5: TbsSkinPanel;
|
|
|
Label4: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label7: TLabel;
|
|
|
Label8: TLabel;
|
|
|
Label11: TLabel;
|
|
|
Label12: TLabel;
|
|
|
Edit5: TEdit;
|
|
|
Edit6: TEdit;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
Edit7: TEdit;
|
|
|
Edit8: TEdit;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column62: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn11: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn2: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn15: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn16: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn17: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn18: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column41: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column47: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column48: TdxDBGridDateColumn;
|
|
|
bsSkinPanel6: TbsSkinPanel;
|
|
|
bsSkinPanel7: TbsSkinPanel;
|
|
|
Label13: TLabel;
|
|
|
Label14: TLabel;
|
|
|
Label15: TLabel;
|
|
|
Label16: TLabel;
|
|
|
Label17: TLabel;
|
|
|
Label18: TLabel;
|
|
|
Edit9: TEdit;
|
|
|
Edit10: TEdit;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
Edit11: TEdit;
|
|
|
Edit12: TEdit;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
dxDBGrid4: TdxDBGrid;
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn19: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn20: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn22: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn23: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn3: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column27: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column28: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column29: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column30: TdxDBGridDateColumn;
|
|
|
bsSkinPanel8: TbsSkinPanel;
|
|
|
bsSkinPanel9: TbsSkinPanel;
|
|
|
Label19: TLabel;
|
|
|
Label20: TLabel;
|
|
|
Label21: TLabel;
|
|
|
Label22: TLabel;
|
|
|
Label23: TLabel;
|
|
|
Label24: TLabel;
|
|
|
Edit13: TEdit;
|
|
|
Edit14: TEdit;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
Edit15: TEdit;
|
|
|
Edit16: TEdit;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
dxDBGrid5: TdxDBGrid;
|
|
|
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn4: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn24: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn25: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn26: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn30: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn31: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn32: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn5: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn36: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column23: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column24: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column26: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column25: TdxDBGridDateColumn;
|
|
|
op_type: TEdit;
|
|
|
fee_type: TEdit;
|
|
|
t_do_fee: TDataSource;
|
|
|
dxDBGrid1Column1: TdxDBGridColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
t_ch_feeDSDesigner: TStringField;
|
|
|
t_ch_feeDSDesigner2: TStringField;
|
|
|
t_ch_feeDSDesigner3: TStringField;
|
|
|
t_ch_feeDSDesigner5: TStringField;
|
|
|
t_ch_feeDSDesigner6: TStringField;
|
|
|
t_ch_feeDSDesigner7: TStringField;
|
|
|
t_ch_feeDSDesigner8: TStringField;
|
|
|
t_ch_feeDSDesigner9: TBCDField;
|
|
|
t_ch_feeDSDesigner10: TBCDField;
|
|
|
t_ch_feeDSDesigner11: TBCDField;
|
|
|
t_ch_feeDSDesigner12: TStringField;
|
|
|
t_ch_feeDSDesigner13: TBCDField;
|
|
|
t_ch_feeDSDesigner14: TStringField;
|
|
|
t_ch_feeDSDesigner21: TStringField;
|
|
|
t_ch_feeDSDesigner22: TDateTimeField;
|
|
|
t_bz_balance1: TDataSource;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
private
|
|
|
function fee_get_client(str:string):string;
|
|
|
function fee_get_num(Str:String):Double;
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_fee_history: Tfrm_fee_history;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function, u_data_share;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
function Tfrm_fee_history.fee_get_client(str:string):string;
|
|
|
begin
|
|
|
if str='' then
|
|
|
result:=''
|
|
|
else
|
|
|
begin
|
|
|
if (op_type.text='1')OR(op_type.text='2') then
|
|
|
begin
|
|
|
if str='ί<>е<EFBFBD>λ'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD>˾'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring;
|
|
|
if str='<27><>վ'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><>վ').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD>'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD>'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD>'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
if str='<27>ջ<EFBFBD><D5BB><EFBFBD>'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').asstring;
|
|
|
if str='֪ͨ<CDA8><D6AA>'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('֪ͨ<CDA8><D6AA>').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD>'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if str='ί<>е<EFBFBD>λ'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').asstring;
|
|
|
if str='<27><><EFBFBD>չ<EFBFBD>˾'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
if str='<27><><EFBFBD><EFBFBD>'then
|
|
|
result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_fee_history.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
CLOSE;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_fee_history.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinNotebook1.PageIndex:=strtoint(op_type.text);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_fee_history.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
Edit1.text:='';
|
|
|
Edit2.text:='';
|
|
|
Edit3.text:='';
|
|
|
Edit4.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:='';
|
|
|
RxDBLookupCombo1.ClearValue;
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
RxDBLookupCombo3.ClearValue;
|
|
|
RxDBLookupCombo4.ClearValue;
|
|
|
wwDBDateTimePicker1.Text:='';
|
|
|
wwDBDateTimePicker2.Text:='';
|
|
|
wwDBDateTimePicker3.Text:='';
|
|
|
wwDBDateTimePicker4.Text:='';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_fee_history.bsSkinButton2Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
case bsSkinNotebook1.PageIndex of
|
|
|
1:
|
|
|
begin
|
|
|
if Edit1.text<>''then
|
|
|
str:=' where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
|
|
|
if Edit4.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+''''
|
|
|
else
|
|
|
str:=str+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+'''';
|
|
|
end;
|
|
|
if Edit2.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit2.text+'%'+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit2.text+'%'+'''';
|
|
|
end;
|
|
|
if Edit3.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+'''';
|
|
|
end;
|
|
|
if RxDBLookupCombo2.DisplayValue<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+''''
|
|
|
else
|
|
|
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker1.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker1.text+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
end;
|
|
|
|
|
|
str:='select * from t_op_seae '+str+default_sort(53,'t_op_seae','','desc');
|
|
|
t_ch_fee.close;
|
|
|
t_bill.close;
|
|
|
t_bill.sql.clear;
|
|
|
t_bill.sql.add(str);
|
|
|
t_bill.open;
|
|
|
t_ch_fee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=fee_type.text;
|
|
|
t_ch_fee.open;
|
|
|
end;
|
|
|
2:
|
|
|
begin
|
|
|
if Edit5.text<>''then
|
|
|
str:=' where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit5.text+'%'+'''';
|
|
|
if Edit7.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit7.text+'%'+''''
|
|
|
else
|
|
|
str:=str+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit7.text+'%'+'''';
|
|
|
end;
|
|
|
if Edit6.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit6.text+'%'+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit6.text+'%'+'''';
|
|
|
end;
|
|
|
if Edit8.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit8.text+'%'+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit8.text+'%'+'''';
|
|
|
end;
|
|
|
if RxDBLookupCombo1.DisplayValue<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo1.DisplayValues[1]+''''
|
|
|
else
|
|
|
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo1.DisplayValues[1]+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker2.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker2.text+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker2.text+'''';
|
|
|
end;
|
|
|
|
|
|
str:='select * from t_op_seai '+str+default_sort(53,'t_op_seae','','desc');
|
|
|
t_ch_fee.close;
|
|
|
t_bill.close;
|
|
|
t_bill.sql.clear;
|
|
|
t_bill.sql.add(str);
|
|
|
t_bill.open;
|
|
|
t_ch_fee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=fee_type.text;
|
|
|
t_ch_fee.open;
|
|
|
end;
|
|
|
3:
|
|
|
begin
|
|
|
if Edit9.text<>''then
|
|
|
str:=' where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit9.text+'%'+'''';
|
|
|
if Edit11.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit11.text+'%'+''''
|
|
|
else
|
|
|
str:=str+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit11.text+'%'+'''';
|
|
|
end;
|
|
|
if Edit10.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit10.text+'%'+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit10.text+'%'+'''';
|
|
|
end;
|
|
|
if Edit12.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit12.text+'%'+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit12.text+'%'+'''';
|
|
|
end;
|
|
|
if RxDBLookupCombo3.DisplayValue<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo3.DisplayValues[1]+''''
|
|
|
else
|
|
|
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo3.DisplayValues[1]+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker3.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker3.text+''''
|
|
|
else
|
|
|
str:=str+' and һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker3.text+'''';
|
|
|
end;
|
|
|
|
|
|
str:='select * from t_op_aire '+str+default_sort(55,'t_op_aire','','desc');
|
|
|
t_ch_fee.close;
|
|
|
t_bill.close;
|
|
|
t_bill.sql.clear;
|
|
|
t_bill.sql.add(str);
|
|
|
t_bill.open;
|
|
|
t_ch_fee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=fee_type.text;
|
|
|
t_ch_fee.open;
|
|
|
end;
|
|
|
4:
|
|
|
begin
|
|
|
if Edit13.text<>''then
|
|
|
str:=' where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit13.text+'%'+'''';
|
|
|
if Edit15.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit15.text+'%'+''''
|
|
|
else
|
|
|
str:=str+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit15.text+'%'+'''';
|
|
|
end;
|
|
|
if Edit14.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit14.text+'%'+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit14.text+'%'+'''';
|
|
|
end;
|
|
|
if Edit16.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit16.text+'%'+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit16.text+'%'+'''';
|
|
|
end;
|
|
|
if RxDBLookupCombo4.DisplayValue<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo4.DisplayValues[1]+''''
|
|
|
else
|
|
|
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo4.DisplayValues[1]+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker4.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker4.text+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker4.text+'''';
|
|
|
end;
|
|
|
|
|
|
str:='select * from t_op_airi '+str+default_sort(56,'t_op_airi','','desc');
|
|
|
t_ch_fee.close;
|
|
|
t_bill.close;
|
|
|
t_bill.sql.clear;
|
|
|
t_bill.sql.add(str);
|
|
|
t_bill.open;
|
|
|
t_ch_fee.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value:=fee_type.text;
|
|
|
t_ch_fee.open;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_fee_history.bsSkinButton3Click(Sender: TObject);
|
|
|
var
|
|
|
i,k:integer;
|
|
|
function getJfd:Double;
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
if (op_type.text='1') then begin
|
|
|
if (t_do_fee.DataSet.DataSource.DataSet.FieldByName('ƴ<><C6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='<27><>Ʊ<EFBFBD><C6B1>Ʊ') then begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Select sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from t_op_seae where <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>='''+t_do_fee.DataSet.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']+'''');
|
|
|
Open;
|
|
|
if s_w(4,fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
|
|
|
begin
|
|
|
if s_w(4,fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
|
|
|
Result:=s_w(4,fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
|
|
|
else
|
|
|
Result:=1;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
|
|
|
Result:=fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
Result:=1;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end else begin
|
|
|
if s_w(4,t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
|
|
|
begin
|
|
|
if s_w(4,t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
|
|
|
Result:=s_w(4,t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
|
|
|
else
|
|
|
Result:=1;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
|
|
|
Result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
Result:=1;
|
|
|
end;
|
|
|
end;
|
|
|
end else begin
|
|
|
if s_w(4,t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
|
|
|
begin
|
|
|
if s_w(4,t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
|
|
|
Result:=s_w(4,t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
|
|
|
else
|
|
|
Result:=1;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
|
|
|
Result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
Result:=1;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
begin
|
|
|
if t_ch_fee.IsEmpty then
|
|
|
exit;
|
|
|
if dxDBGrid1.SelectedCount>=1 then
|
|
|
begin
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do
|
|
|
begin
|
|
|
t_ch_fee.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
t_do_fee.DataSet.append;
|
|
|
for k:= 0 to (t_ch_fee.fieldcount-1) do
|
|
|
begin
|
|
|
if t_do_fee.DataSet.Fields.FindField(t_ch_fee.fields[k].FieldName)<>nil then
|
|
|
if (t_ch_fee.fields[k].FieldName<>'CH_ID')AND(t_ch_fee.fields[k].FieldName<>'<27><><EFBFBD><EFBFBD>') then
|
|
|
t_do_fee.DataSet[t_ch_fee.fields[k].FieldName]:=t_ch_fee[t_ch_fee.fields[k].FieldName];
|
|
|
end;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=fee_type.text;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:='';
|
|
|
t_do_fee.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring);
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=fee_get_num(t_do_fee.DataSet['<27><>']);
|
|
|
if t_do_fee.DataSet['<27>ұ<EFBFBD>']='USD' then begin
|
|
|
if op_type.text='1' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_do_fee.DataSet.DataSource.DataSet.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
else if op_type.text='2' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
else if op_type.text='3' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_do_fee.DataSet.DataSource.DataSet.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
else if op_type.text='4' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
end else
|
|
|
if t_do_fee.DataSet['<27>ұ<EFBFBD>']='RMB' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_do_fee.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_do_fee.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_do_fee.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
|
|
|
|
|
|
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_do_fee.Dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
t_do_fee.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ').AsBoolean:=frm_data_share.t_code_fee.fieldbyname('<27><>ֹ<EFBFBD><D6B9>Ʊ').AsBoolean;
|
|
|
end;
|
|
|
|
|
|
|
|
|
t_do_fee.DataSet.post;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_do_fee.DataSet.append;
|
|
|
for k:= 0 to (t_ch_fee.fieldcount-1) do
|
|
|
begin
|
|
|
if t_do_fee.DataSet.Fields.FindField(t_ch_fee.fields[k].FieldName)<>nil then
|
|
|
if (t_ch_fee.fields[k].FieldName<>'CH_ID')AND(t_ch_fee.fields[k].FieldName<>'<27><><EFBFBD><EFBFBD>') then
|
|
|
t_do_fee.DataSet[t_ch_fee.fields[k].FieldName]:=t_ch_fee[t_ch_fee.fields[k].FieldName];
|
|
|
end;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=fee_type.text;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:='';
|
|
|
t_do_fee.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring);
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=fee_get_num(t_do_fee.DataSet['<27><>']);
|
|
|
if t_do_fee.DataSet['<27>ұ<EFBFBD>']='USD' then begin
|
|
|
if op_type.text='1' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_do_fee.DataSet.DataSource.DataSet.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
else if op_type.text='2' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
else if op_type.text='3' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_do_fee.DataSet.DataSource.DataSet.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
else if op_type.text='4' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
end else
|
|
|
if t_do_fee.DataSet['<27>ұ<EFBFBD>']='RMB' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_do_fee.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_do_fee.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_do_fee.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
|
|
|
|
|
|
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_do_fee.Dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
t_do_fee.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ').AsBoolean:=frm_data_share.t_code_fee.fieldbyname('<27><>ֹ<EFBFBD><D6B9>Ʊ').AsBoolean;
|
|
|
end;
|
|
|
|
|
|
|
|
|
t_do_fee.DataSet.post;
|
|
|
end;
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_fee_history.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
k:integer;
|
|
|
function getJfd:Double;
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
if (op_type.text='1') then begin
|
|
|
if (t_do_fee.DataSet.DataSource.DataSet.FieldByName('ƴ<><C6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='<27><>Ʊ<EFBFBD><C6B1>Ʊ') then begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Select sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD> from t_op_seae where <20><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>='''+t_do_fee.DataSet.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']+'''');
|
|
|
Open;
|
|
|
if s_w(4,fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
|
|
|
begin
|
|
|
if s_w(4,fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
|
|
|
Result:=s_w(4,fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
|
|
|
else
|
|
|
Result:=1;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
|
|
|
Result:=fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
Result:=1;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end else begin
|
|
|
if s_w(4,t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
|
|
|
begin
|
|
|
if s_w(4,t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
|
|
|
Result:=s_w(4,t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
|
|
|
else
|
|
|
Result:=1;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
|
|
|
Result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
Result:=1;
|
|
|
end;
|
|
|
end;
|
|
|
end else begin
|
|
|
if s_w(4,t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat then
|
|
|
begin
|
|
|
if s_w(4,t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)>1 then
|
|
|
Result:=s_w(4,t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/1000)
|
|
|
else
|
|
|
Result:=1;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat>1 then
|
|
|
Result:=t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat
|
|
|
else
|
|
|
Result:=1;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
begin
|
|
|
if t_ch_fee.IsEmpty then
|
|
|
exit;
|
|
|
t_ch_fee.first;
|
|
|
while not t_ch_fee.eof do
|
|
|
begin
|
|
|
t_do_fee.DataSet.append;
|
|
|
for k:= 0 to (t_ch_fee.fieldcount-1) do
|
|
|
begin
|
|
|
if t_do_fee.DataSet.Fields.FindField(t_ch_fee.fields[k].FieldName)<>nil then
|
|
|
if (t_ch_fee.fields[k].FieldName<>'CH_ID')AND(t_ch_fee.fields[k].FieldName<>'<27><><EFBFBD><EFBFBD>') then
|
|
|
t_do_fee.DataSet[t_ch_fee.fields[k].FieldName]:=t_ch_fee[t_ch_fee.fields[k].FieldName];
|
|
|
end;
|
|
|
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=fee_type.text;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=fee_get_num(t_do_fee.DataSet['<27><>']);
|
|
|
if t_do_fee.DataSet['<27>ұ<EFBFBD>']='USD' then begin
|
|
|
if op_type.text='1' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_do_fee.DataSet.DataSource.DataSet.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
else if op_type.text='2' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
else if op_type.text='3' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_do_fee.DataSet.DataSource.DataSet.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
else if op_type.text='4' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=getUsdExRate(t_do_fee.DataSet.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
|
|
|
end else
|
|
|
if t_do_fee.DataSet['<27>ұ<EFBFBD>']='RMB' then
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
|
|
|
t_do_fee.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=fee_get_client(t_ch_fee.fieldbyname('<27><><EFBFBD>㵥λ').asstring);
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>']:='';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>']:=null;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_do_fee.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_do_fee.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_do_fee.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>']:='';
|
|
|
t_do_fee.DataSet['˳<><CBB3>']:=t_do_fee.DataSet.RecordCount+1;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_do_fee.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
|
|
|
|
|
|
if frm_data_share.t_code_fee.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',t_do_fee.Dataset.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
t_do_fee.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ').AsBoolean:=frm_data_share.t_code_fee.fieldbyname('<27><>ֹ<EFBFBD><D6B9>Ʊ').AsBoolean;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
t_do_fee.DataSet.post;
|
|
|
t_ch_fee.next;
|
|
|
end;
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
function Tfrm_fee_history.fee_get_num(Str: String): Double;
|
|
|
begin
|
|
|
if not t_bz_balance1.DataSet.IsEmpty then
|
|
|
|
|
|
if t_bz_balance1.DataSet.Locate('two',Str,[])then
|
|
|
begin
|
|
|
Result:=t_bz_balance1.DataSet.fieldbyname('three').asfloat;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|