You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

829 lines
27 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit u_op_history_seae;
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, ExtCtrls;
type
Tfrm_op_history_seae = class(TForm)
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton5: TbsSkinButton;
bsSkinNotebook1: TbsSkinNotebook;
bsSkinButton10: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
t_op_seae: 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;
Panel1: TPanel;
dxDBGrid6: TdxDBGrid;
dxDBGrid2Column12: TdxDBGridColumn;
dxDBGrid2Column14: TdxDBGridColumn;
dxDBGrid2Column15: TdxDBGridColumn;
dxDBGrid2Column1: TdxDBGridColumn;
dxDBGrid2Column2: TdxDBGridColumn;
dxDBGrid2Column3: TdxDBGridColumn;
dxDBGrid2Column4: TdxDBGridColumn;
dxDBGrid2Column5: TdxDBGridColumn;
dxDBGrid2Column6: TdxDBGridColumn;
dxDBGrid2Column7: TdxDBGridColumn;
dxDBGrid2Column8: TdxDBGridColumn;
dxDBGrid2Column9: TdxDBGridColumn;
dxDBGrid2Column10: TdxDBGridColumn;
dxDBGrid2Column11: TdxDBGridColumn;
dxDBGrid2Column13: TdxDBGridColumn;
dxDBGrid2Column16: TdxDBGridColumn;
dxDBGrid2Column17: TdxDBGridColumn;
dxDBGrid2Column18: TdxDBGridColumn;
dxDBGrid2Column19: TdxDBGridColumn;
dxDBGrid2Column20: TdxDBGridColumn;
dxDBGrid2Column21: TdxDBGridColumn;
dxDBGrid2Column22: TdxDBGridColumn;
dxDBGrid2Column23: TdxDBGridColumn;
dxDBGrid2Column24: TdxDBGridColumn;
dxDBGrid2Column25: TdxDBGridColumn;
dxDBGrid2Column26: TdxDBGridColumn;
dxDBGrid2Column27: TdxDBGridColumn;
dxDBGrid2Column28: TdxDBGridColumn;
dxDBGrid2Column29: TdxDBGridColumn;
dxDBGrid2Column30: TdxDBGridColumn;
dxDBGrid2Column31: TdxDBGridColumn;
dxDBGrid2Column32: TdxDBGridColumn;
dxDBGrid2Column33: TdxDBGridColumn;
bsSkinPanel11: TbsSkinPanel;
Label25: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label30: TLabel;
Edit17: TEdit;
Edit18: TEdit;
RxDBLookupCombo5: TRxDBLookupCombo;
Edit19: TEdit;
Edit20: TEdit;
wwDBDateTimePicker5: TwwDBDateTimePicker;
dxDBGrid2Column34: TdxDBGridColumn;
dxDBGrid2Column35: TdxDBGridColumn;
dxDBGrid2Column36: TdxDBGridColumn;
t_op_seae1: TDataSource;
t_op_ctn_fendan1: TDataSource;
dxDBGrid4Column14: TdxDBGridColumn;
dxDBGrid4Column15: TdxDBGridColumn;
dxDBGrid4Column16: TdxDBGridColumn;
dxDBGrid4Column17: TdxDBGridColumn;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure Edit4KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
procedure Edit2KeyPress(Sender: TObject; var Key: Char);
procedure Edit3KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker1KeyPress(Sender: TObject; var Key: Char);
private
function fee_get_client(str:string):string;
function GetCurrencyRate(aCurrency,BsType:string;Dataset1:TDataset):Double;
{ Private declarations }
public
{ Public declarations }
bsno,bsCardNo:string;
end;
var
frm_op_history_seae: Tfrm_op_history_seae;
implementation
uses u_main, my_sys_function, u_data_share;
{$R *.dfm}
function Tfrm_op_history_seae.GetCurrencyRate(aCurrency,BsType:string;Dataset1:TDataset):Double;
begin
if frm_data_share.t_code_currency.Locate('<27>ұ<EFBFBD>',Trim(aCurrency),[])THEN
begin
if Trim(aCurrency)='USD' then
begin
if strtobool(get_parameters_value(145,'true')) then
begin
if BsType='1' then
Result:=getUsdExRate(dataset1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,aCurrency)
else
if BsType='2' then
Result:=getUsdExRate(dataset1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,aCurrency)
else
if BsType='3' then
Result:=getUsdExRate(dataset1.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,aCurrency)
else
if BsType='4' then
Result:=getUsdExRate(dataset1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,aCurrency)
else
if BsType='6' then
Result:=getUsdExRate(dataset1.fieldbyname('<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>').asstring,aCurrency);
end
else
begin
Result:=getUsdExRate(dataset1.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,aCurrency)
end;
end
else
Result:=frm_data_share.t_code_currency.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
end;
end;
procedure Tfrm_op_history_seae.bsSkinButton5Click(Sender: TObject);
begin
CLOSE;
end;
procedure Tfrm_op_history_seae.FormShow(Sender: TObject);
begin
bsSkinNotebook1.PageIndex:=strtoint(op_type.text);
end;
procedure Tfrm_op_history_seae.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;
function Tfrm_op_history_seae.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;
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_op_history_seae.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;
if str<>'' then
str:=str+' and '+open_data('0001','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
else str:=str+' where '+open_data('0001','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
str:='select * from t_op_seae '+str+default_sort(53,'t_op_seae','','desc');
t_op_seae.close;
t_op_seae.sql.clear;
t_op_seae.sql.add(str);
t_op_seae.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;
if str<>'' then
str:=str+' and '+open_data('0002','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
else str:=str+' where '+open_data('0002','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
str:='select * from t_op_seai '+str+default_sort(54,'t_op_seai','','desc');
t_op_seae.close;
t_op_seae.sql.clear;
t_op_seae.sql.add(str);
t_op_seae.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;
if str<>'' then
str:=str+' and '+open_data('0003','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
else str:=str+' where '+open_data('0003','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
str:='select * from t_op_aire '+str+default_sort(55,'t_op_aire','','desc');
t_op_seae.close;
t_op_seae.sql.clear;
t_op_seae.sql.add(str);
t_op_seae.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;
if str<>'' then
str:=str+' and '+open_data('0004','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
else str:=str+' where '+open_data('0004','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
str:='select * from t_op_airi '+str+default_sort(56,'t_op_airi','','desc');
t_op_seae.close;
t_op_seae.sql.clear;
t_op_seae.sql.add(str);
t_op_seae.open;
end;
6:
begin
if Edit17.text<>''then
str:=' where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit17.text+'%'+'''';
if Edit19.text<>''then
begin
if str=''then
str:=' where ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit19.text+'%'+''''
else
str:=str+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit19.text+'%'+'''';
end;
if Edit18.text<>''then
begin
if str=''then
str:=' where <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit18.text+'%'+''''
else
str:=str+' and <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit18.text+'%'+'''';
end;
if Edit20.text<>''then
begin
if str=''then
str:=' where <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit20.text+'%'+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit20.text+'%'+'''';
end;
if RxDBLookupCombo5.DisplayValue<>''then
begin
if str=''then
str:=' where ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo5.DisplayValues[1]+''''
else
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo5.DisplayValues[1]+'''';
end;
if wwDBDateTimePicker5.text<>''then
begin
if str=''then
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker5.text+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker5.text+'''';
end;
str:='select * from t_op_railway '+str+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_op_seae.close;
t_op_seae.sql.clear;
t_op_seae.sql.add(str);
t_op_seae.open;
end;
end;
end;
procedure Tfrm_op_history_seae.bsSkinButton3Click(Sender: TObject);
var
afield : variant;
i,AS_ID,old_AS_ID: Integer;
oldbsno:string;
aAdoQuery,aQueryams:TAdoQuery;
begin
if t_op_seae.IsEmpty then
begin
showmessage('û<>и<EFBFBD><D0B8><EFBFBD>ĸ<EFBFBD><EFBFBD><E5A3AC><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD><EFBFBD>½<EFBFBD><C2BD><EFBFBD>');
exit;
end;
case strtoint(op_type.text) of
1:
begin
try
oldbsno:=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
afield := vararraycreate([0,t_op_seae.fieldcount-1],varvariant);
for i := 0 to (t_op_seae.fieldcount-1) do
begin
afield[i] :=t_op_seae.fields[i].value ;
end;
t_do_fee.DataSet.edit;
for i := 0 to (t_op_seae.fieldcount-1) do
begin
if (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27>ջ<EFBFBD><D5BB><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='֪ͨ<CDA8><D6AA>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD>˸<EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='װ<><D7B0><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='װ<>۴<EFBFBD><DBB4><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='ж<><D0B6><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='Ŀ<>ĵ<EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD>ѷ<EFBFBD>ʽ')
or (t_do_fee.DataSet.fields[i].FieldName='Ԥ<><D4A4><EFBFBD>ص<EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><>ͷ')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ')
{
or (t_do_fee.DataSet.fields[i].FieldName='Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27>¶ȵ<C2B6>λ')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
}
or (t_do_fee.DataSet.fields[i].FieldName='<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B5A5><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='ǩ<><C7A9><EFBFBD><EFBFBD>ʽ')
or (t_do_fee.DataSet.fields[i].FieldName='ǩ<><C7A9><EFBFBD>ص<EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD>ʽ')
or (t_do_fee.DataSet.fields[i].FieldName='EDI<44><49>ע')
then
t_do_fee.DataSet.fields[i].value := afield[i] ;
end;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;sql.Clear;
sql.Add('select * from t_op_ams ');
sql.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=oldbsno;
Open;
if not IsEmpty then begin
if not t_op_ctn_fendan1.DataSet.Active then t_op_ctn_fendan1.DataSet.Open;
t_op_ctn_fendan1.DataSet.Edit;
t_op_ctn_fendan1.DataSet.FieldByName('AMS<4D><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=FieldByName('AMS<4D><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value;
t_op_ctn_fendan1.DataSet.FieldByName('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Value:=FieldByName('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Value;
t_op_ctn_fendan1.DataSet.FieldByName('AMS<4D>ջ<EFBFBD><D5BB><EFBFBD>').Value:=FieldByName('AMS<4D>ջ<EFBFBD><D5BB><EFBFBD>').Value;
t_op_ctn_fendan1.DataSet.FieldByName('AMS֪ͨ<CDA8><D6AA>').Value:=FieldByName('AMS֪ͨ<CDA8><D6AA>').Value;
t_op_ctn_fendan1.DataSet.post;
end;
finally
Free;
end;
finally
close;
end;
end;
3:begin
afield := vararraycreate([0,t_op_seae.fieldcount-1],varvariant);
for i := 0 to (t_op_seae.fieldcount-1) do
begin
afield[i] :=t_op_seae.fields[i].value ;
end;
t_do_fee.DataSet.append;
for i := 0 to (t_op_seae.fieldcount-1) do
begin
if (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
or (t_do_fee.DataSet.fields[i].FieldName='<27><>ͷ')
then
t_do_fee.DataSet.fields[i].value := afield[i] ;
end;
t_do_fee.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:='';
t_do_fee.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=bsno;
t_do_fee.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').AsString:='<27><><EFBFBD>˷<EFBFBD>Ʊ';
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;sql.Clear;
sql.Add('select * from t_op_aire');
sql.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
Open;First;
for i:=0 to (fieldcount-1) do
begin
try
if (fields[i].FieldName<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
and(fields[i].FieldName<>'<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>')
and(fields[i].FieldName<>'<27>ջ<EFBFBD><D5BB><EFBFBD>')
and(fields[i].FieldName<>'<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>')
and(fields[i].FieldName<>'֪ͨ<CDA8><D6AA>')
and(fields[i].FieldName<>'֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>')
and(fields[i].FieldName<>'<27><><EFBFBD><EFBFBD>')
and(fields[i].FieldName<>'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
and(fields[i].FieldName<>'ί<>б<EFBFBD><D0B1><EFBFBD>')
and(fields[i].FieldName<>'װ<>˷<EFBFBD>ʽ')
and(fields[i].FieldName<>'<27><>ͷ')
then
if t_do_fee.DataSet.FindField(fields[i].FieldName)<>nil then
t_do_fee.DataSet[fields[i].FieldName]:=
fields[i].value;
//t_do_fee.DataSet.Post;
except
on e: Exception do
begin
showmessage(e.Message);
end;
end;
end;
finally
Free;
end;
close;
end;
end;
end;
procedure Tfrm_op_history_seae.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
key:=#0;
bsSkinButton2Click(Sender);
end;
end;
procedure Tfrm_op_history_seae.Edit4KeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
key:=#0;
bsSkinButton2Click(Sender);
end;
end;
procedure Tfrm_op_history_seae.RxDBLookupCombo2KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
bsSkinButton2Click(Sender);
end;
end;
procedure Tfrm_op_history_seae.Edit2KeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
key:=#0;
bsSkinButton2Click(Sender);
end;
end;
procedure Tfrm_op_history_seae.Edit3KeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
key:=#0;
bsSkinButton2Click(Sender);
end;
end;
procedure Tfrm_op_history_seae.wwDBDateTimePicker1KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
bsSkinButton2Click(Sender);
end;
end;
end.