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.
DONGSHENG6/费用模块/u_ch_fee_check_seae_match.~pas

1072 lines
32 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_ch_fee_check_seae_match;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, bsSkinCtrls, wwdblook, RxLookup, bsSkinBoxCtrls,
wwdbdatetimepicker, StdCtrls, DB, ADODB, dxExEdtr, dxDBTLCl, dxGrClms,
dxTL, dxDBCtrl, dxDBGrid, dxCntner, DBCtrls, Mask,u_lcxunit,
IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdExplicitTLSClientServerBase, IdMessageClient, IdSMTPBase, IdSMTP,
IdMessage,IdAttachmentFile;
type
Tfrm_ch_fee_check_seae_match = class(TForm)
Notebook1: TNotebook;
bsSkinPanel1: TbsSkinPanel;
t_op_seae1: TDataSource;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridDateColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridMaskColumn;
dxDBGrid1Column17: TdxDBGridMaskColumn;
dxDBGrid1Column18: TdxDBGridDateColumn;
dxDBGrid1Column19: TdxDBGridDateColumn;
dxDBGrid1Column22: TdxDBGridMaskColumn;
dxDBGrid1Column23: TdxDBGridMaskColumn;
bsSkinButton7: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
Label130: TLabel;
Label131: TLabel;
Label210: TLabel;
Label213: TLabel;
Label217: TLabel;
Label218: TLabel;
Edit4: TEdit;
Edit2: TEdit;
bsSkinButton44: TbsSkinButton;
wwDBDateTimePicker18: TwwDBDateTimePicker;
wwDBDateTimePicker19: TwwDBDateTimePicker;
RxDBLookupCombo57: TRxDBLookupCombo;
wwDBLookupCombo26: TwwDBLookupCombo;
Edit8: TEdit;
bsSkinButton5: TbsSkinButton;
t_op_seae: TADOStoredProc;
t_ch_pay: TADOQuery;
t_ch_accept: TADOQuery;
t_ch_accept1: TDataSource;
t_ch_pay1: TDataSource;
bsSkinPanel2: TbsSkinPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
DBEdit6: TDBEdit;
DBEdit7: TDBEdit;
DBEdit8: TDBEdit;
DBEdit10: TDBEdit;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
DBEdit9: TDBEdit;
DBEdit11: TDBEdit;
DBEdit12: TDBEdit;
Label12: TLabel;
DBEdit13: TDBEdit;
Label13: TLabel;
DBEdit14: TDBEdit;
bsSkinPanel3: TbsSkinPanel;
bsSkinPanel4: TbsSkinPanel;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column1: TdxDBGridColumn;
dxDBGrid2Column2: TdxDBGridColumn;
dxDBGrid2Column3: TdxDBGridColumn;
dxDBGrid2Column4: TdxDBGridColumn;
dxDBGrid3: TdxDBGrid;
dxDBGridColumn1: TdxDBGridColumn;
dxDBGridColumn2: TdxDBGridColumn;
dxDBGridColumn3: TdxDBGridColumn;
dxDBGridColumn4: TdxDBGridColumn;
t_op_gain: TADOQuery;
t_op_gain1: TDataSource;
Label14: TLabel;
DBEdit15: TDBEdit;
Label15: TLabel;
DBEdit16: TDBEdit;
Label16: TLabel;
DBEdit17: TDBEdit;
Label17: TLabel;
DBEdit18: TDBEdit;
Label18: TLabel;
DBEdit19: TDBEdit;
Label19: TLabel;
DBEdit20: TDBEdit;
Label20: TLabel;
DBEdit21: TDBEdit;
Label21: TLabel;
Label22: TLabel;
DBEdit22: TDBEdit;
t_op_gainDSDesigner: TStringField;
t_op_gainUSD: TBCDField;
t_op_gainUSD2: TBCDField;
t_op_gainUSD3: TBCDField;
t_op_gainUSD4: TBCDField;
t_op_gainUSD5: TBCDField;
t_op_gainRMB: TBCDField;
t_op_gainRMB2: TBCDField;
t_op_gainRMB3: TBCDField;
t_op_gainRMB4: TBCDField;
t_op_gainRMB5: TBCDField;
t_op_gainDSDesigner2: TBCDField;
t_op_gainDSDesigner3: TBCDField;
t_op_gainDSDesigner4: TBCDField;
t_op_gainDSDesigner5: TStringField;
t_op_gainDSDesigner6: TBCDField;
t_op_gainDSDesigner7: TBCDField;
t_op_gainUSD6: TBCDField;
t_op_gainUSD7: TBCDField;
t_op_gainDSDesigner8: TBCDField;
t_op_gainOT: TBCDField;
t_op_gainOT2: TBCDField;
t_op_gainOT3: TBCDField;
t_op_gainOT4: TBCDField;
t_op_gainOT5: TBCDField;
t_op_gainUSD8: TBCDField;
t_op_gainUSD9: TBCDField;
t_op_gainUSD10: TBCDField;
t_op_gainRMB6: TBCDField;
t_op_gainRMB7: TBCDField;
t_op_gainRMB8: TBCDField;
t_op_gainDSDesigner9: TBCDField;
t_op_gainDSDesigner10: TBCDField;
t_op_gainDSDesigner11: TBCDField;
t_op_gainDSDesigner12: TStringField;
t_op_gainOT6: TBCDField;
t_op_gainOT7: TBCDField;
t_op_gainOT8: TBCDField;
t_op_gainDSDesigner13: TBCDField;
t_op_gainUSD11: TBCDField;
t_op_gainUSD12: TBCDField;
t_op_gainRMB9: TBCDField;
t_op_gainRMB10: TBCDField;
t_op_gainDSDesigner14: TBCDField;
t_op_gainDSDesigner15: TBCDField;
t_op_gainUSD13: TBCDField;
t_op_gainUSD14: TBCDField;
t_op_gainUSD15: TBCDField;
t_op_gainRMB11: TBCDField;
t_op_gainRMB12: TBCDField;
t_op_gainRMB13: TBCDField;
t_op_gainDSDesigner16: TBCDField;
t_op_gainDSDesigner17: TBCDField;
t_op_gainDSDesigner18: TBCDField;
t_op_gainDSDesigner19: TStringField;
t_op_gainOT9: TBCDField;
t_op_gainOT10: TBCDField;
t_op_gainOT11: TBCDField;
t_op_gainDSDesigner20: TBCDField;
t_op_gainUSD16: TBCDField;
t_op_gainUSD17: TBCDField;
t_op_gainRMB14: TBCDField;
t_op_gainRMB15: TBCDField;
t_op_gainDSDesigner21: TBCDField;
t_op_gainDSDesigner22: TBCDField;
t_op_gainField: TFloatField;
t_op_gainField2: TFloatField;
bsSkinButton8: TbsSkinButton;
Label23: TLabel;
DBEdit23: TDBEdit;
Label24: TLabel;
DBEdit24: TDBEdit;
dxDBGrid1Column20: TdxDBGridColumn;
dxDBGrid1Column21: TdxDBGridColumn;
t_op_seae_all: TADOQuery;
t_op_seae_all1: TDataSource;
dxDBGrid4: TdxDBGrid;
dxDBGrid4Column1: TdxDBGridColumn;
dxDBGrid4Column2: TdxDBGridColumn;
t_op_seae_allDSDesigner: TStringField;
t_op_seae_allDSDesigner2: TStringField;
t_op_seae_allDSDesigner3: TDateTimeField;
t_op_seae_allDSDesigner4: TStringField;
t_op_seae_allRMB: TBCDField;
t_op_seae_allUSD: TBCDField;
t_op_seae_allField: TFloatField;
t_op_seae_allField2: TFloatField;
t_op_seae_allDSDesigner5: TStringField;
dxDBGrid4Column3: TdxDBGridColumn;
Label25: TLabel;
Label26: TLabel;
DBEdit25: TDBEdit;
dxDBGrid2Column5: TdxDBGridColumn;
dxDBGrid3Column5: TdxDBGridColumn;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton38: TbsSkinButton;
dxDBGrid1Column24: TdxDBGridColumn;
dxDBGrid1Column25: TdxDBGridColumn;
bsSkinButton4: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
Label27: TLabel;
Edit1: TEdit;
Label28: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker2: TwwDBDateTimePicker;
Label29: TLabel;
wwDBDateTimePicker3: TwwDBDateTimePicker;
wwDBDateTimePicker4: TwwDBDateTimePicker;
Label30: TLabel;
Edit3: TEdit;
bsSkinButton10: TbsSkinButton;
SMTP1: TIdSMTP;
IdMsg: TIdMessage;
dxDBGrid2Column6: TdxDBGridColumn;
dxDBGrid3Column6: TdxDBGridColumn;
dxDBGrid2Column7: TdxDBGridColumn;
dxDBGrid3Column7: TdxDBGridColumn;
Label31: TLabel;
DBEdit26: TDBEdit;
bsSkinButton21: TbsSkinButton;
dxDBGrid3Column8: TdxDBGridColumn;
Label32: TLabel;
DBEdit27: TDBEdit;
dxDBGrid2Column8: TdxDBGridColumn;
dxDBGrid2Column9: TdxDBGridColumn;
dxDBGrid3Column9: TdxDBGridColumn;
dxDBGrid3Column10: TdxDBGridColumn;
DBMemo24: TDBMemo;
Label184: TLabel;
bsSkinCheckRadioBox4: TbsSkinCheckRadioBox;
wwDBDateTimePicker5: TwwDBDateTimePicker;
procedure dxDBGrid1DblClick(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure t_op_gainCalcFields(DataSet: TDataSet);
procedure bsSkinButton44Click(Sender: TObject);
procedure Edit4KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo57KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo26KeyPress(Sender: TObject; var Key: Char);
procedure Edit2KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker18KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker19KeyPress(Sender: TObject; var Key: Char);
procedure Edit8KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinButton8Click(Sender: TObject);
procedure dxDBGrid4DblClick(Sender: TObject);
procedure t_op_seae_allCalcFields(DataSet: TDataSet);
procedure bsSkinButton1Click(Sender: TObject);
procedure dxDBGrid2Column5CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure dxDBGrid3Column5CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton38Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton21Click(Sender: TObject);
procedure DBEdit8Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure checkconditionSql(checks:string);
procedure SendEmailMessage(CheckType,reasons:string);
end;
var
frm_ch_fee_check_seae_match: Tfrm_ch_fee_check_seae_match;
implementation
uses u_main, my_sys_function, u_data_share;
{$R *.dfm}
procedure Tfrm_ch_fee_check_seae_match.dxDBGrid1DblClick(Sender: TObject);
begin
if bsSkinButton11.Caption='<27><EFBFBD><E9BFB4>ϸ' then
begin
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
Notebook1.PageIndex:=1;
exit;
end;
if bsSkinButton11.Caption='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>' then
begin
bsSkinButton11.Caption:='<27><EFBFBD><E9BFB4>ϸ';
Notebook1.PageIndex:=0;
exit;
end;
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton11Click(
Sender: TObject);
begin
if bsSkinButton11.Caption='<27><EFBFBD><E9BFB4>ϸ' then
begin
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
Notebook1.PageIndex:=1;
exit;
end;
if bsSkinButton11.Caption='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>' then
begin
bsSkinButton11.Caption:='<27><EFBFBD><E9BFB4>ϸ';
Notebook1.PageIndex:=0;
exit;
end;
end;
procedure Tfrm_ch_fee_check_seae_match.FormShow(Sender: TObject);
var s_SqlSea:string;
begin
edit1.text:=employee;
edit3.text:=employee;
if if_open('266') then
begin
bsSkinButton8.Visible:=true;
bsSkinButton2.Visible:=true;
end
else
begin
bsSkinButton8.Visible:=false;
bsSkinButton2.Visible:=false;
end;
if if_open('248') then
begin
bsSkinButton1.Visible:=true;
bsSkinButton3.Visible:=true;
end
else
begin
bsSkinButton1.Visible:=false;
bsSkinButton3.Visible:=false;
end;
Notebook1.PageIndex:=0;
loadreggrid(dxdbgrid1,true,caption);
if (if_open('266') and if_open('248')) then
begin
s_SqlSea:='select top 100 * from t_op_seae t1 where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'' and '
+open_data('0011','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and EXISTS (select ''X'' from t_op_seae t2,t_ch_fee f where f.<2E><><EFBFBD><EFBFBD>״̬ in (''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'',''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'',''<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>'') and f.<2E><><EFBFBD><EFBFBD>=t2.<2E><><EFBFBD><EFBFBD> and t2.<2E><><EFBFBD><EFBFBD>=t1.<2E><><EFBFBD><EFBFBD>)'
+default_sort(53,'t1','','desc');
end
else
if if_open('266') then
begin
s_SqlSea:='select top 100 * from t_op_seae t1 where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'' and '
+open_data('0011','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and EXISTS (select ''X'' from t_op_seae t2,t_ch_fee f where f.<2E><><EFBFBD><EFBFBD>״̬ in (''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'',''<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>'') and f.<2E><><EFBFBD><EFBFBD>=t2.<2E><><EFBFBD><EFBFBD> and t2.<2E><><EFBFBD><EFBFBD>=t1.<2E><><EFBFBD><EFBFBD>)'
+default_sort(53,'t1','','desc');
end
else
if if_open('248') then
begin
s_SqlSea:='select top 100 * from t_op_seae t1 where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'' and '
+open_data('0011','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and EXISTS (select ''X'' from t_op_seae t2,t_ch_fee f where f.<2E><><EFBFBD><EFBFBD>״̬ in (''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'') and f.<2E><><EFBFBD><EFBFBD>=t2.<2E><><EFBFBD><EFBFBD> and t2.<2E><><EFBFBD><EFBFBD>=t1.<2E><><EFBFBD><EFBFBD>)'
+default_sort(53,'t1','','desc');
end;
///showmessage(s_SqlSea);
t_op_seae.Close;
t_op_seae.Parameters.ParamByName('SQLStr').value:=s_SqlSea;
t_op_seae.open;
t_ch_accept.Close;
t_ch_accept.open;
t_ch_pay.Close;
t_ch_pay.open;
t_op_gain.Close;
t_op_gain.open;
t_op_seae_all.Close;
t_op_seae_all.open;
end;
procedure Tfrm_ch_fee_check_seae_match.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_ch_fee_check_seae_match.Hide;
frm_ch_fee_check_seae_match.ManualFloat(frm_ch_fee_check_seae_match.BoundsRect );
frm_main.freeTabs('frm_ch_fee_check_seae_match');
action:=cafree;
frm_ch_fee_check_seae_match:=nil;
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton7Click(Sender: TObject);
begin
if t_op_seae1.DataSet=nil then
exit;
if not t_op_seae1.DataSet.Bof then
t_op_seae1.DataSet.Prior;
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton6Click(Sender: TObject);
begin
if t_op_seae1.DataSet=nil then
exit;
if not t_op_seae1.DataSet.eof then
t_op_seae1.DataSet.next;
end;
procedure Tfrm_ch_fee_check_seae_match.t_op_gainCalcFields(
DataSet: TDataSet);
begin
t_op_gain.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=getUsdExRate(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,'USD');
t_op_gain.FieldByName('ʵ<><CAB5>ë<EFBFBD><C3AB><EFBFBD><EFBFBD>').AsFloat:=
t_op_gain.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_op_gain.FieldByName('<27><><EFBFBD><EFBFBD>USD').AsFloat+t_op_gain.FieldByName('<27><><EFBFBD><EFBFBD>RMB').AsFloat;
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton44Click(Sender: TObject);
var
str:widestring;
begin
str:=' and 1=1 ';
str:=query_tiaojian(1,str,'ί<>б<EFBFBD><D0B1><EFBFBD>','ģ<><C4A3>',Edit4.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><E1B5A5>','ģ<><C4A3>',Edit2.text);
str:=query_tiaojian(1,str,'ί<>е<EFBFBD>λ','<27><><EFBFBD><EFBFBD>',RxDBLookupCombo57.DisplayValues[1]);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','ģ<><C4A3>',wwDBLookupCombo26.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','ģ<><C4A3>',Edit8.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','ģ<><C4A3>',Edit1.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','ģ<><C4A3>',Edit3.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>',wwDBDateTimePicker18.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','С<><D0A1>',wwDBDateTimePicker19.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>',wwDBDateTimePicker1.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','С<><D0A1>',wwDBDateTimePicker2.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>',wwDBDateTimePicker3.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','С<><D0A1>',wwDBDateTimePicker4.text);
if (if_open('266') and if_open('248')) then
begin
str:='select top 100 * from t_op_seae t1 where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> '+ str +' and '
+open_data('0011','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
// +' and EXISTS (select ''X'' from t_op_seae t2,t_ch_fee f where f.<2E><><EFBFBD><EFBFBD>״̬ in (''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'',''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'',''<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>'') and f.<2E><><EFBFBD><EFBFBD>=t2.<2E><><EFBFBD><EFBFBD> and t2.<2E><><EFBFBD><EFBFBD>=t1.<2E><><EFBFBD><EFBFBD>)'
+default_sort(53,'t1','','desc');
end
else
if if_open('266') then
begin
str:='select top 100 * from t_op_seae t1 where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> '+ str +' and '
+open_data('0011','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
// +' and EXISTS (select ''X'' from t_op_seae t2,t_ch_fee f where f.<2E><><EFBFBD><EFBFBD>״̬ in (''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'',''<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>'') and f.<2E><><EFBFBD><EFBFBD>=t2.<2E><><EFBFBD><EFBFBD> and t2.<2E><><EFBFBD><EFBFBD>=t1.<2E><><EFBFBD><EFBFBD>)'
+default_sort(53,'t1','','desc');
end
else
if if_open('248') then
begin
str:='select top 100 * from t_op_seae t1 where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> '+ str +' and '
+open_data('0011','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
// +' and EXISTS (select ''X'' from t_op_seae t2,t_ch_fee f where f.<2E><><EFBFBD><EFBFBD>״̬ in (''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'') and f.<2E><><EFBFBD><EFBFBD>=t2.<2E><><EFBFBD><EFBFBD> and t2.<2E><><EFBFBD><EFBFBD>=t1.<2E><><EFBFBD><EFBFBD>)'
+default_sort(53,'t1','','desc');
end;
{
str:='select * from t_op_seae where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_op_seae '
+str+')'+default_sort(53,'t_op_seae','','desc');
}
//showmessage(str);
t_op_seae.Close;
t_op_seae.Parameters.ParamByName('SQLStr').value:=str;
t_op_seae.open;
end;
procedure Tfrm_ch_fee_check_seae_match.Edit4KeyPress(Sender: TObject;
var Key: Char);
begin
if Key=#13 then
bsSkinButton44.OnClick(Sender);
end;
procedure Tfrm_ch_fee_check_seae_match.RxDBLookupCombo57KeyPress(
Sender: TObject; var Key: Char);
begin
if Key=#13 then
bsSkinButton44.OnClick(Sender);
end;
procedure Tfrm_ch_fee_check_seae_match.wwDBLookupCombo26KeyPress(
Sender: TObject; var Key: Char);
begin
if Key=#13 then
bsSkinButton44.OnClick(Sender);
end;
procedure Tfrm_ch_fee_check_seae_match.Edit2KeyPress(Sender: TObject;
var Key: Char);
begin
if Key=#13 then
bsSkinButton44.OnClick(Sender);
end;
procedure Tfrm_ch_fee_check_seae_match.wwDBDateTimePicker18KeyPress(
Sender: TObject; var Key: Char);
begin
if Key=#13 then
bsSkinButton44.OnClick(Sender);
end;
procedure Tfrm_ch_fee_check_seae_match.wwDBDateTimePicker19KeyPress(
Sender: TObject; var Key: Char);
begin
if Key=#13 then
bsSkinButton44.OnClick(Sender);
end;
procedure Tfrm_ch_fee_check_seae_match.Edit8KeyPress(Sender: TObject;
var Key: Char);
begin
if Key=#13 then
bsSkinButton44.OnClick(Sender);
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton8Click(Sender: TObject);
begin
if not if_open('266') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>˵<EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)<>IDOK then
exit;
try
fee_check_all('',t_ch_accept,get_parameters_value(101,'FALSE'),'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>');
fee_check_all('',t_ch_pay,get_parameters_value(105,'FALSE'),'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>');
finally
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
procedure Tfrm_ch_fee_check_seae_match.dxDBGrid4DblClick(Sender: TObject);
begin
fee_view(t_op_seae_all.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfrm_ch_fee_check_seae_match.t_op_seae_allCalcFields(
DataSet: TDataSet);
begin
t_op_seae_all.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=getUsdExRate(t_op_seae_all.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').asstring,'USD');
t_op_seae_all.FieldByName('ʵ<><CAB5>ë<EFBFBD><C3AB><EFBFBD><EFBFBD>').AsFloat:=
t_op_seae_all.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*t_op_seae_all.FieldByName('<27><><EFBFBD><EFBFBD>USD').AsFloat+t_op_seae_all.FieldByName('<27><><EFBFBD><EFBFBD>RMB').AsFloat;
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton1Click(Sender: TObject);
var aAdoQuery:TAdoQuery;
begin
aAdoQuery:=CreateAdoQuery;
if not if_open('248') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>˵<EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
with aAdoQuery do
begin
Close;Sql.Clear;
Sql.Add('select <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><D2B5>״̬,<2C><><EFBFBD><EFBFBD>״̬,<2C><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD> from t_op_seae');
Sql.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
open;
end;
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)<>IDOK then
exit;
try
fee_Recheck_all('',t_ch_accept,get_parameters_value(101,'FALSE'),'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>');
fee_Recheck_all('',t_ch_pay,get_parameters_value(105,'FALSE'),'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>');
aAdoQuery.Edit;
if aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
begin
aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=employee;
aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=now;
end;
{
aAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString:='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>';
aAdoQuery['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Now;
if bsSkinCheckRadioBox4.Checked then
aAdoQuery['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker5.date;
}
aAdoQuery.Post;
finally
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
aAdoQuery.Free;
t_op_seae.Refresh;
end;
end;
procedure Tfrm_ch_fee_check_seae_match.dxDBGrid2Column5CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
AColor:=dxgrid_color_fee(ANode.strings[dxDBGrid2Column5.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_ch_fee_check_seae_match.dxDBGrid3Column5CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
AColor:=dxgrid_color_fee(ANode.strings[dxDBGrid3Column5.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton2Click(Sender: TObject);
var str:string;
begin
if not if_open('267') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>ص<EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
str:=trim(InputBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2B5>ԭ<EFBFBD><D4AD>', '<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>', ''));
if str=''then
begin
showmessage('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end
else if str=''then
begin
exit;
end;
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)<>IDOK then
exit;
try
with t_ch_accept do
try
DisableControls;
First;
while not eof do
begin
if (FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') or (FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>') then
begin
Edit;
FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD>ύ';
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=employee;
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=now;
FieldByName('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>').AsString:=str;
post;
end;
Next;
end;
finally
EnableControls;
end;
with t_ch_pay do
try
DisableControls;
First;
while not eof do
begin
if (FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>') or (FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>') then
begin
Edit;
FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD>ύ';
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=employee;
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=now;
FieldByName('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>').AsString:=str;
post;
end;
Next;
end;
finally
EnableControls;
end;
SendEmailMessage('<27><><EFBFBD><EFBFBD><EFBFBD>ύ',str);
finally
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton3Click(Sender: TObject);
var str:string;
begin
if not if_open('267') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>ص<EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
str:=trim(InputBox('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2B5>ԭ<EFBFBD><D4AD>', '<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>', ''));
if str=''then
begin
showmessage('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end
else if str=''then
begin
exit;
end;
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)<>IDOK then
exit;
try
with t_ch_accept do
try
DisableControls;
First;
while not eof do
begin
if FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
begin
Edit;
FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>';
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=employee;
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=now;
FieldByName('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>').AsString:=str;
post;
end;
Next;
end;
finally
EnableControls;
end;
with t_ch_pay do
try
DisableControls;
First;
while not eof do
begin
if FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString='<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>' then
begin
Edit;
FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>';
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=employee;
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=now;
FieldByName('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>').AsString:=str;
post;
end;
Next;
end;
finally
EnableControls;
end;
SendEmailMessage('<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>',str);
finally
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
procedure Tfrm_ch_fee_check_seae_match.SendEmailMessage(CheckType,reasons:string);
var
str:widestring;
str_file:widestring;
str_memo:Tmemo;
begin
str_memo:=Tmemo.create(application);
str_memo.visible:=false;
str_memo.Parent:=frm_ch_fee_check_seae_match;
str_memo.Clear;
str_memo.Lines.Clear;
str_memo.Lines.Add('<27><><EFBFBD><EFBFBD><E1B5A5>:'+t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString);
str_memo.Lines.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+CheckType);
str_memo.Lines.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+Employee);
str_memo.Lines.Add('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>:'+FormatDateTime('YYYY-MM-DD hh:mm:sss',Now));
str_memo.Lines.Add('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>:'+reasons);
str_memo.Lines.Add('');
str_memo.Lines.Add('');
str_memo.Lines.Add('<27><><EFBFBD><EFBFBD>24Сʱ<D0A1><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϳͻ<CDBF><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>©<EFBFBD>շѣ<D5B7>');
try
if Trim(str_memo.lines.Text)<>'' then begin
SMTP1.AuthType := satDefault; //(satNone, satDefault, satSASL);
SMTP1.username:=get_parameters_value(179,'');
SMTP1.Password :=get_parameters_value(180,'');
SMTP1.Host :=get_parameters_value(181,'');
SMTP1.Port :=25;
try
SMTP1.Connect;
except
on e : Exception do
begin
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+E.Message);
end;
end;
if not SMTP1.Connected then
begin
Sleep(1000);
SMTP1.Connect;
end;
try
with IdMsg do
begin
body.Clear;
Body.Text :=str_memo.lines.Text;
From.address :=get_parameters_value(179,'');
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>Ա').AsString,[]) then
Recipients.EMailAddresses :=frm_data_share.t_sys_employee.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+';qiqi@qdsunstar.com';
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
Recipients.EMailAddresses :=Recipients.EMailAddresses+';'+frm_data_share.t_sys_employee.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
if CheckType='<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>' then
begin
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,[]) then
CCList.EMailAddresses :=frm_data_share.t_sys_employee.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
Subject:=CheckType+' '+t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+' '+FormatDateTime('YYYY-MM-DD hh:mm:sss',Now);
Body.SaveToFile(ExtractFilePath(Application.ExeName)+'Content.txt');
TIdAttachmentFile.Create(MessageParts,ExtractFilePath(Application.ExeName)+'Content.txt');
end;
if not SMTP1.Connected then
begin
Sleep(1000);
SMTP1.Connect;
end;
SMTP1.Send(IdMsg);
finally
SMTP1.Disconnect;
end;
end;
except
end;
str_memo.free;
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton38Click(
Sender: TObject);
var
book1:Tbookmark;
begin
if Notebook1.PageIndex=1 then
begin
if t_op_seae=nil then
exit;
book1:=t_op_seae.GetBookmark;
t_op_seae.Refresh;
t_op_seae.GotoBookmark(book1);
end
else
begin
book1:=t_op_seae.GetBookmark;
t_op_seae.Requery;
t_op_seae.GotoBookmark(book1);
end
end;
procedure Tfrm_ch_fee_check_seae_match.checkconditionSql(checks:string);
var
str:widestring;
begin
str:=' and 1=1 ';
str:=query_tiaojian(1,str,'ί<>б<EFBFBD><D0B1><EFBFBD>','ģ<><C4A3>',Edit4.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><E1B5A5>','ģ<><C4A3>',Edit2.text);
str:=query_tiaojian(1,str,'ί<>е<EFBFBD>λ','<27><><EFBFBD><EFBFBD>',RxDBLookupCombo57.DisplayValues[1]);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','ģ<><C4A3>',wwDBLookupCombo26.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','ģ<><C4A3>',Edit8.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>',wwDBDateTimePicker18.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','С<><D0A1>',wwDBDateTimePicker19.text);
if (if_open('266') and if_open('248')) then
begin
//and ('+checks+'='''' or '+checks+' is null)
if checks='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
str:='select top 100 * from t_op_seae t1 where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'' '+ str +' and '
+open_data('0011','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and EXISTS (select ''X'' from t_op_seae t2,t_ch_fee f where f.<2E><><EFBFBD><EFBFBD>״̬ in (''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'',''<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>'') and f.<2E><><EFBFBD><EFBFBD>=t2.<2E><><EFBFBD><EFBFBD> and t2.<2E><><EFBFBD><EFBFBD>=t1.<2E><><EFBFBD><EFBFBD>)'
+default_sort(53,'t1','','desc');
end
else if checks='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
str:='select top 100 * from t_op_seae t1 where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'' '+ str +' and '
+open_data('0011','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and EXISTS (select ''X'' from t_op_seae t2,t_ch_fee f where f.<2E><><EFBFBD><EFBFBD>״̬ in (''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'') and f.<2E><><EFBFBD><EFBFBD>=t2.<2E><><EFBFBD><EFBFBD> and t2.<2E><><EFBFBD><EFBFBD>=t1.<2E><><EFBFBD><EFBFBD>)'
+default_sort(53,'t1','','desc');
end
else
begin
str:='select top 100 * from t_op_seae t1 where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'' '+ str +' and '
+open_data('0011','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and EXISTS (select ''X'' from t_op_seae t2,t_ch_fee f where f.<2E><><EFBFBD><EFBFBD>״̬ in (''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'',''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'',''<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>'') and f.<2E><><EFBFBD><EFBFBD>=t2.<2E><><EFBFBD><EFBFBD> and t2.<2E><><EFBFBD><EFBFBD>=t1.<2E><><EFBFBD><EFBFBD>)'
+default_sort(53,'t1','','desc');
end;
end
else
if if_open('266') then
begin
str:='select top 100 * from t_op_seae t1 where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'' '+ str +' and '
+open_data('0011','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and EXISTS (select ''X'' from t_op_seae t2,t_ch_fee f where f.<2E><><EFBFBD><EFBFBD>״̬ in (''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'',''<27><><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>'') and f.<2E><><EFBFBD><EFBFBD>=t2.<2E><><EFBFBD><EFBFBD> and t2.<2E><><EFBFBD><EFBFBD>=t1.<2E><><EFBFBD><EFBFBD>)'
+default_sort(53,'t1','','desc');
end
else
if if_open('248') then
begin
str:='select top 100 * from t_op_seae t1 where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>״̬=''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'' '+ str +' and '
+open_data('0011','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and EXISTS (select ''X'' from t_op_seae t2,t_ch_fee f where f.<2E><><EFBFBD><EFBFBD>״̬ in (''<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'') and f.<2E><><EFBFBD><EFBFBD>=t2.<2E><><EFBFBD><EFBFBD> and t2.<2E><><EFBFBD><EFBFBD>=t1.<2E><><EFBFBD><EFBFBD>)'
+default_sort(53,'t1','','desc');
end;
t_op_seae.Close;
t_op_seae.Parameters.ParamByName('SQLStr').value:=str;
t_op_seae.open;
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton4Click(Sender: TObject);
begin
checkconditionSql('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton9Click(Sender: TObject);
begin
checkconditionSql('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton10Click(
Sender: TObject);
begin
Edit1.text:='';
Edit2.text:='';
Edit3.text:='';
Edit4.text:='';
Edit8.text:='';
wwDBDateTimePicker1.Clear;
wwDBDateTimePicker2.Clear;
wwDBDateTimePicker3.Clear;
wwDBDateTimePicker4.Clear;
wwDBDateTimePicker18.Clear;
wwDBDateTimePicker19.Clear;
RxDBLookupCombo57.ClearValue;
wwDBLookupCombo26.Text:='';
end;
procedure Tfrm_ch_fee_check_seae_match.bsSkinButton21Click(
Sender: TObject);
begin
frm_main.view_momo(t_op_seae1,'<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>һ',true);
end;
procedure Tfrm_ch_fee_check_seae_match.DBEdit8Change(Sender: TObject);
var
adate,bdate:TDate;
begin
if (DBEdit8.Text='') then begin
end else begin
adate:=StrToDate(DBEdit8.Text);
bdate:=StrToDate('2017-03-06');
if adate>=bdate then begin
dxDBGrid3Column8.Visible:=true;
end else begin
dxDBGrid3Column8.Visible:=false;
end;
end;
end;
end.