unit u_op_seae_dg;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,IdFTP,IdFTPCommon,
Dialogs, bsSkinCtrls, ExtCtrls, DB, ADODB, dxExEdtr, dxCntner, dxTL,
dxDBCtrl, dxDBGrid, ComCtrls, bsSkinTabs, RxLookup, StdCtrls, Mask,inifiles,
DBCtrls, wwdbdatetimepicker, wwdblook, u_op_sate, u_fee, u_op_card, Menus,
dxDBTLCl, dxGrClms, bsdbctrls, XPMenu, wwdbedit, Wwdotdot, Wwdbcomb,
Grids, Wwdbigrd, Wwdbgrid, FtpCli, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdIntercept, IdLogBase, IdLogEvent,
IdAntiFreezeBase, IdAntiFreeze, dxEditor, dxEdLib, dxDBELib, DBCtrlsEh,ComObj,
bsSkinBoxCtrls, IdExplicitTLSClientServerBase,ShellAPI, IdMessageClient,
IdSMTPBase, IdSMTP, IdMessage;
type
Tfrm_op_seae_dg = class(TForm)
Panel2: TPanel;
bsSkinButton7: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton38: TbsSkinButton;
Notebook1: TNotebook;
t_op_seae: TADOQuery;
t_op_seae1: TDataSource;
dxDBGrid1: TdxDBGrid;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinPanel1: TbsSkinPanel;
Label5: TLabel;
Label38: TLabel;
DBEdit4: TDBEdit;
DBEdit9: TDBEdit;
PopupMenu3: TPopupMenu;
N37: TMenuItem;
N38: TMenuItem;
N62: TMenuItem;
N25: TMenuItem;
N64: TMenuItem;
N63: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridDateColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridMaskColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridDateColumn;
dxDBGrid1Column17: TdxDBGridColumn;
XPMenu1: TXPMenu;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
bsSkinPanel2: TbsSkinPanel;
Label47: TLabel;
Label49: TLabel;
Label51: TLabel;
wwDBDateTimePicker9: TwwDBDateTimePicker;
wwDBDateTimePicker11: TwwDBDateTimePicker;
Edit3: TEdit;
wwDBDateTimePicker12: TwwDBDateTimePicker;
Label52: TLabel;
wwDBDateTimePicker13: TwwDBDateTimePicker;
Label53: TLabel;
bsSkinButton8: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
bsSkinButton14: TbsSkinButton;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
dxDBGrid1Column65: TdxDBGridColumn;
dxDBGrid1Column67: TdxDBGridColumn;
bsSkinPanel3: TbsSkinPanel;
Label36: TLabel;
DBEdit38: TDBEdit;
Label37: TLabel;
DBEdit39: TDBEdit;
Label40: TLabel;
Label44: TLabel;
DBEdit42: TDBEdit;
t_op_ctn1: TDataSource;
t_op_ctn: TADOQuery;
Label43: TLabel;
DBEdit18: TDBEdit;
bsSkinPanel5: TbsSkinPanel;
SaveDialog1: TSaveDialog;
dxDBGrid1Column20: TdxDBGridColumn;
dxDBGrid1Column21: TdxDBGridColumn;
dxDBGrid1Column22: TdxDBGridColumn;
Label217: TLabel;
wwDBLookupCombo26: TwwDBLookupCombo;
Label218: TLabel;
Edit8: TEdit;
Label81: TLabel;
Edit2: TEdit;
Label58: TLabel;
wwDBComboBoxOP: TwwDBComboBox;
OpenDialog1: TOpenDialog;
bsSkinTabSheet2: TbsSkinTabSheet;
dxDBGrid4: TdxDBGrid;
dxDBGrid4Column2: TdxDBGridColumn;
dxDBGridColumn10: TdxDBGridColumn;
dxDBGrid4Column3: TdxDBGridColumn;
bsSkinGroupBox13: TbsSkinGroupBox;
bsSkinPanel14: TbsSkinPanel;
bsSkinButton48: TbsSkinButton;
bsSkinButton49: TbsSkinButton;
bsSkinButton50: TbsSkinButton;
bsSkinButton51: TbsSkinButton;
bsSkinButton66: TbsSkinButton;
dxDBGrid3: TdxDBGrid;
dxDBGrid2fid: TdxDBGridMaskColumn;
dxDBGrid2rl_id: TdxDBGridMaskColumn;
dxDBGridColumn1: TdxDBGridColumn;
dxDBGridColumn2: TdxDBGridColumn;
dxDBGridColumn3: TdxDBGridColumn;
dxDBGridDateColumn1: TdxDBGridDateColumn;
dxDBGridColumn4: TdxDBGridColumn;
dxDBGridColumn5: TdxDBGridColumn;
t_op_file_data: TADOQuery;
dsrFuJian: TDataSource;
t_op_file_items_data1: TDataSource;
t_op_file_items_data: TADOQuery;
dxDBGrid1Column23: TdxDBGridColumn;
dxDBGrid1Column24: TdxDBGridColumn;
dxDBGrid1Column25: TdxDBGridColumn;
bsSkinButton29: TbsSkinButton;
bsSkinButton30: TbsSkinButton;
dxDBGrid1Column26: TdxDBGridColumn;
dxDBGrid1Column27: TdxDBGridColumn;
dxDBGrid1Column28: TdxDBGridColumn;
dxDBGrid1Column29: TdxDBGridColumn;
dxDBGrid1Column30: TdxDBGridColumn;
dxDBGrid1Column32: TdxDBGridColumn;
Label19: TLabel;
RxDBLookupCombo12: TRxDBLookupCombo;
Label16: TLabel;
RxDBLookupCombo49: TRxDBLookupCombo;
Label134: TLabel;
RxDBLookupCombo14: TRxDBLookupCombo;
RxDBLookupCombo6: TRxDBLookupCombo;
Label9: TLabel;
Label2: TLabel;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
bsSkinGroupBox1: TbsSkinGroupBox;
Label3: TLabel;
DBEdit5: TDBEdit;
Label4: TLabel;
DBEdit6: TDBEdit;
Label6: TLabel;
DBEdit7: TDBEdit;
Label7: TLabel;
DBEdit8: TDBEdit;
Label8: TLabel;
Label10: TLabel;
DBEdit11: TDBEdit;
Label11: TLabel;
Label12: TLabel;
DBEdit13: TDBEdit;
Label13: TLabel;
DBEdit14: TDBEdit;
Label14: TLabel;
DBEdit15: TDBEdit;
Label15: TLabel;
DBEdit16: TDBEdit;
Label20: TLabel;
DBEdit20: TDBEdit;
DBEdit21: TDBEdit;
Label21: TLabel;
Label22: TLabel;
DBEdit22: TDBEdit;
bsSkinGroupBox2: TbsSkinGroupBox;
Label23: TLabel;
DBEdit23: TDBEdit;
Label24: TLabel;
DBEdit24: TDBEdit;
Label25: TLabel;
DBEdit25: TDBEdit;
DBEdit26: TDBEdit;
Label26: TLabel;
Label27: TLabel;
DBEdit27: TDBEdit;
Label17: TLabel;
DBEdit17: TDBEdit;
Label18: TLabel;
Label28: TLabel;
Label29: TLabel;
DBEdit29: TDBEdit;
Label30: TLabel;
Label31: TLabel;
DBEdit31: TDBEdit;
bsSkinGroupBox3: TbsSkinGroupBox;
Label33: TLabel;
DBEdit33: TDBEdit;
bsSkinButton77: TbsSkinButton;
Label34: TLabel;
DBEdit34: TDBEdit;
bsSkinButton1: TbsSkinButton;
DBEdit35: TDBEdit;
Label35: TLabel;
bsSkinButton9: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinGroupBox6: TbsSkinGroupBox;
wwDBGrid1: TwwDBGrid;
bsSkinPanel9: TbsSkinPanel;
btnMarks: TbsSkinButton;
btnDesc: TbsSkinButton;
bsSkinTabSheet3: TbsSkinTabSheet;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
bsSkinPanel4: TbsSkinPanel;
bsSkinPanel6: TbsSkinPanel;
bsSkinButton17: TbsSkinButton;
bsSkinButton16: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
t_op_seae_dg_except1: TDataSource;
t_op_seae_dg_except: TADOQuery;
dxDBGrid2Column3: TdxDBGridColumn;
dxDBGrid2Column4: TdxDBGridColumn;
dxDBGrid2Column5: TdxDBGridColumn;
dxDBGrid2Column6: TdxDBGridColumn;
dxDBGrid2Column7: TdxDBGridColumn;
dxDBGrid2Column8: TdxDBGridColumn;
Label32: TLabel;
DBEdit32: TDBEdit;
wwDBComboBox1: TwwDBComboBox;
wwDBDateTimePicker2: TwwDBDateTimePicker;
Label39: TLabel;
Label41: TLabel;
Label42: TLabel;
DBMemo1: TDBMemo;
Label45: TLabel;
DBMemo2: TDBMemo;
IdMsg: TIdMessage;
SMTP1: TIdSMTP;
bsSkinDBCheckRadioBox23: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
wwDBComboBox2: TwwDBComboBox;
wwDBComboBox3: TwwDBComboBox;
wwDBComboBox4: TwwDBComboBox;
wwDBComboBox5: TwwDBComboBox;
dxDBGrid1Column33: TdxDBGridColumn;
bsSkinButton27: TbsSkinButton;
t_sys_dgemployee: TADOQuery;
t_sys_dgemployee1: TDataSource;
RxDBLookupCombo60: TRxDBLookupCombo;
Label1: TLabel;
DBEdit1: TDBEdit;
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
dxDBGrid1Column31: TdxDBGridColumn;
DBEdit10: TDBEdit;
Label46: TLabel;
dxDBGrid1Column34: TdxDBGridColumn;
bsSkinButton18: TbsSkinButton;
dxDBGrid1Column35: TdxDBGridColumn;
dxDBGrid1Column36: TdxDBGridColumn;
dxDBGrid1Column37: TdxDBGridColumn;
bsSkinGroupBox4: TbsSkinGroupBox;
DBMemo3: TDBMemo;
dxDBGrid1Column38: TdxDBGridColumn;
bsSkinPanel7: TbsSkinPanel;
bsSkinButton19: TbsSkinButton;
t_ch_project: TADOQuery;
t_ch_project1: TDataSource;
t_ch_project_fee1: TDataSource;
t_ch_project_fee: TADOQuery;
t_ch_fee: TADOQuery;
t_op_seae_fee: TADOQuery;
dxDBGrid1Column39: TdxDBGridColumn;
dxDBGrid1Column40: TdxDBGridColumn;
RxDBLookupCombo1: TRxDBLookupCombo;
DBEdit19: TDBEdit;
Label48: TLabel;
RxDBLookupCombo15: TRxDBLookupCombo;
Label50: TLabel;
dxDBGrid1Column41: TdxDBGridCheckColumn;
RxDBLookupCombo9: TRxDBLookupCombo;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Panel2Resize(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton38Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure bsSkinButton56Click(Sender: TObject);
procedure bsSkinButton57Click(Sender: TObject);
procedure bsSkinButton58Click(Sender: TObject);
procedure bsSkinButton59Click(Sender: TObject);
procedure bsSkinButton48Click(Sender: TObject);
procedure bsSkinButton18Click(Sender: TObject);
procedure bsSkinButton22Click(Sender: TObject);
procedure btnSealClick(Sender: TObject);
procedure wwDBComboBoxOPDropDown(Sender: TObject);
procedure N23Click(Sender: TObject);
procedure dxDBGrid4Click(Sender: TObject);
procedure t_op_file_items_dataAfterDelete(DataSet: TDataSet);
procedure t_op_file_items_dataAfterInsert(DataSet: TDataSet);
procedure t_op_file_items_dataAfterPost(DataSet: TDataSet);
procedure bsSkinButton66Click(Sender: TObject);
procedure bsSkinButton49Click(Sender: TObject);
procedure bsSkinButton50Click(Sender: TObject);
procedure bsSkinButton51Click(Sender: TObject);
procedure bsSkinButton27Click(Sender: TObject);
procedure dxDBGrid1CustomDraw(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 t_op_file_dataAfterPost(DataSet: TDataSet);
procedure bsSkinPageControl1Change(Sender: TObject);
procedure DBEdit1Change(Sender: TObject);
procedure N27Click(Sender: TObject);
procedure bsSkinButton29Click(Sender: TObject);
procedure bsSkinButton30Click(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure t_op_seae_dg_exceptBeforePost(DataSet: TDataSet);
procedure N1Click(Sender: TObject);
procedure bsSkinButton77Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure btnMarksClick(Sender: TObject);
procedure btnDescClick(Sender: TObject);
procedure dxDBGrid1Column31GetText(Sender: TObject;
ANode: TdxTreeListNode; var AText: String);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure bsSkinButton19Click(Sender: TObject);
procedure Edit3KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo1Enter(Sender: TObject);
procedure RxDBLookupCombo1Exit(Sender: TObject);
procedure RxDBLookupCombo9Enter(Sender: TObject);
procedure RxDBLookupCombo9Exit(Sender: TObject);
private
{ Private declarations }
AbortTransfer: Boolean;
TransferrignData: Boolean;
BytesToTransfer: LongWord;
STime: TDateTime;
procedure setconcolor; //<2F> <> <EFBFBD> ÿؼ<C3BF> <D8BC> <EFBFBD> <EFBFBD> <EFBFBD> ɫ
function istrueAFR(Dataset:TDataSet):Boolean;
procedure createAFR(bltype:string;filepath:string);
function getCtnAfr(code:string):string;
function getPkgAfr(code:string):string;
function formatAfrstr(str:string):string;
procedure PutToDebugLog(Operation, S1: String);
public
{ Public declarations }
naspath:widestring;
procedure UpdateCTN(BSNO:STRING);
procedure UpLoadPro(fname: string);
procedure UpLoadProFile(fname,RemotePathName,Users,pw,mblNo: string); //fname<6D> <65> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ·<EFBFBD> <C2B7> <EFBFBD> <EFBFBD> <EFBFBD> ļ<EFBFBD> <C4BC> <EFBFBD>
procedure DownLoadPro(fname: string);
procedure DownLoadProFils(RemotePathName,Users,pw,fname: string); //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ݿ<EFBFBD> <DDBF> ı <EFBFBD> <C4B1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
procedure SendMail(sendto,subjectstr:string;bodylist:TStringList);
function fee_get_client(str:string):string;
end;
var
frm_op_seae_dg: Tfrm_op_seae_dg;
AverageSpeed: Double = 0;
frm_op_seae_dg_create:boolean;
opsqlstr,opsumsqlstr:string;
implementation
uses u_main,u_data_share, my_sys_function, u_sys_progress,
u_op_seae;
{$R *.dfm}
procedure Tfrm_op_seae_dg.setconcolor;
begin
end;
procedure Tfrm_op_seae_dg.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_seae_dg.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_op_seae_dg.Hide;
frm_op_seae_dg.ManualFloat(frm_op_seae_dg.BoundsRect );
frm_main.freeTabs('frm_op_seae_dg');
frm_op_seae_dg_create:=false;
action:=cafree;
frm_op_seae_dg:=nil;
end;
procedure Tfrm_op_seae_dg.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.Width/14);
bsSkinButton7.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton14.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton38.Width:=i;
end;
procedure Tfrm_op_seae_dg.bsSkinButton7Click(Sender: TObject);
begin
table_Prior(t_op_seae);
end;
procedure Tfrm_op_seae_dg.bsSkinButton6Click(Sender: TObject);
begin
table_next(t_op_seae);
end;
procedure Tfrm_op_seae_dg.bsSkinButton2Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
table_post(t_op_seae);
aQuery:=CreateAdoQuery;
try
with aQuery do begin
close;sql.clear;
SQL.Text:='update t_op_seae set ΣƷ <CEA3> 걨Ա='''+t_op_seae.fieldbyname('<27> 걨Ա').asstring+''' where <20> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+'''';
ExecSQL;
end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfrm_op_seae_dg.bsSkinButton11Click(Sender: TObject);
var
answer:TModalResult;
begin
if bsSkinButton11.Caption='<27> ༭<EFBFBD> <EFBFBD> ' then
begin
Notebook1.PageIndex:=1;
bsSkinButton11.Caption:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> б <EFBFBD> ';
DBEdit3.OnChange(Sender);
end
else
begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
BEGIN
answer:=messagedlg( '<27> <> <EFBFBD> <EFBFBD> <EFBFBD> Ѿ<EFBFBD> <D1BE> ģ<DEB8> <C4A3> Ƿ棿',mtWarning,mbYesNoCancel,0);
if answer=mrYes then
begin
t_op_seae.post;
end;
if answer=mrNo then
begin
t_op_seae.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
END;
Notebook1.PageIndex:=0;
bsSkinButton11.Caption:='<27> ༭<EFBFBD> <EFBFBD> ';
end;
end;
procedure Tfrm_op_seae_dg.bsSkinButton4Click(Sender: TObject);
var
i,j:Integer;
strno:string;
aQuery:TADOQuery;
begin
j:=dxDBGrid1.SelectedCount;
strno:=' where 1=2 ';
for i:=0 to j-1 do
begin
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
strno:=strno+' or <20> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring+'''';
end;
if MessageDlg('ȷ<> <C8B7> Ҫɾ<D2AA> <C9BE> ѡ <EFBFBD> е <EFBFBD> '+inttostr(j)+'Ʊҵ<C6B1> <D2B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',mtWarning,[mbyes,mbno],0)=mryes then begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add(' delete from t_op_seae_dg_ctn '+strno);
ExecSQL;
Close;SQL.Clear;
SQL.Add(' delete from t_op_seae_dg_except '+strno);
ExecSQL;
Close;SQL.Clear;
SQL.Add(' delete from t_op_seae_dg '+strno);
ExecSQL;
end;
finally
FreeAndNil(aQuery);
end;
t_op_seae.Refresh;
end;
end;
procedure Tfrm_op_seae_dg.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_op_seae);
end;
procedure Tfrm_op_seae_dg.bsSkinButton38Click(Sender: TObject);
var
book1:Tbookmark;
begin
book1:=t_op_seae.GetBookmark;
t_op_seae.Refresh;
t_op_seae.GotoBookmark(book1);
end;
procedure Tfrm_op_seae_dg.FormShow(Sender: TObject);
begin
Notebook1.PageIndex:=0;
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ⱥ<C8BA> <F2A1A3A1> <EFBFBD> ';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=28;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
//ί<> б <EFBFBD> <D0B1> Ŵ<EFBFBD> <C5B4> <EFBFBD>
naspath:=get_parameters_value(175,'\\223.223.95.160\data');
t_op_seae.Close;
t_op_seae.SQL.clear;
t_op_seae.SQL.Add('select top 100 * from t_op_seae_dg where '
+'(<28> 걨Ա='+''''+employee+''''+') order by ¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> desc ');
t_op_seae.open;
opsqlstr:=t_op_seae.sql.Text;
t_op_ctn.Open;
t_op_file_data.Open;
t_sys_dgemployee.Open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
loadreggrid(dxdbgrid1,false,caption);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_op_seae_dg_create:=true;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
procedure Tfrm_op_seae_dg.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_seae_dg.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_seae_dg.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,212);
end;
procedure Tfrm_op_seae_dg.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_op_seae_dg.bsSkinButton8Click(Sender: TObject);
VAR
str:widestring;
ini:TIniFile;
s1,s2:string;
begin
str:='where 1=1 AND '+open_data('0001','¼<> <C2BC> <EFBFBD> <EFBFBD> ','no','no','no','no');
if Edit3.text<>''then
str:=str+' and <20> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> like '+''''+'%'+Edit3.text+'%'+'''';
if wwDBDateTimePicker9.text<>''then
str:=str+' and ¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> >='+''''+wwDBDateTimePicker9.text+'''';
if wwDBDateTimePicker12.text<>''then
str:=str+' and ¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <='+''''+wwDBDateTimePicker12.text+'''';
if wwDBDateTimePicker11.text<>''then
str:=str+' and <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> >='+''''+wwDBDateTimePicker11.text+'''';
if wwDBDateTimePicker13.text<>''then
str:=str+' and <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <='+''''+wwDBDateTimePicker13.text+'''';
if wwDBComboBoxOP.text<>''then
str:=str+' and ¼<> <C2BC> <EFBFBD> <EFBFBD> ='+''''+wwDBComboBoxOP.text+'''';
str:=query_tiaojian(1,str,'<27> <> <EFBFBD> <EFBFBD> ','ģ<> <C4A3> ',wwDBLookupCombo26.text);
str:=query_tiaojian(1,str,'<27> <> <EFBFBD> <EFBFBD> ','ģ<> <C4A3> ',Edit8.text);
t_op_seae.close;
t_op_seae.sql.clear;
t_op_seae.sql.add('select * from t_op_seae_dg '+str+' order by ¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> desc');
t_op_seae.open;
//if opsqlstr<>t_op_seae.sql.Text then
opsqlstr:=t_op_seae.sql.Text;
ini:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
s1:=Ini.ReadString('EDI_DATA','t_op_seae','');
if opsqlstr<>s1 then
begin
Ini.WriteString('EDI_DATA','t_op_seae',t_op_seae.SQL.CommaText);
opsqlstr:=s1;
end;
Ini.Free;
end;
procedure Tfrm_op_seae_dg.bsSkinButton12Click(Sender: TObject);
begin
Edit3.text:='';
Edit8.text:='';
Edit2.text:='';
wwDBDateTimePicker9.text:='';
wwDBDateTimePicker12.text:='';
wwDBDateTimePicker11.text:='';
wwDBDateTimePicker13.text:='';
wwDBLookupCombo26.Clear;
end;
procedure Tfrm_op_seae_dg.bsSkinButton14Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton14.ClientToScreen(Point(0,bsSkinButton14.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_seae_dg.bsSkinButton56Click(Sender: TObject);
begin
t_op_ctn.insert;
end;
procedure Tfrm_op_seae_dg.bsSkinButton57Click(Sender: TObject);
begin
table_post(t_op_ctn);
end;
procedure Tfrm_op_seae_dg.bsSkinButton58Click(Sender: TObject);
begin
table_delete(t_op_ctn);
end;
procedure Tfrm_op_seae_dg.bsSkinButton59Click(Sender: TObject);
begin
table_cancel(t_op_ctn);
end;
procedure Tfrm_op_seae_dg.bsSkinButton48Click(Sender: TObject);
var
FileStream:TFileStream;
fsize:double;
begin
{
if t_op_file.RecordCount <=0 then
begin
ShowMessage('<27> <> <EFBFBD> <EFBFBD> <<3C> <> ȡ<EFBFBD> <C8A1> <EFBFBD> <EFBFBD> ><3E> <> ť');
Exit;
end;
}
if t_op_file_data.RecordCount<=0 then
begin
t_op_file_data.Append;
t_op_file_data.FieldByName('<27> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:='<27> 걨<EFBFBD> <EAB1A8> Ϣ';
t_op_file_data.FieldByName('<27> <> ע').AsString:='<27> <> ';
t_op_file_data.Post;
t_op_file_data.Append;
t_op_file_data.FieldByName('<27> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:='<27> <> <EFBFBD> <EFBFBD> ';
t_op_file_data.FieldByName('<27> <> ע').AsString:='<27> <> ';
t_op_file_data.Post;
t_op_file_data.First;
end;
with t_op_file_items_data do
begin
Close;SQL.Clear;
sql.Add('select * from t_op_file_items');
sql.Add('where PID=:PID and <20> <> <EFBFBD> <EFBFBD> =:<3A> <> <EFBFBD> <EFBFBD> ');
Parameters.ParamByName('PID').Value:=t_op_file_data.FieldByName('fid').AsInteger;
Parameters.ParamByName('<27> <> <EFBFBD> <EFBFBD> ').Value:=t_op_file_data.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
Open;
end;
//<2F> ϴ<EFBFBD> <CFB4> <EFBFBD> <EFBFBD> <EFBFBD>
if OpenDialog1.Execute then begin
if Length(Opendialog1.FileName)<=95 then
begin
FileStream:=TFileStream.Create(Opendialog1.FileName,fmopenRead); //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ļ<EFBFBD>
try
fsize:=FileStream.size;
finally
freeandnil(FileStream);
end;
if fsize>5000000 then begin
MessageDlg('<27> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> ܳ<EFBFBD> <DCB3> <EFBFBD> 5M<35> <4D> <EFBFBD> <EFBFBD> ',mtWarning,[mbyes],0);
end
else UpLoadProFile(Opendialog1.FileName,naspath,'user','user',frm_op_seae_dg.t_op_seae.fieldbyname('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString);
end
else
begin
MessageDlg('<27> ļ<EFBFBD> <C4BC> <EFBFBD> ̫<EFBFBD> <CCAB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ܳ<EFBFBD> <DCB3> <EFBFBD> 95<39> <35> <EFBFBD> ַ<EFBFBD> <D6B7> <EFBFBD> <EFBFBD> <EFBFBD> ',mtWarning,[mbyes],0);
exit ;
end;
end else exit ;
end;
{procedure Tfrm_op_seae_edi_data.bsSkinButton48Click(Sender: TObject);
var
FileStream:TFileStream;
fsize:double;
begin
if t_op_file_data.RecordCount<=0 then
begin
t_op_file_data.Append;
t_op_file_data.FieldByName('<27> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:='<27> յ<EFBFBD> ';
t_op_file_data.FieldByName('<27> <> ע').AsString:='<27> <> ';
t_op_file_data.Post;
t_op_file_data.Append;
t_op_file_data.FieldByName('<27> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ';
t_op_file_data.FieldByName('<27> <> ע').AsString:='<27> <> ';
t_op_file_data.Post;
t_op_file_data.First;
end;
with t_op_file_items_data do
begin
Close;SQL.Clear;
sql.Add('select * from t_op_file_items');
sql.Add('where PID=:PID and <20> <> <EFBFBD> <EFBFBD> =:<3A> <> <EFBFBD> <EFBFBD> ');
Parameters.ParamByName('PID').Value:=t_op_file_data.FieldByName('fid').AsInteger;
Parameters.ParamByName('<27> <> <EFBFBD> <EFBFBD> ').Value:=t_op_file_data.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
Open;
end;
//<2F> ϴ<EFBFBD> <CFB4> <EFBFBD> <EFBFBD> <EFBFBD>
if OpenDialog1.Execute then begin
if Length(Opendialog1.FileName)<=95 then
begin
FileStream:=TFileStream.Create(Opendialog1.FileName,fmopenRead); //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ļ<EFBFBD>
try
fsize:=FileStream.size;
finally
freeandnil(FileStream);
end;
if fsize>500000 then begin
MessageDlg('<27> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> ܳ<EFBFBD> <DCB3> <EFBFBD> 500K<30> <4B> <EFBFBD> <EFBFBD> ',mtWarning,[mbyes],0);
end
else UpLoadPro(Opendialog1.FileName);
end
else
begin
MessageDlg('<27> ļ<EFBFBD> <C4BC> <EFBFBD> ̫<EFBFBD> <CCAB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ܳ<EFBFBD> <DCB3> <EFBFBD> 95<39> <35> <EFBFBD> ַ<EFBFBD> <D6B7> <EFBFBD> <EFBFBD> <EFBFBD> ',mtWarning,[mbyes],0);
exit ;
end;
end else exit ;
end;
}
procedure Tfrm_op_seae_dg.createAFR(bltype:string;filepath:string);
begin
end;
function Tfrm_op_seae_dg.istrueAFR(Dataset: TDataSet): Boolean;
begin
end;
function Tfrm_op_seae_dg.getCtnAfr(code: string): string;
begin
end;
function Tfrm_op_seae_dg.getPkgAfr(code: string): string;
begin
end;
function Tfrm_op_seae_dg.formatAfrstr(str: string): string;
begin
Result:=Trim(str);
Result:=StringReplace(Result,'&','&',[rfReplaceAll]);
Result:=StringReplace(Result,'<','<',[rfReplaceAll]);
Result:=StringReplace(Result,'"','"',[rfReplaceAll]);
Result:=StringReplace(Result,'>','>',[rfReplaceAll]);
Result:=StringReplace(Result,'''',''',[rfReplaceAll]);
end;
procedure Tfrm_op_seae_dg.bsSkinButton18Click(Sender: TObject);
var
inifile1:Tinifile;
begin
if t_op_ctn.isempty then
exit;
if application.MessageBox('<27> <> ȷ<EFBFBD> <C8B7> Ҫɾ<D2AA> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ?','<27> <> <EFBFBD> <EFBFBD> :',MB_OKCANCEL)<>IDOK then
exit;
t_op_ctn.delete;
end;
procedure Tfrm_op_seae_dg.PutToDebugLog(Operation, S1: String);
begin
end;
procedure Tfrm_op_seae_dg.bsSkinButton22Click(Sender: TObject);
var
Pnt:Tpoint;
begin
if t_op_seae1.DataSet=nil then
exit;
if (t_op_seae1.DataSet.State=dsinsert)or(t_op_seae1.DataSet.State=dsedit) then
t_op_seae1.DataSet.post;
end;
procedure Tfrm_op_seae_dg.btnSealClick(Sender: TObject);
begin
frm_main.view_momo(t_op_ctn1,'<27> <> <EFBFBD> <EFBFBD> ');
end;
procedure Tfrm_op_seae_dg.wwDBComboBoxOPDropDown(Sender: TObject);
var AdoQuery1:TAdoQuery;
begin
wwDBComboBoxOP.items.clear;
AdoQuery1:=CreateAdoQuery;
with AdoQuery1 do
try
Close;sql.Clear;
SQL.Add('select * from t_sys_employee where ״̬=''<27> <> ְ''');
SQL.Add('Order by <20> <> <EFBFBD> <EFBFBD> ');
Open;first;
while not Eof do
begin
wwDBComboBoxOP.Items.Add(AdoQuery1.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').AsString);
Next;
end;
finally
Free;
end;
end;
procedure Tfrm_op_seae_dg.UpdateCTN(BSNO:STRING);
begin
end;
procedure Tfrm_op_seae_dg.N23Click(Sender: TObject);
var id:string;
begin
end;
procedure Tfrm_op_seae_dg.dxDBGrid4Click(Sender: TObject);
begin
with t_op_file_items_data do
begin
Close;SQL.Clear;
sql.Add('select * from t_op_file_items');
sql.Add('where PID=:PID and <20> <> <EFBFBD> <EFBFBD> =:<3A> <> <EFBFBD> <EFBFBD> ');
Parameters.ParamByName('PID').Value:=t_op_file_data.FieldByName('fid').AsInteger;
Parameters.ParamByName('<27> <> <EFBFBD> <EFBFBD> ').Value:=t_op_file_data.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
Open;
end;
end;
procedure Tfrm_op_seae_dg.t_op_file_items_dataAfterDelete(
DataSet: TDataSet);
begin
t_op_file_data.Edit;
t_op_file_data.FieldByName('<27> <> С ').AsInteger:=t_op_file_items_data.RecordCount;
t_op_file_data.Post;
end;
procedure Tfrm_op_seae_dg.t_op_file_items_dataAfterInsert(
DataSet: TDataSet);
begin
t_op_file_items_data.FieldByName('PID').AsInteger:=t_op_file_data.FieldByName('fID').AsInteger;
t_op_file_items_data.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=t_op_file_data.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
end;
procedure Tfrm_op_seae_dg.t_op_file_items_dataAfterPost(
DataSet: TDataSet);
begin
t_op_file_data.Edit;
t_op_file_data.FieldByName('<27> <> С ').AsInteger:=t_op_file_items_data.RecordCount;
t_op_file_data.Post;
end;
procedure Tfrm_op_seae_dg.bsSkinButton66Click(Sender: TObject);
begin
if t_op_file_data.RecordCount<=0 then
begin
t_op_file_data.Append;
t_op_file_data.FieldByName('<27> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:='<27> 걨<EFBFBD> <EAB1A8> Ϣ';
t_op_file_data.FieldByName('<27> <> ע').AsString:='<27> <> ';
t_op_file_data.Post;
t_op_file_data.Append;
t_op_file_data.FieldByName('<27> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:='<27> <> <EFBFBD> <EFBFBD> ';
t_op_file_data.FieldByName('<27> <> ע').AsString:='<27> <> ';
t_op_file_data.Post;
{
t_op_file_data.Append;
t_op_file_data.FieldByName('<27> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ';
t_op_file_data.FieldByName('<27> <> ע').AsString:='<27> <> ';
t_op_file_data.Post;
}
t_op_file_data.First;
end;
end;
procedure Tfrm_op_seae_dg.bsSkinButton49Click(Sender: TObject);
begin
if t_op_file_data.IsEmpty then exit;
//<2F> <> <EFBFBD> ظ<EFBFBD> <D8B8> <EFBFBD>
if t_op_file_items_data.fieldbyname('<27> ļ<EFBFBD> <C4BC> 洢').AsBoolean then
begin
DownLoadProFils(naspath,'user','user',t_op_file_items_data.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring);
end
else
begin
if SaveDialog1.Execute then
begin
DownLoadPro(Savedialog1.FileName+t_op_file_items_data.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring);
end
else exit ;
end;
{
if t_op_file_data.IsEmpty then exit;
//<2F> <> <EFBFBD> ظ<EFBFBD> <D8B8> <EFBFBD>
if SaveDialog1.Execute then begin
DownLoadPro(Savedialog1.FileName+t_op_file_data.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring);
end else exit ;
}
end;
procedure Tfrm_op_seae_dg.bsSkinButton50Click(Sender: TObject);
var
arr: array[0..MAX_PATH] of Char;
num: DWORD;
tmpfile:string ;
begin
if t_op_file_data.IsEmpty then exit;
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ļ<EFBFBD>
try
GetTempPath(MAX_PATH, arr);
tmpfile:=arr+t_op_file_items_data.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring ;
DownLoadPro(tmpfile) ;
ShellExecute(Handle, nil, pchar(tmpfile), nil, nil, SW_NORMAL);
except
showmessage('<27> <> <EFBFBD> ܴ<EFBFBD> <DCB4> <EFBFBD> <EFBFBD> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 飡');
end ;
end;
procedure Tfrm_op_seae_dg.bsSkinButton51Click(Sender: TObject);
begin
if t_op_file_data.IsEmpty then exit;
//ɾ<> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
if application.MessageBox('<27> <> ȷ<EFBFBD> <C8B7> Ҫɾ<D2AA> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ?','<27> <> <EFBFBD> <EFBFBD> :',MB_OKCANCEL)=IDOK then
t_op_file_items_data.delete ;
end;
procedure Tfrm_op_seae_dg.DownLoadPro(fname: string);
const
MaxBufSize=$F000;
var
myfilename:string;//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ļ<EFBFBD> <C4BC> <EFBFBD> ·<EFBFBD> <C2B7> <EFBFBD> <EFBFBD> <EFBFBD> ļ<EFBFBD> <C4BC> <EFBFBD>
myfileStream,exeBlobStream:TStream;
Count,BufSize,N: Integer;
Buffer:PChar;
begin
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ļ<EFBFBD>
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ⱥ<C8BA> <F2A1A3A1> <EFBFBD> ';
frm_sys_progress.Show;
frm_sys_progress.Update;
myfilename:=FName ;
with t_op_file_items_data do
begin
myfilename:=myfilename ; //+fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring ;
myfileStream :=TFileStream.Create(myfilename,fmCreate);//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ļ<EFBFBD>
try //SaveToStream(Stream);
ExeBlobStream:=CreateBlobStream(FieldByName('<27> <> <EFBFBD> <EFBFBD> '),bmRead); //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ݿ<EFBFBD> <DDBF> <EFBFBD> ȡ<EFBFBD> ü<EFBFBD> ¼
Count:=0;
try
if Count=0 then
begin
ExeBlobStream.Position:=0;
Count:=ExeBlobStream.Size;//showmessage(inttostr(count));
end;
if Count>MaxBufSize then BufSize:=MaxBufSize else BufSize:=Count;
GetMem(Buffer,BufSize);
frm_sys_progress.bsSkinGauge1.MaxValue:=(Count div BufSize)+2;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
try
while Count<>0 do
begin
if Count>BufSize then N:=BufSize else N:=Count;
ExeBlobStream.ReadBuffer(Buffer^,N);//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ݿ<EFBFBD> <DDBF> <EFBFBD> <EFBFBD> <EFBFBD> ȡ<EFBFBD> <C8A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
MyFileStream.WriteBuffer(Buffer^,N);//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> д<EFBFBD> <D0B4> <EFBFBD> ļ<EFBFBD>
Dec(Count,N);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
end;
finally
FreeMem(Buffer,BufSize);
end;
finally
ExeBlobStream.Free;
end;
finally
myfileStream.Free;
// frm_sys_progress.close;
//frm_sys_progress:=nil;
//frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
end;
end;
procedure Tfrm_op_seae_dg.DownLoadProFils(RemotePathName,Users,pw,fname: string);
var path,newpath,Filters:string;
NetSource :TNetResource;
begin
with NetSource do
begin
dwType := RESOURCETYPE_ANY;
lpLocalName :=''; // <20> <> Զ<EFBFBD> <D4B6> <EFBFBD> <EFBFBD> Դӳ<D4B4> 䵽<EFBFBD> <E4B5BD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
lpRemoteName:=pChar(RemotePathName); // Զ<> <D4B6> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Դ
lpProvider :='';
end;
WnetAddConnection2(NetSource, pChar(Users),pChar(pw),CONNECT_UPDATE_PROFILE);
with SaveDialog1 do
begin
FileName:=ExtractFileName(fname);
Filters:=ExtractFileExt(fname);
Filter:='*'+ExtractFileExt(fname);
if Execute then
begin
path:=fname;
newpath:=SaveDialog1.FileName+Filters;
if CopyFile(pChar(path),pChar(newpath),false) then
//showmessage('<27> <> <EFBFBD> سɹ<D8B3> ')
else showmessage('<27> <> <EFBFBD> <EFBFBD> ʧ<EFBFBD> <CAA7> ');
end;
end;
try
finally
WNetCancelConnection2(pChar(RemotePathName),CONNECT_UPDATE_PROFILE,True);
end;
end;
procedure Tfrm_op_seae_dg.UpLoadProFile(fname,RemotePathName,Users,pw,mblNo: string);
var path,newpath:string;
NetSource :TNetResource;
filename,fileExt,filePath:string;
begin
//<2F> ϴ<EFBFBD> <CFB4> ļ<EFBFBD>
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ⱥ<C8BA> <F2A1A3A1> <EFBFBD> ';
frm_sys_progress.Show;
frm_sys_progress.Update;
filename:=ExtractFileName(fname) ;
fileExt:=ExtractFileExt(filename) ;
with NetSource do
begin
dwType := RESOURCETYPE_ANY;
lpLocalName :=''; // <20> <> Զ<EFBFBD> <D4B6> <EFBFBD> <EFBFBD> Դӳ<D4B4> 䵽<EFBFBD> <E4B5BD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
lpRemoteName:=pChar(RemotePathName); // Զ<> <D4B6> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Դ
lpProvider :='';
end;
WnetAddConnection2(NetSource, pChar(Users),pChar(pw),CONNECT_UPDATE_PROFILE);
filePath:=FormatDateTime('YYYYMM',DatabaseDateTime);
if not DirectoryExists(RemotePathName+'\'+filePath) then
MkDir(RemotePathName+'\'+filePath);
if not DirectoryExists(RemotePathName+'\'+filePath+'\'+mblNo) then
MkDir(RemotePathName+'\'+filePath+'\'+mblNo);
newpath:=RemotePathName+'\'+filePath+'\'+mblNo+'\'+filename;
if CopyFile(pChar(fname),pChar(newpath),false) then
// showmessage('<27> <> <EFBFBD> ݳɹ<DDB3> ')
else showmessage('<27> <> <EFBFBD> <EFBFBD> ʧ<EFBFBD> <CAA7> ');
{
if not DirectoryExists(RemotePathName+'\'+mblNo) then
MkDir(RemotePathName+'\'+mblNo);
newpath:=RemotePathName+'\'+mblNo+'\'+filename;
if CopyFile(pChar(fname),pChar(newpath),false) then
// showmessage('<27> <> <EFBFBD> ݳɹ<DDB3> ')
else showmessage('<27> <> <EFBFBD> <EFBFBD> ʧ<EFBFBD> <CAA7> ');
}
try
finally
WNetCancelConnection2(pChar(RemotePathName),CONNECT_UPDATE_PROFILE,True);
end;
with t_op_file_items_data do
begin
Open;
append;
try
FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=newpath;
FieldByName('<27> ϴ<EFBFBD> <CFB4> <EFBFBD> <EFBFBD> <EFBFBD> ').AsDateTime:=now();
FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').Asstring:=employee;
FieldByName('<27> <> <EFBFBD> <EFBFBD> ').Asstring:=fileExt;
FieldByName('<27> ļ<EFBFBD> <C4BC> 洢').AsBoolean:=true;
Post;
Application.MessageBox('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ϴ<EFBFBD> <CFB4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ɹ<EFBFBD> !','<27> <> ʾ ',MB_OK+MB_IconInformation);
finally
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
end;
end;
procedure Tfrm_op_seae_dg.UpLoadPro(fname: string);
const
BufSize=$F000;
var
Counter, N: Integer;
Buffer: PAnsiChar;
FieldStrm: TStream;
ExeFileStream:TFileStream;
//ExeFileStream:TMemoryStream;
size_tmp: Double;
filename,fileExt:string ;
begin
//<2F> ϴ<EFBFBD> <CFB4> ļ<EFBFBD>
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ⱥ<C8BA> <F2A1A3A1> <EFBFBD> ';
frm_sys_progress.Show;
frm_sys_progress.Update;
filename:=ExtractFileName(fname) ;
fileExt:=ExtractFileExt(filename) ;
ExeFileStream:=TFileStream.Create(fname,fmopenRead); //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ļ<EFBFBD>
// ExeFileStream:=TCompressionStream.Create(clMax,TStream(ExeFileStream));
with t_op_file_items_data do
begin
Open;
append;
try
FieldStrm := CreateBlobStream(FieldByName('<27> <> <EFBFBD> <EFBFBD> '),bmWrite);
GetMem(Buffer,BufSize);
try
Counter := ExeFileStream.Size;
size_tmp :=ExeFileStream.Size;
frm_sys_progress.bsSkinGauge1.MaxValue:=(Counter div BufSize)+2;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
while Counter<>0 do
begin
if Counter>BufSize then N :=BufSize else N:=Counter;
ExeFileStream.ReadBuffer(Buffer^,N);
FieldStrm.WriteBuffer(Buffer^, N);
Dec(Counter, N);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
// Application.ProcessMessages;
end;
finally
FreeMem(Buffer,BufSize);
FieldStrm.Free;
end;
FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString:=filename;
FieldByName('<27> <> С ').AsFloat:=size_tmp;
FieldByName('<27> ϴ<EFBFBD> <CFB4> <EFBFBD> <EFBFBD> <EFBFBD> ').AsDateTime:=now();
FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').Asstring:=employee;
FieldByName('<27> <> <EFBFBD> <EFBFBD> ').Asstring:=fileExt;
Post;
Application.MessageBox('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ϴ<EFBFBD> <CFB4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ɹ<EFBFBD> !','<27> <> ʾ ',MB_OK+MB_IconInformation);
finally
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.close;
frm_sys_progress:=nil;
ExeFileStream.Free;
end;
end;
end;
procedure Tfrm_op_seae_dg.bsSkinButton27Click(Sender: TObject);
begin
if not assigned(frm_op_seae) then
frm_op_seae:=tfrm_op_seae.Create (self);
frm_op_seae.ManualDock(frm_main.SearchTabs('frm_op_seae',frm_op_seae.caption,'101'),nil,alClient);
frm_op_seae.show;
frm_op_seae.Edit2.Text:=t_op_seae.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString;
frm_op_seae.bsSkinButton44.OnClick(Sender);
end;
procedure Tfrm_op_seae_dg.dxDBGrid1CustomDraw(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
if uppercase(ANode.Strings[dxDBGrid1Column23.Index])='TRUE' then begin
AColor:=clSkyBlue;
exit;
end;
end;
procedure Tfrm_op_seae_dg.t_op_file_dataAfterPost(DataSet: TDataSet);
var aAdoQuery:TAdoQuery;
begin
//
if t_op_seae.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString<>'' then
begin
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select sum(<28> <> С ) sums from t_op_file_data where <20> <> <EFBFBD> <EFBFBD> =:<3A> <> <EFBFBD> <EFBFBD> and <20> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> <EFBFBD> =''<27> 걨<EFBFBD> <EAB1A8> Ϣ''');
Parameters.ParamByName('<27> <> <EFBFBD> <EFBFBD> ').Value:=t_op_seae.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
Open;
if FieldByName('sums').AsInteger>=2 then
begin
t_op_seae.Edit;
t_op_seae.FieldByName('<27> ϴ<EFBFBD> <CFB4> ļ<EFBFBD> ').AsBoolean:=True;
t_op_seae.Post;
end;
finally
Free;
end;
end;
end;
procedure Tfrm_op_seae_dg.bsSkinPageControl1Change(Sender: TObject);
begin
if frm_op_seae_dg_create=false then
exit;
if bsSkinPageControl1.ActivePage=bsSkinTabSheet2 then
begin
t_op_file_data.Close;
t_op_file_data.Parameters.ParamByName('<27> <> <EFBFBD> <EFBFBD> ').Value:=t_op_seae.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').asstring;
if not t_op_file_data.Active then
t_op_file_data.open;
end
else
begin
if t_op_file_data.State in [dsedit,dsinsert] then t_op_file_data.Post;
t_op_file_data.close;
end;
if bsSkinPageControl1.ActivePage=bsSkinTabSheet3 then
begin
t_op_seae_dg_except.Close;
t_op_seae_dg_except.Parameters.ParamByName('<27> <> <EFBFBD> <EFBFBD> ').Value:=t_op_seae.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').asstring;
if not t_op_seae_dg_except.Active then
t_op_seae_dg_except.open;
end
else
begin
if t_op_seae_dg_except.State in [dsedit,dsinsert] then t_op_seae_dg_except.Post;
t_op_seae_dg_except.close;
end;
end;
procedure Tfrm_op_seae_dg.DBEdit1Change(Sender: TObject);
begin
t_op_file_items_data.Close;
end;
procedure Tfrm_op_seae_dg.N27Click(Sender: TObject);
var
i:integer;
str:widestring;
aAdoQuery:TAdoQuery;
aDataSource:TDataSource;
begin
if t_op_seae.IsEmpty then
exit;
if dxDBGrid1.SelectedCount>0 then
begin
for i:=0 to dxDBGrid1.SelectedCount-1 do begin
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
if i=0 then
str:='('+''''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring+''''
else
str:=str+','+''''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring+'''';
t_op_seae.Edit;
t_op_seae.FieldByName('EDI״̬').AsString:='<27> ѷ<EFBFBD> <D1B7> <EFBFBD> ';
t_op_seae.Post;
end;
end else begin
str:='('+''''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring+'''';
end;
str:=str+')';
aDataSource:=TDataSource.Create(nil);
aAdoQuery:=CreateAdoQuery;
aDataSource.DataSet:=aAdoQuery;
with aAdoQuery do
try
close;
sql.clear;
sql.add('select t_op_ctn_edi.*,t_op_seae_edi.* from t_op_ctn_edi left Join t_op_seae_edi on t_op_ctn_edi.<2E> <> <EFBFBD> <EFBFBD> =t_op_seae_edi.<2E> <> <EFBFBD> <EFBFBD> '
+' where t_op_ctn_edi.<2E> <> <EFBFBD> <EFBFBD> in '+str
+' order by t_op_ctn_edi.<2E> <> <EFBFBD> <EFBFBD> ');
open;
sys_print('<27> <> <EFBFBD> ۲յ<DBB2> ',2,aDataSource,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
finally
aDataSource.Free;
Free;
end;
end;
procedure Tfrm_op_seae_dg.bsSkinButton29Click(Sender: TObject);
begin
t_op_seae.close;
t_op_seae.sql.clear;
t_op_seae.sql.add(opsqlstr);
t_op_seae.Open;
{t_op_seae_sum.close;
t_op_seae_sum.sql.clear;
t_op_seae_sum.sql.add(opsumsqlstr);
t_op_seae_sum.Open;}
end;
procedure Tfrm_op_seae_dg.bsSkinButton30Click(Sender: TObject);
begin
if t_op_seae1.DataSet=nil then
exit;
if (t_op_seae1.DataSet.State=dsinsert)or(t_op_seae1.DataSet.State=dsedit) then
t_op_seae1.DataSet.post;
sys_print('<27> յ<EFBFBD> <D5B5> 걨',2,t_op_seae1,t_op_ctn1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_dg.bsSkinButton13Click(Sender: TObject);
begin
t_op_seae_dg_except.Insert;
end;
procedure Tfrm_op_seae_dg.bsSkinButton17Click(Sender: TObject);
begin
table_cancel(t_op_seae_dg_except);
end;
procedure Tfrm_op_seae_dg.bsSkinButton15Click(Sender: TObject);
begin
table_post(t_op_seae_dg_except);
end;
procedure Tfrm_op_seae_dg.bsSkinButton16Click(Sender: TObject);
begin
if not if_open('518') then begin
ShowMessage('û<> <C3BB> ɾ<EFBFBD> <C9BE> <EFBFBD> <EFBFBD> Ȩ<EFBFBD> ޣ<EFBFBD> ');
Exit;
end;
table_delete(t_op_seae_dg_except);
end;
procedure Tfrm_op_seae_dg.t_op_seae_dg_exceptBeforePost(DataSet: TDataSet);
begin
t_op_seae_dg_except['<27> <EFBFBD> <DEB8> <EFBFBD> ']:=employee;
t_op_seae_dg_except['<27> <EFBFBD> ʱ<EFBFBD> <CAB1> ']:=Now;
end;
procedure Tfrm_op_seae_dg.N1Click(Sender: TObject);
var
Ext,tmpstr,strtmpmblno,strunno,ispx:String;
ExcelTemplet:Variant;
TempstrList:Tstringlist;
i,excelline,ctnnum:Integer;
aQuery,aQuery2:TADOQuery;
FileStream:TFileStream;
fsize:double;
begin
OpenDialog1.FileName:='';
if t_op_file_data.RecordCount<=0 then
begin
t_op_file_data.Append;
t_op_file_data.FieldByName('<27> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:='<27> 걨<EFBFBD> <EAB1A8> Ϣ';
t_op_file_data.FieldByName('<27> <> ע').AsString:='<27> <> ';
t_op_file_data.Post;
t_op_file_data.Append;
t_op_file_data.FieldByName('<27> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:='<27> <> <EFBFBD> <EFBFBD> ';
t_op_file_data.FieldByName('<27> <> ע').AsString:='<27> <> ';
t_op_file_data.Post;
t_op_file_data.First;
end;
with t_op_file_items_data do
begin
Close;SQL.Clear;
sql.Add('select * from t_op_file_items');
sql.Add('where PID=:PID and <20> <> <EFBFBD> <EFBFBD> =:<3A> <> <EFBFBD> <EFBFBD> ');
Parameters.ParamByName('PID').Value:=t_op_file_data.FieldByName('fid').AsInteger;
Parameters.ParamByName('<27> <> <EFBFBD> <EFBFBD> ').Value:=t_op_file_data.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString;
Open;
end;
//<2F> ϴ<EFBFBD> <CFB4> <EFBFBD> <EFBFBD> <EFBFBD>
if OpenDialog1.Execute then begin
if Length(Opendialog1.FileName)<=95 then
begin
FileStream:=TFileStream.Create(Opendialog1.FileName,fmopenRead); //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ļ<EFBFBD>
try
fsize:=FileStream.size;
finally
freeandnil(FileStream);
end;
if fsize>5000000 then begin
MessageDlg('<27> ļ<EFBFBD> <C4BC> <EFBFBD> <EFBFBD> ܳ<EFBFBD> <DCB3> <EFBFBD> 5M<35> <4D> <EFBFBD> <EFBFBD> ',mtWarning,[mbyes],0);
end
else UpLoadProFile(Opendialog1.FileName,naspath,'user','user',frm_op_seae_dg.t_op_seae.fieldbyname('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString);
end
else
begin
MessageDlg('<27> ļ<EFBFBD> <C4BC> <EFBFBD> ̫<EFBFBD> <CCAB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ܳ<EFBFBD> <DCB3> <EFBFBD> 95<39> <35> <EFBFBD> ַ<EFBFBD> <D6B7> <EFBFBD> <EFBFBD> <EFBFBD> ',mtWarning,[mbyes],0);
exit ;
end;
strtmpmblno:='';
Ext:=lowercase(ExtractFileExt(OpenDialog1.FileName));
if (Ext='.xlsx') or (Ext='.xls') then begin
ExcelTemplet:= CreateOleObject('Excel.Application');
TempstrList:=Tstringlist.Create;
aQuery:=createAdoQuery;
aQuery2:=createAdoQuery;
try
ExcelTemplet.Workbooks.Open(OpenDialog1.FileName);
for excelline:=2 to 100 do begin
tmpstr:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,1].Value);
if tmpstr<>'' then begin
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.Text:='select * from t_op_seae_dg where <20> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ='''+tmpstr+'''';
aQuery.Open;
aQuery2.Close;
aQuery2.SQL.Clear;
aQuery2.SQL.Text:='select * from t_op_seae where <20> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ='''+tmpstr+'''';
aQuery2.Open;
if not aQuery.IsEmpty then begin
aQuery.Edit;
ispx:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,2].Value);
if aQuery2.FieldByName('<27> Ƿ<EFBFBD> <C7B7> <EFBFBD> װ').AsBoolean then begin
if ((ispx='<27> <> ') or (ispx='')) then
ShowMessage('<27> Ƿ<EFBFBD> <C7B7> <EFBFBD> װ<EFBFBD> <D7B0> ԭҵ<D4AD> <D2B5> <EFBFBD> <EFBFBD> һ <EFBFBD> £<EFBFBD> ');
end else begin
if (ispx='<27> <> ') then
ShowMessage('<27> Ƿ<EFBFBD> <C7B7> <EFBFBD> װ<EFBFBD> <D7B0> ԭҵ<D4AD> <D2B5> <EFBFBD> <EFBFBD> һ <EFBFBD> £<EFBFBD> ');
end;
aQuery['<27> Ƿ<EFBFBD> ƴ<EFBFBD> <C6B4> ']:=ispx;
aQuery['<27> <> վ']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,3].Value);
aQuery['<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ҵ']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,4].Value);
strunno:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,5].Value);
if (strunno<>aQuery2.FieldByName('Σ<> <CEA3> Ʒ <EFBFBD> <C6B7> <EFBFBD> <EFBFBD> ').AsString) then begin
ShowMessage('UNNO<4E> <4F> ԭҵ<D4AD> <D2B5> <EFBFBD> <EFBFBD> һ <EFBFBD> £<EFBFBD> ');
end;
aQuery['UNNO']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,5].Value);
aQuery['<27> <> <EFBFBD> <EFBFBD> Ʒ <EFBFBD> <C6B7> ']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,6].Value);
strunno:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,7].Value);
if (strunno<>aQuery2.FieldByName('Σ<> <CEA3> Ʒ <EFBFBD> <C6B7> <EFBFBD> <EFBFBD> ').AsString) then begin
ShowMessage('Σ<> <CEA3> Ʒ <EFBFBD> <C6B7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ԭҵ<D4AD> <D2B5> <EFBFBD> <EFBFBD> һ <EFBFBD> £<EFBFBD> ');
end;
aQuery['Σ<> <CEA3> Ʒ <EFBFBD> <C6B7> <EFBFBD> <EFBFBD> ']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,7].Value);
aQuery['<27> <> װ<EFBFBD> <D7B0> ']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,8].Value);
// aQuery['<27> Ƿ<EFBFBD> ƴ<EFBFBD> <C6B4> ']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,9].Value);
aQuery['Ŀ<> ĸ<EFBFBD> Ӣ<EFBFBD> <D3A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,10].Value);
aQuery['<27> <> <EFBFBD> <EFBFBD> ʱ<EFBFBD> <CAB1> ']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,11].Value);
// aQuery['<27> Ƿ<EFBFBD> ƴ<EFBFBD> <C6B4> ']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,12].Value);
// aQuery['<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,13].Value);
aQuery['<27> <> <EFBFBD> <EFBFBD> ']:=StrToIntDef(VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,14].Value),0);
aQuery['<27> <> <EFBFBD> <EFBFBD> ']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,15].Value);
aQuery['<27> <> Σ1']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,16].Value);
aQuery['<27> <> Σ2']:=VartoStr(ExcelTemplet.WorkSheets[1].Cells[excelline,17].Value);
aQuery2.Close;
aQuery2.SQL.Clear;
aQuery2.SQL.Text:='Select * from t_code_stowgoods where UNNO='''+aQuery.fieldbyname('UNNO').AsString+''' and Σ<> <CEA3> Ʒ <EFBFBD> <C6B7> <EFBFBD> <EFBFBD> ='''+aQuery.fieldbyname('Σ<> <CEA3> Ʒ <EFBFBD> <C6B7> <EFBFBD> <EFBFBD> ').AsString+''' and <20> <> <EFBFBD> <EFBFBD> ='''+aQuery.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').AsString+'''';
aQuery2.Open;
if not aQuery2.IsEmpty then
aQuery['<27> <> <EFBFBD> <EFBFBD> ֱװ<D6B1> <D7B0> <EFBFBD> <EFBFBD> ']:=True;
aQuery.Post;
end else begin
strtmpmblno:=strtmpmblno+','+tmpstr;
end;
end;
end;
for excelline:=2 to 30 do begin
tmpstr:=VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,1].Value);
if tmpstr<>'' then begin
aQuery.Close;
aQuery.SQL.Clear;
aQuery.SQL.Text:='select * from t_op_seae_dg where <20> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ='''+tmpstr+'''';
aQuery.Open;
if not aQuery.IsEmpty then begin
aQuery2.Close;
aQuery2.SQL.Clear;
aQuery2.SQL.Text:='select * from t_op_seae_dg_ctn where <20> <> <EFBFBD> <EFBFBD> ='''+VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,2].Value)+''' and <20> <> <EFBFBD> <EFBFBD> ='''+aQuery.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring+'''';
aQuery2.Open;
if aQuery2.IsEmpty then begin
aQuery2.Insert;
aQuery2['<27> <> <EFBFBD> <EFBFBD> ']:=aQuery['<27> <> <EFBFBD> <EFBFBD> '];
aQuery2['<27> <> <EFBFBD> <EFBFBD> ']:=VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,2].Value);
aQuery2['<27> <> ë<EFBFBD> <C3AB> ']:=StrToFloatDef(VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,7].Value),0);
aQuery2['<27> ܾ<EFBFBD> <DCBE> <EFBFBD> ']:=StrToFloatDef(VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,8].Value),0);
aQuery2.Post;
end else begin
aQuery2.Edit;
aQuery2['<27> <> <EFBFBD> <EFBFBD> ']:=VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,2].Value);
aQuery2['<27> <> ë<EFBFBD> <C3AB> ']:=StrToFloatDef(VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,7].Value),0);
aQuery2['<27> ܾ<EFBFBD> <DCBE> <EFBFBD> ']:=StrToFloatDef(VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,8].Value),0);
aQuery2.Post;
end;
aQuery2.Close;
aQuery2.SQL.Clear;
aQuery2.SQL.Text:='select sum(<28> <> ë<EFBFBD> <C3AB> ) <20> <> ë<EFBFBD> <C3AB> ,sum(<28> ܾ<EFBFBD> <DCBE> <EFBFBD> ) <20> ܾ<EFBFBD> <DCBE> <EFBFBD> from t_op_seae_dg_ctn where <20> <> <EFBFBD> <EFBFBD> ='''+aQuery.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring+'''';
aQuery2.Open;
aQuery.Edit;
aQuery['<27> <> ë<EFBFBD> <C3AB> ']:=aQuery2['<27> <> ë<EFBFBD> <C3AB> '];
aQuery['<27> ܾ<EFBFBD> <DCBE> <EFBFBD> ']:=aQuery2['<27> ܾ<EFBFBD> <DCBE> <EFBFBD> '];
aQuery['Σ<> <CEA3> Ʒ <EFBFBD> <C6B7> ʶ']:=VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,3].Value);
aQuery['<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ־']:=VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,4].Value);
aQuery['<27> 걨<EFBFBD> <EAB1A8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ']:=VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,5].Value);
aQuery['<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ']:=VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,6].Value);
aQuery['<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ']:=VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,9].Value);
aQuery['<27> Ƿ<C7B7> ']:=VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,10].Value);
aQuery['<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ']:=VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,11].Value);
aQuery['<27> <> <EFBFBD> <EFBFBD> װ<EFBFBD> <D7B0> <EFBFBD> <EFBFBD> ʽ ']:=VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,12].Value);
aQuery['<27> Ƿ<EFBFBD> <C7B7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ⱦ<EFBFBD> <C8BE> ']:=VartoStr(ExcelTemplet.WorkSheets[2].Cells[excelline,13].Value);
aQuery.Post;
end else begin
strtmpmblno:=strtmpmblno+','+tmpstr;
end;
end;
end;
finally
ExcelTemplet.DisplayAlerts := false;//<2F> Ƿ<EFBFBD> <C7B7> <EFBFBD> ʾ <EFBFBD> <CABE> <EFBFBD> <EFBFBD>
ExcelTemplet.Quit;//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˳<EFBFBD>
FreeAndNil(TempstrList);
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
t_op_seae.Refresh();
if trim(strtmpmblno)<>'' then begin
MessageDlg('<27> ѵ <EFBFBD> <D1B5> 룬<EFBFBD> <EBA3AC> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> '+strtmpmblno+' ϵͳ<CFB5> в<EFBFBD> <D0B2> <EFBFBD> <EFBFBD> <EFBFBD> ,<2C> <> <EFBFBD> ܵ<EFBFBD> <DCB5> 룡',mtWarning, [mbYes],0);
end else
MessageDlg('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ɣ <EFBFBD> ', mtConfirmation, [mbYes],0);
end else exit ;
end;
procedure Tfrm_op_seae_dg.bsSkinButton77Click(Sender: TObject);
var
aQuery:TAdoQuery;
str,strsjr,subject:string;
sl:TStringList;
begin
str:=' select d.*,c.<2E> ͻ<EFBFBD> <CDBB> <EFBFBD> <EFBFBD> <EFBFBD> from t_code_cust_mailproject_detail d left join t_code_cust_mailproject c '
+' on (c.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =d.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ) where <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =''Σ<> <CEA3> Ʒ <EFBFBD> 걨'' and '
+' d.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> in '
+'( SELECT distinct <20> ͻ<EFBFBD> <CDBB> ʼ <EFBFBD> <CABC> <EFBFBD> <EFBFBD> <EFBFBD> from t_op_seae where isnull(<28> ͻ<EFBFBD> <CDBB> ʼ <EFBFBD> <CABC> <EFBFBD> <EFBFBD> <EFBFBD> ,'''')<>'''' '
+'and <20> <> <EFBFBD> <EFBFBD> ='''+ t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+''' )';
subject:=t_op_seae.fieldbyname('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> 걨<EFBFBD> ѷ<EFBFBD> <D1B7> ͳɹ<CDB3> ';
aQuery:=CreateAdoQuery;
sl:=TStringList.Create;
try
with aQuery do begin
close;sql.clear;
SQL.Text:=str;
Open;
if not IsEmpty then begin
while not eof do begin
if strsjr='' then
strsjr := fieldbyname('<27> ռ <EFBFBD> <D5BC> <EFBFBD> ').AsString
else
strsjr := strsjr +',' +fieldbyname('<27> ռ <EFBFBD> <D5BC> <EFBFBD> ').AsString;
Next;
end;
end;
end;
sl.Add('<27> Ŀͻ<C4BF> ');
sl.Add(' <20> <> <EFBFBD> ã<EFBFBD> ');
sl.Add(t_op_seae.fieldbyname('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> 걨<EFBFBD> Ѱ<EFBFBD> <D1B0> չ<EFBFBD> ˾<EFBFBD> ṩ<EFBFBD> <E1B9A9> <EFBFBD> <EFBFBD> Ϣ<EFBFBD> ϴ<EFBFBD> <CFB4> <EFBFBD> VGS<47> <53> վ<EFBFBD> <D5BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϣ<EFBFBD> б <EFBFBD> <D0B1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> һ ʱ<D2BB> <CAB1> ');
sl.Add('<27> <> ϵ<EFBFBD> <CFB5> ˾<EFBFBD> <CBBE> <EFBFBD> ղ<EFBFBD> <D5B2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱ<EFBFBD> <D3B0> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ');
// if (strsjr<>'') then
// SendMail(strsjr,subject,sl);
// strsjr:='';
if (strsjr='') then begin
with aQuery do begin
close;sql.clear;
SQL.Text:='select (select top 1 <20> <> <EFBFBD> <EFBFBD> from t_sys_employee where <20> <> <EFBFBD> <EFBFBD> =t_op_seae.<2E> <> <EFBFBD> <EFBFBD> Ա) as opmail,(select top 1 <20> <> <EFBFBD> <EFBFBD> from t_sys_employee where <20> <> <EFBFBD> <EFBFBD> =t_op_seae.<2E> ͷ<EFBFBD> Ա) as custservicemail from t_op_seae where <20> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+'''';
Open;
if not IsEmpty then begin
if (FieldByName('opmail').AsString<>'') then begin
if strsjr='' then
strsjr := fieldbyname('opmail').AsString
else
strsjr := strsjr +',' +fieldbyname('opmail').AsString;
end;
{
if (FieldByName('custservicemail').AsString<>'') then begin
if strsjr='' then
strsjr := fieldbyname('custservicemail').AsString
else
strsjr := strsjr +',' +fieldbyname('custservicemail').AsString;
end;
}
end;
end;
end;
if (strsjr<>'') then
SendMail(strsjr,subject,sl);
if (t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ֱװ<D6B1> <D7B0> <EFBFBD> <EFBFBD> ').AsBoolean) then begin
subject:=t_op_seae.fieldbyname('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+'<27> <> <EFBFBD> <EFBFBD> ֱװ<D6B1> <D7B0> <EFBFBD> <EFBFBD> ';
sl.Clear;
sl.Add('<27> Ŀͻ<C4BF> ');
sl.Add(' <20> <> <EFBFBD> ã<EFBFBD> ');
sl.Add('1.'+t_op_seae.fieldbyname('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+'<27> <> ƱΣ<C6B1> <CEA3> Ʒ <EFBFBD> <C6B7> <EFBFBD> ڳ<EFBFBD> <DAB3> <EFBFBD> ֱװ<D6B1> <D7B0> <EFBFBD> <EFBFBD> <EFA3AC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʱ<EFBFBD> 䡣');
sl.Add('2.<2E> <> <EFBFBD> <EFBFBD> Ʊ<EFBFBD> <C6B1> Σ<EFBFBD> <CEA3> Ʒ <EFBFBD> ȼ<EFBFBD> <C8BC> <EFBFBD> 4.3<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 5.2<EFBFBD> <EFBFBD> Σ<EFBFBD> <EFBFBD> Ʒ <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> װ<EFBFBD> <EFBFBD> ֮ǰ<EFBFBD> <EFBFBD> <ֱװֱȡΣ<C8A1> ջ<EFBFBD> <D5BB> <EFBFBD> <EFBFBD> <EFBFBD> Ϣ<EFBFBD> <CFA2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> >');
sl.Add('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˾<EFBFBD> <CBBE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Σ<EFBFBD> <CEA3> Ʒ <EFBFBD> <C6B7> <EFBFBD> <EFBFBD> <EFBFBD> ˺<CBBA> <F3B7BDBF> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ');
if (strsjr<>'') then
SendMail(strsjr,subject,sl);
end;
t_op_seae.Edit;
t_op_seae.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> 걨״̬').AsString:='<27> ѷ<EFBFBD> <D1B7> <EFBFBD> ';
t_op_seae.Post;
with aQuery do begin
close;sql.clear;
SQL.Text:='update t_op_seae set <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 걨״̬=''<27> ѷ<EFBFBD> <D1B7> <EFBFBD> '' where <20> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+'''';
ExecSQL;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(sl);
end;
end;
procedure Tfrm_op_seae_dg.SendMail(sendto, subjectstr: string;bodylist:TStringList);
var
aQuery:TAdoQuery;
str_memo:Tmemo;
OPMailPw,OPMailAddress,OPMailSignName:string;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
close;sql.clear;
SQL.Text:='select * from t_sys_employee where <20> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> Ա').AsString+'''';
Open;
OPMailPw:=fieldbyname('msn<73> ʺ<EFBFBD> ').asstring;
OPMailAddress:=fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring;
OPMailSignName:=fieldbyname('<27> ʼ <EFBFBD> ǩ<EFBFBD> <C7A9> ').asstring; //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ʼ <EFBFBD> ǩ<EFBFBD> <C7A9> cjb 2017-12-28
end;
finally
FreeAndNil(aQuery);
end;
str_memo:=Tmemo.create(application);
str_memo.Parent:=frm_op_seae_dg;
str_memo.visible:=False;
try
SMTP1.AuthType := satDefault; //(satNone, satDefault, satSASL);
SMTP1.username:=OPMailAddress;
SMTP1.Password :=OPMailPw;
SMTP1.Host:='mail.sdsmartlogistics.com';
{
SMTP1.username:='admin@dongshengsoft.com';
SMTP1.Password :='ds!@#)(*';
SMTP1.Host :='smtpcom.263xmail.com';
}
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;
str_memo.Lines.Clear;
str_memo.Lines.Assign(bodylist);
str_memo.Lines.Add('');
str_memo.Lines.Add(OPMailSignName);
if not SMTP1.Connected then
begin
Sleep(1000);
SMTP1.Connect;
end;
try
with IdMsg do
begin
CharSet :='GB2312'; // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ļ<EFBFBD> <C4BB> <EFBFBD> <EFBFBD> <EFBFBD>
// CharSet :='UTF-8'; // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ļ<EFBFBD> <C4BB> <EFBFBD> <EFBFBD> <EFBFBD>
// Encoding:=mmeMIME;
body.Clear;
Body.Text :=str_memo.lines.Text;
From.address :=OPMailAddress;
Recipients.EMailAddresses :=sendto;
Subject:=subjectstr;
end;
if not SMTP1.Connected then
begin
Sleep(1000);
SMTP1.Connect;
end;
SMTP1.Send(IdMsg);
finally
SMTP1.Disconnect;
end;
except
MessageDlg('<27> <> <EFBFBD> <EFBFBD> ʧ<EFBFBD> <CAA7> !',mtError,[mbOK],0);
end;
Insert_mail_Log(t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString,'ΣƷ <CEA3> 걨',sendto,subjectstr,bodylist.CommaText,'');
MessageDlg('<27> <> <EFBFBD> ͳɹ<CDB3> !',mtConfirmation,[mbOK],0);
str_memo.free;
if SMTP1.Connected then SMTP1.Disconnect;
end;
procedure Tfrm_op_seae_dg.bsSkinButton1Click(Sender: TObject);
var
aQuery:TAdoQuery;
str,strsjr,subject:string;
sl:TStringList;
begin
str:=' select d.*,c.<2E> ͻ<EFBFBD> <CDBB> <EFBFBD> <EFBFBD> <EFBFBD> from t_code_cust_mailproject_detail d left join t_code_cust_mailproject c '
+' on (c.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =d.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ) where <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =''Σ<> <CEA3> Ʒ <EFBFBD> 걨'' and '
+' d.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> in '
+'( SELECT distinct <20> ͻ<EFBFBD> <CDBB> ʼ <EFBFBD> <CABC> <EFBFBD> <EFBFBD> <EFBFBD> from t_op_seae where isnull(<28> ͻ<EFBFBD> <CDBB> ʼ <EFBFBD> <CABC> <EFBFBD> <EFBFBD> <EFBFBD> ,'''')<>'''' '
+'and <20> <> <EFBFBD> <EFBFBD> ='''+ t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+''' )';
subject:=t_op_seae.fieldbyname('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> 걨<EFBFBD> ѷ<EFBFBD> <D1B7> ͳɹ<CDB3> ';
aQuery:=CreateAdoQuery;
sl:=TStringList.Create;
try
with aQuery do begin
close;sql.clear;
SQL.Text:=str;
Open;
if not IsEmpty then begin
while not eof do begin
if strsjr='' then
strsjr := fieldbyname('<27> ռ <EFBFBD> <D5BC> <EFBFBD> ').AsString
else
strsjr := strsjr +',' +fieldbyname('<27> ռ <EFBFBD> <D5BC> <EFBFBD> ').AsString;
Next;
end;
end;
end;
sl.Add('<27> Ŀͻ<C4BF> ');
sl.Add(' <20> <> <EFBFBD> ã<EFBFBD> ');
sl.Add(t_op_seae.fieldbyname('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> 걨<EFBFBD> Ѱ<EFBFBD> <D1B0> չ<EFBFBD> ˾<EFBFBD> ṩ<EFBFBD> <E1B9A9> <EFBFBD> <EFBFBD> Ϣ<EFBFBD> ϴ<EFBFBD> <CFB4> <EFBFBD> VGS<47> <53> վ<EFBFBD> <D5BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϣ<EFBFBD> б <EFBFBD> <D0B1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> һ ʱ<D2BB> <CAB1> ');
sl.Add('<27> <> ϵ<EFBFBD> <CFB5> ˾<EFBFBD> <CBBE> <EFBFBD> ղ<EFBFBD> <D5B2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӱ<EFBFBD> <D3B0> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ');
sl.Add('<27> ر<EFBFBD> <D8B1> <EFBFBD> ʾ ');
sl.Add('1. <20> <> ˮʪ<CBAE> <CAAA> <EFBFBD> <EFBFBD> ˮ<EFBFBD> <CBAE> Ӧ<EFBFBD> Ļ<EFBFBD> <C4BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䡢<EFBFBD> <E4A1A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ƶʱ<C6B5> <CAB1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʪ<EFBFBD> ȼ<EFBFBD> <C8BC> <EFBFBD> ʪ<EFBFBD> <CAAA> <EFBFBD> <EFBFBD> С <EFBFBD> <D0A1> 75%<25> <> ');
sl.Add('2. ÿ<> <C3BF> 6<EFBFBD> <36> 1<EFBFBD> <31> -9<> <39> 30<33> <30> <EFBFBD> ڼ䣬<DABC> ¸ <EFBFBD> <C2B8> »<EFBFBD> <C2BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䡢<EFBFBD> <E4A1A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ƶʱ<C6B5> <CAB1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʪ<EFBFBD> ȼ<EFBFBD> <C8BC> <EFBFBD> <EFBFBD> ¶<EFBFBD> Ҫ<EFBFBD> <D2AA> С <EFBFBD> <D0A1> 40<34> <30> <EFBFBD> ϶ȡ<CFB6> ');
sl.Add('3. <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 볡<EFBFBD> <EBB3A1> װ<EFBFBD> 䡢<EFBFBD> <E4A1A2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ƶ<EFBFBD> <C6B5> װ<EFBFBD> <D7B0> ֤<EFBFBD> <D6A4> <EFBFBD> ϴ<EFBFBD> <CFB4> <EFBFBD> <EFBFBD> Ϻ <EFBFBD> <CFBA> <EFBFBD> <EFBFBD> <EFBFBD> һ ʱ<D2BB> <CAB1> ֪ͨ<CDA8> <D6AA> ˾<EFBFBD> <CBBE> <EFBFBD> Ա<EFBFBD> <D4B1> <EFBFBD> ˾<EFBFBD> <CBBE> <EFBFBD> ˺<EFBFBD> ȷ<EFBFBD> <C8B7> <EFBFBD> <EFBFBD> Ƶ<EFBFBD> <C6B5> ');
sl.Add('4.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˾<EFBFBD> ϴ<EFBFBD> װ<EFBFBD> <D7B0> ֤<EFBFBD> <D6A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ֪ͨ<CDA8> <D6AA> ˾ȷ<CBBE> <C8B7> <EFBFBD> <EFBFBD> Ƶʱ<C6B5> <CAB1> <EFBFBD> <EFBFBD> װ<EFBFBD> <D7B0> ֤<EFBFBD> <D6A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˾<EFBFBD> <CBBE> װ<EFBFBD> <D7B0> ֤<EFBFBD> <D6A4> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> JPG<50> <47> JPEG<45> <47> GIF<49> <46> PNGϵͳʶ<CDB3> <CAB6> <EFBFBD> ĸ<EFBFBD> ʽ <EFBFBD> <CABD> ');
{
sl.Add('5. <09> <> <EFBFBD> <EFBFBD> Ƶһ <C6B5> <D2BB> <EFBFBD> ṩ<EFBFBD> <E1B9A9> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> װ<EFBFBD> <D7B0> ֤<EFBFBD> <D6A4> ɨ<EFBFBD> <C9A8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ҫ<EFBFBD> <D2AA> װ<EFBFBD> <D7B0> ֤<EFBFBD> <D6A4> <EFBFBD> ϵ<EFBFBD> <CFB5> <EFBFBD> ҵ<EFBFBD> <D2B5> <EFBFBD> ±<EFBFBD> <C2B1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 볡<EFBFBD> <EBB3A1> Ƶ<EFBFBD> <C6B5> ');
sl.Add('<27> <> <EFBFBD> <EFBFBD> װ<EFBFBD> <D7B0> <EFBFBD> ص<EFBFBD> һ <EFBFBD> ¡<EFBFBD> ');
sl.Add('6. <09> <> <EFBFBD> л<EFBFBD> <D0BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ṩ<EFBFBD> <E1B9A9> Ƶ<EFBFBD> <C6B5> ֻ<EFBFBD> <D6BB> <EFBFBD> ṩһ <E1B9A9> Ŵ<EFBFBD> <C5B4> <EFBFBD> <EFBFBD> ŵ<EFBFBD> <C5B5> <EFBFBD> Ƭ<EFBFBD> <C6AC> <EFBFBD> ɣ <EFBFBD> TANK<4E> <4B> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ṩ<EFBFBD> <E1B9A9> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> Ƭ<EFBFBD> <C6AC> ');
sl.Add('7. <09> <> <EFBFBD> ϸ<EFBFBD> <CFB8> <EFBFBD> <EFBFBD> <EFBFBD> ΣƷ <CEA3> <C6B7> Ҫ<EFBFBD> <D2AA> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Σ<EFBFBD> <CEA3> Ʒ <EFBFBD> <C6B7> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˾<EFBFBD> <CBBE> <EFBFBD> <EFBFBD> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> Ҫ<EFBFBD> <D2AA> <EFBFBD> <EFBFBD> <EFBFBD> κ<EFBFBD> <CEBA> ɻ<EFBFBD> <C9BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˾');
sl.Add('<27> 걨<EFBFBD> <EAB1A8> Ա<EFBFBD> <D4B1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ѯ<EFBFBD> <D1AF> ');
}
// if (strsjr<>'') then
// SendMail(strsjr,subject,sl);
// strsjr:='';
if (strsjr='') then begin
with aQuery do begin
close;sql.clear;
SQL.Text:='select (select top 1 <20> <> <EFBFBD> <EFBFBD> from t_sys_employee where <20> <> <EFBFBD> <EFBFBD> =t_op_seae.<2E> <> <EFBFBD> <EFBFBD> Ա) as opmail,(select top 1 <20> <> <EFBFBD> <EFBFBD> from t_sys_employee where <20> <> <EFBFBD> <EFBFBD> =t_op_seae.<2E> ͷ<EFBFBD> Ա) as custservicemail from t_op_seae where <20> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+'''';
Open;
if not IsEmpty then begin
if (FieldByName('opmail').AsString<>'') then begin
if strsjr='' then
strsjr := fieldbyname('opmail').AsString
else
strsjr := strsjr +',' +fieldbyname('opmail').AsString;
end;
{
if (FieldByName('custservicemail').AsString<>'') then begin
if strsjr='' then
strsjr := fieldbyname('custservicemail').AsString
else
strsjr := strsjr +',' +fieldbyname('custservicemail').AsString;
end;
}
end;
end;
end;
if (strsjr<>'') then
SendMail(strsjr,subject,sl);
t_op_seae.Edit;
t_op_seae.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> 걨״̬').AsString:='<27> ѷ<EFBFBD> <D1B7> <EFBFBD> ';
{
if (Pos('TK',t_op_seae.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').asstring)>0) THEN
t_op_seae.FieldByName('<27> <> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬').AsString:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ';
}
t_op_seae.Post;
with aQuery do begin
close;sql.clear;
SQL.Text:='update t_op_seae set <20> <> <EFBFBD> <EFBFBD> <EFBFBD> 걨״̬=''<27> ѷ<EFBFBD> <D1B7> <EFBFBD> '' where <20> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+'''';
ExecSQL;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(sl);
end;
end;
procedure Tfrm_op_seae_dg.btnMarksClick(Sender: TObject);
var
aQuery:TAdoQuery;
str,strsjr,subject,strctn,statusstr:string;
sl:TStringList;
isall:Boolean;
i:Integer;
begin
if t_op_ctn.IsEmpty then
exit;
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_op_ctn.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
if i=0 then
strctn:=t_op_ctn.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring
else
strctn:=strctn+','+t_op_ctn.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring;
end;
end
else
begin
strctn:=t_op_ctn.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring;
end;
str:=' select d.*,c.<2E> ͻ<EFBFBD> <CDBB> <EFBFBD> <EFBFBD> <EFBFBD> from t_code_cust_mailproject_detail d left join t_code_cust_mailproject c '
+' on (c.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =d.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ) where <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =''Σ<> <CEA3> Ʒ <EFBFBD> 걨'' and '
+' d.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> in '
+'( SELECT distinct <20> ͻ<EFBFBD> <CDBB> ʼ <EFBFBD> <CABC> <EFBFBD> <EFBFBD> <EFBFBD> from t_op_seae where isnull(<28> ͻ<EFBFBD> <CDBB> ʼ <EFBFBD> <CABC> <EFBFBD> <EFBFBD> <EFBFBD> ,'''')<>'''' '
+'and <20> <> <EFBFBD> <EFBFBD> ='''+ t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+''' )';
subject:=t_op_seae.fieldbyname('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+'<27> <> <EFBFBD> <EFBFBD> '+strctn+'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ƶ<EFBFBD> <C6B5> <EFBFBD> ϴ<EFBFBD> ';
aQuery:=CreateAdoQuery;
sl:=TStringList.Create;
try
with aQuery do begin
close;sql.clear;
SQL.Text:=str;
Open;
if not IsEmpty then begin
while not eof do begin
if strsjr='' then
strsjr := fieldbyname('<27> ռ <EFBFBD> <D5BC> <EFBFBD> ').AsString
else
strsjr := strsjr +',' +fieldbyname('<27> ռ <EFBFBD> <D5BC> <EFBFBD> ').AsString;
Next;
end;
end;
end;
sl.Add('<27> Ŀͻ<C4BF> ');
sl.Add(' <20> <> <EFBFBD> ã<EFBFBD> ');
sl.Add(t_op_seae.fieldbyname('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+'<27> <> <EFBFBD> <EFBFBD> '+strctn+'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ƶ<EFBFBD> <C6B5> <EFBFBD> ϴ<EFBFBD> <CFB4> <EFBFBD> VGS<47> <53> վ<EFBFBD> <D5BE> Σ<EFBFBD> <CEA3> Ʒ <EFBFBD> <C6B7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ƶ<EFBFBD> <C6B5> <EFBFBD> ݣ<EFBFBD> ');
sl.Add('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʱ<EFBFBD> <CAB1> Ԥ<EFBFBD> <D4A4> <EFBFBD> <EFBFBD> Ҫһ <D2AA> <D2BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> գ <EFBFBD> <D5A3> <EFBFBD> Σ<EFBFBD> <CEA3> Ʒ <EFBFBD> <C6B7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ͨ<EFBFBD> <CDA8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˾<EFBFBD> <CBBE> <EFBFBD> <EFBFBD> <EFBFBD> ʼ <EFBFBD> <CABC> <EFBFBD> ִ<EFBFBD> ķ<EFBFBD> ʽ <EFBFBD> <CABD> ֪<EFBFBD> <D6AA> ˾<EFBFBD> <CBBE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ĩ<EFBFBD> <C4A9> <EFBFBD> ڼ<EFBFBD> <DABC> ʼ <EFBFBD> <CABC> <EFBFBD> ִ<EFBFBD> <D6B4> <EFBFBD> <EFBFBD> ˳<EFBFBD> <CBB3> ');
sl.Add('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ҫ<EFBFBD> ɵ<EFBFBD> <C9B5> <EFBFBD> ѯ<EFBFBD> ʲ<EFBFBD> <CAB2> <EFBFBD> <EFBFBD> <EFBFBD> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬<D7B4> <CCAC> ');
// if (strsjr<>'') then
// SendMail(strsjr,subject,sl);
// strsjr:='';
if (strsjr='') then begin
with aQuery do begin
close;sql.clear;
SQL.Text:='select (select top 1 <20> <> <EFBFBD> <EFBFBD> from t_sys_employee where <20> <> <EFBFBD> <EFBFBD> =t_op_seae.<2E> <> <EFBFBD> <EFBFBD> Ա) as opmail from t_op_seae where <20> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+'''';
Open;
if not IsEmpty then begin
if (FieldByName('opmail').AsString<>'') then begin
if strsjr='' then
strsjr := fieldbyname('opmail').AsString
else
strsjr := strsjr +',' +fieldbyname('opmail').AsString;
end;
{
if (FieldByName('custservicemail').AsString<>'') then begin
if strsjr='' then
strsjr := fieldbyname('custservicemail').AsString
else
strsjr := strsjr +',' +fieldbyname('custservicemail').AsString;
end;
}
end;
end;
end;
if (strsjr<>'') then
SendMail(strsjr,subject,sl);
if (t_op_seae.FieldByName('<27> <> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬').AsString)='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' then statusstr:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ϴ<EFBFBD> ' else statusstr:='<27> <> <EFBFBD> ϴ<EFBFBD> ';
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_op_ctn.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
t_op_ctn.Edit;
t_op_ctn.FieldByName('<27> <> Ƶ<EFBFBD> ϴ<EFBFBD> ״̬').AsString:=statusstr;
t_op_ctn.Post;
end;
end
else
begin
t_op_ctn.Edit;
t_op_ctn.FieldByName('<27> <> Ƶ<EFBFBD> ϴ<EFBFBD> ״̬').AsString:=statusstr;
t_op_ctn.Post;
end;
if (t_op_seae.FieldByName('<27> <> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬').AsString)<>statusstr then begin
isall:=True;
t_op_ctn.First;
while not t_op_ctn.Eof do begin
if t_op_ctn.FieldByName('<27> <> Ƶ<EFBFBD> ϴ<EFBFBD> ״̬').AsString<>statusstr then
isall:=false;
t_op_ctn.Next;
end;
if (isall) then begin
// if (t_op_seae.FieldByName('<27> <> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬').AsString)='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' then statusstr:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ϴ<EFBFBD> ' else statusstr:='<27> <> <EFBFBD> ϴ<EFBFBD> ';
t_op_seae.Edit;
t_op_seae.FieldByName('<27> <> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬').AsString:=statusstr;
t_op_seae.Post;
with aQuery do begin
close;sql.clear;
SQL.Text:='update t_op_seae set <20> <> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬='''+statusstr+''' where <20> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+'''';
ExecSQL;
end;
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(sl);
end;
end;
procedure Tfrm_op_seae_dg.btnDescClick(Sender: TObject);
var
aQuery:TAdoQuery;
str,strsjr,subject,strctn:string;
sl:TStringList;
isall:Boolean;
i:Integer;
begin
if t_op_ctn.IsEmpty then
exit;
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_op_ctn.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
if i=0 then
strctn:=t_op_ctn.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring
else
strctn:=strctn+','+t_op_ctn.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring;
end;
end
else
begin
strctn:=t_op_ctn.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring;
end;
str:=' select d.*,c.<2E> ͻ<EFBFBD> <CDBB> <EFBFBD> <EFBFBD> <EFBFBD> from t_code_cust_mailproject_detail d left join t_code_cust_mailproject c '
+' on (c.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =d.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ) where <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> =''Σ<> <CEA3> Ʒ <EFBFBD> 걨'' and '
+' d.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> in '
+'( SELECT distinct <20> ͻ<EFBFBD> <CDBB> ʼ <EFBFBD> <CABC> <EFBFBD> <EFBFBD> <EFBFBD> from t_op_seae where isnull(<28> ͻ<EFBFBD> <CDBB> ʼ <EFBFBD> <CABC> <EFBFBD> <EFBFBD> <EFBFBD> ,'''')<>'''' '
+'and <20> <> <EFBFBD> <EFBFBD> ='''+ t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+''' )';
subject:=t_op_seae.fieldbyname('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+'<27> <> <EFBFBD> <EFBFBD> '+strctn+'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ͨ<EFBFBD> <CDA8> ';
aQuery:=CreateAdoQuery;
sl:=TStringList.Create;
try
with aQuery do begin
close;sql.clear;
SQL.Text:=str;
Open;
if not IsEmpty then begin
while not eof do begin
if strsjr='' then
strsjr := fieldbyname('<27> ռ <EFBFBD> <D5BC> <EFBFBD> ').AsString
else
strsjr := strsjr +',' +fieldbyname('<27> ռ <EFBFBD> <D5BC> <EFBFBD> ').AsString;
Next;
end;
end;
end;
sl.Add('<27> Ŀͻ<C4BF> ');
sl.Add(' <20> <> <EFBFBD> ã<EFBFBD> ');
sl.Add(t_op_seae.fieldbyname('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+'<27> <> <EFBFBD> <EFBFBD> '+strctn+'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ͨ<EFBFBD> <CDA8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ֪ͨ<CDA8> <D6AA> <EFBFBD> Ӽ<EFBFBD> ʱ<EFBFBD> <CAB1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϣ<EFBFBD> <CFA2> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⡣');
// if (strsjr<>'') then
// SendMail(strsjr,subject,sl);
// strsjr:='';
if (strsjr='') then begin
with aQuery do begin
close;sql.clear;
SQL.Text:='select (select top 1 <20> <> <EFBFBD> <EFBFBD> from t_sys_employee where <20> <> <EFBFBD> <EFBFBD> =t_op_seae.<2E> <> <EFBFBD> <EFBFBD> Ա) as opmail,(select top 1 <20> <> <EFBFBD> <EFBFBD> from t_sys_employee where <20> <> <EFBFBD> <EFBFBD> =t_op_seae.<2E> ͷ<EFBFBD> Ա) as custservicemail from t_op_seae where <20> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+'''';
Open;
if not IsEmpty then begin
if (FieldByName('opmail').AsString<>'') then begin
if strsjr='' then
strsjr := fieldbyname('opmail').AsString
else
strsjr := strsjr +',' +fieldbyname('opmail').AsString;
end;
{
if (FieldByName('custservicemail').AsString<>'') then begin
if strsjr='' then
strsjr := fieldbyname('custservicemail').AsString
else
strsjr := strsjr +',' +fieldbyname('custservicemail').AsString;
end;
}
end;
end;
end;
if (strsjr<>'') then
SendMail(strsjr,subject,sl);
if wwDBGrid1.SelectedList.Count>=1 then
begin
for i:=0 to wwDBGrid1.SelectedList.Count-1 do
begin
t_op_ctn.GotoBookmark(pointer(wwDBGrid1.SelectedList[i]));
t_op_ctn.Edit;
t_op_ctn.FieldByName('<27> <> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬').AsString:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ';
t_op_ctn.Post;
end;
end
else
begin
t_op_ctn.Edit;
t_op_ctn.FieldByName('<27> <> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬').AsString:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ';
t_op_ctn.Post;
end;
if (t_op_seae.FieldByName('<27> <> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬').AsString)<>'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' then begin
isall:=True;
t_op_ctn.First;
while not t_op_ctn.Eof do begin
if t_op_ctn.FieldByName('<27> <> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬').AsString<>'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ' then
isall:=false;
t_op_ctn.Next;
end;
if (isall) then begin
t_op_seae.Edit;
t_op_seae.FieldByName('<27> <> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬').AsString:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ';
t_op_seae.Post;
with aQuery do begin
close;sql.clear;
SQL.Text:='update t_op_seae set <20> <> Ƶ<EFBFBD> <C6B5> <EFBFBD> <EFBFBD> ״̬=''<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '' where <20> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+'''';
ExecSQL;
end;
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(sl);
end;
end;
procedure Tfrm_op_seae_dg.dxDBGrid1Column31GetText(Sender: TObject;
ANode: TdxTreeListNode; var AText: String);
begin
if AText='True' then
AText:='<27> <> '
else AText:='';
end;
procedure Tfrm_op_seae_dg.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_op_seae,'<27> <> <EFBFBD> <EFBFBD> ');
end;
procedure Tfrm_op_seae_dg.bsSkinButton19Click(Sender: TObject);
var
aQuery:TADOQuery;
aQueryctn:TADOQuery;
feecount:Integer;
samestr,custname:string;
issame:Boolean;
feepkgs:Double;
function createsql(FA:string):string;
var
aQuery:TADOQuery;
begin
Result:=' 1=1 ';
aQuery:=CreateAdoQuery;
try
With aQuery do begin
close;SQL.Clear;
SQL.Add('SELECT * FROM t_ch_project_Condition WHERE <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ='+FA);
Open;
First;
while not eof do begin
if ((fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='ҵ<> <D2B5> <EFBFBD> <EFBFBD> Դ') or (fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='<27> <> Դ<EFBFBD> <D4B4> ϸ')) then begin
Result:=query_tiaojian(1,Result,'b.'+fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString,fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϵ').AsString,fieldbyname('<27> <> <EFBFBD> <EFBFBD> ֵ').AsString);
end else begin
if (fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='<27> <> <EFBFBD> <EFBFBD> ֱװ<D6B1> <D7B0> <EFBFBD> <EFBFBD> ') then
Result:=query_tiaojian(3,Result,'d.'+fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString,fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϵ').AsString,fieldbyname('<27> <> <EFBFBD> <EFBFBD> ֵ').AsString)
else
Result:=query_tiaojian(1,Result,'d.'+fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString,fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϵ').AsString,fieldbyname('<27> <> <EFBFBD> <EFBFBD> ֵ').AsString);
end;
Next;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
function issamestr(bsno:string):string;
begin
result:='';
if (aQuery.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString<>t_op_seae.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString) then
Result:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϣ<EFBFBD> <CFA2> һ <EFBFBD> £<EFBFBD> ';
if (aQuery.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString<>t_op_seae.FieldByName('<27> <> <EFBFBD> <EFBFBD> ').AsString) then
Result:=Result+' <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ϣ<EFBFBD> <CFA2> һ <EFBFBD> £<EFBFBD> ';
if (aQuery.FieldByName('<27> <> TEU').AsString<>t_op_seae.FieldByName('<27> <> TEU').AsString) then
Result:=Result+' <20> <> TEU<45> <55> Ϣ<EFBFBD> <CFA2> һ <EFBFBD> £<EFBFBD> ';
InsertSysLog('ΣƷ <CEA3> <C6B7> <EFBFBD> <EFBFBD> ','<27> ᵥ<EFBFBD> <E1B5A5> :'+t_op_seae.FieldByName('<27> <> <EFBFBD> ᵥ<EFBFBD> <E1B5A5> ').AsString+' ,ҵ<> <D2B5> <EFBFBD> <EFBFBD> TEU:'+t_op_seae.FieldByName('<27> <> TEU').AsString+',ΣƷ <CEA3> <C6B7> TEU'+aQuery.FieldByName('<27> <> TEU').AsString);
end;
function getfeepkg():Double;
begin
result:=0;
if t_ch_project_fee.fieldbyname('<27> <> ').asstring='<27> <> Ʊ' then
begin
result:=1;
end
else if t_ch_project_fee.fieldbyname('<27> <> ').asstring='<27> <> <EFBFBD> <EFBFBD> ' then
begin
result:=t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asfloat;
end
else if t_ch_project_fee.fieldbyname('<27> <> ').asstring='TEU' then
begin
result:=t_op_seae.fieldbyname('<27> <> TEU').asfloat;
end else if t_ch_project_fee.fieldbyname('<27> <> ').asstring='<27> <> <EFBFBD> <EFBFBD> ' then
begin
result:=t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asfloat;
end else begin
if (aQueryctn.Locate('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʽ ',t_ch_project_fee.fieldbyname('<27> <> ').asstring,[])) then begin
result:=aQueryctn.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asfloat;
end;
end;
end;
begin
if (t_ch_project_fee.Active) then t_ch_project_fee.Close;
if (not t_ch_project.Active) then t_ch_project.open;
if (not t_ch_fee.Active) then t_ch_fee.Open;
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ⱥ<C8BA> <F2A1A3A1> <EFBFBD> ';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=t_ch_project.RecordCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
feecount:=0;
aQuery:=CreateAdoQuery;
aQueryctn:=CreateAdoQuery;
try
aQuery.Close;aQuery.SQL.Clear;
aQuery.SQL.Text:='select * from t_op_seae where <20> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+'''';
aQuery.Open;
aQueryctn.Close;aQueryctn.SQL.Clear;
aQueryctn.SQL.Add('select <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʽ ,sum(<28> <> <EFBFBD> <EFBFBD> ) <20> <> <EFBFBD> <EFBFBD> from t_op_ctn');
aQueryctn.SQL.Add('where <20> <> <EFBFBD> <EFBFBD> =:<3A> <> <EFBFBD> <EFBFBD> ');
aQueryctn.SQL.Add('Group by <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʽ ');
aQueryctn.Parameters.ParamByName('<27> <> <EFBFBD> <EFBFBD> ').Value:=t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
aQueryctn.open;
if aQuery.IsEmpty then begin
ShowMessage('<27> <> <EFBFBD> ˳<EFBFBD> <CBB3> <EFBFBD> <EFBFBD> <EFBFBD> ҵ<EFBFBD> <D2B5> <EFBFBD> <EFBFBD> ');
end else begin
issame:=true;
samestr:=issamestr(t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString);
if samestr<>'' then begin
if MessageDlg(samestr+',ȷ<> <C8B7> Ҫ<EFBFBD> <D2AA> <EFBFBD> ɷ<EFBFBD> <C9B7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ',mtWarning,[mbyes,mbno],0)<>mryes then issame:=False;
end;
if (issame) then begin
t_ch_project.first;
while not t_ch_project.Eof do begin
if (not t_op_seae_fee.Active) then t_op_seae_fee.Open;
if (not t_op_seae_fee.IsEmpty) and ((t_op_seae_fee.FieldByName('Σ<> <CEA3> Ʒ <EFBFBD> 걨<EFBFBD> շ<EFBFBD> ').AsBoolean AND (not t_ch_project.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsBoolean) and ((t_ch_project.FieldByName('<27> ո <EFBFBD> <D5B8> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='<27> շ<EFBFBD> ') or (t_ch_project.FieldByName('<27> ո <EFBFBD> <D5B8> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='ȫ<> <C8AB> ')))
or (t_op_seae_fee.FieldByName('Σ<> <CEA3> Ʒ <EFBFBD> 걨<EFBFBD> <EAB1A8> <EFBFBD> <EFBFBD> ').AsBoolean AND (not t_ch_project.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsBoolean) and ((t_ch_project.FieldByName('<27> ո <EFBFBD> <D5B8> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='<27> <> <EFBFBD> <EFBFBD> ') or (t_ch_project.FieldByName('<27> ո <EFBFBD> <D5B8> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='ȫ<> <C8AB> ')))
or (t_ch_project.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsBoolean and (Pos('('+t_ch_project.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+')',t_op_seae_fee.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString)>0) ))then
begin
end else begin
aQuery.Close;aQuery.SQL.Clear;
aQuery.SQL.Text:='select d.* from t_op_seae_dg d left join t_op_seae b on (b.<2E> <> <EFBFBD> <EFBFBD> =d.<2E> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ) where d.<2E> <> <EFBFBD> <EFBFBD> ='''+t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').AsString+''' and '+createsql(t_ch_project.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString);
aQuery.Open;
if not aQuery.IsEmpty then begin
t_ch_project_fee.Open;
t_ch_project_fee.First;
while not t_ch_project_fee.Eof do begin
feepkgs:=getfeepkg();
if t_ch_project_fee.fieldbyname('<27> ͻ<EFBFBD> <CDBB> <EFBFBD> <EFBFBD> <EFBFBD> ').asstring=''then
begin
custname:=fee_get_client(t_ch_project_fee.fieldbyname('<27> <> <EFBFBD> 㵥λ').asstring);
end
else
begin
custname:=t_ch_project_fee.fieldbyname('<27> ͻ<EFBFBD> <CDBB> <EFBFBD> <EFBFBD> <EFBFBD> ').asstring;
end;
if (t_ch_project_fee.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asfloat<>0) and (feepkgs<>0) then begin
t_ch_fee.Insert;
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ']:=t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ']:=t_ch_project_fee.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').AsString;
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ״̬']:='<27> <> <EFBFBD> <EFBFBD> ͨ<EFBFBD> <CDA8> ';
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ']:=0;
t_ch_fee['<27> <> Ʊ<EFBFBD> <C6B1> <EFBFBD> <EFBFBD> ']:=0;
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ']:=0;
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ʊ']:=0;
t_ch_fee['<27> <> <EFBFBD> 뿪Ʊ']:=0;
t_ch_fee['<27> <> <EFBFBD> ֽ<EFBFBD> <D6BD> <EFBFBD> ']:=0;
t_ch_fee['<27> Ƿ<EFBFBD> <C7B7> 渶']:=0;
t_ch_fee['˰<> <CBB0> ']:=0;
t_ch_fee['˰<> <CBB0> ']:=0;
t_ch_fee['<27> ύ']:=0;
t_ch_fee['<27> Ƿ<EFBFBD> <C7B7> <EFBFBD> <EFBFBD> <EFBFBD> ']:=0;
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ']:=t_ch_project_fee.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
t_ch_fee['<27> ұ<EFBFBD> ']:=t_ch_project_fee.fieldbyname('<27> ұ<EFBFBD> ').AsString;
t_ch_fee['<27> <> <EFBFBD> 㵥λ']:=t_ch_project_fee.fieldbyname('<27> <> <EFBFBD> 㵥λ').AsString;
if frm_data_share.t_code_currency.Locate('<27> ұ<EFBFBD> ',t_ch_project_fee.fieldbyname('<27> ұ<EFBFBD> ').asstring,[])THEN
begin
if t_ch_fee.FieldByName('<27> ұ<EFBFBD> ').AsString='USD' then
begin
if strtobool(get_parameters_value(145,'true')) then
begin
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ']:=getUsdExRate(t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').asstring)
end
else
begin
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ']:=getUsdExRate(t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ڼ<EFBFBD> ').asstring)
end;
end
else
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ']:=frm_data_share.t_code_currency.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asfloat;
end;
if t_ch_project_fee.fieldbyname('<27> ͻ<EFBFBD> <CDBB> <EFBFBD> <EFBFBD> <EFBFBD> ').asstring=''then
begin
t_ch_fee['<27> ͻ<EFBFBD> <CDBB> <EFBFBD> <EFBFBD> <EFBFBD> ']:=fee_get_client(t_ch_project_fee.fieldbyname('<27> <> <EFBFBD> 㵥λ').asstring);
end
else
begin
t_ch_fee['<27> ͻ<EFBFBD> <CDBB> <EFBFBD> <EFBFBD> <EFBFBD> ']:=t_ch_project_fee.fieldbyname('<27> ͻ<EFBFBD> <CDBB> <EFBFBD> <EFBFBD> <EFBFBD> ').asstring;
end;
t_ch_fee['<27> <> ']:=t_ch_project_fee.fieldbyname('<27> <> ').asstring;
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ']:=feepkgs;
{
if t_ch_project_fee.fieldbyname('<27> <> ').asstring='<27> <> Ʊ' then
begin
end
else if t_ch_project_fee.fieldbyname('<27> <> ').asstring='<27> <> <EFBFBD> <EFBFBD> ' then
begin
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ']:=t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asfloat;
end
else if t_ch_project_fee.fieldbyname('<27> <> ').asstring='TEU' then
begin
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ']:=t_op_seae.fieldbyname('<27> <> TEU').asfloat;
end else begin
if (aQueryctn.Locate('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʽ ',t_ch_project_fee.fieldbyname('<27> <> ').asstring,[])) then begin
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ']:=aQueryctn.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asfloat;
end;
end;
}
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ˰<EFBFBD> <CBB0> ']:=t_ch_project_fee.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asfloat;
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ']:=t_ch_project_fee.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asfloat;
t_ch_fee['<27> <> <EFBFBD> <EFBFBD> ']:=s_w(strtoint(apointnum),t_ch_fee.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asfloat*t_ch_fee.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asfloat);
t_ch_fee['˳<> <CBB3> ']:=t_ch_project_fee['˳<> <CBB3> '];
t_ch_fee['PROJECTFEEID']:=t_ch_project.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString;
t_ch_fee['¼<> <C2BC> <EFBFBD> <EFBFBD> ']:=employee;
t_ch_fee['¼<> <C2BC> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ']:=now;
t_ch_fee.Post;
feecount:=feecount+1;
end;
t_ch_project_fee.Next;
end;
if (t_op_seae_fee.IsEmpty) then begin
t_op_seae_fee.Insert;
t_op_seae_fee['<27> <> <EFBFBD> <EFBFBD> ']:=t_op_seae['<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '];
if (t_ch_project.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsBoolean) then begin
t_op_seae_fee.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=t_op_seae_fee.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+'('+t_ch_project.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+')';
end else begin
if t_ch_project.FieldByName('<27> ո <EFBFBD> <D5B8> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='<27> շ<EFBFBD> ' then t_op_seae_fee['Σ<> <CEA3> Ʒ <EFBFBD> 걨<EFBFBD> շ<EFBFBD> ']:=1;
if t_ch_project.FieldByName('<27> ո <EFBFBD> <D5B8> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='<27> <> <EFBFBD> <EFBFBD> ' then t_op_seae_fee['Σ<> <CEA3> Ʒ <EFBFBD> 걨<EFBFBD> <EAB1A8> <EFBFBD> <EFBFBD> ']:=1;
if t_ch_project.FieldByName('<27> ո <EFBFBD> <D5B8> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='ȫ<> <C8AB> ' then begin
t_op_seae_fee['Σ<> <CEA3> Ʒ <EFBFBD> 걨<EFBFBD> շ<EFBFBD> ']:=1;
t_op_seae_fee['Σ<> <CEA3> Ʒ <EFBFBD> 걨<EFBFBD> <EAB1A8> <EFBFBD> <EFBFBD> ']:=1;
end;
end;
t_op_seae_fee.Post;
end else begin
t_op_seae_fee.Edit;
t_op_seae_fee['<27> <> <EFBFBD> <EFBFBD> ']:=t_op_seae['<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> '];
if (t_ch_project.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsBoolean) then begin
t_op_seae_fee.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString:=t_op_seae_fee.FieldByName('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+'('+t_ch_project.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString+')';
end else begin
if t_ch_project.FieldByName('<27> ո <EFBFBD> <D5B8> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='<27> շ<EFBFBD> ' then t_op_seae_fee['Σ<> <CEA3> Ʒ <EFBFBD> 걨<EFBFBD> շ<EFBFBD> ']:=1;
if t_ch_project.FieldByName('<27> ո <EFBFBD> <D5B8> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='<27> <> <EFBFBD> <EFBFBD> ' then t_op_seae_fee['Σ<> <CEA3> Ʒ <EFBFBD> 걨<EFBFBD> <EAB1A8> <EFBFBD> <EFBFBD> ']:=1;
if t_ch_project.FieldByName('<27> ո <EFBFBD> <D5B8> <EFBFBD> <EFBFBD> <EFBFBD> ').AsString='ȫ<> <C8AB> ' then begin
t_op_seae_fee['Σ<> <CEA3> Ʒ <EFBFBD> 걨<EFBFBD> շ<EFBFBD> ']:=1;
t_op_seae_fee['Σ<> <CEA3> Ʒ <EFBFBD> 걨<EFBFBD> <EAB1A8> <EFBFBD> <EFBFBD> ']:=1;
end;
end;
t_op_seae_fee.Post;
end;
t_op_seae.Edit;
t_op_seae['<27> <> <EFBFBD> ɷ<EFBFBD> <C9B7> <EFBFBD> ']:=1;
t_op_seae.Post;
end;
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_ch_project.Next;
end;
ShowMessage('<27> <> <EFBFBD> <EFBFBD> '+IntToStr(feecount)+'<27> <> <EFBFBD> <EFBFBD> <EFBFBD> ã<EFBFBD> ');
end;
end;
finally
frm_sys_progress.close;
frm_sys_progress:=nil;
FreeAndNil(aQuery);
FreeAndNil(aQueryctn);
t_ch_fee.close;
t_ch_project_fee.close;
t_ch_project.Close;
end;
end;
function Tfrm_op_seae_dg.fee_get_client(str: string): string;
begin
if str='' then
result:=''
else
begin
if str='ί<> е <EFBFBD> λ'then
result:=t_op_seae.fieldbyname('ί<> е <EFBFBD> λ').asstring;
if str='<27> <> <EFBFBD> <EFBFBD> ˾'then
result:=t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ˾').asstring;
if str='<27> <> վ'then
result:=t_op_seae.fieldbyname('<27> <> վ').asstring;
if str='<27> <> <EFBFBD> <EFBFBD> 'then
result:=t_op_seae.fieldbyname('<27> <> <EFBFBD> ˳<EFBFBD> <CBB3> <EFBFBD> ').asstring;
if str='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 'then
result:=t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').asstring;
if str='<27> <> <EFBFBD> <EFBFBD> 'then
result:=t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> ').asstring;
if str='<27> <> <EFBFBD> <EFBFBD> 'then
result:=t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ˾').asstring;
if str='<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 'then
result:=t_op_seae.fieldbyname('<27> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ').asstring;
if str='<27> ջ<EFBFBD> <D5BB> <EFBFBD> 'then
result:=t_op_seae.fieldbyname('<27> ջ<EFBFBD> <D5BB> <EFBFBD> ').asstring;
if str='֪ͨ<CDA8> <D6AA> 'then
result:=t_op_seae.fieldbyname('֪ͨ<CDA8> <D6AA> ').asstring;
end;
end;
procedure Tfrm_op_seae_dg.Edit3KeyPress(Sender: TObject; var Key: Char);
begin
if Key=#13 then
bsSkinButton8.OnClick(Sender);
end;
procedure Tfrm_op_seae_dg.RxDBLookupCombo1Enter(Sender: TObject);
begin
RxLookupComboEnter(RxDBLookupCombo1);
end;
procedure Tfrm_op_seae_dg.RxDBLookupCombo1Exit(Sender: TObject);
begin
RxLookupComboExit(RxDBLookupCombo1);
end;
procedure Tfrm_op_seae_dg.RxDBLookupCombo9Enter(Sender: TObject);
begin
RxLookupComboEnter(RxDBLookupCombo9);
end;
procedure Tfrm_op_seae_dg.RxDBLookupCombo9Exit(Sender: TObject);
begin
RxLookupComboExit(RxDBLookupCombo9);
end;
end.