|
|
unit crm_OnLineBooking;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, ADODB, BusinessSkinForm, bsSkinCtrls, dxExEdtr, dxCntner, dxTL,
|
|
|
dxDBCtrl, dxDBGrid, dxDBTLCl, dxGrClms, Grids, DBGridEh, StdCtrls, Mask,
|
|
|
bsSkinBoxCtrls, u_op_seae_DsWebService, SoapHTTPClient, InvokeRegistry, Menus,
|
|
|
kbmMemTable, my_sys_function, DBCtrls, ExtCtrls, ComCtrls, ActnList,
|
|
|
cxLookAndFeelPainters, cxCheckBox, cxButtons, cxLabel, cxDBEdit, cxControls,
|
|
|
cxContainer, cxEdit, cxTextEdit, cxMemo, DBGrids;
|
|
|
|
|
|
type
|
|
|
Tfrm_crm_OnLineBooking = class(TForm)
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
MT1: TkbmMemTable;
|
|
|
ds1: TDataSource;
|
|
|
qryInsert: TADOQuery;
|
|
|
MT1BSNO: TStringField;
|
|
|
MT1BSSTATUS: TStringField;
|
|
|
MT1BSDATE: TStringField;
|
|
|
MT1MBLNO: TStringField;
|
|
|
MT1CUSTNO: TStringField;
|
|
|
MT1SHIPPERID: TStringField;
|
|
|
MT1ETD: TStringField;
|
|
|
MT1ETA: TStringField;
|
|
|
MT1PORTLOADID: TStringField;
|
|
|
MT1PORTDISCHARGEID: TStringField;
|
|
|
MT1DESTINATIONID: TStringField;
|
|
|
MT1INPUTBY: TStringField;
|
|
|
MT1AUDITOR: TStringField;
|
|
|
MT1FORWARDER: TStringField;
|
|
|
MT1CARRIER: TStringField;
|
|
|
qrysearch: TADOQuery;
|
|
|
MT2: TkbmMemTable;
|
|
|
StringField1: TStringField;
|
|
|
StringField2: TStringField;
|
|
|
StringField3: TStringField;
|
|
|
StringField4: TStringField;
|
|
|
StringField5: TStringField;
|
|
|
StringField6: TStringField;
|
|
|
StringField7: TStringField;
|
|
|
StringField8: TStringField;
|
|
|
StringField9: TStringField;
|
|
|
StringField10: TStringField;
|
|
|
StringField11: TStringField;
|
|
|
StringField12: TStringField;
|
|
|
StringField13: TStringField;
|
|
|
StringField14: TStringField;
|
|
|
StringField15: TStringField;
|
|
|
MT1CtnInfo: TStringField;
|
|
|
MT1CNTR: TStringField;
|
|
|
MT1TimeMark: TStringField;
|
|
|
MT1VESSEL: TStringField;
|
|
|
MT1VOYNO: TStringField;
|
|
|
MT1ISSUEPLACE: TStringField;
|
|
|
MT1BOOKINGTYPE: TStringField;
|
|
|
MT1OLDBSNO: TStringField;
|
|
|
MT1CONSIGNEE: TStringField;
|
|
|
MT1NOTIFYPARTY: TStringField;
|
|
|
MT1DESCRIPTION: TStringField;
|
|
|
MT1NOPKGS: TStringField;
|
|
|
MT1PKGS: TStringField;
|
|
|
MT1GROSSWEIGHT: TStringField;
|
|
|
MT1KGS: TStringField;
|
|
|
MT1MEASUREMENT: TStringField;
|
|
|
MT1CBM: TStringField;
|
|
|
MT1BOOKINGDESCRIPTION: TStringField;
|
|
|
MT1PLACEDELIVERY: TStringField;
|
|
|
MT1PLACEDELIVERYID: TStringField;
|
|
|
MT1SERVICE: TStringField;
|
|
|
MT1BLFRT: TStringField;
|
|
|
MT1SHIPPER: TStringField;
|
|
|
MT1PORTLOAD: TStringField;
|
|
|
MT1PORTDISCHARGE: TStringField;
|
|
|
MT1DESTINATION: TStringField;
|
|
|
MT1MARKS: TStringField;
|
|
|
MT1TOTALNO: TStringField;
|
|
|
MT1SENDERCOMPANY: TStringField;
|
|
|
MT1SENDERCOMPANYID: TStringField;
|
|
|
MT1SENDERNAME: TStringField;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
t_ch_fee: TADOQuery;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
MT1CARGOID: TStringField;
|
|
|
MT1COMPANYID: TStringField;
|
|
|
qryGetOpseae: TADOQuery;
|
|
|
qryGetOpseae2: TADOQuery;
|
|
|
qryGetCompany: TADOQuery;
|
|
|
MT1KINDPKGS: TStringField;
|
|
|
MT1SenderMobile: TStringField;
|
|
|
MT1SenderEmail: TStringField;
|
|
|
MT1PAYABLEAT: TStringField;
|
|
|
GetCtnCodeQry: TADOQuery;
|
|
|
MT1CONTRACTNO: TStringField;
|
|
|
bsSkinNotebook1: TbsSkinNotebook;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
MT1PendingReason: TStringField;
|
|
|
MT1CLOSEDOCDATE: TStringField;
|
|
|
MT1BSTYPE: TStringField;
|
|
|
pnl2: TPanel;
|
|
|
dbmmoYARDRemark: TDBMemo;
|
|
|
lbl23: TLabel;
|
|
|
lbl24: TLabel;
|
|
|
dbedtYARDAddress: TDBEdit;
|
|
|
dbedtYARDTel: TDBEdit;
|
|
|
lbl26: TLabel;
|
|
|
lbl27: TLabel;
|
|
|
dbedtCLOSEDOCDATE: TDBEdit;
|
|
|
lbl29: TLabel;
|
|
|
dbedtCLOSINGDATE: TDBEdit;
|
|
|
lbl30: TLabel;
|
|
|
MT1YARD: TStringField;
|
|
|
MT1YARDAddress: TStringField;
|
|
|
MT1YARDLinkman: TStringField;
|
|
|
MT1YARDTel: TStringField;
|
|
|
dbedtCLOSEDOCDATE1: TDBEdit;
|
|
|
MT1YARDFAX: TStringField;
|
|
|
MT1YARDRemark: TStringField;
|
|
|
qry_op_letter: TADOQuery;
|
|
|
qry_op_letter_rh: TADOQuery;
|
|
|
ds_op_letter_rh1: TDataSource;
|
|
|
ds_op_letter1: TDataSource;
|
|
|
dbedtYARDAddress1: TDBEdit;
|
|
|
lbl25: TLabel;
|
|
|
lbl2: TLabel;
|
|
|
dbedtYARD1: TDBEdit;
|
|
|
lbl28: TLabel;
|
|
|
dbedtYARD2: TDBEdit;
|
|
|
lbl32: TLabel;
|
|
|
dbedtYARD3: TDBEdit;
|
|
|
lbl33: TLabel;
|
|
|
dbedtYARD4: TDBEdit;
|
|
|
lbl34: TLabel;
|
|
|
dbedtYARD5: TDBEdit;
|
|
|
lbl35: TLabel;
|
|
|
dbedtYARD6: TDBEdit;
|
|
|
lbl36: TLabel;
|
|
|
dbedtYARD7: TDBEdit;
|
|
|
lbl37: TLabel;
|
|
|
dbedtYARD8: TDBEdit;
|
|
|
lbl38: TLabel;
|
|
|
dbedtPORTLOAD: TDBEdit;
|
|
|
dbedtVOYNO: TDBEdit;
|
|
|
lbl39: TLabel;
|
|
|
dbedtVESSEL: TDBEdit;
|
|
|
lbl42: TLabel;
|
|
|
lbl40: TLabel;
|
|
|
lbl41: TLabel;
|
|
|
dbedtVOYNO1: TDBEdit;
|
|
|
lbl43: TLabel;
|
|
|
dbedtVESSEL1: TDBEdit;
|
|
|
lbl44: TLabel;
|
|
|
dbedtVOYNO2: TDBEdit;
|
|
|
lbl45: TLabel;
|
|
|
dbedtVESSEL2: TDBEdit;
|
|
|
lbl46: TLabel;
|
|
|
lbl47: TLabel;
|
|
|
lbl31: TLabel;
|
|
|
lbl50: TLabel;
|
|
|
MT1Remark: TStringField;
|
|
|
pnl3: TPanel;
|
|
|
MT1GID: TStringField;
|
|
|
MT1RECDate: TStringField;
|
|
|
spl1: TSplitter;
|
|
|
MT_MSG: TkbmMemTable;
|
|
|
StringField16: TStringField;
|
|
|
StringField17: TStringField;
|
|
|
MT1MSGDate: TStringField;
|
|
|
StringField18: TStringField;
|
|
|
MT1SENDERCOMPANYNAME: TStringField;
|
|
|
MT1FieldValue: TStringField;
|
|
|
StringField19: TStringField;
|
|
|
MT1Received: TStringField;
|
|
|
MT1SendMail: TStringField;
|
|
|
ds2: TDataSource;
|
|
|
pm1: TPopupMenu;
|
|
|
N2: TMenuItem;
|
|
|
N1: TMenuItem;
|
|
|
N3: TMenuItem;
|
|
|
pnl4: TPanel;
|
|
|
pnl5: TPanel;
|
|
|
btn1: TButton;
|
|
|
chk1: TCheckBox;
|
|
|
mmo2: TMemo;
|
|
|
dxDBGrid: TdxDBGrid;
|
|
|
colFX: TdxDBGridColumn;
|
|
|
colSenderCompany: TdxDBGridColumn;
|
|
|
colSender: TdxDBGridColumn;
|
|
|
colMESDate: TdxDBGridColumn;
|
|
|
colFieldValue: TdxDBGridMemoColumn;
|
|
|
dxDBGridColumn6: TdxDBGridColumn;
|
|
|
actlst1: TActionList;
|
|
|
act1: TAction;
|
|
|
act2: TAction;
|
|
|
pnl6: TPanel;
|
|
|
dxdbgrd1: TdxDBGrid;
|
|
|
dxdbgrd1Column8: TdxDBGridColumn;
|
|
|
dxdbgrd1Column10: TdxDBGridColumn;
|
|
|
dxdbgrd1Column1: TdxDBGridColumn;
|
|
|
dxdbgrd1Column3: TdxDBGridColumn;
|
|
|
dxdbgrd1Column2: TdxDBGridColumn;
|
|
|
dxdbgrd1Column7: TdxDBGridColumn;
|
|
|
dxdbgrd1Column6: TdxDBGridColumn;
|
|
|
dxdbgrd1Column5: TdxDBGridColumn;
|
|
|
dxdbgrd1Column9: TdxDBGridColumn;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
cxDBMemo3: TcxDBMemo;
|
|
|
cxDBTextEdit1: TcxDBTextEdit;
|
|
|
cxDBTextEdit2: TcxDBTextEdit;
|
|
|
cxDBTextEdit3: TcxDBTextEdit;
|
|
|
cxDBTextEdit4: TcxDBTextEdit;
|
|
|
cxDBTextEdit5: TcxDBTextEdit;
|
|
|
cxDBTextEdit6: TcxDBTextEdit;
|
|
|
cxDBMemo4: TcxDBMemo;
|
|
|
cxDBMemo5: TcxDBMemo;
|
|
|
cxLabel16: TcxLabel;
|
|
|
cxDBTextEdit8: TcxDBTextEdit;
|
|
|
cxDBTextEdit9: TcxDBTextEdit;
|
|
|
cxDBTextEdit11: TcxDBTextEdit;
|
|
|
cxButton6: TcxButton;
|
|
|
cxDBTextEdit15: TcxDBTextEdit;
|
|
|
cxDBTextEdit16: TcxDBTextEdit;
|
|
|
cxDBTextEdit17: TcxDBTextEdit;
|
|
|
cxDBTextEdit18: TcxDBTextEdit;
|
|
|
cxDBTextEdit19: TcxDBTextEdit;
|
|
|
cxDBTextEdit20: TcxDBTextEdit;
|
|
|
cxDBTextEdit21: TcxDBTextEdit;
|
|
|
cxDBMemo2: TcxDBMemo;
|
|
|
cxDBMemo1: TcxDBMemo;
|
|
|
cxButton8: TcxButton;
|
|
|
cxButton9: TcxButton;
|
|
|
cxButton10: TcxButton;
|
|
|
DBEdit1: TDBEdit;
|
|
|
cxCheckBox1: TcxCheckBox;
|
|
|
cxButton11: TcxButton;
|
|
|
cxCheckBox2: TcxCheckBox;
|
|
|
cxCheckBox3: TcxCheckBox;
|
|
|
cxCheckBox4: TcxCheckBox;
|
|
|
cxCheckBox5: TcxCheckBox;
|
|
|
cxCheckBox6: TcxCheckBox;
|
|
|
cxCheckBox7: TcxCheckBox;
|
|
|
cxCheckBox9: TcxCheckBox;
|
|
|
cxCheckBox8: TcxCheckBox;
|
|
|
cxCheckBox11: TcxCheckBox;
|
|
|
cxCheckBox12: TcxCheckBox;
|
|
|
cxCheckBox13: TcxCheckBox;
|
|
|
cxCheckBox15: TcxCheckBox;
|
|
|
cxCheckBox16: TcxCheckBox;
|
|
|
cxCheckBox17: TcxCheckBox;
|
|
|
cxCheckBox22: TcxCheckBox;
|
|
|
cxCheckBox23: TcxCheckBox;
|
|
|
cxCheckBox24: TcxCheckBox;
|
|
|
cxCheckBox25: TcxCheckBox;
|
|
|
cxCheckBox26: TcxCheckBox;
|
|
|
cxCheckBox21: TcxCheckBox;
|
|
|
cxDBMemo6: TcxDBMemo;
|
|
|
cxCheckBox14: TcxCheckBox;
|
|
|
Memo1: TMemo;
|
|
|
Memo2: TMemo;
|
|
|
Memo3: TMemo;
|
|
|
Memo4: TMemo;
|
|
|
t_op_seae1: TDataSource;
|
|
|
t_op_seae: TADOQuery;
|
|
|
t_op_ctn1: TDataSource;
|
|
|
t_op_ctn: TADOQuery;
|
|
|
MT1Field: TMemoField;
|
|
|
MT1Field2: TMemoField;
|
|
|
MT1Field3: TMemoField;
|
|
|
MT1Field4: TStringField;
|
|
|
MT1Field5: TStringField;
|
|
|
MT1Field6: TStringField;
|
|
|
MT1Field7: TStringField;
|
|
|
MT1Field8: TStringField;
|
|
|
MT1Field9: TStringField;
|
|
|
MT1Field10: TStringField;
|
|
|
MT1Field11: TStringField;
|
|
|
MT1Field12: TStringField;
|
|
|
MT1Field13: TStringField;
|
|
|
MT1Field14: TIntegerField;
|
|
|
MT1Field15: TStringField;
|
|
|
MT1Field16: TFloatField;
|
|
|
MT1Field17: TFloatField;
|
|
|
MT1Field18: TMemoField;
|
|
|
MT1Field19: TMemoField;
|
|
|
MT1StringField: TStringField;
|
|
|
MT1Field20: TStringField;
|
|
|
MT1Field21: TMemoField;
|
|
|
memtblwebCtn: TkbmMemTable;
|
|
|
memtblwebCtn1: TDataSource;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
MT1INDEX_ID: TIntegerField;
|
|
|
cxButton1: TcxButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
pnl1: TPanel;
|
|
|
cxDBMemo7: TcxDBMemo;
|
|
|
cxDBTextEdit7: TcxDBTextEdit;
|
|
|
cxDBTextEdit10: TcxDBTextEdit;
|
|
|
cxDBTextEdit12: TcxDBTextEdit;
|
|
|
cxDBTextEdit13: TcxDBTextEdit;
|
|
|
cxDBTextEdit22: TcxDBTextEdit;
|
|
|
cxDBTextEdit23: TcxDBTextEdit;
|
|
|
cxDBMemo8: TcxDBMemo;
|
|
|
cxDBMemo9: TcxDBMemo;
|
|
|
cxDBTextEdit24: TcxDBTextEdit;
|
|
|
cxDBTextEdit25: TcxDBTextEdit;
|
|
|
cxDBTextEdit26: TcxDBTextEdit;
|
|
|
cxDBTextEdit27: TcxDBTextEdit;
|
|
|
cxDBTextEdit28: TcxDBTextEdit;
|
|
|
cxDBTextEdit29: TcxDBTextEdit;
|
|
|
cxDBMemo10: TcxDBMemo;
|
|
|
cxDBMemo11: TcxDBMemo;
|
|
|
cxDBMemo12: TcxDBMemo;
|
|
|
lbl1: TLabel;
|
|
|
lbl3: TLabel;
|
|
|
lbl4: TLabel;
|
|
|
lbl5: TLabel;
|
|
|
lbl6: TLabel;
|
|
|
lbl7: TLabel;
|
|
|
lbl8: TLabel;
|
|
|
lbl9: TLabel;
|
|
|
lbl10: TLabel;
|
|
|
lbl12: TLabel;
|
|
|
lbl13: TLabel;
|
|
|
lbl14: TLabel;
|
|
|
lbl15: TLabel;
|
|
|
lbl16: TLabel;
|
|
|
lbl17: TLabel;
|
|
|
lbl18: TLabel;
|
|
|
lbl19: TLabel;
|
|
|
lbl20: TLabel;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
Qry1: TADOQuery;
|
|
|
Label1: TLabel;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
dxDBGridColumn3: TdxDBGridColumn;
|
|
|
dxDBGridColumn4: TdxDBGridColumn;
|
|
|
dxDBGridColumn5: TdxDBGridColumn;
|
|
|
dxDBGridColumn7: TdxDBGridColumn;
|
|
|
dxDBGridColumn8: TdxDBGridColumn;
|
|
|
dxDBGridColumn9: TdxDBGridColumn;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure dxdbgrd1DblClick(Sender: TObject);
|
|
|
function UnformatAfrstr(str: string): string;
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure SaveBooking;
|
|
|
procedure AcceptRedirect;
|
|
|
procedure DoSaveBook;
|
|
|
procedure Pending;
|
|
|
procedure SaveShippingOrder;
|
|
|
procedure DoPending(BSNO, PendingReason: string);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure ssagetaChange(Sender: TObject; Field: TField);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure btn1Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure dxdbgrd1CustomDraw(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 dxdbgrd1Click(Sender: TObject);
|
|
|
procedure dxdbgrd1Column1CustomDraw(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 dxDBGridCustomDraw(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 N2Click(Sender: TObject);
|
|
|
procedure SetReceived(GID: string);
|
|
|
procedure SetReceivedList;
|
|
|
procedure N3Click(Sender: TObject);
|
|
|
procedure act1Execute(Sender: TObject);
|
|
|
procedure act2Execute(Sender: TObject);
|
|
|
procedure DBEdit1Change(Sender: TObject);
|
|
|
procedure dxDBGrid1DblClick(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 dxDBGrid1Column1CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
procedure dxDBGrid1Column2CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
procedure dxDBGrid1Column4CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
procedure dxDBGrid1Column5CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
procedure dxDBGrid1Column6CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
procedure dxDBGrid1Column7CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
procedure dxDBGrid1Column8CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
procedure cxDBMemo1DblClick(Sender: TObject);
|
|
|
procedure cxDBMemo2DblClick(Sender: TObject);
|
|
|
procedure cxDBMemo3DblClick(Sender: TObject);
|
|
|
procedure cxDBMemo4DblClick(Sender: TObject);
|
|
|
procedure cxDBMemo5DblClick(Sender: TObject);
|
|
|
procedure cxDBMemo6DblClick(Sender: TObject);
|
|
|
procedure cxButton8Click(Sender: TObject);
|
|
|
procedure cxButton9Click(Sender: TObject);
|
|
|
procedure cxButton10Click(Sender: TObject);
|
|
|
procedure cxButton11Click(Sender: TObject);
|
|
|
procedure cxButton6Click(Sender: TObject);
|
|
|
procedure cxButton1Click(Sender: TObject);
|
|
|
procedure cxDBTextEdit16DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit17DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit18DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit19DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit8DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit9DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit2DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit3DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit1DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit4DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit5DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit6DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit11DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit15DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit21DblClick(Sender: TObject);
|
|
|
procedure cxDBTextEdit20DblClick(Sender: TObject);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
private
|
|
|
mServiceSoap_Ds: DsWebServiceSoap;
|
|
|
mHttpRIO_ds: THTTPRIO;
|
|
|
hdgsSPXNO: string;
|
|
|
XML, OPTYPE, sysNOExistCtn: string;
|
|
|
OpSeaeCount: Integer;
|
|
|
Loaded: Boolean;
|
|
|
function REHH(str: string): string;
|
|
|
function formatAfrstr(str: string): string;
|
|
|
procedure getwebservice_ds;
|
|
|
procedure GETMSG(BSNO: string);
|
|
|
public
|
|
|
function GetXML: integer;
|
|
|
procedure Creatememtblctn;
|
|
|
procedure CreatememtblctnDiff;
|
|
|
procedure setdiffcolor;
|
|
|
procedure GetCtnConfirm(BSNO: string);
|
|
|
procedure update_ctn(table: Tadoquery); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
procedure update_Seae(table: Tadoquery); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
function GetSIData: boolean;
|
|
|
procedure Deleteopctn(BSNO: string);
|
|
|
procedure Insertopctn(BSNO: string;kbmMemTable:TkbmMemTable);
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_crm_OnLineBooking: Tfrm_crm_OnLineBooking;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses
|
|
|
u_op_seae, u_data_share, U_SelectLinkMan, u_sys_progress, u_main, u_op_letter,
|
|
|
u_op_seae_assistant, u_tree_main, U_MSG, u_op_seae_diffctn, u_op_seae_difftd,
|
|
|
crm_spxcompany;
|
|
|
|
|
|
|
|
|
//using
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
_s, url, username, CancelReason: string;
|
|
|
aa: DsWebServiceSoap;
|
|
|
begin
|
|
|
|
|
|
//username:=frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
|
|
|
|
if MessageDlg('<27>˲<EFBFBD>/<2F>ܾ<EFBFBD><DCBE><EFBFBD><EFBFBD>ܴ<EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', mtWarning, [mbyes, mbno], 0) = mryes then
|
|
|
begin
|
|
|
|
|
|
if InputQueryMEMO('<27>˲<EFBFBD>/ҵ<><D2B5><EFBFBD>ܾ<EFBFBD>', '<27>˲<EFBFBD>/<2F>ܾ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:', CancelReason) then
|
|
|
begin
|
|
|
//BSNO:= MT1.fieldbyname('BSNO').AsString;
|
|
|
//DoSaveBook;
|
|
|
//DoPending(BSNO,formatAfrstr(PendingReason));
|
|
|
end;
|
|
|
getwebservice_ds;
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Head> ';
|
|
|
_s := _s + ' <OPID>' + frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</OPID> ';
|
|
|
|
|
|
if MT1.fieldbyname('BSTYPE').asstring = '<27>ᵥȷ<E1B5A5><C8B7>' then
|
|
|
_s := _s + ' <OPTYPE>9</OPTYPE> '
|
|
|
else
|
|
|
_s := _s + ' <OPTYPE>7</OPTYPE> ';
|
|
|
_s := _s + ' <OPTIME></OPTIME> ';
|
|
|
_s := _s + ' <Version>1.0</Version> ';
|
|
|
_s := _s + ' </Head><OpseaeList> ';
|
|
|
_s := _s + ' <Opseae> ';
|
|
|
_s := _s + ' <BSNO>' + MT1.fieldbyname('BSNO').asstring + '</BSNO> ';
|
|
|
_s := _s + ' <PendingReason>' + CancelReason + '</PendingReason> ';
|
|
|
_s := _s + ' </Opseae></OpseaeList> ';
|
|
|
_s := _s + '</BookingCargoSpace> ';
|
|
|
XML := mServiceSoap_Ds.SetBookingCargoSpaceAudit(_s);
|
|
|
//aa.SetBookingCargoSpaceAudit(_s);
|
|
|
if (pos('<27>ɹ<EFBFBD>', XML) > 0) then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD>سɹ<D8B3>');
|
|
|
MT1.Delete;
|
|
|
//MT1.Post;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>');
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
function Tfrm_crm_OnLineBooking.GetXML: integer;
|
|
|
var
|
|
|
_s, url, block: string;
|
|
|
aa: DsWebServiceSoap;
|
|
|
p1, p2: integer;
|
|
|
begin
|
|
|
|
|
|
try
|
|
|
|
|
|
frm_data_share.t_load_employee.open;
|
|
|
qryGetCompany.close;
|
|
|
qryGetCompany.Parameters.ParamByName('<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>').Value := frm_data_share.t_load_employee.fieldbyname('<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
qryGetCompany.open;
|
|
|
url := get_WebseviceURL;
|
|
|
aa := GetDsWebServiceSoap(false, get_WebseviceURL); //'http://192.168.1.105:5427/webservice/DsWebService.asmx');
|
|
|
//<2F><><EFBFBD>Ȼ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Head> ';
|
|
|
_s := _s + ' <OPID>' + frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</OPID> ';
|
|
|
_s := _s + ' <COMPANYID>' + qryGetCompany.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</COMPANYID> ';
|
|
|
_s := _s + ' <OPTYPE>' + OPTYPE + '</OPTYPE> ';
|
|
|
_s := _s + ' <OPTIME></OPTIME> ';
|
|
|
_s := _s + ' <Version>1.0</Version> ';
|
|
|
_s := _s + ' </Head> ';
|
|
|
_s := _s + '</BookingCargoSpace> ';
|
|
|
|
|
|
//ShowMessage(_s);
|
|
|
XML := aa.ReceiveBookingCargoSpace(_s);
|
|
|
XML := StringReplace(XML, '#$A', '', [rfReplaceAll]);
|
|
|
p1 := frm_data_share.GettimePotion(1, '<OpseaeList>', XML);
|
|
|
p2 := frm_data_share.GettimePotion(1, '</OpseaeList>', xml);
|
|
|
XML := copy(XML, p1, p2 - p1);
|
|
|
//ShowMessage(XML);
|
|
|
Opseaecount := frm_data_share.countString('Opseae', xml);
|
|
|
result := Opseaecount;
|
|
|
finally
|
|
|
if (XML = '') then
|
|
|
begin
|
|
|
result := 0;
|
|
|
//showmessage('û<><C3BB><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
//if assigned(MT1) then MT1.first;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.FormShow(Sender: TObject);
|
|
|
var
|
|
|
_ts: widestring;
|
|
|
_s, Opseae, ctn, block, ctnblock, mes: string;
|
|
|
ctncount, p1, p2, p3, p4, _i: integer;
|
|
|
begin
|
|
|
//1.<2E><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6>ٸ<EFBFBD>opseae<61><65>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD>ݴ˷ֿ<CBB7>
|
|
|
try
|
|
|
if not ASSIGNED(frm_sys_progress) then
|
|
|
frm_sys_progress := tfrm_sys_progress.Create(application);
|
|
|
frm_sys_progress.bsSkinGauge1.ProgressText := '<27><><EFBFBD>ڻ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<C8BA><F2A1A3A1><EFBFBD>';
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue := OpSeaeCount;
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue := 0;
|
|
|
|
|
|
frm_sys_progress.Show;
|
|
|
|
|
|
Loaded := False;
|
|
|
|
|
|
Creatememtblctn;
|
|
|
dxDBGrid1.DataSource := memtblwebCtn1;
|
|
|
MT1.close;
|
|
|
if (OpSeaeCount = 0) then
|
|
|
begin
|
|
|
ShowMessage('û<>д<EFBFBD><D0B4><EFBFBD><EFBFBD>յĶ<D5B5><C4B6><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<ͬ<><CDAC>shippingbox<6F><78>Ϣ>');
|
|
|
close;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
MT1.Open;
|
|
|
MT1.Edit;
|
|
|
MT1.DisableControls;
|
|
|
for _i := 1 to OpSeaeCount do
|
|
|
begin
|
|
|
frm_sys_progress.bsSkinGauge1.Value := _i;
|
|
|
p1 := frm_data_share.GettimePotion(_i, '<Opseae>', xml);
|
|
|
p2 := frm_data_share.GettimePotion(_i, '</Opseae>', xml);
|
|
|
block := Copy(xml, p1, p2 - p1);
|
|
|
|
|
|
ctncount := frm_data_share.countString('CTNINFO', block);
|
|
|
if (ctncount > 0) then
|
|
|
begin
|
|
|
|
|
|
p3 := frm_data_share.GettimePotion(1, '<CTNINFO>', block); //<2F><>һ<EFBFBD><D2BB>
|
|
|
p4 := frm_data_share.GettimePotion(ctncount, '</CTNINFO>', block) + 10; //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
ctnblock := Copy(block, p3, p4 - p3);
|
|
|
|
|
|
//<2F>Ѽ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣȥ<CFA2><C8A5>
|
|
|
//p2:=frm_data_share.GettimePotion(_i,'<CTNINFO>',xml);
|
|
|
block := Copy(xml, p1, (p2 - p1) - (p4 - p3));
|
|
|
end;
|
|
|
|
|
|
if (frm_data_share.GetXMLValue('BSTYPE', block) = '<27>ᵥȷ<E1B5A5><C8B7>') then
|
|
|
begin
|
|
|
|
|
|
MT1.Insert;
|
|
|
|
|
|
MT1['INDEX_ID'] := _i;
|
|
|
MT1['BSTYPE'] := frm_data_share.GetXMLValue('BSTYPE', block);
|
|
|
MT1['BSNO'] := frm_data_share.GetXMLValue('BSNO', block);
|
|
|
MT1['SENDERCOMPANY'] := frm_data_share.GetXMLValue('SENDERCOMPANY', block);
|
|
|
MT1['SENDERNAME'] := frm_data_share.GetXMLValue('SENDERNAME', block);
|
|
|
MT1['CNTR'] := frm_data_share.GetXMLValue('CNTR', block);
|
|
|
MT1['ETD'] := frm_data_share.GetXMLValue('ETD', block);
|
|
|
MT1['MBLNO'] := frm_data_share.GetXMLValue('MBLNO', block);
|
|
|
MT1['BOOKINGTYPE'] := frm_data_share.GetXMLValue('BOOKINGTYPE', block);
|
|
|
|
|
|
MT1.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString := frm_data_share.GetXMLValue('MBLNO', block);
|
|
|
MT1.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').value := REHH(UnformatAfrstr(frm_data_share.GetXMLValue('SHIPPER', block)));
|
|
|
MT1.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').value := REHH(UnformatAfrstr(frm_data_share.GetXMLValue('CONSIGNEE', block)));
|
|
|
MT1.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').value := REHH(UnformatAfrstr(frm_data_share.GetXMLValue('NOTIFYPARTY', block)));
|
|
|
MT1.FieldByName('<27><>ͷ').value := REHH(UnformatAfrstr(frm_data_share.GetXMLValue('MARKS', block))); //
|
|
|
MT1.FieldByName('<27><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD>˵<EFBFBD><CBB5>').value := REHH(UnformatAfrstr(frm_data_share.GetXMLValue('BOOKINGDESCRIPTION', block)));
|
|
|
MT1.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value := REHH(frm_data_share.GetXMLValue('DESCRIPTION', block));
|
|
|
MT1.FieldByName('<27><><EFBFBD><EFBFBD>').value := frm_data_share.GetXMLValue('VESSEL', block);
|
|
|
MT1.FieldByName('<27><><EFBFBD><EFBFBD>').value := frm_data_share.GetXMLValue('VOYNO', block);
|
|
|
MT1.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').value := frm_data_share.GetXMLValue('BLFRT', block);
|
|
|
MT1.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').value := frm_data_share.GetXMLValue('PORTLOAD', block);
|
|
|
MT1.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').value := frm_data_share.GetXMLValue('PORTDISCHARGE', block);
|
|
|
MT1.FieldByName('Ŀ<>ĵ<EFBFBD>').value := frm_data_share.GetXMLValue('DESTINATION', block);
|
|
|
MT1.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value := frm_data_share.GetXMLValue('SERVICE', block); //SERVIC
|
|
|
MT1.FieldByName('<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>').value := frm_data_share.GetXMLValue('CONTRACTNO', block); //CONTRACTNO
|
|
|
MT1.FieldByName('<27><><EFBFBD>䷽ʽ').value := frm_data_share.GetXMLValue('HSCODE', block); ///
|
|
|
if frm_data_share.GetXMLValue('PKGS', block) <> '' then
|
|
|
MT1.FieldByName('<27><><EFBFBD><EFBFBD>').value := StrToInt(frm_data_share.GetXMLValue('PKGS', block));
|
|
|
MT1.FieldByName('<27><>װ').value := frm_data_share.GetXMLValue('KINDPKGS', block);
|
|
|
if frm_data_share.GetXMLValue('KGS', block) <> '' then
|
|
|
MT1.FieldByName('<27><><EFBFBD><EFBFBD>').value := StrToFloat(frm_data_share.GetXMLValue('KGS', block));
|
|
|
if frm_data_share.GetXMLValue('CBM', block) <> '' then
|
|
|
MT1.FieldByName('<27><><EFBFBD><EFBFBD>').value := StrToFloat(frm_data_share.GetXMLValue('CBM', block));
|
|
|
MT1.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д').value := frm_data_share.GetXMLValue('TOTALNO', block);
|
|
|
MT1.FieldByName('<27><>װ<EFBFBD><D7B0>').value := frm_data_share.GetXMLValue('CNTR', block);
|
|
|
MT1.FieldByName('TIMEMARK').value := frm_data_share.GetXMLValue('TIMEMARK', block);
|
|
|
MT1.FieldByName('ctnInfo').value := ctnblock;
|
|
|
MT1.Post;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
|
|
|
MT1.Insert;
|
|
|
MT1['INDEX_ID'] := _i;
|
|
|
MT1.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString := frm_data_share.GetXMLValue('MBLNO', block);
|
|
|
MT1['BSSTATUS'] := frm_data_share.GetXMLValue('BSSTATUS', block);
|
|
|
MT1['BSNO'] := frm_data_share.GetXMLValue('BSNO', block);
|
|
|
MT1['BSDATE'] := frm_data_share.GetXMLValue('BSDATE', block);
|
|
|
MT1['MBLNO'] := frm_data_share.GetXMLValue('MBLNO', block);
|
|
|
MT1['CUSTNO'] := frm_data_share.GetXMLValue('CUSTNO', block);
|
|
|
MT1['SHIPPER'] := REHH(UnformatAfrstr(frm_data_share.GetXMLValue('SHIPPER', block)));
|
|
|
MT1['SHIPPERID'] := frm_data_share.GetXMLValue('SHIPPERID', block);
|
|
|
MT1['ETD'] := frm_data_share.GetXMLValue('ETD', block);
|
|
|
MT1['CLOSINGDATE'] := frm_data_share.GetXMLValue('CLOSINGDATE', block);
|
|
|
MT1['PORTLOADID'] := frm_data_share.GetXMLValue('PORTLOADID', block);
|
|
|
MT1['PORTDISCHARGEID'] := frm_data_share.GetXMLValue('PORTDISCHARGEID', block);
|
|
|
MT1['DESTINATIONID'] := frm_data_share.GetXMLValue('DESTINATIONID', block);
|
|
|
MT1['PORTLOAD'] := frm_data_share.GetXMLValue('PORTLOAD', block);
|
|
|
MT1['PORTDISCHARGE'] := frm_data_share.GetXMLValue('PORTDISCHARGE', block);
|
|
|
MT1['DESTINATION'] := frm_data_share.GetXMLValue('DESTINATION', block);
|
|
|
MT1['INPUTBY'] := frm_data_share.GetXMLValue('INPUTBY', block);
|
|
|
MT1['AUDITOR'] := frm_data_share.GetXMLValue('AUDITOR', block);
|
|
|
MT1['FORWARDER'] := frm_data_share.GetXMLValue('FORWARDER', block);
|
|
|
MT1['CARRIER'] := frm_data_share.GetXMLValue('CARRIER', block);
|
|
|
MT1['CNTR'] := frm_data_share.GetXMLValue('CNTR', block);
|
|
|
//showmessage(frm_data_share.GetXMLValue('CNTR',block));
|
|
|
MT1['TIMEMARK'] := frm_data_share.GetXMLValue('TIMEMARK', block);
|
|
|
MT1['CTNINFO'] := ctnblock;
|
|
|
MT1['VESSEL'] := frm_data_share.GetXMLValue('VESSEL', block);
|
|
|
MT1['VOYNO'] := frm_data_share.GetXMLValue('VOYNO', block);
|
|
|
MT1['ISSUEPLACE'] := frm_data_share.GetXMLValue('ISSUEPLACE', block);
|
|
|
MT1['BOOKINGTYPE'] := frm_data_share.GetXMLValue('BOOKINGTYPE', block);
|
|
|
//MT1['OLDBSNO']:=frm_data_share.GetXMLValue('OLDBSNO',block);
|
|
|
MT1['CONSIGNEE'] := REHH(UnformatAfrstr(frm_data_share.GetXMLValue('CONSIGNEE', block)));
|
|
|
MT1['NOTIFYPARTY'] := REHH(UnformatAfrstr(frm_data_share.GetXMLValue('NOTIFYPARTY', block)));
|
|
|
MT1['DESCRIPTION'] := REHH(frm_data_share.GetXMLValue('DESCRIPTION', block));
|
|
|
MT1['NOPKGS'] := REHH(frm_data_share.GetXMLValue('NOPKGS', block));
|
|
|
MT1['PKGS'] := frm_data_share.GetXMLValue('PKGS', block);
|
|
|
MT1['KINDPKGS'] := frm_data_share.GetXMLValue('KINDPKGS', block);
|
|
|
//showmessage(frm_data_share.GetXMLValue('KINDPKGS',block));
|
|
|
MT1['GROSSWEIGHT'] := REHH(frm_data_share.GetXMLValue('GROSSWEIGHT', block));
|
|
|
MT1['KGS'] := frm_data_share.GetXMLValue('KGS', block);
|
|
|
MT1['MEASUREMENT'] := REHH(frm_data_share.GetXMLValue('MEASUREMENT', block));
|
|
|
MT1['CBM'] := frm_data_share.GetXMLValue('CBM', block);
|
|
|
MT1['BOOKINGDESCRIPTION'] := REHH(frm_data_share.GetXMLValue('BOOKINGDESCRIPTION', block));
|
|
|
MT1['PLACEDELIVERY'] := frm_data_share.GetXMLValue('PLACEDELIVERY', block);
|
|
|
MT1['PLACEDELIVERYID'] := frm_data_share.GetXMLValue('PLACEDELIVERYID', block);
|
|
|
MT1['SERVICE'] := frm_data_share.GetXMLValue('SERVICE', block);
|
|
|
MT1['BLFRT'] := frm_data_share.GetXMLValue('BLFRT', block);
|
|
|
MT1['MARKS'] := REHH(frm_data_share.GetXMLValue('MARKS', block));
|
|
|
MT1['TOTALNO'] := frm_data_share.GetXMLValue('TOTALNO', block);
|
|
|
MT1['SENDERNAME'] := frm_data_share.GetXMLValue('SENDERNAME', block);
|
|
|
MT1['SENDERCOMPANY'] := frm_data_share.GetXMLValue('SENDERCOMPANY', block);
|
|
|
MT1['SENDERCOMPANYID'] := frm_data_share.GetXMLValue('SENDERCOMPANYID', block);
|
|
|
MT1['CARGOID'] := frm_data_share.GetXMLValue('CARGOID', block);
|
|
|
MT1['SenderMobile'] := frm_data_share.GetXMLValue('SenderMobile', block);
|
|
|
MT1['SenderEmail'] := frm_data_share.GetXMLValue('SenderEmail', block);
|
|
|
MT1['PAYABLEAT'] := frm_data_share.GetXMLValue('PAYABLEAT', block);
|
|
|
MT1['CONTRACTNO'] := frm_data_share.GetXMLValue('CONTRACTNO', block);
|
|
|
MT1['PendingReason'] := REHH(frm_data_share.GetXMLValue('PendingReason', block));
|
|
|
|
|
|
MT1['CLOSEDOCDATE'] := frm_data_share.GetXMLValue('CLOSEDOCDATE', block);
|
|
|
MT1['BSTYPE'] := frm_data_share.GetXMLValue('BSTYPE', block);
|
|
|
MT1['YARD'] := frm_data_share.GetXMLValue('YARD', block);
|
|
|
MT1['YARDAddress'] := frm_data_share.GetXMLValue('YARDAddress', block);
|
|
|
MT1['YARDLinkman'] := frm_data_share.GetXMLValue('YARDLinkman', block);
|
|
|
MT1['YARDTel'] := frm_data_share.GetXMLValue('YARDTel', block);
|
|
|
MT1['YARDFAX'] := frm_data_share.GetXMLValue('YARDFAX', block);
|
|
|
MT1['YARDREMARK'] := REHH(frm_data_share.GetXMLValue('YARDRemark', block));
|
|
|
|
|
|
MT1['GID'] := frm_data_share.GetXMLValue('GID', block);
|
|
|
MT1['RECDate'] := REHH(frm_data_share.GetXMLValue('RECDate', block));
|
|
|
MT1.Post;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
MT1.EnableControls;
|
|
|
|
|
|
MT1.first;
|
|
|
loaded := true;
|
|
|
if (MT1.FieldByName('BSTYPE').AsString = '<27><>ͨ<EFBFBD><CDA8>Ϣ') then
|
|
|
begin
|
|
|
GETMSG(MT1.fieldbyname('BSNO').AsString);
|
|
|
end;
|
|
|
setdiffcolor;
|
|
|
GetCtnConfirm(mt1.FieldByName('bsno').AsString);
|
|
|
finally
|
|
|
frm_sys_progress.Close;
|
|
|
frm_sys_progress.Free;
|
|
|
frm_sys_progress := nil;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.SaveBooking;
|
|
|
var
|
|
|
mes: string;
|
|
|
begin
|
|
|
if MT1.FieldByName('BSTYPE').AsString = '<27><><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
if (MT1.FieldByName('BOOKINGTYPE').AsString = '<27><><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD>') or (MT1.FieldByName('BOOKINGTYPE').AsString = '<27><><EFBFBD><EFBFBD>') then
|
|
|
mes := '<27>˲<EFBFBD>'
|
|
|
else
|
|
|
mes := '<27><><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
if MessageDlg('<27><><EFBFBD>ܴ<EFBFBD>Ʊ' + mes + '<27><><EFBFBD><EFBFBD>', mtWarning, [mbyes, mbno], 0) = mryes then
|
|
|
begin
|
|
|
DoSaveBook;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.DoSaveBook;
|
|
|
var
|
|
|
_s, _t, _id, _no, block, xml, onlinetimemark, onlinePosted, mttimemark, url, kjqj, wtdw, ETD, CLOSINGDATE, CTN, stl: string; //<2F><><EFBFBD><EFBFBD>
|
|
|
aa: DsWebServiceSoap;
|
|
|
p1, p2, _c, _i: Integer;
|
|
|
username, marks, WTBH, HBLNO, code_trade, code_source, bstype, BSNO: string;
|
|
|
_Time: Tdatetime;
|
|
|
begin
|
|
|
//1 <20><>ѯ<EFBFBD><D1AF><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD>˾ <20>Ƿ<EFBFBD><C7B7>ڱ<EFBFBD>ϵͳ<CFB5>ڴ<EFBFBD><DAB4>ڡ<EFBFBD><DAA1>粻<EFBFBD><E7B2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F2B1A8BE><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>¼<EFBFBD><C2BC><EFBFBD>
|
|
|
username := frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
Qrysearch.Close;
|
|
|
Qrysearch.SQL.Text := 'select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client where <20><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>=''' + MT1.fieldbyname('SENDERCOMPANYID').AsString + '''';
|
|
|
Qrysearch.Open;
|
|
|
if (Qrysearch.RecordCount = 0) then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3>û<EFBFBD>С<EFBFBD>' + MT1.fieldbyname('SENDERCOMPANY').AsString + '<27><>,<2C><><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD>ع<EFBFBD><D8B9><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD>˹<EFBFBD>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>');
|
|
|
exit;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
wtdw := Qrysearch.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
end;
|
|
|
|
|
|
//2 <20><>ѯ<EFBFBD><D1AF>bsno<6E><6F>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ǩ<EFBFBD>Ƿ<EFBFBD>
|
|
|
BSNO := MT1.fieldbyname('BSNO').AsString;
|
|
|
url := get_WebseviceURL;
|
|
|
aa := GetDsWebServiceSoap(false, url);
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?> ';
|
|
|
_s := _s + '<BookingInfo xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Booking> ';
|
|
|
_s := _s + ' <BSNO>' + BSNO + '</BSNO> ';
|
|
|
_s := _s + ' </Booking> ';
|
|
|
_s := _s + '</BookingInfo> ';
|
|
|
xml := aa.GetBsnoInfo(_s);
|
|
|
p1 := frm_data_share.GettimePotion(1, '<Booking>', xml);
|
|
|
p2 := frm_data_share.GettimePotion(1, '</Booking>', xml);
|
|
|
block := Copy(xml, p1, p2 - p1);
|
|
|
onlinetimemark := frm_data_share.GetXMLValue('TimeMark', block);
|
|
|
onlinePosted := frm_data_share.GetXMLValue('ISPOSTED', block);
|
|
|
|
|
|
mttimemark := MT1.fieldbyname('TIMEMARK').AsString;
|
|
|
if (onlinetimemark <> mttimemark) then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>Ϣ<EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>£<EFBFBD><C2A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD>ѯ<EFBFBD><D1AF>');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
|
|
|
if (MT1.fieldbyname('CLOSINGDATE').asstring = '') then
|
|
|
begin
|
|
|
CLOSINGDATE := 'null';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
CLOSINGDATE := StringReplace('''' + MT1.fieldbyname('CLOSINGDATE').asstring + '''', '/', '-', [rfReplaceAll]);
|
|
|
end;
|
|
|
//StringReplace (str, '\\\\', #13#10, [rfReplaceAll]);
|
|
|
if (MT1.fieldbyname('ETD').asstring = '') then
|
|
|
begin
|
|
|
ETD := 'null';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
ETD := StringReplace('''' + MT1.fieldbyname('ETD').asstring + '''', '/', '-', [rfReplaceAll]);
|
|
|
end;
|
|
|
|
|
|
//ShowMessage(ETD+' ### '+CLOSINGDATE);
|
|
|
|
|
|
if (MT1.fieldbyname('BSSTATUS').asstring = 'CI20150711000004') then //0 <20><><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
//if optype='1'
|
|
|
Qrysearch.Close;
|
|
|
Qrysearch.SQL.Text := 'select * from t_op_seae where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=''' + BSNO + '''';
|
|
|
Qrysearch.Open;
|
|
|
|
|
|
if (Qrysearch.RecordCount = 0) then //0 <20><><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
_time := StrToDate(MT1.fieldbyname('ETD').asstring);
|
|
|
if strtobool(get_parameters_value(185, 'false')) then
|
|
|
with frm_op_seae do
|
|
|
begin
|
|
|
if frm_data_share.t_sys_noset.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 'ί<>б<EFBFBD><D0B1><EFBFBD>', []) then
|
|
|
begin
|
|
|
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring) = '<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then
|
|
|
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring) = '<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
|
|
|
WTBH := getwtno(1, subComp, department, employee, NOW)
|
|
|
else
|
|
|
WTBH := getwtno(1, subComp, department, employee, _time);
|
|
|
end;
|
|
|
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if (trim(frm_op_seae.t_op_seae.fieldbyname('װ<>˷<EFBFBD>ʽ').asstring) = '<27><><EFBFBD><EFBFBD>') then
|
|
|
begin
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring) = '<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then
|
|
|
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring) = '<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
|
|
|
WTBH := getwtno(1, subComp, department, employee, NOW)
|
|
|
else
|
|
|
WTBH := getwtno(1, subComp, department, employee, _time);
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if frm_data_share.t_sys_noset_hblno.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>', []) then
|
|
|
with frm_op_seae do
|
|
|
begin
|
|
|
if frm_data_share.t_code_free.Locate('<27><><EFBFBD>ѷ<EFBFBD>ʽ', trim(MT1.fieldbyname('BLFRT').asstring), []) then
|
|
|
begin
|
|
|
stl := frm_data_share.t_code_free.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asstring;
|
|
|
end;
|
|
|
if Trim(frm_data_share.t_sys_noset_hblno.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring) = '<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(311, 'false')) then
|
|
|
begin
|
|
|
code_trade := ''; //t_op_seae.fieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
code_source := ''; //t_op_seae.fieldByName('ҵ<><D2B5><EFBFBD><EFBFBD>Դ').AsString;
|
|
|
bstype := ''; //frm_op_seae.t_op_seae.fieldByName('װ<>˷<EFBFBD>ʽ').AsString;
|
|
|
if Trim(frm_data_share.t_sys_noset_hblno.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring) = '<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
|
|
|
HBLNO := gethblno_custom(1, subComp, department, employee, code_trade, code_source, bstype, NOW)
|
|
|
else
|
|
|
HBLNO := gethblno_custom(1, subComp, department, employee, code_trade, code_source, bstype, _time);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if Trim(frm_data_share.t_sys_noset_hblno.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring) = '<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
|
|
|
HBLNO := gethblno(1, subComp, department, employee, stl, NOW)
|
|
|
else
|
|
|
HBLNO := gethblno(1, subComp, department, employee, stl, _time);
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
with Qryinsert do
|
|
|
begin
|
|
|
Close; //function WeekofYear(Date: TDate): integer; //ȡ<>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ڵ<EFBFBD><DAB5>ܴ<EFBFBD>
|
|
|
_id := get_id;
|
|
|
_no := get_no(Date, 'SE');
|
|
|
|
|
|
sql.clear;
|
|
|
|
|
|
SQL.Add('Insert into t_op_seae (ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,<2C><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,ί<>б<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>, ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>, ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>,װ<><D7B0><EFBFBD><EFBFBD>,ж<><D0B6><EFBFBD><EFBFBD>,Ŀ<>ĵ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, <20><><EFBFBD><EFBFBD>˾ '); //, װ<><D7B0><EFBFBD><EFBFBD>, ж<><D0B6><EFBFBD><EFBFBD>,Ŀ<>ĵ<EFBFBD>
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ر<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ҵ<><D2B5>״̬,<2C><><EFBFBD><EFBFBD>״̬,<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,¼<><C2BC><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>Ա,<2C><>װ<EFBFBD><D7B0>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,ǩ<><C7A9><EFBFBD>ص<EFBFBD>,װ<>˷<EFBFBD>ʽ ');
|
|
|
SQL.Add(' ,<2C>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>,֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ,<2C><><EFBFBD><EFBFBD>,<2C><>װ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD>˵<EFBFBD><CBB5>,<2C><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ѷ<EFBFBD>ʽ,<2C><>ͷ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д,ί<>е<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ,ί<>б<EFBFBD><D0B1><EFBFBD>,<2C><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,<2C><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>,<2C>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>,<2C><>ע)');
|
|
|
SQL.Add('values (:ywlx,:idz,:ZTB,:FTB,:WTB,:id,:BSNO,:BSDATE,:MBLNO,:CUSTNO,:SHIPPERID,:SHIPPER,' + ETD + ',' + CLOSINGDATE + ',:PORTLOAD,:PORTDISCHARGE,:DESTINATION,:FORWARDER,:CARRIER '); //,:PORTLOAD,:PORTDISCHARGE,:DESTINATION
|
|
|
SQL.Add(' ,:hxbz,:bgbz,:bjbz,:ywzt,:fyzt,:kjqj,''' + username + ''',''' + username + ''',:CNTR,:VESSEL,:VOYNO,:ISSUEPLACE,:zyfs');
|
|
|
SQL.Add(' ,:CONSIGNEE,:NOTIFYPARTY,:DESCRIPTION,:NOPKGS,:PKGS,:KINDPKGS,:GROSSWEIGHT,:KGS,:MEASUREMENT,:CBM,:BOOKINGDESCRIPTION,:PLACEDELIVERY,:PLACEDELIVERYID,:SERVICE,:BLFRT,:MARKS,:TOTALNO,:wtdw,:CARGOID,:WTBH,:HBLNO,:PAYABLEAT,:CONTRACTNO,:Remark)');
|
|
|
Parameters.ParamByName('BSNO').Value := BSNO;
|
|
|
Parameters.ParamByName('id').Value := _id;
|
|
|
Parameters.ParamByName('ZTB').Value := _no;
|
|
|
Parameters.ParamByName('FTB').Value := _no;
|
|
|
Parameters.ParamByName('WTB').Value := _id;
|
|
|
Parameters.ParamByName('idz').Value := _id;
|
|
|
Parameters.ParamByName('BSDATE').Value := MT1.fieldbyname('BSDATE').asstring;
|
|
|
Parameters.ParamByName('MBLNO').Value := MT1.fieldbyname('MBLNO').asstring;
|
|
|
Parameters.ParamByName('CUSTNO').Value := _no; //
|
|
|
Parameters.ParamByName('SHIPPER').Value := MT1.fieldbyname('SHIPPER').asstring;
|
|
|
Parameters.ParamByName('SHIPPERID').Value := ''; //MT1.fieldbyname('SHIPPERID').asstring;
|
|
|
//Parameters.ParamByName('ETD').Value:=MT1.fieldbyname('ETD').asstring;
|
|
|
//Parameters.ParamByName('ETA').Value:=MT1.fieldbyname('ETA').asstring;
|
|
|
Parameters.ParamByName('PORTLOAD').Value := MT1.fieldbyname('PORTLOAD').asstring;
|
|
|
//Parameters.ParamByName('PORTLOADID').Value:=MT1.fieldbyname('PORTLOADID').asstring;
|
|
|
Parameters.ParamByName('PORTDISCHARGE').Value := MT1.fieldbyname('PORTDISCHARGE').asstring;
|
|
|
//Parameters.ParamByName('PORTDISCHARGEID').Value:=MT1.fieldbyname('PORTDISCHARGEID').asstring;
|
|
|
Parameters.ParamByName('DESTINATION').Value := MT1.fieldbyname('DESTINATION').asstring;
|
|
|
//Parameters.ParamByName('DESTINATIONID').Value:=MT1.fieldbyname('DESTINATIONID').asstring;
|
|
|
//Parameters.ParamByName('INPUTBY').Value:=MT1.fieldbyname('INPUTBY').asstring;
|
|
|
Parameters.ParamByName('FORWARDER').Value := MT1.fieldbyname('FORWARDER').asstring;
|
|
|
Parameters.ParamByName('CARRIER').Value := MT1.fieldbyname('CARRIER').asstring;
|
|
|
Parameters.ParamByName('hxbz').Value := _id;
|
|
|
Parameters.ParamByName('bgbz').Value := _id;
|
|
|
Parameters.ParamByName('bjbz').Value := _id;
|
|
|
Parameters.ParamByName('ywzt').Value := '<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
|
|
|
Parameters.ParamByName('fyzt').Value := '¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
Parameters.ParamByName('ywlx').Value := '<27><>ͨ<EFBFBD><CDA8>';
|
|
|
Parameters.ParamByName('kjqj').Value := MT1.fieldbyname('BSDATE').asstring;
|
|
|
Parameters.ParamByName('CNTR').Value := MT1.fieldbyname('CNTR').asstring;
|
|
|
Parameters.ParamByName('VESSEL').Value := MT1.fieldbyname('VESSEL').asstring;
|
|
|
Parameters.ParamByName('VOYNO').Value := MT1.fieldbyname('VOYNO').asstring;
|
|
|
Parameters.ParamByName('ISSUEPLACE').Value := MT1.fieldbyname('ISSUEPLACE').asstring;
|
|
|
Parameters.ParamByName('zyfs').Value := '<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
|
Parameters.ParamByName('CONSIGNEE').Value := MT1.fieldbyname('CONSIGNEE').asstring;
|
|
|
Parameters.ParamByName('NOTIFYPARTY').Value := MT1.fieldbyname('NOTIFYPARTY').asstring;
|
|
|
Parameters.ParamByName('DESCRIPTION').Value := MT1.fieldbyname('DESCRIPTION').asstring;
|
|
|
Parameters.ParamByName('NOPKGS').Value := MT1.fieldbyname('NOPKGS').asstring;
|
|
|
Parameters.ParamByName('PKGS').Value := MT1.fieldbyname('PKGS').asstring;
|
|
|
Parameters.ParamByName('KINDPKGS').Value := MT1.fieldbyname('KINDPKGS').asstring;
|
|
|
Parameters.ParamByName('GROSSWEIGHT').Value := MT1.fieldbyname('GROSSWEIGHT').asstring;
|
|
|
Parameters.ParamByName('KGS').Value := MT1.fieldbyname('KGS').asstring;
|
|
|
Parameters.ParamByName('MEASUREMENT').Value := MT1.fieldbyname('MEASUREMENT').asstring;
|
|
|
Parameters.ParamByName('CBM').Value := MT1.fieldbyname('CBM').asstring;
|
|
|
Parameters.ParamByName('BOOKINGDESCRIPTION').Value := MT1.fieldbyname('BOOKINGDESCRIPTION').asstring;
|
|
|
Parameters.ParamByName('PLACEDELIVERY').Value := MT1.fieldbyname('PLACEDELIVERY').asstring;
|
|
|
Parameters.ParamByName('PLACEDELIVERYID').Value := MT1.fieldbyname('PLACEDELIVERYID').asstring;
|
|
|
Parameters.ParamByName('SERVICE').Value := MT1.fieldbyname('SERVICE').asstring;
|
|
|
Parameters.ParamByName('BLFRT').Value := MT1.fieldbyname('BLFRT').asstring;
|
|
|
Parameters.ParamByName('MARKS').Value := MT1.fieldbyname('MARKS').asstring;
|
|
|
Parameters.ParamByName('TOTALNO').Value := MT1.fieldbyname('TOTALNO').asstring;
|
|
|
Parameters.ParamByName('CARGOID').Value := MT1.fieldbyname('CARGOID').asstring;
|
|
|
|
|
|
Parameters.ParamByName('wtdw').Value := wtdw;
|
|
|
Parameters.ParamByName('WTBH').Value := WTBH;
|
|
|
Parameters.ParamByName('HBLNO').Value := HBLNO;
|
|
|
Parameters.ParamByName('PAYABLEAT').Value := MT1.fieldbyname('PAYABLEAT').asstring;
|
|
|
Parameters.ParamByName('CONTRACTNO').Value := MT1.fieldbyname('CONTRACTNO').asstring;
|
|
|
Parameters.ParamByName('Remark').Value := MT1.fieldbyname('Remark').asstring;
|
|
|
ExecSQL;
|
|
|
|
|
|
end;
|
|
|
//showmessage(MT1.fieldbyname('Ctninfo').asstring);
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
_c := frm_data_share.countString('CTNINFO', MT1.fieldbyname('Ctninfo').asstring);
|
|
|
for _i := 1 to _c do
|
|
|
begin
|
|
|
with Qryinsert do
|
|
|
begin
|
|
|
p1 := frm_data_share.GettimePotion(_i, '<CTNINFO>', MT1.fieldbyname('Ctninfo').asstring);
|
|
|
p2 := frm_data_share.GettimePotion(_i, '</CTNINFO>', MT1.fieldbyname('Ctninfo').asstring);
|
|
|
block := Copy(MT1.fieldbyname('Ctninfo').asstring, p1, p2);
|
|
|
|
|
|
GetCtnCodeQry.close;
|
|
|
CTN := trim(frm_data_share.GetXMLValue('CTN', block));
|
|
|
if CTN = '' then
|
|
|
begin
|
|
|
showmessage('<27><>Ʊҵ<C6B1><D2B5><EFBFBD>ڵļ<DAB5>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣû<CFA2><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
GetCtnCodeQry.Parameters.ParamByName('CTN').value := CTN;
|
|
|
GetCtnCodeQry.Open;
|
|
|
|
|
|
sql.clear;
|
|
|
SQL.Add('Insert into t_op_ctn ( <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><>ע,<2C><>װ,<2C>ߴ<EFBFBD>,TEU,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ)');
|
|
|
SQL.Add('values ( :<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><>ע,:<3A><>װ,:<3A>ߴ<EFBFBD>,:TEU,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ)');
|
|
|
//Parameters.ParamByName('CTN_ID').Value:=frm_data_share.GetXMLValue('CTN_ID',block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := _id;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := GetCtnCodeQry.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := GetCtnCodeQry.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('CTNNUM', block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('CNTRNO', block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('SEALNO', block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('PKGS', block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('KGS', block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('CBM', block);
|
|
|
Parameters.ParamByName('<27><>ע').Value := frm_data_share.GetXMLValue('REMARK', block);
|
|
|
Parameters.ParamByName('<27><>װ').Value := frm_data_share.GetXMLValue('KINDPKGS', block);
|
|
|
Parameters.ParamByName('<27>ߴ<EFBFBD>').Value := GetCtnCodeQry.fieldbyname('<27>ߴ<EFBFBD>').AsString;
|
|
|
Parameters.ParamByName('TEU').Value := '0';
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').Value := GetCtnCodeQry.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
end;
|
|
|
showmessage('<27><><EFBFBD>ճɹ<D5B3>');
|
|
|
|
|
|
//<2F><>¼<EFBFBD><C2BC>־
|
|
|
qryGetOpseae.Close;
|
|
|
qryGetOpseae.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := _id;
|
|
|
qryGetOpseae.Open;
|
|
|
|
|
|
Booking_add(qryGetOpseae, _id, MT1.fieldbyname('SENDERNAME').asstring, MT1.fieldbyname('SENDERCOMPANY').asstring, BSNO, '<27><><EFBFBD>ն<EFBFBD><D5B6><EFBFBD>');
|
|
|
|
|
|
//<2F><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Head> ';
|
|
|
_s := _s + ' <OPID>' + frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</OPID> ';
|
|
|
_s := _s + ' <OPTYPE>2</OPTYPE> '; //1<><31><EFBFBD><EFBFBD> 2<><32><EFBFBD><EFBFBD>
|
|
|
_s := _s + ' <OPTIME>' + datetimetostr(Date) + '</OPTIME> ';
|
|
|
_s := _s + ' <Version>1.0</Version> ';
|
|
|
_s := _s + ' </Head> ';
|
|
|
_s := _s + '<OpseaeList> ';
|
|
|
_s := _s + ' <Opseae> ';
|
|
|
_s := _s + ' <BSNO>' + BSNO + '</BSNO> ';
|
|
|
_s := _s + ' </Opseae> ';
|
|
|
_s := _s + '</OpseaeList> ';
|
|
|
_s := _s + '</BookingCargoSpace> ';
|
|
|
showmessage(_s);
|
|
|
XML := aa.SetBookingCargoSpaceAudit(_s);
|
|
|
MT1.Delete;
|
|
|
//MT1.Post;
|
|
|
end
|
|
|
else if (Qrysearch.RecordCount > 0) then //1<><31><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
qryGetOpseae2.Close;
|
|
|
qryGetOpseae2.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>').Value := MT1.fieldbyname('BSNO').asstring;
|
|
|
qryGetOpseae2.Open;
|
|
|
|
|
|
with Qryinsert do
|
|
|
begin
|
|
|
Close; //function WeekofYear(Date: TDate): integer; //ȡ<>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ڵ<EFBFBD><DAB5>ܴ<EFBFBD>
|
|
|
_id := qryGetOpseae2.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
kjqj := inttostr(WeekofYear(Date));
|
|
|
sql.clear;
|
|
|
SQL.Add(' delete from t_op_ctn where <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_op_seae where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=''' + BSNO + ''') ');
|
|
|
SQL.Add(' update t_op_seae set ');
|
|
|
SQL.Add(' ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:BSDATE, <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>=:MBLNO, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:SHIPPERID,<2C><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>=:SHIPPER'); //ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:CUSTNO
|
|
|
SQL.Add(' , <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=' + ETD + ', <20>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>=' + CLOSINGDATE + ',װ<><D7B0><EFBFBD><EFBFBD>=:PORTLOAD'); //, װ<><D7B0><EFBFBD><EFBFBD>=:PORTLOAD , ж<><D0B6><EFBFBD><EFBFBD>=:PORTDISCHARGE
|
|
|
SQL.Add(' ,ж<><D0B6><EFBFBD><EFBFBD>=:PORTDISCHARGE,Ŀ<>ĵ<EFBFBD>=:DESTINATION, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾='''''); //,Ŀ<>ĵ<EFBFBD>=:DESTINATION
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD>˾=:CARRIER ,ҵ<><D2B5>״̬=''<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>'',<2C><><EFBFBD><EFBFBD>״̬=''¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'''); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:hxbz,<2C><><EFBFBD>ر<EFBFBD>=:bgbz,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:bjbz,
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>=:kjqj,¼<><C2BC><EFBFBD><EFBFBD>=''' + username + ''',<2C><><EFBFBD><EFBFBD>Ա=''' + username + ''',<2C><>װ<EFBFBD><D7B0>=:CNTR,<2C><><EFBFBD><EFBFBD>=:VESSEL,<2C><><EFBFBD><EFBFBD>=:VOYNO');
|
|
|
SQL.Add(' ,ǩ<><C7A9><EFBFBD>ص<EFBFBD>=:ISSUEPLACE,װ<>˷<EFBFBD>ʽ=''<27><><EFBFBD><EFBFBD>'',<2C>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>=:CONSIGNEE,֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>=:NOTIFYPARTY');
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:DESCRIPTION,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ=:NOPKGS,<2C><><EFBFBD><EFBFBD>=:PKGS,<2C><>װ=:KINDPKGS,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:GROSSWEIGHT');
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD>=:KGS,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:MEASUREMENT,<2C><><EFBFBD><EFBFBD>=:CBM,<2C><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD>˵<EFBFBD><CBB5>=:BOOKINGDESCRIPTION');
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>=:PLACEDELIVERY,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:PLACEDELIVERYID,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:SERVICE,<2C><><EFBFBD>ѷ<EFBFBD>ʽ=:BLFRT');
|
|
|
SQL.Add(' ,<2C><>ͷ=:MARKS,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д=:TOTALNO,ί<>е<EFBFBD>λ=:wtdw,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ=:CARGOID,<2C><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>=:PAYABLEAT,<2C>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>=:CONTRACTNO');
|
|
|
SQL.Add(' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=:BSNO');
|
|
|
Parameters.ParamByName('BSNO').Value := MT1.fieldbyname('BSNO').asstring;
|
|
|
Parameters.ParamByName('BSDATE').Value := MT1.fieldbyname('BSDATE').asstring;
|
|
|
Parameters.ParamByName('MBLNO').Value := MT1.fieldbyname('MBLNO').asstring;
|
|
|
Parameters.ParamByName('SHIPPER').Value := MT1.fieldbyname('SHIPPER').asstring;
|
|
|
Parameters.ParamByName('SHIPPERID').Value := ''; //MT1.fieldbyname('SHIPPERID').asstring;
|
|
|
Parameters.ParamByName('PORTLOAD').Value := MT1.fieldbyname('PORTLOAD').asstring;
|
|
|
//Parameters.ParamByName('PORTLOADID').Value:=MT1.fieldbyname('PORTLOADID').asstring;
|
|
|
Parameters.ParamByName('PORTDISCHARGE').Value := MT1.fieldbyname('PORTDISCHARGE').asstring;
|
|
|
//Parameters.ParamByName('PORTDISCHARGEID').Value:=MT1.fieldbyname('PORTDISCHARGEID').asstring;
|
|
|
Parameters.ParamByName('DESTINATION').Value := MT1.fieldbyname('DESTINATION').asstring;
|
|
|
//Parameters.ParamByName('DESTINATIONID').Value:=MT1.fieldbyname('DESTINATIONID').asstring;
|
|
|
Parameters.ParamByName('CARRIER').Value := MT1.fieldbyname('CARRIER').asstring;
|
|
|
Parameters.ParamByName('kjqj').Value := MT1.fieldbyname('BSDATE').asstring;
|
|
|
Parameters.ParamByName('CNTR').Value := MT1.fieldbyname('CNTR').asstring;
|
|
|
Parameters.ParamByName('VESSEL').Value := MT1.fieldbyname('VESSEL').asstring;
|
|
|
Parameters.ParamByName('VOYNO').Value := MT1.fieldbyname('VOYNO').asstring;
|
|
|
Parameters.ParamByName('ISSUEPLACE').Value := MT1.fieldbyname('ISSUEPLACE').asstring;
|
|
|
Parameters.ParamByName('CONSIGNEE').Value := MT1.fieldbyname('CONSIGNEE').asstring;
|
|
|
Parameters.ParamByName('NOTIFYPARTY').Value := MT1.fieldbyname('NOTIFYPARTY').asstring;
|
|
|
{ SQL.Add(' ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:DESCRIPTION,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ=:NOPKGS,<2C><><EFBFBD><EFBFBD>=:PKGS,<2C><>װ=:KINDPKGS,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:GROSSWEIGHT');
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD>=:KGS,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:MEASUREMENT,<2C><><EFBFBD><EFBFBD>=:CBM,<2C><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD>˵<EFBFBD><CBB5>=:BOOKINGDESCRIPTION');
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>=:PLACEDELIVERY,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:PLACEDELIVERYID,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:SERVICE,<2C><><EFBFBD>ѷ<EFBFBD>ʽ=:BLFRT');
|
|
|
SQL.Add(' ,<2C><>ͷ=:MARKS,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д=:TOTALNO,ί<>е<EFBFBD>λ=:wtdw,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ=:CARGOID');}
|
|
|
Parameters.ParamByName('DESCRIPTION').Value := MT1.fieldbyname('DESCRIPTION').asstring;
|
|
|
Parameters.ParamByName('NOPKGS').Value := MT1.fieldbyname('NOPKGS').asstring;
|
|
|
Parameters.ParamByName('PKGS').Value := MT1.fieldbyname('PKGS').asstring;
|
|
|
Parameters.ParamByName('KINDPKGS').Value := MT1.fieldbyname('KINDPKGS').asstring;
|
|
|
Parameters.ParamByName('GROSSWEIGHT').Value := MT1.fieldbyname('GROSSWEIGHT').asstring;
|
|
|
Parameters.ParamByName('KGS').Value := MT1.fieldbyname('KGS').asstring;
|
|
|
Parameters.ParamByName('MEASUREMENT').Value := MT1.fieldbyname('MEASUREMENT').asstring;
|
|
|
Parameters.ParamByName('CBM').Value := MT1.fieldbyname('CBM').asstring;
|
|
|
Parameters.ParamByName('BOOKINGDESCRIPTION').Value := MT1.fieldbyname('BOOKINGDESCRIPTION').asstring;
|
|
|
Parameters.ParamByName('PLACEDELIVERY').Value := MT1.fieldbyname('PLACEDELIVERY').asstring;
|
|
|
Parameters.ParamByName('PLACEDELIVERYID').Value := MT1.fieldbyname('PLACEDELIVERYID').asstring;
|
|
|
Parameters.ParamByName('SERVICE').Value := MT1.fieldbyname('SERVICE').asstring;
|
|
|
Parameters.ParamByName('BLFRT').Value := MT1.fieldbyname('BLFRT').asstring;
|
|
|
Parameters.ParamByName('MARKS').Value := MT1.fieldbyname('MARKS').asstring;
|
|
|
Parameters.ParamByName('TOTALNO').Value := MT1.fieldbyname('TOTALNO').asstring;
|
|
|
Parameters.ParamByName('wtdw').Value := wtdw;
|
|
|
Parameters.ParamByName('CARGOID').Value := MT1.fieldbyname('CARGOID').asstring;
|
|
|
Parameters.ParamByName('PAYABLEAT').Value := MT1.fieldbyname('PAYABLEAT').asstring;
|
|
|
Parameters.ParamByName('CONTRACTNO').Value := MT1.fieldbyname('CONTRACTNO').asstring;
|
|
|
ExecSQL;
|
|
|
|
|
|
end;
|
|
|
//showmessage(MT1.fieldbyname('Ctninfo').asstring);
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
_c := frm_data_share.countString('CTNINFO', MT1.fieldbyname('Ctninfo').asstring);
|
|
|
for _i := 1 to _c do
|
|
|
begin
|
|
|
with Qryinsert do
|
|
|
begin
|
|
|
p1 := frm_data_share.GettimePotion(_i, '<CTNINFO>', MT1.fieldbyname('Ctninfo').asstring);
|
|
|
p2 := frm_data_share.GettimePotion(_i, '</CTNINFO>', MT1.fieldbyname('Ctninfo').asstring);
|
|
|
block := Copy(MT1.fieldbyname('Ctninfo').asstring, p1, p2);
|
|
|
|
|
|
GetCtnCodeQry.close;
|
|
|
CTN := trim(frm_data_share.GetXMLValue('CTN', block));
|
|
|
if CTN = '' then
|
|
|
begin
|
|
|
showmessage('<27><>Ʊҵ<C6B1><D2B5><EFBFBD>ڵļ<DAB5>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣû<CFA2><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
GetCtnCodeQry.Parameters.ParamByName('CTN').value := CTN;
|
|
|
GetCtnCodeQry.Open;
|
|
|
|
|
|
sql.clear;
|
|
|
SQL.Add('Insert into t_op_ctn ( <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><>ע,<2C><>װ,<2C>ߴ<EFBFBD>,TEU,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ)');
|
|
|
SQL.Add('values ( :<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><>ע,:<3A><>װ,:<3A>ߴ<EFBFBD>,:TEU,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ)');
|
|
|
//Parameters.ParamByName('CTN_ID').Value:=frm_data_share.GetXMLValue('CTN_ID',block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := _id;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := GetCtnCodeQry.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := GetCtnCodeQry.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('CTNNUM', block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('CNTRNO', block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('SEALNO', block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('PKGS', block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('KGS', block);
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('CBM', block);
|
|
|
Parameters.ParamByName('<27><>ע').Value := frm_data_share.GetXMLValue('REMARK', block);
|
|
|
Parameters.ParamByName('<27><>װ').Value := frm_data_share.GetXMLValue('KINDPKGS', block);
|
|
|
Parameters.ParamByName('<27>ߴ<EFBFBD>').Value := GetCtnCodeQry.fieldbyname('<27>ߴ<EFBFBD>').AsString;
|
|
|
Parameters.ParamByName('TEU').Value := '0';
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').Value := GetCtnCodeQry.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
//<2F><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Head> ';
|
|
|
_s := _s + ' <OPID>' + frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</OPID> ';
|
|
|
_s := _s + ' <OPTYPE>2</OPTYPE> '; //1<><31><EFBFBD><EFBFBD> 2<><32><EFBFBD><EFBFBD>
|
|
|
_s := _s + ' <OPTIME>' + datetimetostr(Date) + '</OPTIME> ';
|
|
|
_s := _s + ' <Version>1.0</Version> ';
|
|
|
_s := _s + ' </Head> ';
|
|
|
_s := _s + '<OpseaeList> ';
|
|
|
_s := _s + ' <Opseae> ';
|
|
|
_s := _s + ' <BSNO>' + BSNO + '</BSNO> ';
|
|
|
_s := _s + ' </Opseae> ';
|
|
|
_s := _s + '</OpseaeList> ';
|
|
|
_s := _s + '</BookingCargoSpace> ';
|
|
|
XML := aa.SetBookingCargoSpaceAudit(_s);
|
|
|
MT1.Delete;
|
|
|
|
|
|
//<2F><>¼<EFBFBD><C2BC>־
|
|
|
qryGetOpseae.Close;
|
|
|
qryGetOpseae.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := _id;
|
|
|
qryGetOpseae.Open;
|
|
|
|
|
|
Booking_add(qryGetOpseae, _id, MT1.fieldbyname('SENDERNAME').asstring, MT1.fieldbyname('SENDERCOMPANY').asstring, BSNO, '<27><><EFBFBD>ն<EFBFBD><D5B6><EFBFBD>');
|
|
|
|
|
|
showmessage('<27><><EFBFBD>ճɹ<D5B3>');
|
|
|
end
|
|
|
end
|
|
|
else
|
|
|
////////////////////////
|
|
|
if (MT1.fieldbyname('BSSTATUS').asstring = 'CI20150711000007') or (MT1.fieldbyname('BSSTATUS').asstring = 'CI20150711000005') then
|
|
|
begin
|
|
|
if (MT1.fieldbyname('BSSTATUS').asstring = 'CI20150711000007') then
|
|
|
Booking_add(qryGetOpseae, _id, MT1.fieldbyname('SENDERNAME').asstring, MT1.fieldbyname('SENDERCOMPANY').asstring, BSNO, '<27><><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD>');
|
|
|
if (MT1.fieldbyname('BSSTATUS').asstring = 'CI20150711000005') then
|
|
|
Booking_add(qryGetOpseae, _id, MT1.fieldbyname('SENDERNAME').asstring, MT1.fieldbyname('SENDERCOMPANY').asstring, BSNO, '<27><><EFBFBD>ܾܾ<DCBE><DCBE><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
with Qryinsert do
|
|
|
begin
|
|
|
{SQL.clear;
|
|
|
SQL.Add(' delete from t_op_ctn where <20><><EFBFBD><EFBFBD>=(select <20><><EFBFBD><EFBFBD> from t_op_seae where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=:BSNO) ');
|
|
|
SQL.Add(' delete from t_op_seae where <20><><EFBFBD><EFBFBD>=(select <20><><EFBFBD><EFBFBD> from t_op_seae where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=:BSNO2) ');
|
|
|
Parameters.ParamByName('BSNO').Value:=MT1.fieldbyname('BSNO').asstring;
|
|
|
Parameters.ParamByName('BSNO2').Value:=MT1.fieldbyname('BSNO').asstring;
|
|
|
ExecSQL; }
|
|
|
|
|
|
//<2F><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
_s := '';
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Head> ';
|
|
|
_s := _s + ' <OPID>' + frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</OPID> ';
|
|
|
_s := _s + ' <OPTYPE>5</OPTYPE> '; //5 <20><><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD>
|
|
|
_s := _s + ' <OPTIME>' + datetimetostr(Date) + '</OPTIME> ';
|
|
|
_s := _s + ' <Version>1.0</Version> ';
|
|
|
_s := _s + ' </Head> ';
|
|
|
_s := _s + '<OpseaeList> ';
|
|
|
_s := _s + ' <Opseae> ';
|
|
|
_s := _s + ' <BSNO>' + BSNO + '</BSNO> ';
|
|
|
_s := _s + ' </Opseae> ';
|
|
|
_s := _s + '</OpseaeList> ';
|
|
|
_s := _s + '</BookingCargoSpace> ';
|
|
|
XML := aa.SetBookingCargoSpaceAudit(_s);
|
|
|
MT1.Delete;
|
|
|
//showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>˲ճɹ<D5B3>');
|
|
|
end;
|
|
|
//<2F><>¼<EFBFBD><C2BC>־
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
BringToFront;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.AcceptRedirect;
|
|
|
var
|
|
|
_s, _t, _id, _no, block, xml, onlinetimemark, onlinePosted, mttimemark, url, kjqj, wtdw, ETD, CLOSINGDATE: string; //<2F><><EFBFBD><EFBFBD>
|
|
|
p1, p2, _c, _i: Integer;
|
|
|
username, marks, WTBH, HBLNO, code_trade, code_source, bstype: string;
|
|
|
_Time: Tdate;
|
|
|
begin
|
|
|
getwebservice_ds;
|
|
|
|
|
|
//<2F><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Head> ';
|
|
|
_s := _s + ' <OPID>' + frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</OPID> ';
|
|
|
|
|
|
_s := _s + ' <OPTYPE>11</OPTYPE> ';
|
|
|
|
|
|
_s := _s + ' <OPTIME>' + datetimetostr(Date) + '</OPTIME> ';
|
|
|
_s := _s + ' <Version>1.0</Version> ';
|
|
|
_s := _s + ' </Head> ';
|
|
|
_s := _s + '<OpseaeList> ';
|
|
|
_s := _s + ' <Opseae> ';
|
|
|
_s := _s + ' <BSNO>' + MT1.fieldbyname('BSNO').asstring + '</BSNO> ';
|
|
|
_s := _s + ' </Opseae> ';
|
|
|
_s := _s + '</OpseaeList> ';
|
|
|
_s := _s + '</BookingCargoSpace> ';
|
|
|
XML := mServiceSoap_Ds.SetBookingCargoSpaceAudit(_s);
|
|
|
end;
|
|
|
|
|
|
function Tfrm_crm_OnLineBooking.UnformatAfrstr(str: string): string;
|
|
|
begin
|
|
|
Result := Trim(str);
|
|
|
Result := StringReplace(Result, '&', '&', [rfReplaceAll]);
|
|
|
Result := StringReplace(Result, '<', '<', [rfReplaceAll]);
|
|
|
Result := StringReplace(Result, '"', '"', [rfReplaceAll]);
|
|
|
Result := StringReplace(Result, '>', '>', [rfReplaceAll]);
|
|
|
Result := StringReplace(Result, ''', '''', [rfReplaceAll]);
|
|
|
//Result:=StringReplace(Result,'\n;','#13#10',[rfReplaceAll]);
|
|
|
end;
|
|
|
|
|
|
function Tfrm_crm_OnLineBooking.REHH(str: string): string;
|
|
|
var
|
|
|
_r: string;
|
|
|
begin
|
|
|
_r := StringReplace(str, '\\\\', #13#10, [rfReplaceAll]);
|
|
|
result := _r;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.bsSkinButton3Click(Sender: TObject);
|
|
|
var
|
|
|
_s, url,_id: string;
|
|
|
aa: DsWebServiceSoap;
|
|
|
b_recive: boolean;
|
|
|
begin
|
|
|
|
|
|
if (MT1.fieldbyname('BSTYPE').AsString = '<27><><EFBFBD><EFBFBD>') then
|
|
|
begin
|
|
|
SaveBooking;
|
|
|
end
|
|
|
else
|
|
|
if (MT1.fieldbyname('BSTYPE').AsString = '<27><><EFBFBD><EFBFBD>֪ͨ') then
|
|
|
begin
|
|
|
SaveShippingOrder;
|
|
|
end
|
|
|
else
|
|
|
if (MT1.fieldbyname('BSTYPE').AsString = '<27><>ͨ<EFBFBD><CDA8>Ϣ') then
|
|
|
begin
|
|
|
frm_op_seae.Edit9.text := MT1.fieldbyname('BSNO').AsString;
|
|
|
frm_op_seae.bsSkinButton44Click(self);
|
|
|
frm_op_seae.bsSkinButton11.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
frm_op_seae.Notebook1.PageIndex := 1;
|
|
|
frm_op_seae.Edit9.text := '';
|
|
|
frm_tree_main.Act101Execute(self);
|
|
|
end
|
|
|
else
|
|
|
if (MT1.fieldbyname('BSTYPE').AsString = 'ҵ<><D2B5>ת<EFBFBD><D7AA>') then
|
|
|
begin
|
|
|
AcceptRedirect;
|
|
|
MT1.Delete;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
b_recive := GetSIData;
|
|
|
if not b_recive then
|
|
|
begin
|
|
|
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;
|
|
|
frm_op_seae.Edit9.text := MT1.fieldbyname('BSNO').AsString;
|
|
|
frm_op_seae.bsSkinButton44.OnClick(Sender);
|
|
|
frm_op_seae.Notebook1.PageIndex := 1;
|
|
|
Booking_add(frm_op_seae.t_op_seae, frm_op_seae.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString, MT1.fieldbyname('SENDERNAME').asstring, MT1.fieldbyname('SENDERCOMPANY').asstring, MT1.fieldbyname('BSNO').asstring, '<27><><EFBFBD><EFBFBD><EFBFBD>ᵥȷ<E1B5A5><C8B7>');
|
|
|
MT1.Delete;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxdbgrd1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinButton3Click(Self);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.bsSkinButton4Click(Sender: TObject);
|
|
|
var
|
|
|
_s, XML: string;
|
|
|
//frm_msg: Tfrm_MSG;
|
|
|
begin
|
|
|
|
|
|
try
|
|
|
if ASSIGNED(frm_MSG) then
|
|
|
frm_MSG.Free;
|
|
|
frm_MSG := Tfrm_MSG.Create(self);
|
|
|
frm_MSG.Caption := '<27>շ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>Ϣ';
|
|
|
frm_MSG.FormStyle := fsStayOnTop;
|
|
|
frm_MSG.SetBSNO(MT1.fieldbyname('BSNO').asstring);
|
|
|
frm_MSG.Show;
|
|
|
finally
|
|
|
//Form2.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
Loaded := false;
|
|
|
GetXML();
|
|
|
FormShow(Sender);
|
|
|
Loaded := True;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.ssagetaChange(Sender: TObject; Field: TField);
|
|
|
begin
|
|
|
//ShowMessage(MT1.fieldbyname('Bookingtype').AsString);
|
|
|
{
|
|
|
if (MT1.fieldbyname('Bookingtype').AsString='<27><><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD>')
|
|
|
or (MT1.fieldbyname('Bookingtype').AsString='<27><><EFBFBD><EFBFBD>') then
|
|
|
begin
|
|
|
bsSkinButton1.Enabled:=false;
|
|
|
bsSkinButton2.Enabled:=true;
|
|
|
bsSkinButton3.Enabled:=true;
|
|
|
end else
|
|
|
if (MT1.fieldbyname('Bookingtype').AsString='<27><><EFBFBD><EFBFBD>') then
|
|
|
begin
|
|
|
bsSkinButton1.Enabled:=false;
|
|
|
bsSkinButton2.Enabled:=false;
|
|
|
bsSkinButton3.Enabled:=false;
|
|
|
end else
|
|
|
if (MT1.fieldbyname('BSTYPE').AsString='<27><><EFBFBD><EFBFBD>֪ͨ') then
|
|
|
begin
|
|
|
bsSkinButton1.Enabled:=false;
|
|
|
bsSkinButton2.Enabled:=false;
|
|
|
bsSkinButton3.Enabled:=true;
|
|
|
end else
|
|
|
if (MT1.fieldbyname('BSTYPE').AsString='<27><>ͨ<EFBFBD><CDA8>Ϣ') then
|
|
|
begin
|
|
|
bsSkinButton1.Enabled:=false;
|
|
|
bsSkinButton2.Enabled:=false;
|
|
|
bsSkinButton3.Enabled:=true;
|
|
|
if loaded then
|
|
|
GETMSG(MT1.fieldbyname('BSNO').AsString);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
bsSkinButton1.Enabled:=true;
|
|
|
bsSkinButton2.Enabled:=true;
|
|
|
bsSkinButton3.Enabled:=true;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if (MT1.fieldbyname('BSTYPE').AsString='<27><><EFBFBD><EFBFBD>') then
|
|
|
begin
|
|
|
bsSkinNotebook1.PageIndex:=2;
|
|
|
end
|
|
|
else
|
|
|
if (MT1.fieldbyname('BSTYPE').AsString='<27><><EFBFBD><EFBFBD>֪ͨ') then
|
|
|
begin
|
|
|
bsSkinNotebook1.PageIndex:=1;
|
|
|
end
|
|
|
else
|
|
|
if (MT1.fieldbyname('BSTYPE').AsString='<27><>ͨ<EFBFBD><CDA8>Ϣ') then
|
|
|
begin
|
|
|
bsSkinNotebook1.PageIndex:=3;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
bsSkinNotebook1.PageIndex:=0;
|
|
|
end;
|
|
|
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.Pending;
|
|
|
var
|
|
|
_s, _t, _id, _no, block, xml, onlinetimemark, onlinePosted, mttimemark, url, kjqj, wtdw, ETD, CLOSINGDATE, PendingReason: string; //<2F><><EFBFBD><EFBFBD>
|
|
|
aa: DsWebServiceSoap;
|
|
|
p1, p2, _c, _i: Integer;
|
|
|
username, marks, WTBH, HBLNO, code_trade, code_source, bstype, BSNO: string;
|
|
|
_Time: Tdate;
|
|
|
begin
|
|
|
username := frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
if InputQueryMEMO('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', 'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:', PendingReason) then
|
|
|
begin
|
|
|
BSNO := MT1.fieldbyname('BSNO').AsString;
|
|
|
DoSaveBook;
|
|
|
DoPending(BSNO, formatAfrstr(PendingReason));
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.DoPending(BSNO, PendingReason: string);
|
|
|
var
|
|
|
_s, _t, _id, _no, block, xml, onlinetimemark, onlinePosted, mttimemark, url, kjqj, wtdw, ETD, CLOSINGDATE: string; //<2F><><EFBFBD><EFBFBD>
|
|
|
p1, p2, _c, _i: Integer;
|
|
|
username, marks, WTBH, HBLNO, code_trade, code_source, bstype: string;
|
|
|
_Time: Tdate;
|
|
|
begin
|
|
|
getwebservice_ds;
|
|
|
|
|
|
//<2F><><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Head> ';
|
|
|
_s := _s + ' <OPID>' + frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</OPID> ';
|
|
|
_s := _s + ' <OPTYPE>8</OPTYPE> '; //1<><31><EFBFBD><EFBFBD> 2<><32><EFBFBD><EFBFBD>
|
|
|
_s := _s + ' <OPTIME>' + datetimetostr(Date) + '</OPTIME> ';
|
|
|
_s := _s + ' <Version>1.0</Version> ';
|
|
|
_s := _s + ' </Head> ';
|
|
|
_s := _s + '<OpseaeList> ';
|
|
|
_s := _s + ' <Opseae> ';
|
|
|
_s := _s + ' <BSNO>' + BSNO + '</BSNO> ';
|
|
|
_s := _s + ' <PendingReason>' + PendingReason + '</PendingReason> ';
|
|
|
_s := _s + ' </Opseae> ';
|
|
|
_s := _s + '</OpseaeList> ';
|
|
|
_s := _s + '</BookingCargoSpace> ';
|
|
|
XML := mServiceSoap_Ds.SetBookingCargoSpaceAudit(_s);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
Pending;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.SaveShippingOrder;
|
|
|
var
|
|
|
_s, _t, _id, _no, block, xml, onlinetimemark, onlinePosted, mttimemark, url, kjqj, wtdw, ETD, CLOSINGDATE, CLOSEDOCDATE, BSNO: string; //<2F><><EFBFBD><EFBFBD>
|
|
|
aa: DsWebServiceSoap;
|
|
|
p1, p2, _c, _i, _r, _L: Integer;
|
|
|
username, marks: string;
|
|
|
UPDField, MTField: TStringList;
|
|
|
begin
|
|
|
username := frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
UPDField := TStringList.Create;
|
|
|
MTField := TStringList.Create;
|
|
|
UPDField.Add('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>');
|
|
|
MTField.Add('MBLNO');
|
|
|
UPDField.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
MTField.Add('VESSEL');
|
|
|
UPDField.Add('<27><><EFBFBD><EFBFBD>');
|
|
|
MTField.Add('VOYNO');
|
|
|
UPDField.Add('ж<><D0B6><EFBFBD><EFBFBD>');
|
|
|
MTField.Add('PORTDISCHARGE');
|
|
|
UPDField.Add('<27>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
MTField.Add('CLOSINGDATE');
|
|
|
UPDField.Add('<27>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
MTField.Add('CLOSEDOCDATE');
|
|
|
UPDField.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
MTField.Add('ETD');
|
|
|
|
|
|
if (MT1.fieldbyname('CLOSINGDATE').asstring = '') then
|
|
|
begin
|
|
|
CLOSINGDATE := 'null';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
CLOSINGDATE := StringReplace('''' + MT1.fieldbyname('CLOSINGDATE').asstring + '''', '/', '-', [rfReplaceAll]);
|
|
|
end;
|
|
|
|
|
|
if (MT1.fieldbyname('ETD').asstring = '') then
|
|
|
begin
|
|
|
ETD := 'null';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
ETD := StringReplace('''' + MT1.fieldbyname('ETD').asstring + '''', '/', '-', [rfReplaceAll]);
|
|
|
end;
|
|
|
|
|
|
if (MT1.fieldbyname('CLOSEDOCDATE').asstring = '') then
|
|
|
begin
|
|
|
CLOSEDOCDATE := 'null';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
CLOSEDOCDATE := StringReplace('''' + MT1.fieldbyname('CLOSEDOCDATE').asstring + '''', '/', '-', [rfReplaceAll]);
|
|
|
end;
|
|
|
|
|
|
BSNO := MT1.fieldbyname('BSNO').AsString;
|
|
|
_r := MessageDlg('<27><><EFBFBD>ܴ<EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD> ' + #13#10 + 'ѡ<><D1A1><EFBFBD><EFBFBD>Yes<65><73><EFBFBD><EFBFBD><EFBFBD>ᵥ<EFBFBD>š<EFBFBD><C5A1><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD>Ρ<EFBFBD>ж<EFBFBD><D0B6><EFBFBD>ۡ<EFBFBD><DBA1>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD>ںͿ<DABA><CDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><C2B5><EFBFBD>Ʊҵ<C6B1><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' + #13#10 + 'ѡ<><D1A1><EFBFBD><EFBFBD>NO<4E><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ḳ<EFBFBD><E1B8B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD>Ŀǰδ<C7B0><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', mtWarning, [mbyes, mbno], 0);
|
|
|
case _r of
|
|
|
mrYes:
|
|
|
begin
|
|
|
|
|
|
//2 <20><>ѯ<EFBFBD><D1AF>bsno<6E><6F>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ǩ<EFBFBD>Ƿ<EFBFBD>
|
|
|
url := get_WebseviceURL;
|
|
|
aa := GetDsWebServiceSoap(false, url);
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?> ';
|
|
|
_s := _s + '<BookingInfo xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Booking> ';
|
|
|
_s := _s + ' <BSNO>' + BSNO + '</BSNO> ';
|
|
|
_s := _s + ' </Booking> ';
|
|
|
_s := _s + '</BookingInfo> ';
|
|
|
xml := aa.GetBsnoInfo(_s);
|
|
|
p1 := frm_data_share.GettimePotion(1, '<Booking>', xml);
|
|
|
p2 := frm_data_share.GettimePotion(1, '</Booking>', xml);
|
|
|
block := Copy(xml, p1, p2 - p1);
|
|
|
onlinetimemark := frm_data_share.GetXMLValue('TimeMark', block);
|
|
|
onlinePosted := frm_data_share.GetXMLValue('ISPOSTED', block);
|
|
|
|
|
|
mttimemark := MT1.fieldbyname('TimeMark').AsString;
|
|
|
if (onlinetimemark <> mttimemark) then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD>仯<EFBFBD><E4BBAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD>ѯ<EFBFBD><D1AF>');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
|
|
|
|
|
|
//if optype='1'
|
|
|
Qrysearch.Close;
|
|
|
Qrysearch.SQL.Text := 'select * from t_op_seae where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=''' + BSNO + '''';
|
|
|
Qrysearch.Open;
|
|
|
_id := Qrysearch.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
if (Qrysearch.RecordCount = 0) then //0 <20><><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
//<2F>жϸö<CFB8><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD><D0BA>Ƿ<EFBFBD><C7B7><EFBFBD>ϵͳ<CFB5>ڴ<EFBFBD><DAB4>ڣ<EFBFBD><DAA3>粻<EFBFBD><E7B2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F2B1A8BE><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>
|
|
|
showmessage('<27><>ҵ<EFBFBD><D2B5><EFBFBD>ڱ<EFBFBD>ϵͳ<CFB5>в<EFBFBD><D0B2><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǹ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>ѱ<EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>');
|
|
|
|
|
|
end
|
|
|
else if (Qrysearch.RecordCount > 0) then //1<><31><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
qryGetOpseae2.Close;
|
|
|
qryGetOpseae2.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>').Value := BSNO;
|
|
|
qryGetOpseae2.Open;
|
|
|
|
|
|
with Qryinsert do
|
|
|
begin
|
|
|
Close; //function WeekofYear(Date: TDate): integer; //ȡ<>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ڵ<EFBFBD><DAB5>ܴ<EFBFBD>
|
|
|
|
|
|
//_no:=get_no(Date,'SE');
|
|
|
//kjqj:=inttostr(WeekofYear(Date));
|
|
|
sql.clear;
|
|
|
//SQL.Add(' delete from t_op_ctn where <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_op_seae where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>='''+MT1.fieldbyname('OLDBSNO').asstring+''') ');
|
|
|
SQL.Add(' update t_op_seae set ');
|
|
|
SQL.Add(' <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>=:MBLNO, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=' + ETD + ', <20>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>=' + CLOSINGDATE + ', ж<><D0B6><EFBFBD><EFBFBD>=:PORTDISCHARGE');
|
|
|
SQL.Add(' ,ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:PORTDISCHARGEID ');
|
|
|
SQL.Add(' ,<2C><><EFBFBD><EFBFBD>=:VESSEL,<2C><><EFBFBD><EFBFBD>=:VOYNO,<2C>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>=' + CLOSEDOCDATE);
|
|
|
SQL.Add(' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=:BSNO');
|
|
|
Parameters.ParamByName('BSNO').Value := BSNO;
|
|
|
Parameters.ParamByName('MBLNO').Value := MT1.fieldbyname('MBLNO').asstring;
|
|
|
// Parameters.ParamByName('CUSTNO').Value:=_no;//
|
|
|
//Parameters.ParamByName('ETD').Value:=MT1.fieldbyname('ETD').asstring;
|
|
|
//Parameters.ParamByName('ETA').Value:=MT1.fieldbyname('ETA').asstring;
|
|
|
Parameters.ParamByName('PORTDISCHARGE').Value := MT1.fieldbyname('PORTDISCHARGE').asstring;
|
|
|
Parameters.ParamByName('PORTDISCHARGEID').Value := MT1.fieldbyname('PORTDISCHARGEID').asstring;
|
|
|
|
|
|
Parameters.ParamByName('VESSEL').Value := MT1.fieldbyname('VESSEL').asstring;
|
|
|
Parameters.ParamByName('VOYNO').Value := MT1.fieldbyname('VOYNO').asstring;
|
|
|
// Parameters.ParamByName('CLOSEDOCDATE').Value:=MT1.fieldbyname('CLOSEDOCDATE').asstring;
|
|
|
ExecSQL;
|
|
|
|
|
|
end;
|
|
|
|
|
|
//<2F><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Head> ';
|
|
|
_s := _s + ' <OPID>' + frm_data_share.t_crm_client_weituo.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</OPID> ';
|
|
|
_s := _s + ' <OPTYPE>3</OPTYPE> '; //3 <20><><EFBFBD><EFBFBD>֪ͨ
|
|
|
_s := _s + ' <OPTIME>' + datetimetostr(Date) + '</OPTIME> ';
|
|
|
_s := _s + ' <Version>1.0</Version> ';
|
|
|
_s := _s + ' </Head> ';
|
|
|
_s := _s + '<OpseaeList> ';
|
|
|
_s := _s + ' <Opseae> ';
|
|
|
_s := _s + ' <BSNO>' + BSNO + '</BSNO> ';
|
|
|
_s := _s + ' </Opseae> ';
|
|
|
_s := _s + '</OpseaeList> ';
|
|
|
_s := _s + '</BookingCargoSpace> ';
|
|
|
XML := aa.SetBookingCargoSpaceAudit(_s);
|
|
|
|
|
|
//<2F><>¼<EFBFBD><C2BC>־
|
|
|
qryGetOpseae.Close;
|
|
|
qryGetOpseae.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := _id;
|
|
|
qryGetOpseae.Open;
|
|
|
|
|
|
Booking_add(qryGetOpseae, _id, MT1.fieldbyname('SENDERNAME').asstring, MT1.fieldbyname('SENDERCOMPANY').asstring, BSNO, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֪ͨ');
|
|
|
|
|
|
showmessage('<27><><EFBFBD>ճɹ<D5B3>');
|
|
|
end
|
|
|
end;
|
|
|
end;
|
|
|
mrNo:
|
|
|
begin
|
|
|
url := get_WebseviceURL;
|
|
|
aa := GetDsWebServiceSoap(false, url);
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?> ';
|
|
|
_s := _s + '<BookingInfo xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Booking> ';
|
|
|
_s := _s + ' <BSNO>' + BSNO + '</BSNO> ';
|
|
|
_s := _s + ' </Booking> ';
|
|
|
_s := _s + '</BookingInfo> ';
|
|
|
xml := aa.GetBsnoInfo(_s);
|
|
|
p1 := frm_data_share.GettimePotion(1, '<Booking>', xml);
|
|
|
p2 := frm_data_share.GettimePotion(1, '</Booking>', xml);
|
|
|
block := Copy(xml, p1, p2 - p1);
|
|
|
onlinetimemark := frm_data_share.GetXMLValue('TimeMark', block);
|
|
|
onlinePosted := frm_data_share.GetXMLValue('ISPOSTED', block);
|
|
|
|
|
|
mttimemark := MT1.fieldbyname('TimeMark').AsString;
|
|
|
if (onlinetimemark <> mttimemark) then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD>仯<EFBFBD><E4BBAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD>ѯ<EFBFBD><D1AF>');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
|
|
|
//if optype='1'
|
|
|
Qrysearch.Close;
|
|
|
Qrysearch.SQL.Text := 'select * from t_op_seae where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=''' + BSNO + '''';
|
|
|
Qrysearch.Open;
|
|
|
_id := Qrysearch.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
if (Qrysearch.RecordCount = 0) then //0 <20><><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
//<2F>жϸö<CFB8><C3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD><D0BA>Ƿ<EFBFBD><C7B7><EFBFBD>ϵͳ<CFB5>ڴ<EFBFBD><DAB4>ڣ<EFBFBD><DAA3>粻<EFBFBD><E7B2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F2B1A8BE><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>
|
|
|
showmessage('<27><>ҵ<EFBFBD><D2B5><EFBFBD>ڱ<EFBFBD>ϵͳ<CFB5>в<EFBFBD><D0B2><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǹ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>ѱ<EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1>');
|
|
|
|
|
|
end
|
|
|
else if (Qrysearch.RecordCount > 0) then //1<><31><EFBFBD><EFBFBD>
|
|
|
begin
|
|
|
qryGetOpseae2.Close;
|
|
|
qryGetOpseae2.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>').Value := BSNO;
|
|
|
qryGetOpseae2.Open;
|
|
|
|
|
|
_L := UPDField.Count;
|
|
|
for _i := 0 to _L - 1 do
|
|
|
begin
|
|
|
|
|
|
with Qryinsert do
|
|
|
begin
|
|
|
Close; //function WeekofYear(Date: TDate): integer; //ȡ<>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ڵ<EFBFBD><DAB5>ܴ<EFBFBD>
|
|
|
if qryGetOpseae2.FieldByName(UPDField[_i]).AsString <> '' then
|
|
|
Continue;
|
|
|
sql.clear;
|
|
|
//SQL.Add(' delete from t_op_ctn where <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD> from t_op_seae where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>='''+MT1.fieldbyname('OLDBSNO').asstring+''') ');
|
|
|
SQL.Add(' update t_op_seae set ');
|
|
|
SQL.Add(UPDField[_i] + '=:' + MTField[_i]);
|
|
|
//ShowMessage(UPDField[_i]+'=:'+MTField[_i]);
|
|
|
SQL.Add(' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=:BSNO');
|
|
|
Parameters.ParamByName('BSNO').Value := BSNO;
|
|
|
Parameters.ParamByName(MTField[_i]).Value := MT1.fieldbyname(MTField[_i]).asstring;
|
|
|
ExecSQL;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
//<2F><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Head> ';
|
|
|
_s := _s + ' <OPID>' + frm_data_share.t_crm_client_weituo.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</OPID> ';
|
|
|
_s := _s + ' <OPTYPE>3</OPTYPE> '; //3 <20><><EFBFBD><EFBFBD>֪ͨ
|
|
|
_s := _s + ' <OPTIME>' + datetimetostr(Date) + '</OPTIME> ';
|
|
|
_s := _s + ' <Version>1.0</Version> ';
|
|
|
_s := _s + ' </Head> ';
|
|
|
_s := _s + '<OpseaeList> ';
|
|
|
_s := _s + ' <Opseae> ';
|
|
|
_s := _s + ' <BSNO>' + BSNO + '</BSNO> ';
|
|
|
_s := _s + ' </Opseae> ';
|
|
|
_s := _s + '</OpseaeList> ';
|
|
|
_s := _s + '</BookingCargoSpace> ';
|
|
|
XML := aa.SetBookingCargoSpaceAudit(_s);
|
|
|
|
|
|
//<2F><>¼<EFBFBD><C2BC>־
|
|
|
qryGetOpseae.Close;
|
|
|
qryGetOpseae.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := _id;
|
|
|
qryGetOpseae.Open;
|
|
|
|
|
|
Booking_add(qryGetOpseae, _id, MT1.fieldbyname('SENDERNAME').asstring, MT1.fieldbyname('SENDERCOMPANY').asstring, BSNO, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֪ͨ');
|
|
|
|
|
|
showmessage('<27><><EFBFBD>ճɹ<D5B3>');
|
|
|
end
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
frm_tree_main.Act101Execute(self);
|
|
|
frm_op_seae.bsSkinButton44Click(self);
|
|
|
frm_op_seae.t_op_seae.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>', MT1.fieldbyname('BSNO').AsString, []);
|
|
|
|
|
|
//20150723 <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֪ͨ<CDA8>ĺ<EFBFBD><C4BA><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
qry_op_letter.Close;
|
|
|
qry_op_letter.open;
|
|
|
qry_op_letter.Insert;
|
|
|
qry_op_letter['<27><><EFBFBD><EFBFBD>'] := _id;
|
|
|
qry_op_letter['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'] := '<27><><EFBFBD><EFBFBD>֪ͨ';
|
|
|
qry_op_letter['ǩ<><C7A9><EFBFBD><EFBFBD>'] := frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
qry_op_letter['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'] := FormatDateTime('c', now);
|
|
|
qry_op_letter['HEAD_TO'] := '';
|
|
|
qry_op_letter.Post;
|
|
|
|
|
|
qry_op_letter_rh.close;
|
|
|
// qry_op_letter_rh.Parameters.ParamByName('LE_ID').Value:=qry_op_letter.fieldbyname('LE_ID');
|
|
|
qry_op_letter_rh.open;
|
|
|
qry_op_letter_rh.insert;
|
|
|
qry_op_letter_rh['LE_ID'] := qry_op_letter.fieldbyname('LE_ID').AsString;
|
|
|
qry_op_letter_rh['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>վ'] := MT1.fieldbyname('YARD').asstring;
|
|
|
qry_op_letter_rh['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>'] := MT1.fieldbyname('CLOSINGDATE').asstring;
|
|
|
qry_op_letter_rh['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>'] := MT1.fieldbyname('YARDLinkman').asstring;
|
|
|
qry_op_letter_rh['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD>绰'] := MT1.fieldbyname('YARDTel').asstring;
|
|
|
qry_op_letter_rh['<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>'] := MT1.fieldbyname('YARDFAX').asstring;
|
|
|
|
|
|
qry_op_letter_rh['<27><>վ<EFBFBD><D5BE>ַ'] := MT1.fieldbyname('YARDAddress').asstring;
|
|
|
qry_op_letter_rh['<27>ص<EFBFBD>ʱ<EFBFBD><CAB1>'] := MT1.fieldbyname('CLOSEDOCDATE').asstring;
|
|
|
qry_op_letter_rh['<27><><EFBFBD>ڿڰ<DABF>'] := MT1.fieldbyname('PORTLOAD').asstring;
|
|
|
qry_op_letter_rh['<27><>ע'] := MT1.fieldbyname('YARDRemark').asstring;
|
|
|
qry_op_letter_rh.post;
|
|
|
|
|
|
bringtofront;
|
|
|
MT1.Delete;
|
|
|
end;
|
|
|
|
|
|
function Tfrm_crm_OnLineBooking.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_crm_OnLineBooking.getwebservice_ds;
|
|
|
var
|
|
|
URL: string;
|
|
|
begin
|
|
|
try
|
|
|
URL := get_WebseviceURL;
|
|
|
mHttpRIO_ds := THTTPRIO.Create(nil);
|
|
|
|
|
|
mHttpRIO_ds.WSDLLocation := URL + '?WSDL';
|
|
|
mHttpRIO_ds.URL := URL;
|
|
|
|
|
|
// mHttpRIO_ds.WSDLLocation:='http://192.168.1.5:8086/webservice/DsWebService.asmx?WSDL';
|
|
|
// mHttpRIO_ds.URL:='http://192.168.1.5:8086/webservice/DsWebService.asmx';
|
|
|
mHttpRIO_ds.Port := 'DsWebServiceSoap';
|
|
|
mHttpRIO_ds.Service := 'DsWebService';
|
|
|
mHttpRIO_ds.HTTPWebNode.UseUTF8InHeader := true;
|
|
|
InvRegistry.RegisterInvokeOptions(TypeInfo(DsWebServiceSoap), ioDocument); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
mServiceSoap_Ds := mHttpRIO_ds as DsWebServiceSoap;
|
|
|
except
|
|
|
on E: Exception do
|
|
|
begin
|
|
|
ShowMessage(e.Message);
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.btn1Click(Sender: TObject);
|
|
|
begin
|
|
|
if mmo2.Lines.text <> '' then
|
|
|
begin
|
|
|
getwebservice_ds;
|
|
|
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingMSG xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1">';
|
|
|
_s := _s + '<MSGList> ';
|
|
|
_s := _s + ' <MSGInfo> ';
|
|
|
_s := _s + ' <SENDERID>' + frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</SENDERID> ';
|
|
|
_s := _s + ' <BSTYPE><3E><>ͨ<EFBFBD><CDA8>Ϣ</BSTYPE> ';
|
|
|
_s := _s + ' <BSNO>' + MT1.fieldbyname('BSNO').asstring + '</BSNO> ';
|
|
|
_s := _s + ' <FieldName><3E><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD></FieldName> ';
|
|
|
_s := _s + ' <FieldValue>' + mmo2.Lines.Text + '</FieldValue> ';
|
|
|
if (chk1.Checked) then
|
|
|
begin
|
|
|
_s := _s + ' <SendMail>Send</SendMail> ';
|
|
|
end;
|
|
|
_s := _s + ' </MSGInfo> ';
|
|
|
_s := _s + '</MSGList> ';
|
|
|
_s := _s + '</BookingMSG> ';
|
|
|
|
|
|
XML := mServiceSoap_Ds.SendMSG(_s);
|
|
|
|
|
|
if (pos('<USERNAME>', XML) > 0) then
|
|
|
begin
|
|
|
Qry1.Close;
|
|
|
Qry1.SQL.Text:='select '''+mmo2.Lines.Text+''' <20><>Ϣ';
|
|
|
Qry1.Open;
|
|
|
|
|
|
qryGetOpseae2.Close;
|
|
|
qryGetOpseae2.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>').Value := MT1.fieldbyname('BSNO').asstring;
|
|
|
qryGetOpseae2.Open;
|
|
|
|
|
|
Booking_add(Qry1, qryGetOpseae2.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring
|
|
|
, XML, MT1.fieldbyname('BSNO').asstring
|
|
|
, '<27><><EFBFBD><EFBFBD> <20><>ͨ<EFBFBD><CDA8>Ϣ');
|
|
|
|
|
|
mmo2.Clear;
|
|
|
GETMSG(MT1.fieldbyname('BSNO').AsString);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>');
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
GETMSG(MT1.fieldbyname('BSNO').AsString);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
begin
|
|
|
frm_crm_OnLineBooking.Hide;
|
|
|
frm_crm_OnLineBooking.ManualFloat(frm_crm_OnLineBooking.BoundsRect);
|
|
|
frm_main.freeTabs('frm_crm_OnLineBooking');
|
|
|
action := cafree;
|
|
|
frm_crm_OnLineBooking := nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxdbgrd1CustomDraw(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 (ANode.Strings[dxDBGrd1Column1.Index] = 'δ<><CEB4>') then
|
|
|
begin
|
|
|
AFont.Style := [fsBold];
|
|
|
exit;
|
|
|
end;
|
|
|
{
|
|
|
if (ANode.Strings[dxDBGrd1Column1.Index]='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>') then begin
|
|
|
AFont.Color:=clBlue;
|
|
|
exit;
|
|
|
end;
|
|
|
if (ANode.Strings[dxDBGrd1Column1.Index]='<27><><EFBFBD><EFBFBD>') or (ANode.Strings[dxDBGrd1Column1.Index]='<27><><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD>') then begin
|
|
|
AFont.Color:=clRed;
|
|
|
exit;
|
|
|
end; }
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxdbgrd1Click(Sender: TObject);
|
|
|
begin
|
|
|
//<2F><><EFBFBD><EFBFBD>loaded=true <20>Ž<EFBFBD><C5BD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>Ѷ<EFBFBD>δ<EFBFBD><CEB4><EFBFBD>ж<EFBFBD>
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxdbgrd1Column1CustomDraw(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 (ANode.Strings[dxDBGrd1Column1.Index] = '<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>') then
|
|
|
begin
|
|
|
AFont.Color := clBlue;
|
|
|
exit;
|
|
|
end;
|
|
|
if (ANode.Strings[dxDBGrd1Column1.Index] = '<27><><EFBFBD><EFBFBD>') or (ANode.Strings[dxDBGrd1Column1.Index] = '<27><><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD>') then
|
|
|
begin
|
|
|
AFont.Color := clRed;
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.GETMSG(BSNO: string);
|
|
|
var
|
|
|
_s, url, block: string;
|
|
|
p1, p2, _i, MSGCount: integer;
|
|
|
begin
|
|
|
if not ASSIGNED(frm_sys_progress) then
|
|
|
frm_sys_progress := tfrm_sys_progress.Create(application);
|
|
|
frm_sys_progress.bsSkinGauge1.ProgressText := '<27><><EFBFBD>ڻ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<C8BA><F2A1A3A1><EFBFBD>';
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue := 100;
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue := 0;
|
|
|
|
|
|
frm_sys_progress.Show;
|
|
|
frm_sys_progress.bsSkinGauge1.Value := 0;
|
|
|
|
|
|
try
|
|
|
getwebservice_ds;
|
|
|
//<2F><>ȡ<EFBFBD><C8A1>ҵ<EFBFBD><D2B5><EFBFBD>Ĺ<EFBFBD>ͨ<EFBFBD><CDA8>Ϣ
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?> ';
|
|
|
_s := _s + ' <UserInfo xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <UserList> ';
|
|
|
_s := _s + ' <User> ';
|
|
|
_s := _s + ' <UserID>' + frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</UserID> ';
|
|
|
// _s:=_s+' <USERNAME>SENDERCOMPANYID</USERNAME> ';
|
|
|
_s := _s + ' <BSNO>' + BSNO + '</BSNO> ';
|
|
|
_s := _s + ' </User> ';
|
|
|
_s := _s + ' </UserList> ';
|
|
|
_s := _s + ' </UserInfo> ';
|
|
|
//ShowMessage(_s);
|
|
|
XML := mServiceSoap_Ds.ReceiveMSG(_s);
|
|
|
XML := StringReplace(XML, '#$A', '', [rfReplaceAll]);
|
|
|
p1 := frm_data_share.GettimePotion(1, '<MSGList>', XML);
|
|
|
p2 := frm_data_share.GettimePotion(1, '</MSGList>', xml);
|
|
|
XML := copy(XML, p1, p2 - p1);
|
|
|
//ShowMessage(XML);
|
|
|
MSGcount := frm_data_share.countString('MSGInfo', xml);
|
|
|
//result:= MSGcount;
|
|
|
finally
|
|
|
frm_sys_progress.Close;
|
|
|
frm_sys_progress.Free;
|
|
|
frm_sys_progress := nil;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if (MSGCount > 0) then
|
|
|
begin
|
|
|
|
|
|
MT_MSG.close;
|
|
|
|
|
|
for _i := 1 to MSGCount do
|
|
|
begin
|
|
|
p1 := frm_data_share.GettimePotion(_i, '<MSGInfo>', xml);
|
|
|
p2 := frm_data_share.GettimePotion(_i, '</MSGInfo>', xml);
|
|
|
block := Copy(xml, p1, p2 - p1);
|
|
|
|
|
|
MT_MSG.Open;
|
|
|
MT_MSG.Edit;
|
|
|
MT_MSG.Insert;
|
|
|
|
|
|
MT_MSG['BSNO'] := frm_data_share.GetXMLValue('BSNO', block);
|
|
|
MT_MSG['GID'] := frm_data_share.GetXMLValue('GID', block);
|
|
|
MT_MSG['SENDERNAME'] := frm_data_share.GetXMLValue('SENDERNAME', block);
|
|
|
MT_MSG['SENDERCOMPANYNAME'] := frm_data_share.GetXMLValue('SENDERCOMPANYNAME', block);
|
|
|
MT_MSG['FieldValue'] := frm_data_share.REHH(frm_data_share.GetXMLValue('FieldValue', block));
|
|
|
MT_MSG['MSGDate'] := frm_data_share.GetXMLValue('MSGDate', block);
|
|
|
MT_MSG['RECDate'] := frm_data_share.GetXMLValue('RECDate', block);
|
|
|
MT_MSG['Received'] := frm_data_share.GetXMLValue('Received', block);
|
|
|
MT_MSG['SendMail'] := frm_data_share.GetXMLValue('SendMail', block);
|
|
|
MT_MSG.Post;
|
|
|
|
|
|
end;
|
|
|
//label14.Caption:='<27><><EFBFBD><EFBFBD>'+#10+'˵<><CBB5>';
|
|
|
// MT1.Open;
|
|
|
MT_MSG.Last;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxDBGridCustomDraw(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 (ANode.Strings[colFX.Index] = 'δ<><CEB4>') then
|
|
|
begin
|
|
|
AFont.Style := [fsBold];
|
|
|
end;
|
|
|
|
|
|
if ANode.Index mod 2 = 0 then
|
|
|
AColor := clWhite
|
|
|
else
|
|
|
AColor := clLtGray;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.N2Click(Sender: TObject);
|
|
|
begin
|
|
|
SetReceived(MT_MSG.fieldbyname('GID').asstring);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.SetReceived(GID: string);
|
|
|
//<2F>趨<EFBFBD><E8B6A8>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
var
|
|
|
_s, XML: string;
|
|
|
begin
|
|
|
//<2F><><EFBFBD><EFBFBD>
|
|
|
if MT_MSG.fieldbyname('Received').Asstring= 'δ<><CEB4>' then begin
|
|
|
getwebservice_ds;
|
|
|
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingMSG xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1">';
|
|
|
_s := _s + '<MSGList> ';
|
|
|
_s := _s + ' <MSGInfo> ';
|
|
|
_s := _s + ' <SENDERID>' + frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</SENDERID> ';
|
|
|
_s := _s + ' <BSTYPE><3E><>ͨ<EFBFBD><CDA8>Ϣ</BSTYPE> ';
|
|
|
_s := _s + ' <GID>' + GID + '</GID> ';
|
|
|
_s := _s + ' <FieldName><3E><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD></FieldName> ';
|
|
|
//_s:=_s+' <FieldValue>'+mmo1.Lines.Text+'</FieldValue> ';
|
|
|
_s := _s + ' </MSGInfo> ';
|
|
|
_s := _s + '</MSGList> ';
|
|
|
_s := _s + '</BookingMSG> ';
|
|
|
|
|
|
XML := mServiceSoap_Ds.SetMSGRec(_s);
|
|
|
|
|
|
if (pos('<27>ɹ<EFBFBD>', XML) > 0) then
|
|
|
begin
|
|
|
MT_MSG.edit;
|
|
|
MT_MSG['Received'] := '<27>Ѷ<EFBFBD>';
|
|
|
MT_MSG.Post;
|
|
|
|
|
|
|
|
|
qryGetOpseae2.Close;
|
|
|
qryGetOpseae2.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>').Value := MT1.fieldbyname('BSNO').asstring;
|
|
|
qryGetOpseae2.Open;
|
|
|
|
|
|
Qry1.Close;
|
|
|
Qry1.SQL.Text:='select '''+MT_MSG.fieldbyname('FieldValue').AsString+''' <20><>Ϣ';
|
|
|
Qry1.Open;
|
|
|
|
|
|
Booking_add(Qry1, qryGetOpseae2.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring
|
|
|
, MT_MSG.fieldbyname('SENDERNAME').AsString
|
|
|
, MT_MSG.fieldbyname('SENDERCOMPANYNAME').AsString
|
|
|
, MT1.fieldbyname('BSNO').asstring, '<27><><EFBFBD><EFBFBD> <20><>ͨ<EFBFBD><CDA8>Ϣ');
|
|
|
|
|
|
//GETMSG(MT_MSG.fieldbyname('BSNO').asstring);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
//showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>');
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.SetReceivedList;
|
|
|
//<2F>趨<EFBFBD><E8B6A8>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
var
|
|
|
_s, XML: string;
|
|
|
begin
|
|
|
//<2F><><EFBFBD><EFBFBD>
|
|
|
getwebservice_ds;
|
|
|
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingMSG xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1">';
|
|
|
_s := _s + '<MSGList> ';
|
|
|
_s := _s + ' <MSGInfo> ';
|
|
|
_s := _s + ' <RECEIVERID>' + frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</RECEIVERID> ';
|
|
|
_s := _s + ' <BSTYPE><3E><>ͨ<EFBFBD><CDA8>Ϣ</BSTYPE> ';
|
|
|
_s := _s + ' <BSNO>' + MT1.fieldbyname('BSNO').asstring + '</BSNO> ';
|
|
|
_s := _s + ' <FieldName><3E><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD></FieldName> ';
|
|
|
//_s:=_s+' <FieldValue>'+mmo1.Lines.Text+'</FieldValue> ';
|
|
|
_s := _s + ' </MSGInfo> ';
|
|
|
_s := _s + '</MSGList> ';
|
|
|
_s := _s + '</BookingMSG> ';
|
|
|
|
|
|
XML := mServiceSoap_Ds.SetMSGRec(_s);
|
|
|
|
|
|
if (pos('<27>ɹ<EFBFBD>', XML) > 0) then
|
|
|
begin
|
|
|
|
|
|
MT_MSG.First;
|
|
|
qryGetOpseae2.Close;
|
|
|
qryGetOpseae2.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>').Value := MT1.fieldbyname('BSNO').asstring;
|
|
|
qryGetOpseae2.Open;
|
|
|
|
|
|
while not MT_MSG.Eof do begin
|
|
|
if (MT_MSG.FieldByName('Received').AsString='δ<><CEB4>') then begin
|
|
|
Qry1.Close;
|
|
|
Qry1.SQL.Text:='select '''+MT_MSG.fieldbyname('FieldValue').AsString+''' <20><>Ϣ';
|
|
|
Qry1.Open;
|
|
|
Booking_add(Qry1, qryGetOpseae2.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring
|
|
|
, MT_MSG.fieldbyname('SENDERNAME').AsString
|
|
|
, MT_MSG.fieldbyname('SENDERCOMPANYNAME').AsString
|
|
|
, MT1.fieldbyname('BSNO').asstring, '<27><><EFBFBD><EFBFBD> <20><>ͨ<EFBFBD><CDA8>Ϣ');
|
|
|
end;
|
|
|
MT_MSG.next;
|
|
|
end;
|
|
|
GETMSG(MT_MSG.fieldbyname('BSNO').asstring);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
//showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>');
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.N3Click(Sender: TObject);
|
|
|
begin
|
|
|
SetReceivedList;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.act1Execute(Sender: TObject);
|
|
|
begin
|
|
|
btn1Click(self);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.act2Execute(Sender: TObject);
|
|
|
var
|
|
|
_TB: Boolean;
|
|
|
begin
|
|
|
_TB := chk1.Checked;
|
|
|
chk1.Checked := True;
|
|
|
btn1Click(self);
|
|
|
chk1.Checked := _TB;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.DBEdit1Change(Sender: TObject);
|
|
|
begin
|
|
|
if (MT1.fieldbyname('BSTYPE').AsString = '<27><><EFBFBD><EFBFBD>') then
|
|
|
begin
|
|
|
if (MT1.fieldbyname('Bookingtype').AsString = '<27><><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD>') or (MT1.fieldbyname('Bookingtype').AsString = '<27><><EFBFBD><EFBFBD>') then
|
|
|
begin
|
|
|
bsSkinButton1.Enabled := false;
|
|
|
//bsSkinButton2.Enabled := true;
|
|
|
bsSkinButton3.Enabled := true;
|
|
|
//bsSkinButton5.Visible := false;
|
|
|
//bsSkinButton6.Visible := false;
|
|
|
end
|
|
|
else if (MT1.fieldbyname('Bookingtype').AsString = '<27><><EFBFBD><EFBFBD>') then
|
|
|
begin
|
|
|
bsSkinButton1.Enabled := false;
|
|
|
//bsSkinButton2.Enabled := false;
|
|
|
bsSkinButton3.Enabled := false;
|
|
|
//bsSkinButton5.Visible := false;
|
|
|
//bsSkinButton6.Visible := false;
|
|
|
end else begin
|
|
|
bsSkinButton1.Enabled := true;
|
|
|
|
|
|
bsSkinButton3.Enabled := true;
|
|
|
end;
|
|
|
GetCtnConfirm(MT1.fieldbyname('BSNO').AsString);
|
|
|
end
|
|
|
else if (MT1.fieldbyname('BSTYPE').AsString = '<27><><EFBFBD><EFBFBD>֪ͨ') or (MT1.fieldbyname('BSTYPE').AsString = 'ҵ<><D2B5>ת<EFBFBD><D7AA>') then
|
|
|
begin
|
|
|
bsSkinButton1.Enabled := false;
|
|
|
bsSkinButton2.Enabled := false;
|
|
|
bsSkinButton3.Enabled := true;
|
|
|
//bsSkinButton5.Visible := false;
|
|
|
//bsSkinButton6.Visible := false;
|
|
|
end
|
|
|
else if (MT1.fieldbyname('BSTYPE').AsString = '<27><>ͨ<EFBFBD><CDA8>Ϣ') then
|
|
|
begin
|
|
|
bsSkinButton1.Enabled := false;
|
|
|
bsSkinButton2.Enabled := false;
|
|
|
bsSkinButton3.Enabled := true;
|
|
|
//bsSkinButton5.Visible := false;
|
|
|
//bsSkinButton6.Visible := false;
|
|
|
if loaded then
|
|
|
GETMSG(MT1.fieldbyname('BSNO').AsString);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
bsSkinButton1.Enabled := true;
|
|
|
bsSkinButton2.Enabled := true;
|
|
|
bsSkinButton3.Enabled := true;
|
|
|
//bsSkinButton5.Visible := true;
|
|
|
//bsSkinButton6.Visible := true;
|
|
|
end;
|
|
|
|
|
|
if (MT1.fieldbyname('BSTYPE').AsString = '<27><><EFBFBD><EFBFBD>') or (MT1.fieldbyname('BSTYPE').AsString = 'ҵ<><D2B5>ת<EFBFBD><D7AA>') then
|
|
|
begin
|
|
|
bsSkinNotebook1.PageIndex := 2;
|
|
|
end
|
|
|
else if (MT1.fieldbyname('BSTYPE').AsString = '<27><><EFBFBD><EFBFBD>֪ͨ') then
|
|
|
begin
|
|
|
bsSkinNotebook1.PageIndex := 1;
|
|
|
end
|
|
|
else if (MT1.fieldbyname('BSTYPE').AsString = '<27><>ͨ<EFBFBD><CDA8>Ϣ') then
|
|
|
begin
|
|
|
bsSkinNotebook1.PageIndex := 3;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
bsSkinNotebook1.PageIndex := 0;
|
|
|
end;
|
|
|
|
|
|
if trim(MT1.fieldbyname('bstype').asstring) = '<27>ᵥȷ<E1B5A5><C8B7>' then
|
|
|
begin
|
|
|
setdiffcolor;
|
|
|
GetCtnConfirm(mt1.FieldByName('bsno').AsString);
|
|
|
if MT1.fieldbyname('Bookingtype').AsString = '<27>ܾ<EFBFBD>' then
|
|
|
begin
|
|
|
bsSkinButton1.Enabled := false;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.setdiffcolor;
|
|
|
var
|
|
|
i, j: integer;
|
|
|
myfield, Source, Dest: string;
|
|
|
SourceList, DestList: TStringList;
|
|
|
begin
|
|
|
SourceList := TStringList.Create;
|
|
|
DestList := TStringList.Create;
|
|
|
if not t_op_seae.Active then
|
|
|
t_op_seae.Open;
|
|
|
for i := 0 to bsSkinPanel1.ControlCount - 1 do
|
|
|
with bsSkinPanel1 do
|
|
|
if (bsSkinPanel1.Controls[i] is TcxDBMemo) then
|
|
|
begin
|
|
|
myfield := (Controls[i] as TcxDBMemo).databinding.DataField;
|
|
|
|
|
|
if (MT1.FindField(myfield) <> nil) and (t_op_seae.FindField(myfield) <> nil) then
|
|
|
begin
|
|
|
SourceList.Text := t_op_seae.fieldbyname(myfield).asstring;
|
|
|
DestList.Text := MT1.fieldbyname(myfield).asstring;
|
|
|
|
|
|
Source := '';
|
|
|
for j := 0 to SourceList.Count - 1 do
|
|
|
begin
|
|
|
if Source = '' then
|
|
|
Source := StringReplace(trim(SourceList.Strings[j]), ' ', ' ', [rfReplaceAll])
|
|
|
else
|
|
|
Source := Source + ' ' + StringReplace(trim(SourceList.Strings[j]), ' ', ' ', [rfReplaceAll]);
|
|
|
end;
|
|
|
|
|
|
Dest := '';
|
|
|
for j := 0 to DestList.Count - 1 do
|
|
|
begin
|
|
|
if Dest = '' then
|
|
|
Dest := StringReplace(trim(DestList.Strings[j]), ' ', ' ', [rfReplaceAll])
|
|
|
else
|
|
|
Dest := Dest + ' ' + StringReplace(trim(DestList.Strings[j]), ' ', ' ', [rfReplaceAll]);
|
|
|
end;
|
|
|
if AnsiCompareStr(Source, Dest) <> 0 then
|
|
|
(bsSkinPanel1.Controls[i] as TcxDBMemo).Style.Font.Color := clred
|
|
|
else
|
|
|
(bsSkinPanel1.Controls[i] as TcxDBMemo).Style.Font.Color := clblack;
|
|
|
|
|
|
//showmessage(Source+#13#10+Dest);
|
|
|
end;
|
|
|
end
|
|
|
else if (bsSkinPanel1.Controls[i] is TcxDBTextEdit) then
|
|
|
begin
|
|
|
myfield := (Controls[i] as TcxDBTextEdit).databinding.DataField;
|
|
|
if (MT1.FindField(myfield) <> nil) and (t_op_seae.FindField(myfield) <> nil) then
|
|
|
if AnsiCompareStr(MT1.Fieldbyname(myfield).asstring, t_op_seae.fieldbyname(myfield).asstring) <> 0 then
|
|
|
(bsSkinPanel1.Controls[i] as TcxDBTextEdit).Style.Font.Color := clred
|
|
|
else
|
|
|
(bsSkinPanel1.Controls[i] as TcxDBTextEdit).Style.Font.Color := clblack;
|
|
|
end;
|
|
|
try
|
|
|
|
|
|
|
|
|
finally
|
|
|
SourceList.Free;
|
|
|
DestList.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.CreatememtblctnDiff;
|
|
|
var
|
|
|
i: integer;
|
|
|
begin
|
|
|
with frm_op_seae_diffctn.memtblwebctn do
|
|
|
begin
|
|
|
Close;
|
|
|
EmptyTable;
|
|
|
Fields.Clear;
|
|
|
FieldDefs.Clear;
|
|
|
FieldDefs.Add('id', ftInteger, 0, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 10, false);
|
|
|
FieldDefs.Add('<27>ߴ<EFBFBD>', ftString, 10, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 10, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 20, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 20, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftInteger, 0, false);
|
|
|
FieldDefs.Add('<27><>װ', ftString, 40, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftFloat, 0, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftFloat, 0, false);
|
|
|
|
|
|
FieldDefs.Add('<27><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>', ftString, 10, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD>سߴ<D8B3>', ftString, 10, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', ftString, 10, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', ftString, 20, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>', ftString, 20, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>', ftInteger, 0, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD>ذ<EFBFBD>װ', ftString, 40, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', ftFloat, 0, false);
|
|
|
FieldDefs.Add('<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>', ftFloat, 0, false);
|
|
|
|
|
|
FieldDefs.Add('Exist', ftString, 1, false);
|
|
|
|
|
|
FieldDefs.Add('FindCtn', ftString, 1, false);
|
|
|
CreateTable;
|
|
|
IndexFieldNames := 'FindCtn;<3B><><EFBFBD><EFBFBD>;id';
|
|
|
Open;
|
|
|
end;
|
|
|
i := 0;
|
|
|
|
|
|
// frm_op_seae_diffctn.memtblwebctn.First;
|
|
|
|
|
|
with memtblwebCtn do
|
|
|
begin
|
|
|
First;
|
|
|
while not eof do
|
|
|
begin
|
|
|
i := i + 1;
|
|
|
frm_op_seae_diffctn.memtblwebctn.Insert;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('id').AsInteger := i;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27>ߴ<EFBFBD>').AsString := FieldByName('<27>ߴ<EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger := FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><>װ').AsString := FieldByName('<27><>װ').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat := FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat := FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
|
|
|
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>').AsString := '';
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>سߴ<D8B3>').AsString := '';
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString := '';
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString := '';
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>').AsString := '';
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>').AsInteger := 0;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ذ<EFBFBD>װ').AsString := '';
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat := 0;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>').AsFloat := 0;
|
|
|
|
|
|
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('FindCtn').AsString := '1';
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('Exist').AsString := '0';
|
|
|
frm_op_seae_diffctn.memtblwebctn.post;
|
|
|
Next;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
//frm_op_seae_diffctn.memtblwebctn.First;
|
|
|
|
|
|
with t_op_ctn do
|
|
|
begin
|
|
|
First;
|
|
|
while not eof do
|
|
|
begin
|
|
|
i := i + 1;
|
|
|
if trim(FieldByName('<27><><EFBFBD><EFBFBD>').AsString)<>'' then
|
|
|
begin
|
|
|
if frm_op_seae_diffctn.memtblwebctn.Locate('<27><><EFBFBD><EFBFBD>;Exist', varArrayof([FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'0']), []) then
|
|
|
begin
|
|
|
frm_op_seae_diffctn.memtblwebctn.Edit;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>سߴ<D8B3>').AsString := FieldByName('<27>ߴ<EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>').AsInteger := FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ذ<EFBFBD>װ').AsString := FieldByName('<27><>װ').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat := FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>').AsFloat := FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('FindCtn').AsString := '0';
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('Exist').AsString := '1';
|
|
|
frm_op_seae_diffctn.memtblwebctn.post;
|
|
|
end
|
|
|
else
|
|
|
if frm_op_seae_diffctn.memtblwebctn.Locate('Exist', '0', []) then
|
|
|
begin
|
|
|
frm_op_seae_diffctn.memtblwebctn.Edit;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>سߴ<D8B3>').AsString := FieldByName('<27>ߴ<EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>').AsInteger := FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ذ<EFBFBD>װ').AsString := FieldByName('<27><>װ').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat := FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>').AsFloat := FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('FindCtn').AsString := '1';
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('Exist').AsString := '1';
|
|
|
frm_op_seae_diffctn.memtblwebctn.post;
|
|
|
end
|
|
|
else
|
|
|
if not frm_op_seae_diffctn.memtblwebctn.Locate('Exist', '0', []) then
|
|
|
begin
|
|
|
frm_op_seae_diffctn.memtblwebctn.Insert;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('id').AsInteger := i;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>سߴ<D8B3>').AsString := FieldByName('<27>ߴ<EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>').AsInteger := FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ذ<EFBFBD>װ').AsString := FieldByName('<27><>װ').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat := FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>').AsFloat := FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('FindCtn').AsString := '1';
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('Exist').AsString := '1';
|
|
|
frm_op_seae_diffctn.memtblwebctn.post;
|
|
|
end;
|
|
|
end;
|
|
|
Next;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with t_op_ctn do
|
|
|
begin
|
|
|
First;
|
|
|
while not eof do
|
|
|
begin
|
|
|
i := i + 1;
|
|
|
if trim(FieldByName('<27><><EFBFBD><EFBFBD>').AsString)='' then
|
|
|
begin
|
|
|
if frm_op_seae_diffctn.memtblwebctn.Locate('Exist', '0', []) then
|
|
|
begin
|
|
|
frm_op_seae_diffctn.memtblwebctn.Edit;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>سߴ<D8B3>').AsString := FieldByName('<27>ߴ<EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>').AsInteger := FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ذ<EFBFBD>װ').AsString := FieldByName('<27><>װ').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat := FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>').AsFloat := FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('FindCtn').AsString := '1';
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('Exist').AsString := '1';
|
|
|
frm_op_seae_diffctn.memtblwebctn.post;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
frm_op_seae_diffctn.memtblwebctn.Insert;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('id').AsInteger := i;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>سߴ<D8B3>').AsString := FieldByName('<27>ߴ<EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>').AsString := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>').AsInteger := FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ذ<EFBFBD>װ').AsString := FieldByName('<27><>װ').AsString;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat := FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>').AsFloat := FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('FindCtn').AsString := '1';
|
|
|
frm_op_seae_diffctn.memtblwebctn.FieldByName('Exist').AsString := '1';
|
|
|
frm_op_seae_diffctn.memtblwebctn.post;
|
|
|
end;
|
|
|
end;
|
|
|
Next;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
frm_op_seae_diffctn.memtblwebctn.SortOn('FindCtn;<3B><><EFBFBD><EFBFBD>;id', []);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.Creatememtblctn;
|
|
|
begin
|
|
|
memtblwebCtn.Close;
|
|
|
memtblwebCtn.EmptyTable;
|
|
|
memtblwebCtn.Fields.Clear;
|
|
|
memtblwebCtn.FieldDefs.Clear;
|
|
|
memtblwebCtn.FieldDefs.Add('ID', ftInteger, 0, false);
|
|
|
memtblwebCtn.FieldDefs.Add('bsno', ftString, 40, false);
|
|
|
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 10, false);
|
|
|
memtblwebCtn.FieldDefs.Add('<27>ߴ<EFBFBD>', ftString, 10, false);
|
|
|
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 10, false);
|
|
|
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ', ftString, 20, false);
|
|
|
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 20, false);
|
|
|
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 20, false);
|
|
|
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftInteger, 0, false);
|
|
|
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftInteger, 0, false);
|
|
|
memtblwebCtn.FieldDefs.Add('<27><>װ', ftString, 40, false);
|
|
|
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftFloat, 0, false);
|
|
|
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftFloat, 0, false);
|
|
|
memtblwebCtn.FieldDefs.Add('TEU', ftInteger, 0, false);
|
|
|
memtblwebCtn.CreateTable;
|
|
|
memtblwebCtn.IndexFieldNames := 'ID';
|
|
|
memtblwebCtn.Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.GetCtnConfirm(bsNo: string);
|
|
|
var
|
|
|
_s, _t, _id, _no, block, xml, onlinetimemark, onlinePosted, mttimemark, url, kjqj, wtdw, ETD, CLOSINGDATE, CTN, stl, CtnNoOne: string; //<2F><><EFBFBD><EFBFBD>
|
|
|
p1, p2, _c, _i, cntcount: Integer;
|
|
|
username, marks, WTBH, HBLNO, code_trade, code_source, bstype: string;
|
|
|
_Time: Tdatetime;
|
|
|
aAdoQuery: TAdoQuery;
|
|
|
begin
|
|
|
sysNOExistCtn := '';
|
|
|
|
|
|
Label1.Visible:=false;
|
|
|
|
|
|
Label1.Caption := '';
|
|
|
Label1.Font.Color:= clWindowText;
|
|
|
Label1.Font.Style:= [];
|
|
|
|
|
|
|
|
|
// bsSkinLabel1.DefaultFont.Styl
|
|
|
|
|
|
getwebservice_ds;
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?> ';
|
|
|
_s := _s + '<BookingInfo xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Booking> ';
|
|
|
_s := _s + ' <BSNO>' + BSNO + '</BSNO> ';
|
|
|
_s := _s + ' </Booking> ';
|
|
|
_s := _s + '</BookingInfo> ';
|
|
|
xml := mServiceSoap_Ds.GetBsnoInfo(_s);
|
|
|
|
|
|
p1 := frm_data_share.GettimePotion(1, '<Booking>', xml);
|
|
|
p2 := frm_data_share.GettimePotion(1, '</Booking>', xml);
|
|
|
block := Copy(xml, p1, p2 - p1);
|
|
|
onlinetimemark := frm_data_share.GetXMLValue('TimeMark', block);
|
|
|
onlinePosted := frm_data_share.GetXMLValue('ISPOSTED', block);
|
|
|
mttimemark := mt1.fieldbyname('TIMEMARK').AsString;
|
|
|
memtblwebCtn.EmptyTable;
|
|
|
memtblwebCtn.open;
|
|
|
memtblwebCtn.DisableControls;
|
|
|
_c := frm_data_share.countString('CTNINFO', mt1.fieldbyname('Ctninfo').asstring);
|
|
|
|
|
|
//showmessage(inttostr(_c));
|
|
|
//showmessage(mt1.fieldbyname('Ctninfo').asstring);
|
|
|
|
|
|
for _i := 1 to _c do
|
|
|
begin
|
|
|
with memtblwebCtn do
|
|
|
begin
|
|
|
p1 := frm_data_share.GettimePotion(_i, '<CTNINFO>', mt1.fieldbyname('Ctninfo').asstring);
|
|
|
p2 := frm_data_share.GettimePotion(_i, '</CTNINFO>', mt1.fieldbyname('Ctninfo').asstring);
|
|
|
block := Copy(mt1.fieldbyname('Ctninfo').asstring, p1, p2-p1);
|
|
|
|
|
|
CTN := trim(frm_data_share.GetXMLValue('CTN', block));
|
|
|
if CTN = '' then
|
|
|
begin
|
|
|
showmessage('<27><>Ʊҵ<C6B1><D2B5><EFBFBD>ڵļ<DAB5>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣû<CFA2><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
// showmessage(frm_data_share.GetXMLValue('CNTRNO', block));
|
|
|
|
|
|
Append;
|
|
|
// showmessage(inttostr(_i)+' '+frm_data_share.GetXMLValue('CNTRNO', block)+' '+frm_data_share.GetXMLValue('SEALNO', block)+#13#10+block);
|
|
|
|
|
|
// WriteLog(inttostr(P1)+'_'+inttostr(P2)+'__'+#13#10+block);
|
|
|
|
|
|
|
|
|
|
|
|
fieldbyname('ID').AsInteger := _i;
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('CTNNUM', block);
|
|
|
if frm_data_share.t_code_ctn.Locate('<27><><EFBFBD><EFBFBD>EDI<44><49><EFBFBD><EFBFBD>', CTN, []) then
|
|
|
begin
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD>').AsString := frm_data_share.t_code_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.t_code_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
fieldbyname('<27>ߴ<EFBFBD>').Value := frm_data_share.t_code_ctn.fieldbyname('<27>ߴ<EFBFBD>').AsString;
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').Value := frm_data_share.t_code_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
if FieldByName('<27>ߴ<EFBFBD>').asstring = '20' then
|
|
|
FieldByName('TEU').asInteger := 1;
|
|
|
if (FieldByName('<27>ߴ<EFBFBD>').asstring = '40') or (FieldByName('<27>ߴ<EFBFBD>').asstring = '45') then
|
|
|
FieldByName('TEU').asInteger := 2;
|
|
|
end;
|
|
|
fieldbyname('bsno').AsString := bsno;
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('CNTRNO', block);
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD>').Value := frm_data_share.GetXMLValue('SEALNO', block);
|
|
|
if frm_data_share.GetXMLValue('PKGS', block) <> '' then
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD>').AsInteger := StrToInt(frm_data_share.GetXMLValue('PKGS', block));
|
|
|
if frm_data_share.GetXMLValue('KGS', block) <> '' then
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat := strtofloatdef(frm_data_share.GetXMLValue('KGS', block), 0);
|
|
|
if frm_data_share.GetXMLValue('CBM', block) <> '' then
|
|
|
fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat := strtofloatdef(frm_data_share.GetXMLValue('CBM', block), 0);
|
|
|
fieldbyname('<27><>װ').Value := frm_data_share.GetXMLValue('KINDPKGS', block);
|
|
|
post;
|
|
|
end;
|
|
|
end;
|
|
|
memtblwebCtn.EnableControls;
|
|
|
|
|
|
if not t_op_ctn.Active then
|
|
|
t_op_ctn.Active := true;
|
|
|
with t_op_ctn do
|
|
|
try
|
|
|
DisableControls;
|
|
|
First;
|
|
|
while not eof do
|
|
|
begin
|
|
|
if not memtblwebCtn.Locate('<27><><EFBFBD><EFBFBD>', FieldByName('<27><><EFBFBD><EFBFBD>').AsString, []) then
|
|
|
begin
|
|
|
if sysNOExistCtn = '' then
|
|
|
sysNOExistCtn := FieldByName('<27><><EFBFBD><EFBFBD>').AsString
|
|
|
else
|
|
|
sysNOExistCtn := sysNOExistCtn + #13#10 + FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
cntcount := cntcount + 1;
|
|
|
CtnNoOne := FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
end;
|
|
|
Next;
|
|
|
end;
|
|
|
finally
|
|
|
if cntcount = 0 then
|
|
|
begin
|
|
|
Label1.Visible:=false;
|
|
|
Label1.Caption := '';
|
|
|
Label1.Font.Color:= clWindowText;
|
|
|
Label1.Font.Style:= [];
|
|
|
|
|
|
end;
|
|
|
|
|
|
if sysNOExistCtn <> '' then
|
|
|
begin
|
|
|
|
|
|
if cntcount = 1 then
|
|
|
begin
|
|
|
Label1.Visible:=true;
|
|
|
Label1.Font.Style:= [fsUnderline];
|
|
|
Label1.Caption := '<27>ͻ<EFBFBD>ȷ<EFBFBD>ϼ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD>ݺͱ<DDBA><CDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD>鿴<EFBFBD><E9BFB4>ϸ):' + CtnNoOne;
|
|
|
Label1.Font.Color := ClBlue;
|
|
|
|
|
|
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
Label1.Visible:=true;
|
|
|
Label1.Font.Style:= [fsUnderline];
|
|
|
Label1.Caption := '<27>ͻ<EFBFBD>ȷ<EFBFBD>ϼ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD>ݺͱ<DDBA><CDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD>鿴<EFBFBD><E9BFB4>ϸ):' + CtnNoOne + '...';
|
|
|
Label1.Font.Color := ClBlue;
|
|
|
end;
|
|
|
end;
|
|
|
EnableControls;
|
|
|
end;
|
|
|
{
|
|
|
t_op_ctn.Close;
|
|
|
t_op_ctn.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn.Open;
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.update_ctn(table: Tadoquery);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
var
|
|
|
num_ctn,ctn1,ctn2,ctn3,ctn4,ctn5,ctn6,ctn7,ctn8,ctn9,ctn10,ctnother,ctn20,ctn40,ctn40h,ctn45,ttlCtn: integer;
|
|
|
ctn_string, str: widestring;
|
|
|
if_first: boolean;
|
|
|
str_list: Tstringlist;
|
|
|
bok: Tbookmark;
|
|
|
aAdoQuery:TAdoQuery;
|
|
|
begin
|
|
|
// table.Open;
|
|
|
table.First;
|
|
|
if table.IsEmpty then
|
|
|
begin
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str_list := Tstringlist.Create();
|
|
|
frm_main.t_sum_ctn.close;
|
|
|
frm_main.t_sum_ctn.open;
|
|
|
// bok:=table.GetBookmark;
|
|
|
try
|
|
|
|
|
|
// table.Open;
|
|
|
try
|
|
|
table.DisableControls;
|
|
|
frm_main.t_sum_ctn.DisableControls;
|
|
|
table.first;
|
|
|
while not table.eof do
|
|
|
begin
|
|
|
if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>1').asstring then
|
|
|
begin
|
|
|
ctn1 := ctn1 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
ttlCtn:= ttlCtn + table.fieldbyname('TEU').asinteger;
|
|
|
end
|
|
|
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>2').asstring then
|
|
|
begin
|
|
|
ctn2 := ctn2 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
ttlCtn:= ttlCtn + table.fieldbyname('TEU').asinteger;
|
|
|
end
|
|
|
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>3').asstring then
|
|
|
begin
|
|
|
ctn3 := ctn3 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
ttlCtn:= ttlCtn + table.fieldbyname('TEU').asinteger;
|
|
|
end
|
|
|
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>4').asstring then
|
|
|
begin
|
|
|
ctn4 := ctn4 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
ttlCtn:= ttlCtn + table.fieldbyname('TEU').asinteger;
|
|
|
end
|
|
|
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>5').asstring then
|
|
|
begin
|
|
|
ctn5 := ctn5 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
ttlCtn:= ttlCtn + table.fieldbyname('TEU').asinteger;
|
|
|
end
|
|
|
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>6').asstring then
|
|
|
begin
|
|
|
ctn6 := ctn6 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
ttlCtn:= ttlCtn + table.fieldbyname('TEU').asinteger;
|
|
|
end
|
|
|
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>7').asstring then
|
|
|
begin
|
|
|
ctn7 := ctn7 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
ttlCtn:= ttlCtn + table.fieldbyname('TEU').asinteger;
|
|
|
end
|
|
|
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>8').asstring then
|
|
|
begin
|
|
|
ctn8 := ctn8 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
ttlCtn:= ttlCtn + table.fieldbyname('TEU').asinteger;
|
|
|
end
|
|
|
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>9').asstring then
|
|
|
begin
|
|
|
ctn9 := ctn9 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
ttlCtn:= ttlCtn + table.fieldbyname('TEU').asinteger;
|
|
|
end
|
|
|
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>10').asstring then
|
|
|
begin
|
|
|
ctn10 := ctn10 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
ttlCtn:= ttlCtn + table.fieldbyname('TEU').asinteger;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
ctnother := ctnother + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
ttlCtn:= ttlCtn + table.fieldbyname('TEU').asinteger;
|
|
|
end;
|
|
|
if not frm_main.t_sum_ctn.locate('<27><><EFBFBD><EFBFBD>', table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring, []) then
|
|
|
begin
|
|
|
frm_main.t_sum_ctn.Append;
|
|
|
frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD>'] := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'] := table.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring;
|
|
|
frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD>'] := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
frm_main.t_sum_ctn.post;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
frm_main.t_sum_ctn.edit;
|
|
|
frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD>'] := frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD>'] + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
frm_main.t_sum_ctn.post;
|
|
|
end;
|
|
|
|
|
|
if table.fieldbyname('<27>ߴ<EFBFBD>').asstring = '20' then
|
|
|
ctn20 := ctn20 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger
|
|
|
else if table.fieldbyname('<27>ߴ<EFBFBD>').asstring = '40' then
|
|
|
begin
|
|
|
if (table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = 'GP') or (table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = 'RF') or (table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = 'OT') or (table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring = 'GOH') then
|
|
|
begin
|
|
|
ctn40 := ctn40 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
ctn40h := ctn40h + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger
|
|
|
end;
|
|
|
end
|
|
|
else if (table.fieldbyname('<27>ߴ<EFBFBD>').asstring) = '45' then
|
|
|
ctn45 := ctn45 + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
table.next;
|
|
|
end;
|
|
|
finally
|
|
|
table.EnableControls;
|
|
|
frm_main.t_sum_ctn.EnableControls;
|
|
|
//table.GotoBookmark(bok);
|
|
|
end;
|
|
|
ctn_string := '';
|
|
|
if_first := true;
|
|
|
num_ctn := 0;
|
|
|
str := '';
|
|
|
try
|
|
|
frm_main.t_sum_ctn.DisableControls;
|
|
|
frm_main.t_sum_ctn.first;
|
|
|
|
|
|
while not frm_main.t_sum_ctn.eof do
|
|
|
begin
|
|
|
if ctn_string = '' then
|
|
|
begin
|
|
|
ctn_string := frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring + '*' + frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
ctn_string := ctn_string + ' ' + frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring + '*' + frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
if if_first then
|
|
|
begin
|
|
|
str := ntoc(frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat, true) + '(' + frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring + '*' + frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + ')';
|
|
|
if_first := false;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str := str + ' AND ' + ntoc(frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat, true) + '(' + frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring + '*' + frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + ')';
|
|
|
end;
|
|
|
num_ctn := num_ctn + frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
str_list.Add(frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring + '*' + frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + '-' + frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring);
|
|
|
frm_main.t_sum_ctn.next;
|
|
|
end;
|
|
|
if num_ctn > 1 then
|
|
|
begin
|
|
|
str := 'SAY: ' + str + ' CONTAINERS ONLY.'
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str := 'SAY: ' + str + ' CONTAINER ONLY.'
|
|
|
end;
|
|
|
finally
|
|
|
frm_main.t_sum_ctn.EnableControls;
|
|
|
end;
|
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Update t_op_seae set');
|
|
|
sql.Add('<27><><EFBFBD><EFBFBD>1=:<3A><><EFBFBD><EFBFBD>1');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>2=:<3A><><EFBFBD><EFBFBD>2');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>3=:<3A><><EFBFBD><EFBFBD>3');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>4=:<3A><><EFBFBD><EFBFBD>4');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>5=:<3A><><EFBFBD><EFBFBD>5');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>6=:<3A><><EFBFBD><EFBFBD>6');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>7=:<3A><><EFBFBD><EFBFBD>7');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>8=:<3A><><EFBFBD><EFBFBD>8');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>9=:<3A><><EFBFBD><EFBFBD>9');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>10=:<3A><><EFBFBD><EFBFBD>10');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add(',<2C><>TEU=:<3A><>TEU');
|
|
|
sql.Add(',<2C><>װ<EFBFBD><D7B0>=:<3A><>װ<EFBFBD><D7B0>');
|
|
|
sql.Add(',<2C>Ʒѱ<C6B7>=:<3A>Ʒѱ<C6B7>');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д');
|
|
|
sql.Add(',<2C>ϼ<EFBFBD>20=:<3A>ϼ<EFBFBD>20');
|
|
|
sql.Add(',<2C>ϼ<EFBFBD>40=:<3A>ϼ<EFBFBD>40');
|
|
|
sql.Add(',<2C>ϼ<EFBFBD>40H=:<3A>ϼ<EFBFBD>40H');
|
|
|
sql.Add(',<2C>ϼ<EFBFBD>45=:<3A>ϼ<EFBFBD>45');
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>1').Value:=ctn1;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>2').Value:=ctn2;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>3').Value:=ctn3;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>4').Value:=ctn4;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>5').Value:=ctn5;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>6').Value:=ctn6;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>7').Value:=ctn7;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>8').Value:=ctn8;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>9').Value:=ctn9;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>10').Value:=ctn10;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=ctnother;
|
|
|
Parameters.ParamByName('<27><>TEU').Value:=ttlCtn;
|
|
|
|
|
|
Parameters.ParamByName('<27><>װ<EFBFBD><D7B0>').Value:=ctn_string;
|
|
|
Parameters.ParamByName('<27>Ʒѱ<C6B7>').Value:=str_list.Text;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д').Value:=str;
|
|
|
Parameters.ParamByName('<27>ϼ<EFBFBD>20').Value:=ctn20;
|
|
|
Parameters.ParamByName('<27>ϼ<EFBFBD>40').Value:=ctn40;
|
|
|
Parameters.ParamByName('<27>ϼ<EFBFBD>40H').Value:=ctn40H;
|
|
|
Parameters.ParamByName('<27>ϼ<EFBFBD>45').Value:=ctn45;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
ExecSQL;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
|
|
|
except
|
|
|
on e: exception do
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>????');
|
|
|
showmessage(e.Message);
|
|
|
str_list.free;
|
|
|
/// table.GotoBookmark(bok);
|
|
|
end;
|
|
|
end;
|
|
|
str_list.free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.update_seae(table: Tadoquery);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
var
|
|
|
if_first: boolean;
|
|
|
pkgs: integer;
|
|
|
kgs, cbm: double;
|
|
|
s, package: string;
|
|
|
aAdoQuery:tAdoQuery;
|
|
|
begin
|
|
|
if table.IsEmpty then
|
|
|
exit;
|
|
|
table.First;
|
|
|
if_first := true;
|
|
|
pkgs := 0;
|
|
|
kgs := 0.00;
|
|
|
cbm := 0.00;
|
|
|
|
|
|
memo1.Lines.Clear;
|
|
|
memo2.Lines.Clear;
|
|
|
memo3.Lines.Clear;
|
|
|
memo4.Lines.Clear;
|
|
|
try
|
|
|
table.DisableControls;
|
|
|
while not table.Eof do
|
|
|
begin
|
|
|
if strtobool(get_parameters_value(139, 'true')) then
|
|
|
begin
|
|
|
if if_first then
|
|
|
begin
|
|
|
if (Trim(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) <> '') then
|
|
|
memo1.Lines.Text := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + '/' + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
memo2.Lines.Text := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + table.fieldbyname('<27><>װ').asstring;
|
|
|
memo3.Lines.Text := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + 'KGS';
|
|
|
memo4.Lines.Text := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + 'CBM';
|
|
|
pkgs := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
kgs := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
cbm := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
package:=table.fieldbyname('<27><>װ').asstring;
|
|
|
if_first := false;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if (Trim(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) <> '') then
|
|
|
memo1.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + '/' + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
memo2.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + table.fieldbyname('<27><>װ').asstring);
|
|
|
memo3.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + 'KGS');
|
|
|
memo4.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + 'CBM');
|
|
|
pkgs := pkgs + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
kgs := kgs + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
cbm := cbm + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
package:=table.fieldbyname('<27><>װ').asstring;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if if_first then
|
|
|
begin
|
|
|
memo1.Lines.Text := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + '/' + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + '/' + table.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring + '/' + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + table.fieldbyname('<27><>װ').asstring + '/' + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + 'KGS' + '/' + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + 'CBM';
|
|
|
memo2.Lines.Text := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + table.fieldbyname('<27><>װ').asstring;
|
|
|
memo3.Lines.Text := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + 'KGS';
|
|
|
memo4.Lines.Text := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + 'CBM';
|
|
|
pkgs := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
kgs := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
cbm := table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
package:=table.fieldbyname('<27><>װ').asstring;
|
|
|
if_first := false;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
memo1.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + '/' + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + '/' + table.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring + '/' + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + table.fieldbyname('<27><>װ').asstring + '/' + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + 'KGS' + '/' + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + 'CBM');
|
|
|
memo2.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + table.fieldbyname('<27><>װ').asstring);
|
|
|
memo3.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + 'KGS');
|
|
|
memo4.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring + 'CBM');
|
|
|
pkgs := pkgs + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
kgs := kgs + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
cbm := cbm + table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
package:=table.fieldbyname('<27><>װ').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
table.next;
|
|
|
end;
|
|
|
|
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('Update t_op_seae set');
|
|
|
sql.Add('<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>=:<3A><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>').Value:=memo1.Lines.Text;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ').Value:=memo2.Lines.Text;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=memo3.Lines.Text;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=memo4.Lines.Text;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=pkgs;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=kgs;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=cbm;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
ExecSQL;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
finally
|
|
|
table.EnableControls;
|
|
|
end;
|
|
|
end;
|
|
|
procedure Tfrm_crm_OnLineBooking.Deleteopctn(BSNO: string);
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
begin
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
Close;Sql.Clear;
|
|
|
SQL.Add('Delete from t_op_ctn');
|
|
|
SQL.Add('Where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=BSNO;
|
|
|
ExecSQL;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.Insertopctn(BSNO: string;kbmMemTable:TkbmMemTable);
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
begin
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
Close;Sql.Clear;
|
|
|
SQL.Add('Insert into t_op_ctn (<28><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C>ߴ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><>װ,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,TEU,<2C><><EFBFBD><EFBFBD>)');
|
|
|
SQL.Add('values (:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A>ߴ<EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:<3A><>װ,:<3A><><EFBFBD><EFBFBD>,:<3A><><EFBFBD><EFBFBD>,:TEU,:<3A><><EFBFBD><EFBFBD>)');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value := BSNO;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value := kbmMemTable.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Parameters.ParamByName('<27>ߴ<EFBFBD>').value := kbmMemTable.FieldByName('<27>ߴ<EFBFBD>').AsString;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value := kbmMemTable.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').value := kbmMemTable.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value := kbmMemTable.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value := kbmMemTable.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value := kbmMemTable.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
|
|
|
Parameters.ParamByName('<27><>װ').value := kbmMemTable.FieldByName('<27><>װ').AsString;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value := kbmMemTable.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value := kbmMemTable.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
|
|
|
Parameters.ParamByName('TEU').value := kbmMemTable.FieldByName('TEU').AsInteger;
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').value := kbmMemTable.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
|
|
|
ExecSQL;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
function Tfrm_crm_OnLineBooking.GetSIData: boolean;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
var
|
|
|
aAdoQueryUpdate,at_op_ctn: TAdoQuery;
|
|
|
i, p1, p2, pkgs: integer;
|
|
|
b_checked: boolean;
|
|
|
s, s_ctnItems: string;
|
|
|
_s, url, onlinetimemark, onlinePosted, block, mttimemark: string;
|
|
|
aa: DsWebServiceSoap;
|
|
|
begin
|
|
|
result := false;
|
|
|
pkgs := 0;
|
|
|
b_checked := false;
|
|
|
url := get_WebseviceURL;
|
|
|
aa := GetDsWebServiceSoap(false, url);
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?> ';
|
|
|
_s := _s + '<BookingInfo xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Booking> ';
|
|
|
_s := _s + ' <BSNO>' + mt1.FieldByName('BSNO').value + '</BSNO> ';
|
|
|
_s := _s + ' </Booking> ';
|
|
|
_s := _s + '</BookingInfo> ';
|
|
|
xml := aa.GetBsnoInfo(_s);
|
|
|
p1 := frm_data_share.GettimePotion(1, '<Booking>', xml);
|
|
|
p2 := frm_data_share.GettimePotion(1, '</Booking>', xml);
|
|
|
block := Copy(xml, p1, p2 - p1);
|
|
|
onlinetimemark := frm_data_share.GetXMLValue('TimeMark', block);
|
|
|
onlinePosted := frm_data_share.GetXMLValue('ISPOSTED', block);
|
|
|
|
|
|
mttimemark := mt1.fieldbyname('TIMEMARK').AsString;
|
|
|
|
|
|
if (onlinetimemark <> mttimemark) then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD>仯<EFBFBD><E4BBAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>');
|
|
|
result := true;
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
for i := 0 to bsSkinPanel1.ControlCount - 1 do
|
|
|
with bsSkinPanel1 do
|
|
|
if (bsSkinPanel1.Controls[i] is TcxCheckBox) then
|
|
|
begin
|
|
|
if (bsSkinPanel1.Controls[i] as TcxCheckBox).Checked then
|
|
|
begin
|
|
|
b_checked := true;
|
|
|
end;
|
|
|
end;
|
|
|
if not b_checked then
|
|
|
begin
|
|
|
showmessage('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,û<><C3BB><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>µ<EFBFBD><C2B5><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
aAdoQueryUpdate := CreateAdoQuery;
|
|
|
at_op_ctn := CreateAdoQuery;
|
|
|
with aAdoQueryUpdate do
|
|
|
try
|
|
|
close;
|
|
|
sql.Clear;
|
|
|
sql.Add('Update t_op_seae set ');
|
|
|
if cxCheckBox1.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD> ')
|
|
|
else
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD> ');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').Value := mt1.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := '<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + '<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>';
|
|
|
end;
|
|
|
if cxCheckBox2.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>=:<3A>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD> ')
|
|
|
else
|
|
|
sql.Add(',<2C>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>=:<3A>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD> ');
|
|
|
Parameters.ParamByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').Value := mt1.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := '<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + '<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>';
|
|
|
end;
|
|
|
if cxCheckBox3.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>=:֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD> ')
|
|
|
else
|
|
|
sql.Add(',֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>=:֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD> ');
|
|
|
Parameters.ParamByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').Value := mt1.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := '֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + '֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
if cxCheckBox4.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ')
|
|
|
else
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value := mt1.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
if cxCheckBox5.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><>ͷ=:<3A><>ͷ ')
|
|
|
else
|
|
|
sql.Add(',<2C><>ͷ=:<3A><>ͷ ');
|
|
|
Parameters.ParamByName('<27><>ͷ').Value := mt1.FieldByName('<27><>ͷ').value;
|
|
|
if s = '' then
|
|
|
s := '<27><>ͷ'
|
|
|
else
|
|
|
s := s + #13#10 + '<27><>ͷ';
|
|
|
end;
|
|
|
|
|
|
if cxCheckBox7.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> ')
|
|
|
else
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> ');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := mt1.FieldByName('<27><><EFBFBD><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := '<27><><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + '<27><><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
if cxCheckBox9.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> ')
|
|
|
else
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> ');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := mt1.FieldByName('<27><><EFBFBD><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := '<27><><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + '<27><><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
if cxCheckBox15.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ')
|
|
|
else
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value := mt1.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
if cxCheckBox16.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>=:<3A>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD> ')
|
|
|
else
|
|
|
sql.Add(',<2C>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>=:<3A>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD> ');
|
|
|
Parameters.ParamByName('<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>').Value := mt1.FieldByName('<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := '<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + '<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
if cxCheckBox17.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><><EFBFBD>䷽ʽ=:<3A><><EFBFBD>䷽ʽ ')
|
|
|
else
|
|
|
sql.Add(',<2C><><EFBFBD>䷽ʽ=:<3A><><EFBFBD>䷽ʽ ');
|
|
|
Parameters.ParamByName('<27><><EFBFBD>䷽ʽ').Value := mt1.FieldByName('<27><><EFBFBD>䷽ʽ').value;
|
|
|
if s = '' then
|
|
|
s := 'HS CODE'
|
|
|
else
|
|
|
s := s + #13#10 + 'HS CODE';
|
|
|
end;
|
|
|
|
|
|
if cxCheckBox8.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><><EFBFBD>ѷ<EFBFBD>ʽ=:<3A><><EFBFBD>ѷ<EFBFBD>ʽ')
|
|
|
else
|
|
|
sql.Add(',<2C><><EFBFBD>ѷ<EFBFBD>ʽ=:<3A><><EFBFBD>ѷ<EFBFBD>ʽ');
|
|
|
Parameters.ParamByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').Value := mt1.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').value;
|
|
|
if s = '' then
|
|
|
s := '<27><><EFBFBD>ѷ<EFBFBD>ʽ'
|
|
|
else
|
|
|
s := s + #13#10 + '<27><><EFBFBD>ѷ<EFBFBD>ʽ';
|
|
|
end;
|
|
|
|
|
|
if cxCheckBox11.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('װ<><D7B0><EFBFBD><EFBFBD>=:װ<><D7B0><EFBFBD><EFBFBD>')
|
|
|
else
|
|
|
sql.Add(',װ<><D7B0><EFBFBD><EFBFBD>=:װ<><D7B0><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('װ<><D7B0><EFBFBD><EFBFBD>').Value := mt1.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := 'װ<><D7B0><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + 'װ<><D7B0><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
if cxCheckBox12.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('ж<><D0B6><EFBFBD><EFBFBD>=:ж<><D0B6><EFBFBD><EFBFBD>')
|
|
|
else
|
|
|
sql.Add(',ж<><D0B6><EFBFBD><EFBFBD>=:ж<><D0B6><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('ж<><D0B6><EFBFBD><EFBFBD>').Value := mt1.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := 'ж<><D0B6><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + 'ж<><D0B6><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
if cxCheckBox13.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('Ŀ<>ĵ<EFBFBD>=:Ŀ<>ĵ<EFBFBD>')
|
|
|
else
|
|
|
sql.Add(',Ŀ<>ĵ<EFBFBD>=:Ŀ<>ĵ<EFBFBD>');
|
|
|
Parameters.ParamByName('Ŀ<>ĵ<EFBFBD>').Value := mt1.FieldByName('Ŀ<>ĵ<EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := 'Ŀ<>ĵ<EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + 'Ŀ<>ĵ<EFBFBD>';
|
|
|
end;
|
|
|
if cxCheckBox22.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>')
|
|
|
else
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := mt1.FieldByName('<27><><EFBFBD><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := '<27><><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + '<27><><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
if cxCheckBox23.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><>װ=:<3A><>װ')
|
|
|
else
|
|
|
sql.Add(',<2C><>װ=:<3A><>װ');
|
|
|
Parameters.ParamByName('<27><>װ').Value := mt1.FieldByName('<27><>װ').value;
|
|
|
if s = '' then
|
|
|
s := '<27><>װ'
|
|
|
else
|
|
|
s := s + #13#10 + '<27><>װ';
|
|
|
end;
|
|
|
if cxCheckBox24.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>')
|
|
|
else
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := mt1.FieldByName('<27><><EFBFBD><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := '<27><><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + '<27><><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
if cxCheckBox25.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>')
|
|
|
else
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value := mt1.FieldByName('<27><><EFBFBD><EFBFBD>').value;
|
|
|
if s = '' then
|
|
|
s := '<27><><EFBFBD><EFBFBD>'
|
|
|
else
|
|
|
s := s + #13#10 + '<27><><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
if cxCheckBox21.Checked then
|
|
|
begin
|
|
|
if s = '' then
|
|
|
sql.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д')
|
|
|
else
|
|
|
sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д').Value := mt1.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д').value;
|
|
|
if s = '' then
|
|
|
s := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д'
|
|
|
else
|
|
|
s := s + #13#10 + '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д';
|
|
|
end;
|
|
|
|
|
|
if cxCheckBox26.Checked then
|
|
|
begin
|
|
|
s_ctnItems := 'װ<><D7B0><EFBFBD><EFBFBD>ϸ'
|
|
|
end;
|
|
|
|
|
|
if s <> '' then
|
|
|
begin
|
|
|
if MessageDlg('ȷʵҪ<<3C><><EFBFBD><EFBFBD>><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', mtWarning, [mbyes, mbno], 0) <> mryes then
|
|
|
begin
|
|
|
result := true;
|
|
|
Exit;
|
|
|
end;
|
|
|
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>');
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>').Value := mt1.FieldByName('BSNO').value;
|
|
|
ExecSQL;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if s_ctnItems <> '' then
|
|
|
if MessageDlg('ȷʵҪ<<3C><><EFBFBD><EFBFBD>><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', mtWarning, [mbyes, mbno], 0) <> mryes then
|
|
|
begin
|
|
|
result := true;
|
|
|
Exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
if cxCheckBox26.Checked then
|
|
|
begin
|
|
|
with memtblwebCtn do
|
|
|
try
|
|
|
frm_main.db.BeginTrans;
|
|
|
Deleteopctn(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
First;
|
|
|
while not eof do
|
|
|
begin
|
|
|
Insertopctn(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,memtblwebCtn);
|
|
|
pkgs := pkgs + FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
|
|
|
Next;
|
|
|
end;
|
|
|
|
|
|
at_op_ctn.Close;
|
|
|
at_op_ctn.SQL.Clear;
|
|
|
at_op_ctn.SQL.Add('select * from t_op_ctn');
|
|
|
at_op_ctn.SQL.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
at_op_ctn.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value :=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
at_op_ctn.Open;
|
|
|
|
|
|
update_ctn(at_op_ctn);
|
|
|
if pkgs <> 0 then
|
|
|
update_seae(at_op_ctn);
|
|
|
|
|
|
frm_main.db.CommitTrans;
|
|
|
finally
|
|
|
EnableControls;
|
|
|
if frm_main.db.InTransaction then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
frm_main.db.RollbackTrans;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
{
|
|
|
if s_ctnItems+s<>'' then
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>Ϊ<<3C><><EFBFBD><EFBFBD>><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+#13#10+s+#13#10+s_ctnItems);
|
|
|
}
|
|
|
url := get_WebseviceURL;
|
|
|
aa := GetDsWebServiceSoap(false, get_WebseviceURL); //'http://192.168.1.105:5427/webservice/DsWebService.asmx');
|
|
|
//<2F><><EFBFBD>Ȼ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
_s := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
|
|
|
_s := _s + '<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
|
|
|
_s := _s + ' <Head> ';
|
|
|
_s := _s + ' <OPID>' + frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring + '</OPID> ';
|
|
|
_s := _s + ' <OPTYPE>4</OPTYPE> ';
|
|
|
_s := _s + ' <OPTIME></OPTIME> ';
|
|
|
_s := _s + ' <Version>1.0</Version> ';
|
|
|
_s := _s + ' </Head><OpseaeList> ';
|
|
|
_s := _s + ' <Opseae> ';
|
|
|
_s := _s + ' <BSNO>' + mt1.fieldbyname('BSNO').asstring + '</BSNO> ';
|
|
|
_s := _s + ' </Opseae></OpseaeList> ';
|
|
|
_s := _s + '</BookingCargoSpace> ';
|
|
|
XML := aa.SetBookingCargoSpaceAudit(_s);
|
|
|
//XML:=aa.ReceiveBookingCargoSpace(_s);
|
|
|
//Opseaecount:= frm_data_share.countString('Opseae',xml);
|
|
|
//result:= Opseaecount;
|
|
|
if (pos('<27>ɹ<EFBFBD>', XML) > 0) then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD>ճɹ<D5B3>');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>');
|
|
|
end;
|
|
|
|
|
|
//GetWebData;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxDBGrid1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_diffctn := Tfrm_op_seae_diffctn.Create(self);
|
|
|
|
|
|
CreatememtblctnDiff;
|
|
|
frm_op_seae_diffctn.dsrWebCtn := memtblwebCtn1;
|
|
|
|
|
|
frm_op_seae_diffctn.cxLabel1.Caption:='<27><><EFBFBD>ؼ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+IntToStr(t_op_ctn1.DataSet.recordcount);
|
|
|
|
|
|
frm_op_seae_diffctn.cxLabel2.Caption:='<27>ͻ<EFBFBD>ȷ<EFBFBD>ϼ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+IntToStr(memtblwebCtn1.DataSet.recordcount);
|
|
|
frm_op_seae_diffctn.dsrCtn := t_op_ctn1;
|
|
|
frm_op_seae_diffctn.bsNo := '';
|
|
|
frm_op_seae_diffctn.showchgtd(memtblwebCtn1, t_op_ctn1);
|
|
|
frm_op_seae_diffctn.Free;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.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 not t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>', uppercase(ANode.Strings[dxDBGrid1Column3.Index]), []) then
|
|
|
begin
|
|
|
AFont.Color := clRed;
|
|
|
exit;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxDBGrid1Column1CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
begin
|
|
|
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>', uppercase(ANode.Strings[dxDBGrid1Column3.Index]), []) then
|
|
|
begin
|
|
|
if t_op_ctn.FieldByName('<27>ߴ<EFBFBD>').AsString <> ANode.Strings[dxDBGrid1Column1.Index] then
|
|
|
begin
|
|
|
AFont.Color := clRed;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxDBGrid1Column2CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
begin
|
|
|
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>', uppercase(ANode.Strings[dxDBGrid1Column3.Index]), []) then
|
|
|
begin
|
|
|
if t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString <> ANode.Strings[dxDBGrid1Column2.Index] then
|
|
|
begin
|
|
|
AFont.Color := clRed;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxDBGrid1Column4CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
begin
|
|
|
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>', uppercase(ANode.Strings[dxDBGrid1Column3.Index]), []) then
|
|
|
begin
|
|
|
if t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString <> ANode.Strings[dxDBGrid1Column4.Index] then
|
|
|
begin
|
|
|
AFont.Color := clRed;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxDBGrid1Column5CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
begin
|
|
|
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>', uppercase(ANode.Strings[dxDBGrid1Column3.Index]), []) then
|
|
|
begin
|
|
|
if t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger <> StrToFloatdef(ANode.Strings[dxDBGrid1Column5.Index], 0) then
|
|
|
begin
|
|
|
AFont.Color := clRed;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxDBGrid1Column6CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
begin
|
|
|
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>', uppercase(ANode.Strings[dxDBGrid1Column3.Index]), []) then
|
|
|
begin
|
|
|
if t_op_ctn.FieldByName('<27><>װ').AsString <> ANode.Strings[dxDBGrid1Column6.Index] then
|
|
|
begin
|
|
|
AFont.Color := clRed;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxDBGrid1Column7CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
begin
|
|
|
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>', uppercase(ANode.Strings[dxDBGrid1Column3.Index]), []) then
|
|
|
begin
|
|
|
if FormatFloat('0.000;0.000;0', t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat) <> FormatFloat('0.000;0.000;0', StrToFloatdef(ANode.Strings[dxDBGrid1Column7.Index], 0)) then
|
|
|
begin
|
|
|
AFont.Color := clRed;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.dxDBGrid1Column8CustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: TColor; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
begin
|
|
|
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>', uppercase(ANode.Strings[dxDBGrid1Column3.Index]), []) then
|
|
|
begin
|
|
|
if FormatFloat('0.000;0.000;0', t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat) <> FormatFloat('0.000;0.000;0', StrToFloatdef(ANode.Strings[dxDBGrid1Column8.Index], 0)) then
|
|
|
begin
|
|
|
AFont.Color := clRed;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBMemo1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBMemo2DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBMemo3DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBMemo4DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBMemo5DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBMemo6DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxButton8Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(ds1, '<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>', true);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(ds1, '<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>', true);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(ds1, '֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>', true);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxButton11Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(ds1, '<27><>ͷ', true);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(ds1, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', true);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(ds1, '<27><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD>˵<EFBFBD><CBB5>', true);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit16DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit17DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit18DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit19DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit8DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit9DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit2DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit3DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit4DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit5DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit6DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit11DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit15DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit21DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.cxDBTextEdit20DblClick(Sender: TObject);
|
|
|
begin
|
|
|
frm_op_seae_difftd := Tfrm_op_seae_difftd.Create(self);
|
|
|
frm_op_seae_difftd.showchgtd(ds1, t_op_seae1, TcxDBMemo(sender).databinding.DataField);
|
|
|
frm_op_seae_difftd.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.bsSkinButton5Click(Sender: TObject);
|
|
|
var
|
|
|
i: integer;
|
|
|
begin
|
|
|
|
|
|
for i := 0 to bsSkinPanel1.ControlCount - 1 do
|
|
|
with bsSkinPanel1 do
|
|
|
if (bsSkinPanel1.Controls[i] is TcxCheckBox) then
|
|
|
begin
|
|
|
(bsSkinPanel1.Controls[i] as TcxCheckBox).Checked := true;
|
|
|
end
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.bsSkinButton6Click(Sender: TObject);
|
|
|
var
|
|
|
i: integer;
|
|
|
begin
|
|
|
|
|
|
for i := 0 to bsSkinPanel1.ControlCount - 1 do
|
|
|
with bsSkinPanel1 do
|
|
|
if (bsSkinPanel1.Controls[i] is TcxCheckBox) then
|
|
|
begin
|
|
|
(bsSkinPanel1.Controls[i] as TcxCheckBox).Checked := false;
|
|
|
end
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
Close;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_crm_OnLineBooking.bsSkinButton8Click(Sender: TObject);
|
|
|
begin
|
|
|
try
|
|
|
//hdgs := t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾').asstring;
|
|
|
frm_crm_spxcompany := Tfrm_crm_spxcompany.Create(self);
|
|
|
|
|
|
frm_crm_spxcompany.SetCurrCompany;
|
|
|
frm_crm_spxcompany.SetCanSearch(False);
|
|
|
|
|
|
frm_crm_spxcompany.SOSI:=2;
|
|
|
frm_crm_spxcompany.ShowModal;
|
|
|
finally
|
|
|
frm_crm_spxcompany.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end.
|
|
|
|