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.

5236 lines
171 KiB
Plaintext

11 months ago
unit u_op_seae_edi_data;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,IdFTP,IdFTPCommon,DateUtils,
Dialogs, bsSkinCtrls, ExtCtrls, DB, ADODB, dxExEdtr, dxCntner, dxTL,
dxDBCtrl, dxDBGrid, ComCtrls, bsSkinTabs, RxLookup, StdCtrls, Mask,inifiles,
DBCtrls, wwdbdatetimepicker, wwdblook, u_op_sate, u_fee, u_op_card, Menus,
dxDBTLCl, dxGrClms, bsdbctrls, XPMenu, wwdbedit, Wwdotdot, Wwdbcomb,
Grids, Wwdbigrd, Wwdbgrid, FtpCli, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdIntercept, IdLogBase, IdLogEvent,DBClient,
IdAntiFreezeBase, IdAntiFreeze, dxEditor, dxEdLib, dxDBELib, DBCtrlsEh
,ComObj,DsWebService,SoapHTTPClient,InvokeRegistry,XMLIntf,XMLDoc, xmldom, Xmlxform,
msxmldom, bsSkinBoxCtrls,DyxtService,Service,jfczService,myService,CaragtQuery_Cxwl,IdHTTP,
kbmMemTable, cxControls, cxContainer, cxCheckListBox, cxDBCheckListBox,
IdExplicitTLSClientServerBase;
type
Tfrm_op_seae_edi_data = class(TForm)
Panel2: TPanel;
bsSkinButton7: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton38: TbsSkinButton;
Notebook1: TNotebook;
t_op_seae: TADOQuery;
t_op_seae1: TDataSource;
dxDBGrid1: TdxDBGrid;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinPanel1: TbsSkinPanel;
Label1: TLabel;
Label2: TLabel;
Label38: TLabel;
DBEdit1: TDBEdit;
DBEdit9: TDBEdit;
PopupMenu3: TPopupMenu;
N37: TMenuItem;
N38: TMenuItem;
N62: TMenuItem;
N25: TMenuItem;
N64: TMenuItem;
N63: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridDateColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridMaskColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridDateColumn;
dxDBGrid1Column17: TdxDBGridColumn;
XPMenu1: TXPMenu;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
bsSkinPanel2: TbsSkinPanel;
Label47: TLabel;
Label49: TLabel;
Label51: TLabel;
wwDBDateTimePicker9: TwwDBDateTimePicker;
wwDBDateTimePicker11: TwwDBDateTimePicker;
Edit3: TEdit;
wwDBDateTimePicker12: TwwDBDateTimePicker;
Label52: TLabel;
wwDBDateTimePicker13: TwwDBDateTimePicker;
Label53: TLabel;
bsSkinButton8: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
Label60: TLabel;
DBEdit10: TDBEdit;
bsSkinButton14: TbsSkinButton;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
dxDBGrid1Column65: TdxDBGridColumn;
dxDBGrid1Column67: TdxDBGridColumn;
wwDBComboBoxType: TwwDBComboBox;
Label45: TLabel;
Label48: TLabel;
wwDBComboBox2: TwwDBComboBox;
bsSkinGroupBox4: TbsSkinGroupBox;
Label54: TLabel;
DBEdit46: TDBEdit;
Label55: TLabel;
DBEdit48: TDBEdit;
Label56: TLabel;
DBEdit50: TDBEdit;
Label59: TLabel;
t_op_ctn1: TDataSource;
t_op_ctn: TADOQuery;
strngfld_op_ctnDSDesigner2: TStringField;
strngfld_op_ctnDSDesigner6: TStringField;
intgrfld_op_ctnDSDesigner5: TIntegerField;
strngfld_op_ctnDSDesigner7: TStringField;
strngfld_op_ctnDSDesigner8: TStringField;
intgrfld_op_ctnDSDesigner9: TIntegerField;
strngfld_op_ctnDSDesigner10: TStringField;
bcdfld_op_ctnDSDesigner11: TBCDField;
bcdfld_op_ctnDSDesigner12: TBCDField;
strngfld_op_ctnDSDesigner14: TStringField;
intgrfld_op_ctnTEU: TIntegerField;
strngfld_op_ctnDSDesigner4: TStringField;
strngfld_op_ctnDSDesigner3: TStringField;
atncfld_op_ctnctn_id: TAutoIncField;
strngfld_op_ctnDSDesigner: TStringField;
wwDBComboBox3: TwwDBComboBox;
t_op_ctnDSDesigner: TStringField;
t_op_ctnPO: TStringField;
t_op_ctnSKU: TStringField;
t_op_ctnSKU2: TStringField;
t_op_ctnUN: TStringField;
t_op_ctnHTS: TStringField;
t_op_ctnDSDesigner2: TStringField;
t_op_ctnDSDesigner3: TBCDField;
bsSkinPanel5: TbsSkinPanel;
bsSkinGroupBox1: TbsSkinGroupBox;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
bsSkinSpeedButton1: TbsSkinSpeedButton;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
DBEdit7: TDBEdit;
bsSkinGroupBox2: TbsSkinGroupBox;
Label16: TLabel;
Label17: TLabel;
Label18: TLabel;
bsSkinSpeedButton2: TbsSkinSpeedButton;
DBEdit17: TDBEdit;
DBEdit19: TDBEdit;
DBEdit20: TDBEdit;
bsSkinGroupBox3: TbsSkinGroupBox;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
bsSkinSpeedButton3: TbsSkinSpeedButton;
DBEdit28: TDBEdit;
DBEdit29: TDBEdit;
DBEdit30: TDBEdit;
bsSkinGroupBox5: TbsSkinGroupBox;
DBMemo3: TDBMemo;
bsSkinGroupBox7: TbsSkinGroupBox;
DBMemo1: TDBMemo;
bsSkinGroupBox8: TbsSkinGroupBox;
DBMemo2: TDBMemo;
t_op_ctnDSDesigner4: TStringField;
SaveDialog1: TSaveDialog;
t_op_ctn_detail: TADOQuery;
IntegerField1: TIntegerField;
StringField8: TStringField;
BCDField1: TBCDField;
BCDField2: TBCDField;
StringField12: TStringField;
StringField13: TStringField;
BCDField3: TBCDField;
t_op_ctn_detail1: TDataSource;
t_op_ctn_detailctn_id: TIntegerField;
bsSkinButton19: TbsSkinButton;
Label73: TLabel;
bsSkinButton20: TbsSkinButton;
Label74: TLabel;
bsSkinButton21: TbsSkinButton;
Label75: TLabel;
RxDBLookupCombo16: TRxDBLookupCombo;
RxDBLookupCombo1: TRxDBLookupCombo;
RxDBLookupCombo2: TRxDBLookupCombo;
t_code_shiper: TADOQuery;
t_code_shiper1: TDataSource;
t_code_consignee: TADOQuery;
t_code_consignee1: TDataSource;
t_code_notifyparty: TADOQuery;
t_code_notifyparty1: TDataSource;
bsSkinGroupBox11: TbsSkinGroupBox;
Label61: TLabel;
Label62: TLabel;
Label70: TLabel;
Label71: TLabel;
Label72: TLabel;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Edit7: TEdit;
EditType: TEdit;
bsSkinButton16: TbsSkinButton;
bsSkinButton17: TbsSkinButton;
bsSkinButton18: TbsSkinButton;
FtpClient1: TFtpClient;
lblstatus: TLabel;
IdFTP1: TIdFTP;
IdAntiFreeze1: TIdAntiFreeze;
IdLogEvent1: TIdLogEvent;
DebugListBox: TListBox;
StatusBar1: TStatusBar;
ProgressBar1: TProgressBar;
Label76: TLabel;
bsSkinButton22: TbsSkinButton;
PopupMenu4: TPopupMenu;
NZY: TMenuItem;
wwDBDateTimePicker3: TwwDBDateTimePicker;
Label77: TLabel;
Label78: TLabel;
bsSkinButton23: TbsSkinButton;
N4: TMenuItem;
NZT: TMenuItem;
NWD2101: TMenuItem;
dxDBGrid1Column20: TdxDBGridColumn;
dxDBGrid1Column21: TdxDBGridColumn;
N7: TMenuItem;
NWD1101: TMenuItem;
Label80: TLabel;
Edit1: TEdit;
Label217: TLabel;
wwDBLookupCombo26: TwwDBLookupCombo;
Label218: TLabel;
Edit8: TEdit;
Label81: TLabel;
Edit2: TEdit;
N8: TMenuItem;
N9: TMenuItem;
N19: TMenuItem;
NWY: TMenuItem;
NLD: TMenuItem;
NHG: TMenuItem;
NYD: TMenuItem;
wwDBLookupCombo21: TwwDBLookupCombo;
RxDBLookupCombo15: TRxDBLookupCombo;
wwDBLookupCombo20: TwwDBLookupCombo;
N3: TMenuItem;
NHF: TMenuItem;
Label58: TLabel;
wwDBComboBoxOP: TwwDBComboBox;
N5: TMenuItem;
NZH: TMenuItem;
bsSkinButton25: TbsSkinButton;
wwDBLookupCombo3: TwwDBLookupCombo;
wwDBLookupCombo52: TwwDBLookupCombo;
wwDBLookupCombo17: TwwDBLookupCombo;
N6: TMenuItem;
NHGYDT: TMenuItem;
OpenDialog1: TOpenDialog;
t_op_state1: TDataSource;
t_op_state: TADOQuery;
N20: TMenuItem;
Panel1: TPanel;
bsSkinGroupBox9: TbsSkinGroupBox;
Label68: TLabel;
Label169: TLabel;
Label63: TLabel;
Label64: TLabel;
Label65: TLabel;
Label66: TLabel;
Label67: TLabel;
Label106: TLabel;
Label105: TLabel;
Label109: TLabel;
Label108: TLabel;
Label69: TLabel;
Label83: TLabel;
wwDBComboBox15: TwwDBComboBox;
DBEdit81: TDBEdit;
wwDBLookupCombo61: TwwDBLookupCombo;
DBEdit82: TDBEdit;
DBEdit83: TDBEdit;
DBMemo38: TDBMemo;
DBMemo39: TDBMemo;
DBEdit55: TDBEdit;
wwDBComboBox6: TwwDBComboBox;
DBEdit56: TDBEdit;
DBEdit57: TDBEdit;
bsSkinButton47: TbsSkinButton;
bsSkinButton24: TbsSkinButton;
bsSkinButton26: TbsSkinButton;
DBEdit2: TDBEdit;
bsSkinGroupBox6: TbsSkinGroupBox;
wwDBGrid1: TwwDBGrid;
bsSkinPanel9: TbsSkinPanel;
bsSkinButton56: TbsSkinButton;
bsSkinButton57: TbsSkinButton;
bsSkinButton58: TbsSkinButton;
bsSkinButton59: TbsSkinButton;
btnMarks: TbsSkinButton;
btnDesc: TbsSkinButton;
btnSeal: TbsSkinButton;
bsSkinButton15: TbsSkinButton;
bsSkinButton28: TbsSkinButton;
wwDBLookupCombo16: TwwDBLookupCombo;
wwDBLookupComboctn: TwwDBLookupCombo;
wwDBComboBoxOwner: TwwDBComboBox;
bsSkinExPanel1: TbsSkinExPanel;
bsSkinPanel6: TbsSkinPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
wwDBGrid2: TwwDBGrid;
N22: TMenuItem;
bsSkinComboBox1: TbsSkinComboBox;
Label3: TLabel;
N2: TMenuItem;
N21: TMenuItem;
N23: TMenuItem;
bsSkinButton29: TbsSkinButton;
bsSkinButton30: TbsSkinButton;
bsSkinLabel1: TbsSkinLabel;
bsSkinLabel2: TbsSkinLabel;
bsSkinLabel3: TbsSkinLabel;
bsSkinLabel4: TbsSkinLabel;
bsSkinLabel5: TbsSkinLabel;
DBEdit3: TDBEdit;
PopupMenu5: TPopupMenu;
ABC1: TMenuItem;
bsSkinButton27: TbsSkinButton;
dxDBGrid1Column23: TdxDBGridColumn;
bsSkinLabel6: TbsSkinLabel;
bsSkinButton33: TbsSkinButton;
kbmMemTable1: TkbmMemTable;
kbmMemTable1StringField: TStringField;
kbmMemTable1StringField2: TStringField;
kbmMemTable1IntegerField: TIntegerField;
kbmMemTable1StringField3: TStringField;
kbmMemTable1FloatField: TFloatField;
kbmMemTable1FloatField2: TFloatField;
kbmMemTable1StringField4: TStringField;
kbmMemTable1StringField5: TStringField;
kbmMemTable1StringField6: TStringField;
Label12: TLabel;
RxDBLookupCombo9: TRxDBLookupCombo;
cxDBCheckListBox1: TcxDBCheckListBox;
Label36: TLabel;
Label37: TLabel;
Label39: TLabel;
Label44: TLabel;
Label46: TLabel;
DBEdit38: TDBEdit;
DBEdit39: TDBEdit;
DBEdit40: TDBEdit;
DBEdit43: TDBEdit;
wwDBDateTimePicker1: TwwDBDateTimePicker;
bsSkinButton32: TbsSkinButton;
bsSkinButton31: TbsSkinButton;
bsSkinExPanel2: TbsSkinExPanel;
dxDBGrid3: TdxDBGrid;
dxDBGrid3Column2: TdxDBGridColumn;
dxDBGridColumn1: TdxDBGridColumn;
Label4: TLabel;
DBEdit4: TDBEdit;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Panel2Resize(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton38Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure bsSkinSpeedButton1Click(Sender: TObject);
procedure bsSkinSpeedButton2Click(Sender: TObject);
procedure bsSkinSpeedButton3Click(Sender: TObject);
procedure bsSkinButton56Click(Sender: TObject);
procedure bsSkinButton57Click(Sender: TObject);
procedure bsSkinButton58Click(Sender: TObject);
procedure bsSkinButton59Click(Sender: TObject);
procedure wwDBLookupComboctnChange(Sender: TObject);
procedure btnMarksClick(Sender: TObject);
procedure btnDescClick(Sender: TObject);
procedure t_op_ctnAfterInsert(DataSet: TDataSet);
procedure wwDBGrid1ColEnter(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure t_op_ctn_detailAfterInsert(DataSet: TDataSet);
procedure t_op_ctn_detailBeforePost(DataSet: TDataSet);
procedure t_op_ctn_detailBeforeInsert(DataSet: TDataSet);
procedure bsSkinButton17Click(Sender: TObject);
procedure bsSkinButton19Click(Sender: TObject);
procedure bsSkinButton20Click(Sender: TObject);
procedure bsSkinButton21Click(Sender: TObject);
procedure RxDBLookupCombo16Enter(Sender: TObject);
procedure RxDBLookupCombo16Exit(Sender: TObject);
procedure RxDBLookupCombo1Enter(Sender: TObject);
procedure RxDBLookupCombo1Exit(Sender: TObject);
procedure RxDBLookupCombo2Enter(Sender: TObject);
procedure RxDBLookupCombo2Exit(Sender: TObject);
procedure RxDBLookupCombo16Change(Sender: TObject);
procedure RxDBLookupCombo1Change(Sender: TObject);
procedure RxDBLookupCombo2Change(Sender: TObject);
procedure IdFTP1Status(ASender: TObject; const AStatus: TIdStatus;
const AStatusText: String);
procedure IdFTP1Work(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCount: Integer);
procedure IdFTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCountMax: Integer);
procedure IdFTP1WorkEnd(Sender: TObject; AWorkMode: TWorkMode);
procedure bsSkinButton22Click(Sender: TObject);
procedure NZYClick(Sender: TObject);
procedure bsSkinButton23Click(Sender: TObject);
procedure NZTClick(Sender: TObject);
procedure NWD2101Click(Sender: TObject);
procedure t_op_ctnBeforePost(DataSet: TDataSet);
procedure NWD1101Click(Sender: TObject);
procedure NYDClick(Sender: TObject);
procedure NLDClick(Sender: TObject);
procedure NWYClick(Sender: TObject);
procedure NHGClick(Sender: TObject);
procedure btnSealClick(Sender: TObject);
procedure NHFClick(Sender: TObject);
procedure wwDBComboBoxOPDropDown(Sender: TObject);
procedure NZHClick(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure bsSkinButton47Click(Sender: TObject);
procedure bsSkinButton24Click(Sender: TObject);
procedure bsSkinButton25Click(Sender: TObject);
procedure bsSkinButton26Click(Sender: TObject);
procedure wwDBLookupCombo3Change(Sender: TObject);
procedure wwDBLookupCombo3Exit(Sender: TObject);
procedure wwDBLookupCombo52Change(Sender: TObject);
procedure wwDBLookupCombo52Exit(Sender: TObject);
procedure wwDBLookupCombo17Change(Sender: TObject);
procedure wwDBLookupCombo17Exit(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure bsSkinButton28Click(Sender: TObject);
procedure NHGYDTClick(Sender: TObject);
procedure bsSkinButton29Click(Sender: TObject);
procedure t_op_seaeBeforeEdit(DataSet: TDataSet);
procedure t_op_ctnBeforeEdit(DataSet: TDataSet);
procedure N20Click(Sender: TObject);
procedure bsSkinButton30Click(Sender: TObject);
procedure bsSkinComboBox1Change(Sender: TObject);
procedure bsSkinButton31Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure bsSkinButton32Click(Sender: TObject);
procedure t_op_seaeBeforeDelete(DataSet: TDataSet);
procedure DBEdit3Change(Sender: TObject);
procedure bsSkinLabel1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure bsSkinLabel2MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure bsSkinLabel3MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure bsSkinLabel4MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure bsSkinLabel5MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure bsSkinButton27Click(Sender: TObject);
procedure bsSkinLabel6MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure t_op_seaeAfterInsert(DataSet: TDataSet);
procedure bsSkinButton33Click(Sender: TObject);
procedure RxDBLookupCombo9Enter(Sender: TObject);
procedure RxDBLookupCombo9KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo9Exit(Sender: TObject);
private
{ Private declarations }
AbortTransfer: Boolean;
TransferrignData: Boolean;
BytesToTransfer: LongWord;
STime: TDateTime;
mServiceSoap_Ds:DsWebServiceSoap;
mHttpRIO_ds:THTTPRIO;
mServiceSoap_dy:DyxtServiceSoap;
mServiceSoap_yzh:ServiceSoap;
mServiceSoap_zc:CaragtQuery_CxwlSoap;
mHttpRIO_dy,mHttpRIO_yzh,mHttpRIO_zc:THTTPRIO;
procedure getwebservice_dy; //<2F><>ȡ
procedure getwebservice_yzh; //<2F><>ȡ
procedure getwebservice_zc; //<2F><>ȡ
procedure dewebservice; //<2F>ر<EFBFBD>
procedure GetdyczInfo_dy(s_caragt,s_key,s_billno,bsno:String);
procedure GetdyczInfo_yzh(s_caragt,s_key,s_billno,bsno:String);
procedure GetdyczInfo_jfcz(s_caragt,s_key,s_billno,bsno:String);
procedure GetdyczInfo_lhcz(s_caragt,s_key,s_billno,bsno:String);
procedure GetdyczInfo_zc(s_caragt,s_key,s_billno,bsno:String);
procedure getssczinfor(mblno:string);
procedure setconcolor; //<2F><><EFBFBD>ÿؼ<C3BF><D8BC><EFBFBD><EFBFBD><EFBFBD>ɫ
function getCtnAfr(code:string):string;
function getPkgAfr(code:string):string;
function formatAfrstr(str:string):string;
procedure PutToDebugLog(Operation, S1: String);
function isEditrue(DataSet:TDataSet): boolean;
public
{ Public declarations }
dbserver:string;
function GetStrChar(str:String):string;
function GetStrChar_1(str:String):string;
function GetpkgsEdi(pkgs: String): String;
procedure UpdateCTN(BSNO:STRING);
procedure getwebservice_ds;
function IsZhongwen(Str: String): Boolean;
function CreateSIEdiFile_XML:TStrings;
function GetCtnCode(ctnkind,ctnsize:String): String;
procedure UpdateInfor;
procedure SelectReciveData(bsno,mblno:string);
end;
var
frm_op_seae_edi_data: Tfrm_op_seae_edi_data;
AverageSpeed: Double = 0;
implementation
uses u_main,u_data_share, my_sys_function, u_sys_progress, u_code_edicode,
u_op_seae_edi_custom_cosco, u_op_seae_edi_custom_zt,
u_op_seae_edi_custom_WaiDai, u_op_seae_edi_custom_WaiDai_1101,
u_op_seae_edi_custom_yd, u_op_seae_edi_custom_LD, u_op_seae_edi_custom_wy,
u_op_seae_edi_custom_hg, u_op_seae_edi_custom_zh,
u_op_seae_edi_custom_hgydt;
{$R *.dfm}
procedure Tfrm_op_seae_edi_data.getwebservice_dy;
begin
try
mHttpRIO_dy:=THTTPRIO.Create(nil);
mHttpRIO_dy.WSDLLocation:='http://www.yydy.com/GacoWebService/DyxtService.asmx?WSDL';
mHttpRIO_dy.URL:='http://www.yydy.com/GacoWebService/DyxtService.asmx';
mHttpRIO_dy.Port:='DyxtServiceSoap';
mHttpRIO_dy.Service:='DyxtWebService';
mHttpRIO_dy.HTTPWebNode.UseUTF8InHeader:=true;
mServiceSoap_dy:=mHttpRIO_dy as DyxtServiceSoap;
InvRegistry.RegisterInvokeOptions(TypeInfo(DyxtServiceSoap),ioDocument );//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
except
on E:Exception do
begin
ShowMessage(e.Message);
exit;
end;
end;
end;
procedure Tfrm_op_seae_edi_data.getwebservice_zc;
begin
try
mHttpRIO_zc:=THTTPRIO.Create(nil);
mHttpRIO_zc.WSDLLocation:='http://www.cmlog.com.cn:8003/cmlwebservice/CaragtQuery_Cxwl.asmx?WSDL';
mHttpRIO_zc.URL:='http://www.cmlog.com.cn:8003/cmlwebservice/CaragtQuery_Cxwl.asmx';
mHttpRIO_zc.Port:='CaragtQuery_CxwlSoap';
mHttpRIO_zc.Service:='CaragtQuery_Cxwl';
mHttpRIO_zc.HTTPWebNode.UseUTF8InHeader:=true;
mServiceSoap_zc:=mHttpRIO_zc as CaragtQuery_CxwlSoap;
InvRegistry.RegisterInvokeOptions(TypeInfo(CaragtQuery_CxwlSoap),ioDocument );//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
except
on E:Exception do
begin
ShowMessage(e.Message);
exit;
end;
end;
end;
procedure Tfrm_op_seae_edi_data.getwebservice_yzh;
begin
try
mHttpRIO_yzh:=THTTPRIO.Create(nil);
mHttpRIO_yzh.WSDLLocation:='http://222.173.95.170:78/Service.asmx?WSDL';
mHttpRIO_yzh.URL:='http://222.173.95.170:78/Service.asmx';
mHttpRIO_yzh.Port:='ServiceSoap';
mHttpRIO_yzh.Service:='WebService';
mHttpRIO_yzh.HTTPWebNode.UseUTF8InHeader:=true;
mServiceSoap_yzh:=mHttpRIO_yzh as ServiceSoap;
InvRegistry.RegisterInvokeOptions(TypeInfo(ServiceSoap),ioDocument );//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
{
mHttpRIO_yzh:=THTTPRIO.Create(nil);
mHttpRIO_yzh.WSDLLocation:='http://www.eimskipdepot.com:78/Service.asmx?WSDL';
mHttpRIO_yzh.URL:='http://www.eimskipdepot.com:78/Service.asmx';
mHttpRIO_yzh.Port:='ServiceSoap';
mHttpRIO_yzh.Service:='WebService';
mHttpRIO_yzh.HTTPWebNode.UseUTF8InHeader:=true;
mServiceSoap_yzh:=mHttpRIO_yzh as ServiceSoap;
InvRegistry.RegisterInvokeOptions(TypeInfo(ServiceSoap),ioDocument );//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
}
except
on E:Exception do
begin
ShowMessage(e.Message);
exit;
end;
end;
end;
procedure Tfrm_op_seae_edi_data.dewebservice;
begin
mHttpRIO_dy.Free;
end;
procedure Tfrm_op_seae_edi_data.GetdyczInfo_jfcz(s_caragt,s_key,s_billno,bsno:String);
var
b:Boolean;
s_web: WideString;
xmldoc:IXMLDocument;
cds:TClientDataSet;
XMLTransformProvider1:TXMLTransformProvider;
s_ctnno,s_ctnType:string;
smartWS:jfczServiceSoap;
begin
try
t_op_ctn.DisableControls;
cds:=TClientDataSet.Create(nil);
XMLTransformProvider1:=TXMLTransformProvider.Create(NIL);
cds.Active:=false;
xmldoc:=NewXMLDocument;
xmldoc.Encoding:='UTF-8';
smartWS:=GetServiceSoapJFCZ(True,'',nil);
s_web:=smartWS.GetBLNoInfo(s_billno);
xmldoc.LoadFromXML(s_web);
xmldoc.SaveToFile('c:\JFCZ.xml');
// ShowMessage('\\'+dbserver+'\jfcz\jfcz.xtr');
XMLTransformProvider1.TransformRead.TransformationFile:='\\'+dbserver+'\jfcz\jfcz.xtr';
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=true;
kbmMemTable1.EmptyTable;
kbmMemTable1.Open;
with cds do
begin
First;
while not Eof do
begin
if kbmMemTable1.Locate('<27><><EFBFBD><EFBFBD>',Trim(FieldByName('CNTRNO').AsString),[]) then
begin
kbmMemTable1.Edit;
s_ctnno:=Trim(FieldByName('CNTRSIZE').AsString);
s_ctnType:=Trim(FieldByName('CNTRTYPE').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
kbmMemTable1.FieldByName('<27>ߴ<EFBFBD>').AsString:=FieldByName('CNTRSIZE').AsString;
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('CNTRTYPE').AsString;
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('SEALNO').AsString;
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger+FieldByName('CARGOQTY').AsInteger;
kbmMemTable1.FieldByName('<27><>װ').AsString:=FieldByName('CO_PKGCODE').AsString;
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat+FieldByName('CARGOWEIGHT').AsFloat;
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat+FieldByName('CARGOVOLUME').AsFloat;
kbmMemTable1.Post;
end
else
begin
kbmMemTable1.append;
s_ctnno:=Trim(FieldByName('CNTRSIZE').AsString);
s_ctnType:=Trim(FieldByName('CNTRTYPE').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
kbmMemTable1.FieldByName('<27>ߴ<EFBFBD>').AsString:=FieldByName('CNTRSIZE').AsString;
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('CNTRTYPE').AsString;
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('CNTRNO').AsString;
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('SEALNO').AsString;
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('CARGOQTY').AsInteger;
kbmMemTable1.FieldByName('<27><>װ').AsString:=FieldByName('CO_PKGCODE').AsString;
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('CARGOWEIGHT').AsFloat;
kbmMemTable1.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('CARGOVOLUME').AsFloat;
kbmMemTable1.Post;
end;
Next;
end;
end;
with kbmMemTable1 do
begin
First;
while not Eof do
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',Trim(FieldByName('<27><><EFBFBD><EFBFBD>').AsString),[]) then
begin
t_op_ctn.Edit;
s_ctnno:=Trim(FieldByName('<27>ߴ<EFBFBD>').AsString);
s_ctnType:=Trim(FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
t_op_ctn.FieldByName('<27><>װ').AsString:=FieldByName('<27><>װ').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_ctn.Post;
end
else
begin
t_op_ctn.append;
s_ctnno:=Trim(FieldByName('<27>ߴ<EFBFBD>').AsString);
s_ctnType:=Trim(FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
t_op_ctn.FieldByName('<27><>װ').AsString:=FieldByName('<27><>װ').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_ctn.Post;
end;
Next;
end;
end;
finally
t_op_ctn.EnableControls;
cds.Free;
end;
end;
procedure Tfrm_op_seae_edi_data.GetdyczInfo_dy(s_caragt,s_key,s_billno,bsno:String);
var
b:Boolean;
s_web: WideString;
xmldoc:IXMLDocument;
cds:TClientDataSet;
XMLTransformProvider1:TXMLTransformProvider;
s_ctnno,s_ctnType:string;
begin
try
t_op_ctn.DisableControls;
getwebservice_dy;
cds:=TClientDataSet.Create(nil);
XMLTransformProvider1:=TXMLTransformProvider.Create(NIL);
// s_billno:='HLCUTA1130371756'; //QDJY000476
cds.Active:=false;
xmldoc:=NewXMLDocument;
xmldoc.Encoding:='UTF-8';
s_web:=mServiceSoap_dy.GetCtnChargeXml(s_caragt,s_key,s_billno,'','1');
xmldoc.LoadFromXML(s_web);
xmldoc.SaveToFile('c:\<5C><><EFBFBD><EFBFBD>.xml');
XMLTransformProvider1.TransformRead.TransformationFile:='\\'+dbserver+'\<5C><><EFBFBD>dz<EFBFBD>վ\<5C><><EFBFBD><EFBFBD>.xtr';
// XMLTransformProvider1.TransformRead.TransformationFile:=ExtractFilePath(Application.ExeName)+'\<5C><><EFBFBD>dz<EFBFBD>վ\<5C><><EFBFBD><EFBFBD>.xtr';
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=true;
with cds do
begin
First;
while not Eof do
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',Trim(FieldByName('CTNNO').AsString),[]) then
begin
t_op_ctn.Edit;
s_ctnno:=Trim(FieldByName('CTNSZ').AsString);
s_ctnType:=Trim(FieldByName('CTNTP').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=StringReplace(Copy(FieldByName('EMFUEDT').AsString,1,Pos('.',FieldByName('EMFUEDT').AsString)-1),'T',' ',[]);
t_op_ctn.Post;
end
else
begin
t_op_ctn.append;
s_ctnno:=Trim(FieldByName('CTNSZ').AsString);
s_ctnType:=Trim(FieldByName('CTNTP').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=Trim(FieldByName('CTNNO').AsString);
// t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=StringReplace(Copy(FieldByName('EMFUEDT').AsString,1,Pos('.',FieldByName('EMFUEDT').AsString)-1),'T',' ',[]);
{
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,3].Value);
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,6].Value);
t_op_ctn.FieldByName('<27><>װ').AsString:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,7].Value);
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,8].Value);
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,9].Value);
}
t_op_ctn.Post;
end;
Next;
end;
end;
s_web:=mServiceSoap_dy.GetBackFCtnInfoXml(s_caragt,s_key,s_billno,'','1');
xmldoc.LoadFromXML(s_web);
xmldoc.SaveToFile('c:\<5C><><EFBFBD><EFBFBD><E4B7B5>.xml');
XMLTransformProvider1.TransformRead.TransformationFile:='\\'+dbserver+'\<5C><><EFBFBD>dz<EFBFBD>վ\<5C><><EFBFBD><EFBFBD><E4B7B5>.xtr';
// XMLTransformProvider1.TransformRead.TransformationFile:=ExtractFilePath(Application.ExeName)+'\<5C><><EFBFBD>dz<EFBFBD>վ\<5C><><EFBFBD><EFBFBD><E4B7B5>.xtr';
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=true;
with cds do
begin
First;
while not Eof do
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',Trim(FieldByName('CTNNO').AsString),[]) then
begin
t_op_ctn.Edit;
s_ctnno:=Trim(FieldByName('CTNSZ').AsString);
s_ctnType:=Trim(FieldByName('CTNTP').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('SEALNO').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('PKGS').AsInteger;
t_op_ctn.FieldByName('<27><>װ').AsString:='';
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('ALKWGT').AsFloat;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('ALCUBAGE').AsFloat;
t_op_ctn.Post;
end
else
begin
t_op_ctn.append;
s_ctnno:=Trim(FieldByName('CTNSZ').AsString);
s_ctnType:=Trim(FieldByName('CTNTP').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('SEALNO').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('PKGS').AsInteger;
t_op_ctn.FieldByName('<27><>װ').AsString:='';
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('ALKWGT').AsFloat;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('ALCUBAGE').AsFloat;
t_op_ctn.Post;
end;
Next;
end;
end;
// <20><>װ
s_web:=mServiceSoap_dy.GetLoadCargoInfoXml(s_caragt,s_key,s_billno,'','1');
xmldoc.LoadFromXML(s_web);
xmldoc.SaveToFile('c:\<5C><>װ.xml');
XMLTransformProvider1.TransformRead.TransformationFile:='\\'+dbserver+'\<5C><><EFBFBD>dz<EFBFBD>վ\<5C><>װ.xtr';
// XMLTransformProvider1.TransformRead.TransformationFile:=ExtractFilePath(Application.ExeName)+'\<5C><><EFBFBD>dz<EFBFBD>վ\<5C><>װ.xtr';
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=true;
if not cds.IsEmpty then
begin
try
with t_op_ctn do
begin
First;
while not Eof do
begin
Edit;
FieldByName('<27><>װ').AsString:=cds.FieldByName('PKTP').AsString;
Post;
Next;
end;
end;
finally
end;
end;
{
s_web:=mServiceSoap_dy.GetEnterPortInfoXml(s_caragt,s_key,s_billno,'','1');
xmldoc.LoadFromXML(s_web);
/// xmldoc.SaveToFile('c:\<5C><><EFBFBD><EFBFBD>.xml');
XMLTransformProvider1.TransformRead.TransformationFile:=ExtractFilePath(Application.ExeName)+'\<5C><><EFBFBD>dz<EFBFBD>վ\<5C><><EFBFBD><EFBFBD>.xtr';
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=true;
cds.Close;
cds.ProviderName:='XMLTransformProvider1';
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=True;
// ShowMessage(IntToStr(cds.RecordCount));
s_web:=mServiceSoap_dy.GetCusediInfoXml(s_caragt,s_key,s_billno);
xmldoc.LoadFromXML(s_web);
/// xmldoc.SaveToFile('c:\<5C><><EFBFBD><EFBFBD>.xml');
XMLTransformProvider1.TransformRead.TransformationFile:=ExtractFilePath(Application.ExeName)+'\<5C><><EFBFBD>dz<EFBFBD>վ\<5C><><EFBFBD><EFBFBD>.xtr';
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=true;
BoolToStr(mServiceSoap_dy.GetBillInfo(s_caragt,s_key,s_billno),True);
}
finally
// dewebservice;
t_op_ctn.EnableControls;
// ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ϸ<EFBFBD>˶<EFBFBD><CBB6><EFBFBD><EFBFBD><EFBFBD>,<2C>ֹ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD>ļ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>');
end;
end;
procedure Tfrm_op_seae_edi_data.getssczinfor(mblno:string);//qqctu<74><75>ȡ<EFBFBD>˵ֱ<CBB5><D6B1><EFBFBD><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD><EFBFBD><EFBFBD>Ϣ
var
sl:tstringlist;
IdHTTP1:TidHTTP;
i,j,k,m,n:integer;
istrue,QQCT,inmsg:boolean;
sldata:Array [1..13] of string[50];
s,s_ctnno,s_ctnType:widestring;
begin
sl:=tstringlist.Create;
IdHTTP1 := TidHTTP.Create(nil);
IdHTTP1.HandleRedirects:=true;
QQCT:=false;
istrue:=true;
for i:=1 to 13 do
begin
sldata[i]:='';
end;
n:=0;
try
istrue:=true;
inmsg:=false;
sl.text:=idhttp1.get('http://www.ssqd.cn/agentui.aspx?bl='+mblno);
j:=0;
for i:=0 to sl.Count-1 do
begin
s:=Utf8ToAnsi(sl[i]);
if pos('</table>',sl[i])>0 then
begin
s:=Copy(s,Pos('</<2F><EFBFBD><E1B5A5>></td></tr>',s)+16,Length(s)-1);
s:=StringReplace(s,'/tr>','/tr>'+#13#10,[rfReplaceAll]);
n:=1;
sl.text:=s;
end;
end;
for i:=0 to sl.Count-1 do
begin
if pos('</table>',sl[i])>0 then begin
istrue:=false;
Exit;
end;
if pos('<27><><EFBFBD><EFBFBD>',sl[i])>0 then
begin
j:=i;
end;
if istrue and (i=j) then
begin
sldata[1]:=twsou('<<3C><><EFBFBD><EFBFBD>>','</<2F><><EFBFBD><EFBFBD>>',sl[i]);
end;
if istrue and (i=j+1) then
begin
sldata[2]:=twsou('<<3C>ߴ<EFBFBD>>','</<2F>ߴ<EFBFBD>>',sl[i]);
end;
if istrue and (i=j+2) then
begin
sldata[3]:=twsou('<<3C><><EFBFBD><EFBFBD>>','</<2F><><EFBFBD><EFBFBD>>',sl[i]);
end;
if istrue and (i=j+3) then
begin
sldata[4]:=twsou('<<3C><><EFBFBD><EFBFBD>>','</<2F><><EFBFBD><EFBFBD>>',sl[i]);
end;
if istrue and (i=j+4) then
begin
sldata[5]:=twsou('<<3C><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>>','</<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>>',sl[i]);
end;
if istrue and (i=j+5) then
begin
sldata[6]:=twsou('<Ƥ<><C6A4>>','</Ƥ<><C6A4>>',sl[i]);
end;
if istrue and (i=j+6) then
begin
sldata[7]:=twsou('<<3C>ܼ<EFBFBD><DCBC><EFBFBD>>','</<2F>ܼ<EFBFBD><DCBC><EFBFBD>>',sl[i]);
end;
if istrue and (i=j+7) then
begin
sldata[8]:=twsou('<<3C><><EFBFBD><EFBFBD>>','</<2F><><EFBFBD><EFBFBD>>',sl[i]);
end;
if istrue and (i=j+8) then
begin
sldata[9]:=twsou('<<3C>ܳ<EFBFBD><DCB3><EFBFBD>>','</<2F>ܳ<EFBFBD><DCB3><EFBFBD>>',sl[i]);
end;
if istrue and (i=j+9) then
begin
sldata[10]:=twsou('<Ǧ<><C7A6><EFBFBD><EFBFBD>>','</Ǧ<><C7A6><EFBFBD><EFBFBD>>',sl[i]);
end;
if istrue and (i=j+10) then
begin
sldata[11]:=twsou('<<3C><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>>','</<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>>',sl[i]);
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',Trim(sldata[1]),[]) then
begin
t_op_ctn.Edit;
s_ctnno:=Trim(sldata[2]);
s_ctnType:=Trim(sldata[3]);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[1];
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[10];
if sldata[7]<>'' then
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=StrToInt(sldata[7]);
t_op_ctn.FieldByName('<27><>װ').AsString:=t_op_ctn.DataSource.DataSet.fieldbyname('<27><>װ').AsString;
if sldata[8]<>'' then
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=StrToFloat(sldata[8]);
if sldata[9]<>'' then
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=StrToFloat(sldata[9]);
t_op_ctn.Post;
end
else
begin
t_op_ctn.Append;
s_ctnno:=Trim(sldata[2]);
s_ctnType:=Trim(sldata[3]);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[1];
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[10];
if sldata[7]<>'' then
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=StrToInt(sldata[7]);
t_op_ctn.FieldByName('<27><>װ').AsString:=t_op_ctn.DataSource.DataSet.fieldbyname('<27><>װ').AsString;
if sldata[8]<>'' then
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=StrToFloat(sldata[8]);
if sldata[9]<>'' then
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=StrToFloat(sldata[9]);
t_op_ctn.Post;
end;
end;
end;
finally
freeandnil(sl);
end;
end;
procedure Tfrm_op_seae_edi_data.GetdyczInfo_zc(s_caragt,s_key,s_billno,bsno:String);
var
b:Boolean;
s_web: WideString;
xmldoc:IXMLDocument;
cds:TClientDataSet;
XMLTransformProvider1:TXMLTransformProvider;
s_ctnno,s_ctnType:string;
begin
try
t_op_ctn.DisableControls;
getwebservice_zc;
cds:=TClientDataSet.Create(nil);
XMLTransformProvider1:=TXMLTransformProvider.Create(NIL);
// s_billno:='HLCUTA1130371756'; //QDJY000476
cds.Active:=false;
xmldoc:=NewXMLDocument;
xmldoc.Encoding:='UTF-8';
s_web:=mServiceSoap_zc.GetInfo(s_billno,s_key);
xmldoc.LoadFromXML(s_web);
xmldoc.SaveToFile('c:\<5C><><EFBFBD><EFBFBD>.xml');
XMLTransformProvider1.TransformRead.TransformationFile:='\\'+dbserver+'\<5C>д<EFBFBD><D0B4><EFBFBD>վ\<5C><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ.xtr';
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=true;
with cds do
begin
First;
while not Eof do
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',Trim(FieldByName('<27><><EFBFBD><EFBFBD>').AsString),[]) then
begin
t_op_ctn.Edit;
s_ctnno:=Trim(FieldByName('<27>ߴ<EFBFBD>').AsString);
s_ctnType:=Trim(FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('Ǧ<><C7A6><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('<27>ܼ<EFBFBD><DCBC><EFBFBD>').AsInteger;
t_op_ctn.FieldByName('<27><>װ').AsString:=t_op_ctn.DataSource.DataSet.fieldbyname('<27><>װ').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27>ܳ<EFBFBD><DCB3><EFBFBD>').AsFloat;
t_op_ctn.Post;
end
else
begin
t_op_ctn.append;
s_ctnno:=Trim(FieldByName('<27>ߴ<EFBFBD>').AsString);
s_ctnType:=Trim(FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('Ǧ<><C7A6><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('<27>ܼ<EFBFBD><DCBC><EFBFBD>').AsInteger;
t_op_ctn.FieldByName('<27><>װ').AsString:=t_op_ctn.DataSource.DataSet.fieldbyname('<27><>װ').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27>ܳ<EFBFBD><DCB3><EFBFBD>').AsFloat;
t_op_ctn.Post;
end;
Next;
end;
end;
{
s_web:=mServiceSoap_yzh.P_GETDATA(s_billno,'FX');;
xmldoc.LoadFromXML(s_web);
// xmldoc.SaveToFile('c:\<5C><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ.xml');
XMLTransformProvider1.TransformRead.TransformationFile:=ExtractFilePath(Application.ExeName)+'\<5C><>֮<EFBFBD><D6AE><EFBFBD><EFBFBD>վ\<5C><><EFBFBD><EFBFBD>.xtr';
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=true;
}
finally
// dewebservice;
t_op_ctn.EnableControls;
end;
end;
procedure Tfrm_op_seae_edi_data.GetdyczInfo_yzh(s_caragt,s_key,s_billno,bsno:String);
var
b:Boolean;
s_web: WideString;
xmldoc:IXMLDocument;
cds:TClientDataSet;
XMLTransformProvider1:TXMLTransformProvider;
s_ctnno,s_ctnType:string;
begin
try
t_op_ctn.DisableControls;
getwebservice_yzh;
cds:=TClientDataSet.Create(nil);
XMLTransformProvider1:=TXMLTransformProvider.Create(NIL);
// s_billno:='HLCUTA1130371756'; //QDJY000476
cds.Active:=false;
xmldoc:=NewXMLDocument;
xmldoc.Encoding:='UTF-8';
s_web:=mServiceSoap_yzh.P_GETDATA(s_billno,'YT');
// ShowMessage(s_web);
xmldoc.LoadFromXML(s_web);
xmldoc.SaveToFile('c:\<5C><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ.xml');
XMLTransformProvider1.TransformRead.TransformationFile:='\\'+dbserver+'\<5C><>֮<EFBFBD><D6AE><EFBFBD><EFBFBD>վ\<5C><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ.xtr';
// XMLTransformProvider1.TransformRead.TransformationFile:=ExtractFilePath(Application.ExeName)+'\<5C><>֮<EFBFBD><D6AE><EFBFBD><EFBFBD>վ\<5C><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ.xtr';
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=true;
with cds do
begin
First;
while not Eof do
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',Trim(FieldByName('<27><><EFBFBD><EFBFBD>').AsString),[]) then
begin
t_op_ctn.Edit;
s_ctnno:=Trim(FieldByName('<27>ߴ<EFBFBD>').AsString);
s_ctnType:=Trim(FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('Ǧ<><C7A6><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('<27>ܼ<EFBFBD><DCBC><EFBFBD>').AsInteger;
t_op_ctn.FieldByName('<27><>װ').AsString:='';
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27>ܳ<EFBFBD><DCB3><EFBFBD>').AsFloat;
t_op_ctn.Post;
end
else
begin
t_op_ctn.append;
s_ctnno:=Trim(FieldByName('<27>ߴ<EFBFBD>').AsString);
s_ctnType:=Trim(FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('Ǧ<><C7A6><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('<27>ܼ<EFBFBD><DCBC><EFBFBD>').AsInteger;
t_op_ctn.FieldByName('<27><>װ').AsString:='';
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27>ܳ<EFBFBD><DCB3><EFBFBD>').AsFloat;
t_op_ctn.Post;
end;
Next;
end;
end;
{
s_web:=mServiceSoap_yzh.P_GETDATA(s_billno,'FX');;
xmldoc.LoadFromXML(s_web);
// xmldoc.SaveToFile('c:\<5C><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ.xml');
XMLTransformProvider1.TransformRead.TransformationFile:=ExtractFilePath(Application.ExeName)+'\<5C><>֮<EFBFBD><D6AE><EFBFBD><EFBFBD>վ\<5C><><EFBFBD><EFBFBD>.xtr';
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=true;
}
finally
// dewebservice;
t_op_ctn.EnableControls;
end;
end;
procedure Tfrm_op_seae_edi_data.GetdyczInfo_lhcz(s_caragt,s_key,s_billno,bsno:String);
var
testService:myServicePortType;
strmsg:string;
s_web: WideString;
xmldoc:IXMLDocument;
cds:TClientDataSet;
XMLTransformProvider1:TXMLTransformProvider;
s_ctnno,s_ctnType:string;
begin
testService:=GetmyServicePortType(false,'http://www.lhl.cn:8190/WebServiceTest/services/myService?wsdl',nil);
try
t_op_ctn.DisableControls;
cds:=TClientDataSet.Create(nil);
XMLTransformProvider1:=TXMLTransformProvider.Create(NIL);
cds.Active:=false;
xmldoc:=NewXMLDocument;
xmldoc.Encoding:='UTF-8';
s_web:=testService.CntrMess(s_billno) ;
// ShowMessage(s_web);
xmldoc.LoadFromXML(s_web);
xmldoc.SaveToFile('c:\<5C><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ.xml');
//ShowMessage('1');
XMLTransformProvider1.TransformRead.TransformationFile:='\\'+dbserver+'\½<><C2BD><EFBFBD><EFBFBD>վ\<5C><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ.xtr';
//ShowMessage('\\'+dbserver+'\½<><C2BD><EFBFBD><EFBFBD>վ\<5C><><EFBFBD><EFBFBD><E4B7B5>.xtr');
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
// ShowMessage('3');
cds.Data:=XMLTransformProvider1.Data;
// ShowMessage('4');
cds.Active:=true;
with cds do
begin
First;
while not Eof do
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',Trim(FieldByName('CTNNO').AsString),[]) then
begin
t_op_ctn.Edit;
s_ctnno:=Trim(FieldByName('CTNSZ').AsString);
s_ctnType:=Trim(FieldByName('CTNTP').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('SEALNO').AsString;
if FieldByName('PKGS').Value<>'null' then
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('PKGS').AsInteger;
t_op_ctn.FieldByName('<27><>װ').AsString:=FieldByName('PKTP').AsString;
if FieldByName('ALKWGT').Value<>'null' then
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('ALKWGT').AsFloat;
if FieldByName('ALCUBAGE').Value<>'null' then
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('ALCUBAGE').AsFloat;
t_op_ctn.Post;
end
else
begin
t_op_ctn.append;
s_ctnno:=Trim(FieldByName('CTNSZ').AsString);
s_ctnType:=Trim(FieldByName('CTNTP').AsString);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
begin
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=Trim(FieldByName('CTNNO').AsString);
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('SEALNO').AsString;
if FieldByName('PKGS').Value<>'null' then
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('PKGS').AsInteger;
t_op_ctn.FieldByName('<27><>װ').AsString:=FieldByName('PKTP').AsString;
if FieldByName('ALKWGT').Value<>'null' then
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('ALKWGT').AsFloat;
if FieldByName('ALCUBAGE').Value<>'null' then
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('ALCUBAGE').AsFloat;
t_op_ctn.Post;
end;
Next;
end;
end;
finally
t_op_ctn.EnableControls;
end;
end;
procedure Tfrm_op_seae_edi_data.setconcolor;
begin
end;
procedure Tfrm_op_seae_edi_data.UpdateInfor;
var
aAdoQuery:TAdoQuery;
begin
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
close;
sql.clear;
sql.add('Update t_code_vessel set <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
sql.add('where Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>=:Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>');
Parameters.ParamByName('Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>').Value:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>IMO').asstring;
ExecSQL;
finally
Free;
end;
end;
function Tfrm_op_seae_edi_data.GetStrChar_1(str:String):string;
var
i:integer;
begin
result:='';
if str='' then exit;
for i:=1 to length(Str) do begin
if str[i] in ['0','1','2','3','4','5','6','7','8','9','.']
then
else
result:=result+str[i];
end;
end;
function Tfrm_op_seae_edi_data.GetStrChar(str:String):string;
var
i:integer;
begin
result:='';
if str='' then exit;
for i:=1 to length(Str) do begin
if str[i] in ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
then
else
result:=result+str[i];
end;
end;
function Tfrm_op_seae_edi_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) then begin
if bytetype(Str[i],1)<>mbsinglebyte then begin
Result:=True;
Exit;
end;
end;
end;
function Tfrm_op_seae_edi_data.GetCtnCode(ctnkind,ctnsize:String): String;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
ctnsize:=StringReplace(ctnsize,'''','''''',[rfReplaceAll]);
try
with aQuery do
begin
Close;SQL.Clear;
SQL.Add('Select <20><><EFBFBD><EFBFBD>EDI<44><49><EFBFBD><EFBFBD> EDI<44><49><EFBFBD><EFBFBD> from t_code_ctn where <20><><EFBFBD><EFBFBD>='''+ctnkind+''' and <20>ߴ<EFBFBD>='''+ctnsize+'''');
Open;
if not IsEmpty then
Result:=Trim(FieldByName('EDI<44><49><EFBFBD><EFBFBD>').asstring)
else
Result:='';
end;
finally
FreeAndNil(aQuery);
end;
end;
function Tfrm_op_seae_edi_data.GetpkgsEdi(pkgs: String): String;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select Edi<64><69><EFBFBD><EFBFBD> from t_code_package where <20><><EFBFBD><EFBFBD>='''+pkgs+'''');
Open;
if IsEmpty then
Result:=''
else
Result:=FieldByName('Edi<64><69><EFBFBD><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
function Tfrm_op_seae_edi_data.isEditrue(DataSet:TDataSet): boolean;
var
error:String;
i,c : Integer;
begin
result:=true;
if trim(get_parameters_value(301,''))='' then
begin
result:=false;
if trim(error)='' then
error:='<27>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>';
end;
if trim(get_parameters_value(302,''))='' then
begin
result:=false;
if trim(error)='' then
error:='<27>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD>';
end;
if trim(get_parameters_value(303,''))='' then
begin
result:=false;
if trim(error)='' then
error:='<27>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD>ܷ<EFBFBD><DCB7><EFBFBD><EFBFBD><EFBFBD>';
end;
c:=0;
if bsSkinComboBox1.ItemIndex=3 then
begin
for i:=0 to cxDBCheckListBox1.Count-1 do
begin
if cxDBCheckListBox1.Items[i].Checked then
begin
c:=c+1;
end;
end;
if c<=0 then
begin
if trim(error)='' then
error:='<27>޸<EFBFBD>ԭ<EFBFBD><D4AD>'
else error:=error+#13#10+'<27>޸<EFBFBD>ԭ<EFBFBD><D4AD>';
end
else
if c>4 then
begin
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>ѡ<EFBFBD><D1A1>3<EFBFBD><33>ԭ<EFBFBD><D4AD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>ѡ<EFBFBD><D1A1>3<EFBFBD><33>ԭ<EFBFBD><D4AD>';
result:=false;
end;
end;
if GetStrChar(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)<>'' then
begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD><E1B5A5><EFBFBD>д<EFBFBD><D0B4>ڷǷ<DAB7><C7B7>ַ<EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD><E1B5A5><EFBFBD>д<EFBFBD><D0B4>ڷǷ<DAB7><C7B7>ַ<EFBFBD>';
end;
if GetStrChar_1(DataSet.fieldbyname('<27><><EFBFBD>ʽ').asstring)<>'' then
begin
result:=false;
if trim(error)='' then
error:='HS CODE <20>д<EFBFBD><D0B4>ڷǷ<DAB7><C7B7>ַ<EFBFBD>'
else error:=error+#13#10+'HS CODE <20>д<EFBFBD><D0B4>ڷǷ<DAB7><C7B7>ַ<EFBFBD>';
end;
if DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>IMO').AsString='' then
begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>IMO'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>IMO';
end;
if DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString='' then
begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>';
end;
if trim(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)='' then
begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD><E1B5A5>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD><E1B5A5>';
end;
if trim(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='' then
begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
if trim(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').asstring)='' then
begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1';
end;
if trim(DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='' then
begin
result:=false;
if trim(error)='' then
error:='<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
if trim(DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').asstring)='' then
begin
result:=false;
if trim(error)='' then
error:='<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1'
else error:=error+#13#10+'<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1';
end;
if trim(DataSet.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='' then
begin
result:=false;
if trim(error)='' then
error:='֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else error:=error+#13#10+'֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
if trim(DataSet.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').asstring)='' then
begin
result:=false;
if trim(error)='' then
error:='֪ͨ<CDA8>˵<EFBFBD>ַ1'
else error:=error+#13#10+'֪ͨ<CDA8>˵<EFBFBD>ַ1';
end;
if trim(DataSet.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ').asstring)='' then
begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD>ѷ<EFBFBD>ʽ'
else error:=error+#13#10+'<27><><EFBFBD>ѷ<EFBFBD>ʽ';
end;
if pos(' ', trim(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring))>0 then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD>';
end;
if trim(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if trim(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if Length(trim(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>IMO').asstring))<7 then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>С<EFBFBD><D0A1>7λ'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>С<EFBFBD><D0A1>7λ';
end;
if trim(DataSet.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='װ<>۴<EFBFBD><DBB4><EFBFBD>'
else error:=error+#13#10+'װ<>۴<EFBFBD><DBB4><EFBFBD>';
end;
if trim(DataSet.fieldbyname('װ<><D7B0><EFBFBD><EFBFBD>').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='װ<><D7B0><EFBFBD><EFBFBD>'
else error:=error+#13#10+'װ<><D7B0><EFBFBD><EFBFBD>';
end;
if trim(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
if trim(DataSet.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else error:=error+#13#10+'Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
if trim(DataSet.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else error:=error+#13#10+'ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
if trim(DataSet.fieldbyname('Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>').asstring)='' then
begin
result:=false;
if trim(error)='' then
error:='Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>'
else error:=error+#13#10+'Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>';
end;
if trim(DataSet.fieldbyname('Ŀ<>ĵ<EFBFBD>').asstring)='' then
begin
result:=false;
if trim(error)='' then
error:='Ŀ<>ĵ<EFBFBD>'
else error:=error+#13#10+'Ŀ<>ĵ<EFBFBD>';
end;
if trim(DataSet.fieldbyname('ǩ<><C7A9><EFBFBD>ص<EFBFBD>').asstring)='' then
begin
result:=false;
if trim(error)='' then
error:='ǩ<><C7A9><EFBFBD>ص<EFBFBD>'
else error:=error+#13#10+'ǩ<><C7A9><EFBFBD>ص<EFBFBD>';
end;
if trim(GetpkgsEdi(DataSet.fieldbyname('<27><>װ').asstring))='' then begin
result:=false;
if trim(error)='' then
error:='<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>';
end;
if trim(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
if trim(DataSet.fieldbyname('<27><>ͷ').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='<27><>ͷ'
else error:=error+#13#10+'<27><>ͷ';
end;
if DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger=0 then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asFloat=0 then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asFloat=0 then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if trim(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ';
end;
if trim(DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ').asstring)='D' then
begin
if Trim(DataSet.fieldbyname('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>'
else error:=error+#13#10+'Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>';
end;
if Trim(DataSet.fieldbyname('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>'
else error:=error+#13#10+'Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>';
end;
if GetStrNum(Trim(DataSet.fieldbyname('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').asstring))<>4 then begin
result:=false;
MessageDlg('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD>ű<EFBFBD><C5B1><EFBFBD><EFBFBD><EFBFBD><34><CEBB><EFBFBD><EFBFBD>',mtWarning,[mbOk],0);
if trim(error)='' then
error:='Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD>ű<EFBFBD><C5B1><EFBFBD><EFBFBD><EFBFBD><34><CEBB><EFBFBD><EFBFBD>'
else error:=error+#13#10+'Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD>ű<EFBFBD><C5B1><EFBFBD><EFBFBD><EFBFBD><34><CEBB><EFBFBD><EFBFBD>';
end;
end;
if trim(DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ').asstring)='R' then
begin
if Trim(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='' then
begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
end;
t_op_ctn.close;
t_op_ctn.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_op_ctn.open;
if t_op_ctn.IsEmpty then begin
result:=false;
MessageDlg('<27><>װ<EFBFBD><EFBFBD><E4B2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
end;
t_op_ctn.First;
while not t_op_ctn.Eof do begin
if Trim(t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if Trim(t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)='' then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if trim(GetpkgsEdi(t_op_ctn.fieldbyname('<27><>װ').asstring))='' then begin
result:=false;
if trim(error)='' then
error:='<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>';
end;
if t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger=0 then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asFloat=0 then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asFloat=0 then begin
result:=false;
if trim(error)='' then
error:='<27><><EFBFBD><EFBFBD>'
else error:=error+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
t_op_ctn.Next;
end;
if iszhongwen(dataset.fieldbyname('<27><>ͷ').AsString) then begin
result:=false;
MessageDlg('<27><>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>',mtWarning,[mbOk],0);
end;
if iszhongwen(dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString) then begin
result:=false;
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>',mtWarning,[mbOk],0);
end;
if trim(error)<>'' then
ShowMessage(error+#13#10+'<27><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>');
end;
function Tfrm_op_seae_edi_data.CreateSIEdiFile_XML:TStrings;
var
str:Tstringlist;
i,j,Count:integer;
strsql,strRmain:string;
rs:Tadoquery;
wide_str:widestring;
k:integer;
inifile1:Tinifile;
strType,XType,TransType:string;
strDatetime,IMO:string;
SenderCode,ReciverCode:string;
alist:TStringList;
begin
if not isEditrue(frm_op_seae_edi_data.t_op_seae) then
begin
Exit;
end;
SenderCode:=trim(get_parameters_value(302,'')) ;
ReciverCode:=trim(get_parameters_value(303,'')) ;
if bsSkinComboBox1.ItemIndex=0 then
strType:='9'
else if bsSkinComboBox1.ItemIndex=1 then
strType:='2'
else if bsSkinComboBox1.ItemIndex=2 then
strType:='3'
else if bsSkinComboBox1.ItemIndex=3 then
strType:='5'
else if bsSkinComboBox1.ItemIndex=4 then
strType:='0'
else if bsSkinComboBox1.ItemIndex=5 then
strType:='11'
else strType:='9';
if frm_op_seae_edi_data.dxdbgrid1.SelectedCount<=1 then
begin
str:=Tstringlist.Create;
str.Clear;
str.Add('<?xml version="1.0" encoding="UTF-8" standalone="no"?>');
// str.Add('<?xml version="1.0" encoding="utf-8" ?>');
str.Add('<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1">');
str.Add('<Head>');
//<!--<2D><><EFBFBD>ı<EFBFBD><C4B1>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<MessageID>'+SenderCode+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)+GetDatetime(datetimetostr(now),3)+IntToStr(GetTickCount)+'</MessageID>');
//<!--<2D><><EFBFBD>Ĺ<EFBFBD><C4B9>ܴ<EFBFBD><DCB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<FunctionCode>'+strType+'</FunctionCode>');
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CDB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<MessageType>MT2101</MessageType>');
// <!--<2D><><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<SenderID>'+SenderCode+'</SenderID>');
//<!--<2D><><EFBFBD>ܷ<EFBFBD><DCB7><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ReceiverID>'+ReciverCode+'</ReceiverID>');
//<!--<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD>䣨ѭ<E4A3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD>þ<EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>ʽΪCCYYMMDDHHmmssfff-->
str.Add('<SendTime>'+GetDatetime(datetimetostr(now),4)+'</SendTime>');
//<!--<2D><><EFBFBD>İ汾<C4B0>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<Version>1.0</Version>');
str.Add('</Head>');
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD>壨ѭ<E5A3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<Declaration>');
// <!--<2D>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶΣ<DDB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<RepresentativePerson>');
// <!--256 Representative person name <20>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<Name>'+SenderCode+'</Name>');
str.Add('</RepresentativePerson>');
// <!--<2D><><EFBFBD><EFBFBD><E4B9A4><EFBFBD><EFBFBD>غ<EFBFBD><D8BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶΣ<DDB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ExitCustomsOffice>');
// <!--<2D><><EFBFBD><EFBFBD><E4B9A4><EFBFBD><EFBFBD>غ<EFBFBD><D8BA>ش<EFBFBD><D8B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ID>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').asstring)+'</ID>');
str.Add('</ExitCustomsOffice>');
// <!--<2D><><EFBFBD><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>ݶΣ<DDB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<Agent>');
// <!--<2D><><EFBFBD><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ID>'+SenderCode+'</ID>');
str.Add('</Agent>');
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶΣ<DDB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<Carrier>');
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ID>'+frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString+'</ID>');
str.Add('</Carrier>');
// <!--<2D><><EFBFBD><EFBFBD><E4B9A4><EFBFBD><EFBFBD><EFBFBD>ݶΣ<DDB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<BorderTransportMeans>');
// <!--<2D><><EFBFBD>κ<EFBFBD><CEBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<JourneyID>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'</JourneyID>');
// <!--<2D><><EFBFBD>ʽ<E4B7BD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<TypeCode>1</TypeCode>');
// <!--<2D><><EFBFBD><EFBFBD>ߴ<EFBFBD><DFB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<ID>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>IMO').asstring)+'</ID>');
// <!--<2D><><EFBFBD><EFBFBD><E4B9A4><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<Name>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)+'</Name>');
// <!--<2D><><EFBFBD><EFBFBD>ߵִ<DFB5><D6B4>ؾ<EFBFBD><D8BE>ڵ<EFBFBD>һ<EFBFBD><D2BB>Ŀ<EFBFBD>ĸ۴<C4B8><DBB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<FirstArrivalLocationID>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)+'</FirstArrivalLocationID>');
// <!--<2D><><EFBFBD><EFBFBD>ߵִ<DFB5><D6B4>ؾ<EFBFBD><D8BE>ڵ<EFBFBD>һ<EFBFBD><D2BB>Ŀ<EFBFBD>ĸ۵<C4B8><DBB5><EFBFBD><EFBFBD>ں<EFBFBD>ʱ<EFBFBD>䣨CCYYMMDDhhmmss<73><73><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<ArrivalDateTime>'+GetDatetime(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1)+'086'+'</ArrivalDateTime>');
//<!--<2D><><EFBFBD><EFBFBD><E4B9A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD>ʱ<EFBFBD>䣨CCYYMMDDhhmmss<73><73><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<DepartureDateTime>'+GetDatetime(frm_op_seae_edi_data.t_op_seae.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1)+'086'+'</DepartureDateTime>');
str.Add('</BorderTransportMeans>');
//<!--<2D><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶΣ<DDB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1-9999<39><39>-->
str.Add('<Consignment>');
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<TransportContractDocument>');
//<!--<2D><><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ID>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)+'</ID>');
// <!--<2D><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-3<><33>-->
if bsSkinComboBox1.ItemIndex=3 then
begin
for i:=0 to cxDBCheckListBox1.Count-1 do
begin
if cxDBCheckListBox1.Items[i].Checked then
begin
str.Add('<ChangeReasonCode>'+COPY(cxDBCheckListBox1.Items[i].Text,1,Pos(':',cxDBCheckListBox1.Items[i].Text)-1)+'</ChangeReasonCode>');
end;
end;
end;
if pos('FREIGHT PREPAID',trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ').asstring)) >0 then
xtype := 'PP'
else if pos('FREIGHT COLLECT',trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ').asstring)) >0 then
xtype := 'CC'
else xtype := 'PP';
if uppercase(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='CY-CY' then
TransType:='10'
else if uppercase(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='DOOR-DOOR' then
TransType:='27'
else if uppercase(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='DOOR-PIER' then
TransType:='28'
else if uppercase(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='PIER-DOOR' then
TransType:='29'
else TransType:='10'; // PIER TO PIER
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<ConditionCode>'+TransType+'</ConditionCode>');
//<!--ƴ<><C6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
{
str.Add('<Consolidator>');
// <!--ƴ<><C6B4><EFBFBD>˴<EFBFBD><CBB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1)-->
str.Add('<ID></ID>');
str.Add('</Consolidator>');
}
str.Add('</TransportContractDocument>');
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
{
if trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)<>'' then
begin
str.Add('<AssociatedTransportDocument>');
//<!--<2D><><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ID>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)+'</ID>');
str.Add('</AssociatedTransportDocument>');
end
else
begin
end;
}
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<GrossVolumeMeasure>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'</GrossVolumeMeasure>');
// <!--CurrencyTypeCode<64><65>ֵ<EFBFBD>ǽ<EFBFBD><C7BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CDB4>룬 ValueAmount<6E><74>ֵ<EFBFBD>ǻ<EFBFBD><C7BB><EFBFBD><EFBFBD><EFBFBD>ֵ <20><>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
// str.Add('<ValueAmount CurrencyTypeCode="CNY"></ValueAmount>');
// <!--װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<LoadingLocation>');
//<!--װ<><D7B0><EFBFBD>ش<EFBFBD><D8B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<ID>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').asstring)+'</ID>');
// <!--<2D><><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E4B9A4>ʱ<EFBFBD>䣨ѭ<E4A3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<LoadingDate>'+GetDatetime(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1)+'086'+'</LoadingDate>');
str.Add('</LoadingLocation>');
// <!--ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<UnloadingLocation>');
// <!--ж<><D0B6><EFBFBD>ش<EFBFBD><D8B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ID>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)+'</ID>');
// <!--<2D><><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(CCYYMMDD)<29><>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<ArrivalDate>'+GetDatetime(frm_op_seae_edi_data.t_op_seae.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,0)+'</ArrivalDate>');
str.Add('</UnloadingLocation>');
// <!--<2D>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<GoodsReceiptPlace>');
// <!--<2D>ջ<EFBFBD><D5BB>ص<EFBFBD><D8B5><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<ID>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>').asstring)+'</ID>');
// <!--<2D>ջ<EFBFBD><D5BB>ص<EFBFBD><D8B5><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<Name>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('Ŀ<>ĵ<EFBFBD>').asstring)+'</Name>');
str.Add('</GoodsReceiptPlace>');
{
// <!--<2D><>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<TranshipmentLocation>');
// <!--<2D><>ת<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ID></ID>);
str.Add('</TranshipmentLocation>')
<!--<2D><>תĿ<D7AA>ĵ<EFBFBD><C4B5><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<TransitDestination>
<!--<2D><>תĿ<D7AA>ĵش<C4B5><D8B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<ID></ID>
</TransitDestination>
<!--;<><CDBE><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><D2B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-99<39><39>-->
<RoutingCountryCode></RoutingCountryCode>
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<GoodsConsignedPlace>
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵ĵص<C4B5><D8B5><EFBFBD><EFBFBD>߹<EFBFBD><DFB9>Ҵ<EFBFBD><D2B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<ID></ID>
</GoodsConsignedPlace>
<!--<2D><><EFBFBD><EFBFBD><EFBAA3>״̬<D7B4><CCAC><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-99<39><39>-->
<CustomsStatusCode></CustomsStatusCode>
<!--<2D><><EFBFBD><EFBFBD><EFBFBD>˻<EFBFBD><CBBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ<EFBFBD><CAB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<TransportSplitIndicator></TransportSplitIndicator>
}
// <!--<2D>˷<EFBFBD>֧<EFBFBD><D6A7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<FreightPayment>');
//<!--<2D>˷<EFBFBD>֧<EFBFBD><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<MethodCode>'+xtype+'</MethodCode>');
str.Add('</FreightPayment>');
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD>ܼ<EFBFBD><DCBC><EFBFBD>/<2F><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ConsignmentPackaging>');
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD>ܼ<EFBFBD><DCBC><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<QuantityQuantity>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'</QuantityQuantity>');
// <!--<2D><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<TypeCode>'+trim(GetpkgsEdi(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><>װ').asstring))+'</TypeCode>');
str.Add('</ConsignmentPackaging>');
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ë<EFBFBD>أ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<TotalGrossMassMeasure>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'</TotalGrossMassMeasure>');
{
<!--ǰһ<C7B0><D2BB><EFBFBD>ص<EFBFBD>֤<EFBFBD><D6A4>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<PreviousCustomsDocument>
<!--ǰһ<C7B0><D2BB><EFBFBD>ص<EFBFBD>֤<EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<ID></ID>
<!--ǰһ<C7B0><D2BB><EFBFBD>ص<EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ʹ<EFBFBD><CDB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<TypeCode></TypeCode>
</PreviousCustomsDocument>
<!--<2D><><EFBFBD><EFBFBD><EFBDBB><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<DeliveryDestination>
<!--<2D><><EFBFBD><EFBFBD><EFBDBB>Ŀ<EFBFBD>ĵص<C4B5>ַ<EFBFBD><D6B7><EFBFBD>ֵ<EFBFBD>,<2C><><EFBFBD><EFBFBD><E4A3A9>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<Line></Line>
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CityName></CityName>
<!--ʡ<>ݴ<EFBFBD><DDB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CountrySubEntityID></CountrySubEntityID>
<!--ʡ<><CAA1><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CountrySubEntityName></CountrySubEntityName>
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<PostcodeID></PostcodeID>
<!--<2D><><EFBFBD>Ҵ<EFBFBD><D2B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CountryCode></CountryCode>
</DeliveryDestination>
<!--<2D><>ͷ<EFBFBD><CDB7>ҵ<EFBFBD><D2B5>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<Handling>
<!--<2D><>ͷ<EFBFBD><CDB7>ҵָ<D2B5><D6B8><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<InstructionsCodeCode></InstructionsCodeCode>
</Handling>
<!--<2D>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<IntermediateCarrier>
<!--<2D>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˱<EFBFBD>ʶ<EFBFBD><CAB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<ID></ID>
<!--<2D>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-3<><33>-->
<Communication>
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<ID></ID>
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<TypeID></TypeID>
</Communication>
</IntermediateCarrier>
}
//<!--<2D>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<Consignee>');
//<!--<2D>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<ID>10</ID>');
//<!--<2D>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<Name>'+formatAfrstr(trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))+'</Name>');
//<!--<2D>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ<EFBFBD><D6B7>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<Address>');
//<!--<2D><>ϸ<EFBFBD><CFB8>ַ<EFBFBD><D6B7><EFBFBD>ֵ<EFBFBD>,<2C><><EFBFBD><EFBFBD><E4A3A9>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<Line>'+formatAfrstr(trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString))+'</Line>');
{
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CityName></CityName>
<!--ʡ<>ݴ<EFBFBD><DDB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CountrySubEntityID></CountrySubEntityID>
<!--ʡ<><CAA1><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CountrySubEntityName></CountrySubEntityName>
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<PostcodeID></PostcodeID>
<!--<2D><><EFBFBD>Ҵ<EFBFBD><D2B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CountryCode></CountryCode>
}
str.Add('</Address>');
{
<!--<2D>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-3<><33>-->
<Communication>
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<ID></ID>
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<TypeID></TypeID>
</Communication>
<!--<2D>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<Contact>
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<Name></Name>
<Communication>
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<ID></ID>
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<TypeID></TypeID>
</Communication>
</Contact>
}
str.Add('</Consignee>');
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<Consignor>');
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<ID>11</ID>');
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<Name>'+formatAfrstr(trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))+'</Name>');
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ<EFBFBD><D6B7>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<Address>');
//<!--<2D><>ϸ<EFBFBD><CFB8>ַ<EFBFBD><D6B7><EFBFBD>ֵ<EFBFBD>,<2C><><EFBFBD><EFBFBD><E4A3A9>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<Line>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString)+'</Line>');
{
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CityName></CityName>
<!--ʡ<>ݴ<EFBFBD><DDB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CountrySubEntityID></CountrySubEntityID>
<!--ʡ<><CAA1><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CountrySubEntityName></CountrySubEntityName>
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<PostcodeID></PostcodeID>
<!--<2D><><EFBFBD>Ҵ<EFBFBD><D2B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CountryCode></CountryCode>
}
str.Add('</Address>');
{
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-3<><33>-->
<Communication>
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<ID></ID>
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<TypeID></TypeID>
</Communication>
}
str.Add('</Consignor>');
//<!--֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<NotifyParty>');
//<!--֪ͨ<CDA8>˴<EFBFBD><CBB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<ID>13</ID>');
//<!--֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<Name>'+formatAfrstr(trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))+'</Name>');
//<!--֪ͨ<CDA8>˵<EFBFBD>ַ<EFBFBD><D6B7>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<Address>');
// <!--<2D><>ϸ<EFBFBD><CFB8>ַ<EFBFBD><D6B7><EFBFBD>ֵ<EFBFBD>,<2C><><EFBFBD><EFBFBD><E4A3A9>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<Line>'+formatAfrstr(trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString))+'</Line>');
{
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CityName></CityName>
<!--ʡ<>ݴ<EFBFBD><DDB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CountrySubEntityID></CountrySubEntityID>
<!--ʡ<><CAA1><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CountrySubEntityName></CountrySubEntityName>
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<PostcodeID></PostcodeID>
<!--<2D><><EFBFBD>Ҵ<EFBFBD><D2B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<CountryCode></CountryCode>
}
str.Add('</Address>');
{
<!--֪ͨ<CDA8><D6AA>ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-3<><33>-->
<Communication>
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<ID></ID>
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<TypeID></TypeID>
</Communication>
}
str.Add('</NotifyParty>');
{
<!--Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
<UNDGContact>
<!--Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30>-->
<Name></Name>
<!--Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD><CFB5>ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-3<><33>-->
<Communication>
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<ID></ID>
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
<TypeID></TypeID>
</Communication>
</UNDGContact>
}
strsql:='select * from t_op_ctn_edi '
+'WHERE <20><><EFBFBD><EFBFBD>='
+#39+frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+#39;
try
rs:=CreateAdoQuery;
rs.sql.clear;
rs.sql.add(strsql);
rs.Open;
rs.First;
if not rs.IsEmpty then begin
rs.First;
while not rs.Eof do
begin
// <!--<2D><>װ<EFBFBD><EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-9999<39><39>-->
str.Add('<TransportEquipment>');
// <!--<2D><>װ<EFBFBD><EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1)-->
str.Add('<EquipmentIdentification>');
// <!-- <20><>װ<EFBFBD><EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ID>'+rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'</ID>');
str.Add('</EquipmentIdentification>');
// <!--<2D><>װ<EFBFBD><EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<CharacteristicCode>'+GetCtnCode(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,rs.fieldbyname('<27>ߴ<EFBFBD>').asstring)+'</CharacteristicCode>');
//<!--<2D><>װ<EFBFBD><EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<SupplierPartyTypeCode>2</SupplierPartyTypeCode>');
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD><DFBF><EFBFBD><EFBFBD><EFBFBD>ʶ<EFBFBD><CAB6><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<FullnessCode>5</FullnessCode>');
// <!--SealID<49><44>ֵ<EFBFBD>Ƿ<EFBFBD>־<EFBFBD><D6BE><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>,AgencyCode<64><65>ֵ<EFBFBD><D6B5>ʩ<EFBFBD>ӷ<EFBFBD>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-9<><39>-->
str.Add('<SealID AgencyCode="CA">M/'+trim(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'</SealID>');
str.Add('</TransportEquipment>');
rs.Next;
end;
end;
rs.Close;
rs.Destroy;
except
on e:exception do
begin
rs.Close;
rs.Destroy;
exit;
end;
end;
k:=1;
alist:=TStringList.Create;
strsql:='select * from t_op_ctn_edi '
+'WHERE <20><><EFBFBD><EFBFBD>='
+#39+frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+#39;
try
rs:=CreateAdoQuery;
rs.sql.clear;
rs.sql.add(strsql);
rs.Open;
rs.First;
if not rs.IsEmpty then begin
rs.First;
while not rs.Eof do
begin
//<!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1-999<39><39>-->
str.Add('<ConsignmentItem>');
//<!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<SequenceNumeric>'+inttostr(k)+'</SequenceNumeric>');
//<!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>װ<EFBFBD><D7B0>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ConsignmentItemPackaging>');
// <!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<QuantityQuantity>'+trim(IntToStr(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').AsInteger))+'</QuantityQuantity>');
// <!--<2D><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<TypeCode>'+trim(GetpkgsEdi(rs.fieldbyname('<27><>װ').asstring)) +'</TypeCode>');
alist.text:='';
if trim(rs.fieldbyname('<27><>ͷ').asstring)<>'' then
alist.text:=trim(rs.fieldbyname('<27><>ͷ').asstring)
else alist.text:=trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><>ͷ').asstring);
// <!--<2D><>ͷ<EFBFBD><CDB7>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
str.Add('<MarksNumbers>'+alist.text+'</MarksNumbers>');
str.Add('</ConsignmentItemPackaging>');
alist.text:='';
if trim(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)<>'' then
alist.text:=trim(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)
else alist.text:=trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
//<!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<Commodity>');
//<!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<CargoDescription>'+alist.text+'</CargoDescription>');
//<!--Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
if trim(frm_op_seae_edi_data.t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ').asstring)='D' then
begin
str.Add('<UNDGCode>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').asstring)+'</UNDGCode>');
end;
//<!--<2D><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
if trim(rs.fieldbyname('HTS<54><53>').asstring)<>'' then
str.Add('<TariffClassificationCode>'+rs.fieldbyname('HTS<54><53>').asstring+'</TariffClassificationCode>')
else
begin
if trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD>ʽ').asstring)<>'' then
str.Add('<TariffClassificationCode>'+trim(frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD>ʽ').asstring)+'</TariffClassificationCode>');
end;
str.Add('</Commodity>');
//<!--<2D><>Ʒ<EFBFBD><EFBFBD><EEB2B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
{
str.Add('<AdditionalInformation>');
// <!--<2D><>ע<EFBFBD><D7A2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<Content></Content>');
str.Add('</AdditionalInformation>');
}
//<!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ë<EFBFBD>أ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<GoodsMeasure>');
// <!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ë<EFBFBD>أ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<GrossMassMeasure>'+trim(FloatToStr(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat))+'</GrossMassMeasure>');
str.Add('</GoodsMeasure>');
// <!--<2D><>װ<EFBFBD><EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-9999<39><39>-->
str.Add('<EquipmentIdentification>');
// <!--<2D><>װ<EFBFBD><EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ID>'+trim(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'</ID>');
str.Add('</EquipmentIdentification>');
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
{
str.Add('<CustomsProcedure>');
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<CurrentCode></CurrentCode>');
str.Add('</CustomsProcedure>');
}
{
//<!--Ψһ<CEA8><D2BB><EFBFBD>˱<EFBFBD><CBB1>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-99<39><39>-->
str.Add('<UCR>');
//<!--Ψһ<CEA8><D2BB><EFBFBD>˱<EFBFBD><CBB1>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<ID></ID>');
str.Add('</UCR>');
}
//<!--ԭ<><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
{
str.Add('<Origin>');
//<!--ԭ<><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<OriginCountryCode></OriginCountryCode>');
str.Add('</Origin>');
}
str.Add('</ConsignmentItem>');
k:=k+1;
rs.Next;
end;
end;
rs.Close;
rs.Destroy;
alist.Free;
except
on e:exception do
begin
rs.Close;
rs.Destroy;
exit;
end;
end;
str.Add('</Consignment>');
//<!--<2D><>ע<EFBFBD><D7A2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
{
str.Add('<AdditionalInformation>');
//<!--<2D><>ע<EFBFBD><D7A2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
str.Add('<Content></Content>');
str.Add('</AdditionalInformation>');
}
str.Add('</Declaration>');
str.Add('</Manifest>');
frm_op_seae_edi_data.t_op_seae.Edit;
frm_op_seae_edi_data.t_op_seae.FieldByName('EDI״̬').AsString:='<27>ѷ<EFBFBD><D1B7><EFBFBD>';
frm_op_seae_edi_data.t_op_seae.Post;
end;
Result:=str;
end;
procedure Tfrm_op_seae_edi_data.getwebservice_ds;
begin
try
mHttpRIO_ds:=THTTPRIO.Create(nil);
mHttpRIO_ds.WSDLLocation:='http://122.4.79.84:8090/webservice/DsWebService.asmx?WSDL';
mHttpRIO_ds.URL:='http://122.4.79.84:8090/webservice/DsWebService.asmx';
mHttpRIO_ds.Port:='DsWebServiceSoap';
mHttpRIO_ds.Service:='DsWebService';
mHttpRIO_ds.HTTPWebNode.UseUTF8InHeader:=true;
mServiceSoap_Ds:=mHttpRIO_ds as DsWebServiceSoap;
InvRegistry.RegisterInvokeOptions(TypeInfo(DsWebServiceSoap),ioDocument );//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
{ mHttpRIO_ds:=THTTPRIO.Create(nil);
mHttpRIO_ds.WSDLLocation:='http://221.3.83.5:8090/webservice/DsWebService.asmx?WSDL';
mHttpRIO_ds.URL:='http://221.3.83.5:8090/webservice/DsWebService.asmx';
mHttpRIO_ds.Port:='DsWebServiceSoap';
mHttpRIO_ds.Service:='DsWebService';
mHttpRIO_ds.HTTPWebNode.UseUTF8InHeader:=true;
mServiceSoap_Ds:=mHttpRIO_ds as DsWebServiceSoap;
InvRegistry.RegisterInvokeOptions(TypeInfo(DsWebServiceSoap),ioDocument );//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
}
except
on E:Exception do
begin
ShowMessage(e.Message);
exit;
end;
end;
end;
procedure Tfrm_op_seae_edi_data.UpdateCTN(BSNO:STRING);
var
aAdoQuery:TAdoQuery;
p:Integer;
w,c:Double;
begin
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
close;
sql.clear;
sql.add('select sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD>, sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD> from t_op_ctn_edi');
sql.add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=BSNO;
open;First;
if not IsEmpty then
begin
t_op_seae.Edit;
p:=FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
w:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
c:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_seae.Post;
close; sql.clear;
sql.add('Update t_op_seae_edi set <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
sql.add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=p;
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=w;
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=c;
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=BSNO;
ExecSQL;
end;
finally
Free;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_seae_edi_data.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_op_seae_edi_data.Hide;
frm_op_seae_edi_data.ManualFloat(frm_op_seae_edi_data.BoundsRect );
frm_main.freeTabs('frm_op_seae_edi_data');
action:=cafree;
frm_op_seae_edi_data:=nil;
end;
procedure Tfrm_op_seae_edi_data.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.Width/15);
bsSkinButton7.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton14.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton38.Width:=i;
bsSkinButton22.Width:=i;
bsSkinButton25.Width:=i;
bsSkinButton27.Width:=i;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton7Click(Sender: TObject);
begin
table_Prior(t_op_seae);
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton6Click(Sender: TObject);
begin
table_next(t_op_seae);
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_op_seae);
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton11Click(Sender: TObject);
var
answer:TModalResult;
begin
if bsSkinButton11.Caption='<27><EFBFBD>޸<EFBFBD>' then
begin
Notebook1.PageIndex:=1;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
//DBEdit3.OnChange(Sender);
end
else
begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
BEGIN
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿',mtWarning,mbYesNoCancel,0);
if answer=mrYes then
begin
t_op_seae.post;
end;
if answer=mrNo then
begin
t_op_seae.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
END;
Notebook1.PageIndex:=0;
bsSkinButton11.Caption:='<27><EFBFBD>޸<EFBFBD>';
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton4Click(Sender: TObject);
var
i,j:Integer;
strno:string;
aQuery:TADOQuery;
begin
if t_op_seae.FieldByName('EDI״̬').AsString='<27>ѷ<EFBFBD><D1B7><EFBFBD>' then begin
showmessage('<27>ѷ<EFBFBD><D1B7>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD>޸<EFBFBD><><C9BE><EFBFBD><EFBFBD>');
Exit;
end;
j:=dxDBGrid1.SelectedCount;
strno:=' where 1=2 ';
for i:=0 to j-1 do
begin
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
strno:=strno+' or <20><><EFBFBD><EFBFBD>='''+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'''';
end;
if MessageDlg('ȷ<><C8B7>Ҫɾ<D2AA><C9BE>ѡ<EFBFBD>е<EFBFBD>'+inttostr(j)+'Ʊҵ<C6B1><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbyes,mbno],0)=mryes then begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add(' delete from t_op_ctn_detail_edi where ctn_id in (select ctn_id from t_op_ctn_edi '+strno+')');
ExecSQL;
Close;SQL.Clear;
SQL.Add(' delete from t_op_ctn_edi '+strno);
ExecSQL;
Close;SQL.Clear;
SQL.Add(' delete from t_op_seae_edi '+strno);
ExecSQL;
end;
finally
FreeAndNil(aQuery);
end;
t_op_seae.Refresh;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_op_seae);
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton38Click(Sender: TObject);
var
book1:Tbookmark;
begin
book1:=t_op_seae.GetBookmark;
t_op_seae.Refresh;
t_op_seae.GotoBookmark(book1);
end;
procedure Tfrm_op_seae_edi_data.FormShow(Sender: TObject);
var
inifile1:Tinifile;
s:string;
begin
Notebook1.PageIndex:=0;
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
s:=inifile1.ReadString('database','Data Source','');
if Pos('\',s)>0 then
begin
dbserver:=Copy(s,1,Pos('\',s)-1);
end
else
if Pos(';',s)>0 then
begin
dbserver:=Copy(s,1,Pos(';',s)-1);
end
else
dbserver:=s;
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=28;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
//ί<>б<EFBFBD><D0B1>Ŵ<EFBFBD><C5B4><EFBFBD>
t_op_seae.Close;
t_op_seae.SQL.clear;
t_op_seae.SQL.Add('select top 100 * from t_op_seae_edi where '
+'(¼<><C2BC><EFBFBD><EFBFBD>='+''''+employee+''''+') order by ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> desc ');
t_op_seae.open;
t_op_ctn.Open;
t_op_ctn_detail.Open;
t_op_state.Open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
loadreggrid(dxdbgrid1,false,caption);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_code_shiper.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_code_consignee.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_code_notifyparty.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
procedure Tfrm_op_seae_edi_data.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_seae_edi_data.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_seae_edi_data.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,213);
end;
procedure Tfrm_op_seae_edi_data.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton8Click(Sender: TObject);
VAR
str:widestring;
begin
str:='where '+open_data('0001','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no');
if Edit3.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+'''';
if Edit1.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit1.text+'%'+'''';
if wwDBComboBoxType.text<>''then
str:=str+' and EDI<44><49><EFBFBD><EFBFBD> like '+''''+wwDBComboBoxType.text+'''';
if wwDBComboBox2.text<>''then
str:=str+' and EDI״̬ like '+''''+wwDBComboBox2.text+'''';
if wwDBDateTimePicker9.text<>''then
str:=str+' and ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker9.text+'''';
if wwDBDateTimePicker12.text<>''then
str:=str+' and ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker12.text+'''';
if wwDBDateTimePicker11.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker11.text+'''';
if wwDBDateTimePicker13.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker13.text+'''';
if wwDBComboBoxOP.text<>''then
str:=str+' and ¼<><C2BC><EFBFBD><EFBFBD>='+''''+wwDBComboBoxOP.text+'''';
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','ģ<><C4A3>',wwDBLookupCombo26.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','ģ<><C4A3>',Edit8.text);
if Edit2.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD> in ( select <20><><EFBFBD><EFBFBD> from t_op_ctn_edi where <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit2.text+'%'+''')';
t_op_seae.close;
t_op_seae.sql.clear;
t_op_seae.sql.add('select * from t_op_seae_edi '+str+' order by <20><><EFBFBD><EFBFBD><E1B5A5>');
t_op_seae.open;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton12Click(Sender: TObject);
begin
Edit3.text:='';
Edit8.text:='';
Edit2.text:='';
Edit1.text:='';
wwDBDateTimePicker9.text:='';
wwDBDateTimePicker12.text:='';
wwDBDateTimePicker11.text:='';
wwDBDateTimePicker13.text:='';
wwDBComboBoxType.Text:='';
wwDBComboBox2.Text:='';
wwDBLookupCombo26.Clear;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton14Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton14.ClientToScreen(Point(0,bsSkinButton14.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_seae_edi_data.bsSkinSpeedButton1Click(Sender: TObject);
begin
if bsSkinGroupBox5.Visible then begin
bsSkinGroupBox5.Visible:=false;
bsSkinGroupBox2.Visible:=true;
end else begin
bsSkinGroupBox5.left:=bsSkinGroupBox2.Left;
bsSkinGroupBox5.Top:=bsSkinGroupBox2.Top;
bsSkinGroupBox5.Height:=bsSkinGroupBox2.Height;
bsSkinGroupBox5.Width:=bsSkinGroupBox2.Width;
bsSkinGroupBox2.Visible:=False;
bsSkinGroupBox5.Visible:=True;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinSpeedButton2Click(Sender: TObject);
begin
if bsSkinGroupBox7.Visible then begin
bsSkinGroupBox7.Visible:=false;
bsSkinGroupBox3.Visible:=true;
end else begin
bsSkinGroupBox7.left:=bsSkinGroupBox3.Left;
bsSkinGroupBox7.Top:=bsSkinGroupBox3.Top;
bsSkinGroupBox7.Height:=bsSkinGroupBox3.Height;
bsSkinGroupBox7.Width:=bsSkinGroupBox3.Width;
bsSkinGroupBox3.Visible:=False;
bsSkinGroupBox7.Visible:=True;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinSpeedButton3Click(Sender: TObject);
begin
if bsSkinGroupBox8.Visible then begin
bsSkinGroupBox8.Visible:=false;
bsSkinGroupBox2.Visible:=true;
end else begin
bsSkinGroupBox8.left:=bsSkinGroupBox2.Left;
bsSkinGroupBox8.Top:=bsSkinGroupBox2.Top;
bsSkinGroupBox8.Height:=bsSkinGroupBox2.Height;
bsSkinGroupBox8.Width:=bsSkinGroupBox2.Width;
bsSkinGroupBox2.Visible:=False;
bsSkinGroupBox8.Visible:=True;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton56Click(Sender: TObject);
begin
t_op_ctn.insert;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton57Click(Sender: TObject);
begin
table_post(t_op_ctn);
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton58Click(Sender: TObject);
begin
table_delete(t_op_ctn);
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton59Click(Sender: TObject);
begin
table_cancel(t_op_ctn);
end;
procedure Tfrm_op_seae_edi_data.wwDBLookupComboctnChange(Sender: TObject);
begin
if (t_op_ctn.State=dsedit)or(t_op_ctn.State=dsinsert) then
begin
if frm_data_share.t_code_ctn.Locate('<27><><EFBFBD><EFBFBD>',wwDBLookupComboctn.text,[]) then
begin
t_op_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'];
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD>'];
t_op_ctn['<27>ߴ<EFBFBD>']:=frm_data_share.t_code_ctn['<27>ߴ<EFBFBD>'];
end
else
begin
t_op_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:='';
t_op_ctn['<27><><EFBFBD><EFBFBD>']:='';
t_op_ctn['<27>ߴ<EFBFBD>']:='';
end;
end;
end;
procedure Tfrm_op_seae_edi_data.btnMarksClick(Sender: TObject);
begin
frm_main.view_momo(t_op_ctn1,'<27><>ͷ');
end;
procedure Tfrm_op_seae_edi_data.btnDescClick(Sender: TObject);
begin
frm_main.view_momo(t_op_ctn1,'<27><><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_edi_data.t_op_ctnAfterInsert(DataSet: TDataSet);
begin
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD>'];
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=1;
t_op_ctn['TEU']:=0;
end;
procedure Tfrm_op_seae_edi_data.wwDBGrid1ColEnter(Sender: TObject);
begin
if (wwDBGrid1.GetActiveField.FieldName='<27><>ͷ') then begin
// bsSkinPanel4.Visible:=true;
// Label62.Visible:=True;
// Label61.Visible:=false;
// DBMemo5.Visible:=true;
// DBMemo4.Visible:=false;
end else if (wwDBGrid1.GetActiveField.FieldName='<27><><EFBFBD><EFBFBD>') then begin
// bsSkinPanel4.Visible:=true;
// Label62.Visible:=false;
// Label61.Visible:=True;
// DBMemo5.Visible:=false;
// DBMemo4.Visible:=true;
end else begin
// bsSkinPanel4.Visible:=False;
end;
end;
function Tfrm_op_seae_edi_data.getCtnAfr(code: string): string;
var
aQuery:TADOQuery;
begin
result:='';
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;
SQL.Text:='select AFR<46><52><EFBFBD><EFBFBD> from t_code_ctn where <20><><EFBFBD><EFBFBD>='''+code+'''';
Open;
Result:=aQuery.fieldbyname('AFR<46><52><EFBFBD><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
function Tfrm_op_seae_edi_data.getPkgAfr(code: string): string;
var
aQuery:TADOQuery;
begin
result:='';
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;
SQL.Text:='select AFR<46><52><EFBFBD><EFBFBD> from t_code_package where <20><><EFBFBD><EFBFBD>='''+code+'''';
Open;
if not IsEmpty then
Result:=aQuery.fieldbyname('AFR<46><52><EFBFBD><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
function Tfrm_op_seae_edi_data.formatAfrstr(str: string): string;
begin
Result:=Trim(str);
Result:=StringReplace(Result,'&','&amp;',[rfReplaceAll]);
Result:=StringReplace(Result,'<','&lt;',[rfReplaceAll]);
Result:=StringReplace(Result,'"','&quot;',[rfReplaceAll]);
Result:=StringReplace(Result,'>','&gt;',[rfReplaceAll]);
Result:=StringReplace(Result,'''','&apos;',[rfReplaceAll]);
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton1Click(Sender: TObject);
begin
t_op_ctn_detail.insert;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton9Click(Sender: TObject);
begin
table_post(t_op_ctn_detail);
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton10Click(Sender: TObject);
begin
table_delete(t_op_ctn_detail);
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton13Click(Sender: TObject);
begin
table_cancel(t_op_ctn_detail);
end;
procedure Tfrm_op_seae_edi_data.t_op_ctn_detailAfterInsert(DataSet: TDataSet);
begin
t_op_ctn_detail['ctn_id']:=t_op_ctn['ctn_id'];
end;
procedure Tfrm_op_seae_edi_data.t_op_ctn_detailBeforePost(DataSet: TDataSet);
begin
t_op_ctn_detail['ctn_id']:=t_op_ctn['ctn_id'];
end;
procedure Tfrm_op_seae_edi_data.t_op_ctn_detailBeforeInsert(DataSet: TDataSet);
begin
if t_op_ctn.State in [dsedit,dsinsert] then t_op_ctn.Post;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton17Click(Sender: TObject);
begin
try
if IdFTP1.Connected then begin
IdFTP1.Abort;
IdFTP1.Quit;
end;
finally
bsSkinGroupBox11.Visible:=false;
bsSkinButton16.Enabled:=True;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton19Click(Sender: TObject);
begin
frm_code_edicode:=Tfrm_code_edicode.Create(self);
try
frm_code_edicode.t_code_edicode.Open;
if not frm_code_edicode.t_code_edicode.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo16.DisplayValue,[]) then begin
frm_code_edicode.t_code_edicode.Insert;
frm_code_edicode.t_code_edicode.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean:=true;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ1').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ2').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ3').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ3').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>绰').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
end else begin
frm_code_edicode.t_code_edicode.Edit;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ1').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ2').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ3').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ3').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>绰').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
end;
frm_code_edicode.ShowModal;
finally
t_code_shiper.Requery();
FreeAndNil(frm_code_edicode);
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton20Click(Sender: TObject);
begin
frm_code_edicode:=Tfrm_code_edicode.Create(self);
try
frm_code_edicode.t_code_edicode.Open;
if not frm_code_edicode.t_code_edicode.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo1.DisplayValue,[]) then begin
frm_code_edicode.t_code_edicode.Insert;
frm_code_edicode.t_code_edicode.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsBoolean:=true;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ1').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ2').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ3').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>绰').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString;
end else begin
frm_code_edicode.t_code_edicode.Edit;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ1').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ2').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ3').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>绰').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString;
end;
frm_code_edicode.ShowModal;
finally
t_code_consignee.Requery();
FreeAndNil(frm_code_edicode);
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton21Click(Sender: TObject);
begin
frm_code_edicode:=Tfrm_code_edicode.Create(self);
try
frm_code_edicode.t_code_edicode.Open;
if not frm_code_edicode.t_code_edicode.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo2.DisplayValue,[]) then begin
frm_code_edicode.t_code_edicode.Insert;
frm_code_edicode.t_code_edicode.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('֪ͨ<CDA8><D6AA>').AsBoolean:=true;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ1').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ2').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ3').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ3').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>绰').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵绰').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString;
end else begin
frm_code_edicode.t_code_edicode.Edit;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ1').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ2').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ3').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ3').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>绰').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵绰').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString;
end;
frm_code_edicode.ShowModal;
finally
t_code_notifyparty.Requery();
FreeAndNil(frm_code_edicode);
end;
end;
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo16Enter(Sender: TObject);
begin
RxDBLookupCombo16.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo16Exit(Sender: TObject);
begin
RxDBLookupCombo16.LookupDisplay:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo1Enter(Sender: TObject);
begin
RxDBLookupCombo1.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo1Exit(Sender: TObject);
begin
RxDBLookupCombo1.LookupDisplay:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo2Enter(Sender: TObject);
begin
RxDBLookupCombo2.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo2Exit(Sender: TObject);
begin
RxDBLookupCombo2.LookupDisplay:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo16Change(Sender: TObject);
begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit)then
begin
if RxDBLookupCombo16.DisplayValue<>'' then begin
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_code_shiper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString:=t_code_shiper.FieldByName('<27><>ַ1').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString:=t_code_shiper.FieldByName('<27><>ַ2').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ3').AsString:=t_code_shiper.FieldByName('<27><>ַ3').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString:=t_code_shiper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString:=t_code_shiper.FieldByName('<27>ʱ<EFBFBD>').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_code_shiper.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=t_code_shiper.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString:=t_code_shiper.FieldByName('<27>绰').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_code_shiper.FieldByName('<27><>').AsString;
end;
end;
end;
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo1Change(Sender: TObject);
begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit)then
begin
if RxDBLookupCombo1.DisplayValue<>'' then begin
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_code_consignee.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString:=t_code_consignee.FieldByName('<27><>ַ1').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString:=t_code_consignee.FieldByName('<27><>ַ2').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3').AsString:=t_code_consignee.FieldByName('<27><>ַ3').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString:=t_code_consignee.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString:=t_code_consignee.FieldByName('<27>ʱ<EFBFBD>').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_code_consignee.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=t_code_consignee.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString:=t_code_consignee.FieldByName('<27>绰').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_code_consignee.FieldByName('<27><>').AsString;
end;
end;
end;
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo2Change(Sender: TObject);
begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit)then
begin
if RxDBLookupCombo2.DisplayValue<>'' then begin
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_code_notifyparty.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString:=t_code_notifyparty.FieldByName('<27><>ַ1').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString:=t_code_notifyparty.FieldByName('<27><>ַ2').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ3').AsString:=t_code_notifyparty.FieldByName('<27><>ַ3').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString:=t_code_notifyparty.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString:=t_code_notifyparty.FieldByName('<27>ʱ<EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_code_notifyparty.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=t_code_notifyparty.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵绰').AsString:=t_code_notifyparty.FieldByName('<27>绰').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString:=t_code_notifyparty.FieldByName('<27><>').AsString;
end;
end;
end;
procedure Tfrm_op_seae_edi_data.PutToDebugLog(Operation, S1: String);
Var
S: String;
begin
while Length(S1) > 0 do begin
if Pos(#13, S1) > 0 then begin
S := Copy(S1, 1, Pos(#13, S1) - 1);
Delete(S1, 1, Pos(#13, S1));
if S1[1] = #10 then Delete(S1, 1, 1);
end
else
S := S1;
DebugListBox.ItemIndex := DebugListBox.Items.Add(Operation + S);
end;
end;
procedure Tfrm_op_seae_edi_data.IdFTP1Status(ASender: TObject;
const AStatus: TIdStatus; const AStatusText: String);
begin
DebugListBox.ItemIndex := DebugListBox.Items.Add(AStatusText);
end;
procedure Tfrm_op_seae_edi_data.IdFTP1Work(Sender: TObject;
AWorkMode: TWorkMode; const AWorkCount: Integer);
Var
S: String;
TotalTime: TDateTime;
H, M, Sec, MS: Word;
DLTime: Double;
begin
TotalTime := Now - STime;
DecodeTime(TotalTime, H, M, Sec, MS);
Sec := Sec + M * 60 + H * 3600;
DLTime := Sec + MS / 1000;
if DLTime > 0 then
AverageSpeed := {(AverageSpeed + }(AWorkCount / 1024) / DLTime{) / 2};
if AverageSpeed > 0 then begin
Sec := Trunc(((ProgressBar1.Max - AWorkCount) / 1024) / AverageSpeed);
S := Format('%2d:%2d:%2d', [Sec div 3600, (Sec div 60) mod 60, Sec mod 60]);
S := 'ʣ<><CAA3>ʱ<EFBFBD><CAB1> ' + S;
end
else S := '';
S := FormatFloat('0.00 KB/s', AverageSpeed) + '; ' + S;
case AWorkMode of
wmRead: StatusBar1.Panels[1].Text := '<27><><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD> ' + S;
wmWrite: StatusBar1.Panels[1].Text := '<27>ϴ<EFBFBD><CFB4>ٶ<EFBFBD> ' + S;
end;
if AbortTransfer then IdFTP1.Abort;
ProgressBar1.Position := AWorkCount;
AbortTransfer := false;
end;
procedure Tfrm_op_seae_edi_data.IdFTP1WorkBegin(Sender: TObject;
AWorkMode: TWorkMode; const AWorkCountMax: Integer);
begin
TransferrignData := true;
AbortTransfer := false;
STime := Now;
if AWorkCountMax > 0 then ProgressBar1.Max := AWorkCountMax
else ProgressBar1.Max := BytesToTransfer;
AverageSpeed := 0;
end;
procedure Tfrm_op_seae_edi_data.IdFTP1WorkEnd(Sender: TObject;
AWorkMode: TWorkMode);
begin
StatusBar1.Panels[1].Text := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
BytesToTransfer := 0;
TransferrignData := false;
ProgressBar1.Position := 0;
AverageSpeed := 0;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton22Click(Sender: TObject);
var
Pnt:Tpoint;
begin
if t_op_seae1.DataSet=nil then
exit;
if (t_op_seae1.DataSet.State=dsinsert)or(t_op_seae1.DataSet.State=dsedit) then
t_op_seae1.DataSet.post;
Pnt:=bsSkinButton22.ClientToScreen(Point(0,bsSkinButton22.Height));
PopupMenu4.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_seae_edi_data.NZYClick(Sender: TObject);
begin
if t_op_seae.isempty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EDI<44>ļ<EFBFBD><C4BC><EFBFBD>');
exit;
end;
try
if not assigned(frm_op_seae_edi_custom_cosco) then
frm_op_seae_edi_custom_cosco:=tfrm_op_seae_edi_custom_cosco.Create(application);
frm_op_seae_edi_custom_cosco.ShowModal;
finally
frm_op_seae_edi_custom_cosco.free;
frm_op_seae_edi_custom_cosco:=nil;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton23Click(Sender: TObject);
begin
t_op_seae.Edit;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ3').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵绰').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString;
t_op_seae.Post;
end;
procedure Tfrm_op_seae_edi_data.NZTClick(Sender: TObject);
begin
if t_op_seae.isempty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EDI<44>ļ<EFBFBD><C4BC><EFBFBD>');
exit;
end;
try
if not assigned(frm_op_seae_custom_edi_zt) then
frm_op_seae_custom_edi_zt:=tfrm_op_seae_custom_edi_zt.Create(application);
frm_op_seae_custom_edi_zt.ShowModal;
finally
frm_op_seae_custom_edi_zt.free;
frm_op_seae_custom_edi_zt:=nil;
end;
end;
procedure Tfrm_op_seae_edi_data.NWD2101Click(Sender: TObject);
begin
if t_op_seae.isempty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EDI<44>ļ<EFBFBD><C4BC><EFBFBD>');
exit;
end;
try
if not assigned(frm_op_seae_edi_custom_waidai) then
frm_op_seae_edi_custom_waidai:=tfrm_op_seae_edi_custom_waidai.Create(application);
frm_op_seae_edi_custom_waidai.ShowModal;
finally
frm_op_seae_edi_custom_waidai.free;
frm_op_seae_edi_custom_waidai:=nil;
end;
end;
procedure Tfrm_op_seae_edi_data.t_op_ctnBeforePost(DataSet: TDataSet);
begin
if length(t_op_ctn.FieldByName('<27><>ͷ').AsString)>180 then begin
MessageDlg('<27><>ͷ<EFBFBD><CDB7><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>180<38><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
Abort;
end;
if length(t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString)>180 then begin
MessageDlg('<27><><EFBFBD><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>180<38><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
Abort;
end;
end;
procedure Tfrm_op_seae_edi_data.NWD1101Click(Sender: TObject);
begin
if t_op_seae.isempty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EDI<44>ļ<EFBFBD><C4BC><EFBFBD>');
exit;
end;
try
if not assigned(frm_op_seae_edi_custom_waidai_1101) then
frm_op_seae_edi_custom_waidai_1101:=tfrm_op_seae_edi_custom_waidai_1101.Create(application);
frm_op_seae_edi_custom_waidai_1101.ShowModal;
finally
frm_op_seae_edi_custom_waidai_1101.free;
frm_op_seae_edi_custom_waidai_1101:=nil;
end;
end;
procedure Tfrm_op_seae_edi_data.NYDClick(Sender: TObject);
var
i:integer;
str:widestring;
aAdoQuery:TAdoQuery;
aDataSource:TDataSource;
begin
if t_op_seae.IsEmpty then
exit;
if dxDBGrid1.SelectedCount>0 then
begin
for i:=0 to dxDBGrid1.SelectedCount-1 do begin
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
if i=0 then
str:='('+''''+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''''
else
str:=str+','+''''+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'''';
t_op_seae.Edit;
t_op_seae.FieldByName('EDI״̬').AsString:='<27>ѷ<EFBFBD><D1B7><EFBFBD>';
t_op_seae.Post;
end;
end else begin
str:='('+''''+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'''';
end;
str:=str+')';
aDataSource:=TDataSource.Create(nil);
aAdoQuery:=CreateAdoQuery;
aDataSource.DataSet:=aAdoQuery;
with aAdoQuery do
try
close;
sql.clear;
sql.add('select t_op_ctn_edi.*,t_op_seae_edi.* from t_op_ctn_edi left Join t_op_seae_edi on t_op_ctn_edi.<2E><><EFBFBD><EFBFBD>=t_op_seae_edi.<2E><><EFBFBD><EFBFBD> '
+' where t_op_ctn_edi.<2E><><EFBFBD><EFBFBD> in '+str
+' order by t_op_ctn_edi.<2E><><EFBFBD><EFBFBD>');
open;
sys_print('Զ<><D4B6><EFBFBD>յ<EFBFBD>',2,aDataSource,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
finally
aDataSource.Free;
Free;
end;
end;
{
if t_op_seae.isempty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EDI<44>ļ<EFBFBD><C4BC><EFBFBD>');
exit;
end;
try
if not assigned(frm_op_seae_edi_custom_yd) then
frm_op_seae_edi_custom_yd:=tfrm_op_seae_edi_custom_yd.Create(application);
frm_op_seae_edi_custom_yd.ShowModal;
finally
frm_op_seae_edi_custom_yd.free;
frm_op_seae_edi_custom_yd:=nil;
end;
}
procedure Tfrm_op_seae_edi_data.NLDClick(Sender: TObject);
begin
if t_op_seae.isempty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>е<EFBFBD><D0B5><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EDI<44>ļ<EFBFBD><C4BC><EFBFBD>');
exit;
end;
try
if not assigned(frm_op_seae_edi_custom_ld) then
frm_op_seae_edi_custom_ld:=tfrm_op_seae_edi_custom_ld.Create(application);
frm_op_seae_edi_custom_ld.ShowModal;
finally
frm_op_seae_edi_custom_ld.free;
frm_op_seae_edi_custom_ld:=nil;
end;
end;
procedure Tfrm_op_seae_edi_data.NWYClick(Sender: TObject);
begin
if t_op_seae.isempty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EDI<44>ļ<EFBFBD><C4BC><EFBFBD>');
exit;
end;
try
if not assigned(frm_op_seae_edi_custom_wy) then
frm_op_seae_edi_custom_wy:=tfrm_op_seae_edi_custom_wy.Create(application);
frm_op_seae_edi_custom_wy.ShowModal;
finally
frm_op_seae_edi_custom_wy.free;
frm_op_seae_edi_custom_wy:=nil;
end;
end;
procedure Tfrm_op_seae_edi_data.NHGClick(Sender: TObject);
begin
if t_op_seae.isempty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EDI<44>ļ<EFBFBD><C4BC><EFBFBD>');
exit;
end;
try
if not assigned(frm_op_seae_edi_custom_hg) then
frm_op_seae_edi_custom_hg:=tfrm_op_seae_edi_custom_hg.Create(application);
frm_op_seae_edi_custom_hg.ShowModal;
finally
frm_op_seae_edi_custom_hg.free;
frm_op_seae_edi_custom_hg:=nil;
end;
end;
procedure Tfrm_op_seae_edi_data.btnSealClick(Sender: TObject);
begin
frm_main.view_momo(t_op_ctn1,'<27><><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_edi_data.NHFClick(Sender: TObject);
var
i:integer;
str:widestring;
aAdoQuery:TAdoQuery;
aDataSource:TDataSource;
begin
if t_op_seae.IsEmpty then
exit;
if dxDBGrid1.SelectedCount>0 then
begin
for i:=0 to dxDBGrid1.SelectedCount-1 do begin
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
if i=0 then
str:='('+''''+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+''''
else
str:=str+','+''''+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'''';
t_op_seae.Edit;
t_op_seae.FieldByName('EDI״̬').AsString:='<27>ѷ<EFBFBD><D1B7><EFBFBD>';
t_op_seae.Post;
end;
end else begin
str:='('+''''+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'''';
end;
str:=str+')';
aDataSource:=TDataSource.Create(nil);
aAdoQuery:=CreateAdoQuery;
aDataSource.DataSet:=aAdoQuery;
with aAdoQuery do
try
close;
sql.clear;
sql.add('select t_op_ctn_edi.*,t_op_seae_edi.* from t_op_ctn_edi left Join t_op_seae_edi on t_op_ctn_edi.<2E><><EFBFBD><EFBFBD>=t_op_seae_edi.<2E><><EFBFBD><EFBFBD> '
+' where t_op_ctn_edi.<2E><><EFBFBD><EFBFBD> in '+str
+' order by t_op_ctn_edi.<2E><><EFBFBD><EFBFBD>');
open;
sys_print('<27><><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD>',2,aDataSource,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
finally
aDataSource.Free;
Free;
end;
end;
procedure Tfrm_op_seae_edi_data.wwDBComboBoxOPDropDown(Sender: TObject);
var AdoQuery1:TAdoQuery;
begin
wwDBComboBoxOP.items.clear;
AdoQuery1:=CreateAdoQuery;
with AdoQuery1 do
try
Close;sql.Clear;
SQL.Add('select * from t_sys_employee where ״̬=''<27><>ְ''');
SQL.Add('Order by <20><><EFBFBD><EFBFBD>');
Open;first;
while not Eof do
begin
wwDBComboBoxOP.Items.Add(AdoQuery1.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
Next;
end;
finally
Free;
end;
end;
procedure Tfrm_op_seae_edi_data.NZHClick(Sender: TObject);
begin
if t_op_seae.isempty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EDI<44>ļ<EFBFBD><C4BC><EFBFBD>');
exit;
end;
try
if not assigned(frm_op_seae_edi_custom_zh) then
frm_op_seae_edi_custom_zh:=tfrm_op_seae_edi_custom_zh.Create(application);
frm_op_seae_edi_custom_zh.ShowModal;
finally
frm_op_seae_edi_custom_zh.free;
frm_op_seae_edi_custom_zh:=nil;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton15Click(Sender: TObject);
var
aAdoQuery:TAdoQuery;
begin
if (t_op_ctn.State=dsinsert)or(t_op_ctn.State=dsedit) then
t_op_ctn.post;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
close;
sql.clear;
sql.add('select sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD>, sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD> from t_op_ctn_edi');
sql.add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
open;First;
if not IsEmpty then
begin
if t_op_seae=nil then
exit;
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
t_op_seae.post;
t_op_seae.Edit;
t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_seae.Post;
end;
finally
Free;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton47Click(Sender: TObject);
begin
frm_main.view_momo(t_op_seae1,'<27><>ͷ');
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton24Click(Sender: TObject);
begin
frm_main.view_momo(t_op_seae1,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton25Click(Sender: TObject);
begin
if t_op_seae1.DataSet=nil then
exit;
if (t_op_seae1.DataSet.State=dsinsert)or(t_op_seae1.DataSet.State=dsedit) then
t_op_seae1.DataSet.post;
sys_print('<27>յ<EFBFBD><D5B5>걨',2,t_op_seae1,t_op_ctn1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton26Click(Sender: TObject);
begin
frm_main.view_momo(t_op_seae1,'<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>');
end;
procedure Tfrm_op_seae_edi_data.wwDBLookupCombo3Change(Sender: TObject);
begin
if t_op_seae1.DataSet=nil then
exit;
if (t_op_seae1.DataSet.state=dsedit)or(t_op_seae1.DataSet.state=dsinsert)then
begin
if frm_data_share.t_code_loaport.Locate('Ӣ<><D3A2><EFBFBD><EFBFBD>',wwDBLookupCombo3.text,[]) then
begin
t_op_seae1.DataSet['װ<>۴<EFBFBD><DBB4><EFBFBD>']:=frm_data_share.t_code_loaport['EDI<44><49><EFBFBD><EFBFBD>'];
end;
end;
end;
procedure Tfrm_op_seae_edi_data.wwDBLookupCombo3Exit(Sender: TObject);
begin
if t_op_seae1.DataSet=nil then
exit;
if (t_op_seae1.DataSet.state=dsedit)or(t_op_seae1.DataSet.state=dsinsert)then
begin
if frm_data_share.t_code_loaport.Locate('Ӣ<><D3A2><EFBFBD><EFBFBD>',wwDBLookupCombo3.text,[]) then
begin
t_op_seae1.DataSet['װ<>۴<EFBFBD><DBB4><EFBFBD>']:=frm_data_share.t_code_loaport['EDI<44><49><EFBFBD><EFBFBD>'];
end;
end;
end;
procedure Tfrm_op_seae_edi_data.wwDBLookupCombo52Change(Sender: TObject);
begin
if t_op_seae1.DataSet=nil then
exit;
if (t_op_seae1.DataSet.state=dsedit)or(t_op_seae1.DataSet.state=dsinsert)then
begin
if frm_data_share.t_code_disport.Locate('Ӣ<><D3A2><EFBFBD><EFBFBD>',wwDBLookupCombo52.text,[]) then
begin
t_op_seae1.DataSet['ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_code_disport['EDI<44><49><EFBFBD><EFBFBD>'];
end;
end;
end;
procedure Tfrm_op_seae_edi_data.wwDBLookupCombo52Exit(Sender: TObject);
begin
if t_op_seae1.DataSet=nil then
exit;
if (t_op_seae1.DataSet.state=dsedit)or(t_op_seae1.DataSet.state=dsinsert)then
begin
if frm_data_share.t_code_disport.Locate('Ӣ<><D3A2><EFBFBD><EFBFBD>',wwDBLookupCombo52.text,[]) then
begin
t_op_seae1.DataSet['ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_code_disport['EDI<44><49><EFBFBD><EFBFBD>'];
end;
end;
end;
procedure Tfrm_op_seae_edi_data.wwDBLookupCombo17Change(Sender: TObject);
begin
if t_op_seae1.DataSet=nil then
exit;
if (t_op_seae1.DataSet.state=dsedit)or(t_op_seae1.DataSet.state=dsinsert)then
begin
if frm_data_share.t_code_disport.Locate('Ӣ<><D3A2><EFBFBD><EFBFBD>',wwDBLookupCombo17.text,[]) then
begin
t_op_seae1.DataSet['Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>']:=frm_data_share.t_code_disport['EDI<44><49><EFBFBD><EFBFBD>'];
end;
end;
end;
procedure Tfrm_op_seae_edi_data.wwDBLookupCombo17Exit(Sender: TObject);
begin
if t_op_seae1.DataSet=nil then
exit;
if (t_op_seae1.DataSet.state=dsedit)or(t_op_seae1.DataSet.state=dsinsert)then
begin
if frm_data_share.t_code_disport.Locate('Ӣ<><D3A2><EFBFBD><EFBFBD>',wwDBLookupCombo17.text,[]) then
begin
t_op_seae1.DataSet['Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>']:=frm_data_share.t_code_disport['EDI<44><49><EFBFBD><EFBFBD>'];
end;
end;
end;
procedure Tfrm_op_seae_edi_data.N1Click(Sender: TObject);
var
Ext,adate,bsno,corp,vslvoy,mblno,id,cntNo,ctnName,s:String;
ExcelTemplet:Variant;
i,j,k:integer;
M,D,Y:Word;
imp,seae_apply_add_total:boolean;
aAdoQuery,t_op_ctn_edi:TAdoQuery;
alist:TStringList;
function getcustedi(cust:string):string;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
result:='';
try
aQuery.Close;
aQuery.SQL.Text:='select EDI<44><49><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+cust+'''';
aQuery.Open;
if not aQuery.IsEmpty then
result:=aQuery.fieldbyname('EDI<44><49><EFBFBD><EFBFBD>').AsString;
finally
FreeAndNil(aQuery);
end;
end;
function GetvesselEdi(avessel: String): String;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_code_vessel where Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>='''+avessel+'''');
Open;
if IsEmpty then
Result:='a'
else
Result:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
function getETD(VSL,VOY:string):string;
var
aQuery:TADOQuery;
begin
aQuery:=CreateAdoQuery;
result:='';
try
aQuery.Close;
aQuery.SQL.Text:='select * from v_vessel_voyage where Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>='''+VSL+''' and <20><><EFBFBD><EFBFBD>='''+VOY+'''';
aQuery.Open;
if not aQuery.IsEmpty then
result:=aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
finally
FreeAndNil(aQuery);
end;
end;
begin
// id:=get_id;
j:=1;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
begin
close;SQL.Clear;
SQL.Add('select * from t_op_seae_edi');
SQL.Add('where <20><><EFBFBD><EFBFBD><E1B5A5>=:<3A><><EFBFBD><EFBFBD><E1B5A5>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><E1B5A5>').Value:='';
end;
alist:=TStringList.Create;
t_op_ctn_edi:=CreateAdoQuery;
t_op_ctn_edi.close;
t_op_ctn_edi.sql.Text:='select * from t_op_ctn_edi where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>';
if OpenDialog1.Execute then begin
Ext:=lowercase(ExtractFileExt(OpenDialog1.FileName));
if Ext='.xls' then begin
ExcelTemplet:= CreateOleObject('Excel.Application');
ExcelTemplet.Workbooks.Open(OpenDialog1.FileName);
try
frm_main.db.BeginTrans;
t_op_seae.DisableControls;
t_op_ctn.DisableControls;
I:=2;
while VartoStr(ExcelTemplet.ActiveSheet.Cells[I,3].Value)<>'' do
begin
mblno:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,3].Value);
aAdoQuery.Close;
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><E1B5A5>').Value:=mblno;
aAdoQuery.Open;
if aAdoQuery.IsEmpty then
begin
j:=j+1;
id:=get_id;
t_op_seae.Insert;
t_op_seae['<27><><EFBFBD><EFBFBD>']:=id;
t_op_seae['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=mblno;
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_op_seae['EDI<44><49><EFBFBD><EFBFBD>']:='CN';
t_op_seae['EDI״̬']:='δ<><CEB4><EFBFBD><EFBFBD>';
t_op_seae['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_op_seae['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
t_op_seae['<27><><EFBFBD><EFBFBD><E1B5A5>']:=mblno;
t_op_seae['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,5].Value);
t_op_seae['ǩ<><C7A9><EFBFBD>ص<EFBFBD>']:='QINGDAO,CHINA';
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:='';
// t_op_seae['<27><><EFBFBD><EFBFBD>˾']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,4].Value);
t_op_seae['<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>']:=getcustedi(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,4].Value));
alist.Text:='';
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,13].Value;
s:='';
for k:=0 to alist.Count-1 do
begin
s:=Trim(alist[k])+s;
end;
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Trim(s);
alist.Text:='';
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,14].Value;
s:='';
for k:=0 to alist.Count-1 do
begin
s:=Trim(alist[k])+s;
end;
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1']:=Trim(s);
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2']:='';
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ3']:='';
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
alist.Text:='';
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,15].Value;
s:='';
for k:=0 to alist.Count-1 do
begin
s:=Trim(alist[k])+s;
end;
t_op_seae['<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Trim(s);
alist.Text:='';
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,16].Value;
s:='';
for k:=0 to alist.Count-1 do
begin
s:=Trim(alist[k])+s;
end;
t_op_seae['<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1']:=Trim(s);
t_op_seae['<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2']:='';
t_op_seae['<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3']:='';
t_op_seae['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:='';
alist.Text:='';
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,17].Value;
s:='';
for k:=0 to alist.Count-1 do
begin
s:=Trim(alist[k])+s;
end;
t_op_seae['֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=Trim(s);
alist.Text:='';
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,18].Value;
s:='';
for k:=0 to alist.Count-1 do
begin
s:=Trim(alist[k])+s;
end;
t_op_seae['֪ͨ<CDA8>˵<EFBFBD>ַ1']:=Trim(s);
t_op_seae['֪ͨ<CDA8>˵<EFBFBD>ַ2']:='';
t_op_seae['֪ͨ<CDA8>˵<EFBFBD>ַ3']:='';
t_op_seae['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,1].Value);
t_op_seae['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,2].Value);
t_op_seae['<27><><EFBFBD><EFBFBD>IMO']:=GetvesselEdi(t_op_seae['<27><><EFBFBD><EFBFBD>']);
if getETD(t_op_seae['<27><><EFBFBD><EFBFBD>'],t_op_seae['<27><><EFBFBD><EFBFBD>'])<>'' then
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=getETD(t_op_seae['<27><><EFBFBD><EFBFBD>'],t_op_seae['<27><><EFBFBD><EFBFBD>']);
t_op_seae['װ<><D7B0><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,7].Value);
if frm_data_share.t_code_loaport.Locate('Ӣ<><D3A2><EFBFBD><EFBFBD>',t_op_seae['װ<><D7B0><EFBFBD><EFBFBD>'],[]) then
begin
t_op_seae['װ<>۴<EFBFBD><DBB4><EFBFBD>']:=frm_data_share.t_code_loaport['EDI<44><49><EFBFBD><EFBFBD>'];
end
else t_op_seae['װ<>۴<EFBFBD><DBB4><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,8].Value);
t_op_seae['ж<><D0B6><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,9].Value);
if frm_data_share.t_code_disport.Locate('Ӣ<><D3A2><EFBFBD><EFBFBD>',t_op_seae['ж<><D0B6><EFBFBD><EFBFBD>'],[]) then
begin
t_op_seae['ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_code_disport['EDI<44><49><EFBFBD><EFBFBD>'];
end else t_op_seae['ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,10].Value);
t_op_seae['Ŀ<>ĵ<EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,11].Value);
if frm_data_share.t_code_disport.Locate('Ӣ<><D3A2><EFBFBD><EFBFBD>',t_op_seae['ж<><D0B6><EFBFBD><EFBFBD>'],[]) then
begin
t_op_seae['Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>']:=frm_data_share.t_code_disport['EDI<44><49><EFBFBD><EFBFBD>'];
end else t_op_seae['Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,12].Value);
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,6].Value);
t_op_seae['<27><><EFBFBD>ʽ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,28].Value);
alist.Text:='';
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,27].Value;
t_op_seae['<27><>ͷ']:=alist.Text;
alist.Text:='';
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,26].Value;
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=alist.Text;
t_op_seae['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,23].Value);
t_op_seae['<27><>װ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,22].Value);
t_op_seae['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,24].Value);
t_op_seae['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,25].Value);
t_op_seae['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:='';
t_op_seae['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:='';
t_op_seae['<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>']:='';
t_op_seae['<27>¶ȵ<C2B6>λ']:='';
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ']:='';
t_op_seae['<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>']:='';
t_op_seae['ʪ<><CAAA>']:='';
t_op_seae['<27><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>']:='';
t_op_seae['<27><><EFBFBD>ʽ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,28].Value);
if pos('<27><>',VartoStr(ExcelTemplet.ActiveSheet.Cells[I,29].Value))>0 then
begin
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ']:='R';
t_op_seae['<27>¶ȵ<C2B6>λ']:='C';
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,30].Value);
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,30].Value);
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,30].Value);
end
else
if pos('Σ',VartoStr(ExcelTemplet.ActiveSheet.Cells[I,29].Value))>0 then
begin
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ']:='D';
t_op_seae['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,31].Value);
t_op_seae['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,32].Value);
end
else t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ']:='S';
t_op_seae['<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>']:='Master';
t_op_seae.Post;
t_op_ctn_edi.Close;
t_op_ctn_edi.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=id;
t_op_ctn_edi.Open;
t_op_ctn_edi.Insert;
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=id;
cntNo:=Copy(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,19].Value),1,2);
ctnName:=Copy(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,19].Value),3,2);
// showmessage(mblno+' '+cntNo+'--'+ctnName);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([cntNo,ctnName]),[]) then
begin
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end
else
begin
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:='<27><>';
end;
t_op_ctn_edi['<27>ߴ<EFBFBD>']:=cntNo;
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=ctnName;
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=1;
t_op_ctn_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=cntNo+''''+ctnName;
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,20].Value);
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,21].Value);
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,23].Value);
t_op_ctn_edi['<27><>װ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,22].Value);
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,24].Value);
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,25].Value);
alist.Text:='';
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,27].Value;
t_op_ctn_edi['<27><>ͷ']:=alist.Text;
alist.Text:='';
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,26].Value;
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=alist.Text;
if frm_data_share.t_code_ctn.Locate('<27><><EFBFBD><EFBFBD>',t_op_ctn_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[]) then
begin
if frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='20'then
t_op_ctn_edi['TEU']:=1;
if (frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='40')OR
(frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='45')then
t_op_ctn_edi['TEU']:=2;
end;
t_op_ctn_edi.Post;
end
else
begin
t_op_ctn_edi.Close;
t_op_ctn_edi.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=aAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_op_ctn_edi.Open;
if not t_op_ctn_edi.Locate('<27><><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([VartoStr(ExcelTemplet.ActiveSheet.Cells[I,20].Value),VartoStr(ExcelTemplet.ActiveSheet.Cells[I,21].Value)]),[]) then
begin
t_op_ctn_edi.Insert;
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
cntNo:=Copy(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,19].Value),1,2);
ctnName:=Copy(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,19].Value),3,2);
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([cntNo,ctnName]),[]) then
begin
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end
else
begin
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:='<27><>';
end;
t_op_ctn_edi['<27>ߴ<EFBFBD>']:=cntNo;
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=ctnName;
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=1;
t_op_ctn_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=cntNo+''''+ctnName;
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,20].Value);
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,21].Value);
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,23].Value);
t_op_ctn_edi['<27><>װ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,22].Value);
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,24].Value);
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,25].Value);
alist.Text:='';
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,27].Value;
t_op_ctn_edi['<27><>ͷ']:=alist.Text;
alist.Text:='';
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,26].Value;
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=alist.Text;
if frm_data_share.t_code_ctn.Locate('<27><><EFBFBD><EFBFBD>',t_op_ctn_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[]) then
begin
if frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='20'then
t_op_ctn_edi['TEU']:=1;
if (frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='40')OR
(frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='45')then
t_op_ctn_edi['TEU']:=2;
end;
t_op_ctn_edi.Post;
end;
UpdateCTN(aAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
i:=i+1;
end;
frm_main.db.CommitTrans;
finally
t_op_seae.EnableControls;
t_op_ctn.EnableControls;
ExcelTemplet.DisplayAlerts := false;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
ExcelTemplet.Quit;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>
MessageDlg('<27><><EFBFBD><EFBFBD>:'+IntTostr(i-2)+'<27><> '+'Ʊ<><C6B1>:'+IntTostr(j-1)+'Ʊ ', mtConfirmation, [mbYes],0);
if frm_main.db.InTransaction then
begin
ShowMessage('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD>');
frm_main.db.RollbackTrans;
end;
end;
end;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton28Click(Sender: TObject);
var i :Integer;
begin
with t_op_ctn do
begin
First;
while not eof do
begin
Edit;
FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=s_w(0,FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat);
post;
Next;
end;
end;
end;
procedure Tfrm_op_seae_edi_data.NHGYDTClick(Sender: TObject);
begin
if t_op_seae.isempty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EDI<44>ļ<EFBFBD><C4BC><EFBFBD>');
exit;
end;
try
if not assigned(frm_op_seae_edi_custom_hgYDT) then
frm_op_seae_edi_custom_hgYDT:=tfrm_op_seae_edi_custom_hgYDT.Create(application);
frm_op_seae_edi_custom_hgYDT.ShowModal;
finally
frm_op_seae_edi_custom_hgYDT.free;
frm_op_seae_edi_custom_hgYDT:=nil;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton29Click(Sender: TObject);
var xmldoc:IXMLDocument;
cds:TClientDataSet;
XMLTransformProvider1:TXMLTransformProvider;
s_web: WideString;
i :Integer;
aAdoQuery,bAdoQuery:TAdoQuery;
AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond:Word;
STATUS:string;
begin
getwebservice_ds;
cds:=TClientDataSet.Create(nil);
XMLTransformProvider1:=TXMLTransformProvider.Create(NIL);
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
begin
Close;Sql.Clear;
SQL.Add('Insert Into t_op_state (<28><><EFBFBD><EFBFBD><><D2B5>״̬ ,<2C>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C2BC><EFBFBD><EFBFBD><><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>,<2C><>ע)');
SQL.Add('values (:<3A><><EFBFBD><EFBFBD>,:ҵ<><D2B5>״̬ ,:<3A>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,:¼<><C2BC><EFBFBD><EFBFBD>,:¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,:ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>,:<3A><>ע)');
Close;
end;
bAdoQuery:=CreateAdoQuery;
with bAdoQuery do
begin
Close;Sql.Clear;
SQL.Add('select ҵ<><D2B5>״̬,<2C><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> from t_op_state');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
SQL.Add('order by <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> desc');
end;
try
cds.Active:=false;
xmldoc:=NewXMLDocument;
xmldoc.Encoding:='UTF-8';
xmldoc.Options:=[doNamespaceDecl];
s_web:=mServiceSoap_Ds.LoadCustomMainfastStatus(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString);
xmldoc.LoadFromXML(s_web);
XMLTransformProvider1.TransformRead.TransformationFile:='\\'+dbserver+'\<5C><EFBFBD><E0B5BA><EFBFBD><EFBFBD>\dscustom.xtr';
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=true;
if cds.RecordCount<=0 then
begin
ShowMessage('<27><><EFBFBD><EFBFBD>û<EFBFBD>з<EFBFBD><D0B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
with cds do
begin
First;
while not Eof do
begin
aAdoQuery.Close;
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
if Copy(FieldByName('STATUS').AsString,1,5)='11104' then
STATUS:='<27>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><E4B9A4><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>̬'
else
if Copy(FieldByName('STATUS').AsString,1,5)='11124' then
STATUS:='<27><><EFBFBD>ѷ<EFBFBD><D1B7>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD>ƴ<EFBFBD><C6B4>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='15302' then
STATUS:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6B4AB><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>쳣'
else
if Copy(FieldByName('STATUS').AsString,1,5)='21102' then
STATUS:='<27>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><E4B9A4>δ<EFBFBD><CEB4><EFBFBD><EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='21106' then
STATUS:='<27><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='21107' then
STATUS:='<27><><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>δ<EFBFBD>򺣹ش<F2BAA3B9><D8B4><EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='21301' then
STATUS:='Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD>ɹ<EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='22103' then
STATUS:=' δ<>ҵ<EFBFBD><D2B5><EFBFBD>Ӧ<EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='22201' then
STATUS:='Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EAB1A8><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='23105' then
STATUS:='<27><><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD>Ѻ<EFBFBD>ע'
else
if Copy(FieldByName('STATUS').AsString,1,5)='23301' then
STATUS:='Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='24103' then
STATUS:='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='24301' then
STATUS:='Ԥ<><D4A4><EFBFBD>յ<EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='25201' then
STATUS:='<27><><EFBFBD><EFBFBD><EFBFBD>˵ֱ<CBB5><D6B1><EFBFBD><E6B4AB><EFBFBD>ɹ<EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='99001' then
STATUS:=' <20><><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƹ淶'
else STATUS:=FieldByName('STATUS').AsString;
aAdoQuery.Parameters.ParamByName('ҵ<><D2B5>״̬').Value:=STATUS;
aAdoQuery.Parameters.ParamByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').Value:=true;
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=employee;
AYear:=StrToInt(Copy(FieldByName('DATESTR').AsString,1,4));
AMonth:=StrToInt(Copy(FieldByName('DATESTR').AsString,5,2));
ADay:=StrToInt(Copy(FieldByName('DATESTR').AsString,7,2));
AHour:=StrToInt(Copy(FieldByName('DATESTR').AsString,9,2));
AMinute:=StrToInt(Copy(FieldByName('DATESTR').AsString,11,2));
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Value:=EncodeDatetime(AYear,AMonth,ADay,AHour,AMinute,ASecond, AMilliSecond); //DATASTR
aAdoQuery.Parameters.ParamByName('¼<><C2BC><EFBFBD><EFBFBD>').Value:=employee;
aAdoQuery.Parameters.ParamByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=FormatDateTime('YYYY-MM-DD',Now);
aAdoQuery.Parameters.ParamByName('ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>').Value:=True;
aAdoQuery.Parameters.ParamByName('<27><>ע').Value:=FieldByName('STATUS').AsString;
aAdoQuery.ExecSQL;
Next;
end;
end;
finally
bAdoQuery.Close;
bAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
bAdoQuery.Open;
bAdoQuery.First;
modify_all:=True;
if bAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString<>'' then
begin
t_op_seae.Edit;
if bAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString='Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD>ɹ<EFBFBD>' then
t_op_seae.FieldByName('<27><>ǰ״̬').AsString:='<27><>Ҫ<EFBFBD><D2AA><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD>ɹ<EFBFBD>'
else
if bAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString='Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EAB1A8><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
t_op_seae.FieldByName('<27><>ǰ״̬').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'
else
if bAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString='<27>˵ֱȶԽ<C8B6><D4BD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>' then
t_op_seae.FieldByName('<27><>ǰ״̬').AsString:='<27><><EFBFBD>˵<EFBFBD>'
else
if bAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString='<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>' then
t_op_seae.FieldByName('<27><>ǰ״̬').AsString:='<27>ѷ<EFBFBD><D1B7><EFBFBD>'
else
if bAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString='Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
t_op_seae.FieldByName('<27><>ǰ״̬').AsString:='<27>޸<EFBFBD>ͨ<EFBFBD><CDA8>';
t_op_seae.Post;
end;
modify_all:=False;
aAdoQuery.Free;
bAdoQuery.Free;
cds.Free;
t_op_state.Requery();
DBEdit3.OnChange(Sender);
end;
end;
procedure Tfrm_op_seae_edi_data.SelectReciveData(bsno,mblno:string);
var xmldoc:IXMLDocument;
cds:TClientDataSet;
XMLTransformProvider1:TXMLTransformProvider;
s_web: WideString;
i :Integer;
aAdoQuery,bAdoQuery:TAdoQuery;
AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond:Word;
STATUS:string;
begin
cds:=TClientDataSet.Create(nil);
XMLTransformProvider1:=TXMLTransformProvider.Create(NIL);
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
begin
Close;Sql.Clear;
SQL.Add('Insert Into t_op_state (<28><><EFBFBD><EFBFBD><><D2B5>״̬ ,<2C>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C2BC><EFBFBD><EFBFBD><><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>,<2C><>ע)');
SQL.Add('values (:<3A><><EFBFBD><EFBFBD>,:ҵ<><D2B5>״̬ ,:<3A>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,:¼<><C2BC><EFBFBD><EFBFBD>,:¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,:ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>,:<3A><>ע)');
Close;
end;
bAdoQuery:=CreateAdoQuery;
with bAdoQuery do
begin
Close;Sql.Clear;
SQL.Add('select ҵ<><D2B5>״̬,<2C><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> from t_op_state');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
SQL.Add('order by <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1> desc');
end;
try
cds.Active:=false;
xmldoc:=NewXMLDocument;
xmldoc.Encoding:='UTF-8';
xmldoc.Options:=[doNamespaceDecl];
s_web:=mServiceSoap_Ds.LoadCustomMainfastStatus(mblno);
xmldoc.LoadFromXML(s_web);
XMLTransformProvider1.TransformRead.TransformationFile:='\\'+dbserver+'\<5C><EFBFBD><E0B5BA><EFBFBD><EFBFBD>\dscustom.xtr';
XMLTransformProvider1.TransformRead.SourceXmlDocument:=xmldoc.GetDOMDocument;
cds.Data:=XMLTransformProvider1.Data;
cds.Active:=true;
with cds do
begin
First;
while not Eof do
begin
aAdoQuery.Close;
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
if Copy(FieldByName('STATUS').AsString,1,5)='11104' then
STATUS:='<27>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><E4B9A4><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD>̬'
else
if Copy(FieldByName('STATUS').AsString,1,5)='11124' then
STATUS:='<27><><EFBFBD>ѷ<EFBFBD><D1B7>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD>ƴ<EFBFBD><C6B4>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='15302' then
STATUS:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E6B4AB><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>쳣'
else
if Copy(FieldByName('STATUS').AsString,1,5)='21102' then
STATUS:='<27>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><E4B9A4>δ<EFBFBD><CEB4><EFBFBD><EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='21106' then
STATUS:='<27><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='21107' then
STATUS:='<27><><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>δ<EFBFBD>򺣹ش<F2BAA3B9><D8B4><EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='21301' then
STATUS:='Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD>ɹ<EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='22103' then
STATUS:=' δ<>ҵ<EFBFBD><D2B5><EFBFBD>Ӧ<EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='22201' then
STATUS:='Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EAB1A8><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='23105' then
STATUS:='<27><><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD>Ѻ<EFBFBD>ע'
else
if Copy(FieldByName('STATUS').AsString,1,5)='23301' then
STATUS:='Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='24103' then
STATUS:='<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='24301' then
STATUS:='Ԥ<><D4A4><EFBFBD>յ<EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='25201' then
STATUS:='<27><><EFBFBD><EFBFBD><EFBFBD>˵ֱ<CBB5><D6B1><EFBFBD><E6B4AB><EFBFBD>ɹ<EFBFBD>'
else
if Copy(FieldByName('STATUS').AsString,1,5)='99001' then
STATUS:=' <20><><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƹ淶'
else STATUS:=FieldByName('STATUS').AsString;
aAdoQuery.Parameters.ParamByName('ҵ<><D2B5>״̬').Value:=STATUS;
aAdoQuery.Parameters.ParamByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').Value:=true;
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=employee;
AYear:=StrToInt(Copy(FieldByName('DATESTR').AsString,1,4));
AMonth:=StrToInt(Copy(FieldByName('DATESTR').AsString,5,2));
ADay:=StrToInt(Copy(FieldByName('DATESTR').AsString,7,2));
AHour:=StrToInt(Copy(FieldByName('DATESTR').AsString,9,2));
AMinute:=StrToInt(Copy(FieldByName('DATESTR').AsString,11,2));
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Value:=EncodeDatetime(AYear,AMonth,ADay,AHour,AMinute,ASecond, AMilliSecond); //DATASTR
aAdoQuery.Parameters.ParamByName('¼<><C2BC><EFBFBD><EFBFBD>').Value:=employee;
aAdoQuery.Parameters.ParamByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=FormatDateTime('YYYY-MM-DD',Now);
aAdoQuery.Parameters.ParamByName('ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>').Value:=True;
aAdoQuery.Parameters.ParamByName('<27><>ע').Value:=FieldByName('STATUS').AsString;
aAdoQuery.ExecSQL;
Next;
end;
end;
finally
bAdoQuery.Close;
bAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
bAdoQuery.Open;
bAdoQuery.First;
modify_all:=True;
t_op_seae.Edit;
if bAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString<>'' then
begin
if bAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString='Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD>ɹ<EFBFBD>' then
t_op_seae.FieldByName('<27><>ǰ״̬').AsString:='<27><>Ҫ<EFBFBD><D2AA><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD>ɹ<EFBFBD>'
else
if bAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString='Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EAB1A8><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
t_op_seae.FieldByName('<27><>ǰ״̬').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'
else
if bAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString='<27>˵ֱȶԽ<C8B6><D4BD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>' then
t_op_seae.FieldByName('<27><>ǰ״̬').AsString:='<27><><EFBFBD>˵<EFBFBD>'
else
if bAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString='<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>' then
t_op_seae.FieldByName('<27><>ǰ״̬').AsString:='<27>ѷ<EFBFBD><D1B7><EFBFBD>'
else
if bAdoQuery.FieldByName('ҵ<><D2B5>״̬').AsString='Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
t_op_seae.FieldByName('<27><>ǰ״̬').AsString:='<27>޸<EFBFBD>ͨ<EFBFBD><CDA8>'
end;
t_op_seae.Post;
aAdoQuery.Free;
XMLTransformProvider1.Free;
cds.Free;
bAdoQuery.Free;
modify_all:=False;
end;
end;
procedure Tfrm_op_seae_edi_data.t_op_seaeBeforeEdit(DataSet: TDataSet);
begin
if not modify_all then begin
if t_op_seae.FieldByName('EDI״̬').AsString='<27>ѷ<EFBFBD><D1B7><EFBFBD>' then begin
showmessage('<27>ѷ<EFBFBD><D1B7>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD>޸<EFBFBD><><C9BE><EFBFBD><EFBFBD>');
abort;
end;
end;
end;
procedure Tfrm_op_seae_edi_data.t_op_ctnBeforeEdit(DataSet: TDataSet);
begin
if not modify_all then begin
if t_op_seae.FieldByName('EDI״̬').AsString='<27>ѷ<EFBFBD><D1B7><EFBFBD>' then begin
showmessage('<27>ѷ<EFBFBD><D1B7>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD>޸ģ<DEB8>');
abort;
end;
end;
end;
procedure Tfrm_op_seae_edi_data.N20Click(Sender: TObject);
begin
try
modify_all:=true;
t_op_seae.Edit;
t_op_seae.FieldByName('EDI״̬').AsString:='δ<><CEB4><EFBFBD><EFBFBD>';
t_op_seae.Post;
finally
modify_all:=false;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton30Click(Sender: TObject);
var
Str:TStrings;
i:integer;
numunzipped:integer;
fileType,SenderHandphone,SenderEmail,SenderFax:string;
s0,s5:string;
begin
if (t_op_seae1.DataSet.State=dsinsert)or(t_op_seae1.DataSet.State=dsedit) then
t_op_seae1.DataSet.post;
if t_op_seae.FieldByName('EDI״̬').AsString='<27>ѷ<EFBFBD><D1B7><EFBFBD>' then begin
showmessage('<27>ѷ<EFBFBD><D1B7>Ͳ<EFBFBD><CDB2>ܷ<EFBFBD><DCB7><EFBFBD>,<2C><><EFBFBD>޸<EFBFBD>Ϊδ<CEAA><CEB4><EFBFBD>ͣ<EFBFBD>');
abort;
end;
if MessageDlg('ȷ<><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbyes,mbno],0)=mrNo then
Exit;
bsSkinButton28Click(Sender);
bsSkinButton15Click(Sender);
s0:='';
s5:='';
str:=Tstringlist.Create;
try
modify_all:=True;
if bsSkinComboBox1.ItemIndex=0 then
begin
Str:=CreateSIEdiFile_xml;
s0:=Str.Text;
for i:=0 to Str.Count-1 do begin
if IsZhongwen(Str[i]) then
begin
ShowMessage('<27><>Ʊҵ<C6B1><D2B5><EFBFBD><EFBFBD><EFBFBD>ܺ<EFBFBD><DCBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>'+Str[i]);
exit;
end;
end;
s5:='1';
end
else
begin
Str:=CreateSIEdiFile_xml;
s0:=Str.Text;
for i:=0 to Str.Count-1 do
begin
if IsZhongwen(Str[i]) then
begin
ShowMessage('<27><>Ʊҵ<C6B1><D2B5><EFBFBD><EFBFBD><EFBFBD>ܺ<EFBFBD><DCBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>'+Str[i]);
exit;
end;
end;
end;
frm_op_seae_edi_data.t_op_seae.Edit;
frm_op_seae_edi_data.t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Value:=Now;
frm_op_seae_edi_data.t_op_seae.FieldByName('<27><>ǰ״̬').Value:='<27>ѷ<EFBFBD><D1B7><EFBFBD>';
frm_op_seae_edi_data.t_op_seae.Post;
finally
modify_all:=False;
FreeAndNil(Str)
end;
try
modify_all:=True;
getwebservice_ds;
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',employee,[]) then
begin
SenderHandphone:=frm_data_share.t_sys_employee.fieldbyname('<27>ƶ<EFBFBD><C6B6>绰').asstring;
SenderEmail:=frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
SenderFax:=frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end;
mServiceSoap_Ds.UpdateCustomMainfast(s0,s5,trim(get_parameters_value(301,'')),employee,SenderHandphone,SenderEmail,SenderFax,frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring);
showmessage('<27><><EFBFBD>ͳɹ<CDB3><C9B9><EFBFBD>');
modify_all:=False;
except
showmessage('<27><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinComboBox1Change(Sender: TObject);
begin
if bsSkinComboBox1.ItemIndex=3 then
begin
cxDBCheckListBox1.Visible:=true;
end
else
begin
cxDBCheckListBox1.Visible:=False;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton31Click(Sender: TObject);
var
Str:TStrings;
i:integer;
fileType:string;
begin
if bsSkinComboBox1.ItemIndex=0 then
fileType:='-9'
else if bsSkinComboBox1.ItemIndex=1 then
fileType:='-2'
else if bsSkinComboBox1.ItemIndex=2 then
fileType:='-3'
else if bsSkinComboBox1.ItemIndex=3 then
fileType:='-5'
else if bsSkinComboBox1.ItemIndex=4 then
fileType:='-0'
else if bsSkinComboBox1.ItemIndex=5 then
fileType:='-11'
else fileType:='-9';
{
9 <20><>Ҫ
2 <20><><EFBFBD><EFBFBD>
3 ɾ<><C9BE>
5 <20><><EFBFBD><EFBFBD>
0 <20><>Ҫ
11 ָ<><D6B8>
}
str:=Tstringlist.Create;
try
Str:=CreateSIEdiFile_xml;
for i:=0 to Str.Count-1 do begin
if IsZhongwen(Str[i]) then begin
if MessageDlg('<27><>Ʊҵ<C6B1><D2B5><EFBFBD><EFBFBD><EFBFBD>ܺ<EFBFBD><DCBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>,ȷʵҪ<CAB5><D2AA><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbYes,mbNo],0)=mrNo then
exit;
end;
end;
SaveDialog1.FileName:=frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring;
SaveDialog1.Filter:='*.xml|*.xml';
if SaveDialog1.Execute then
begin
str.SaveToFile(SaveDialog1.FileName+fileType+'.xml');
showmessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ɳɹ<C9B3><C9B9><EFBFBD>');
end
else
begin
showmessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>');
exit;
end;
finally
FreeAndNil(Str)
end;
end;
procedure Tfrm_op_seae_edi_data.N2Click(Sender: TObject);
var
afield,afieldfee : variant;
aOR_ID:integer;
aQuery:TAdoQuery;
i:integer;
bsno,id:string;
Boolean_Ctn:Boolean;
begin
if t_op_seae.IsEmpty then
begin
exit;
MessageDlg('û<>и<EFBFBD><D0B8>Ƶ<EFBFBD><C6B5><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD>',mtWarning,[mbok],0);
end;
afield := vararraycreate([0,t_op_seae.fieldcount-1],varvariant);
for i := 0 to (t_op_seae.fieldcount-1) do
begin
afield[i] :=t_op_seae.fields[i].value ;
end;
bsno:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.append;
for i := 0 to (t_op_seae.fieldcount-1) do
begin
if t_op_seae.fields[i].FieldName<>'<27><><EFBFBD><EFBFBD>' then
t_op_seae.fields[i].value := afield[i] ;
end;
id:=get_id;
t_op_seae.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').Value:=employee;
t_op_seae.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=date;
t_op_seae.fieldbyname('EDI״̬').Value:='δ<><CEB4><EFBFBD><EFBFBD>';
t_op_seae.fieldbyname('<27><>ǰ״̬').Value:='δ<><CEB4><EFBFBD><EFBFBD>';
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').Value:=id;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=id;
t_op_seae.fieldbyname('<27>޸<EFBFBD>ԭ<EFBFBD><D4AD>').Value:='';
t_op_seae.Post;
aQuery:=CreateAdoQuery;
try
with aQuery do
begin
close;sql.clear;
sql.Add('select * from t_op_ctn_edi where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
open;
if not t_op_ctn.active then
t_op_ctn.Open;
first;
while not eof do
begin
t_op_ctn.Insert;
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=id;
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
t_op_ctn['<27>ߴ<EFBFBD>']:=aQuery['<27>ߴ<EFBFBD>'];
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=1;
t_op_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'];
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
t_op_ctn['<27><>װ']:=aQuery['<27><>װ'];
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
t_op_ctn['<27><>ͷ']:=aQuery['<27><>ͷ'];
if frm_data_share.t_code_ctn.Locate('<27><><EFBFBD><EFBFBD>',t_op_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[]) then
begin
if frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='20'then
t_op_ctn['TEU']:=1;
if (frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='40')OR
(frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='45')
then
t_op_ctn['TEU']:=2;
end;
t_op_ctn.Post;
next;
end;
end;
finally
freeandnil(aQuery);
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton32Click(Sender: TObject);
begin
UpdateInfor;
end;
procedure Tfrm_op_seae_edi_data.t_op_seaeBeforeDelete(DataSet: TDataSet);
begin
if t_op_seae.FieldByName('EDI״̬').AsString='<27>ѷ<EFBFBD><D1B7><EFBFBD>' then begin
showmessage('<27>ѷ<EFBFBD><D1B7>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD>޸<EFBFBD><><C9BE><EFBFBD><EFBFBD>');
abort;
end;
end;
procedure Tfrm_op_seae_edi_data.DBEdit3Change(Sender: TObject);
begin
if t_op_seae.FieldByName('EDI״̬').AsString='<27>ѷ<EFBFBD><D1B7><EFBFBD>' then
begin
bsSkinLabel1.DefaultFont.Color:=clGreen;
end
else
begin
bsSkinLabel1.DefaultFont.Color:=clRed;
end;
if not t_op_state.Active then
t_op_state.OPEN;
if t_op_state.Locate('ҵ<><D2B5>״̬','Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD>ɹ<EFBFBD>',[]) then
begin
bsSkinLabel2.DefaultFont.Color:=clGreen;
end
else
begin
bsSkinLabel2.DefaultFont.Color:=clRed;
end;
if t_op_state.Locate('ҵ<><D2B5>״̬','Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EAB1A8><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>',[]) then
begin
bsSkinLabel3.DefaultFont.Color:=clGreen;
end
else
begin
bsSkinLabel3.DefaultFont.Color:=clRed;
end;
if t_op_state.Locate('ҵ<><D2B5>״̬','<27>˵ֱȶԽ<C8B6><D4BD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>',[]) then
begin
bsSkinLabel4.DefaultFont.Color:=clGreen;
end
else
begin
bsSkinLabel4.DefaultFont.Color:=clRed;
end;
if t_op_state.Locate('ҵ<><D2B5>״̬','<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>',[]) then
begin
bsSkinLabel5.DefaultFont.Color:=clGreen;
end
else
begin
bsSkinLabel5.DefaultFont.Color:=clRed;
end;
if t_op_state.Locate('ҵ<><D2B5>״̬','Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>',[]) then
begin
bsSkinLabel6.DefaultFont.Color:=clGreen;
end
else
begin
bsSkinLabel6.DefaultFont.Color:=clRed;
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinLabel1MouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinLabel1.ClientToScreen(Point(0,bsSkinLabel1.Height));
if not t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').IsNull then
begin
ABC1.Caption:=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Asstring;
PopupMenu5.Popup(Pnt.x,Pnt.y);
end
else
begin
ABC1.Caption:='<27><>';
PopupMenu5.Popup(Pnt.x,Pnt.y);
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinLabel2MouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinLabel2.ClientToScreen(Point(0,bsSkinLabel2.Height));
if t_op_state.Locate('ҵ<><D2B5>״̬','Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD>ɹ<EFBFBD>',[]) then
begin
ABC1.Caption:=t_op_state.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Asstring;
PopupMenu5.Popup(Pnt.x,Pnt.y);
end
else
begin
ABC1.Caption:='<27><>';
PopupMenu5.Popup(Pnt.x,Pnt.y);
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinLabel3MouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinLabel3.ClientToScreen(Point(0,bsSkinLabel3.Height));
if t_op_state.Locate('ҵ<><D2B5>״̬','Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EAB1A8><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>',[]) then
begin
ABC1.Caption:=t_op_state.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Asstring;
PopupMenu5.Popup(Pnt.x,Pnt.y);
end
else
begin
ABC1.Caption:='<27><>';
PopupMenu5.Popup(Pnt.x,Pnt.y);
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinLabel4MouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinLabel4.ClientToScreen(Point(0,bsSkinLabel4.Height));
if t_op_state.Locate('ҵ<><D2B5>״̬','<27>˵ֱȶԽ<C8B6><D4BD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>',[]) then
begin
ABC1.Caption:=t_op_state.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Asstring;
PopupMenu5.Popup(Pnt.x,Pnt.y);
end
else
begin
ABC1.Caption:='<27><>';
PopupMenu5.Popup(Pnt.x,Pnt.y);
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinLabel5MouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinLabel5.ClientToScreen(Point(0,bsSkinLabel5.Height));
if t_op_state.Locate('ҵ<><D2B5>״̬','<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>',[]) then
begin
ABC1.Caption:=t_op_state.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Asstring;
PopupMenu5.Popup(Pnt.x,Pnt.y);
end
else
begin
ABC1.Caption:='<27><>';
PopupMenu5.Popup(Pnt.x,Pnt.y);
end;
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton27Click(Sender: TObject);
var i:integer;
begin
if dxDBGrid1.SelectedCount>1 then begin
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
try
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƾ֤<C6BE><D6A4><EFBFBD>Ժ󡣡<D4BA><F3A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=dxDBGrid1.SelectedCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
getwebservice_ds;
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_op_seae.GotoBookmark(Pointer(dxDBGrid1.selectedrows[I]));
SelectReciveData(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString);
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
finally
freeAndNil(frm_sys_progress);
end;
end
else
begin
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
try
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƾ֤<C6BE><D6A4><EFBFBD>Ժ󡣡<D4BA><F3A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=t_op_seae.RecordCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
getwebservice_ds;
with t_op_seae do
begin
First;
while not eof do
begin
if t_op_seae.FieldByName('<27><>ǰ״̬').AsString<>'<27>ѷ<EFBFBD><D1B7><EFBFBD>' then
SelectReciveData(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString);
Next;
end;
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
finally
freeAndNil(frm_sys_progress);
t_op_seae.First;
end;
end;
end;
{ if dxDBGrid1.SelectedCount>1 then begin
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
try
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƾ֤<C6BE><D6A4><EFBFBD>Ժ󡣡<D4BA><F3A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=dxDBGrid1.SelectedCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
getwebservice_ds;
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_op_seae.GotoBookmark(Pointer(dxDBGrid1.selectedrows[I]));
SelectReciveData(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString,t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString);
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
finally
freeAndNil(frm_sys_progress);
end;
end
}
procedure Tfrm_op_seae_edi_data.bsSkinLabel6MouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinLabel6.ClientToScreen(Point(0,bsSkinLabel6.Height));
if t_op_state.Locate('ҵ<><D2B5>״̬','Ԥ<><D4A4><EFBFBD>յ<EFBFBD><D5B5>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>',[]) then
begin
ABC1.Caption:=t_op_state.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').Asstring;
PopupMenu5.Popup(Pnt.x,Pnt.y);
end
else
begin
ABC1.Caption:='<27><>';
PopupMenu5.Popup(Pnt.x,Pnt.y);
end;
end;
procedure Tfrm_op_seae_edi_data.t_op_seaeAfterInsert(DataSet: TDataSet);
begin
t_op_seae.FieldByName('<27><>ǰ״̬').Asstring:='δ<><CEB4><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi_data.bsSkinButton33Click(Sender: TObject);
var s_czmc,s_user,s_key,s_yzh,s_yzhuser,s_yzhkey,s_lh,s_zc,s_zckey,s_sscz:string;
begin
try
s_user:=get_parameters_value(2101,'false');
s_key:=get_parameters_value(2102,'false');
s_czmc:=get_parameters_value(2103,'false');
s_yzhuser:=get_parameters_value(2104,'false');
s_yzhkey:=get_parameters_value(2105,'false');
s_yzh:=get_parameters_value(2106,'false');
s_lh:=get_parameters_value(2109,'false');
s_zc:=get_parameters_value(2113,'false');
s_zckey:=get_parameters_value(2112,'false');
s_sscz:=get_parameters_value(2114,'false');
if Trim(t_op_ctn.DataSource.DataSet.fieldbyname('<27><>վ').AsString)=s_czmc then
GetdyczInfo_dy(s_user,s_key,Trim(t_op_ctn.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString),t_op_ctn.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)
else
if Trim(t_op_ctn.DataSource.DataSet.fieldbyname('<27><>վ').AsString)=s_yzh then
GetdyczInfo_yzh(s_user,s_key,Trim(t_op_ctn.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString),t_op_ctn.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)
else
if Trim(t_op_ctn.DataSource.DataSet.fieldbyname('<27><>վ').AsString)=s_lh then
GetdyczInfo_lhcz(s_user,s_key,Trim(t_op_ctn.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString),t_op_ctn.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)
else
if Trim(t_op_ctn.DataSource.DataSet.fieldbyname('<27><>վ').AsString)=s_zc then
begin
GetdyczInfo_zc(s_user,s_zckey,Trim(t_op_ctn.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString),t_op_ctn.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)
end
else
if Trim(t_op_ctn.DataSource.DataSet.fieldbyname('<27><>վ').AsString)=s_sscz then
begin
getssczinfor(Trim(t_op_ctn.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString))
end
else
GetdyczInfo_jfcz('','',Trim(t_op_ctn.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString),'')
finally
t_op_ctn.Requery;
end;
end;
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo9Enter(Sender: TObject);
begin
RxLookupComboEnter(RxDBLookupCombo9);
end;
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo9KeyPress(Sender: TObject;
var Key: Char);
begin
RxLookupComboExit(RxDBLookupCombo9);
end;
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo9Exit(Sender: TObject);
begin
RxLookupComboExit(RxDBLookupCombo9);
end;
end.