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

280 lines
7.1 KiB
Plaintext

This file contains ambiguous Unicode characters!

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

unit u_op_web_cust_audit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, ExtCtrls, DB, ADODB, dxExEdtr, dxCntner, dxTL,
dxDBCtrl, dxDBGrid, ComCtrls, bsSkinTabs, RxLookup, StdCtrls, Mask,
DBCtrls, wwdbdatetimepicker, wwdblook, u_op_sate, u_fee, u_op_card, Menus,
dxDBTLCl, dxGrClms, bsdbctrls, XPMenu, wwdbedit, Wwdotdot, Wwdbcomb,
Grids, Wwdbigrd, Wwdbgrid, DBGrids, OleCtrls, SHDocVw;
type
Tfrm_op_web_cust_audit = class(TForm)
Panel2: TPanel;
bsSkinButton5: TbsSkinButton;
bsSkinButton38: TbsSkinButton;
SYS_USER: TADOQuery;
t_op_seae1: TDataSource;
XPMenu1: TXPMenu;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
bsSkinButton2: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
Notebook1: TNotebook;
bsSkinPanel1: TbsSkinPanel;
Label10: TLabel;
bsSkinPanel3: TbsSkinPanel;
Label6: TLabel;
Label7: TLabel;
DBEdit6: TDBEdit;
DBEdit7: TDBEdit;
Label2: TLabel;
DBEdit2: TDBEdit;
Label1: TLabel;
DBEdit1: TDBEdit;
Label3: TLabel;
DBEdit3: TDBEdit;
Label4: TLabel;
DBEdit4: TDBEdit;
Label5: TLabel;
DBEdit5: TDBEdit;
Label8: TLabel;
DBEdit8: TDBEdit;
Label9: TLabel;
DBEdit9: TDBEdit;
Label11: TLabel;
Label12: TLabel;
DBEdit10: TDBEdit;
RxDBLookupCombo2: TRxDBLookupCombo;
Label13: TLabel;
DBCheckBox1: TDBCheckBox;
WebBrowser1: TWebBrowser;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Panel2Resize(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Notebook1PageChanged(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
private
{ Private declarations }
m_bsno:string;
m_qryTask:TADOQuery;
procedure setconcolor; //<2F><><EFBFBD>ÿؼ<C3BF><D8BC><EFBFBD><EFBFBD><EFBFBD>ɫ
function getkingpkgs(kindpkgscode:string):string;
function GetDeptname(Port:String): String;
public
{ Public declarations }
public procedure InitialData( qryTask:TADOQuery; bsno1:string);
end;
var
frm_op_web_cust_audit: Tfrm_op_web_cust_audit;
implementation
uses u_main,u_data_share, my_sys_function, u_sys_progress,
u_op_seae_apply_add, u_op_add_code, u_op_date_change, u_op_ctn,
u_op_seae_web_add;
{$R *.dfm}
procedure Tfrm_op_web_cust_audit.setconcolor;
begin
end;
procedure Tfrm_op_web_cust_audit.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_web_cust_audit.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
{
frm_op_seae_web_order.Hide;
frm_op_seae_web_order.ManualFloat(frm_op_seae_web_order.BoundsRect );
frm_main.freeTabs('frm_op_seae_web_order');
action:=cafree;
frm_op_seae_web_order:=nil;
}
end;
procedure Tfrm_op_web_cust_audit.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.Width/12);
bsSkinButton1.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton38.Width:=i;
end;
procedure Tfrm_op_web_cust_audit.FormShow(Sender: TObject);
var
url:string;
begin
SYS_USER.Close;
SYS_USER.SQL.clear;
SYS_USER.SQL.Add('select *,case IDENTIFICATION_STATE when ''NotIndent'' then ''δ<>ύ'' when ''Identifying'' then ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' when ''Indentified'' then ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
SYS_USER.SQL.Add(' when ''Reject'' then ''<27>Ѳ<EFBFBD><D1B2><EFBFBD>'' else '''' end BSSTATUSREF ');
SYS_USER.SQL.Add(' from SYS_USER where GID='''+ m_bsno + '''');
SYS_USER.open;
if (SYS_USER.FieldByName('PIC_PATH').AsString<>'') then begin
url:=StringReplace(SYS_USER.FieldByName('PIC_PATH').AsString,'~',get_parameters_value(501,''),[]);
WebBrowser1.Navigate(url);
end;
end;
procedure Tfrm_op_web_cust_audit.Notebook1PageChanged(Sender: TObject);
begin
setconcolor;
end;
procedure Tfrm_op_web_cust_audit.bsSkinButton2Click(Sender: TObject);
var
i: Integer;
bsno,ywno,sql:String;
aQuery:TAdoQuery;
begin
SYS_USER.Edit;
SYS_USER.fieldbyname('IDENTIFICATION_STATE').AsString:='Indentified';
SYS_USER.Post;
m_qryTask.Edit;
m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsDateTime:=Now;
m_qryTask.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=1;
m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27>ѽ<EFBFBD><D1BD><EFBFBD>';
m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=employee;
m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա').AsString:=employee;
m_qryTask.Post;
sql:='INSERT INTO t_op_task_state ( [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>״̬],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>])VALUES (''%s'' ,''%s'' ,''%s'')';
sql:=Format(sql,[m_qryTask.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'<27>ѽ<EFBFBD><D1BD><EFBFBD>',employee] );
m_qryTask.Connection.Execute(sql);
m_qryTask.Requery();
close;
end;
procedure Tfrm_op_web_cust_audit.bsSkinButton1Click(Sender: TObject);
var
sql:string;
begin
if( Application.MessageBox(PChar('<27><>ȷʵҪֱ<D2AA>ӽ<EFBFBD><D3BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?'+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>ӹر<D3B9><D8B1><EFBFBD><EFBFBD><EFBFBD>!,<2C>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?'),'<27><>Ϣ<EFBFBD><CFA2>ʾ',MB_YESNO+ MB_ICONQUESTION)<>IDYES) then
Exit;
try
SYS_USER.Edit;
SYS_USER.fieldbyname('IDENTIFICATION_STATE').AsString:='Reject';
SYS_USER.Post;
//** m_qryTask.Connection.BeginTrans;
m_qryTask.Edit;
m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsDateTime:=Now;
m_qryTask.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=1;
m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD><EFBFBD>';
m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=employee;
m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա').AsString:=employee;
m_qryTask.Post;
//
sql:='INSERT INTO t_op_task_state ( [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>״̬],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>])VALUES (''%s'' ,''%s'' ,''%s'')';
sql:=Format(sql,[m_qryTask.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'<27><><EFBFBD><EFBFBD>',employee] );
m_qryTask.Connection.Execute(sql);
//** m_qryTask.Connection.CommitTrans;
m_qryTask.Requery();
Application.MessageBox(PChar('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),'<27><>Ϣ<EFBFBD><CFA2>ʾ');
close();
except
on e:Exception do
begin
// on except
//* m_qryTask.Connection.RollbackTrans;
m_qryTask.Cancel();
Application.MessageBox(PChar('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: '+E.Message),'<27><>Ϣ<EFBFBD><CFA2>ʾ');
end;
end;
end;
procedure Tfrm_op_web_cust_audit.InitialData(qryTask: TADOQuery;
bsno1: string);
begin
m_qryTask:=qryTask;
m_bsno:=bsno1;
end;
function Tfrm_op_web_cust_audit.getkingpkgs(kindpkgscode: string): string;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD> from t_code_package where EDI<44><49><EFBFBD><EFBFBD>='''+kindpkgscode+'''');
Open;
if IsEmpty then
Result:='a'
else
Result:=FieldByName('<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
function Tfrm_op_web_cust_audit.GetDeptname(Port: String): String;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_sys_employee where <20><><EFBFBD><EFBFBD>='''+Port+'''');
Open;
if not IsEmpty then
Result:=Trim(FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)
else
Result:='';
end;
finally
FreeAndNil(aQuery);
end;
end;
end.