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.

2371 lines
86 KiB
Plaintext

11 months ago
unit u_op_seae_vgm_data;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, DB, ADODB, bsSkinCtrls, cxTreeView, cxControls,
cxContainer, cxCheckListBox, cxDBCheckListBox, bsSkinBoxCtrls, Grids,
Wwdbigrd, Wwdbgrid, ExtCtrls, DBCtrls, bsdbctrls, RxLookup, ComCtrls,
bsSkinTabs, StdCtrls, wwdblook, Mask, wwdbedit, Wwdotdot, Wwdbcomb,
wwdbdatetimepicker, dxDBTLCl, dxGrClms, dxDBCtrl, dxDBGrid, dxTL,
dxCntner, dxGrClEx, dxLayout, wwcheckbox, xmldom, XMLIntf, msxmldom,
XMLDoc, dxEditor, dxExGrEd, dxExELib;
type
// head
NBEDIhead =
record
sndcom:string; // <20><> <20><><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD>˾
sender:string; // <20><> <20><><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD>
fromop:string; // <20><> <20><><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>
fromtele:string; // <20><> <20><><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ϵ<EFBFBD>
fromfax:string; // <20><> <20><><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>
frommail:string; // <20><> <20><><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ϵ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>ַ
fromopc:string; // <20><> <20><><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>ϵ<EFBFBD>ֻ<EFBFBD>
fromope:string; // <20><> <20><><EFBFBD><EFBFBD>Աȫ<D4B1><C8AB>
accom:string; // <20><> <20><><EFBFBD>շ<EFBFBD><D5B7><EFBFBD>˾
accepter:string; // <20><> <20><><EFBFBD>շ<EFBFBD><D5B7><EFBFBD><EFBFBD><EFBFBD>
toop:string; // <20><> <20><><EFBFBD>շ<EFBFBD> <20><><EFBFBD><EFBFBD>Ա
sendtime:TDateTime; // <20><> <20><><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>ʱ<EFBFBD><CAB1>
editype:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(VGM:VERMAS ; <20><>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>:IFTMBF ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E4B6A9>:SHPORD ; <20><>˾<EFBFBD>ᵥ:SHPMIN)
EdiID:string; // <20><> <20><><EFBFBD>IJο<C4B2><CEBF><EFBFBD>
EdiName:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
EdiMode:string; // <20><> <20><><EFBFBD>ĸ<EFBFBD>ʽ := 'HYXML';
EdiReceiver:string; // <20><> <20><><EFBFBD>շ<EFBFBD>EDI<44><49><EFBFBD><EFBFBD>
EdiSender:string; // <20><> <20><><EFBFBD>շ<EFBFBD>EDI<44><49><EFBFBD><EFBFBD>
end;
//Forward
NBEDIForward =
record
EdiForwardFMT:string; // <20><> EDI<44>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD> <20><>ʽҪ<CABD><D2AA><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>ʽ
EdiForwardType:string; // <20><> EDI<44>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD> ת<><D7AA><EFBFBD><EFBFBD>ʽ
EdiForwardURL:string; // <20><> EDI<44>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD> ת<><D7AA><EFBFBD><EFBFBD>ַ
EdiForwardId:string; // <20><> EDI<44>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD> ת<><D7AA><EFBFBD>˺<EFBFBD>
EdiForwardPass:string; // <20><> EDI<44>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD> ת<><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
EdiForwardREFE1:string; // <20><> EDI<44>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD> ͨ<>ò<EFBFBD><C3B2><EFBFBD>1
EdiForwardREFE2:string; // <20><> EDI<44>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD> ͨ<>ò<EFBFBD><C3B2><EFBFBD>2
EdiForwardREFE3:string; // <20><> EDI<44>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD> ͨ<>ò<EFBFBD><C3B2><EFBFBD>3 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
EdiForwardREFE4:string; // <20><> EDI<44>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD> ͨ<>ò<EFBFBD><C3B2><EFBFBD>4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
EdiForwardREFE5:string; // <20><> EDI<44>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD> ͨ<>ò<EFBFBD><C3B2><EFBFBD>5 <20><><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>(9<><39><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 5<><35><EFBFBD>޸<EFBFBD> 1<><31>ȡ<EFBFBD><C8A1>)
end;
//reference
NBEDIreference =
record
blfreight:string; // <20><> <20><><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>(9<><39><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 5<><35><EFBFBD>޸<EFBFBD> 1<><31>ȡ<EFBFBD><C8A1>)
refid:string; // <20><> <20>ͻ<EFBFBD><CDBB><EFBFBD>ϵͳ<CFB5>е<EFBFBD>ID
freid:string; // <20><> <20><><EFBFBD><EFBFBD>ϵͳ<CFB5>е<EFBFBD>ID
referenceno:string; // <20><> <20><><EFBFBD>˱<EFBFBD><CBB1><EFBFBD>
bookingno:string; // <20><> <20><><EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>
workno:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
sale:string; // <20><> <20><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>Ա
billofladingno:string; // <20><> <20><EFBFBD><E1B5A5>
end;
//baseinfo
NBEDIbaseinfo =
record
orderman:string; // <20><> <20><><EFBFBD>յ<EFBFBD>λ
source:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
usdaccountshipper:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>Բ)
customshipper:string; // <20><> <20><><EFBFBD>ػ<EFBFBD><D8BB><EFBFBD>
rmbaccountshipper:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
paymenttermcode:string; // <20><> <20><><EFBFBD>ʽ<EEB7BD><CABD><EFBFBD><EFBFBD>(P/C/E) Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
paymentterm:string; // <20><> <20><><EFBFBD>ʽ
payableat:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD>ص<EFBFBD>
shippingitem:string; // <20><> <20>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD>
billofladingtype:string; // <20><> <20><EFBFBD><E1B5A5><EFBFBD><EFBFBD>
shipper:string; // <20><> <20><EFBFBD><E1B5A5><EFBFBD><EFBFBD> <20><>99<39><39>ѭ<EFBFBD><D1AD> <20><><EFBFBD>г<EFBFBD><D0B3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>У<EFBFBD>ע<EFBFBD><EFBFBD>շ<EFBFBD>ͨÿ<CDA8><C3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
consignee:string; // <20><> <20>ջ<EFBFBD><D5BB><EFBFBD> <20><>99<39><39>ѭ<EFBFBD><D1AD> <20><><EFBFBD>г<EFBFBD><D0B3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>У<EFBFBD>ע<EFBFBD><EFBFBD>շ<EFBFBD>ͨÿ<CDA8><C3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
notifyparty:string; // <20><> ֪ͨ<CDA8><D6AA> <20><>99<39><39>ѭ<EFBFBD><D1AD> <20><><EFBFBD>г<EFBFBD><D0B3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>У<EFBFBD>ע<EFBFBD><EFBFBD>շ<EFBFBD>ͨÿ<CDA8><C3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
notifyparty2:string; // <20><> <20>ڶ<EFBFBD>֪ͨ<CDA8><D6AA> <20><>99<39><39>ѭ<EFBFBD><D1AD> <20><><EFBFBD>г<EFBFBD><D0B3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>У<EFBFBD>ע<EFBFBD><EFBFBD>շ<EFBFBD>ͨÿ<CDA8><C3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
ordermemo:string; // <20><> <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>
numberoforiginals:string; // <20><> <20><EFBFBD><E1B5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
numberofcopys:string; // <20><> <20><EFBFBD><E1B5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
placeofissuecode:string; // <20><> ǩ<><C7A9><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>
placeofissue:string; // <20><> ǩ<><C7A9><EFBFBD><EFBFBD>
timeofissue:string; // <20><> ǩ<><C7A9>ʱ<EFBFBD><CAB1>
end;
//cargo
NBEDIcargo =
record
APPLICANT:string; // <20><> ѯ<>۵<EFBFBD>λ
BOKKINGPARTY:string; // <20><> ǩЭ<C7A9><D0AD><EFBFBD>ĵ<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
FOBPARTY:string; // <20><> <20><><EFBFBD><EFBFBD>յ<EFBFBD>λ
SCNO:string; // <20><> <20><><EFBFBD>߷<EFBFBD><DFB7><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC>
QUARANTINECODING:string; // <20><> <20><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>
SCACCODE:string; // <20><> <20><><EFBFBD>߷<EFBFBD><DFB7><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC>
QUOTATIONNO:string; // <20><> <20>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>
CHARGETYPE:string; // <20><> <20><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>
NVOCCHBLNO:string; // <20><> NVOCC<43><43>
realshipper:string; // <20><> <20><>ʵ<EFBFBD><EFBFBD><E1B5A5><EFBFBD><EFBFBD> <20><>99<39><39>ѭ<EFBFBD><D1AD>
realconsignee:string; // <20><> <20><>ʵ<EFBFBD>ջ<EFBFBD><D5BB><EFBFBD> <20><>99<39><39>ѭ<EFBFBD><D1AD>
realnotifyparty:string; // <20><> <20><>ʵ֪ͨ<CDA8><D6AA> <20><>99<39><39>ѭ<EFBFBD><D1AD>
realnotifyparty2:string; // <20><> <20><>ʵ<EFBFBD>ڶ<EFBFBD>֪ͨ<CDA8><D6AA> <20><>99<39><39>ѭ<EFBFBD><D1AD>
end;
//booking
NBEDIbooking =
record
shipmentdate:string; // <20><> װ<><D7B0>
expirydate:string; // <20><> Ч<><D0A7>
tranship:string; // <20><> ת<><D7AA><EFBFBD><EFBFBD>ʶ
batch:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ
quotationno:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC>
end;
//freight
NBEDIfreight =
record
fl:string; // <20><> <20><><EFBFBD><EFBFBD>ƴ<EFBFBD><C6B4><EFBFBD><EFBFBD>׼(F/L)
masterlclno:string; // <20><> <20><>Ʊ<EFBFBD><EFBFBD><E1B5A5>
requestdate:string; // <20><> Ҫ<><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
lastdate:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
arrivedate:string; // <20><> Ҫ<>󵽴<EFBFBD><F3B5BDB4><EFBFBD><EFBFBD><EFBFBD>
end;
//port
ediport =
record
placeofreceipt:string; // <20><> <20>ջ<EFBFBD><D5BB>ص<EFBFBD>
portofloading:string; // <20><> װ<><D7B0><EFBFBD><EFBFBD>
portoftranship:string; // <20><> <20><>ת<EFBFBD><D7AA>
portofdischarge:string; // <20><> ж<><D0B6><EFBFBD><EFBFBD>
placeofdelivery:string; // <20><> Ŀ<>ĸ<EFBFBD>
finaldestination:string; // <20><> <20><><EFBFBD><EFBFBD>Ŀ<EFBFBD>ĵ<EFBFBD>
co_placeofreceipt:string; // <20><> <20>ջ<EFBFBD><D5BB>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
co_portofloading:string; // <20><> װ<><D7B0><EFBFBD>۴<EFBFBD><DBB4><EFBFBD>
co_portoftranship:string; // <20><> <20><>ת<EFBFBD>۴<EFBFBD><DBB4><EFBFBD>
co_portofdischarge:string; // <20><> ж<><D0B6><EFBFBD>۴<EFBFBD><DBB4><EFBFBD>
co_placeofdelivery:string; // <20><> Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>
co_finaldestination:string; // <20><> <20><><EFBFBD><EFBFBD>Ŀ<EFBFBD>ĵش<C4B5><D8B4><EFBFBD>
end;
//vessel
edivessel =
record
carrier:string; // <20><> <20><><EFBFBD><EFBFBD>˾
oceanvessel:string; // <20><> <20><><EFBFBD><EFBFBD>
voyno:string; // <20><> <20><><EFBFBD><EFBFBD>
etd:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
deliverymode:string; // <20><> <20><><EFBFBD>ʽ
end;
//info2nd
ediinfo2nd =
record
carrier:string; // <20><> <20><><EFBFBD>̴<EFBFBD><CCB4><EFBFBD>˾
oceanvessel:string; // <20><> <20><><EFBFBD>̴<EFBFBD><CCB4><EFBFBD>
voyno:string; // <20><> <20><><EFBFBD>̺<EFBFBD><CCBA><EFBFBD>
etd:string; // <20><> <20><><EFBFBD>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
deliverymode:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
remarks:string; // <20><> <20><><EFBFBD>̱<EFBFBD>ע <20><>99<39><39>ѭ<EFBFBD><D1AD>
end;
//containers
edicontainers =
record
containertype:string; // <20><> <20><><EFBFBD><EFBFBD>
containerno:string; // <20><> <20><><EFBFBD><EFBFBD>
sealno:string; // <20><> <20><><EFBFBD><EFBFBD>
containernoofpkgs:string; // <20><> <20><><EFBFBD><EFBFBD>
containergrossweight:string; // <20><> ë<><C3AB>
containercbm:string; // <20><> <20><><EFBFBD><EFBFBD>
containerpackagingcode:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>
containerpackaging:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>
containerdescription:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
containermarksandnumbers:string; // <20><> <20><><EFBFBD><EFBFBD>ͷ
vgmgrossmassweight:string; // <20><> VGM<47><4D><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
vgmweighingmethod:string; // <20><> VGM<47><4D><EFBFBD>ط<EFBFBD>ʽ
vgmweighingtime:string; // <20><> VGM<47><4D><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
vgmresponsibleparty:string; // <20><> VGM<47><4D>ϵ<EFBFBD><CFB5>λ
vgmauthorizedperson:string; // <20><> VGM<47><4D>Ȩ<EFBFBD><C8A8>ϵ<EFBFBD><CFB5>
vgmauthorizedpersontele:string; // <20><> VGM<47><4D>Ȩ<EFBFBD><C8A8>ϵ<EFBFBD>˵绰
vgmauthorizedpersonmail:string; // <20><> VGM<47><4D>Ȩ<EFBFBD><C8A8>ϵ<EFBFBD><CFB5><EFBFBD>ʼ<EFBFBD>
vgmremark:string; // <20><> VGM<47><4D><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>
end;
//goods
NBEDIgoods =
record
marksandnumbers:string; // <20><> <20><>ͷ <20><>99<39><39>ѭ<EFBFBD><D1AD>
noofpkgs:string; // <20><> <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>
packagingcode:string; // <20><> <20><>װ<EFBFBD><D7B0><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>
packaging:string; // <20><> <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>
cargoid:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(GC/RF/DR)
hscode:string; // <20><> <20><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD>
description:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>Ļ<EFBFBD><C4BB><EFBFBD>) <20><>99<39><39>ѭ<EFBFBD><D1AD>
cdescription:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>) <20><>99<39><39>ѭ<EFBFBD><D1AD>
grossweight:string; // <20><> ë<><C3AB>
cbm:string; // <20><> <20><><EFBFBD><EFBFBD>
specialgoods:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5> <20><>99<39><39>ѭ<EFBFBD><D1AD>
end;
//dr
NBEDIdr =
record
ediCLASS:string; // <20><> CLASS Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
PAGE:string; // <20><> Σ<><CEA3>Ʒҳ<C6B7><D2B3>
UNDGNO:string; // <20><> <20><><EFBFBD>Ϲ<EFBFBD>Σ<EFBFBD><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
TECNAME:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PACKGROUP:string; // <20><> <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>
ediLABEL:string; // <20><> LABEL Σ<><CEA3>Ʒ<EFBFBD><C6B7>ǩ <20><>99<39><39>ѭ<EFBFBD><D1AD>
FLASHPOINT:string; // <20><> Σ<>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
FLASHUNIT:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD>¶ȼ<C2B6><C8BC><EFBFBD><EFBFBD><EFBFBD>λ C=<3D><><EFBFBD><EFBFBD> F=<3D><><EFBFBD><EFBFBD>
EMSNO:string; // <20><> Ӧ<><D3A6><EFBFBD><EFBFBD>ʩ<EFBFBD><CAA9>
MFAGNO:string; // <20><> ҽ<>Ƽ<EFBFBD><C6BC>ȴ<EFBFBD>ʩָ<CAA9>Ϻ<EFBFBD>
MPT:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱦ Y/N
Elinkman:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5> EMS CONTACTӦ<54><D3A6><EFBFBD><EFBFBD>ϵ
DANGEROUS:string; // <20><> Σ<><CEA3>Ʒ<EFBFBD><C6B7>Ϣ
TEMPERATURE:string; // <20><> <20><><EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>
TEMPERATUREUNIT:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD>¶ȼ<C2B6><C8BC><EFBFBD><EFBFBD><EFBFBD>λ C=<3D><><EFBFBD><EFBFBD> F=<3D><><EFBFBD><EFBFBD>
MINTEMPERATURE:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
MAXTEMPERATURE:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ALLCOLDTORAGE:string; // <20><> ȫ<><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Y/N
VENTI:string; // <20><> ͨ<><CDA8><EFBFBD><EFBFBD>
REEFER:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ <20><>99<39><39>ѭ<EFBFBD><D1AD>
end;
//loadplan
NBEDIloadplan =
record
entryno:string; // <20><> <20><><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD>
warehouse:string; // <20><> <20>ֿ<EFBFBD>
landcarrier:string; // <20><> <20><><EFBFBD><EFBFBD>
stuffdate:TDateTime; // <20><> װ<><D7B0>ʱ<EFBFBD><CAB1>
stuffmode:string; // <20><> װ<>ʽ
stuffaddress:string; // <20><> װ<><D7B0><EFBFBD>ص<EFBFBD>
stuffmemo:string; // <20><> װ<>䱸ע
end;
//goodsdetail VGMû<4D><C3BB> <20><>˾<EFBFBD><CBBE><EFBFBD>ա<EFBFBD><D5A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ա<EFBFBD><D5A1><EFBFBD>˾<EFBFBD><EFBFBD><E1B5A5>
NBEDIgoodsdetail =
record
cargosequenceno:string; // <20><> <20>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
marksandnumbers:string; // <20><> <20><>ͷ <20><>99<39><39>ѭ<EFBFBD><D1AD>
noofpkgs:string; // <20><> <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>
packagingcode:string; // <20><> <20><>װ<EFBFBD><D7B0><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>
packaging:string; // <20><> <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>
cargoid:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(GC/RF/DR)
hscode:string; // <20><> <20><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD>
description:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>Ļ<EFBFBD><C4BB><EFBFBD>) <20><>99<39><39>ѭ<EFBFBD><D1AD>
cdescription:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>) <20><>99<39><39>ѭ<EFBFBD><D1AD>
grossweight:string; // <20><> ë<><C3AB>
cbm:string; // <20><> <20><><EFBFBD><EFBFBD>
specialgoods:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5> <20><>99<39><39>ѭ<EFBFBD><D1AD>
end;
//goodsdetail_dr VGMû<4D><C3BB> <20><>˾<EFBFBD><CBBE><EFBFBD>ա<EFBFBD><D5A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ա<EFBFBD><D5A1><EFBFBD>˾<EFBFBD><EFBFBD><E1B5A5>
NBEDIgoodsdetail_dr =
record
ediCLASS:string; // <20><> CLASS Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
PAGE:string; // <20><> Σ<><CEA3>Ʒҳ<C6B7><D2B3>
UNDGNO:string; // <20><> <20><><EFBFBD>Ϲ<EFBFBD>Σ<EFBFBD><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
TECNAME:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PACKGROU:string; // <20><> <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>
ediLABEL:string; // <20><> LABEL Σ<><CEA3>Ʒ<EFBFBD><C6B7>ǩ <20><>99<39><39>ѭ<EFBFBD><D1AD>
FLASHPOINT:string; // <20><> Σ<>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
FLASHUNIT:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD>¶ȼ<C2B6><C8BC><EFBFBD><EFBFBD><EFBFBD>λ C=<3D><><EFBFBD><EFBFBD> F=<3D><><EFBFBD><EFBFBD>
EMSNO:string; // <20><> Ӧ<><D3A6><EFBFBD><EFBFBD>ʩ<EFBFBD><CAA9>
MFAGNO:string; // <20><> ҽ<>Ƽ<EFBFBD><C6BC>ȴ<EFBFBD>ʩָ<CAA9>Ϻ<EFBFBD>
MPT:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱦ Y/N
Elinkman:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5> EMS CONTACTӦ<54><D3A6><EFBFBD><EFBFBD>ϵ
DANGEROUS:string; // <20><> Σ<><CEA3>Ʒ<EFBFBD><C6B7>Ϣ
TEMPERATURE:string; // <20><> <20><><EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>
TEMPERATUREUNIT:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD>¶ȼ<C2B6><C8BC><EFBFBD><EFBFBD><EFBFBD>λ C=<3D><><EFBFBD><EFBFBD> F=<3D><><EFBFBD><EFBFBD>
MINTEMPERATURE:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
MAXTEMPERATURE:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ALLCOLDTORAGE:string; // <20><> ȫ<><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Y/N
VENTI:string; // <20><> ͨ<><CDA8><EFBFBD><EFBFBD>
REEFER:string; // <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ <20><>99<39><39>ѭ<EFBFBD><D1AD>
end;
//goodsdetail_containers ֻ<>д<EFBFBD>˾<EFBFBD><EFBFBD><E1B5A5>
NBEDIgoodsdetail_containers =
record
containertype:string; // <20><> <20><><EFBFBD><EFBFBD>
containerno:string; // <20><>
sealno:string; // <20><>
containernoofpkgs:string; // <20><>
containergrossweight:string; // <20><>
containercbm:string; // <20><>
end;
var
MyContainers : array [0..99] of edicontainers;
MyNBEDIgoodsdetail : array [0..99] of NBEDIgoodsdetail;
MyNBEDIgoodsdetail_containers : array [0..99] of array [0..99] of NBEDIgoodsdetail_containers;
goods_ctn_count: array [0..99] of integer;
type
Tfrm_op_seae_vgm_data = class(TForm)
Notebook1: TNotebook;
t_op_ctn_vgm: TADOQuery;
Panel2: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinPanel1: TbsSkinPanel;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
DBEdit7: TDBEdit;
DBEdit8: TDBEdit;
DBEdit9: TDBEdit;
DBEdit10: TDBEdit;
DBEdit11: TDBEdit;
wwDBDateTimePicker1: TwwDBDateTimePicker;
bsSkinLabel1: TbsSkinLabel;
bsSkinLabel2: TbsSkinLabel;
bsSkinLabel3: TbsSkinLabel;
bsSkinLabel4: TbsSkinLabel;
bsSkinLabel5: TbsSkinLabel;
bsSkinLabel6: TbsSkinLabel;
bsSkinLabel7: TbsSkinLabel;
bsSkinLabel8: TbsSkinLabel;
bsSkinLabel9: TbsSkinLabel;
bsSkinLabel10: TbsSkinLabel;
bsSkinLabel11: TbsSkinLabel;
bsSkinLabel12: TbsSkinLabel;
bsSkinPanel2: TbsSkinPanel;
bsSkinGroupBox1: TbsSkinGroupBox;
bsSkinGroupBox2: TbsSkinGroupBox;
bsSkinGroupBox3: TbsSkinGroupBox;
bsSkinPanel3: TbsSkinPanel;
bsSkinLabel19: TbsSkinLabel;
DBMemo1: TDBMemo;
bsSkinPanel4: TbsSkinPanel;
bsSkinLabel20: TbsSkinLabel;
bsSkinLabel21: TbsSkinLabel;
DBEdit18: TDBEdit;
DBEdit19: TDBEdit;
bsSkinLabel22: TbsSkinLabel;
DBEdit20: TDBEdit;
DBEdit21: TDBEdit;
bsSkinLabel23: TbsSkinLabel;
DBEdit22: TDBEdit;
wwDBDateTimePicker2: TwwDBDateTimePicker;
bsSkinLabel24: TbsSkinLabel;
DBEdit23: TDBEdit;
DBEdit24: TDBEdit;
DBEdit25: TDBEdit;
bsSkinLabel25: TbsSkinLabel;
DBEdit26: TDBEdit;
DBEdit27: TDBEdit;
bsSkinLabel26: TbsSkinLabel;
DBEdit28: TDBEdit;
DBEdit29: TDBEdit;
bsSkinLabel27: TbsSkinLabel;
DBEdit30: TDBEdit;
bsSkinPanel5: TbsSkinPanel;
bsSkinGroupBox4: TbsSkinGroupBox;
DBMemo2: TDBMemo;
bsSkinGroupBox5: TbsSkinGroupBox;
DBMemo3: TDBMemo;
bsSkinPanel6: TbsSkinPanel;
bsSkinLabel28: TbsSkinLabel;
bsSkinLabel29: TbsSkinLabel;
bsSkinLabel30: TbsSkinLabel;
DBEdit31: TDBEdit;
DBEdit32: TDBEdit;
wwDBDateTimePicker3: TwwDBDateTimePicker;
bsSkinLabel31: TbsSkinLabel;
bsSkinLabel32: TbsSkinLabel;
DBEdit33: TDBEdit;
DBEdit34: TDBEdit;
bsSkinLabel33: TbsSkinLabel;
DBEdit35: TDBEdit;
bsSkinLabel34: TbsSkinLabel;
bsSkinPanel7: TbsSkinPanel;
bsSkinButton12: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
bsSkinButton14: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinPanel8: TbsSkinPanel;
dxDBGrid1: TdxDBGrid;
ds_op_ctn_vgm: TDataSource;
dxDBGrid1ctn_id: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1TEU: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridCurrencyColumn;
dxDBGrid1Column14: TdxDBGridCurrencyColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridMaskColumn;
dxDBGrid1PO: TdxDBGridMaskColumn;
dxDBGrid1SKU: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridMaskColumn;
dxDBGrid1UN: TdxDBGridMaskColumn;
dxDBGrid1HTS: TdxDBGridMaskColumn;
dxDBGrid1Column22: TdxDBGridMaskColumn;
dxDBGrid1Column23: TdxDBGridCurrencyColumn;
dxDBGrid1Column24: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridMaskColumn;
dxDBGrid1Column26: TdxDBGridMaskColumn;
dxDBGrid1Column27: TdxDBGridCurrencyColumn;
dxDBGrid1VGM: TdxDBGridCurrencyColumn;
dxDBGrid1Column29: TdxDBGridMaskColumn;
dxDBGrid1Column30: TdxDBGridDateColumn;
dxDBGrid1Column31: TdxDBGridMaskColumn;
dxDBGrid1Column32: TdxDBGridMaskColumn;
dxDBGrid1Column33: TdxDBGridMaskColumn;
ds_code_ctn: TDataSource;
t_code_ctn: TADOQuery;
dxDBGridLayoutList1: TdxDBGridLayoutList;
dxDBGridLayoutList1Item1: TdxDBGridLayout;
dxDBGrid1Column3: TdxDBGridExtLookupColumn;
bsSkinPanel9: TbsSkinPanel;
bsSkinButton16: TbsSkinButton;
bsSkinButton17: TbsSkinButton;
bsSkinButton18: TbsSkinButton;
bsSkinButton19: TbsSkinButton;
bsSkinButton20: TbsSkinButton;
bsSkinPanel10: TbsSkinPanel;
bsSkinLabel35: TbsSkinLabel;
bsSkinLabel36: TbsSkinLabel;
bsSkinLabel37: TbsSkinLabel;
wwDBDateTimePicker4: TwwDBDateTimePicker;
bsSkinLabel38: TbsSkinLabel;
bsSkinLabel39: TbsSkinLabel;
bsSkinLabel40: TbsSkinLabel;
bsSkinLabel42: TbsSkinLabel;
wwDBDateTimePicker5: TwwDBDateTimePicker;
bsSkinLabel43: TbsSkinLabel;
wwDBDateTimePicker6: TwwDBDateTimePicker;
bsSkinLabel44: TbsSkinLabel;
wwDBDateTimePicker7: TwwDBDateTimePicker;
bsSkinLabel45: TbsSkinLabel;
bsSkinLabel46: TbsSkinLabel;
wwDBComboBox3: TwwDBComboBox;
bsSkinPanel11: TbsSkinPanel;
dxDBGrid2: TdxDBGrid;
bsSkinButton21: TbsSkinButton;
bsSkinButton22: TbsSkinButton;
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
t_op_seae_vgm: TADOQuery;
ds_op_seae_vgm: TDataSource;
dxDBGrid2Column1: TdxDBGridMaskColumn;
dxDBGrid2Column2: TdxDBGridMaskColumn;
dxDBGrid2Column3: TdxDBGridMaskColumn;
dxDBGrid2Column4: TdxDBGridMaskColumn;
dxDBGrid2Column5: TdxDBGridMaskColumn;
dxDBGrid2Column6: TdxDBGridMaskColumn;
dxDBGrid2Column7: TdxDBGridMaskColumn;
dxDBGrid2Column8: TdxDBGridMaskColumn;
dxDBGrid2Column9: TdxDBGridMaskColumn;
dxDBGrid2Column10: TdxDBGridMaskColumn;
dxDBGrid2Column11: TdxDBGridMaskColumn;
dxDBGrid2Column12: TdxDBGridMaskColumn;
dxDBGrid2Column13: TdxDBGridDateColumn;
dxDBGrid2Column14: TdxDBGridMaskColumn;
dxDBGrid2Column15: TdxDBGridMaskColumn;
dxDBGrid2Column16: TdxDBGridMaskColumn;
dxDBGrid2Column17: TdxDBGridMaskColumn;
dxDBGrid2Column18: TdxDBGridMaskColumn;
dxDBGrid2Column19: TdxDBGridMaskColumn;
dxDBGrid2Column20: TdxDBGridMaskColumn;
dxDBGrid2Column21: TdxDBGridMaskColumn;
dxDBGrid2Column22: TdxDBGridMaskColumn;
dxDBGrid2Column23: TdxDBGridMaskColumn;
dxDBGrid2Column24: TdxDBGridMaskColumn;
dxDBGrid2Column25: TdxDBGridMaskColumn;
dxDBGrid2Column26: TdxDBGridMaskColumn;
dxDBGrid2Column27: TdxDBGridMaskColumn;
dxDBGrid2Column28: TdxDBGridMaskColumn;
dxDBGrid2Column29: TdxDBGridMaskColumn;
dxDBGrid2Column30: TdxDBGridMaskColumn;
dxDBGrid2Column31: TdxDBGridMaskColumn;
dxDBGrid2Column32: TdxDBGridDateColumn;
dxDBGrid2Column33: TdxDBGridMaskColumn;
dxDBGrid2Column34: TdxDBGridMaskColumn;
dxDBGrid2Column35: TdxDBGridMaskColumn;
dxDBGrid2Column36: TdxDBGridMaskColumn;
dxDBGrid2Column37: TdxDBGridMaskColumn;
dxDBGrid2Column38: TdxDBGridMaskColumn;
dxDBGrid2Column39: TdxDBGridMaskColumn;
dxDBGrid2Column40: TdxDBGridMaskColumn;
dxDBGrid2Column41: TdxDBGridDateColumn;
dxDBGrid2Column42: TdxDBGridMaskColumn;
dxDBGrid2Column43: TdxDBGridCurrencyColumn;
dxDBGrid2Column44: TdxDBGridColumn;
t_code_package: TADOQuery;
ds_code_package: TDataSource;
dxDBGridLayoutList1Item2: TdxDBGridLayout;
dxDBGrid1Column12: TdxDBGridExtLookupColumn;
XMLDocument1: TXMLDocument;
SaveDialog1: TSaveDialog;
DBMemo4: TDBMemo;
DBMemo5: TDBMemo;
DBMemo6: TDBMemo;
bsSkinLabel14: TbsSkinLabel;
bsSkinLabel15: TbsSkinLabel;
DBEdit13: TDBEdit;
DBEdit14: TDBEdit;
bsSkinLabel16: TbsSkinLabel;
bsSkinLabel17: TbsSkinLabel;
bsSkinLabel18: TbsSkinLabel;
DBEdit15: TDBEdit;
DBEdit16: TDBEdit;
DBEdit17: TDBEdit;
DBComboBox3: TDBComboBox;
OpenDialog1: TOpenDialog;
DBComboBox4: TDBComboBox;
DBEdit5: TDBEdit;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
wwDBComboBox1: TwwDBComboBox;
Edit5: TEdit;
dxDBGrid2Column45: TdxDBGridColumn;
bsSkinLabel13: TbsSkinLabel;
DBEdit6: TDBEdit;
bsSkinLabel41: TbsSkinLabel;
dxDBGrid2Column46: TdxDBGridColumn;
dxDBGrid2Column47: TdxDBGridColumn;
DBEdit12: TDBEdit;
bsSkinLabel47: TbsSkinLabel;
DBEdit36: TDBEdit;
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure dxDBGrid2DblClick(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure dxDBGrid1Column3Change(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure t_op_seae_vgmAfterScroll(DataSet: TDataSet);
procedure bsSkinButton21Click(Sender: TObject);
procedure bsSkinButton22Click(Sender: TObject);
procedure bsSkinButton19Click(Sender: TObject);
procedure t_op_seae_vgmBeforePost(DataSet: TDataSet);
private
{ Private declarations }
function IsZhongwen(Str: String): Boolean;
function CheckParaNotExist(para:string):Boolean;
function GetCntrVGM(cntrsize: String):String;
function GetCntr(vgmsize: String;var cc:string;var xc:string;var bxxs:string):String;
function GetPackVGM(cntrsize: String):String;
function SeparateEC(Str: String): string;
function GetNBEDIhead(OPType:Boolean;var MyNBEDIhead : NBEDIhead):Boolean;
function GetNBEDIForward(OPType:Boolean;var MyNBEDIForward : NBEDIForward):Boolean;
function GetNBEDIreference(OPType:Boolean;var MyNBEDIreference : NBEDIreference):Boolean;
function GetNBEDIbaseinfo(OPType:Boolean;var MyNBEDIbaseinfo : NBEDIbaseinfo):Boolean;
function GetNBEDIcargo(OPType:Boolean;var MyNBEDIcargo : NBEDIcargo):Boolean;
function GetNBEDIbooking(OPType:Boolean;var MyNBEDIbooking : NBEDIbooking):Boolean;
function GetNBEDIfreight(OPType:Boolean;var MyNBEDIfreight : NBEDIfreight):Boolean;
function Getediport(OPType:Boolean;var MyPort : ediport):Boolean;
function Getedivessel(OPType:Boolean;var MyVessel : edivessel):Boolean;
function Getediinfo2nd(OPType:Boolean;var Myinfo2nd : ediinfo2nd):Boolean;
function Getedicontainers(OPType:Boolean;var ContainerCount:Integer):Boolean;
function GetNBEDIgoods(OPType:Boolean;var MyNBEDIgoods : NBEDIgoods):Boolean;
function GetNBEDIdr(OPType:Boolean;var MyNBEDIdr : NBEDIdr):Boolean;
function GetNBEDIloadplan(OPType:Boolean;var MyNBEDIloadplan : NBEDIloadplan):Boolean;
function GetNBEDIgoodsdetail(OPType:Boolean;var goodscount : Integer):Boolean;
procedure MakeVGM(editype:string);
public
{ Public declarations }
end;
var
frm_op_seae_vgm_data: Tfrm_op_seae_vgm_data;
HasM:Boolean; //<2F>Ƿ<EFBFBD><C7B7>д<EFBFBD>
const
xmltype:array [0..3] of string=('SHPMBF','SHPORD','VERMAS','SHPMIN');
implementation
uses u_data_share, my_sys_function, u_main, u_sys_progress,u_edi_vgm_weihu;
{$R *.dfm}
//<2F><>ȡXML<4D>ļ<EFBFBD><C4BC>ڵ<EFBFBD><DAB5><EFBFBD>Ϣ <20><><EFBFBD><EFBFBD><EFBFBD>κλس<CEBB><D8B3><EFBFBD><EFBFBD><EFBFBD>
function ReadXml(node: IXMLNode): string;
var
nodeList,attrList: IXMLNodeList;
str,strName,strValue: string;
i: Integer;
begin
Result := '';
if not node.HasChildNodes then Exit;
attrList := node.AttributeNodes; {<7B><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>}
nodeList := node.ChildNodes; {<7B><><EFBFBD>ڵ<EFBFBD><DAB5>µ<EFBFBD><C2B5>ӽڵ<D3BD><DAB5>б<EFBFBD>}
str := '<' + node.NodeName;
{<7B>ȶ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>}
for i := 0 to attrList.Count - 1 do
begin
strName := attrList[i].NodeName;
strValue := attrList[i].NodeValue;
str := str + ' ' + strName + '=' + AnsiQuotedStr(strValue, '"');
end;
str := str + '>' + sLineBreak; {sLineBreak <20>dz<EFBFBD><C7B3><EFBFBD>, <20><EFBFBD><E0B5B1> #13#10}
{<7B><>ȡ<EFBFBD>ӽڵ<D3BD>}
for i := 0 to nodeList.Count - 1 do
begin
strName := nodeList[i].NodeName;
if nodeList[i].IsTextElement then
begin
strValue := nodeList[i].NodeValue;
str := str + '<' + strName + '>' + strValue + '</' + strName + '>' + sLineBreak;
end else if nodeList[i].HasChildNodes then
begin
str := str + ReadXml(nodeList[i]); {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><D8BC>ĵݹ<C4B5><DDB9><EFBFBD><EFBFBD><EFBFBD>}
str := str + '</' + strName + '>' + sLineBreak; {<7B><><EFBFBD><EFBFBD>}
end;
end;
str := str + '</' + node.NodeName + '>'; {<7B><><EFBFBD><EFBFBD>}
Result := str;
end;
function Tfrm_op_seae_vgm_data.IsZhongwen(Str: String): Boolean;
var
i:Integer;
begin
Result:=false;
if Str='' then Exit;
for i:=1 to Length(Str) do begin
if (Str[i]>Chr(127)) or (Str[i]=Chr(9)) then begin
Result:=True;
Exit;
end;
end;
end;
function Tfrm_op_seae_vgm_data.CheckParaNotExist(para:string):Boolean;
begin
Result:=False;
if Trim(para)='' then Result:=True;
end;
function Tfrm_op_seae_vgm_data.GetCntrVGM(cntrsize: String):String;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select VGM<47><4D><EFBFBD><EFBFBD> from t_code_ctn where <20><><EFBFBD><EFBFBD>='''+cntrsize+'''');
Open;
if IsEmpty then
Result:=''
else
Result:=FieldByName('VGM<47><4D><EFBFBD><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
function Tfrm_op_seae_vgm_data.GetCntr(vgmsize: String;var cc:string;var xc:string;var bxxs:string):String;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select * from t_code_ctn where VGM<47><4D><EFBFBD><EFBFBD>='''+vgmsize+'''');
Open;
if IsEmpty then
Result:=''
else
Result:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
cc:=FieldByName('<27>ߴ<EFBFBD>').AsString;
xc:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
bxxs:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
function Tfrm_op_seae_vgm_data.GetPackVGM(cntrsize: String):String;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select EDI<44><49><EFBFBD><EFBFBD> from t_code_package where <20><><EFBFBD><EFBFBD>='''+cntrsize+'''');
Open;
if IsEmpty then
Result:=''
else
Result:=FieldByName('EDI<44><49><EFBFBD><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
function Tfrm_op_seae_vgm_data.SeparateEC(Str: String): string;
var
i:Integer;
begin
if Str='' then Exit;
for i:=1 to Length(Str) do
begin
if (Str[i]<=Chr(127)) then Result:=Result+Str[i] else Break;
end;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton11Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton12Click(Sender: TObject);
begin
t_op_ctn_vgm.Append;
end;
procedure Tfrm_op_seae_vgm_data.FormShow(Sender: TObject);
var
strstart,strend:string;
begin
loadreggrid(dxdbgrid2, true, caption);
loadreggrid(dxdbgrid1, true, caption+'1');
strstart:= formatdatetime('yyyy-mm-dd hh:mm:ss',date);
strend:= formatdatetime('yyyy-mm-dd hh:mm:ss',Now);
with t_code_ctn do
begin
Close;
SQL.Clear;
SQL.Add('select * from t_code_ctn');
Open;
end;
with t_code_package do
begin
Close;
SQL.Clear;
SQL.Add('select * from t_code_package');
Open;
end;
with t_op_seae_vgm do
begin
Close;
SQL.Clear;
SQL.Add('select * from t_op_seae_vgm where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> between '+quotedstr(strstart)+' and '+quotedstr(strend)+' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc');
Open;
end;
Notebook1.PageIndex:=1;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton10Click(Sender: TObject);
begin
Notebook1.PageIndex:=1;
end;
procedure Tfrm_op_seae_vgm_data.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid2,caption);
savereggrid(dxdbgrid1,caption+'1');
frm_op_seae_vgm_data.Hide;
frm_op_seae_vgm_data.ManualFloat(frm_op_seae_vgm_data.BoundsRect );
frm_main.freeTabs('frm_op_seae_vgm_data');
action:=cafree;
frm_op_seae_vgm_data:=nil;
end;
procedure Tfrm_op_seae_vgm_data.dxDBGrid2DblClick(Sender: TObject);
begin
if t_op_seae_vgm.IsEmpty then
begin
ShowMessage('û<><C3BB><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>ť');
Exit;
end;
with t_op_ctn_vgm do
begin
close;
SQL.Clear;
SQL.Add('select * from t_op_ctn_vgm where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) );
Open;
end;
Notebook1.PageIndex:=0;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton16Click(Sender: TObject);
begin
t_op_seae_vgm.Append;
Notebook1.PageIndex:=0;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton3Click(Sender: TObject);
begin
t_op_seae_vgm.Append;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton8Click(Sender: TObject);
begin
table_post(t_op_seae_vgm);
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton15Click(Sender: TObject);
begin
t_op_ctn_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:='1';
table_post(t_op_ctn_vgm);
end;
procedure Tfrm_op_seae_vgm_data.dxDBGrid1Column3Change(Sender: TObject);
begin
t_op_ctn_vgm.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString:=t_code_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton4Click(Sender: TObject);
begin
table_delete(t_op_seae_vgm);
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton9Click(Sender: TObject);
var
mybookmark:TBookmark;
begin
mybookmark:= t_op_seae_vgm.GetBookmark;
t_op_seae_vgm.Requery();
t_op_seae_vgm.GotoBookmark(mybookmark);
end;
//OPType:True<75><65><EFBFBD><EFBFBD> False<73><65><EFBFBD><EFBFBD>
function Tfrm_op_seae_vgm_data.GetNBEDIhead(OPType:Boolean;var MyNBEDIhead : NBEDIhead):Boolean;
var
i:Integer;
pnode,anode: IXMLNode;
aQuery:TADOQuery;
SQLStr:string;
begin
Result:=False;
if OPType then
begin
pnode := XMLDocument1.DocumentElement;
try
for i:=0 to pnode.ChildNodes.Count-1 do
begin
anode := pnode.ChildNodes[i];
if anode.NodeName='head' then
begin
MyNBEDIhead.sndcom:=VarToStr(anode.ChildNodes[0].NodeValue);
MyNBEDIhead.sender:=VarToStr(anode.ChildNodes[1].NodeValue);
MyNBEDIhead.fromop:=VarToStr(anode.ChildNodes[2].NodeValue);
MyNBEDIhead.fromtele:=VarToStr(anode.ChildNodes[3].NodeValue);
MyNBEDIhead.fromfax:=VarToStr(anode.ChildNodes[4].NodeValue);
MyNBEDIhead.frommail:=VarToStr(anode.ChildNodes[5].NodeValue);
MyNBEDIhead.fromopc:=VarToStr(anode.ChildNodes[6].NodeValue);
MyNBEDIhead.fromope:=VarToStr(anode.ChildNodes[7].NodeValue);
MyNBEDIhead.accom:=VarToStr(anode.ChildNodes[8].NodeValue);
MyNBEDIhead.accepter:=VarToStr(anode.ChildNodes[9].NodeValue);
MyNBEDIhead.toop:=VarToStr(anode.ChildNodes[10].NodeValue);
MyNBEDIhead.sendtime:=StrToDateTime(VarToStr(anode.ChildNodes[11].NodeValue));
MyNBEDIhead.editype:=VarToStr(anode.ChildNodes[12].NodeValue);
MyNBEDIhead.EdiID:=VarToStr(anode.ChildNodes[13].NodeValue);
MyNBEDIhead.EdiName:=VarToStr(anode.ChildNodes[14].NodeValue);
MyNBEDIhead.EdiMode:=VarToStr(anode.ChildNodes[15].NodeValue);
MyNBEDIhead.EdiReceiver:=VarToStr(anode.ChildNodes[16].NodeValue);
MyNBEDIhead.EdiSender:=VarToStr(anode.ChildNodes[17].NodeValue);
end;
end;
except
on e:Exception do ShowMessage('<27><><EFBFBD><EFBFBD>XML<4D><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
if not OPType then
begin
aQuery:=CreateAdoQuery;
SQLStr:='select * from t_op_seae_vgm where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
with aQuery do
begin
Close;
SQL.Clear;
SQL.Add(SQLStr);
Open;
end;
MyNBEDIhead.sndcom := aQuery.fieldbyname('<27><><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD>').AsString;
if (IsZhongwen(MyNBEDIhead.sndcom)) or (CheckParaNotExist(MyNBEDIhead.sndcom)) then
begin
HasM:=True;
ShowMessage('<27><><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ܰ<EFBFBD><DCB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
Exit;
end;
MyNBEDIhead.fromop := aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
if (IsZhongwen(MyNBEDIhead.fromop)) or (CheckParaNotExist(MyNBEDIhead.fromop)) then
begin
HasM:=True;
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ܰ<EFBFBD><DCB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
Exit;
end;
MyNBEDIhead.fromtele := aQuery.fieldbyname('<27>绰').AsString;
if (IsZhongwen(MyNBEDIhead.fromtele)) or (CheckParaNotExist(MyNBEDIhead.fromtele)) then
begin
HasM:=True;
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰δ<E7BBB0><CEB4><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ܰ<EFBFBD><DCB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
Exit;
end;
MyNBEDIhead.frommail := aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
if (IsZhongwen(MyNBEDIhead.frommail)) or (CheckParaNotExist(MyNBEDIhead.frommail)) then
begin
HasM:=True;
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ܰ<EFBFBD><DCB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
Exit;
end;
MyNBEDIhead.accom := aQuery.fieldbyname('<27><><EFBFBD>շ<EFBFBD><D5B7><EFBFBD><EFBFBD><EFBFBD>').AsString;
if (IsZhongwen(MyNBEDIhead.accom)) or (CheckParaNotExist(MyNBEDIhead.accom)) then
begin
HasM:=True;
ShowMessage('<27><><EFBFBD>շ<EFBFBD><D5B7><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ܰ<EFBFBD><DCB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
Exit;
end;
MyNBEDIhead.sendtime := aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime;
MyNBEDIhead.editype := aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyNBEDIhead.EdiID := aQuery.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD>').AsString;
MyNBEDIhead.EdiName:= aQuery.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD>').AsString;
MyNBEDIhead.EdiMode :='HYXML';
MyNBEDIhead.EdiReceiver := aQuery.fieldbyname('<27><><EFBFBD>շ<EFBFBD><D5B7><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyNBEDIhead.EdiSender := aQuery.fieldbyname('<27><><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD>').AsString;
FreeAndNil(aQuery);
end;
Result:=True;
end;
function Tfrm_op_seae_vgm_data.GetNBEDIForward(OPType:Boolean;var MyNBEDIForward : NBEDIForward):Boolean;
var
str:string;
i:Integer;
pnode,anode: IXMLNode;
aQuery:TADOQuery;
SQLStr:string;
begin
Result:=False;
if OPType then
begin
pnode := XMLDocument1.DocumentElement;
try
for i:=0 to pnode.ChildNodes.Count-1 do
begin
anode := pnode.ChildNodes[i];
if anode.NodeName='Forward' then
begin
if VarToStr(anode.ChildNodes[9].NodeValue)='9' then str:='<27><><EFBFBD><EFBFBD>';
if VarToStr(anode.ChildNodes[9].NodeValue)='5' then str:='<27>޸<EFBFBD>';
if VarToStr(anode.ChildNodes[9].NodeValue)='1' then str:='ȡ<><C8A1>';
MyNBEDIForward.EdiForwardREFE5:=str;
end;
end;
except
on e:Exception do ShowMessage('<27><><EFBFBD><EFBFBD>XML<4D><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
if not OPType then
begin
aQuery:=CreateAdoQuery;
SQLStr:='select * from t_op_seae_vgm where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
with aQuery do
begin
Close;
SQL.Clear;
SQL.Add(SQLStr);
Open;
end;
if aQuery.fieldbyname('<27><><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>').AsString='<27><><EFBFBD><EFBFBD>' then MyNBEDIForward.EdiForwardREFE5:= '9';
if aQuery.fieldbyname('<27><><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>').AsString='<27>޸<EFBFBD>' then MyNBEDIForward.EdiForwardREFE5:= '5';
if aQuery.fieldbyname('<27><><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>').AsString='ȡ<><C8A1>' then MyNBEDIForward.EdiForwardREFE5:= '1';
FreeAndNil(aQuery);
end;
Result:=True;
end;
function Tfrm_op_seae_vgm_data.GetNBEDIreference(OPType:Boolean;var MyNBEDIreference : NBEDIreference):Boolean;
var
i:Integer;
str:string;
pnode,anode,bnode,node: IXMLNode;
aQuery:TADOQuery;
SQLStr:string;
begin
Result:=False;
if OPType then
begin
pnode := XMLDocument1.DocumentElement;
try
for i:=0 to pnode.ChildNodes.Count-1 do
begin
anode := pnode.ChildNodes[i];
if anode.NodeName='reference' then
begin
if VarToStr(anode.ChildNodes[0].NodeValue)='9' then str:='<27><><EFBFBD><EFBFBD>';
if VarToStr(anode.ChildNodes[0].NodeValue)='5' then str:='<27>޸<EFBFBD>';
if VarToStr(anode.ChildNodes[0].NodeValue)='1' then str:='ȡ<><C8A1>';
MyNBEDIreference.blfreight:=str;
MyNBEDIreference.refid:=VarToStr(anode.ChildNodes[1].NodeValue);
MyNBEDIreference.freid:=VarToStr(anode.ChildNodes[2].NodeValue);
MyNBEDIreference.referenceno:=VarToStr(anode.ChildNodes[3].NodeValue);
MyNBEDIreference.bookingno:=VarToStr(anode.ChildNodes[4].NodeValue);
MyNBEDIreference.workno:=VarToStr(anode.ChildNodes[5].NodeValue);
MyNBEDIreference.sale:=VarToStr(anode.ChildNodes[6].NodeValue);
MyNBEDIreference.billofladingno:=VarToStr(anode.ChildNodes[7].NodeValue);
end;
end;
except
on e:Exception do ShowMessage('<27><><EFBFBD><EFBFBD>XML<4D><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
if not OPType then
begin
aQuery:=CreateAdoQuery;
SQLStr:='select * from t_op_seae_vgm where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
with aQuery do
begin
Close;
SQL.Clear;
SQL.Add(SQLStr);
Open;
end;
if aQuery.fieldbyname('<27><><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>').AsString='<27><><EFBFBD><EFBFBD>' then MyNBEDIreference.blfreight:= '9';
if aQuery.fieldbyname('<27><><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>').AsString='<27>޸<EFBFBD>' then MyNBEDIreference.blfreight:= '5';
if aQuery.fieldbyname('<27><><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>').AsString='ȡ<><C8A1>' then MyNBEDIreference.blfreight:= '1';
MyNBEDIreference.referenceno:=aQuery.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyNBEDIreference.bookingno:=aQuery.fieldbyname('<27><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>').AsString;
MyNBEDIreference.workno:=aQuery.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyNBEDIreference.sale:='gu';
MyNBEDIreference.billofladingno:=aQuery.fieldbyname('<27><EFBFBD><E1B5A5>').AsString;
FreeAndNil(aQuery);
end;
Result:=True;
end;
function Tfrm_op_seae_vgm_data.GetNBEDIbaseinfo(OPType:Boolean;var MyNBEDIbaseinfo : NBEDIbaseinfo):Boolean;
var
i,k,j:Integer;
str:string;
pnode,anode,bnode : IXMLNode;
aQuery:TADOQuery;
SQLStr:string;
begin
Result:=False;
if OPType then
begin
pnode := XMLDocument1.DocumentElement;
try
for i:=0 to pnode.ChildNodes.Count-1 do
begin
anode := pnode.ChildNodes[i];
if anode.NodeName='detail' then
begin
for k:=0 to anode.ChildNodes.Count-1 do
begin
bnode := anode.ChildNodes[k];
if bnode.NodeName='baseinfo' then
begin
MyNBEDIbaseinfo.orderman:= VarToStr(bnode.ChildNodes[0].NodeValue);
MyNBEDIbaseinfo.source:= VarToStr(bnode.ChildNodes[1].NodeValue);
MyNBEDIbaseinfo.usdaccountshipper:= VarToStr(bnode.ChildNodes[2].NodeValue);
MyNBEDIbaseinfo.customshipper:= VarToStr(bnode.ChildNodes[3].NodeValue);
MyNBEDIbaseinfo.rmbaccountshipper:= VarToStr(bnode.ChildNodes[4].NodeValue);
MyNBEDIbaseinfo.paymenttermcode:= VarToStr(bnode.ChildNodes[5].NodeValue);
MyNBEDIbaseinfo.paymentterm:= VarToStr(bnode.ChildNodes[6].NodeValue);
MyNBEDIbaseinfo.payableat:= VarToStr(bnode.ChildNodes[7].NodeValue);
MyNBEDIbaseinfo.shippingitem:= VarToStr(bnode.ChildNodes[8].NodeValue);
MyNBEDIbaseinfo.billofladingtype:= VarToStr(bnode.ChildNodes[9].NodeValue);
str:='';
for j:=0 to bnode.ChildNodes[10].ChildNodes.count-1 do
str:=str+VarToStr(bnode.ChildNodes[10].ChildNodes[j].NodeValue)+#13#10;
MyNBEDIbaseinfo.shipper:= str;
str:='';
for j:=0 to bnode.ChildNodes[11].ChildNodes.count-1 do
str:=str+VarToStr(bnode.ChildNodes[11].ChildNodes[j].NodeValue)+#13#10;
MyNBEDIbaseinfo.consignee:= str;
str:='';
for j:=0 to bnode.ChildNodes[12].ChildNodes.count-1 do
str:=str+VarToStr(bnode.ChildNodes[12].ChildNodes[j].NodeValue)+#13#10;
MyNBEDIbaseinfo.notifyparty:= str;
str:='';
for j:=0 to bnode.ChildNodes[13].ChildNodes.count-1 do
str:=str+VarToStr(bnode.ChildNodes[13].ChildNodes[j].NodeValue)+#13#10;
MyNBEDIbaseinfo.notifyparty2:= str;
MyNBEDIbaseinfo.ordermemo:= VarToStr(bnode.ChildNodes[14].NodeValue);
MyNBEDIbaseinfo.numberoforiginals:= VarToStr(bnode.ChildNodes[15].NodeValue);
MyNBEDIbaseinfo.numberofcopys:= VarToStr(bnode.ChildNodes[16].NodeValue);
MyNBEDIbaseinfo.placeofissuecode:= VarToStr(bnode.ChildNodes[17].NodeValue);
MyNBEDIbaseinfo.placeofissue:= VarToStr(bnode.ChildNodes[18].NodeValue);
MyNBEDIbaseinfo.timeofissue:= VarToStr(bnode.ChildNodes[19].NodeValue);
end;
end;
end;
end;
except
on e:Exception do ShowMessage('<27><><EFBFBD><EFBFBD>XML<4D><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
if not OPType then
begin
aQuery:=CreateAdoQuery;
SQLStr:='select * from t_op_seae_vgm where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
with aQuery do
begin
Close;
SQL.Clear;
SQL.Add(SQLStr);
Open;
end;
MyNBEDIbaseinfo.orderman:=aQuery.fieldbyname('<27><><EFBFBD>շ<EFBFBD><D5B7><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyNBEDIbaseinfo.paymenttermcode:= aQuery.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>').AsString;
MyNBEDIbaseinfo.paymentterm:=aQuery.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ').AsString;
//<2F>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
MyNBEDIbaseinfo.shippingitem:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyNBEDIbaseinfo.shipper := aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyNBEDIbaseinfo.consignee:=aQuery.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyNBEDIbaseinfo.notifyparty:=aQuery.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyNBEDIbaseinfo.numberoforiginals:=aQuery.fieldbyname('<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>').AsString;
MyNBEDIbaseinfo.placeofissuecode:='NBPORTEDI';
MyNBEDIbaseinfo.placeofissue:=aQuery.fieldbyname('ǩ<><C7A9><EFBFBD>ص<EFBFBD>').AsString;
if FormatDateTime('yyyy-mm-dd',aQuery.fieldbyname('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime)='1900-01-01' then
MyNBEDIbaseinfo.timeofissue:='' else MyNBEDIbaseinfo.timeofissue:=aQuery.fieldbyname('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
FreeAndNil(aQuery);
end;
Result:=True;
end;
function Tfrm_op_seae_vgm_data.GetNBEDIcargo(OPType:Boolean;var MyNBEDIcargo : NBEDIcargo):Boolean;
begin
Result:=True;
end;
function Tfrm_op_seae_vgm_data.GetNBEDIbooking(OPType:Boolean;var MyNBEDIbooking : NBEDIbooking):Boolean;
begin
Result:=True;
end;
function Tfrm_op_seae_vgm_data.GetNBEDIfreight(OPType:Boolean;var MyNBEDIfreight : NBEDIfreight):Boolean;
begin
Result:=True;
end;
function Tfrm_op_seae_vgm_data.Getediport(OPType:Boolean;var MyPort : ediport):Boolean;
var
i,k,j:Integer;
pnode,anode,bnode,cnode: IXMLNode;
aQuery:TADOQuery;
SQLStr:string;
begin
Result:=False;
if OPType then
begin
pnode := XMLDocument1.DocumentElement;
try
for i:=0 to pnode.ChildNodes.Count-1 do
begin
anode := pnode.ChildNodes[i];
if anode.NodeName='detail' then
begin
for k:=0 to anode.ChildNodes.Count-1 do
begin
bnode := anode.ChildNodes[k];
if bnode.NodeName='freight' then
begin
for j:=0 to bnode.ChildNodes.Count-1 do
begin
cnode := bnode.ChildNodes[j];
if cnode.NodeName='port' then
begin
MyPort.placeofreceipt:=VarToStr(cnode.ChildNodes[0].NodeValue);
MyPort.portofloading:=VarToStr(cnode.ChildNodes[1].NodeValue);
MyPort.portoftranship:=VarToStr(cnode.ChildNodes[2].NodeValue);
MyPort.portofdischarge:=VarToStr(cnode.ChildNodes[3].NodeValue);
MyPort.placeofdelivery:=VarToStr(cnode.ChildNodes[4].NodeValue);
MyPort.finaldestination:=VarToStr(cnode.ChildNodes[5].NodeValue);
MyPort.co_placeofreceipt:=VarToStr(cnode.ChildNodes[6].NodeValue);
MyPort.co_portofloading:=VarToStr(cnode.ChildNodes[7].NodeValue);
MyPort.co_portoftranship:=VarToStr(cnode.ChildNodes[8].NodeValue);
MyPort.co_portofdischarge:=VarToStr(cnode.ChildNodes[9].NodeValue);
MyPort.co_placeofdelivery:=VarToStr(cnode.ChildNodes[10].NodeValue);
MyPort.co_finaldestination:=VarToStr(cnode.ChildNodes[11].NodeValue);
end;
end;
end;
end;
end;
end;
except
on e:Exception do ShowMessage('<27><><EFBFBD><EFBFBD>XML<4D><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
if not OPType then
begin
aQuery:=CreateAdoQuery;
SQLStr:='select * from t_op_seae_vgm where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
with aQuery do
begin
Close;
SQL.Clear;
SQL.Add(SQLStr);
Open;
end;
MyPort.portofloading:=aQuery.fieldbyname('<27><><EFBFBD>˸<EFBFBD><CBB8><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyPort.portofdischarge:=aQuery.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyPort.placeofdelivery:=aQuery.fieldbyname('Ŀ<>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyPort.co_portofloading:=aQuery.fieldbyname('<27><><EFBFBD>˸۴<CBB8><DBB4><EFBFBD>').AsString;
MyPort.co_portofdischarge:=aQuery.fieldbyname('ж<><D0B6><EFBFBD>۴<EFBFBD><DBB4><EFBFBD>').AsString;
MyPort.co_placeofdelivery:=aQuery.fieldbyname('Ŀ<>ĵش<C4B5><D8B4><EFBFBD>').AsString;
FreeAndNil(aQuery);
end;
Result:=True;
end;
function Tfrm_op_seae_vgm_data.Getedivessel(OPType:Boolean;var MyVessel : edivessel):Boolean;
var
i,k,j:Integer;
pnode,anode,bnode,cnode: IXMLNode;
aQuery:TADOQuery;
SQLStr:string;
begin
Result:=False;
if OPType then
begin
pnode := XMLDocument1.DocumentElement;
try
for i:=0 to pnode.ChildNodes.Count-1 do
begin
anode := pnode.ChildNodes[i];
if anode.NodeName='detail' then
begin
for k:=0 to anode.ChildNodes.Count-1 do
begin
bnode := anode.ChildNodes[k];
if bnode.NodeName='freight' then
begin
for j:=0 to bnode.ChildNodes.Count-1 do
begin
cnode := bnode.ChildNodes[j];
if cnode.NodeName='vessel' then
begin
MyVessel.carrier:=VarToStr(cnode.ChildNodes[0].NodeValue);
MyVessel.oceanvessel:=VarToStr(cnode.ChildNodes[1].NodeValue);
MyVessel.voyno:=VarToStr(cnode.ChildNodes[2].NodeValue);
MyVessel.etd:=VarToStr(cnode.ChildNodes[3].NodeValue);
MyVessel.deliverymode:=VarToStr(cnode.ChildNodes[4].NodeValue);
end;
end;
end;
end;
end;
end;
except
on e:Exception do ShowMessage('<27><><EFBFBD><EFBFBD>XML<4D><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
if not OPType then
begin
aQuery:=CreateAdoQuery;
SQLStr:='select * from t_op_seae_vgm where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
with aQuery do
begin
Close;
SQL.Clear;
SQL.Add(SQLStr);
Open;
end;
MyVessel.carrier:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>˾').AsString;
MyVessel.oceanvessel:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
MyVessel.voyno:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
MyVessel.etd:= aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
FreeAndNil(aQuery);
end;
Result:=True;
end;
function Tfrm_op_seae_vgm_data.Getediinfo2nd(OPType:Boolean;var Myinfo2nd : ediinfo2nd):Boolean;
begin
Result:=True;
end;
function Tfrm_op_seae_vgm_data.Getedicontainers(OPType:Boolean;var ContainerCount:Integer):Boolean;
var
i,k,j,m,n:Integer;
str:string;
pnode,anode,bnode,cnode,dnode: IXMLNode;
aQuery:TADOQuery;
SQLStr:string;
begin
Result:=False;
if OPType then
begin
pnode := XMLDocument1.DocumentElement;
try
for i:=0 to pnode.ChildNodes.Count-1 do
begin
anode := pnode.ChildNodes[i];
if anode.NodeName='detail' then
begin
for k:=0 to anode.ChildNodes.Count-1 do
begin
bnode := anode.ChildNodes[k];
if bnode.NodeName='freight' then
begin
for j:=0 to bnode.ChildNodes.Count-1 do
begin
cnode := bnode.ChildNodes[j];
if cnode.NodeName='container' then
begin
ContainerCount:=cnode.ChildNodes.Count;
for m:=0 to cnode.ChildNodes.Count -1 do
begin
dnode := cnode.ChildNodes[m];
MyContainers[m].containertype:=VarToStr(dnode.ChildNodes[0].NodeValue);
MyContainers[m].containerno:=VarToStr(dnode.ChildNodes[1].NodeValue);
MyContainers[m].sealno:=VarToStr(dnode.ChildNodes[2].NodeValue);
MyContainers[m].containernoofpkgs:=VarToStr(dnode.ChildNodes[3].NodeValue);
if Trim(MyContainers[m].containernoofpkgs)='' then MyContainers[m].containernoofpkgs:='1';
MyContainers[m].containergrossweight:=VarToStr(dnode.ChildNodes[4].NodeValue);
if Trim(MyContainers[m].containergrossweight)='' then MyContainers[m].containergrossweight:='0';
MyContainers[m].containercbm:=VarToStr(dnode.ChildNodes[5].NodeValue);
if Trim(MyContainers[m].containercbm)='' then MyContainers[m].containercbm:='0';
MyContainers[m].containerpackagingcode:=VarToStr(dnode.ChildNodes[6].NodeValue);
MyContainers[m].containerpackaging:=VarToStr(dnode.ChildNodes[7].NodeValue);
str:='';
for n:=0 to dnode.ChildNodes[8].ChildNodes.Count-1 do
str:=str+VarToStr(dnode.ChildNodes[8].ChildNodes[n].NodeValue)+#13#10;
MyContainers[m].containerdescription:=str;
MyContainers[m].containermarksandnumbers:=VarToStr(dnode.ChildNodes[9].NodeValue);
MyContainers[m].vgmgrossmassweight:=VarToStr(dnode.ChildNodes[10].NodeValue);
if Trim(MyContainers[m].vgmgrossmassweight)='' then MyContainers[m].vgmgrossmassweight:='0';
MyContainers[m].vgmweighingmethod:=VarToStr(dnode.ChildNodes[11].NodeValue);
MyContainers[m].vgmweighingtime:=VarToStr(dnode.ChildNodes[12].NodeValue);
MyContainers[m].vgmresponsibleparty:=VarToStr(dnode.ChildNodes[13].NodeValue);
MyContainers[m].vgmauthorizedperson:=VarToStr(dnode.ChildNodes[14].NodeValue);
MyContainers[m].vgmauthorizedpersontele:=VarToStr(dnode.ChildNodes[15].NodeValue);
MyContainers[m].vgmauthorizedpersonmail:=VarToStr(dnode.ChildNodes[16].NodeValue);
MyContainers[m].vgmremark:=VarToStr(dnode.ChildNodes[17].NodeValue);
end;
end;
end;
end;
end;
end;
end;
except
on e:Exception do ShowMessage('<27><><EFBFBD><EFBFBD>XML<4D><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
if not OPType then
begin
aQuery:=CreateAdoQuery;
SQLStr:='select * from t_op_ctn_vgm where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
with aQuery do
begin
Close;
SQL.Clear;
SQL.Add(SQLStr);
Open;
end;
ContainerCount:=aQuery.RecordCount;
aQuery.First;
for i:=0 to ContainerCount-1 do
begin
MyContainers[i].containertype:=GetCntrVGM(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
MyContainers[i].containerno:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
MyContainers[i].sealno:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
MyContainers[i].containernoofpkgs:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
MyContainers[i].containergrossweight:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
MyContainers[i].containercbm:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
MyContainers[i].containerpackagingcode:=aQuery.fieldbyname('<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>').AsString;
MyContainers[i].containerpackaging:=aQuery.fieldbyname('<27><>װ').AsString;
MyContainers[i].vgmgrossmassweight:=aQuery.fieldbyname('VGM<47><4D><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
MyContainers[i].vgmweighingmethod:= aQuery.fieldbyname('VGM<47><4D><EFBFBD>ط<EFBFBD>ʽ').AsString ;
MyContainers[i].vgmweighingtime:=aQuery.fieldbyname('VGM<47><4D><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString;
MyContainers[i].vgmresponsibleparty :=aQuery.fieldbyname('VGM<47><4D>ϵ<EFBFBD><CFB5>λ').AsString;
MyContainers[i].vgmauthorizedperson:=aQuery.fieldbyname('VGM<47><4D>ϵ<EFBFBD><CFB5>').AsString;
MyContainers[i].vgmauthorizedpersontele:=aQuery.fieldbyname('VGM<47><4D>ϵ<EFBFBD>绰').AsString;
aQuery.Next;
end;
FreeAndNil(aQuery);
end;
Result:=True;
end;
function Tfrm_op_seae_vgm_data.GetNBEDIgoods(OPType:Boolean;var MyNBEDIgoods : NBEDIgoods):Boolean;
var
i,k,m:Integer;
str:string;
pnode,anode,bnode : IXMLNode;
aQuery:TADOQuery;
SQLStr:string;
begin
Result:=False;
if OPType then
begin
pnode := XMLDocument1.DocumentElement;
try
for i:=0 to pnode.ChildNodes.Count-1 do
begin
anode := pnode.ChildNodes[i];
if anode.NodeName='detail' then
begin
for k:=0 to anode.ChildNodes.Count-1 do
begin
bnode := anode.ChildNodes[k];
if bnode.NodeName='goods' then
begin
str:='';
for m:=0 to bnode.ChildNodes[0].ChildNodes.Count-1 do
str:=str+VarToStr(bnode.ChildNodes[0].ChildNodes[m].NodeValue)+#13#10;
MyNBEDIgoods.marksandnumbers:=str;
MyNBEDIgoods.noofpkgs:=VarToStr(bnode.ChildNodes[1].NodeValue);
if Trim(MyNBEDIgoods.noofpkgs)='' then MyNBEDIgoods.noofpkgs:='0';
MyNBEDIgoods.packagingcode:=VarToStr(bnode.ChildNodes[2].NodeValue);
MyNBEDIgoods.packaging:=VarToStr(bnode.ChildNodes[3].NodeValue);
MyNBEDIgoods.cargoid:=VarToStr(bnode.ChildNodes[4].NodeValue);
MyNBEDIgoods.hscode:=VarToStr(bnode.ChildNodes[5].NodeValue);
str:='';
for m:=0 to bnode.ChildNodes[6].ChildNodes.Count-1 do
str:=str+VarToStr(bnode.ChildNodes[6].ChildNodes[m].NodeValue)+#13#10;
MyNBEDIgoods.description:=str;
str:='';
for m:=0 to bnode.ChildNodes[7].ChildNodes.Count-1 do
str:=str+VarToStr(bnode.ChildNodes[7].ChildNodes[m].NodeValue)+#13#10;
MyNBEDIgoods.cdescription:=str;
MyNBEDIgoods.grossweight:=VarToStr(bnode.ChildNodes[8].NodeValue);
if Trim(MyNBEDIgoods.grossweight)='' then MyNBEDIgoods.grossweight:='0';
MyNBEDIgoods.cbm:=VarToStr(bnode.ChildNodes[9].NodeValue);
if Trim(MyNBEDIgoods.cbm)='' then MyNBEDIgoods.cbm:='0';
str:='';
for m:=0 to bnode.ChildNodes[10].ChildNodes.Count-1 do
str:=str+VarToStr(bnode.ChildNodes[10].ChildNodes[m].NodeValue)+#13#10;
MyNBEDIgoods.specialgoods:=str;
end;
end;
end;
end;
except
on e:Exception do ShowMessage('<27><><EFBFBD><EFBFBD>XML<4D><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
if not OPType then
begin
aQuery:=CreateAdoQuery;
SQLStr:='select * from t_op_seae_vgm where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
with aQuery do
begin
Close;
SQL.Clear;
SQL.Add(SQLStr);
Open;
end;
MyNBEDIgoods.marksandnumbers:=aQuery.fieldbyname('<27><>ͷ').AsString;
MyNBEDIgoods.noofpkgs:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
MyNBEDIgoods.packagingcode:=aQuery.fieldbyname('<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>').AsString;
MyNBEDIgoods.packaging:=aQuery.fieldbyname('<27><>װ').AsString;
MyNBEDIgoods.description:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
MyNBEDIgoods.grossweight:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
MyNBEDIgoods.cbm:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
MyNBEDIgoods.cargoid:='GC';
FreeAndNil(aQuery);
end;
Result:=True;
end;
function Tfrm_op_seae_vgm_data.GetNBEDIdr(OPType:Boolean;var MyNBEDIdr : NBEDIdr):Boolean;
begin
Result:=True;
end;
function Tfrm_op_seae_vgm_data.GetNBEDIloadplan(OPType:Boolean;var MyNBEDIloadplan : NBEDIloadplan):Boolean;
begin
Result:=True;
end;
function Tfrm_op_seae_vgm_data.GetNBEDIgoodsdetail(OPType:Boolean;var goodscount : Integer):Boolean;
begin
Result:=True;
end;
procedure Tfrm_op_seae_vgm_data.MakeVGM(editype:string);
var
fNode,pNode,mNode,cNode,dNode,eNode,gNode: IXMLNode; {<7B><><EFBFBD><EFBFBD>7<EFBFBD><37><EFBFBD>ڵ<EFBFBD>}
sl:TStringList;
i,k,Elength,Wlength,Clength:Integer;
myhead:NBEDIhead;
myForward:NBEDIForward;
myreference:NBEDIreference;
mybaseinfo:NBEDIbaseinfo;
mycargo:NBEDIcargo;
mybooking:NBEDIbooking;
myfreight:NBEDIfreight;
myport:ediport;
myvessel:edivessel;
myinfo:ediinfo2nd;
ContainerCount,goodscount:Integer;
mygoods:NBEDIgoods;
mydr:NBEDIdr;
myloadolan:NBEDIloadplan;
begin
XMLDocument1.XML.Clear;
XMLDocument1.Active := True;
XMLDocument1.Version := '1.0';
XMLDocument1.Encoding := 'GB2312';
//<2F><><EFBFBD>Ӹ<EFBFBD><D3B8>ڵ<EFBFBD> edi
fNode := XMLDocument1.AddChild('edi');
// Ϊ<><CEAA><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽڵ<D3BD>:HEAD
pNode := fNode.AddChild('head');
GetNBEDIhead(False,myhead);
cNode := pNode.AddChild('sndcom'); //*
cNode.Text := myhead.sndcom;
cNode := pNode.AddChild('sender');
cNode.Text :=myhead.sender;
cNode := pNode.AddChild('fromop'); //*
cNode.Text := myhead.fromop;
cNode := pNode.AddChild('fromtele'); //*
cNode.Text := myhead.fromtele;
cNode := pNode.AddChild('fromfax');
cNode.Text := myhead.fromfax;
cNode := pNode.AddChild('frommail'); //*
cNode.Text := myhead.frommail;
cNode := pNode.AddChild('fromopc');
cNode.Text := myhead.fromopc;
cNode := pNode.AddChild('fromope');
cNode.Text := myhead.fromope;
cNode := pNode.AddChild('accom'); //*
cNode.Text :=myhead.accom;
cNode := pNode.AddChild('accepter');
cNode.Text :=myhead.accepter;
cNode := pNode.AddChild('toop');
cNode.Text :=myhead.toop;
cNode := pNode.AddChild('sendtime'); //*
cNode.Text:=FormatDateTime('yyyy-mm-dd hh:mm:ss',myhead.sendtime);
cNode := pNode.AddChild('editype'); //*
cNode.Text:=myhead.editype;
cNode := pNode.AddChild('EdiID'); //*
cNode.Text:=myhead.EdiID;
cNode := pNode.AddChild('EdiName');
cNode.Text:=myhead.EdiName;
cNode := pNode.AddChild('EdiMode'); //*
cNode.Text:=myhead.EdiMode;
cNode := pNode.AddChild('EdiReceiver'); //*
cNode.Text := myhead.EdiReceiver;
cNode := pNode.AddChild('EdiSender'); //*
cNode.Text := myhead.EdiSender;
// Ϊ<><CEAA><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽڵ<D3BD>:Forward
pNode := fNode.AddChild('Forward');
GetNBEDIForward(False,myForward);
cNode := pNode.AddChild('EdiForwardFMT');
cNode.Text := myForward.EdiForwardFMT;
cNode := pNode.AddChild('EdiForwardType');
cNode.Text := myForward.EdiForwardType;
cNode := pNode.AddChild('EdiForwardURL');
cNode.Text := myForward.EdiForwardURL;
cNode := pNode.AddChild('EdiForwardId');
cNode.Text := myForward.EdiForwardId;
cNode := pNode.AddChild('EdiForwardPass');
cNode.Text := myForward.EdiForwardPass;
cNode := pNode.AddChild('EdiForwardREFE1');
cNode.Text := myForward.EdiForwardREFE1;
cNode := pNode.AddChild('EdiForwardREFE2');
cNode.Text := myForward.EdiForwardREFE2;
cNode := pNode.AddChild('EdiForwardREFE3');
cNode.Text := myForward.EdiForwardREFE3;
cNode := pNode.AddChild('EdiForwardREFE4');
cNode.Text := myForward.EdiForwardREFE4;
cNode := pNode.AddChild('EdiForwardREFE5');
cNode.Text := myForward.EdiForwardREFE5;
// Ϊ<><CEAA><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽڵ<D3BD>:reference
pNode := fNode.AddChild('reference');
GetNBEDIreference(False,myreference);
cNode := pNode.AddChild('blfreight'); //*
cNode.Text := myreference.blfreight;
cNode := pNode.AddChild('refid');
cNode.Text := myreference.refid;
cNode := pNode.AddChild('freid');
cNode.Text := myreference.freid;
cNode := pNode.AddChild('referenceno');
cNode.Text := myreference.referenceno;
cNode := pNode.AddChild('bookingno'); //*
cNode.Text := myreference.bookingno;
cNode := pNode.AddChild('workno'); //*
cNode.Text := myreference.workno;
cNode := pNode.AddChild('sale');
cNode.Text := myreference.sale;
cNode := pNode.AddChild('billofladingno'); //*
cNode.Text := myreference.billofladingno;
// Ϊ<><CEAA><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽڵ<D3BD>:detail
pNode := fNode.AddChild('detail');
//<2F><><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>ӽڵ<D3BD> baseinfo
mNode:= pNode.AddChild('baseinfo');
GetNBEDIbaseinfo(False,mybaseinfo);
cNode := mNode.AddChild('orderman'); //* <20><><EFBFBD>յ<EFBFBD>λ <20><><EFBFBD><EFBFBD>¼<EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>մ<EFBFBD><D5B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û¼<C3BB><C2BC>ȡcompany<6E><79><EFBFBD><EFBFBD>shortname
cNode.Text := mybaseinfo.orderman;
cNode := mNode.AddChild('source');
cNode := mNode.AddChild('usdaccountshipper');
cNode.Text := mybaseinfo.usdaccountshipper;
cNode := mNode.AddChild('customshipper');
cNode.Text := mybaseinfo.customshipper;
cNode := mNode.AddChild('rmbaccountshipper');
cNode.Text := mybaseinfo.rmbaccountshipper;
cNode := mNode.AddChild('paymenttermcode'); //* <20><><EFBFBD>ʽ<EEB7BD><CABD><EFBFBD><EFBFBD>(P/C/E)
cNode.Text := mybaseinfo.paymenttermcode;
cNode := mNode.AddChild('paymentterm'); //*
cNode.Text := mybaseinfo.paymentterm;
cNode := mNode.AddChild('payableat');
cNode.Text := mybaseinfo.payableat;
cNode := mNode.AddChild('shippingitem'); //*
cNode.Text := mybaseinfo.shippingitem;
cNode := mNode.AddChild('billofladingtype'); //*
cNode.Text := mybaseinfo.billofladingtype;
cNode := mNode.AddChild('shipper'); //*
sl:=TStringList.Create;
sl.Text:=mybaseinfo.shipper;
for i:=0 to sl.Count-1 do
begin
dNode := cNode.AddChild('text');
dNode.Text:=sl[i];
end;
sl.Free;
cNode := mNode.AddChild('consignee'); //*
sl:=TStringList.Create;
sl.Text:=mybaseinfo.consignee;
for i:=0 to sl.Count-1 do
begin
dNode := cNode.AddChild('text');
dNode.Text:=sl[i];
end;
sl.Free;
cNode := mNode.AddChild('notifyparty'); //*
sl:=TStringList.Create;
sl.Text:=mybaseinfo.notifyparty;
for i:=0 to sl.Count-1 do
begin
dNode := cNode.AddChild('text');
dNode.Text:=sl[i];
end;
sl.Free;
cNode := mNode.AddChild('notifyparty2');
if Trim(mybaseinfo.notifyparty2)<>'' then
begin
sl:=TStringList.Create;
sl.Text:=mybaseinfo.notifyparty2;
for i:=0 to sl.Count-1 do
begin
dNode := cNode.AddChild('text');
dNode.Text:=sl[i];
end;
sl.Free;
end
else
begin
dNode := cNode.AddChild('text');
end;
cNode := mNode.AddChild('ordermemo');
cNode.Text := mybaseinfo.ordermemo;
cNode := mNode.AddChild('numberoforiginals'); //*
cNode.Text := mybaseinfo.numberoforiginals;
cNode := mNode.AddChild('numberofcopys');
cNode.Text := mybaseinfo.numberofcopys;
cNode := mNode.AddChild('placeofissuecode'); //*
cNode.Text := mybaseinfo.placeofissuecode;
cNode := mNode.AddChild('placeofissue'); //*
cNode.Text := mybaseinfo.placeofissue;
cNode := mNode.AddChild('timeofissue'); //*
cNode.Text := mybaseinfo.timeofissue;
//<2F><><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>ӽڵ<D3BD> cargo
mNode:= pNode.AddChild('cargo');
GetNBEDIcargo(False,mycargo);
cNode := mNode.AddChild('APPLICANT');
cNode.Text := mycargo.APPLICANT;
cNode := mNode.AddChild('BOKKINGPARTY');
cNode.Text := mycargo.BOKKINGPARTY;
cNode := mNode.AddChild('FOBPARTY');
cNode.Text := mycargo.FOBPARTY;
cNode := mNode.AddChild('SCNO');
cNode.Text := mycargo.SCNO;
cNode := mNode.AddChild('QUARANTINECODING');
cNode.Text := mycargo.QUARANTINECODING;
cNode := mNode.AddChild('SCACCODE');
cNode.Text := mycargo.SCACCODE;
cNode := mNode.AddChild('QUOTATIONNO');
cNode.Text := mycargo.QUOTATIONNO;
cNode := mNode.AddChild('CHARGETYPE');
cNode.Text := mycargo.CHARGETYPE;
cNode := mNode.AddChild('NVOCCHBLNO');
cNode.Text := mycargo.NVOCCHBLNO;
cNode := mNode.AddChild('realshipper');
dNode := cNode.AddChild('text');
dNode.Text := mycargo.realshipper;
cNode := mNode.AddChild('realconsignee');
dNode := cNode.AddChild('text');
dNode.Text := mycargo.realconsignee;
cNode := mNode.AddChild('realnotifyparty');
dNode := cNode.AddChild('text');
dNode.Text := mycargo.realnotifyparty;
cNode := mNode.AddChild('realnotifyparty2');
dNode := cNode.AddChild('text');
dNode.Text := mycargo.realnotifyparty2;
//<2F><><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>ӽڵ<D3BD> booking
mNode:= pNode.AddChild('booking');
GetNBEDIbooking(False,mybooking);
cNode := mNode.AddChild('shipmentdate');
cNode.Text := mybooking.shipmentdate;
cNode := mNode.AddChild('expirydate');
cNode.Text := mybooking.expirydate;
cNode := mNode.AddChild('tranship');
cNode.Text := mybooking.tranship;
cNode := mNode.AddChild('batch');
cNode.Text := mybooking.batch;
cNode := mNode.AddChild('quotationno');
cNode.Text := mybooking.quotationno;
//<2F><><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>ӽڵ<D3BD> freight
mNode:= pNode.AddChild('freight');
GetNBEDIfreight(False,myfreight);
cNode := mNode.AddChild('fl');
cNode.Text := myfreight.fl;
cNode := mNode.AddChild('masterlclno');
cNode.Text := myfreight.masterlclno;
cNode := mNode.AddChild('requestdate');
cNode.Text := myfreight.requestdate;
cNode := mNode.AddChild('lastdate');
cNode.Text := myfreight.lastdate;
cNode := mNode.AddChild('arrivedate');
cNode.Text := myfreight.arrivedate;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽڵ<D3BD> port
cNode := mNode.AddChild('port');
Getediport(False,myport);
dNode := cNode.AddChild('placeofreceipt');
dNode.Text := myport.placeofreceipt;
dNode := cNode.AddChild('portofloading'); //* װ<><D7B0><EFBFBD><EFBFBD>
dNode.Text := myport.portofloading;
dNode := cNode.AddChild('portoftranship');
dNode.Text := myport.portoftranship;
dNode := cNode.AddChild('portofdischarge'); //* ж<><D0B6><EFBFBD><EFBFBD>
dNode.Text := myport.portofdischarge;
dNode := cNode.AddChild('placeofdelivery'); //* Ŀ<>ĸ<EFBFBD>
dNode.Text:=myport.placeofdelivery;
dNode := cNode.AddChild('finaldestination');
dNode.Text:=myport.finaldestination;
dNode := cNode.AddChild('co_placeofreceipt');
dNode.Text:=myport.co_placeofreceipt;
dNode := cNode.AddChild('co_portofloading'); //* װ<><D7B0><EFBFBD>۴<EFBFBD><DBB4><EFBFBD>
dNode.Text:=myport.co_portofloading;
dNode := cNode.AddChild('co_portoftranship');
dNode.Text:=myport.co_portoftranship;
dNode := cNode.AddChild('co_portofdischarge'); //* ж<><D0B6><EFBFBD>۴<EFBFBD><DBB4><EFBFBD>
dNode.Text:=myport.co_portofdischarge;
dNode := cNode.AddChild('co_placeofdelivery'); //* Ŀ<>ĸ۴<C4B8><DBB4><EFBFBD>
dNode.Text:=myport.co_placeofdelivery;
dNode := cNode.AddChild('co_finaldestination');
dNode.Text:=myport.co_finaldestination;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽڵ<D3BD>vessel
cNode := mNode.AddChild('vessel');
Getedivessel(False,myvessel);
dNode := cNode.AddChild('carrier'); //* <20><><EFBFBD><EFBFBD>˾
dNode.Text:=myvessel.carrier;
dNode := cNode.AddChild('oceanvessel'); //* <20><><EFBFBD><EFBFBD>
dNode.Text:=myvessel.oceanvessel;
dNode := cNode.AddChild('voyno'); //* <20><><EFBFBD><EFBFBD>
dNode.Text:=myvessel.voyno;
dNode := cNode.AddChild('etd'); //* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
dNode.Text:= myvessel.etd;
dNode := cNode.AddChild('deliverymode');
dNode.Text := myvessel.deliverymode;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽڵ<D3BD>info2nd
cNode := mNode.AddChild('info2nd');
Getediinfo2nd(false,myinfo);
dNode := cNode.AddChild('carrier');
dNode.Text := myinfo.carrier;
dNode := cNode.AddChild('oceanvessel');
dNode.Text := myinfo.oceanvessel;
dNode := cNode.AddChild('voyno');
dNode.Text := myinfo.voyno;
dNode := cNode.AddChild('etd');
dNode.Text := myinfo.etd;
dNode := cNode.AddChild('deliverymode');
dNode.Text := myinfo.deliverymode;
dNode := cNode.AddChild('remarks');
eNode := dNode.AddChild('text');
eNode.Text := myinfo.remarks;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽڵ<D3BD>container
cNode := mNode.AddChild('container'); //<2F><><EFBFBD><EFBFBD>װ<EFBFBD><D7B0>û¼<C3BB><C2BC><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>
Getedicontainers(False,ContainerCount);
if ContainerCount =0 then
begin
HasM:=True;
ShowMessage('<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EDI<44>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
Exit;
end;
for i:=0 to ContainerCount-1 do
begin
dNode := cNode.AddChild('containers'); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD>
eNode := dNode.AddChild('containertype'); //* <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD>Ϊ<EFBFBD><CEAA>
eNode.Text:=mycontainers[i].containertype;
eNode := dNode.AddChild('containerno'); //* <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD>Ϊ<EFBFBD><CEAA>
eNode.Text:=mycontainers[i].containerno;
eNode := dNode.AddChild('sealno'); //* <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>
eNode.Text:=mycontainers[i].sealno;
eNode := dNode.AddChild('containernoofpkgs'); //* <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>
eNode.Text:=mycontainers[i].containernoofpkgs;
eNode := dNode.AddChild('containergrossweight'); //* ë<><C3AB> <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>
eNode.Text:=mycontainers[i].containergrossweight;
eNode := dNode.AddChild('containercbm'); //* <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>
eNode.Text:=mycontainers[i].containercbm;
eNode := dNode.AddChild('containerpackagingcode'); //* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD> <20><>װ<EFBFBD><D7B0><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD>
eNode.Text:=mycontainers[i].containerpackagingcode;
eNode := dNode.AddChild('containerpackaging'); //* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD> <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>
eNode.Text:=mycontainers[i].containerpackaging;
eNode := dNode.AddChild('containerdescription');
gNode := eNode.AddChild('text');
gNode.Text := mycontainers[i].containerdescription;
eNode := dNode.AddChild('containermarksandnumbers');
eNode.Text := mycontainers[i].containermarksandnumbers;
eNode := dNode.AddChild('vgmgrossmassweight'); //VGM<47><4D><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>
eNode.Text:=mycontainers[i].vgmgrossmassweight;
eNode := dNode.AddChild('vgmweighingmethod'); //VGM<47><4D><EFBFBD>ط<EFBFBD>ʽ <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>
eNode.Text:=mycontainers[i].vgmweighingmethod;
eNode := dNode.AddChild('vgmweighingtime'); //VGM<47><4D><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA> <20><><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>
eNode.Text:=mycontainers[i].vgmweighingtime;
eNode := dNode.AddChild('vgmresponsibleparty'); //VGM<47><4D>ϵ<EFBFBD><CFB5>λ
eNode.Text:=mycontainers[i].vgmresponsibleparty;
eNode := dNode.AddChild('vgmauthorizedperson'); //VGM<47><4D>Ȩ<EFBFBD><C8A8>ϵ<EFBFBD><CFB5>
eNode.Text:=mycontainers[i].vgmauthorizedperson;
eNode := dNode.AddChild('vgmauthorizedpersontele'); //VGM<47><4D>Ȩ<EFBFBD><C8A8>ϵ<EFBFBD>˵绰
eNode.Text:=mycontainers[i].vgmauthorizedpersontele;
eNode := dNode.AddChild('vgmauthorizedpersonmail'); //VGM<47><4D>Ȩ<EFBFBD><C8A8>ϵ<EFBFBD><CFB5><EFBFBD>ʼ<EFBFBD>
eNode.Text := mycontainers[i].vgmauthorizedpersonmail;
eNode := dNode.AddChild('vgmremark'); //VGM<47><4D><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>
eNode.Text := mycontainers[i].vgmremark;
end;
//<2F><><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>ӽڵ<D3BD> goods
mNode:= pNode.AddChild('goods');
GetNBEDIgoods(False,mygoods);
cNode := mNode.AddChild('marksandnumbers'); //* <20><>ͷ
if Trim(mygoods.marksandnumbers)='' then
begin
dNode := cNode.AddChild('text');
end
else
begin
sl:=TStringList.Create;
sl.Text:=mygoods.marksandnumbers;
for i:=0 to sl.Count-1 do
begin
dNode := cNode.AddChild('text');
dNode.Text:=sl[i];
end;
sl.Free;
end;
cNode := mNode.AddChild('noofpkgs'); //* <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>
cNode.Text:=mygoods.noofpkgs;
cNode := mNode.AddChild('packagingcode'); //* <20><>װ<EFBFBD><D7B0><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>
cNode.Text:=mygoods.packagingcode;
cNode := mNode.AddChild('packaging'); //* <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>
cNode.Text:=mygoods.packaging;
cNode := mNode.AddChild('cargoid'); //* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(GC/RF/DR)
cNode.Text:=mygoods.cargoid;
cNode := mNode.AddChild('hscode'); //<2F><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD>
cNode.Text:=mygoods.hscode;
cNode := mNode.AddChild('description'); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>Ļ<EFBFBD><C4BB><EFBFBD>)
if Trim(mygoods.description)='' then
begin
dNode := cNode.AddChild('text');
end
else
begin
sl:=TStringList.Create;
sl.Text:=SeparateEC(mygoods.description);
for i:=0 to sl.Count-1 do
begin
dNode := cNode.AddChild('text');
dNode.Text:=sl[i];
end;
sl.Free;
end;
cNode := mNode.AddChild('cdescription'); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>)
Wlength:= Length(mygoods.description);
Elength:= Length(SeparateEC(mygoods.description));
if Trim(Copy(mygoods.description,Elength,WLength-Elength-1) )=''
then
begin
dNode := cNode.AddChild('text');
end
else
begin
sl:=TStringList.Create;
sl.Text:=Copy(mygoods.description,Elength,WLength-Elength-1);
for i:=0 to sl.Count-1 do
begin
dNode := cNode.AddChild('text');
dNode.Text:=sl[i];
end;
sl.Free;
end;
cNode := mNode.AddChild('grossweight'); //* ë<><C3AB>
cNode.Text:= mygoods.grossweight;
cNode := mNode.AddChild('cbm'); //* <20><><EFBFBD><EFBFBD>
cNode.Text:= mygoods.cbm;
cNode := mNode.AddChild('specialgoods'); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>
dNode := cNode.AddChild('text');
dNode.Text := mygoods.specialgoods;
//<2F><><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>ӽڵ<D3BD> dr
mNode := pNode.AddChild('dr');
GetNBEDIdr(False,mydr);
cNode := mNode.AddChild('CLASS');
cNode.Text := mydr.ediCLASS;
cNode := mNode.AddChild('PAGE');
cNode.Text := mydr.PAGE;
cNode := mNode.AddChild('UNDGNO');
cNode.Text := mydr.UNDGNO;
cNode := mNode.AddChild('TECNAME');
cNode.Text := mydr.TECNAME;
cNode := mNode.AddChild('PACKGROUP');
cNode.Text := mydr.PACKGROUP ;
cNode := mNode.AddChild('LABEL');
dNode := cNode.AddChild('text');
dNode.Text := mydr.ediLABEL;
cNode := mNode.AddChild('FLASHPOINT');
cNode.Text := mydr.FLASHPOINT;
cNode := mNode.AddChild('FLASHUNIT');
cNode.Text := mydr.FLASHUNIT;
cNode := mNode.AddChild('EMSNO');
cNode.Text := mydr.EMSNO;
cNode := mNode.AddChild('MFAGNO');
cNode.Text := mydr.MFAGNO;
cNode := mNode.AddChild('MPT');
cNode.Text := mydr.MPT;
cNode := mNode.AddChild('Elinkman');
cNode.Text := mydr.Elinkman;
cNode := mNode.AddChild('DANGEROUS');
dNode := cNode.AddChild('text');
dNode.Text := mydr.DANGEROUS;
cNode := mNode.AddChild('TEMPERATURE');
cNode.Text := mydr.TEMPERATURE;
cNode := mNode.AddChild('TEMPERATUREUNIT');
cNode.Text := mydr.TEMPERATUREUNIT;
cNode := mNode.AddChild('MINTEMPERATURE');
cNode.Text := mydr.MINTEMPERATURE;
cNode := mNode.AddChild('MAXTEMPERATURE');
cNode.Text := mydr.MAXTEMPERATURE;
cNode := mNode.AddChild('ALLCOLDTORAGE');
cNode.Text := mydr.ALLCOLDTORAGE;
cNode := mNode.AddChild('VENTI');
cNode.Text := mydr.VENTI;
cNode := mNode.AddChild('REEFER');
dNode := cNode.AddChild('text');
dNode.Text := mydr.REEFER;
//<2F><><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>ӽڵ<D3BD> loadplan
mNode := pNode.AddChild('loadplan');
GetNBEDIloadplan(false,myloadolan);
cNode := mNode.AddChild('entryno');
cNode.Text := myloadolan.entryno;
cNode := mNode.AddChild('warehouse');
cNode.Text := myloadolan.warehouse;
cNode := mNode.AddChild('landcarrier');
cNode.Text := myloadolan.landcarrier;
cNode := mNode.AddChild('stuffdate');
// cNode.Text := myloadolan.stf
cNode := mNode.AddChild('stuffmode');
cNode.Text := myloadolan.stuffmode;
cNode := mNode.AddChild('stuffaddress');
cNode.Text := myloadolan.stuffaddress;
cNode := mNode.AddChild('stuffmemo');
cNode.Text := myloadolan.stuffmemo;
//<2F><><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>ӽڵ<D3BD> announce
mNode := pNode.AddChild('announce');
cNode := mNode.AddChild('text');
//<2F><><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>ӽڵ<D3BD> remarks
mNode := pNode.AddChild('remarks');
//<2F><>Ʒ<EFBFBD><C6B7> ֻҪ<D6BB><D2AA><EFBFBD><EFBFBD>VGM<47><4D><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD>
if editype <>'VERMAS' then
begin
GetNBEDIgoodsdetail(False,goodscount);
for i:=0 to goodscount-1 do
begin
mNode := pNode.AddChild('goodsdetail');
cNode := mNode.AddChild('cargosequenceno');
cNode.Text:=MyNBEDIgoodsdetail[i].cargosequenceno;
cNode := mNode.AddChild('marksandnumbers');
dNode := cNode.AddChild('text');
dNode.Text:=MyNBEDIgoodsdetail[i].marksandnumbers;
cNode := mNode.AddChild('noofpkgs');
cNode.Text:=MyNBEDIgoodsdetail[i].noofpkgs;
cNode := mNode.AddChild('packagingcode');
cNode.Text:=MyNBEDIgoodsdetail[i].packagingcode;
cNode := mNode.AddChild('packaging');
cNode.Text:=MyNBEDIgoodsdetail[i].packaging;
cNode := mNode.AddChild('cargoid');
cNode.Text:=MyNBEDIgoodsdetail[i].cargoid;
cNode := mNode.AddChild('hscode');
cNode.Text:=MyNBEDIgoodsdetail[i].hscode;
cNode := mNode.AddChild('description');
dNode := cNode.AddChild('text');
dNode.Text:=MyNBEDIgoodsdetail[i].description;
cNode := mNode.AddChild('cdescription');
dNode := cNode.AddChild('text');
dNode.Text:=MyNBEDIgoodsdetail[i].cdescription;
cNode := mNode.AddChild('grossweight');
cNode.Text:=MyNBEDIgoodsdetail[i].grossweight;
cNode := mNode.AddChild('cbm');
cNode.Text:=MyNBEDIgoodsdetail[i].cbm;
cNode := mNode.AddChild('specialgoods');
dNode := cNode.AddChild('text');
dNode.Text:=MyNBEDIgoodsdetail[i].specialgoods;
// <20><>ʤ<EFBFBD><CAA4>û<EFBFBD>м<EFBFBD>dr<64><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//dNode := cNode.AddChild('dr');
//eNode := dNode.AddChild('CLASS') ;
//ֻ<>д<EFBFBD>˾<EFBFBD><EFBFBD><E1B5A5>
if editype='SHPMIN' then
begin
cNode := mNode.AddChild('container');
for k:=0 to goods_ctn_count[i]-1 do
begin
dNode := cNode.AddChild('containers') ;
eNode := dNode.AddChild('containertype');
eNode.Text := MyNBEDIgoodsdetail_containers[i,k].containertype;
eNode := dNode.AddChild('containerno');
eNode.Text := MyNBEDIgoodsdetail_containers[i,k].containerno;
eNode := dNode.AddChild('sealno');
eNode.Text := MyNBEDIgoodsdetail_containers[i,k].sealno;
eNode := dNode.AddChild('containernoofpkgs');
eNode.Text := MyNBEDIgoodsdetail_containers[i,k].containernoofpkgs;
eNode := dNode.AddChild('containergrossweight');
eNode.Text := MyNBEDIgoodsdetail_containers[i,k].containergrossweight;
eNode := dNode.AddChild('containercbm');
eNode.Text := MyNBEDIgoodsdetail_containers[i,k].containercbm;
end;
end;
end;
end;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton5Click(Sender: TObject);
var
myhead:NBEDIhead;
myForward:NBEDIForward;
myreference:NBEDIreference;
mybaseinfo:NBEDIbaseinfo;
mycargo:NBEDIcargo;
mybooking:NBEDIbooking;
myfreight:NBEDIfreight;
myport:ediport;
myvessel:edivessel;
myinfo:ediinfo2nd;
ContainerCount,goodscount:Integer;
mygoods:NBEDIgoods;
mydr:NBEDIdr;
myloadolan:NBEDIloadplan;
i:Integer;
aQuery:TADOQuery;
SQLStr,CTNSQLStr,newno,ztdh:string;
mydm,mycc,myxx,mybxxs:string;
FileNames: string;
mybookmark:TBookmark;
begin
OpenDialog1.Filter:='xml<6D>ļ<EFBFBD>(*.xml)|*.xml|ȫ<><C8AB><EFBFBD>ļ<EFBFBD>(*.*)|*.*';
OpenDialog1.DefaultExt := '*.xml';
OpenDialog1.Execute;
FileNames := OpenDialog1.FileName;
if FileNames = '' then
begin
ShowMessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>');
Exit;
end;
XMLDocument1.LoadFromFile(FileNames);
GetNBEDIhead(True,myhead);
GetNBEDIForward(True,myForward);
GetNBEDIreference(True,myreference);
GetNBEDIbaseinfo(True,mybaseinfo);
GetNBEDIcargo(True,mycargo);
GetNBEDIbooking(True,mybooking);
GetNBEDIfreight(True,myfreight);
Getediport(True,myport);
Getedivessel(True,myvessel);
Getediinfo2nd(True,myinfo);
Getedicontainers(True,ContainerCount);
GetNBEDIgoods(True,mygoods);
GetNBEDIdr(True,mydr);
GetNBEDIloadplan(True,myloadolan);
GetNBEDIgoodsdetail(True,goodscount);
aQuery:=CreateAdoQuery ;
with aQuery do
begin
Close;
SQL.Clear;
SQL.Add('SELECT newid() AS <20><><EFBFBD><EFBFBD>');
open;
newno:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
SQLStr:='insert into t_op_seae_vgm (<28><><EFBFBD><EFBFBD>,<2C><EFBFBD><E1B5A5>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>˾,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>,<2C>ļ<EFBFBD><C4BC><EFBFBD><><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'<27><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>,<2C><EFBFBD><E1B5A5><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>绰,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>,<2C><><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>շ<EFBFBD><D5B7><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD>˸<EFBFBD><CBB8><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>˸۴<CBB8><DBB4><EFBFBD>,<2C>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ջ<EFBFBD><D5BB>ش<EFBFBD><D8B4><EFBFBD><><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><D0B6><EFBFBD>۴<EFBFBD><DBB4><EFBFBD>,Ŀ<>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>,Ŀ<>ĵش<C4B5><D8B4><EFBFBD>,'
+'ǩ<><C7A9><EFBFBD>ص<EFBFBD><><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ѷ<EFBFBD>ʽ,<2C><><EFBFBD>ѷ<EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>ͷ,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><>װ,<2C><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>,<2C><>ת<EFBFBD><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>ת<EFBFBD>۴<EFBFBD><DBB4><EFBFBD>) values ('
+QuotedStr(newno)+','
+QuotedStr(myreference.billofladingno)+','+QuotedStr(myhead.sndcom)+','+QuotedStr(myvessel.carrier)+','
+QuotedStr(myvessel.etd)+','+QuotedStr(myhead.editype)+','
+QuotedStr(myreference.blfreight)+','+QuotedStr(myhead.EdiName)+','+QuotedStr(myreference.workno)+','
+QuotedStr(myreference.bookingno)+','+QuotedStr(mybaseinfo.numberoforiginals)+','+QuotedStr(myhead.fromop)+','
+QuotedStr(myhead.fromtele)+','+QuotedStr(myhead.frommail)+','+QuotedStr(FormatDateTime('yyyy-mm-dd hh:mm:ss',myhead.sendtime))+','
+QuotedStr(myvessel.oceanvessel)+','+QuotedStr(myvessel.voyno)+','+QuotedStr(myhead.sndcom)+','
+QuotedStr(myhead.sndcom)+','+QuotedStr(myhead.EdiReceiver)+','+QuotedStr(mybaseinfo.orderman)+','
+QuotedStr(mybaseinfo.shipper)+','+QuotedStr(mybaseinfo.consignee)+','+QuotedStr(mybaseinfo.notifyparty)+','
+QuotedStr(mygoods.description)+','+QuotedStr(myport.portofloading)+','+QuotedStr(myport.co_portofloading)+','
+QuotedStr(myport.placeofreceipt)+','+QuotedStr(myport.co_placeofreceipt)+','
+QuotedStr(myport.portofdischarge)+','+QuotedStr(myport.co_portofdischarge)+','
+QuotedStr(myport.placeofdelivery)+','+QuotedStr(myport.co_placeofdelivery)+','
+QuotedStr(mybaseinfo.placeofissue)+','+QuotedStr(mybaseinfo.timeofissue)+','
+QuotedStr(mybaseinfo.paymentterm)+','+QuotedStr(mybaseinfo.paymenttermcode)+','
+QuotedStr(mybaseinfo.shippingitem)+','+QuotedStr(mygoods.marksandnumbers)+','
+QuotedStr(mygoods.grossweight)+','+QuotedStr(mygoods.cbm)+','+QuotedStr(mygoods.noofpkgs)+','+QuotedStr(mygoods.packaging)+','
+QuotedStr(mygoods.packagingcode)+','+QuotedStr(myport.portoftranship)+','+QuotedStr(myport.co_portoftranship)+')';
Close;
SQL.Clear;
SQL.Add(SQLStr);
ExecSQL;
for i:=0 to ContainerCount-1 do
begin
mydm:= GetCntr(MyContainers[i].containertype,mycc,myxx,mybxxs);
CTNSQLStr:='insert into t_op_ctn_vgm (<28><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C>ߴ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><>װ,<2C><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><>ͷ,VGM<47><4D><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'VGM<47><4D><EFBFBD>ط<EFBFBD>ʽ,VGM<47><4D><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>,VGM<47><4D>ϵ<EFBFBD><CFB5>λ,VGM<47><4D>ϵ<EFBFBD><CFB5>,VGM<47><4D>ϵ<EFBFBD>绰,<2C><><EFBFBD><EFBFBD><E1B5A5>) values ('+QuotedStr(newno)+','
+QuotedStr(mydm)+','+QuotedStr(mycc)+','+QuotedStr(myxx)+','+QuotedStr(mybxxs)+','+MyContainers[i].containernoofpkgs+','
+QuotedStr(MyContainers[i].containerno)+','+QuotedStr(MyContainers[i].sealno)+','+QuotedStr(MyContainers[i].containerpackaging)+','
+QuotedStr(MyContainers[i].containerpackagingcode)+','+MyContainers[i].containergrossweight+','+MyContainers[i].containercbm+','
+QuotedStr(MyContainers[i].containerdescription)+','+QuotedStr(MyContainers[i].containermarksandnumbers)+','
+MyContainers[i].vgmgrossmassweight+','+QuotedStr(MyContainers[i].vgmweighingmethod)+','+QuotedStr(MyContainers[i].vgmweighingtime)+','
+QuotedStr(MyContainers[i].vgmresponsibleparty)+','+QuotedStr(MyContainers[i].vgmauthorizedperson)+','
+QuotedStr(MyContainers[i].vgmauthorizedpersontele)+','+QuotedStr(myreference.billofladingno)+')';
Close;
SQL.Clear;
SQL.Add(CTNSQLStr);
ExecSQL;
end;
end;
FreeAndNil(aQuery);
mybookmark:= t_op_seae_vgm.GetBookmark;
t_op_seae_vgm.Requery();
t_op_seae_vgm.GotoBookmark(mybookmark);
with t_op_ctn_vgm do
begin
close;
SQL.Clear;
SQL.Add('select * from t_op_ctn_vgm where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) );
Open;
end;
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>');
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton6Click(Sender: TObject);
begin
HasM:=False;
MakeVGM(t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
if HasM then Exit;
if SaveDialog1.Execute then
begin
XMLDocument1.SaveToFile(SaveDialog1.FileName+'.XML');
XMLDocument1.Active:=False;
showmessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ɳɹ<C9B3><C9B9><EFBFBD>');
end
else
begin
showmessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>');
exit;
end;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton1Click(Sender: TObject);
begin
t_op_seae_vgm.Prior;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton2Click(Sender: TObject);
begin
t_op_seae_vgm.Next;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton17Click(Sender: TObject);
begin
table_delete(t_op_seae_vgm);
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton14Click(Sender: TObject);
begin
table_delete(t_op_ctn_vgm);
end;
procedure Tfrm_op_seae_vgm_data.t_op_seae_vgmAfterScroll(
DataSet: TDataSet);
begin
with t_op_ctn_vgm do
begin
close;
SQL.Clear;
SQL.Add('select * from t_op_ctn_vgm where <20><><EFBFBD><EFBFBD>='+QuotedStr(t_op_seae_vgm.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) );
Open;
end;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton21Click(Sender: TObject);
var
SQLStr,WhereStr:string;
begin
SQLStr:='select * from t_op_seae_vgm ';
WhereStr:=' where 1=1 ';
if Trim(Edit1.Text) <>'' then WhereStr:=WhereStr+' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+QuotedStr(Edit1.Text);
if Trim(Edit2.Text) <>'' then WhereStr:=WhereStr+' and <20><EFBFBD><E1B5A5>='+QuotedStr(Edit2.Text);
if Trim(Edit3.Text) <>'' then WhereStr:=WhereStr+' and <20>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+QuotedStr(Edit3.Text);
if Trim(Edit4.Text) <>'' then WhereStr:=WhereStr+' and <20><><EFBFBD><EFBFBD>˾='+QuotedStr(Edit4.Text);
if Trim(Edit5.Text) <>'' then WhereStr:=WhereStr+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+QuotedStr(Edit5.Text);
if Trim(wwDBComboBox1.Text) <>'' then WhereStr:=WhereStr+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+QuotedStr(wwDBComboBox1.Text);
if Trim(wwDBComboBox3.Text) <>'' then WhereStr:=WhereStr+' and <20><>ִ״̬='+QuotedStr(wwDBComboBox3.Text);
if Trim(wwDBDateTimePicker4.Text)<>'' then WhereStr:=WhereStr+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+QuotedStr(wwDBDateTimePicker4.Text);
if Trim(wwDBDateTimePicker5.Text)<>'' then WhereStr:=WhereStr+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+QuotedStr(wwDBDateTimePicker5.Text);
if Trim(wwDBDateTimePicker6.Text)<>'' then WhereStr:=WhereStr+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+QuotedStr(wwDBDateTimePicker6.Text);
if Trim(wwDBDateTimePicker7.Text)<>'' then WhereStr:=WhereStr+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+QuotedStr(wwDBDateTimePicker7.Text);
with t_op_seae_vgm do
begin
Close;
SQL.Clear;
SQL.Add(SQLStr+WhereStr);
Open;
end;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton22Click(Sender: TObject);
begin
if not assigned(frm_edi_vgm_weihu) then frm_edi_vgm_weihu:=Tfrm_edi_vgm_weihu.Create(self);
frm_edi_vgm_weihu.ShowModal;
end;
procedure Tfrm_op_seae_vgm_data.bsSkinButton19Click(Sender: TObject);
begin
if t_op_seae_vgm.IsEmpty then Exit;
if (t_op_seae_vgm.State = dsinsert) or (t_op_seae_vgm.State = dsedit) then t_op_seae_vgm.Post;
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤', 2, ds_op_seae_vgm, nil, nil, nil, ds_op_ctn_vgm, nil, nil, nil, nil, nil, nil);
end;
procedure Tfrm_op_seae_vgm_data.t_op_seae_vgmBeforePost(DataSet: TDataSet);
function getnewid():string;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
With aQuery do begin
Close;SQL.Clear;
SQL.Text:='select NEWID() NEWID ';
Open;
Result:=Fieldbyname('NEWID').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
begin
if (t_op_seae_vgm.FieldByName(<28><><EFBFBD><EFBFBD>).AsString='') then begin
t_op_seae_vgm.FieldByName(<28><><EFBFBD><EFBFBD>).AsString:=getnewid;
end;
end;
end.