|
|
unit u_op_seae_web_cd_edit;
|
|
|
|
|
|
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;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_seae_web_cd_edit = class(TForm)
|
|
|
Panel2: TPanel;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
t_op_seae: 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;
|
|
|
t_op_ctn1: TDataSource;
|
|
|
t_op_ctn: TADOQuery;
|
|
|
t_op_seae_insert: TADOQuery;
|
|
|
t_op_seae_insert1: TDataSource;
|
|
|
t_op_ctn_insert: TADOQuery;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
Label1: TLabel;
|
|
|
Label2: TLabel;
|
|
|
Label4: TLabel;
|
|
|
Label3: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label6: TLabel;
|
|
|
Label7: TLabel;
|
|
|
Label8: TLabel;
|
|
|
Label21: TLabel;
|
|
|
Label23: TLabel;
|
|
|
DBEdit1: TDBEdit;
|
|
|
DBEdit2: TDBEdit;
|
|
|
DBEdit4: TDBEdit;
|
|
|
DBEdit3: TDBEdit;
|
|
|
DBEdit5: TDBEdit;
|
|
|
DBEdit6: TDBEdit;
|
|
|
DBEdit7: TDBEdit;
|
|
|
DBEdit8: TDBEdit;
|
|
|
DBEdit14: TDBEdit;
|
|
|
wwDBComboBox15: TwwDBComboBox;
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
Label14: TLabel;
|
|
|
Label15: TLabel;
|
|
|
Label16: TLabel;
|
|
|
Label17: TLabel;
|
|
|
Label18: TLabel;
|
|
|
Label19: TLabel;
|
|
|
Label20: TLabel;
|
|
|
Label25: TLabel;
|
|
|
Label26: TLabel;
|
|
|
Label27: TLabel;
|
|
|
Label32: TLabel;
|
|
|
Label33: TLabel;
|
|
|
Label34: TLabel;
|
|
|
Label35: TLabel;
|
|
|
Label36: TLabel;
|
|
|
Label37: TLabel;
|
|
|
Label38: TLabel;
|
|
|
Label39: TLabel;
|
|
|
Label40: TLabel;
|
|
|
Label41: TLabel;
|
|
|
Label42: TLabel;
|
|
|
DBMemo38: TDBMemo;
|
|
|
DBMemo2: TDBMemo;
|
|
|
DBEdit9: TDBEdit;
|
|
|
DBEdit10: TDBEdit;
|
|
|
DBEdit11: TDBEdit;
|
|
|
DBEdit12: TDBEdit;
|
|
|
DBEdit13: TDBEdit;
|
|
|
DBEdit16: TDBEdit;
|
|
|
DBEdit18: TDBEdit;
|
|
|
DBEdit19: TDBEdit;
|
|
|
DBEdit24: TDBEdit;
|
|
|
DBEdit25: TDBEdit;
|
|
|
DBEdit26: TDBEdit;
|
|
|
DBEdit27: TDBEdit;
|
|
|
DBEdit28: TDBEdit;
|
|
|
DBEdit29: TDBEdit;
|
|
|
DBEdit30: TDBEdit;
|
|
|
DBEdit31: TDBEdit;
|
|
|
DBEdit32: TDBEdit;
|
|
|
DBEdit33: TDBEdit;
|
|
|
DBEdit34: TDBEdit;
|
|
|
DBGrid1: TDBGrid;
|
|
|
Label9: TLabel;
|
|
|
DBEdit15: TDBEdit;
|
|
|
Label10: TLabel;
|
|
|
DBEdit17: TDBEdit;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
DBEdit20: TDBEdit;
|
|
|
DBEdit21: TDBEdit;
|
|
|
Label22: TLabel;
|
|
|
Label24: TLabel;
|
|
|
Label28: TLabel;
|
|
|
DBEdit22: TDBEdit;
|
|
|
bsSkinGroupBox2: TbsSkinGroupBox;
|
|
|
Label11: TLabel;
|
|
|
Label12: TLabel;
|
|
|
Label13: TLabel;
|
|
|
DBEdit23: TDBEdit;
|
|
|
DBEdit36: TDBEdit;
|
|
|
DBEdit37: TDBEdit;
|
|
|
bsSkinGroupBox3: TbsSkinGroupBox;
|
|
|
Label29: TLabel;
|
|
|
Label30: TLabel;
|
|
|
Label31: TLabel;
|
|
|
DBEdit38: TDBEdit;
|
|
|
DBEdit39: TDBEdit;
|
|
|
DBEdit40: TDBEdit;
|
|
|
Label43: TLabel;
|
|
|
DBEdit35: TDBEdit;
|
|
|
DBEdit41: TDBEdit;
|
|
|
Label44: TLabel;
|
|
|
DBEdit42: TDBEdit;
|
|
|
Label45: TLabel;
|
|
|
ADOQuery1: TADOQuery;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure Panel2Resize(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure Notebook1PageChanged(Sender: TObject);
|
|
|
procedure RxDBLookupCombo5Enter(Sender: TObject);
|
|
|
procedure RxDBLookupCombo5Exit(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 procedure InitialData( qryTask:TADOQuery; bsno1:string);
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_seae_web_cd_edit: Tfrm_op_seae_web_cd_edit;
|
|
|
|
|
|
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_seae_web_cd_edit.setconcolor;
|
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_web_cd_edit.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_web_cd_edit.Panel2Resize(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
i:=round(Panel2.Width/12);
|
|
|
bsSkinButton1.Width:=i;
|
|
|
bsSkinButton2.Width:=i;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_web_cd_edit.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
|
|
|
t_op_seae.Close;
|
|
|
t_op_seae.SQL.clear;
|
|
|
t_op_seae.SQL.Add('select B.*,case B.BSSTATUS when ''Create'' then ''¼<><C2BC>'' when ''Confirm'' then ''<27><>ȷ<EFBFBD><C8B7>'' when ''Submit'' then ''<27>ύ<EFBFBD>յ<EFBFBD>''');
|
|
|
t_op_seae.SQL.Add('when ''Back'' then ''<27><><EFBFBD><EFBFBD>'' else '''' end BSSTATUSREF ');
|
|
|
t_op_seae.SQL.Add(',u.EMAIL,u.TEL,u.[NAME] CUSTATTN,u.REC_BC_MAIL,CASE WHEN U.IS_ADMIN=1 THEN INFO_CLIENT ELSE (select info_client from SYS_USER where GID=U.PARENT_ID) END ί<>е<EFBFBD>λ');
|
|
|
t_op_seae.SQL.Add(' from OP_SEAE_SHIPPING B LEFT JOIN SYS_USER U ON (U.GID=B.USERID) where B.BSSTATUS<>''Create'' and B.SHIPPINGNO='''+m_bsno+''' '
|
|
|
+' order by B.ETD DESC');
|
|
|
t_op_seae.open;
|
|
|
t_op_ctn.Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_web_cd_edit.Notebook1PageChanged(Sender: TObject);
|
|
|
begin
|
|
|
setconcolor;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_web_cd_edit.RxDBLookupCombo5Enter(Sender: TObject);
|
|
|
begin
|
|
|
TRxDBLookupCombo(Sender).LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD>' ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_web_cd_edit.RxDBLookupCombo5Exit(Sender: TObject);
|
|
|
begin
|
|
|
TRxDBLookupCombo(Sender).LookupDisplay:='<27><><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_web_cd_edit.bsSkinButton2Click(Sender: TObject);
|
|
|
var
|
|
|
i: Integer;
|
|
|
bsno,ywno,sql:String;
|
|
|
aQuery:TAdoQuery;
|
|
|
function getcustedi(cust:string):string;
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
result:='';
|
|
|
try
|
|
|
aQuery.Close;
|
|
|
aQuery.SQL.Text:='select EDI<44><49><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+cust+'''';
|
|
|
aQuery.Open;
|
|
|
if not aQuery.IsEmpty then
|
|
|
result:=aQuery.fieldbyname('EDI<44><49><EFBFBD><EFBFBD>').AsString;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
function GetvesselEdi(avessel: 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_code_vessel where Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>='''+avessel+'''');
|
|
|
Open;
|
|
|
if IsEmpty then
|
|
|
Result:='a'
|
|
|
else
|
|
|
Result:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
begin
|
|
|
|
|
|
|
|
|
frm_main.db.BeginTrans;
|
|
|
|
|
|
|
|
|
try
|
|
|
if not t_op_seae_insert.Active then t_op_seae_insert.Open; //<2F><><EFBFBD><EFBFBD>
|
|
|
if not t_op_ctn_insert.Active then t_op_ctn_insert.Open; //
|
|
|
ADOQuery1.Close;ADOQuery1.SQL.text:='select * from t_op_seae where <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>='''+t_op_seae.fieldbyname('MBLNO').AsString+'''';
|
|
|
ADOQuery1.Open;
|
|
|
t_op_seae_insert.Insert;
|
|
|
bsno:=get_id;
|
|
|
t_op_seae_insert.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=bsno;
|
|
|
t_op_seae_insert['EDI<44><49><EFBFBD><EFBFBD>']:='CN';
|
|
|
t_op_seae_insert['EDI״̬']:='δ<><CEB4><EFBFBD><EFBFBD>';
|
|
|
t_op_seae_insert['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_op_seae_insert['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
t_op_seae_insert['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']:=t_op_seae['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>'];
|
|
|
t_op_seae_insert['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']:=t_op_seae['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>'];
|
|
|
t_op_seae_insert['<27>յ<EFBFBD><D5B5><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD>걨';
|
|
|
t_op_seae_insert['<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>']:=getcustedi(t_op_seae.fieldbyname('CARRIER').AsString);
|
|
|
if (not ADOQuery1.IsEmpty) then begin
|
|
|
t_op_seae_insert['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_insert['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ADOQuery1['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_insert['<27><>ע']:=ADOQuery1['<27><>ע'];
|
|
|
t_op_seae_insert['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=ADOQuery1['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>'];
|
|
|
end;
|
|
|
t_op_seae_insert['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae['SHIPPERNAME'];
|
|
|
t_op_seae_insert['<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1']:=t_op_seae['SHIPPERADDR1'];
|
|
|
t_op_seae_insert['<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=t_op_seae['SHIPPERCOUNTRY'];
|
|
|
t_op_seae_insert['<27><><EFBFBD><EFBFBD><EFBFBD>˵绰']:=t_op_seae['SHIPPERTEL'];
|
|
|
t_op_seae_insert['<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae['CONSIGNEENAME'];
|
|
|
t_op_seae_insert['<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1']:=t_op_seae['CONSIGNEEADDR1'];
|
|
|
t_op_seae_insert['<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=t_op_seae['CONSIGNEECOUNTRY'];
|
|
|
t_op_seae_insert['<27>ջ<EFBFBD><D5BB>˵绰']:=t_op_seae['CONSIGNEETEL'];
|
|
|
t_op_seae_insert['֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae['NOTIFYPARTYNAME'];
|
|
|
t_op_seae_insert['֪ͨ<CDA8>˵<EFBFBD>ַ1']:=t_op_seae['NOTIFYPARTYADDR1'];
|
|
|
t_op_seae_insert['֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=t_op_seae['NOTIFYPARTYCOUNTRY'];
|
|
|
t_op_seae_insert['֪ͨ<CDA8>˵绰']:=t_op_seae['NOTIFYPARTYTEL'];
|
|
|
t_op_seae_insert.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').AsString:=t_op_seae.FieldByName('PORTLOAD').AsString;
|
|
|
t_op_seae_insert.FieldByName('װ<>۴<EFBFBD><DBB4><EFBFBD>').AsString:=t_op_seae.FieldByName('PORTLOADID').AsString; //////??????
|
|
|
t_op_seae_insert.FieldByName('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.FieldByName('PORTDISCHARGEID').AsString;
|
|
|
t_op_seae_insert.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').AsString:=t_op_seae.FieldByName('PORTDISCHARGE').AsString;
|
|
|
t_op_seae_insert.FieldByName('Ŀ<>ĵش<C4B5><D8B4><EFBFBD>').AsString:=t_op_seae.FieldByName('DESTINATIONID').AsString;
|
|
|
t_op_seae_insert.FieldByName('Ŀ<>ĵ<EFBFBD>').AsString:=t_op_seae.FieldByName('DESTINATION').AsString;
|
|
|
t_op_seae_insert.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.FieldByName('SERVICE').AsString;
|
|
|
t_op_seae_insert.FieldByName('<27><>ͷ').AsString:=t_op_seae.FieldByName('MARKS').AsString;
|
|
|
t_op_seae_insert.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.FieldByName('DESCRIPTION').AsString;
|
|
|
t_op_seae_insert.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=t_op_seae.FieldByName('PKGS').AsInteger;
|
|
|
t_op_seae_insert.FieldByName('<27><>װ').AsString:=t_op_seae.FieldByName('KINDPKGS').AsString;
|
|
|
t_op_seae_insert.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_op_seae.FieldByName('KGS').AsFloat;
|
|
|
t_op_seae_insert.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=t_op_seae.FieldByName('CBM').AsFloat;
|
|
|
t_op_seae_insert.FieldByName('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsString:=t_op_seae.FieldByName('DCLASS').AsString;
|
|
|
t_op_seae_insert.FieldByName('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsString:=t_op_seae.FieldByName('DUNNO').AsString;
|
|
|
t_op_seae_insert.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>').AsString:=t_op_seae.FieldByName('TEMPSET').AsString;
|
|
|
t_op_seae_insert.FieldByName('<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>').AsString:=t_op_seae.FieldByName('REEFERF').AsString;
|
|
|
t_op_seae_insert.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ').AsString:=t_op_seae.FieldByName('CARGOID').AsString;
|
|
|
t_op_seae_insert.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString:=t_op_seae.FieldByName('CARRIER').AsString;
|
|
|
t_op_seae_insert['ʪ<><CAAA>']:=t_op_seae['HUMIDITY'];
|
|
|
|
|
|
t_op_seae_insert['<27><><EFBFBD><EFBFBD>']:=t_op_seae['CHUANDAI'];
|
|
|
t_op_seae_insert['<27><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>']:='';
|
|
|
t_op_seae_insert['<27><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>']:='A';
|
|
|
t_op_seae_insert['װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='FCL';
|
|
|
t_op_seae_insert['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=1;
|
|
|
// t_op_seae_insert['<27><><EFBFBD>䷽ʽ']:=t_op_seae2.DataSet['<27><><EFBFBD>䷽ʽ'];
|
|
|
t_op_seae_insert['<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>']:='Master';
|
|
|
t_op_seae_insert.Post;
|
|
|
|
|
|
|
|
|
|
|
|
if (not t_op_ctn.IsEmpty) then
|
|
|
begin
|
|
|
try
|
|
|
t_op_ctn_insert.Close;
|
|
|
t_op_ctn_insert.Open;
|
|
|
with t_op_ctn do begin
|
|
|
First;
|
|
|
while not Eof do
|
|
|
begin
|
|
|
t_op_ctn_insert.Insert;
|
|
|
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=t_op_ctn['CTNNUM'];
|
|
|
if frm_data_share.t_code_ctn.Locate('MSC<53><43><EFBFBD><EFBFBD>',t_op_ctn['CTNALL'],[]) then
|
|
|
begin
|
|
|
t_op_ctn_insert['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'];
|
|
|
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_ctn_insert['<27>ߴ<EFBFBD>']:=frm_data_share.t_code_ctn['<27>ߴ<EFBFBD>'];
|
|
|
if frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='20'then
|
|
|
t_op_ctn_insert['TEU']:=1*t_op_ctn_insert.FieldByName('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
|
|
|
if (frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='40')OR
|
|
|
(frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='45')then
|
|
|
t_op_ctn_insert['TEU']:=2*t_op_ctn_insert.FieldByName('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
t_op_ctn_insert['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:='';
|
|
|
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
t_op_ctn_insert['<27>ߴ<EFBFBD>']:='';
|
|
|
t_op_ctn_insert['TEU']:=0;
|
|
|
end;
|
|
|
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=t_op_ctn['PKGS'];
|
|
|
t_op_ctn_insert['<27><>װ']:=t_op_ctn.FieldByName('KINDPKGS').AsString;
|
|
|
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=t_op_ctn['KGS'];
|
|
|
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=t_op_ctn['CBM'];
|
|
|
// t_op_ctn_insert['Ʒ<><C6B7>']:=t_op_ctn['GOODSNAME'];
|
|
|
|
|
|
|
|
|
|
|
|
t_op_ctn_insert['<27><><EFBFBD><EFBFBD>']:=bsno;
|
|
|
t_op_ctn_insert.post;
|
|
|
Next;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
t_op_seae.Edit;
|
|
|
t_op_seae.fieldbyname('BSSTATUS').AsString:='Confirm';
|
|
|
t_op_seae.fieldbyname('BSNO').AsString:=bsno;
|
|
|
t_op_seae.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();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
frm_main.db.CommitTrans;
|
|
|
finally
|
|
|
if frm_main.db.InTransaction then
|
|
|
begin
|
|
|
frm_main.db.RollbackTrans;
|
|
|
end;
|
|
|
Application.MessageBox(PChar('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),'<27><>Ϣ<EFBFBD><CFA2>ʾ');
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_web_cd_edit.InitialData(qryTask: TADOQuery;
|
|
|
bsno1: string);
|
|
|
begin
|
|
|
m_qryTask:=qryTask;
|
|
|
m_bsno:=bsno1;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_web_cd_edit.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
|
|
|
//** 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;
|
|
|
|
|
|
t_op_seae.Edit;
|
|
|
t_op_seae.fieldbyname('BSSTATUS').AsString:='Back';
|
|
|
t_op_seae.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;
|
|
|
|
|
|
function Tfrm_op_seae_web_cd_edit.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;
|
|
|
|
|
|
function Tfrm_op_seae_web_cd_edit.getkingpkgs(
|
|
|
kindpkgscode: string): string;
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
if (kindpkgscode='') then begin
|
|
|
result:='';
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
end.
|