|
|
unit crm_OnLineBillLadingConfirm;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, ADODB, BusinessSkinForm, bsSkinCtrls, dxExEdtr, dxCntner,
|
|
|
dxTL, dxDBCtrl, dxDBGrid, dxDBTLCl, dxGrClms, Grids, DBGridEh, StdCtrls,
|
|
|
Mask, bsSkinBoxCtrls,u_op_seae_DsWebService,SoapHTTPClient,InvokeRegistry,
|
|
|
Menus, kbmMemTable,my_sys_function, bsdbctrls, RxLookup,
|
|
|
wwdbdatetimepicker, DBCtrls;
|
|
|
|
|
|
type
|
|
|
Tfrm_crm_OnLineBillLadingConfirm = class(TForm)
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
dxdbgrd1: TdxDBGrid;
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
ds1: TDataSource;
|
|
|
qryInsert: TADOQuery;
|
|
|
dxdbgrd1Column2: TdxDBGridColumn;
|
|
|
dxdbgrd1Column3: TdxDBGridColumn;
|
|
|
dxdbgrd1Column4: TdxDBGridColumn;
|
|
|
dxdbgrd1Column5: TdxDBGridColumn;
|
|
|
dxdbgrd1Column6: TdxDBGridColumn;
|
|
|
qrysearch: TADOQuery;
|
|
|
MT2: TkbmMemTable;
|
|
|
StringField1: TStringField;
|
|
|
StringField2: TStringField;
|
|
|
StringField3: TStringField;
|
|
|
StringField4: TStringField;
|
|
|
StringField5: TStringField;
|
|
|
StringField6: TStringField;
|
|
|
StringField7: TStringField;
|
|
|
StringField8: TStringField;
|
|
|
StringField9: TStringField;
|
|
|
StringField10: TStringField;
|
|
|
StringField11: TStringField;
|
|
|
StringField12: TStringField;
|
|
|
StringField13: TStringField;
|
|
|
StringField14: TStringField;
|
|
|
StringField15: TStringField;
|
|
|
dxdbgrd1Column8: TdxDBGridColumn;
|
|
|
dxdbgrd1Column9: TdxDBGridColumn;
|
|
|
dxdbgrd1Column10: TdxDBGridColumn;
|
|
|
dxdbgrd1Column11: TdxDBGridColumn;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
t_ch_fee: TADOQuery;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
qryGetOpseae: TADOQuery;
|
|
|
qryGetOpseae2: TADOQuery;
|
|
|
qryGetCompany: TADOQuery;
|
|
|
MT1: TkbmMemTable;
|
|
|
MT1BSNO: TStringField;
|
|
|
MT1MBLNO: TStringField;
|
|
|
MT1SHIPPER: TStringField;
|
|
|
MT1CONSIGNEE: TStringField;
|
|
|
MT1NOTIFYPARTY: TStringField;
|
|
|
MT1PLACEDELIVERY: TStringField;
|
|
|
MT1AGENT: TStringField;
|
|
|
MT1PORTLOAD: TStringField;
|
|
|
MT1VESSEL: TStringField;
|
|
|
MT1VOYNO: TStringField;
|
|
|
MT1PORTDISCHARGE: TStringField;
|
|
|
MT1DESTINATION: TStringField;
|
|
|
MT1MARKS: TStringField;
|
|
|
MT1NOPKGS: TStringField;
|
|
|
MT1DESCRIPTION: TStringField;
|
|
|
MT1MEASUREMENT: TStringField;
|
|
|
MT1TOTALNO: TStringField;
|
|
|
MT1PREPARDAT: TStringField;
|
|
|
MT1PAYABLEAT: TStringField;
|
|
|
MT1ISSUEPLACE: TStringField;
|
|
|
MT1ISSUEDATE: TStringField;
|
|
|
MT1NOBILL: TStringField;
|
|
|
MT1SENDERCOMPANY: TStringField;
|
|
|
MT1ReceiverCOMPANY: TStringField;
|
|
|
MT1GROSSWEIGHT: TStringField;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinPanel5: TbsSkinPanel;
|
|
|
lbl1: TLabel;
|
|
|
lbl2: TLabel;
|
|
|
lbl3: TLabel;
|
|
|
lbl4: TLabel;
|
|
|
lbl5: TLabel;
|
|
|
dbedtHEAD_TO: TDBEdit;
|
|
|
btn1: TButton;
|
|
|
dbcbbHEAD_ATTN: TDBComboBox;
|
|
|
dbedtHEAD_TEL: TDBEdit;
|
|
|
dbedtHEAD_FAX: TDBEdit;
|
|
|
dbedtHEAD_MAIL: TDBEdit;
|
|
|
bsSkinNotebook1: TbsSkinNotebook;
|
|
|
lbl6: TLabel;
|
|
|
lbl7: TLabel;
|
|
|
lbl8: TLabel;
|
|
|
lbl9: TLabel;
|
|
|
lbl10: TLabel;
|
|
|
dbmmo1: TDBMemo;
|
|
|
dbmmo2: TDBMemo;
|
|
|
dbmmo3: TDBMemo;
|
|
|
dbmmo4: TDBMemo;
|
|
|
dbmmo5: TDBMemo;
|
|
|
lbl11: TLabel;
|
|
|
lbl12: TLabel;
|
|
|
dbedt1: TDBEdit;
|
|
|
dbmmo6: TDBMemo;
|
|
|
lbl13: TLabel;
|
|
|
lbl14: TLabel;
|
|
|
lbl15: TLabel;
|
|
|
lbl16: TLabel;
|
|
|
dbedt2: TDBEdit;
|
|
|
dbedt3: TDBEdit;
|
|
|
dbedt4: TDBEdit;
|
|
|
dbmmo7: TDBMemo;
|
|
|
lbl17: TLabel;
|
|
|
lbl18: TLabel;
|
|
|
dbedt5: TDBEdit;
|
|
|
dbmmo8: TDBMemo;
|
|
|
lbl19: TLabel;
|
|
|
lbl20: TLabel;
|
|
|
lbl21: TLabel;
|
|
|
lbl22: TLabel;
|
|
|
lbl23: TLabel;
|
|
|
lbl24: TLabel;
|
|
|
lbl25: TLabel;
|
|
|
lbl26: TLabel;
|
|
|
lbl27: TLabel;
|
|
|
lbl28: TLabel;
|
|
|
dbmmo9: TDBMemo;
|
|
|
dbmmo10: TDBMemo;
|
|
|
dbmmo11: TDBMemo;
|
|
|
dbedt6: TDBEdit;
|
|
|
dbedt7: TDBEdit;
|
|
|
dbmmo12: TDBMemo;
|
|
|
dbmmo13: TDBMemo;
|
|
|
dbedt8: TDBEdit;
|
|
|
dbmmo14: TDBMemo;
|
|
|
dbmmo15: TDBMemo;
|
|
|
lbl29: TLabel;
|
|
|
lbl30: TLabel;
|
|
|
lbl31: TLabel;
|
|
|
lbl32: TLabel;
|
|
|
lbl33: TLabel;
|
|
|
lbl34: TLabel;
|
|
|
lbl35: TLabel;
|
|
|
lbl36: TLabel;
|
|
|
lbl37: TLabel;
|
|
|
dbedt9: TDBEdit;
|
|
|
dbedt10: TDBEdit;
|
|
|
dbedt11: TDBEdit;
|
|
|
dbedt12: TDBEdit;
|
|
|
dbedt13: TDBEdit;
|
|
|
dbedt14: TDBEdit;
|
|
|
dbmmo16: TDBMemo;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
lbl38: TLabel;
|
|
|
lbl39: TLabel;
|
|
|
lbl40: TLabel;
|
|
|
lbl41: TLabel;
|
|
|
lbl42: TLabel;
|
|
|
lbl43: TLabel;
|
|
|
lbl44: TLabel;
|
|
|
lbl45: TLabel;
|
|
|
lbl46: TLabel;
|
|
|
lbl47: TLabel;
|
|
|
lbl48: TLabel;
|
|
|
lbl49: TLabel;
|
|
|
lbl50: TLabel;
|
|
|
lbl51: TLabel;
|
|
|
lbl52: TLabel;
|
|
|
lbl53: TLabel;
|
|
|
lbl54: TLabel;
|
|
|
lbl55: TLabel;
|
|
|
dbedt15: TDBEdit;
|
|
|
dbedt16: TDBEdit;
|
|
|
dbedt17: TDBEdit;
|
|
|
dbedt18: TDBEdit;
|
|
|
dbedt19: TDBEdit;
|
|
|
dbedt20: TDBEdit;
|
|
|
dbedt21: TDBEdit;
|
|
|
dbedt22: TDBEdit;
|
|
|
dbedt23: TDBEdit;
|
|
|
dbedt24: TDBEdit;
|
|
|
dbedt25: TDBEdit;
|
|
|
dbmmo17: TDBMemo;
|
|
|
btn2: TButton;
|
|
|
btn3: TButton;
|
|
|
btn4: TButton;
|
|
|
dbedt26: TDBEdit;
|
|
|
dbedt27: TDBEdit;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
dbedt28: TDBEdit;
|
|
|
dbedt29: TDBEdit;
|
|
|
dbedt30: TDBEdit;
|
|
|
lbl56: TLabel;
|
|
|
lbl57: TLabel;
|
|
|
lbl58: TLabel;
|
|
|
lbl59: TLabel;
|
|
|
lbl60: TLabel;
|
|
|
lbl61: TLabel;
|
|
|
lbl62: TLabel;
|
|
|
lbl63: TLabel;
|
|
|
lbl64: TLabel;
|
|
|
lbl65: TLabel;
|
|
|
lbl66: TLabel;
|
|
|
lbl67: TLabel;
|
|
|
dbedt31: TDBEdit;
|
|
|
dbedt32: TDBEdit;
|
|
|
dbedt33: TDBEdit;
|
|
|
dbmmo18: TDBMemo;
|
|
|
btn5: TButton;
|
|
|
dbedt34: TDBEdit;
|
|
|
dbcbb1: TDBComboBox;
|
|
|
dbedt35: TDBEdit;
|
|
|
dbedt36: TDBEdit;
|
|
|
dbedt37: TDBEdit;
|
|
|
dbedt38: TDBEdit;
|
|
|
dbedt39: TDBEdit;
|
|
|
dbedt40: TDBEdit;
|
|
|
lbl68: TLabel;
|
|
|
lbl69: TLabel;
|
|
|
dbedt41: TDBEdit;
|
|
|
dbmmo19: TDBMemo;
|
|
|
lbl70: TLabel;
|
|
|
lbl71: TLabel;
|
|
|
dbmmo20: TDBMemo;
|
|
|
dbmmo21: TDBMemo;
|
|
|
lbl72: TLabel;
|
|
|
lbl73: TLabel;
|
|
|
lbl74: TLabel;
|
|
|
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
|
|
|
dbedt42: TDBEdit;
|
|
|
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox6: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox7: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox8: TbsSkinDBCheckRadioBox;
|
|
|
dbedt43: TDBEdit;
|
|
|
dbedt44: TDBEdit;
|
|
|
dbmmo22: TDBMemo;
|
|
|
bsSkinStdLabel1: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel2: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel3: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel4: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel5: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel6: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel7: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel8: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel9: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel10: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel11: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel12: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel13: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel14: TbsSkinStdLabel;
|
|
|
bsSkinStdLabel15: TbsSkinStdLabel;
|
|
|
bsSkinDBEdit1: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit2: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit3: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit4: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit5: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit6: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit7: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit8: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit9: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit10: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit11: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit12: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit13: TbsSkinDBEdit;
|
|
|
bsSkinDBEdit14: TbsSkinDBEdit;
|
|
|
bsSkinDBMemo1: TbsSkinDBMemo;
|
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure dxdbgrd1DblClick(Sender: TObject);
|
|
|
function UnformatAfrstr(str:string):string;
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure SaveBooking;
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
private
|
|
|
|
|
|
XML,OPTYPE:String;
|
|
|
OpSeaeCount:Integer;
|
|
|
function REHH(str:string):string;
|
|
|
public
|
|
|
//function GetXML(_OPTYPE:string):integer; overload;
|
|
|
function GetXML:integer; overload;
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_crm_OnLineBillLadingConfirm: Tfrm_crm_OnLineBillLadingConfirm;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_op_seae, u_data_share, U_SelectLinkMan, u_sys_progress, u_main
|
|
|
,u_op_seae_assistant_qr;
|
|
|
|
|
|
|
|
|
//using
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBillLadingConfirm.bsSkinButton1Click(Sender: TObject);
|
|
|
var _s,url:string; aa:DsWebServiceSoap;
|
|
|
begin
|
|
|
url:= get_WebseviceURL;
|
|
|
aa:=GetDsWebServiceSoap(false,get_WebseviceURL);//'http://192.168.1.105:5427/webservice/DsWebService.asmx');
|
|
|
//<2F><><EFBFBD>Ȼ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
_s:='<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s:=_s+'<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s:=_s+' <Head> ';
|
|
|
_s:=_s+' <OPID>'+frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring+'</OPID> ';
|
|
|
_s:=_s+' <OPTYPE>4</OPTYPE> ';
|
|
|
_s:=_s+' <OPTIME></OPTIME> ';
|
|
|
_s:=_s+' <Version>1.0</Version> ';
|
|
|
_s:=_s+' </Head><OpseaeList> ';
|
|
|
_s:=_s+' <Opseae> ';
|
|
|
_s:=_s+' <BSNO>'+MT1.fieldbyname('BSNO').asstring+'</BSNO> ';
|
|
|
_s:=_s+' </Opseae></OpseaeList> ';
|
|
|
_s:=_s+'</BookingCargoSpace> ';
|
|
|
XML:=aa.SetBookingCargoSpaceAudit(_s);
|
|
|
//XML:=aa.ReceiveBookingCargoSpace(_s);
|
|
|
//Opseaecount:= frm_data_share.countString('Opseae',xml);
|
|
|
//result:= Opseaecount;
|
|
|
if (pos('<27>ɹ<EFBFBD>',XML)>0) then begin
|
|
|
ShowMessage('<27><><EFBFBD>سɹ<D8B3>');
|
|
|
MT1.Delete;
|
|
|
MT1.Post;
|
|
|
end else begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>');
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
function Tfrm_crm_OnLineBillLadingConfirm.GetXML: integer;
|
|
|
var _s,url,block:string; aa:DsWebServiceSoap;
|
|
|
p1,p2:integer;
|
|
|
begin
|
|
|
//OPTYPE:= _OPTYPE;
|
|
|
if not ASSIGNED(frm_sys_progress) then
|
|
|
frm_sys_progress:=tfrm_sys_progress.Create(application);
|
|
|
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD>ڻ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<C8BA><F2A1A3A1><EFBFBD>';
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=100;
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
|
|
|
frm_sys_progress.Show;
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
try
|
|
|
|
|
|
frm_data_share.t_load_employee.open;
|
|
|
qryGetCompany.close;
|
|
|
qryGetCompany.Parameters.ParamByName('<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>').Value:= frm_data_share.t_load_employee.fieldbyname('<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
qryGetCompany.open;
|
|
|
url:= get_WebseviceURL;
|
|
|
aa:=GetDsWebServiceSoap(false,get_WebseviceURL);//'http://192.168.1.105:5427/webservice/DsWebService.asmx');
|
|
|
//<2F><><EFBFBD>Ȼ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
_s:='<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s:=_s+'<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s:=_s+' <Head> ';
|
|
|
_s:=_s+' <OPID>'+frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring+'</OPID> ';
|
|
|
_s:=_s+' <COMPANYID>'+qryGetCompany.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring+'</COMPANYID> ';
|
|
|
_s:=_s+' <OPTYPE>'+OPTYPE+'</OPTYPE> ';
|
|
|
_s:=_s+' <OPTIME></OPTIME> ';
|
|
|
_s:=_s+' <Version>1.0</Version> ';
|
|
|
_s:=_s+' </Head> ';
|
|
|
_s:=_s+'</BookingCargoSpace> ';
|
|
|
//ShowMessage(_s);
|
|
|
XML:=aa.ReceiveBillOfLadingConfirm(_s);
|
|
|
XML:=StringReplace(XML,'#$A','',[rfReplaceAll]);
|
|
|
p1:=frm_data_share.GettimePotion(1,'<OpseaeList>',XML);
|
|
|
p2:=frm_data_share.GettimePotion(1,'</OpseaeList>',xml);
|
|
|
XML:=copy(XML,p1,p2-p1);
|
|
|
//ShowMessage(XML);
|
|
|
Opseaecount:= frm_data_share.countString('Opseae',xml);
|
|
|
result:= Opseaecount;
|
|
|
finally
|
|
|
frm_sys_progress.Close;
|
|
|
frm_sys_progress.Free;
|
|
|
frm_sys_progress:=nil;
|
|
|
if (XML='') then begin
|
|
|
result:=0;
|
|
|
//showmessage('û<><C3BB><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
{
|
|
|
function Tfrm_crm_OnLineBillLadingConfirm.GetXML: integer;
|
|
|
begin
|
|
|
result:=GetXML(OPTYPE);
|
|
|
end; }
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBillLadingConfirm.FormShow(Sender: TObject);
|
|
|
var
|
|
|
_ts:widestring;
|
|
|
_s,Opseae,ctn,block,ctnblock,mes:string;
|
|
|
ctncount,p1,p2,p3,p4,_i:integer;
|
|
|
|
|
|
begin
|
|
|
//1.<2E><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6>ٸ<EFBFBD>opseae<61><65>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD>ݴ˷ֿ<CBB7>
|
|
|
MT1.close;
|
|
|
if (OpSeaeCount=0) then begin
|
|
|
ShowMessage('û<>д<EFBFBD><D0B4><EFBFBD><EFBFBD>յĶ<D5B5><C4B6><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<ͬ<><CDAC>shippingbox<6F><78>Ϣ>');
|
|
|
close;
|
|
|
end else begin
|
|
|
|
|
|
for _i:=1 to OpSeaeCount do begin
|
|
|
p1:=frm_data_share.GettimePotion(_i,'<Opseae>',xml);
|
|
|
p2:=frm_data_share.GettimePotion(_i,'</Opseae>',xml);
|
|
|
block:=Copy(xml,p1,p2-p1);
|
|
|
//showmessage(block);
|
|
|
MT1.Open;
|
|
|
MT1.Edit;
|
|
|
MT1.Insert;
|
|
|
MT1['BSNO']:=frm_data_share.GetXMLValue('BSNO',block);
|
|
|
MT1['MBLNO']:=frm_data_share.GetXMLValue('MBLNO',block);
|
|
|
//MT1['BOOKINGTYPE']:=frm_data_share.GetXMLValue('BOOKINGTYPE',block);
|
|
|
MT1['SHIPPER']:=REHH(UnformatAfrstr(frm_data_share.GetXMLValue('SHIPPER',block)));
|
|
|
MT1['CONSIGNEE']:=REHH(UnformatAfrstr(frm_data_share.GetXMLValue('CONSIGNEE',block)));
|
|
|
MT1['NOTIFYPARTY']:=REHH(UnformatAfrstr(frm_data_share.GetXMLValue('NOTIFYPARTY',block)));
|
|
|
MT1['PLACEDELIVERY']:=frm_data_share.GetXMLValue('PLACEDELIVERY',block);
|
|
|
MT1['PORTLOAD']:=frm_data_share.GetXMLValue('PORTLOAD',block);
|
|
|
MT1['VESSEL']:=frm_data_share.GetXMLValue('VESSEL',block);
|
|
|
MT1['VOYNO']:=frm_data_share.GetXMLValue('VOYNO',block);
|
|
|
MT1['PORTDISCHARGE']:=frm_data_share.GetXMLValue('PORTDISCHARGE',block);
|
|
|
|
|
|
MT1['AGENT']:=frm_data_share.GetXMLValue('AGENT',block);
|
|
|
MT1['MARKS']:=REHH(frm_data_share.GetXMLValue('MARKS',block));
|
|
|
MT1['NOPKGS']:=REHH(frm_data_share.GetXMLValue('NOPKGS',block));
|
|
|
MT1['DESCRIPTION']:=REHH(frm_data_share.GetXMLValue('DESCRIPTION',block));
|
|
|
MT1['DESTINATION']:=frm_data_share.GetXMLValue('DESTINATION',block);
|
|
|
MT1['GROSSWEIGHT']:=REHH(frm_data_share.GetXMLValue('GROSSWEIGHT',block));
|
|
|
MT1['MEASUREMENT']:=REHH(frm_data_share.GetXMLValue('MEASUREMENT',block));
|
|
|
MT1['TOTALNO']:=frm_data_share.GetXMLValue('TOTALNO',block);
|
|
|
|
|
|
MT1['PREPARDAT']:=frm_data_share.GetXMLValue('PREPARDAT',block);
|
|
|
MT1['PAYABLEAT']:=frm_data_share.GetXMLValue('PAYABLEAT',block);
|
|
|
MT1['ISSUEPLACE']:=frm_data_share.GetXMLValue('ISSUEPLACE',block);
|
|
|
MT1['ISSUEDATE']:=frm_data_share.GetXMLValue('ISSUEDATE',block);
|
|
|
MT1['NOBILL']:=frm_data_share.GetXMLValue('NOBILL',block);
|
|
|
MT1['SENDERCOMPANY']:=frm_data_share.GetXMLValue('SENDERCOMPANY',block);
|
|
|
MT1['ReceiverCOMPANY']:=frm_data_share.GetXMLValue('ReceiverCOMPANY',block);
|
|
|
|
|
|
MT1.Post;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBillLadingConfirm.SaveBooking;
|
|
|
var _s,_t,_id,_no,block,xml,onlinetimemark,onlinePosted,mttimemark,url,kjqj,wtdw,ETD,ETA:string; //<2F><><EFBFBD><EFBFBD>
|
|
|
aa:DsWebServiceSoap;
|
|
|
p1,p2,_c,_i:Integer;
|
|
|
username,marks:string;
|
|
|
begin
|
|
|
username:=frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
if MessageDlg('<27><><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD> <20>ᵥȷ<E1B5A5><C8B7> <20><><EFBFBD><EFBFBD>',mtWarning,[mbyes,mbno],0)=mryes then
|
|
|
begin
|
|
|
//1 <20><>ѯ<EFBFBD><D1AF><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD>˾ <20>Ƿ<EFBFBD><C7B7>ڱ<EFBFBD>ϵͳ<CFB5>ڴ<EFBFBD><DAB4>ڡ<EFBFBD><DAA1>粻<EFBFBD><E7B2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F2B1A8BE><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>¼<EFBFBD><C2BC><EFBFBD>
|
|
|
|
|
|
//2 <20><>ѯ<EFBFBD><D1AF>bsno<6E><6F>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ǩ<EFBFBD>Ƿ<EFBFBD>
|
|
|
url:= get_WebseviceURL;
|
|
|
aa:=GetDsWebServiceSoap(false,url);
|
|
|
_s:='<?xml version="1.0" encoding="UTF-8" standalone="no"?> ';
|
|
|
_s:=_s+'<BookingInfo xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s:=_s+' <Booking> ';
|
|
|
_s:=_s+' <BSNO>'+MT1.fieldbyname('BSNO').AsString+'</BSNO> ';
|
|
|
_s:=_s+' </Booking> ';
|
|
|
_s:=_s+'</BookingInfo> ';
|
|
|
xml:=aa.GetBsnoInfo(_s);
|
|
|
p1:=frm_data_share.GettimePotion(1,'<Booking>',xml);
|
|
|
p2:=frm_data_share.GettimePotion(1,'</Booking>',xml);
|
|
|
block:=Copy(xml,p1,p2-p1);
|
|
|
onlinetimemark:=frm_data_share.GetXMLValue('TimeMark',block);
|
|
|
onlinePosted:=frm_data_share.GetXMLValue('ISPOSTED',block);
|
|
|
|
|
|
mttimemark:=MT1.fieldbyname('TIMEMARK').AsString;
|
|
|
if (onlinetimemark<>mttimemark) then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD>仯<EFBFBD><E4BBAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD>ѯ<EFBFBD><D1AF>');
|
|
|
end else begin
|
|
|
|
|
|
if (MT1.fieldbyname('ETA').asstring='') then begin
|
|
|
ETA:='null'; end
|
|
|
else begin ETA:=''''+MT1.fieldbyname('ETA').asstring+''''; end;
|
|
|
if (MT1.fieldbyname('ETD').asstring='') then begin
|
|
|
ETD:='null'; end
|
|
|
else begin ETD:=''''+MT1.fieldbyname('ETD').asstring+''''; end;
|
|
|
|
|
|
|
|
|
qryGetOpseae2.Close;
|
|
|
qryGetOpseae2.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>').Value:=MT1.fieldbyname('BSNO').asstring;
|
|
|
qryGetOpseae2.Open;
|
|
|
|
|
|
with Qryinsert do
|
|
|
begin
|
|
|
Close; //function WeekofYear(Date: TDate): integer; //ȡ<>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ڵ<EFBFBD><DAB5>ܴ<EFBFBD>
|
|
|
_id:=qryGetOpseae2.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
_no:=get_no(Date,'SE');
|
|
|
kjqj:=inttostr(WeekofYear(Date));
|
|
|
sql.clear;
|
|
|
SQL.Add(' update t_op_seae set ');
|
|
|
SQL.Add(' <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>=:MBLNO, <20><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>=:SHIPPER,<2C>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>=:CONSIGNEE,֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>=:NOTIFYPARTY,');
|
|
|
SQL.Add(' <20><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>=:PLACEDELIVERY,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:AGENT,װ<><D7B0><EFBFBD><EFBFBD>=:PORTLOAD, ж<><D0B6><EFBFBD><EFBFBD>=:PORTDISCHARGE');
|
|
|
SQL.Add(' ,Ŀ<>ĵ<EFBFBD>=:DESTINATION,<2C><><EFBFBD><EFBFBD>=:VESSEL,<2C><><EFBFBD><EFBFBD>=:VOYNO,<2C><>ͷ=:MARKS,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ=:NOPKGS');
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:DESCRIPTION,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:GROSSWEIGHT,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:MEASUREMENT,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д=:TOTALNO');
|
|
|
SQL.Add(' ,Ԥ<><D4A4><EFBFBD>ص<EFBFBD>=:PREPARDAT,<2C><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>=:PAYABLEAT');
|
|
|
SQL.Add(' ,ǩ<><C7A9><EFBFBD>ص<EFBFBD>=:ISSUEPLACE,ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:ISSUEDATE,<2C>ᵥ<EFBFBD><E1B5A5><EFBFBD><EFBFBD>=:NOBILL');
|
|
|
SQL.Add(' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=:BSNO');
|
|
|
Parameters.ParamByName('BSNO').Value:=MT1.fieldbyname('BSNO').asstring;
|
|
|
Parameters.ParamByName('MBLNO').Value:=MT1.fieldbyname('MBLNO').asstring;
|
|
|
Parameters.ParamByName('SHIPPER').Value:=MT1.fieldbyname('SHIPPER').asstring;
|
|
|
Parameters.ParamByName('CONSIGNEE').Value:=MT1.fieldbyname('CONSIGNEE').asstring;
|
|
|
Parameters.ParamByName('NOTIFYPARTY').Value:=MT1.fieldbyname('NOTIFYPARTY').asstring;
|
|
|
Parameters.ParamByName('PLACEDELIVERY').Value:=MT1.fieldbyname('PLACEDELIVERY').asstring;
|
|
|
Parameters.ParamByName('AGENT').Value:=MT1.fieldbyname('AGENT').asstring;
|
|
|
Parameters.ParamByName('PORTLOAD').Value:=MT1.fieldbyname('PORTLOAD').asstring;
|
|
|
Parameters.ParamByName('PORTDISCHARGE').Value:=MT1.fieldbyname('PORTDISCHARGE').asstring;
|
|
|
Parameters.ParamByName('DESTINATION').Value:=MT1.fieldbyname('DESTINATION').asstring;
|
|
|
Parameters.ParamByName('GROSSWEIGHT').Value:=MT1.fieldbyname('GROSSWEIGHT').asstring;
|
|
|
Parameters.ParamByName('MEASUREMENT').Value:=MT1.fieldbyname('MEASUREMENT').asstring;
|
|
|
Parameters.ParamByName('TOTALNO').Value:=MT1.fieldbyname('TOTALNO').asstring;
|
|
|
Parameters.ParamByName('PREPARDAT').Value:=MT1.fieldbyname('PREPARDAT').asstring;
|
|
|
Parameters.ParamByName('PAYABLEAT').Value:=MT1.fieldbyname('PAYABLEAT').asstring;
|
|
|
Parameters.ParamByName('ISSUEPLACE').Value:=MT1.fieldbyname('ISSUEPLACE').asstring;
|
|
|
Parameters.ParamByName('ISSUEDATE').Value:=MT1.fieldbyname('ISSUEDATE').asstring;
|
|
|
Parameters.ParamByName('NOBILL').Value:=MT1.fieldbyname('NOBILL').asstring;
|
|
|
|
|
|
ExecSQL;
|
|
|
|
|
|
end;
|
|
|
//showmessage(MT1.fieldbyname('Ctninfo').asstring);
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
_c:=frm_data_share.countString('CTNINFO',MT1.fieldbyname('Ctninfo').asstring);
|
|
|
for _i:=1 to _c do begin
|
|
|
with Qryinsert do
|
|
|
begin
|
|
|
p1:=frm_data_share.GettimePotion(_i,'<CTNINFO>',MT1.fieldbyname('Ctninfo').asstring);
|
|
|
p2:=frm_data_share.GettimePotion(_i,'</CTNINFO>',MT1.fieldbyname('Ctninfo').asstring);
|
|
|
block:=Copy(MT1.fieldbyname('Ctninfo').asstring,p1,p2);
|
|
|
sql.clear;
|
|
|
SQL.Add('Insert into t_op_ctn ( <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><>ע,<2C><>װ,<2C>ߴ<EFBFBD>,TEU,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ)');
|
|
|
SQL.Add('values ( :<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><>ע,:<3A><>װ,:<3A>ߴ<EFBFBD>,:TEU,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ)');
|
|
|
//Parameters.ParamByName('CTN_ID').Value:=frm_data_share.GetXMLValue('CTN_ID',block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=_id;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=frm_data_share.GetXMLValue('CTNCODE',block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=frm_data_share.GetXMLValue('CTN',block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=frm_data_share.GetXMLValue('CTNNUM',block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=frm_data_share.GetXMLValue('CNTRNO',block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=frm_data_share.GetXMLValue('SEALNO',block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=frm_data_share.GetXMLValue('PKGS',block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=frm_data_share.GetXMLValue('KGS',block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=frm_data_share.GetXMLValue('CBM',block);
|
|
|
Parameters.ParamByName('<27><>ע').Value:=frm_data_share.GetXMLValue('REMARK',block);
|
|
|
Parameters.ParamByName('<27><>װ').Value:=frm_data_share.GetXMLValue('KINDPKGS',block);
|
|
|
Parameters.ParamByName('<27>ߴ<EFBFBD>').Value:=frm_data_share.GetXMLValue('SIZE',block);
|
|
|
Parameters.ParamByName('TEU').Value:='0';
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').Value:=frm_data_share.GetXMLValue('CTN',block);
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
//<2F><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
_s:='<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s:=_s+'<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s:=_s+' <Head> ';
|
|
|
_s:=_s+' <OPID>'+frm_data_share.t_crm_client_weituo.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring+'</OPID> ';
|
|
|
_s:=_s+' <OPTYPE>2</OPTYPE> ';//1<><31><EFBFBD><EFBFBD> 2<><32><EFBFBD><EFBFBD>
|
|
|
_s:=_s+' <OPTIME>'+datetimetostr(Date)+'</OPTIME> ';
|
|
|
_s:=_s+' <Version>1.0</Version> ';
|
|
|
_s:=_s+' </Head> ';
|
|
|
_s:=_s+'<OpseaeList> ';
|
|
|
_s:=_s+' <Opseae> ';
|
|
|
_s:=_s+' <BSNO>'+MT1.fieldbyname('BSNO').asstring+'</BSNO> ';
|
|
|
_s:=_s+' </Opseae> ';
|
|
|
_s:=_s+'</OpseaeList> ';
|
|
|
_s:=_s+'</BookingCargoSpace> ';
|
|
|
XML:=aa.SetBookingCargoSpaceAudit(_s);
|
|
|
MT1.Delete ;
|
|
|
|
|
|
//<2F><>¼<EFBFBD><C2BC>־
|
|
|
qryGetOpseae.Close;
|
|
|
qryGetOpseae.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=_id;
|
|
|
qryGetOpseae.Open;
|
|
|
Booking_add(qryGetOpseae,_id,MT1.fieldbyname('SENDERNAME').asstring,MT1.fieldbyname('SENDERCOMPANY').asstring,MT1.fieldbyname('BSNO').asstring,'<27><><EFBFBD>ܸ<EFBFBD><DCB8>¶<EFBFBD><C2B6><EFBFBD>');
|
|
|
|
|
|
showmessage('<27><><EFBFBD>ճɹ<D5B3>');
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
function Tfrm_crm_OnLineBillLadingConfirm.UnformatAfrstr(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]);
|
|
|
//Result:=StringReplace(Result,'\n;','#13#10',[rfReplaceAll]);
|
|
|
|
|
|
end;
|
|
|
|
|
|
function Tfrm_crm_OnLineBillLadingConfirm.REHH(str: string): string;
|
|
|
var _r:string;
|
|
|
begin
|
|
|
_r:=StringReplace (str, '\\\\', #13#10, [rfReplaceAll]);
|
|
|
result:=_r;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBillLadingConfirm.bsSkinButton3Click(Sender: TObject);
|
|
|
var _s,url,ETA,ETD,_id:string; aa:DsWebServiceSoap;
|
|
|
begin
|
|
|
{
|
|
|
//20150630 <20><>Ϊ<EFBFBD>뱾<EFBFBD><EBB1BE><EFBFBD><EFBFBD>Ϣ<EFBFBD>Ƚ<EFBFBD>
|
|
|
try
|
|
|
|
|
|
frm_op_seae_assistant_qr:=Tfrm_op_seae_assistant_qr.Create (self);
|
|
|
//frm_op_seae_assistant_qr.MT1:=MT1;
|
|
|
frm_op_seae_assistant_qr.ShowModal;
|
|
|
|
|
|
finally
|
|
|
//showmessage(frm_crm_spxcompany.t_crm_spxcompany.FieldByName('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').AsString);
|
|
|
frm_op_seae_assistant_qr.Free;
|
|
|
end;
|
|
|
}
|
|
|
|
|
|
//20150706 <20><>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD> t_op_seae_assistant_on
|
|
|
qrysearch.close;
|
|
|
qrysearch.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>').Value:=MT1.fieldbyname('BSNO').asstring;
|
|
|
qrysearch.open;
|
|
|
{
|
|
|
if (MT1.fieldbyname('ETA').asstring='') then begin
|
|
|
ETA:='null'; end
|
|
|
else begin ETA:=''''+MT1.fieldbyname('ETA').asstring+''''; end;
|
|
|
if (MT1.fieldbyname('ETD').asstring='') then begin
|
|
|
ETD:='null'; end
|
|
|
else begin ETD:=''''+MT1.fieldbyname('ETD').asstring+''''; end; }
|
|
|
if (qrysearch.RecordCount=0) then
|
|
|
with qryInsert do
|
|
|
begin
|
|
|
SQL.Add(' insert into t_op_seae_assistant_on ( ');
|
|
|
SQL.Add(' <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, <20><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>,<2C>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>,֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>');
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,װ<><D7B0><EFBFBD><EFBFBD>, ж<><D0B6><EFBFBD><EFBFBD>');
|
|
|
SQL.Add(' ,Ŀ<>ĵ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><>ͷ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ');
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д');
|
|
|
SQL.Add(' ,Ԥ<><D4A4><EFBFBD>ص<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>');
|
|
|
SQL.Add(' ,ǩ<><C7A9><EFBFBD>ص<EFBFBD>,ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ᵥ<EFBFBD><E1B5A5><EFBFBD><EFBFBD>');
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)');
|
|
|
SQL.Add(' values (:MBLNO,:SHIPPER,:CONSIGNEE,:NOTIFYPARTY,');
|
|
|
SQL.Add(' :PLACEDELIVERY,:AGENT,:PORTLOAD, :PORTDISCHARGE');
|
|
|
SQL.Add(' ,:DESTINATION,:VESSEL,:VOYNO,:MARKS,:NOPKGS');
|
|
|
SQL.Add(' ,:DESCRIPTION,:GROSSWEIGHT,:MEASUREMENT,:TOTALNO');
|
|
|
SQL.Add(' ,:PREPARDAT,:PAYABLEAT');
|
|
|
SQL.Add(' ,:ISSUEPLACE,:ISSUEDATE,:NOBILL');
|
|
|
SQL.Add(' ,:BSNO,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,:ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)');
|
|
|
Parameters.ParamByName('BSNO').Value:=MT1.fieldbyname('BSNO').asstring; //
|
|
|
Parameters.ParamByName('MBLNO').Value:=MT1.fieldbyname('MBLNO').asstring; //
|
|
|
Parameters.ParamByName('SHIPPER').Value:=MT1.fieldbyname('SHIPPER').asstring; //
|
|
|
Parameters.ParamByName('CONSIGNEE').Value:=MT1.fieldbyname('CONSIGNEE').asstring;
|
|
|
Parameters.ParamByName('NOTIFYPARTY').Value:=MT1.fieldbyname('NOTIFYPARTY').asstring;
|
|
|
Parameters.ParamByName('PLACEDELIVERY').Value:=MT1.fieldbyname('PLACEDELIVERY').asstring;
|
|
|
Parameters.ParamByName('AGENT').Value:=MT1.fieldbyname('AGENT').asstring;
|
|
|
Parameters.ParamByName('PORTLOAD').Value:=MT1.fieldbyname('PORTLOAD').asstring;
|
|
|
Parameters.ParamByName('PORTDISCHARGE').Value:=MT1.fieldbyname('PORTDISCHARGE').asstring;
|
|
|
Parameters.ParamByName('DESTINATION').Value:=MT1.fieldbyname('DESTINATION').asstring;
|
|
|
Parameters.ParamByName('VESSEL').Value:=MT1.fieldbyname('VESSEL').asstring;
|
|
|
Parameters.ParamByName('VOYNO').Value:=MT1.fieldbyname('VOYNO').asstring;
|
|
|
Parameters.ParamByName('MARKS').Value:=MT1.fieldbyname('MARKS').asstring;
|
|
|
Parameters.ParamByName('NOPKGS').Value:=MT1.fieldbyname('NOPKGS').asstring;
|
|
|
Parameters.ParamByName('DESCRIPTION').Value:=MT1.fieldbyname('DESCRIPTION').asstring;
|
|
|
|
|
|
Parameters.ParamByName('GROSSWEIGHT').Value:=MT1.fieldbyname('GROSSWEIGHT').asstring;
|
|
|
Parameters.ParamByName('MEASUREMENT').Value:=MT1.fieldbyname('MEASUREMENT').asstring;
|
|
|
Parameters.ParamByName('TOTALNO').Value:=MT1.fieldbyname('TOTALNO').asstring;
|
|
|
Parameters.ParamByName('PREPARDAT').Value:=MT1.fieldbyname('PREPARDAT').asstring;
|
|
|
Parameters.ParamByName('PAYABLEAT').Value:=MT1.fieldbyname('PAYABLEAT').asstring;
|
|
|
Parameters.ParamByName('ISSUEPLACE').Value:=MT1.fieldbyname('ISSUEPLACE').asstring;
|
|
|
Parameters.ParamByName('ISSUEDATE').Value:=MT1.fieldbyname('ISSUEDATE').asstring;
|
|
|
Parameters.ParamByName('NOBILL').Value:=MT1.fieldbyname('NOBILL').asstring;
|
|
|
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=qrysearch.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=qrysearch.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
Parameters.ParamByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=qrysearch.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
ExecSQL;
|
|
|
end else begin
|
|
|
//qryGetOpseae2.Close;
|
|
|
//qryGetOpseae2.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>').Value:=MT1.fieldbyname('BSNO').asstring;
|
|
|
//qryGetOpseae2.Open;
|
|
|
|
|
|
with Qryinsert do
|
|
|
begin
|
|
|
Close; //function WeekofYear(Date: TDate): integer; //ȡ<>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ڵ<EFBFBD><DAB5>ܴ<EFBFBD>
|
|
|
//_id:=qryGetOpseae2.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
//_no:=get_no(Date,'SE');
|
|
|
//kjqj:=inttostr(WeekofYear(Date));
|
|
|
sql.clear;
|
|
|
SQL.Add(' update t_op_seae_assistant_on set ');
|
|
|
SQL.Add(' <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>=:MBLNO, <20><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>=:SHIPPER,<2C>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>=:CONSIGNEE,֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>=:NOTIFYPARTY,');
|
|
|
SQL.Add(' <20><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>=:PLACEDELIVERY,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:AGENT,װ<><D7B0><EFBFBD><EFBFBD>=:PORTLOAD, ж<><D0B6><EFBFBD><EFBFBD>=:PORTDISCHARGE');
|
|
|
SQL.Add(' ,Ŀ<>ĵ<EFBFBD>=:DESTINATION,<2C><><EFBFBD><EFBFBD>=:VESSEL,<2C><><EFBFBD><EFBFBD>=:VOYNO,<2C><>ͷ=:MARKS,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ=:NOPKGS');
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:DESCRIPTION,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:GROSSWEIGHT,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:MEASUREMENT,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д=:TOTALNO');
|
|
|
SQL.Add(' ,Ԥ<><D4A4><EFBFBD>ص<EFBFBD>=:PREPARDAT,<2C><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>=:PAYABLEAT');
|
|
|
SQL.Add(' ,ǩ<><C7A9><EFBFBD>ص<EFBFBD>=:ISSUEPLACE,ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:ISSUEDATE,<2C>ᵥ<EFBFBD><E1B5A5><EFBFBD><EFBFBD>=:NOBILL');
|
|
|
SQL.Add(' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=:BSNO');
|
|
|
Parameters.ParamByName('BSNO').Value:=MT1.fieldbyname('BSNO').asstring;
|
|
|
Parameters.ParamByName('MBLNO').Value:=MT1.fieldbyname('MBLNO').asstring;
|
|
|
Parameters.ParamByName('SHIPPER').Value:=MT1.fieldbyname('SHIPPER').asstring;
|
|
|
Parameters.ParamByName('CONSIGNEE').Value:=MT1.fieldbyname('CONSIGNEE').asstring;
|
|
|
Parameters.ParamByName('NOTIFYPARTY').Value:=MT1.fieldbyname('NOTIFYPARTY').asstring;
|
|
|
Parameters.ParamByName('PLACEDELIVERY').Value:=MT1.fieldbyname('PLACEDELIVERY').asstring;
|
|
|
Parameters.ParamByName('AGENT').Value:=MT1.fieldbyname('AGENT').asstring;
|
|
|
Parameters.ParamByName('PORTLOAD').Value:=MT1.fieldbyname('PORTLOAD').asstring;
|
|
|
Parameters.ParamByName('PORTDISCHARGE').Value:=MT1.fieldbyname('PORTDISCHARGE').asstring;
|
|
|
Parameters.ParamByName('DESTINATION').Value:=MT1.fieldbyname('DESTINATION').asstring;
|
|
|
Parameters.ParamByName('VESSEL').Value:=MT1.fieldbyname('VESSEL').asstring;
|
|
|
Parameters.ParamByName('VOYNO').Value:=MT1.fieldbyname('VOYNO').asstring;
|
|
|
Parameters.ParamByName('MARKS').Value:=MT1.fieldbyname('MARKS').asstring;
|
|
|
Parameters.ParamByName('NOPKGS').Value:=MT1.fieldbyname('NOPKGS').asstring;
|
|
|
Parameters.ParamByName('DESCRIPTION').Value:=MT1.fieldbyname('DESCRIPTION').asstring;
|
|
|
Parameters.ParamByName('GROSSWEIGHT').Value:=MT1.fieldbyname('GROSSWEIGHT').asstring;
|
|
|
Parameters.ParamByName('MEASUREMENT').Value:=MT1.fieldbyname('MEASUREMENT').asstring;
|
|
|
Parameters.ParamByName('TOTALNO').Value:=MT1.fieldbyname('TOTALNO').asstring;
|
|
|
Parameters.ParamByName('PREPARDAT').Value:=MT1.fieldbyname('PREPARDAT').asstring;
|
|
|
Parameters.ParamByName('PAYABLEAT').Value:=MT1.fieldbyname('PAYABLEAT').asstring;
|
|
|
Parameters.ParamByName('ISSUEPLACE').Value:=MT1.fieldbyname('ISSUEPLACE').asstring;
|
|
|
Parameters.ParamByName('ISSUEDATE').Value:=MT1.fieldbyname('ISSUEDATE').asstring;
|
|
|
Parameters.ParamByName('NOBILL').Value:=MT1.fieldbyname('NOBILL').asstring;
|
|
|
|
|
|
ExecSQL;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
//<2F><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBillLadingConfirm.dxdbgrd1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
//SaveBooking;
|
|
|
bsSkinButton3Click(self);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBillLadingConfirm.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
{try
|
|
|
frm_SelectLinkMan:=Tfrm_SelectLinkMan.Create (self);
|
|
|
frm_SelectLinkMan.ShowModal;
|
|
|
finally
|
|
|
frm_SelectLinkMan.Free;
|
|
|
end;}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBillLadingConfirm.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
GetXML;
|
|
|
FormShow(Sender);
|
|
|
end;
|
|
|
|
|
|
end.
|