|
|
unit u_op_seae_edi_data;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,IdFTP,IdFTPCommon,
|
|
|
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,
|
|
|
IdAntiFreezeBase, IdAntiFreeze, dxEditor, dxEdLib, dxDBELib, DBCtrlsEh,ComObj,
|
|
|
bsSkinBoxCtrls, IdExplicitTLSClientServerBase,ShellAPI, Excel;
|
|
|
|
|
|
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;
|
|
|
Label3: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label38: TLabel;
|
|
|
DBEdit1: TDBEdit;
|
|
|
DBEdit3: TDBEdit;
|
|
|
DBEdit4: 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;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
Label36: TLabel;
|
|
|
DBEdit38: TDBEdit;
|
|
|
Label37: TLabel;
|
|
|
DBEdit39: TDBEdit;
|
|
|
Label39: TLabel;
|
|
|
DBEdit40: TDBEdit;
|
|
|
Label40: TLabel;
|
|
|
Label42: TLabel;
|
|
|
wwDBComboBox8: TwwDBComboBox;
|
|
|
Label44: TLabel;
|
|
|
DBEdit42: TDBEdit;
|
|
|
DBEdit43: TDBEdit;
|
|
|
Label46: TLabel;
|
|
|
Label50: TLabel;
|
|
|
DBEdit44: TDBEdit;
|
|
|
Label54: TLabel;
|
|
|
DBEdit46: TDBEdit;
|
|
|
Label55: TLabel;
|
|
|
DBEdit48: TDBEdit;
|
|
|
Label56: TLabel;
|
|
|
DBEdit50: TDBEdit;
|
|
|
Label59: TLabel;
|
|
|
bsSkinGroupBox6: TbsSkinGroupBox;
|
|
|
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;
|
|
|
bsSkinPanel9: TbsSkinPanel;
|
|
|
bsSkinButton56: TbsSkinButton;
|
|
|
bsSkinButton57: TbsSkinButton;
|
|
|
bsSkinButton58: TbsSkinButton;
|
|
|
bsSkinButton59: TbsSkinButton;
|
|
|
wwDBLookupCombo16: TwwDBLookupCombo;
|
|
|
wwDBLookupComboctn: TwwDBLookupCombo;
|
|
|
wwDBGrid1: TwwDBGrid;
|
|
|
Label4: TLabel;
|
|
|
wwDBComboBox3: TwwDBComboBox;
|
|
|
Label43: TLabel;
|
|
|
DBEdit18: TDBEdit;
|
|
|
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;
|
|
|
bsSkinGroupBox9: TbsSkinGroupBox;
|
|
|
Label68: TLabel;
|
|
|
wwDBComboBox15: TwwDBComboBox;
|
|
|
DBEdit81: TDBEdit;
|
|
|
wwDBLookupCombo61: TwwDBLookupCombo;
|
|
|
DBEdit82: TDBEdit;
|
|
|
Label169: TLabel;
|
|
|
DBEdit83: TDBEdit;
|
|
|
Label170: TLabel;
|
|
|
Label63: TLabel;
|
|
|
DBMemo38: TDBMemo;
|
|
|
DBMemo39: TDBMemo;
|
|
|
btnMarks: TbsSkinButton;
|
|
|
btnDesc: TbsSkinButton;
|
|
|
Label64: TLabel;
|
|
|
Label65: TLabel;
|
|
|
Label66: TLabel;
|
|
|
Label67: TLabel;
|
|
|
Label104: TLabel;
|
|
|
DBEdit54: TDBEdit;
|
|
|
Label106: TLabel;
|
|
|
DBEdit55: TDBEdit;
|
|
|
Label105: TLabel;
|
|
|
wwDBComboBox6: TwwDBComboBox;
|
|
|
Label109: TLabel;
|
|
|
DBEdit56: TDBEdit;
|
|
|
Label108: TLabel;
|
|
|
DBEdit57: TDBEdit;
|
|
|
Label69: TLabel;
|
|
|
bsSkinPanel5: TbsSkinPanel;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
Label6: TLabel;
|
|
|
Label7: TLabel;
|
|
|
Label8: TLabel;
|
|
|
Label9: TLabel;
|
|
|
Label10: TLabel;
|
|
|
Label11: TLabel;
|
|
|
Label12: TLabel;
|
|
|
Label13: TLabel;
|
|
|
Label14: TLabel;
|
|
|
Label15: TLabel;
|
|
|
bsSkinSpeedButton1: TbsSkinSpeedButton;
|
|
|
DBEdit5: TDBEdit;
|
|
|
DBEdit6: TDBEdit;
|
|
|
DBEdit7: TDBEdit;
|
|
|
DBEdit8: TDBEdit;
|
|
|
DBEdit11: TDBEdit;
|
|
|
DBEdit12: TDBEdit;
|
|
|
DBEdit13: TDBEdit;
|
|
|
DBEdit14: TDBEdit;
|
|
|
DBEdit15: TDBEdit;
|
|
|
DBEdit16: TDBEdit;
|
|
|
bsSkinGroupBox2: TbsSkinGroupBox;
|
|
|
Label16: TLabel;
|
|
|
Label17: TLabel;
|
|
|
Label18: TLabel;
|
|
|
Label19: TLabel;
|
|
|
Label20: TLabel;
|
|
|
Label21: TLabel;
|
|
|
Label22: TLabel;
|
|
|
Label23: TLabel;
|
|
|
Label24: TLabel;
|
|
|
Label25: TLabel;
|
|
|
bsSkinSpeedButton2: TbsSkinSpeedButton;
|
|
|
DBEdit17: TDBEdit;
|
|
|
DBEdit19: TDBEdit;
|
|
|
DBEdit20: TDBEdit;
|
|
|
DBEdit21: TDBEdit;
|
|
|
DBEdit22: TDBEdit;
|
|
|
DBEdit23: TDBEdit;
|
|
|
DBEdit24: TDBEdit;
|
|
|
DBEdit25: TDBEdit;
|
|
|
DBEdit26: TDBEdit;
|
|
|
DBEdit27: TDBEdit;
|
|
|
bsSkinGroupBox3: TbsSkinGroupBox;
|
|
|
Label26: TLabel;
|
|
|
Label27: TLabel;
|
|
|
Label28: TLabel;
|
|
|
Label29: TLabel;
|
|
|
Label30: TLabel;
|
|
|
Label31: TLabel;
|
|
|
Label32: TLabel;
|
|
|
Label33: TLabel;
|
|
|
Label34: TLabel;
|
|
|
Label35: TLabel;
|
|
|
bsSkinSpeedButton3: TbsSkinSpeedButton;
|
|
|
DBEdit28: TDBEdit;
|
|
|
DBEdit29: TDBEdit;
|
|
|
DBEdit30: TDBEdit;
|
|
|
DBEdit31: TDBEdit;
|
|
|
DBEdit32: TDBEdit;
|
|
|
DBEdit33: TDBEdit;
|
|
|
DBEdit34: TDBEdit;
|
|
|
DBEdit35: TDBEdit;
|
|
|
DBEdit36: TDBEdit;
|
|
|
DBEdit37: TDBEdit;
|
|
|
bsSkinGroupBox5: TbsSkinGroupBox;
|
|
|
DBMemo3: TDBMemo;
|
|
|
bsSkinGroupBox7: TbsSkinGroupBox;
|
|
|
DBMemo1: TDBMemo;
|
|
|
bsSkinGroupBox8: TbsSkinGroupBox;
|
|
|
DBMemo2: TDBMemo;
|
|
|
t_op_ctnDSDesigner4: TStringField;
|
|
|
wwDBComboBoxOwner: TwwDBComboBox;
|
|
|
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;
|
|
|
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
|
|
|
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;
|
|
|
DebugListBox: TListBox;
|
|
|
StatusBar1: TStatusBar;
|
|
|
ProgressBar1: TProgressBar;
|
|
|
Label76: TLabel;
|
|
|
bsSkinButton22: TbsSkinButton;
|
|
|
PopupMenu4: TPopupMenu;
|
|
|
N2: TMenuItem;
|
|
|
NZY: TMenuItem;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
Label77: TLabel;
|
|
|
Label78: TLabel;
|
|
|
bsSkinButton23: TbsSkinButton;
|
|
|
N4: TMenuItem;
|
|
|
NZT: TMenuItem;
|
|
|
NWD2101: TMenuItem;
|
|
|
wwDBComboBoxFILETYPE: TwwDBComboBox;
|
|
|
dxDBGrid1Column20: TdxDBGridColumn;
|
|
|
dxDBGrid1Column21: TdxDBGridColumn;
|
|
|
dxDBGrid1Column22: 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;
|
|
|
N21: TMenuItem;
|
|
|
NLD: TMenuItem;
|
|
|
NHG: TMenuItem;
|
|
|
NYD: TMenuItem;
|
|
|
Label41: TLabel;
|
|
|
DBEdit59: TDBEdit;
|
|
|
wwDBLookupCombo21: TwwDBLookupCombo;
|
|
|
RxDBLookupCombo15: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo20: TwwDBLookupCombo;
|
|
|
btnSeal: TbsSkinButton;
|
|
|
bsSkinExPanel1: TbsSkinExPanel;
|
|
|
bsSkinPanel6: TbsSkinPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton13: TbsSkinButton;
|
|
|
wwDBGrid2: TwwDBGrid;
|
|
|
N3: TMenuItem;
|
|
|
NHF: TMenuItem;
|
|
|
Label58: TLabel;
|
|
|
wwDBComboBoxOP: TwwDBComboBox;
|
|
|
N5: TMenuItem;
|
|
|
NHGYDT: TMenuItem;
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
bsSkinButton15: TbsSkinButton;
|
|
|
bsSkinButton24: TbsSkinButton;
|
|
|
OpenDialog1: TOpenDialog;
|
|
|
wwDBLookupCombo52: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo17: TwwDBLookupCombo;
|
|
|
bsSkinButton65: TbsSkinButton;
|
|
|
bsSkinButton25: TbsSkinButton;
|
|
|
Label57: TLabel;
|
|
|
bsSkinButton26: TbsSkinButton;
|
|
|
DBMemo4: TDBMemo;
|
|
|
N6: TMenuItem;
|
|
|
N20: TMenuItem;
|
|
|
N22: TMenuItem;
|
|
|
N23: TMenuItem;
|
|
|
N24: TMenuItem;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
dxDBGrid4: TdxDBGrid;
|
|
|
dxDBGrid4Column2: TdxDBGridColumn;
|
|
|
dxDBGridColumn10: TdxDBGridColumn;
|
|
|
dxDBGrid4Column3: TdxDBGridColumn;
|
|
|
bsSkinGroupBox13: TbsSkinGroupBox;
|
|
|
bsSkinPanel14: TbsSkinPanel;
|
|
|
bsSkinButton48: TbsSkinButton;
|
|
|
bsSkinButton49: TbsSkinButton;
|
|
|
bsSkinButton50: TbsSkinButton;
|
|
|
bsSkinButton51: TbsSkinButton;
|
|
|
bsSkinButton66: TbsSkinButton;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
dxDBGrid2fid: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2rl_id: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
dxDBGridColumn3: TdxDBGridColumn;
|
|
|
dxDBGridDateColumn1: TdxDBGridDateColumn;
|
|
|
dxDBGridColumn4: TdxDBGridColumn;
|
|
|
dxDBGridColumn5: TdxDBGridColumn;
|
|
|
t_op_file_data: TADOQuery;
|
|
|
dsrFuJian: TDataSource;
|
|
|
t_op_file_items_data1: TDataSource;
|
|
|
t_op_file_items_data: TADOQuery;
|
|
|
bsSkinButton27: TbsSkinButton;
|
|
|
t_crm_emloyee_link1: TDataSource;
|
|
|
t_crm_emloyee_link: TADOQuery;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
dxDBGrid1Column23: TdxDBGridColumn;
|
|
|
bsSkinButton28: TbsSkinButton;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
t_op_seae_sum: TADOQuery;
|
|
|
t_op_seae_sum1: TDataSource;
|
|
|
dxDBGrid2Column1: TdxDBGridColumn;
|
|
|
dxDBGrid2Column2: TdxDBGridColumn;
|
|
|
dxDBGrid1Column24: TdxDBGridColumn;
|
|
|
Label79: TLabel;
|
|
|
N26: TMenuItem;
|
|
|
N27: TMenuItem;
|
|
|
dxDBGrid1Column25: TdxDBGridColumn;
|
|
|
Label82: TLabel;
|
|
|
DBEdit41: TDBEdit;
|
|
|
Label83: TLabel;
|
|
|
DBEdit45: TDBEdit;
|
|
|
Label84: TLabel;
|
|
|
DBEdit47: TDBEdit;
|
|
|
DBEdit49: TDBEdit;
|
|
|
Label85: TLabel;
|
|
|
Label86: TLabel;
|
|
|
DBEdit51: TDBEdit;
|
|
|
Label87: TLabel;
|
|
|
DBEdit52: TDBEdit;
|
|
|
bsSkinButton29: TbsSkinButton;
|
|
|
bsSkinButton30: TbsSkinButton;
|
|
|
wwDBComboBox20: TwwDBComboBox;
|
|
|
EXCEL1: TMenuItem;
|
|
|
N28: TMenuItem;
|
|
|
dxDBGrid1Column26: TdxDBGridColumn;
|
|
|
N29: TMenuItem;
|
|
|
EXCEL2: TMenuItem;
|
|
|
Excel3: TExcel;
|
|
|
SaveDialog: TSaveDialog;
|
|
|
Label88: TLabel;
|
|
|
DBEdit2: TDBEdit;
|
|
|
DBEdit53: TDBEdit;
|
|
|
Label89: TLabel;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
Label90: TLabel;
|
|
|
dxDBGrid1Column27: TdxDBGridColumn;
|
|
|
N30: TMenuItem;
|
|
|
N31: TMenuItem;
|
|
|
N32: TMenuItem;
|
|
|
N33: TMenuItem;
|
|
|
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 DBEdit3Change(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 bsSkinButton48Click(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 bsSkinButton16Click(Sender: TObject);
|
|
|
procedure bsSkinButton18Click(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 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 NHGYDTClick(Sender: TObject);
|
|
|
procedure wwDBLookupCombo3Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo3Change(Sender: TObject);
|
|
|
procedure bsSkinButton15Click(Sender: TObject);
|
|
|
procedure bsSkinButton24Click(Sender: TObject);
|
|
|
procedure N1Click(Sender: TObject);
|
|
|
procedure wwDBLookupCombo52Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo17Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo52Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo17Change(Sender: TObject);
|
|
|
procedure bsSkinButton65Click(Sender: TObject);
|
|
|
procedure bsSkinButton25Click(Sender: TObject);
|
|
|
procedure bsSkinButton26Click(Sender: TObject);
|
|
|
procedure t_op_seaeBeforeEdit(DataSet: TDataSet);
|
|
|
procedure t_op_ctnBeforeEdit(DataSet: TDataSet);
|
|
|
procedure N20Click(Sender: TObject);
|
|
|
procedure N23Click(Sender: TObject);
|
|
|
procedure N26Click(Sender: TObject);
|
|
|
procedure dxDBGrid4Click(Sender: TObject);
|
|
|
procedure t_op_file_items_dataAfterDelete(DataSet: TDataSet);
|
|
|
procedure t_op_file_items_dataAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_op_file_items_dataAfterPost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton66Click(Sender: TObject);
|
|
|
procedure bsSkinButton49Click(Sender: TObject);
|
|
|
procedure bsSkinButton50Click(Sender: TObject);
|
|
|
procedure bsSkinButton51Click(Sender: TObject);
|
|
|
procedure bsSkinButton27Click(Sender: TObject);
|
|
|
procedure dxDBGrid1CustomDraw(Sender: TObject; ACanvas: TCanvas;
|
|
|
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
|
|
|
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
|
|
|
AFocused: Boolean; var ADone: Boolean);
|
|
|
procedure t_op_file_dataAfterPost(DataSet: TDataSet);
|
|
|
procedure bsSkinPageControl1Change(Sender: TObject);
|
|
|
procedure DBEdit1Change(Sender: TObject);
|
|
|
procedure bsSkinButton28Click(Sender: TObject);
|
|
|
procedure N27Click(Sender: TObject);
|
|
|
procedure bsSkinButton29Click(Sender: TObject);
|
|
|
procedure bsSkinButton30Click(Sender: TObject);
|
|
|
procedure EXCEL1Click(Sender: TObject);
|
|
|
procedure t_op_seaeBeforePost(DataSet: TDataSet);
|
|
|
procedure dxDBGrid1Column26GetText(Sender: TObject;
|
|
|
ANode: TdxTreeListNode; var AText: String);
|
|
|
procedure EXCEL2Click(Sender: TObject);
|
|
|
procedure RxDBLookupCombo4Enter(Sender: TObject);
|
|
|
procedure RxDBLookupCombo4Exit(Sender: TObject);
|
|
|
procedure N31Click(Sender: TObject);
|
|
|
procedure N33Click(Sender: TObject);
|
|
|
procedure Edit3KeyPress(Sender: TObject; var Key: Char);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
AbortTransfer: Boolean;
|
|
|
TransferrignData: Boolean;
|
|
|
BytesToTransfer: LongWord;
|
|
|
|
|
|
STime: TDateTime;
|
|
|
procedure setconcolor; //<2F><><EFBFBD>ÿؼ<C3BF><D8BC><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|
|
function istrueAFR(Dataset:TDataSet):Boolean;
|
|
|
procedure createAFR(bltype:string;filepath:string);
|
|
|
function getCtnAfr(code:string):string;
|
|
|
function getPkgAfr(code:string):string;
|
|
|
function formatAfrstr(str:string):string;
|
|
|
procedure PutToDebugLog(Operation, S1: String);
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
naspath:widestring;
|
|
|
isexcel:BOOL;
|
|
|
procedure UpdateCTN(BSNO:STRING);
|
|
|
procedure UpLoadPro(fname: string);
|
|
|
procedure UpLoadProFile(fname,RemotePathName,Users,pw,mblNo: string); //fname<6D><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
|
|
|
|
|
procedure DownLoadPro(fname: string);
|
|
|
|
|
|
procedure DownLoadProFils(RemotePathName,Users,pw,fname: string); //<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
end;
|
|
|
var
|
|
|
frm_op_seae_edi_data: Tfrm_op_seae_edi_data;
|
|
|
AverageSpeed: Double = 0;
|
|
|
frm_op_seae_data_create:boolean;
|
|
|
opsqlstr,opsumsqlstr:string;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main,u_data_share, my_sys_function, u_sys_progress,
|
|
|
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_code_edicode, u_op_seae_edi_custom_hgydt,
|
|
|
u_op_seae, u_op_customername_change, u_op_vesselvoy_cdchange;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.setconcolor;
|
|
|
begin
|
|
|
|
|
|
|
|
|
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');
|
|
|
frm_op_seae_data_create:=false;
|
|
|
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/14);
|
|
|
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;
|
|
|
bsSkinButton28.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
|
|
|
t_op_seae.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime+7;
|
|
|
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
|
|
|
isexcel:=False;
|
|
|
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 employee='<27>鿴' then
|
|
|
begin
|
|
|
ShowMessage('<27>鿴<EFBFBD>û<EFBFBD>ֻ<EFBFBD>ܲ鿴<DCB2><E9BFB4><EFBFBD><EFBFBD><EFBFBD>ĺ<DEB8><C4BA><EFBFBD><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+'''';
|
|
|
InsertSysLog('<27>յ<EFBFBD>ɾ<EFBFBD><C9BE>',t_op_seae.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring+'--'+t_op_seae.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').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);
|
|
|
begin
|
|
|
Notebook1.PageIndex:=0;
|
|
|
|
|
|
|
|
|
isexcel:=false;
|
|
|
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>
|
|
|
|
|
|
naspath:=get_parameters_value(175,'\\223.223.95.160\data');
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
opsqlstr:=t_op_seae.sql.Text;
|
|
|
t_op_ctn.Open;
|
|
|
t_op_ctn_detail.Open;
|
|
|
t_op_file_data.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_op_seae_data_create:=true;
|
|
|
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
|
|
|
with t_crm_emloyee_link do
|
|
|
begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select * from t_crm_emloyee_link');
|
|
|
SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=employee;
|
|
|
Open;
|
|
|
// ShowMessage(IntToStr(RecordCount));
|
|
|
end;
|
|
|
|
|
|
frm_sys_progress.close;
|
|
|
frm_sys_progress:=nil;
|
|
|
|
|
|
|
|
|
|
|
|
if if_reg(20301) then //<2F><><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
NWD2101.Visible:=True;
|
|
|
//NWD1101.Visible:=True;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
NWD2101.Visible:=False;
|
|
|
//NWD1101.Visible:=False;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if if_reg(20302) then //<2F><><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
NWY.Visible:=True;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
NWY.Visible:=False;
|
|
|
end;
|
|
|
if if_reg(20303) then //<2F><><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
NLD.Visible:=True;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
NLD.Visible:=False;
|
|
|
|
|
|
end;
|
|
|
if if_reg(20304) then //<2F><><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
// NHG.Visible:=True;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
// NHG.Visible:=False;
|
|
|
|
|
|
end;
|
|
|
if if_reg(20305) then //Զ<><D4B6>
|
|
|
begin
|
|
|
NYD.Visible:=True;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
NYD.Visible:=False;
|
|
|
|
|
|
end;
|
|
|
if if_reg(20306) then //<2F><>Զ
|
|
|
begin
|
|
|
// NZY.Visible:=True;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
// NZY.Visible:=False;
|
|
|
end;
|
|
|
if if_reg(20307) then //<2F><>ͨ
|
|
|
begin
|
|
|
// NZT.Visible:=True;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
// NZT.Visible:=False;
|
|
|
end;
|
|
|
if if_reg(20309) then //<2F><><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
NHF.Visible:=True;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
NHF.Visible:=False;
|
|
|
end;
|
|
|
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,101);
|
|
|
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;
|
|
|
ini:TIniFile;
|
|
|
s1,s2:string;
|
|
|
begin
|
|
|
str:='where EDI<44><49><EFBFBD><EFBFBD>=''CN'' AND '+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><D5BA><EFBFBD>');
|
|
|
t_op_seae.open;
|
|
|
//if opsqlstr<>t_op_seae.sql.Text then
|
|
|
opsqlstr:=t_op_seae.sql.Text;
|
|
|
|
|
|
t_op_seae_sum.Close;
|
|
|
t_op_seae_sum.sql.clear;
|
|
|
t_op_seae_sum.sql.add('select <20><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>,count(*) Ʊ<><C6B1> from t_op_seae_edi '+str+' group by <20><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD> order by <20><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>');
|
|
|
t_op_seae_sum.open;
|
|
|
|
|
|
opsumsqlstr:= t_op_seae_sum.sql.Text;
|
|
|
|
|
|
ini:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
|
|
|
s1:=Ini.ReadString('EDI_DATA','t_op_seae','');
|
|
|
s2:=Ini.ReadString('EDI_DATA','t_op_seae_sum','');
|
|
|
if opsqlstr<>s1 then
|
|
|
begin
|
|
|
Ini.WriteString('EDI_DATA','t_op_seae',t_op_seae.SQL.CommaText);
|
|
|
opsqlstr:=s1;
|
|
|
end;
|
|
|
if opsumsqlstr<>s2 then
|
|
|
begin
|
|
|
Ini.WriteString('EDI_DATA','t_op_seae_sum',t_op_seae_sum.SQL.CommaText);
|
|
|
opsumsqlstr:=s2;
|
|
|
end;
|
|
|
Ini.Free;
|
|
|
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.DBEdit3Change(Sender: TObject);
|
|
|
begin
|
|
|
if (Trim(DBEdit3.Text)='AFR') or (Trim(DBEdit3.Text)='AMR') then begin
|
|
|
Label15.font.color:=clGreen;
|
|
|
Label40.Font.Color:=clGreen;
|
|
|
Label10.Font.Color:=clGreen;
|
|
|
if (Trim(DBEdit3.Text)='AMR') then
|
|
|
Label44.Font.Color:=clBlack
|
|
|
else
|
|
|
Label44.Font.Color:=clGreen;
|
|
|
|
|
|
Label12.Font.Color:=clGreen;
|
|
|
Label50.Font.Color:=clGreen;
|
|
|
|
|
|
Label25.font.color:=clGreen;
|
|
|
Label20.Font.Color:=clGreen;
|
|
|
Label22.Font.Color:=clGreen;
|
|
|
|
|
|
Label35.font.color:=clGreen;
|
|
|
Label30.Font.Color:=clGreen;
|
|
|
Label32.Font.Color:=clGreen;
|
|
|
|
|
|
Label77.font.color:=clGreen;
|
|
|
Label78.Font.Color:=clGreen;
|
|
|
|
|
|
DBEdit9.Hint:='<27>20λ';
|
|
|
DBEdit10.Hint:='<27>20λ';
|
|
|
DBEdit43.Hint:='<27>9λ';
|
|
|
|
|
|
DBEdit38.Hint:='<27>20λ';
|
|
|
DBEdit39.Hint:='<27>5λ';
|
|
|
DBEdit40.Hint:='<27>4λ';
|
|
|
|
|
|
DBEdit5.Hint:='<27>40λ';
|
|
|
DBEdit6.Hint:='<27>35λ';
|
|
|
DBEdit7.Hint:='<27>35λ';
|
|
|
|
|
|
DBEdit8.Hint:='<27>30λ';
|
|
|
DBEdit15.Hint:='<27>2λ';
|
|
|
DBEdit12.Hint:='<27>10λ';
|
|
|
|
|
|
DBEdit14.Hint:='<27>14λ';
|
|
|
|
|
|
|
|
|
DBEdit17.Hint:='<27>40λ';
|
|
|
DBEdit19.Hint:='<27>35λ';
|
|
|
DBEdit20.Hint:='<27>35λ';
|
|
|
|
|
|
DBEdit21.Hint:='<27>30λ';
|
|
|
DBEdit26.Hint:='<27>2λ';
|
|
|
DBEdit23.Hint:='<27>10λ';
|
|
|
|
|
|
DBEdit25.Hint:='<27>14λ';
|
|
|
|
|
|
DBEdit28.Hint:='<27>40λ';
|
|
|
DBEdit29.Hint:='<27>35λ';
|
|
|
DBEdit30.Hint:='<27>35λ';
|
|
|
|
|
|
DBEdit31.Hint:='<27>30λ';
|
|
|
DBEdit36.Hint:='<27>2λ';
|
|
|
DBEdit33.Hint:='<27>10λ';
|
|
|
DBEdit35.Hint:='<27>14λ';
|
|
|
|
|
|
DBEdit33.Hint:='<27>10λ';
|
|
|
DBEdit35.Hint:='<27>14λ';
|
|
|
|
|
|
|
|
|
|
|
|
DBEdit46.Hint:='<27>5λ';
|
|
|
|
|
|
DBEdit48.Hint:='<27>5λ';
|
|
|
DBEdit50.Hint:='<27>5λ';
|
|
|
|
|
|
|
|
|
Label68.font.color:=clGreen;
|
|
|
Label104.Font.Color:=clGreen;
|
|
|
Label106.Font.Color:=clGreen;
|
|
|
|
|
|
Label105.font.color:=clGreen;
|
|
|
Label109.Font.Color:=clGreen;
|
|
|
Label108.Font.Color:=clGreen;
|
|
|
|
|
|
Label66.font.color:=clGreen;
|
|
|
Label67.Font.Color:=clGreen;
|
|
|
Label63.Font.Color:=clGreen;
|
|
|
Label69.Font.Color:=clGreen;
|
|
|
|
|
|
Label64.font.color:=clGreen;
|
|
|
Label65.Font.Color:=clGreen;
|
|
|
|
|
|
Label11.Font.Color:=clGreen;
|
|
|
Label21.Font.Color:=clGreen;
|
|
|
Label31.Font.Color:=clGreen;
|
|
|
|
|
|
// wwDBGrid1.ColumnByName('<27><>ֵ')..DisplayLabel.font.Color:=clGreen;
|
|
|
// Label61.Color:=clRed;
|
|
|
|
|
|
// Label62.Color:=clRed;
|
|
|
// bsSkinDBCheckRadioBox1.Font.:=clRed;
|
|
|
bsSkinGroupBox6.Caption:='<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ'
|
|
|
end else begin
|
|
|
Label15.font.color:=clBlack;
|
|
|
Label40.Font.Color:=clBlack;
|
|
|
Label10.Font.Color:=clBlack;
|
|
|
Label44.Font.Color:=clBlack;
|
|
|
|
|
|
Label12.Font.Color:=clBlack;
|
|
|
Label50.Font.Color:=clBlack;
|
|
|
|
|
|
Label25.font.color:=clBlack;
|
|
|
Label20.Font.Color:=clBlack;
|
|
|
Label22.Font.Color:=clBlack;
|
|
|
|
|
|
Label35.font.color:=clBlack;
|
|
|
Label30.Font.Color:=clBlack;
|
|
|
Label32.Font.Color:=clBlack;
|
|
|
|
|
|
Label77.font.color:=clBlack;
|
|
|
Label78.Font.Color:=clBlack;
|
|
|
|
|
|
|
|
|
Label11.Font.Color:=clBlack;
|
|
|
Label21.Font.Color:=clBlack;
|
|
|
Label31.Font.Color:=clBlack;
|
|
|
|
|
|
DBEdit9.Hint:='';
|
|
|
DBEdit10.Hint:='';
|
|
|
DBEdit43.Hint:='';
|
|
|
|
|
|
|
|
|
DBEdit38.Hint:='';
|
|
|
DBEdit39.Hint:='';
|
|
|
DBEdit40.Hint:='';
|
|
|
|
|
|
DBEdit5.Hint:='';
|
|
|
DBEdit6.Hint:='';
|
|
|
DBEdit7.Hint:='';
|
|
|
|
|
|
DBEdit8.Hint:='';
|
|
|
DBEdit15.Hint:='';
|
|
|
DBEdit12.Hint:='';
|
|
|
|
|
|
DBEdit14.Hint:='';
|
|
|
|
|
|
|
|
|
DBEdit17.Hint:='';
|
|
|
DBEdit19.Hint:='';
|
|
|
DBEdit20.Hint:='';
|
|
|
|
|
|
DBEdit21.Hint:='';
|
|
|
DBEdit26.Hint:='';
|
|
|
DBEdit23.Hint:='';
|
|
|
|
|
|
DBEdit25.Hint:='';
|
|
|
|
|
|
DBEdit28.Hint:='';
|
|
|
DBEdit29.Hint:='';
|
|
|
DBEdit30.Hint:='';
|
|
|
|
|
|
DBEdit31.Hint:='';
|
|
|
DBEdit36.Hint:='';
|
|
|
DBEdit33.Hint:='';
|
|
|
DBEdit35.Hint:='';
|
|
|
|
|
|
DBEdit33.Hint:='';
|
|
|
DBEdit35.Hint:='';
|
|
|
|
|
|
|
|
|
|
|
|
DBEdit46.Hint:='';
|
|
|
|
|
|
DBEdit48.Hint:='';
|
|
|
DBEdit50.Hint:='';
|
|
|
// Label61.Color:=clRed;
|
|
|
|
|
|
// Label62.Color:=clRed;
|
|
|
// bsSkinDBCheckRadioBox1.Font.:=clRed;
|
|
|
bsSkinGroupBox6.Caption:='<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>ϸ<EFBFBD><CFB8>Ϣ'
|
|
|
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>']:=DBEdit35.DataSource.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;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinButton48Click(Sender: TObject);
|
|
|
var
|
|
|
FileStream:TFileStream;
|
|
|
fsize:double;
|
|
|
begin
|
|
|
{
|
|
|
if t_op_file.RecordCount <=0 then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><<3C><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>><3E><>ť');
|
|
|
Exit;
|
|
|
end;
|
|
|
}
|
|
|
if t_op_file_data.RecordCount<=0 then
|
|
|
begin
|
|
|
{
|
|
|
t_op_file_data.Append;
|
|
|
t_op_file_data.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>յ<EFBFBD>';
|
|
|
t_op_file_data.FieldByName('<27><>ע').AsString:='<27><>';
|
|
|
t_op_file_data.Post;
|
|
|
}
|
|
|
t_op_file_data.Append;
|
|
|
t_op_file_data.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_file_data.FieldByName('<27><>ע').AsString:='<27><>';
|
|
|
t_op_file_data.Post;
|
|
|
t_op_file_data.First;
|
|
|
end;
|
|
|
|
|
|
with t_op_file_items_data do
|
|
|
begin
|
|
|
Close;SQL.Clear;
|
|
|
sql.Add('select * from t_op_file_items');
|
|
|
sql.Add('where PID=:PID and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('PID').Value:=t_op_file_data.FieldByName('fid').AsInteger;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_file_data.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Open;
|
|
|
end;
|
|
|
//<2F>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if OpenDialog1.Execute then begin
|
|
|
if Length(Opendialog1.FileName)<=95 then
|
|
|
begin
|
|
|
FileStream:=TFileStream.Create(Opendialog1.FileName,fmopenRead); //<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
try
|
|
|
fsize:=FileStream.size;
|
|
|
finally
|
|
|
freeandnil(FileStream);
|
|
|
end;
|
|
|
if fsize>5000000 then begin
|
|
|
MessageDlg('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>5M<35><4D><EFBFBD><EFBFBD>',mtWarning,[mbyes],0);
|
|
|
end
|
|
|
else UpLoadProFile(Opendialog1.FileName,naspath,'user','user',frm_op_seae_edi_data.t_op_seae.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
MessageDlg('<27>ļ<EFBFBD><C4BC><EFBFBD>̫<EFBFBD><CCAB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>95<39><35><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbyes],0);
|
|
|
exit ;
|
|
|
end;
|
|
|
end else exit ;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
{procedure Tfrm_op_seae_edi_data.bsSkinButton48Click(Sender: TObject);
|
|
|
var
|
|
|
FileStream:TFileStream;
|
|
|
fsize:double;
|
|
|
begin
|
|
|
if t_op_file_data.RecordCount<=0 then
|
|
|
begin
|
|
|
|
|
|
t_op_file_data.Append;
|
|
|
t_op_file_data.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>յ<EFBFBD>';
|
|
|
t_op_file_data.FieldByName('<27><>ע').AsString:='<27><>';
|
|
|
t_op_file_data.Post;
|
|
|
|
|
|
t_op_file_data.Append;
|
|
|
t_op_file_data.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_file_data.FieldByName('<27><>ע').AsString:='<27><>';
|
|
|
t_op_file_data.Post;
|
|
|
t_op_file_data.First;
|
|
|
end;
|
|
|
|
|
|
with t_op_file_items_data do
|
|
|
begin
|
|
|
Close;SQL.Clear;
|
|
|
sql.Add('select * from t_op_file_items');
|
|
|
sql.Add('where PID=:PID and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('PID').Value:=t_op_file_data.FieldByName('fid').AsInteger;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_file_data.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Open;
|
|
|
end;
|
|
|
//<2F>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if OpenDialog1.Execute then begin
|
|
|
if Length(Opendialog1.FileName)<=95 then
|
|
|
begin
|
|
|
FileStream:=TFileStream.Create(Opendialog1.FileName,fmopenRead); //<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
try
|
|
|
fsize:=FileStream.size;
|
|
|
finally
|
|
|
freeandnil(FileStream);
|
|
|
end;
|
|
|
if fsize>500000 then begin
|
|
|
MessageDlg('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>500K<30><4B><EFBFBD><EFBFBD>',mtWarning,[mbyes],0);
|
|
|
end
|
|
|
else UpLoadPro(Opendialog1.FileName);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
MessageDlg('<27>ļ<EFBFBD><C4BC><EFBFBD>̫<EFBFBD><CCAB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>95<39><35><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbyes],0);
|
|
|
exit ;
|
|
|
end;
|
|
|
end else exit ;
|
|
|
|
|
|
end;
|
|
|
}
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.createAFR(bltype:string;filepath:string);
|
|
|
var
|
|
|
Str:TStrings;
|
|
|
i:integer;
|
|
|
istrue:Boolean;
|
|
|
aQuery,aQuery2:TADOQuery;
|
|
|
mblno:string;
|
|
|
begin
|
|
|
str:=Tstringlist.Create;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
aQuery2:=CreateAdoQuery;
|
|
|
try
|
|
|
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do
|
|
|
begin
|
|
|
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
istrue:=istrueAFR(t_op_seae);
|
|
|
if not istrue then Abort;
|
|
|
end;
|
|
|
|
|
|
Str.Add('<?xml version="1.0" encoding="ISO-8859-1"?>');
|
|
|
Str.Add('<CargoSecurity>');
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do
|
|
|
begin
|
|
|
Str.Add('<BillOfLading>');
|
|
|
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
Str.Add('<DocumentType>'+t_op_seae.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString+'</DocumentType>');
|
|
|
mblno:=t_op_seae.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
if Pos(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString,mblno)=1 then
|
|
|
mblno:=Copy(mblno,Length(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString)+1,length(mblno)-Length(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString));
|
|
|
if bltype='AMR' then begin
|
|
|
Str.Add('<HouseBillNumber>'+mblno+'</HouseBillNumber>');
|
|
|
Str.Add('<CarrierBillNumber>'+mblno+'</CarrierBillNumber>');
|
|
|
|
|
|
end else begin
|
|
|
Str.Add('<HouseBillNumber>'+t_op_seae.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'</HouseBillNumber>');
|
|
|
Str.Add('<CarrierBillNumber>'+mblno+'</CarrierBillNumber>');
|
|
|
end;
|
|
|
Str.Add('<BookingNumber>'+t_op_seae.fieldbyname('<27><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>').AsString+'</BookingNumber>');
|
|
|
if t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>').AsString='D' then
|
|
|
Str.Add('<PurposeCode>Delete</PurposeCode>')
|
|
|
else
|
|
|
Str.Add('<PurposeCode>AddReplace</PurposeCode>');
|
|
|
Str.Add('<Transshipment></Transshipment>');
|
|
|
Str.Add('<ShipmentType>'+t_op_seae.fieldbyname('װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'</ShipmentType>');
|
|
|
Str.Add('<CYStatus></CYStatus>');
|
|
|
Str.Add('<VesselRouting>');
|
|
|
Str.Add('<VesselName>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'</VesselName>');
|
|
|
Str.Add('<IMO></IMO>');
|
|
|
|
|
|
Str.Add('<VesselFlag></VesselFlag>');
|
|
|
Str.Add('<VoyageNumber>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'</VoyageNumber>');
|
|
|
Str.Add('<VesselCallSign>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>IMO').AsString+'</VesselCallSign>');
|
|
|
Str.Add('<Ports>');
|
|
|
Str.Add('<PortType>PortOfOrigin</PortType>');
|
|
|
Str.Add('<PortCode>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'</PortCode>');
|
|
|
Str.Add('<PortCodeQualifier>UN</PortCodeQualifier>');
|
|
|
// Str.Add('<ScheduledDate></ScheduledDate>');
|
|
|
// Str.Add('<ScheduledTime></ScheduledTime>');
|
|
|
// Str.Add('<ActualDate></ActualDate>');
|
|
|
// Str.Add('<ActualTime></ActualTime>');
|
|
|
Str.Add('</Ports>');
|
|
|
Str.Add('<Ports>');
|
|
|
Str.Add('<PortType>PortOfLoading</PortType>');
|
|
|
Str.Add('<PortCode>'+t_op_seae.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').AsString+'</PortCode>');
|
|
|
Str.Add('<PortCodeQualifier>UN</PortCodeQualifier>');
|
|
|
if bltype='AMR' then begin
|
|
|
|
|
|
Str.Add('<ScheduledDate>'+formatdatetime('YYYYMMDD',t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asdatetime)+'</ScheduledDate>');
|
|
|
Str.Add('<ScheduledTime>'+formatdatetime('HHMM',t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asdatetime)+'</ScheduledTime>');
|
|
|
END;
|
|
|
// Str.Add('<ActualDate></ActualDate>');
|
|
|
// Str.Add('<ActualTime></ActualTime>');
|
|
|
Str.Add('</Ports>');
|
|
|
Str.Add('<Ports>');
|
|
|
Str.Add('<PortType>PortOfDischarge</PortType>');
|
|
|
Str.Add('<PortCode>'+t_op_seae.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'</PortCode>');
|
|
|
Str.Add('<PortCodeQualifier>UN</PortCodeQualifier>');
|
|
|
if t_op_seae.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'' then
|
|
|
Str.Add('<ScheduledDate>'+formatdatetime('YYYYMMDD',t_op_seae.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asdatetime)+'</ScheduledDate>');
|
|
|
// Str.Add('<ScheduledTime></ScheduledTime>');
|
|
|
// Str.Add('<ActualDate></ActualDate>');
|
|
|
// Str.Add('<ActualTime></ActualTime>');
|
|
|
Str.Add('</Ports>');
|
|
|
Str.Add('<Ports>');
|
|
|
Str.Add('<PortType>PlaceOfDelivery</PortType>');
|
|
|
Str.Add('<PortCode>'+t_op_seae.fieldbyname('Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>').AsString+'</PortCode>');
|
|
|
Str.Add('<PortCodeQualifier>UN</PortCodeQualifier>');
|
|
|
// Str.Add('<ScheduledDate></ScheduledDate>');
|
|
|
// Str.Add('<ScheduledTime></ScheduledTime>');
|
|
|
// Str.Add('<ActualDate></ActualDate>');
|
|
|
// Str.Add('<ActualTime></ActualTime>');
|
|
|
Str.Add('</Ports>');
|
|
|
Str.Add('</VesselRouting>');
|
|
|
Str.Add('<ConsignmentParty>');
|
|
|
Str.Add('<ConsignmentPartyType>Shipper</ConsignmentPartyType>');
|
|
|
Str.Add('<Name>'+formatAfrstr(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+'</Name>');
|
|
|
Str.Add('<StreetAddress1>'+formatAfrstr(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString)+'</StreetAddress1>');
|
|
|
Str.Add('<StreetAddress2>'+formatAfrstr(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString)+'</StreetAddress2>');
|
|
|
Str.Add('<City>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString+'</City>');
|
|
|
Str.Add('<StateProvince>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'</StateProvince>');
|
|
|
Str.Add('<PostalZipCode>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString+'</PostalZipCode>');
|
|
|
Str.Add('<Country>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString+'</Country>');
|
|
|
Str.Add('<Contact>'+formatAfrstr(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString)+'</Contact>');
|
|
|
Str.Add('<Phone>'+formatAfrstr(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString)+'</Phone>');
|
|
|
Str.Add('</ConsignmentParty>');
|
|
|
Str.Add('<ConsignmentParty>');
|
|
|
Str.Add('<ConsignmentPartyType>Consignee</ConsignmentPartyType>');
|
|
|
Str.Add('<Name>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+'</Name>');
|
|
|
Str.Add('<StreetAddress1>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString)+'</StreetAddress1>');
|
|
|
Str.Add('<StreetAddress2>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString)+'</StreetAddress2>');
|
|
|
Str.Add('<City>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString+'</City>');
|
|
|
Str.Add('<StateProvince>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString+'</StateProvince>');
|
|
|
Str.Add('<PostalZipCode>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString+'</PostalZipCode>');
|
|
|
Str.Add('<Country>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString+'</Country>');
|
|
|
Str.Add('<Contact>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString)+'</Contact>');
|
|
|
Str.Add('<Phone>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString)+'</Phone>');
|
|
|
Str.Add('</ConsignmentParty>');
|
|
|
|
|
|
if t_op_seae.FieldByName('ͬ<>ջ<EFBFBD><D5BB><EFBFBD>').AsBoolean then begin
|
|
|
Str.Add('<ConsignmentParty>');
|
|
|
Str.Add('<ConsignmentPartyType>Notify</ConsignmentPartyType>');
|
|
|
Str.Add('<Name>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+'</Name>');
|
|
|
Str.Add('<StreetAddress1>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString)+'</StreetAddress1>');
|
|
|
Str.Add('<StreetAddress2>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString)+'</StreetAddress2>');
|
|
|
Str.Add('<City>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString+'</City>');
|
|
|
Str.Add('<StateProvince>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString+'</StateProvince>');
|
|
|
Str.Add('<PostalZipCode>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString+'</PostalZipCode>');
|
|
|
Str.Add('<Country>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString+'</Country>');
|
|
|
Str.Add('<Contact>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString)+'</Contact>');
|
|
|
Str.Add('<Phone>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString)+'</Phone>');
|
|
|
Str.Add('</ConsignmentParty>');
|
|
|
end else begin
|
|
|
|
|
|
Str.Add('<ConsignmentParty>');
|
|
|
Str.Add('<ConsignmentPartyType>Notify</ConsignmentPartyType>');
|
|
|
Str.Add('<Name>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+'</Name>');
|
|
|
Str.Add('<StreetAddress1>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString)+'</StreetAddress1>');
|
|
|
Str.Add('<StreetAddress2>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString)+'</StreetAddress2>');
|
|
|
Str.Add('<City>'+t_op_seae.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString+'</City>');
|
|
|
Str.Add('<StateProvince>'+t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString+'</StateProvince>');
|
|
|
Str.Add('<PostalZipCode>'+t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString+'</PostalZipCode>');
|
|
|
Str.Add('<Country>'+t_op_seae.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString+'</Country>');
|
|
|
Str.Add('<Contact>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString)+'</Contact>');
|
|
|
Str.Add('<Phone>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8>˵绰').AsString)+'</Phone>');
|
|
|
Str.Add('</ConsignmentParty>');
|
|
|
end;
|
|
|
|
|
|
if trim(t_op_seae.FieldByName('֪ͨ<CDA8><D6AA>2<EFBFBD><32><EFBFBD><EFBFBD>').AsString)<>'' then
|
|
|
begin
|
|
|
Str.Add('<ConsignmentParty>');
|
|
|
Str.Add('<ConsignmentPartyType>Notify2</ConsignmentPartyType>');
|
|
|
Str.Add('<Name>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32><EFBFBD><EFBFBD>').AsString)+'</Name>');
|
|
|
Str.Add('<StreetAddress1>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32>ַ1').AsString)+'</StreetAddress1>');
|
|
|
Str.Add('<StreetAddress2>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32>ַ2').AsString)+'</StreetAddress2>');
|
|
|
Str.Add('<City>'+t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32><EFBFBD><EFBFBD>').AsString+'</City>');
|
|
|
Str.Add('<StateProvince>'+t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32>').AsString+'</StateProvince>');
|
|
|
Str.Add('<PostalZipCode>'+t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD>ʱ<EFBFBD>').AsString+'</PostalZipCode>');
|
|
|
Str.Add('<Country>'+t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString+'</Country>');
|
|
|
Str.Add('<Contact>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32>ϵ<EFBFBD><CFB5>').AsString)+'</Contact>');
|
|
|
Str.Add('<Phone>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD>绰').AsString)+'</Phone>');
|
|
|
Str.Add('</ConsignmentParty>');
|
|
|
end;
|
|
|
Str.Add('<CargoSecurityFiling>');
|
|
|
Str.Add('<FilingType>AFR</FilingType>');
|
|
|
Str.Add('<SSLineCode>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString+'</SSLineCode>');
|
|
|
Str.Add('<TypeOfEntry>'+t_op_seae.fieldbyname('<27><><EFBFBD>䷽ʽ').AsString+'</TypeOfEntry>');
|
|
|
if t_op_seae.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then
|
|
|
begin
|
|
|
if t_op_seae.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ').AsBoolean then
|
|
|
Str.Add('<ConsolidationClosed>Yes</ConsolidationClosed>')
|
|
|
else
|
|
|
Str.Add('<ConsolidationClosed>No</ConsolidationClosed>');
|
|
|
end;
|
|
|
if bltype='AMR' then begin
|
|
|
Str.Add('<SecondNotifyType>NACCS</SecondNotifyType>');
|
|
|
Str.Add('<SecondNotifyCode>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'</SecondNotifyCode>');
|
|
|
end;
|
|
|
|
|
|
|
|
|
Str.Add('</CargoSecurityFiling>');
|
|
|
|
|
|
aQuery.Close;
|
|
|
aQuery.SQL.text:='select * from t_op_ctn_edi where <20><><EFBFBD><EFBFBD>='''+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
|
|
|
aQuery.Open;
|
|
|
aQuery.First;
|
|
|
while not aQuery.Eof do
|
|
|
begin
|
|
|
|
|
|
Str.Add('<Container>');
|
|
|
Str.Add('<ContainerNumber>'+aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'</ContainerNumber>');
|
|
|
Str.Add('<SealNumber>'+aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'</SealNumber>');
|
|
|
Str.Add('<ContainerSize>'+getCtnAfr(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)+'</ContainerSize>');
|
|
|
Str.Add('<ContainerOwnership>'+aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'</ContainerOwnership>');
|
|
|
Str.Add('<ContainerType></ContainerType>');
|
|
|
Str.Add('<CommodityDescription>'+formatAfrstr(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)+'</CommodityDescription>');
|
|
|
Str.Add('<MarksAndNumbers>'+formatAfrstr(aQuery.fieldbyname('<27><>ͷ').AsString)+'</MarksAndNumbers>');
|
|
|
|
|
|
aQuery2.Close;
|
|
|
aQuery2.SQL.text:='select * from t_op_ctn_detail_edi where ctn_id='+aQuery.fieldbyname('ctn_id').AsString;
|
|
|
aQuery2.Open;
|
|
|
aQuery2.First;
|
|
|
while not aQuery2.eof do
|
|
|
begin
|
|
|
Str.Add('<ContainerDetails>');
|
|
|
// Str.Add('<PONumber>'+aQuery.fieldbyname('PO').AsString+'</PONumber>');
|
|
|
// Str.Add('<SKUNumber>'+aQuery.fieldbyname('SKU').AsString+'</SKUNumber>');
|
|
|
// Str.Add('<SKUDescription>'+formatAfrstr(aQuery.fieldbyname('SKU<4B><55><EFBFBD><EFBFBD>').AsString)+'</SKUDescription>');
|
|
|
Str.Add('<HazMatCode>'+aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>UN<55><4E>').AsString+'</HazMatCode>');
|
|
|
Str.Add('<HarmonizedTariffCode>'+aQuery2.fieldbyname('HTS<54><53>').AsString+'</HarmonizedTariffCode>');
|
|
|
Str.Add('<CountryOfOrigin></CountryOfOrigin>');
|
|
|
|
|
|
Str.Add('<InnerQuantity>'+aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'</InnerQuantity>');
|
|
|
Str.Add('<InnerUnitType>'+getPkgAfr(aQuery2.fieldbyname('<27><>װ').AsString)+'</InnerUnitType>');
|
|
|
Str.Add('<Kilograms>'+formatfloat('0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat)+'</Kilograms>');
|
|
|
Str.Add('<CubicMeters>'+formatfloat('0.000',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat)+'</CubicMeters>');
|
|
|
|
|
|
Str.Add('</ContainerDetails>');
|
|
|
aQuery2.Next;
|
|
|
end;
|
|
|
Str.Add('</Container>');
|
|
|
aQuery.Next;
|
|
|
end;
|
|
|
t_op_seae.Edit;
|
|
|
t_op_seae.FieldByName('EDI״̬').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>';
|
|
|
t_op_seae.Post;
|
|
|
Str.Add('</BillOfLading>');
|
|
|
end;
|
|
|
|
|
|
|
|
|
Str.Add('</CargoSecurity>');
|
|
|
if filepath='' then begin
|
|
|
SaveDialog1.FileName:=t_op_seae.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring;
|
|
|
if SaveDialog1.Execute then
|
|
|
begin
|
|
|
str.SaveToFile(SaveDialog1.FileName+'.XML');
|
|
|
showmessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ɳɹ<C9B3><C9B9><EFBFBD>');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
showmessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
end else begin
|
|
|
Str.SaveToFile(filepath);
|
|
|
end;
|
|
|
|
|
|
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
FreeAndNil(aQuery2);
|
|
|
FreeAndNil(Str)
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
function Tfrm_op_seae_edi_data.istrueAFR(Dataset: TDataSet): Boolean;
|
|
|
var
|
|
|
cntrs:String;
|
|
|
aQuery,aQuery2:TADOQuery;
|
|
|
begin
|
|
|
result:=true;
|
|
|
|
|
|
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then
|
|
|
begin
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('House<73>ᵥ<EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString))>20 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('House<73>ᵥ<EFBFBD>ų<EFBFBD><C5B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>20<32><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27><><EFBFBD>ᵥ<EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString))>20 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27><><EFBFBD>ᵥ<EFBFBD>ų<EFBFBD><C5B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>20<32><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>IMO').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>IMO').AsString))>9 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD><C5B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>9<EFBFBD><39><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'װ<><D7B0><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
{*
|
|
|
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString<>'House' then begin
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'CY״̬<D7B4><CCAC><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
*}
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString))>35 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString))>10 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD>γ<EFBFBD><CEB3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>10<31><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString<>'House' then
|
|
|
begin
|
|
|
if trim(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>۴<EFBFBD><DBB4>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'װ<>۴<EFBFBD><DBB4>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'ж<><D0B6><EFBFBD><EFBFBD><EFBFBD>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'Ŀ<>ĵش<C4B5><D8B4>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString))>4 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD>볤<EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>4<EFBFBD><34><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))>40 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><C6B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>40<34><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1<D6B7><31><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString))>35 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1<D6B7><31><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString))>50 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1<D6B7><31><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>50<35><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>в<EFBFBD><D0B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString))>30 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>г<EFBFBD><D0B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>30<33><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString))>2 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4>볤<EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>2<EFBFBD><32><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵绰<CBB5><E7BBB0><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString))>14 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵绰<CBB5><E7BBB0><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>14<31><34><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString='' then begin
|
|
|
// result:=false;
|
|
|
// MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<CAB1><E0B2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
// exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString))>10 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<CAB1>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>10<31><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString))>35 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2<D6B7><32><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString))>50 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2<D6B7><32><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>50<35><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))>3 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>3<EFBFBD><33><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))>40 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><C6B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>40<34><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1<D6B7><31><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString))>35 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1<D6B7><31><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString))>50then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1<D6B7><31><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>50<35><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
if Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3>в<EFBFBD><D0B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString))>30 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3>г<EFBFBD><D0B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>30<33><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString))>2 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4>볤<EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>2<EFBFBD><32><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵绰<CBB5><E7BBB0><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString))>14 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵绰<CBB5><E7BBB0><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>23<32><33><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString='' then begin
|
|
|
// result:=false;
|
|
|
// MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<CAB1><E0B2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
// exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString))>10 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<CAB1>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>10<31><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString))>35 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2<D6B7><32><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString))>50 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2<D6B7><32><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>50<35><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString))>3 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>3<EFBFBD><33><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if not Dataset.FieldByName('ͬ<>ջ<EFBFBD><D5BB><EFBFBD>').AsBoolean then begin
|
|
|
|
|
|
if Dataset.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))>40 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><C6B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>40<34><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if Dataset.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˵<EFBFBD>ַ1<D6B7><31><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then begin
|
|
|
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString))>35 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˵<EFBFBD>ַ1<D6B7><31><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString))>50 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˵<EFBFBD>ַ1<D6B7><31><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>50<35><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
if Dataset.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˳<EFBFBD><CBB3>в<EFBFBD><D0B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString))>30 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˳<EFBFBD><CBB3>г<EFBFBD><D0B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>30<33><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString))>2 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4>볤<EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>2<EFBFBD><32><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if Dataset.fieldbyname('֪ͨ<CDA8>˵绰').AsString='' then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˵绰<CBB5><E7BBB0><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8>˵绰').AsString))>14 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˵绰<CBB5><E7BBB0><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>14<31><34><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString='' then begin
|
|
|
// result:=false;
|
|
|
// MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8><D6AA><EFBFBD>ʱ<CAB1><E0B2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
// exit;
|
|
|
end else begin
|
|
|
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString))>10 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8><D6AA><EFBFBD>ʱ<CAB1>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>10<31><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString))>35 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˵<EFBFBD>ַ2<D6B7><32><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString))>3 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8><D6AA><EFBFBD>ݳ<EFBFBD><DDB3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>3<EFBFBD><33><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if Dataset.fieldbyname('<27><><EFBFBD>䷽ʽ').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD>䷽ʽ<E4B7BD><CABD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
aQuery2:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;
|
|
|
SQL.Text:='select * from t_op_ctn_edi where <20><><EFBFBD><EFBFBD>='''+dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
|
|
|
Open;
|
|
|
if IsEmpty then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
aQuery.First;
|
|
|
while not aQuery.Eof do begin
|
|
|
|
|
|
if aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)<>11 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD>¼<EFBFBD>벻<EFBFBD><EBB2BB>ȷ',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)>15 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD>ų<EFBFBD><C5B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>15<31><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if getCtnAfr(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0>AFR<46><52><EFBFBD>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
if aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߲<EFBFBD><DFB2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
if aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD>費<EFBFBD><E8B2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)>180 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD>賤<EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>180<38><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if aQuery.fieldbyname('<27><>ͷ').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(aQuery.fieldbyname('<27><>ͷ').AsString)>180 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>180<38><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
aQuery2.Close;
|
|
|
aQuery2.SQL.Text:='select * from t_op_ctn_detail_edi where ctn_id='''+aQuery.fieldbyname('ctn_id').AsString+'''';
|
|
|
aQuery2.Open;
|
|
|
if aQuery2.IsEmpty then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
aQuery2.First;
|
|
|
while not aQuery2.Eof do begin
|
|
|
if aQuery2.fieldbyname('HTS<54><53>').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>HTS<54><53><EFBFBD>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if length(aQuery2.fieldbyname('HTS<54><53>').AsString)>6 then begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>HTS<54><53><EFBFBD>벻<EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>6<EFBFBD><36><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsInteger=0 then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
if aQuery2.fieldbyname('<27><>װ').AsString='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end else begin
|
|
|
if getPkgAfr(aQuery2.fieldbyname('<27><>װ').AsString)='' then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0>AFR<46><52><EFBFBD>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
if aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
if aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
|
|
|
begin
|
|
|
result:=false;
|
|
|
MessageDlg('<27>ᵥ<EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
aQuery2.Next;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
aQuery.Next;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
FreeAndNil(aQuery2);
|
|
|
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,'&','&',[rfReplaceAll]);
|
|
|
Result:=StringReplace(Result,'<','<',[rfReplaceAll]);
|
|
|
Result:=StringReplace(Result,'"','"',[rfReplaceAll]);
|
|
|
Result:=StringReplace(Result,'>','>',[rfReplaceAll]);
|
|
|
Result:=StringReplace(Result,'''',''',[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.bsSkinButton16Click(Sender: TObject);
|
|
|
var
|
|
|
strpath:widestring;
|
|
|
str_file:widestring;
|
|
|
ftpar,ftpname,ftppass,ftppath,ScriptPath:String;
|
|
|
StrL:TStrings;
|
|
|
i:integer;
|
|
|
SenderCode,ReciverCode,strType:String;
|
|
|
issend:Boolean;
|
|
|
begin
|
|
|
|
|
|
|
|
|
ScriptPath:=ExtractFilePath(ParamStr(0))+'CUSTOMEDIFILE\';
|
|
|
if not DirectoryExists(ScriptPath) then
|
|
|
CreateDir(ScriptPath);
|
|
|
|
|
|
ftpar:=Trim(edit4.Text);
|
|
|
if ftpar='' then begin
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>FTP<54><50>ַ<EFBFBD><D6B7>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
ftpname:=Trim(edit6.Text);
|
|
|
if ftpar='' then begin
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>FTP<54>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
ftppass:=Trim(edit7.Text);
|
|
|
if ftpar='' then begin
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>FTP<54><50><EFBFBD>룡',mtWarning,[mbOk],0);
|
|
|
exit;
|
|
|
end;
|
|
|
ftppath:=Trim(edit5.Text);
|
|
|
|
|
|
strpath:=ScriptPath
|
|
|
+t_op_seae.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring
|
|
|
+FormatDateTime('yyyy',now)
|
|
|
+FormatDateTime('mm',now)
|
|
|
+FormatDateTime('dd',now)
|
|
|
+FormatDateTime('hh',now)
|
|
|
+FormatDateTime('nn',now)+'.XML';
|
|
|
|
|
|
str_file:=t_op_seae.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring
|
|
|
+FormatDateTime('yyyy',now)
|
|
|
+FormatDateTime('mm',now)
|
|
|
+FormatDateTime('dd',now)
|
|
|
+FormatDateTime('hh',now)
|
|
|
+FormatDateTime('nn',now)+'.XML';
|
|
|
|
|
|
if t_op_seae.IsEmpty then
|
|
|
exit;
|
|
|
if dxDBGrid1.SelectedCount<1 then
|
|
|
begin
|
|
|
showmessage('<27><>ѡ<EFBFBD><D1A1>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>EDI<44><49><EFBFBD>ݵ<EFBFBD>ҵ<EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
|
|
|
t_op_seae.post;
|
|
|
if (t_op_seae.FieldByName('EDI<44><49><EFBFBD><EFBFBD>').AsString='AFR') or (t_op_seae.FieldByName('EDI<44><49><EFBFBD><EFBFBD>').AsString='AMR') then
|
|
|
createAFR(t_op_seae.FieldByName('EDI<44><49><EFBFBD><EFBFBD>').AsString,strpath);
|
|
|
|
|
|
|
|
|
{
|
|
|
FtpClient1.UserName:=ftpname;
|
|
|
FtpClient1.PassWord:=ftppass;
|
|
|
FtpClient1.HostName:=ftpar;
|
|
|
FtpClient1.Passive:=False;
|
|
|
FtpClient1.MultiThreaded:=True;
|
|
|
FtpClient1.Port:='21';
|
|
|
FtpClient1.DisplayFileFlag:=True;
|
|
|
FtpClient1.Timeout:=5;
|
|
|
|
|
|
try
|
|
|
if (FtpClient1.Open) and (FtpClient1.User) and (FtpClient1.Pass) then
|
|
|
begin
|
|
|
|
|
|
lblstatus.Caption:='<27>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ӳɹ<D3B3><C9B9><EFBFBD>';
|
|
|
FtpClient1.HostDirName:=ftppath;
|
|
|
if FtpClient1.Cwd then
|
|
|
end else begin
|
|
|
showmessage('<27>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!');
|
|
|
end;
|
|
|
|
|
|
if FtpClient1.Connected then
|
|
|
begin
|
|
|
try
|
|
|
FtpClient1.TransferMode := ftpTransModeStream;
|
|
|
FtpClient1.LocalFileName:=strpath;
|
|
|
FtpClient1.HostFileName:= str_file;
|
|
|
try
|
|
|
if FtpClient1.Put then
|
|
|
begin
|
|
|
ShowMessage('<27>ϴ<EFBFBD><CFB4>ɹ<EFBFBD>');
|
|
|
lblstatus.Caption:='<27>ϴ<EFBFBD><CFB4>ɹ<EFBFBD><C9B9><EFBFBD>';
|
|
|
bsSkinGroupBox11.Visible:=false;
|
|
|
end;
|
|
|
except
|
|
|
FtpClient1.Abort;
|
|
|
ShowMessage('<27>ϴ<EFBFBD>ʧ<EFBFBD><CAA7>!');
|
|
|
lblstatus.Caption:='<27>ϴ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>';
|
|
|
|
|
|
end;
|
|
|
finally
|
|
|
FtpClient1.Abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
except
|
|
|
on e:exception do
|
|
|
begin
|
|
|
FtpClient1.Abort;
|
|
|
lblstatus.Caption:='<27>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
try
|
|
|
try
|
|
|
bsSkinButton16.Enabled:=false;
|
|
|
bsSkinGroupBox11.Height:=385;
|
|
|
DebugListBox.Visible:=True;
|
|
|
DebugListBox.Clear;
|
|
|
StatusBar1.Visible:=true;
|
|
|
ProgressBar1.Parent := StatusBar1;
|
|
|
ProgressBar1.Top := 2;
|
|
|
ProgressBar1.Left := 1;
|
|
|
ProgressBar1.Align := alClient;
|
|
|
with idftp1 do
|
|
|
begin
|
|
|
Username:=ftpname;
|
|
|
Password:=ftppass;
|
|
|
Host:=ftpar;
|
|
|
Connect;
|
|
|
end;
|
|
|
idftp1.ChangeDir(ftppath);
|
|
|
idftp1.TransferType:=ftBinary;
|
|
|
idftp1.Put(strpath,str_file);
|
|
|
showmessage('<27>ļ<EFBFBD><C4BC>ϴ<EFBFBD><CFB4>ɹ<EFBFBD><C9B9><EFBFBD>');
|
|
|
bsSkinGroupBox11.Visible:=false;
|
|
|
bsSkinButton16.Enabled:=true;
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do
|
|
|
begin
|
|
|
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
t_op_seae.Edit;
|
|
|
t_op_seae.FieldByName('EDI״̬').AsString:='<27>ѷ<EFBFBD><D1B7><EFBFBD>';
|
|
|
t_op_seae.Post;
|
|
|
end;
|
|
|
try
|
|
|
idftp1.Disconnect;
|
|
|
except
|
|
|
end;
|
|
|
|
|
|
except
|
|
|
bsSkinButton16.Enabled:=true;
|
|
|
deletefile(strpath);
|
|
|
showmessage('<27>ļ<EFBFBD><C4BC>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
finally
|
|
|
bsSkinButton16.Enabled:=true;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinButton18Click(Sender: TObject);
|
|
|
var
|
|
|
inifile1:Tinifile;
|
|
|
begin
|
|
|
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
|
|
|
// inifile1.WriteString('customEDI','SEND',edit1.text);
|
|
|
// inifile1.WriteString('customEDI','RECIEVE',edit2.text);
|
|
|
// inifile1.WriteString('customEDI','SENDNAME',edit3.text);
|
|
|
inifile1.WriteString('custom'+EditType.text,'FTPSERVER',edit4.text);
|
|
|
inifile1.WriteString('custom'+EditType.text,'FTPPATH',edit5.text);
|
|
|
inifile1.WriteString('custom'+EditType.text,'FTPNAME',edit6.text);
|
|
|
inifile1.WriteString('custom'+EditType.text,'FTPPASS',edit7.text);
|
|
|
|
|
|
inifile1.free;
|
|
|
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;
|
|
|
|
|
|
if trim(t_op_seae.fieldbyname('<27><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>').AsString)='' then
|
|
|
begin
|
|
|
showmessage('<27>걨<EFBFBD><EAB1A8>Ϊ<EFBFBD><CEAA>,<2C><><EFBFBD>ܷ<EFBFBD><DCB7>ͣ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
|
|
|
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.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;
|
|
|
|
|
|
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.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);
|
|
|
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;
|
|
|
{
|
|
|
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.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.bsSkinButton15Click(Sender: TObject);
|
|
|
var
|
|
|
aAdoQuery:TAdoQuery;
|
|
|
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:=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.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.bsSkinButton24Click(Sender: TObject);
|
|
|
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.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);
|
|
|
isexcel:=true;
|
|
|
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>']:=Trim(mblno);
|
|
|
t_op_seae['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:='FREIGHT COLLECT';
|
|
|
t_op_seae['ǩ<><C7A9><EFBFBD>ص<EFBFBD>']:='QINGDAO,CHINA';
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:='';
|
|
|
t_op_seae['<27>յ<EFBFBD><D5B5><EFBFBD>Դ']:='EXCEL<45><4C><EFBFBD><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>']:=StringReplace(Trim(alist.Text),#13#10,' ',[rfReplaceAll]);
|
|
|
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']:=StringReplace(Trim(alist.Text),#13#10,' ',[rfReplaceAll]);
|
|
|
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>']:='';
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,15].Value);
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,16].Value);
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,17].Value);
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>˵绰']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,18].Value);
|
|
|
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,19].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>']:=StringReplace(Trim(alist.Text),#13#10,' ',[rfReplaceAll]);
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,20].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']:=StringReplace(Trim(alist.Text),#13#10,' ',[rfReplaceAll]);
|
|
|
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>']:='';
|
|
|
|
|
|
t_op_seae['<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,21].Value);
|
|
|
t_op_seae['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,22].Value);
|
|
|
t_op_seae['<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,23].Value);
|
|
|
t_op_seae['<27>ջ<EFBFBD><D5BB>˵绰']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,24].Value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,25].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>']:=StringReplace(Trim(alist.Text),#13#10,' ',[rfReplaceAll]);
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,26].Value;
|
|
|
{
|
|
|
s:='';
|
|
|
for k:=0 to alist.Count-1 do
|
|
|
begin
|
|
|
s:=Trim(alist[k])+s;
|
|
|
end;
|
|
|
}
|
|
|
t_op_seae['֪ͨ<CDA8>˵<EFBFBD>ַ1']:=StringReplace(Trim(alist.Text),#13#10,' ',[rfReplaceAll]);
|
|
|
t_op_seae['֪ͨ<CDA8>˵<EFBFBD>ַ2']:='';
|
|
|
t_op_seae['֪ͨ<CDA8>˵<EFBFBD>ַ3']:='';
|
|
|
|
|
|
t_op_seae['֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,27].Value);
|
|
|
t_op_seae['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,28].Value);
|
|
|
t_op_seae['֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,29].Value);
|
|
|
t_op_seae['֪ͨ<CDA8>˵绰']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,30].Value);
|
|
|
|
|
|
|
|
|
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>']:=Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,1].Value));
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>']:=Trim(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.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime+7;
|
|
|
|
|
|
|
|
|
t_op_seae['װ<><D7B0><EFBFBD><EFBFBD>']:=trim(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>']:=trim(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>']:=trim(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><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='CY-CY';
|
|
|
|
|
|
|
|
|
t_op_seae['<27><><EFBFBD>䷽ʽ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,40].Value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,39].Value;
|
|
|
t_op_seae['<27><>ͷ']:=alist.Text;
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,38].Value;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=alist.Text;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,35].Value);
|
|
|
t_op_seae['<27><>װ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,34].Value);
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,36].Value);
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,37].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,40].Value);
|
|
|
|
|
|
if pos('<27><>',VartoStr(ExcelTemplet.ActiveSheet.Cells[I,41].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,42].Value);
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,42].Value);
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,42].Value);
|
|
|
end
|
|
|
else
|
|
|
if pos('Σ',VartoStr(ExcelTemplet.ActiveSheet.Cells[I,41].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,43].Value);
|
|
|
t_op_seae['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,44].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,31].Value),1,2);
|
|
|
ctnName:=Copy(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,31].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>']:=Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,32].Value));
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,33].Value));
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,35].Value);
|
|
|
t_op_ctn_edi['<27><>װ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,34].Value);
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,36].Value);
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,37].Value);
|
|
|
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,39].Value;
|
|
|
t_op_ctn_edi['<27><>ͷ']:=alist.Text;
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,38].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([Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,32].Value)),Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,33].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,31].Value),1,2);
|
|
|
ctnName:=Copy(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,31].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>']:=Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,32].Value));
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,33].Value));
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,35].Value);
|
|
|
t_op_ctn_edi['<27><>װ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,34].Value);
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,36].Value);
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,37].Value);
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,39].Value;
|
|
|
t_op_ctn_edi['<27><>ͷ']:=alist.Text;
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,38].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;
|
|
|
t_op_seae.Edit;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+t_op_ctn_edi['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae.Post;
|
|
|
|
|
|
end;
|
|
|
UpdateCTN(aAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
end;
|
|
|
i:=i+1;
|
|
|
end;
|
|
|
frm_main.db.CommitTrans;
|
|
|
finally
|
|
|
isexcel:=false;
|
|
|
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.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.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.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.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.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.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.bsSkinButton65Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_seae1,'<27><>ͷ');
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinButton25Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_seae1,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinButton26Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_seae1,'<27><>ע');
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.t_op_seaeBeforeEdit(DataSet: TDataSet);
|
|
|
begin
|
|
|
if employee='<27>鿴' then
|
|
|
begin
|
|
|
ShowMessage('<27>鿴<EFBFBD>û<EFBFBD>ֻ<EFBFBD>ܲ鿴<DCB2><E9BFB4><EFBFBD><EFBFBD><EFBFBD>ĺ<DEB8><C4BA><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
if t_op_seae.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').AsString<>employee then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+t_op_seae.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').AsString+' ¼<><C2BC><EFBFBD>IJյ<C4B2>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.t_op_ctnBeforeEdit(DataSet: TDataSet);
|
|
|
begin
|
|
|
if employee='<27>鿴' then
|
|
|
begin
|
|
|
ShowMessage('<27>鿴<EFBFBD>û<EFBFBD>ֻ<EFBFBD>ܲ鿴<DCB2><E9BFB4><EFBFBD><EFBFBD><EFBFBD>ĺ<DEB8><C4BA><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
if t_op_seae.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').AsString<>employee then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+t_op_seae.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').AsString+' ¼<><C2BC><EFBFBD>IJյ<C4B2>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.N20Click(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><><EFBFBD><EFBFBD>').Value:=id;
|
|
|
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=id;
|
|
|
t_op_seae.fieldbyname('EDI<44><49><EFBFBD><EFBFBD>').AsString:='CN';
|
|
|
t_op_seae['<27>յ<EFBFBD><D5B5><EFBFBD>Դ']:='<27>յ<EFBFBD><D5B5><EFBFBD><EFBFBD>յ<EFBFBD>';
|
|
|
t_op_seae.fieldbyname('<27>ϴ<EFBFBD><CFB4>ļ<EFBFBD>').AsBoolean:=False;
|
|
|
t_op_seae['װ<><D7B0><EFBFBD><EFBFBD>']:='CNQGD';
|
|
|
t_op_seae['װ<>۴<EFBFBD><DBB4><EFBFBD>']:='CNQGD/4218';
|
|
|
t_op_seae['<27><><EFBFBD>ɷ<EFBFBD><C9B7><EFBFBD>']:=0;
|
|
|
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.N23Click(Sender: TObject);
|
|
|
var id:string;
|
|
|
begin
|
|
|
t_op_seae.append;
|
|
|
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><><EFBFBD><EFBFBD>').Value:=id;
|
|
|
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=id;
|
|
|
t_op_seae.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=id;
|
|
|
t_op_seae.fieldbyname('EDI<44><49><EFBFBD><EFBFBD>').AsString:='CN';
|
|
|
t_op_seae['<27>յ<EFBFBD><D5B5><EFBFBD>Դ']:='<27>յ<EFBFBD><D5B5><EFBFBD><EFBFBD>յ<EFBFBD>';
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='CY-CY';
|
|
|
t_op_seae['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:='FREIGHT COLLECT';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.N26Click(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;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.dxDBGrid4Click(Sender: TObject);
|
|
|
begin
|
|
|
with t_op_file_items_data do
|
|
|
begin
|
|
|
Close;SQL.Clear;
|
|
|
sql.Add('select * from t_op_file_items');
|
|
|
sql.Add('where PID=:PID and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('PID').Value:=t_op_file_data.FieldByName('fid').AsInteger;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_file_data.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Open;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.t_op_file_items_dataAfterDelete(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_op_file_data.Edit;
|
|
|
t_op_file_data.FieldByName('<27><>С').AsInteger:=t_op_file_items_data.RecordCount;
|
|
|
t_op_file_data.Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.t_op_file_items_dataAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_op_file_items_data.FieldByName('PID').AsInteger:=t_op_file_data.FieldByName('fID').AsInteger;
|
|
|
t_op_file_items_data.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_file_data.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.t_op_file_items_dataAfterPost(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_op_file_data.Edit;
|
|
|
t_op_file_data.FieldByName('<27><>С').AsInteger:=t_op_file_items_data.RecordCount;
|
|
|
t_op_file_data.Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinButton66Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_file_data.RecordCount<=0 then
|
|
|
begin
|
|
|
{
|
|
|
t_op_file_data.Append;
|
|
|
t_op_file_data.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>յ<EFBFBD>';
|
|
|
t_op_file_data.FieldByName('<27><>ע').AsString:='<27><>';
|
|
|
t_op_file_data.Post;
|
|
|
}
|
|
|
t_op_file_data.Append;
|
|
|
t_op_file_data.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_file_data.FieldByName('<27><>ע').AsString:='<27><>';
|
|
|
t_op_file_data.Post;
|
|
|
t_op_file_data.First;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinButton49Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_file_data.IsEmpty then exit;
|
|
|
//<2F><><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>
|
|
|
|
|
|
if t_op_file_items_data.fieldbyname('<27>ļ<EFBFBD><C4BC>洢').AsBoolean then
|
|
|
begin
|
|
|
DownLoadProFils(naspath,'user','user',t_op_file_items_data.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if SaveDialog1.Execute then
|
|
|
begin
|
|
|
DownLoadPro(Savedialog1.FileName+t_op_file_items_data.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
end
|
|
|
else exit ;
|
|
|
end;
|
|
|
{
|
|
|
|
|
|
if t_op_file_data.IsEmpty then exit;
|
|
|
//<2F><><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>
|
|
|
if SaveDialog1.Execute then begin
|
|
|
DownLoadPro(Savedialog1.FileName+t_op_file_data.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
end else exit ;
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinButton50Click(Sender: TObject);
|
|
|
var
|
|
|
arr: array[0..MAX_PATH] of Char;
|
|
|
num: DWORD;
|
|
|
tmpfile:string ;
|
|
|
begin
|
|
|
if t_op_file_data.IsEmpty then exit;
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
try
|
|
|
GetTempPath(MAX_PATH, arr);
|
|
|
tmpfile:=arr+t_op_file_items_data.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring ;
|
|
|
DownLoadPro(tmpfile) ;
|
|
|
ShellExecute(Handle, nil, pchar(tmpfile), nil, nil, SW_NORMAL);
|
|
|
except
|
|
|
showmessage('<27><><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
|
|
|
end ;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinButton51Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_file_data.IsEmpty then exit;
|
|
|
//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
|
|
|
t_op_file_items_data.delete ;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.DownLoadPro(fname: string);
|
|
|
const
|
|
|
MaxBufSize=$F000;
|
|
|
var
|
|
|
myfilename:string;//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
|
|
myfileStream,exeBlobStream:TStream;
|
|
|
Count,BufSize,N: Integer;
|
|
|
Buffer:PChar;
|
|
|
begin
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
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.Update;
|
|
|
myfilename:=FName ;
|
|
|
with t_op_file_items_data do
|
|
|
begin
|
|
|
myfilename:=myfilename ; //+fieldbyname('<27><><EFBFBD><EFBFBD>').asstring ;
|
|
|
myfileStream :=TFileStream.Create(myfilename,fmCreate);//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
try //SaveToStream(Stream);
|
|
|
ExeBlobStream:=CreateBlobStream(FieldByName('<27><><EFBFBD><EFBFBD>'),bmRead); //<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD>ȡ<EFBFBD>ü<EFBFBD>¼
|
|
|
Count:=0;
|
|
|
try
|
|
|
if Count=0 then
|
|
|
begin
|
|
|
ExeBlobStream.Position:=0;
|
|
|
Count:=ExeBlobStream.Size;//showmessage(inttostr(count));
|
|
|
end;
|
|
|
if Count>MaxBufSize then BufSize:=MaxBufSize else BufSize:=Count;
|
|
|
GetMem(Buffer,BufSize);
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=(Count div BufSize)+2;
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
try
|
|
|
while Count<>0 do
|
|
|
begin
|
|
|
if Count>BufSize then N:=BufSize else N:=Count;
|
|
|
ExeBlobStream.ReadBuffer(Buffer^,N);//<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
MyFileStream.WriteBuffer(Buffer^,N);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD>ļ<EFBFBD>
|
|
|
Dec(Count,N);
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
end;
|
|
|
finally
|
|
|
FreeMem(Buffer,BufSize);
|
|
|
end;
|
|
|
finally
|
|
|
ExeBlobStream.Free;
|
|
|
end;
|
|
|
finally
|
|
|
myfileStream.Free;
|
|
|
// frm_sys_progress.close;
|
|
|
//frm_sys_progress:=nil;
|
|
|
//frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
frm_sys_progress.close;
|
|
|
frm_sys_progress:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.DownLoadProFils(RemotePathName,Users,pw,fname: string);
|
|
|
var path,newpath,Filters:string;
|
|
|
NetSource :TNetResource;
|
|
|
begin
|
|
|
with NetSource do
|
|
|
begin
|
|
|
dwType := RESOURCETYPE_ANY;
|
|
|
lpLocalName :=''; // <20><>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>Դӳ<D4B4>䵽<EFBFBD><E4B5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
lpRemoteName:=pChar(RemotePathName); // Զ<><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
|
|
|
lpProvider :='';
|
|
|
end;
|
|
|
WnetAddConnection2(NetSource, pChar(Users),pChar(pw),CONNECT_UPDATE_PROFILE);
|
|
|
|
|
|
with SaveDialog1 do
|
|
|
begin
|
|
|
FileName:=ExtractFileName(fname);
|
|
|
Filters:=ExtractFileExt(fname);
|
|
|
Filter:='*'+ExtractFileExt(fname);
|
|
|
if Execute then
|
|
|
begin
|
|
|
path:=fname;
|
|
|
newpath:=SaveDialog1.FileName+Filters;
|
|
|
if CopyFile(pChar(path),pChar(newpath),false) then
|
|
|
//showmessage('<27><><EFBFBD>سɹ<D8B3>')
|
|
|
else showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>');
|
|
|
end;
|
|
|
end;
|
|
|
try
|
|
|
finally
|
|
|
WNetCancelConnection2(pChar(RemotePathName),CONNECT_UPDATE_PROFILE,True);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.UpLoadProFile(fname,RemotePathName,Users,pw,mblNo: string);
|
|
|
var path,newpath:string;
|
|
|
NetSource :TNetResource;
|
|
|
filename,fileExt,filePath:string;
|
|
|
begin
|
|
|
//<2F>ϴ<EFBFBD><CFB4>ļ<EFBFBD>
|
|
|
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.Update;
|
|
|
filename:=ExtractFileName(fname) ;
|
|
|
fileExt:=ExtractFileExt(filename) ;
|
|
|
with NetSource do
|
|
|
begin
|
|
|
dwType := RESOURCETYPE_ANY;
|
|
|
lpLocalName :=''; // <20><>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>Դӳ<D4B4>䵽<EFBFBD><E4B5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
lpRemoteName:=pChar(RemotePathName); // Զ<><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
|
|
|
lpProvider :='';
|
|
|
end;
|
|
|
|
|
|
WnetAddConnection2(NetSource, pChar(Users),pChar(pw),CONNECT_UPDATE_PROFILE);
|
|
|
|
|
|
|
|
|
filePath:=FormatDateTime('YYYYMM',DatabaseDateTime);
|
|
|
|
|
|
|
|
|
if not DirectoryExists(RemotePathName+'\'+filePath) then
|
|
|
MkDir(RemotePathName+'\'+filePath);
|
|
|
|
|
|
if not DirectoryExists(RemotePathName+'\'+filePath+'\'+mblNo) then
|
|
|
MkDir(RemotePathName+'\'+filePath+'\'+mblNo);
|
|
|
newpath:=RemotePathName+'\'+filePath+'\'+mblNo+'\'+filename;
|
|
|
|
|
|
if CopyFile(pChar(fname),pChar(newpath),false) then
|
|
|
// showmessage('<27><><EFBFBD>ݳɹ<DDB3>')
|
|
|
else showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>');
|
|
|
|
|
|
{
|
|
|
if not DirectoryExists(RemotePathName+'\'+mblNo) then
|
|
|
MkDir(RemotePathName+'\'+mblNo);
|
|
|
newpath:=RemotePathName+'\'+mblNo+'\'+filename;
|
|
|
if CopyFile(pChar(fname),pChar(newpath),false) then
|
|
|
// showmessage('<27><><EFBFBD>ݳɹ<DDB3>')
|
|
|
else showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>');
|
|
|
}
|
|
|
|
|
|
try
|
|
|
finally
|
|
|
WNetCancelConnection2(pChar(RemotePathName),CONNECT_UPDATE_PROFILE,True);
|
|
|
end;
|
|
|
|
|
|
with t_op_file_items_data do
|
|
|
begin
|
|
|
Open;
|
|
|
append;
|
|
|
try
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=newpath;
|
|
|
FieldByName('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=now();
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asstring:=employee;
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').Asstring:=fileExt;
|
|
|
FieldByName('<27>ļ<EFBFBD><C4BC>洢').AsBoolean:=true;
|
|
|
|
|
|
Post;
|
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>!','<27><>ʾ',MB_OK+MB_IconInformation);
|
|
|
finally
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
frm_sys_progress.close;
|
|
|
frm_sys_progress:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.UpLoadPro(fname: string);
|
|
|
const
|
|
|
BufSize=$F000;
|
|
|
var
|
|
|
Counter, N: Integer;
|
|
|
Buffer: PAnsiChar;
|
|
|
FieldStrm: TStream;
|
|
|
ExeFileStream:TFileStream;
|
|
|
//ExeFileStream:TMemoryStream;
|
|
|
|
|
|
size_tmp: Double;
|
|
|
filename,fileExt:string ;
|
|
|
begin
|
|
|
//<2F>ϴ<EFBFBD><CFB4>ļ<EFBFBD>
|
|
|
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.Update;
|
|
|
filename:=ExtractFileName(fname) ;
|
|
|
fileExt:=ExtractFileExt(filename) ;
|
|
|
ExeFileStream:=TFileStream.Create(fname,fmopenRead); //<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
|
// ExeFileStream:=TCompressionStream.Create(clMax,TStream(ExeFileStream));
|
|
|
with t_op_file_items_data do
|
|
|
begin
|
|
|
Open;
|
|
|
append;
|
|
|
try
|
|
|
FieldStrm := CreateBlobStream(FieldByName('<27><><EFBFBD><EFBFBD>'),bmWrite);
|
|
|
GetMem(Buffer,BufSize);
|
|
|
try
|
|
|
Counter := ExeFileStream.Size;
|
|
|
size_tmp :=ExeFileStream.Size;
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=(Counter div BufSize)+2;
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
while Counter<>0 do
|
|
|
begin
|
|
|
if Counter>BufSize then N :=BufSize else N:=Counter;
|
|
|
ExeFileStream.ReadBuffer(Buffer^,N);
|
|
|
FieldStrm.WriteBuffer(Buffer^, N);
|
|
|
Dec(Counter, N);
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
// Application.ProcessMessages;
|
|
|
end;
|
|
|
finally
|
|
|
FreeMem(Buffer,BufSize);
|
|
|
FieldStrm.Free;
|
|
|
end;
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=filename;
|
|
|
FieldByName('<27><>С').AsFloat:=size_tmp;
|
|
|
FieldByName('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=now();
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asstring:=employee;
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').Asstring:=fileExt;
|
|
|
Post;
|
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>!','<27><>ʾ',MB_OK+MB_IconInformation);
|
|
|
finally
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
frm_sys_progress.close;
|
|
|
frm_sys_progress:=nil;
|
|
|
ExeFileStream.Free;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinButton27Click(Sender: TObject);
|
|
|
begin
|
|
|
if trim(t_op_seae.fieldbyname('<27><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>').AsString)='' then
|
|
|
begin
|
|
|
showmessage('<27>걨<EFBFBD><EAB1A8>Ϊ<EFBFBD><CEAA>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if not assigned(frm_op_seae) then
|
|
|
frm_op_seae:=tfrm_op_seae.Create (self);
|
|
|
frm_op_seae.ManualDock(frm_main.SearchTabs('frm_op_seae',frm_op_seae.caption,'101'),nil,alClient);
|
|
|
frm_op_seae.show;
|
|
|
{
|
|
|
// showmessage(inttostr(frm_data_share.t_code_fee.RecordCount));
|
|
|
frm_data_share.t_code_fee.Filtered:=False;
|
|
|
frm_data_share.t_code_fee.Filter:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27>յ<EFBFBD><D5B5><EFBFBD>''';
|
|
|
frm_data_share.t_code_fee.Filtered:=true;
|
|
|
|
|
|
frm_data_share.t_code_fee.Requery();
|
|
|
// showmessage(inttostr(frm_data_share.t_code_fee.RecordCount));
|
|
|
}
|
|
|
frm_op_seae.Edit2.Text:=t_op_seae.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
frm_op_seae.bsSkinButton44.OnClick(Sender);
|
|
|
OpFeeName:=trim(t_op_seae.fieldbyname('<27><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>').AsString);
|
|
|
|
|
|
|
|
|
|
|
|
{ if frm_op_seae.t_op_seae.Active then
|
|
|
begin
|
|
|
frm_op_seae.t_op_seae.Requery();
|
|
|
frm_op_seae.t_op_seae.Locate('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>',t_op_seae.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString,[]);
|
|
|
frm_op_seae.ManualDock(frm_main.SearchTabs('frm_op_seae',frm_op_seae.caption,'101'),nil,alClient);
|
|
|
frm_op_seae.show;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
// frm_op_seae.t_op_seae.Requery();
|
|
|
frm_op_seae.ManualDock(frm_main.SearchTabs('frm_op_seae',frm_op_seae.caption,'101'),nil,alClient);
|
|
|
frm_op_seae.show;
|
|
|
frm_op_seae.t_op_seae.Locate('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>',t_op_seae.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString,[]);
|
|
|
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.dxDBGrid1CustomDraw(Sender: TObject;
|
|
|
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
|
|
|
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
|
|
|
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
|
|
|
begin
|
|
|
if uppercase(ANode.Strings[dxDBGrid1Column23.Index])='TRUE' then begin
|
|
|
AColor:=clSkyBlue;
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.t_op_file_dataAfterPost(DataSet: TDataSet);
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
begin
|
|
|
//
|
|
|
if t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString<>'' then
|
|
|
begin
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select sum(<28><>С) sums from t_op_file_data where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Open;
|
|
|
if FieldByName('sums').AsInteger>=1 then
|
|
|
begin
|
|
|
t_op_seae.Edit;
|
|
|
t_op_seae.FieldByName('<27>ϴ<EFBFBD><CFB4>ļ<EFBFBD>').AsBoolean:=True;
|
|
|
t_op_seae.Post;
|
|
|
end;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinPageControl1Change(Sender: TObject);
|
|
|
begin
|
|
|
if frm_op_seae_data_create=false then
|
|
|
exit;
|
|
|
if bsSkinPageControl1.ActivePage=bsSkinTabSheet2 then
|
|
|
begin
|
|
|
t_op_file_data.Close;
|
|
|
t_op_file_data.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
if not t_op_file_data.Active then
|
|
|
t_op_file_data.open;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if t_op_file_data.State in [dsedit,dsinsert] then t_op_file_data.Post;
|
|
|
t_op_file_data.close;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.DBEdit1Change(Sender: TObject);
|
|
|
begin
|
|
|
t_op_file_items_data.Close;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinButton28Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.N27Click(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>۲յ<DBB2>',2,aDataSource,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
|
|
|
finally
|
|
|
aDataSource.Free;
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinButton29Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae.close;
|
|
|
t_op_seae.sql.clear;
|
|
|
t_op_seae.sql.add(opsqlstr);
|
|
|
t_op_seae.Open;
|
|
|
{t_op_seae_sum.close;
|
|
|
t_op_seae_sum.sql.clear;
|
|
|
t_op_seae_sum.sql.add(opsumsqlstr);
|
|
|
t_op_seae_sum.Open;}
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.bsSkinButton30Click(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',2,t_op_seae1,t_op_ctn1,nil,nil,nil,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.EXCEL1Click(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);
|
|
|
isexcel:=True;
|
|
|
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>']:=Trim(mblno);
|
|
|
t_op_seae['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:='FREIGHT COLLECT';
|
|
|
t_op_seae['ǩ<><C7A9><EFBFBD>ص<EFBFBD>']:='QINGDAO,CHINA';
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:='';
|
|
|
t_op_seae['<27>յ<EFBFBD><D5B5><EFBFBD>Դ']:='EXCEL<45><4C><EFBFBD><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>']:=StringReplace(Trim(alist.Text),#13#10,' ',[rfReplaceAll]);
|
|
|
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']:=StringReplace(Trim(alist.Text),#13#10,' ',[rfReplaceAll]);
|
|
|
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>']:='';
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,15].Value);
|
|
|
// t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,16].Value);
|
|
|
// t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,17].Value);
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>˵绰']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,16].Value);
|
|
|
|
|
|
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['<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=StringReplace(Trim(alist.Text),#13#10,' ',[rfReplaceAll]);
|
|
|
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['<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1']:=StringReplace(Trim(alist.Text),#13#10,' ',[rfReplaceAll]);
|
|
|
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>']:='';
|
|
|
|
|
|
t_op_seae['<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,19].Value);
|
|
|
// t_op_seae['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,20.Value);
|
|
|
// t_op_seae['<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,23].Value);
|
|
|
t_op_seae['<27>ջ<EFBFBD><D5BB>˵绰']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,20].Value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,21].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>']:=StringReplace(Trim(alist.Text),#13#10,' ',[rfReplaceAll]);
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,22].Value;
|
|
|
{
|
|
|
s:='';
|
|
|
for k:=0 to alist.Count-1 do
|
|
|
begin
|
|
|
s:=Trim(alist[k])+s;
|
|
|
end;
|
|
|
}
|
|
|
t_op_seae['֪ͨ<CDA8>˵<EFBFBD>ַ1']:=StringReplace(Trim(alist.Text),#13#10,' ',[rfReplaceAll]);
|
|
|
t_op_seae['֪ͨ<CDA8>˵<EFBFBD>ַ2']:='';
|
|
|
t_op_seae['֪ͨ<CDA8>˵<EFBFBD>ַ3']:='';
|
|
|
|
|
|
t_op_seae['֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,23].Value);
|
|
|
// t_op_seae['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,28].Value);
|
|
|
// t_op_seae['֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,29].Value);
|
|
|
t_op_seae['֪ͨ<CDA8>˵绰']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,24].Value);
|
|
|
|
|
|
|
|
|
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>']:=Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,1].Value));
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>']:=Trim(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.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime+7;
|
|
|
|
|
|
|
|
|
t_op_seae['װ<><D7B0><EFBFBD><EFBFBD>']:=trim(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>']:=trim(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>']:=trim(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><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='CY-CY';
|
|
|
|
|
|
|
|
|
t_op_seae['<27><><EFBFBD>䷽ʽ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,40].Value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,32].Value;
|
|
|
t_op_seae['<27><>ͷ']:=alist.Text;
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,31].Value;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=alist.Text;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,29].Value);
|
|
|
t_op_seae['<27><>װ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,28].Value);
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,30].Value);
|
|
|
// t_op_seae['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,37].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,33].Value);
|
|
|
|
|
|
if pos('<27><>',VartoStr(ExcelTemplet.ActiveSheet.Cells[I,34].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,35].Value);
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,35].Value);
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,35].Value);
|
|
|
end
|
|
|
else
|
|
|
if pos('Σ',VartoStr(ExcelTemplet.ActiveSheet.Cells[I,34].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,36].Value);
|
|
|
t_op_seae['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,37].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,25].Value),1,2);
|
|
|
ctnName:=Copy(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,25].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>']:=Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,26].Value));
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,27].Value));
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,29].Value);
|
|
|
t_op_ctn_edi['<27><>װ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,28].Value);
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,30].Value);
|
|
|
// t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,37].Value);
|
|
|
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,32].Value;
|
|
|
t_op_ctn_edi['<27><>ͷ']:=alist.Text;
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,31].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([Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,26].Value)),Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,27].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,25].Value),1,2);
|
|
|
ctnName:=Copy(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,25].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>']:=Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,26].Value));
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=Trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,27].Value));
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,29].Value);
|
|
|
t_op_ctn_edi['<27><>װ']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,28].Value);
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,30].Value);
|
|
|
// t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,37].Value);
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,32].Value;
|
|
|
t_op_ctn_edi['<27><>ͷ']:=alist.Text;
|
|
|
alist.Text:='';
|
|
|
alist.Text:=ExcelTemplet.ActiveSheet.Cells[I,31].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;
|
|
|
t_op_seae.Edit;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+t_op_ctn_edi['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae.Post;
|
|
|
|
|
|
end;
|
|
|
UpdateCTN(aAdoQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
end;
|
|
|
i:=i+1;
|
|
|
end;
|
|
|
frm_main.db.CommitTrans;
|
|
|
finally
|
|
|
isexcel:=False;
|
|
|
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.t_op_seaeBeforePost(DataSet: TDataSet);
|
|
|
begin
|
|
|
if (not isexcel) then
|
|
|
table_before_post(t_op_seae,'<27><><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.dxDBGrid1Column26GetText(Sender: TObject;
|
|
|
ANode: TdxTreeListNode; var AText: String);
|
|
|
begin
|
|
|
if AText='True' then
|
|
|
AText:='<27><>'
|
|
|
else AText:='';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.EXCEL2Click(Sender: TObject);
|
|
|
var
|
|
|
i,j:integer;
|
|
|
str:widestring;
|
|
|
aAdoQuery:TAdoQuery;
|
|
|
aDataSource:TDataSource;
|
|
|
poststr:string;
|
|
|
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;
|
|
|
j:=6;
|
|
|
excel3.Connect;
|
|
|
excel3.Exec('[open('+'"'+ExtractFilePath(Application.ExeName)+'ZHENHUA.xls'+'"'+')]');
|
|
|
excel3.putstr(2,1,aAdoQuery.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString);
|
|
|
First;
|
|
|
while not eof do begin
|
|
|
excel3.putstr(j,1,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,2,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,3,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,4,'');
|
|
|
excel3.putstr(j,5,aAdoQuery.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString);
|
|
|
excel3.putstr(j,6,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,7,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
poststr:=aAdoQuery.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').AsString;
|
|
|
if Pos(',',poststr)>0 then poststr:=Copy(poststr,1,Pos(',',poststr)-1);
|
|
|
excel3.putstr(j,8,poststr);
|
|
|
poststr:=aAdoQuery.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').AsString;
|
|
|
if Pos(',',poststr)>0 then poststr:=Copy(poststr,1,Pos(',',poststr)-1);
|
|
|
excel3.putstr(j,10,poststr);
|
|
|
poststr:=aAdoQuery.FieldByName('Ŀ<>ĵ<EFBFBD>').AsString;
|
|
|
if Pos(',',poststr)>0 then poststr:=Copy(poststr,1,Pos(',',poststr)-1);
|
|
|
excel3.putstr(j,11,poststr);
|
|
|
|
|
|
excel3.putstr(j,12,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,13,aAdoQuery.FieldByName('<27><>װ').AsString);
|
|
|
excel3.putstr(j,14,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,15,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,16,aAdoQuery.FieldByName('<27>ߴ<EFBFBD>').AsString+aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,17,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,18,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,19,aAdoQuery.FieldByName('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,20,aAdoQuery.FieldByName('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
if Pos('COLLECT',aAdoQuery.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').AsString)>0 THEN
|
|
|
excel3.putstr(j,21,'COLLECT')
|
|
|
else excel3.putstr(j,21,'PREPAID');
|
|
|
excel3.putstr(j,22,aAdoQuery.FieldByName('<27><>ͷ_1').AsString);
|
|
|
excel3.putstr(j,24,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString+#13#10+aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString+#13#10+aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ3').AsString);
|
|
|
excel3.putstr(j,25,'');
|
|
|
excel3.putstr(j,26,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,27,'TE');
|
|
|
excel3.putstr(j,28,aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString);
|
|
|
|
|
|
excel3.putstr(j,30,aAdoQuery.FieldByName('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString+#13#10+aAdoQuery.FieldByName('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString+#13#10+aAdoQuery.FieldByName('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3').AsString);
|
|
|
excel3.putstr(j,31,'');
|
|
|
excel3.putstr(j,32,aAdoQuery.FieldByName('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,33,'TE');
|
|
|
excel3.putstr(j,34,aAdoQuery.FieldByName('<27>ջ<EFBFBD><D5BB>˵绰').AsString);
|
|
|
|
|
|
excel3.putstr(j,36,aAdoQuery.FieldByName('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString+#13#10+aAdoQuery.FieldByName('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString+#13#10+aAdoQuery.FieldByName('֪ͨ<CDA8>˵<EFBFBD>ַ3').AsString);
|
|
|
excel3.putstr(j,37,'');
|
|
|
excel3.putstr(j,38,aAdoQuery.FieldByName('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,39,'TE');
|
|
|
excel3.putstr(j,40,aAdoQuery.FieldByName('֪ͨ<CDA8>˵绰').AsString);
|
|
|
|
|
|
if (aAdoQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ').AsString='D') then
|
|
|
excel3.putstr(j,42,'<27><>')
|
|
|
else excel3.putstr(j,42,'<27><>');
|
|
|
excel3.putstr(j,43,aAdoQuery.FieldByName('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,44,aAdoQuery.FieldByName('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsString);
|
|
|
excel3.putstr(j,45,aAdoQuery.FieldByName('Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD><CFB5>').AsString);
|
|
|
excel3.putstr(j,46,aAdoQuery.FieldByName('Σ<><CEA3>Ʒ<EFBFBD>绰').AsString);
|
|
|
|
|
|
j:=j+1;
|
|
|
Next;
|
|
|
end;
|
|
|
SaveDialog.Filter := '(*.xls)|*.xls';
|
|
|
SaveDialog.FileName := aAdoQuery.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring+'.xls';
|
|
|
if SaveDialog.Execute then
|
|
|
begin
|
|
|
excel3.Exec('[SAVE.AS("'+SaveDialog.FileName+'";1;"";false;"";false)]');
|
|
|
excel3.Exec('[CLOSE(false)]');
|
|
|
// excel2.Exec('[open("'+SaveDialog.FileName+'")]');
|
|
|
// excel2.Exec('[APP.maxIMIZE()]'); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>excel
|
|
|
end;
|
|
|
// updatelr;
|
|
|
finally
|
|
|
aDataSource.Free;
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo4Enter(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo4.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.RxDBLookupCombo4Exit(Sender: TObject);
|
|
|
begin
|
|
|
RxDBLookupCombo4.LookupDisplay:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.N31Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_seae.IsEmpty then
|
|
|
exit;
|
|
|
if dxDBGrid1.SelectedCount<1 then
|
|
|
begin
|
|
|
showmessage('<27><>ѡ<EFBFBD><D1A1>Ҫ<EFBFBD>ĵ<DEB8>ҵ<EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
|
|
|
t_op_seae.post;
|
|
|
try
|
|
|
frm_op_customername_change:=tfrm_op_customername_change.Create (self);
|
|
|
frm_op_customername_change.ShowModal;
|
|
|
finally
|
|
|
frm_op_customername_change.Free;
|
|
|
frm_op_customername_change:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.N33Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_seae.IsEmpty then
|
|
|
exit;
|
|
|
if dxDBGrid1.SelectedCount<1 then
|
|
|
begin
|
|
|
showmessage('<27><>ѡ<EFBFBD><D1A1>Ҫ<EFBFBD>ĵ<DEB8>ҵ<EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
|
|
|
t_op_seae.post;
|
|
|
try
|
|
|
frm_op_vesselvoy_cdchange:=tfrm_op_vesselvoy_cdchange.Create (self);
|
|
|
frm_op_vesselvoy_cdchange.ShowModal;
|
|
|
finally
|
|
|
frm_op_vesselvoy_cdchange.Free;
|
|
|
frm_op_vesselvoy_cdchange:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_edi_data.Edit3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
if Key=#13 then
|
|
|
bsSkinButton8.OnClick(Sender);
|
|
|
end;
|
|
|
|
|
|
end.
|