|
|
unit u_op_seae_assistant;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, ADODB, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
|
|
|
StdCtrls, DBCtrls, RxLookup, bsSkinCtrls, Mask, wwdbedit, Wwdotdot,
|
|
|
Wwdbcomb, wwdbdatetimepicker, wwdblook, Menus, DBCtrlsEh, ExtCtrls,ComObj,
|
|
|
ComCtrls, bsSkinTabs, Grids, Wwdbigrd, Wwdbgrid, bsdbctrls, kbmMemTable, IdHTTP,superobject;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_seae_assistant = class(TForm)
|
|
|
t_op_seae_assistant: TADOQuery;
|
|
|
t_op_seae_assistant1: TDataSource;
|
|
|
p_getMaxHblno: TADOStoredProc;
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
N1: TMenuItem;
|
|
|
N2: TMenuItem;
|
|
|
t_op_seae_assistant_online: TADOQuery;
|
|
|
Panel1: TPanel;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridColumn;
|
|
|
StaticText1: TStaticText;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N3: TMenuItem;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
Label122: TLabel;
|
|
|
Label121: TLabel;
|
|
|
Label123: TLabel;
|
|
|
Label38: TLabel;
|
|
|
Label36: TLabel;
|
|
|
Label125: TLabel;
|
|
|
Label126: TLabel;
|
|
|
Label15: TLabel;
|
|
|
Label7: TLabel;
|
|
|
Label124: TLabel;
|
|
|
Label146: TLabel;
|
|
|
Label145: TLabel;
|
|
|
Label32: TLabel;
|
|
|
Label21: TLabel;
|
|
|
Label26: TLabel;
|
|
|
Label27: TLabel;
|
|
|
Label30: TLabel;
|
|
|
Label28: TLabel;
|
|
|
Label31: TLabel;
|
|
|
Label13: TLabel;
|
|
|
Label163: TLabel;
|
|
|
Label158: TLabel;
|
|
|
Label165: TLabel;
|
|
|
Label166: TLabel;
|
|
|
Label167: TLabel;
|
|
|
Label168: TLabel;
|
|
|
Label169: TLabel;
|
|
|
Label170: TLabel;
|
|
|
Label33: TLabel;
|
|
|
Label1: TLabel;
|
|
|
Label2: TLabel;
|
|
|
Label3: TLabel;
|
|
|
bsSkinSpeedButton1: TbsSkinSpeedButton;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
bsSkinButton13: TbsSkinButton;
|
|
|
bsSkinButton14: TbsSkinButton;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
DBMemo33: TDBMemo;
|
|
|
DBMemo34: TDBMemo;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
DBMemo35: TDBMemo;
|
|
|
DBEdit9: TDBEdit;
|
|
|
DBEdit7: TDBEdit;
|
|
|
wwDBLookupCombo49: TwwDBLookupCombo;
|
|
|
DBEdit63: TDBEdit;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo52: TwwDBLookupCombo;
|
|
|
DBEdit10: TDBEdit;
|
|
|
DBEdit11: TDBEdit;
|
|
|
wwDBLookupCombo21: TwwDBLookupCombo;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
DBEdit25: TDBEdit;
|
|
|
RxDBLookupCombo15: TRxDBLookupCombo;
|
|
|
DBEdit26: TDBEdit;
|
|
|
DBEdit27: TDBEdit;
|
|
|
DBEdit5: TDBEdit;
|
|
|
DBMemo38: TDBMemo;
|
|
|
DBMemo37: TDBMemo;
|
|
|
DBMemo39: TDBMemo;
|
|
|
DBMemo40: TDBMemo;
|
|
|
DBMemo41: TDBMemo;
|
|
|
DBMemo42: TDBMemo;
|
|
|
DBEdit80: TDBEdit;
|
|
|
DBEdit81: TDBEdit;
|
|
|
wwDBLookupCombo61: TwwDBLookupCombo;
|
|
|
DBEdit82: TDBEdit;
|
|
|
DBEdit83: TDBEdit;
|
|
|
RxDBLookupCombo19: TRxDBLookupCombo;
|
|
|
DBMemo6: TDBMemo;
|
|
|
wwDBLookupCombo2: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo5: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo6: TwwDBLookupCombo;
|
|
|
bsSkinButton21: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
wwDBLookupCombo1: TwwDBLookupCombo;
|
|
|
DBEdit1: TDBEdit;
|
|
|
bsSkinPanel10: TbsSkinPanel;
|
|
|
lblhbl: TLabel;
|
|
|
DBEditEh1: TDBEditEh;
|
|
|
Label71: TLabel;
|
|
|
DBMemo7: TDBMemo;
|
|
|
Label72: TLabel;
|
|
|
DBMemo8: TDBMemo;
|
|
|
Label75: TLabel;
|
|
|
DBMemo11: TDBMemo;
|
|
|
DBMemo9: TDBMemo;
|
|
|
Label74: TLabel;
|
|
|
Label5: TLabel;
|
|
|
DBMemo1: TDBMemo;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
Label103: TLabel;
|
|
|
Label104: TLabel;
|
|
|
Label105: TLabel;
|
|
|
Label108: TLabel;
|
|
|
Label6: TLabel;
|
|
|
DBEdit77: TDBEdit;
|
|
|
DBEdit72: TDBEdit;
|
|
|
DBEdit73: TDBEdit;
|
|
|
DBEdit74: TDBEdit;
|
|
|
DBEdit75: TDBEdit;
|
|
|
DBEdit76: TDBEdit;
|
|
|
DBEdit36: TDBEdit;
|
|
|
DBEdit37: TDBEdit;
|
|
|
Label8: TLabel;
|
|
|
Label9: TLabel;
|
|
|
Label10: TLabel;
|
|
|
DBEdit3: TDBEdit;
|
|
|
DBEdit4: TDBEdit;
|
|
|
Label11: TLabel;
|
|
|
DBEdit6: TDBEdit;
|
|
|
DBEdit8: TDBEdit;
|
|
|
DBEdit12: TDBEdit;
|
|
|
DBEdit13: TDBEdit;
|
|
|
Label14: TLabel;
|
|
|
DBEdit14: TDBEdit;
|
|
|
DBEdit15: TDBEdit;
|
|
|
DBEdit16: TDBEdit;
|
|
|
DBEdit17: TDBEdit;
|
|
|
DBEdit18: TDBEdit;
|
|
|
DBEdit19: TDBEdit;
|
|
|
Label16: TLabel;
|
|
|
Label17: TLabel;
|
|
|
DBEdit20: TDBEdit;
|
|
|
DBEdit21: TDBEdit;
|
|
|
DBEdit22: TDBEdit;
|
|
|
DBEdit23: TDBEdit;
|
|
|
DBEdit24: TDBEdit;
|
|
|
DBEdit28: TDBEdit;
|
|
|
Label18: TLabel;
|
|
|
DBEdit29: TDBEdit;
|
|
|
DBEdit30: TDBEdit;
|
|
|
DBEdit31: TDBEdit;
|
|
|
Label4: TLabel;
|
|
|
DBEdit2: TDBEdit;
|
|
|
Label35: TLabel;
|
|
|
RxDBLookupCombo28: TRxDBLookupCombo;
|
|
|
bsSkinSpeedButton2: TbsSkinSpeedButton;
|
|
|
OpenDialog1: TOpenDialog;
|
|
|
t_op_ctn_fendan1: TDataSource;
|
|
|
wwDBLookupCombo4: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo7: TwwDBLookupCombo;
|
|
|
t_op_ctn_fendan: TADOQuery;
|
|
|
t_op_ctn_fendanctn_id: TAutoIncField;
|
|
|
t_op_ctn_fendanAS_ID: TIntegerField;
|
|
|
t_op_ctn_fendanDSDesigner: TStringField;
|
|
|
t_op_ctn_fendanDSDesigner2: TStringField;
|
|
|
t_op_ctn_fendanDSDesigner3: TStringField;
|
|
|
t_op_ctn_fendanDSDesigner4: TIntegerField;
|
|
|
t_op_ctn_fendanTEU: TIntegerField;
|
|
|
t_op_ctn_fendanDSDesigner5: TStringField;
|
|
|
t_op_ctn_fendanDSDesigner6: TStringField;
|
|
|
t_op_ctn_fendanDSDesigner7: TStringField;
|
|
|
t_op_ctn_fendanDSDesigner8: TIntegerField;
|
|
|
t_op_ctn_fendanDSDesigner9: TStringField;
|
|
|
t_op_ctn_fendanDSDesigner10: TBCDField;
|
|
|
t_op_ctn_fendanDSDesigner11: TBCDField;
|
|
|
t_op_ctn_fendanDSDesigner12: TStringField;
|
|
|
t_op_ctn_fendanDSDesigner13: TStringField;
|
|
|
t_op_ctn_fendanDSDesigner14: TStringField;
|
|
|
t_op_ctn_fendanDSDesigner15: TStringField;
|
|
|
t_pt_fendan: TADOQuery;
|
|
|
t_pt_fendan1: TDataSource;
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
wwDBGrid1: TwwDBGrid;
|
|
|
bsSkinPanel5: TbsSkinPanel;
|
|
|
bsSkinDBNavigator1: TbsSkinDBNavigator;
|
|
|
bsSkinButton15: TbsSkinButton;
|
|
|
Label12: TLabel;
|
|
|
DBMemo2: TDBMemo;
|
|
|
bsSkinButton16: TbsSkinButton;
|
|
|
bsSkinButton17: TbsSkinButton;
|
|
|
mailSend: TkbmMemTable;
|
|
|
mailSendStringField: TStringField;
|
|
|
mailSendField: TStringField;
|
|
|
mailSendField2: TStringField;
|
|
|
mailSendField3: TStringField;
|
|
|
mailSendField4: TStringField;
|
|
|
mailSendField5: TStringField;
|
|
|
mailSendField6: TStringField;
|
|
|
mailSendField7: TStringField;
|
|
|
Label19: TLabel;
|
|
|
DBEdit32: TDBEdit;
|
|
|
DBMemo3: TDBMemo;
|
|
|
Label20: TLabel;
|
|
|
bsSkinSpeedButton3: TbsSkinSpeedButton;
|
|
|
v_vessel_voyage: TADOQuery;
|
|
|
v_vessel_voyageDSDesigner: TStringField;
|
|
|
v_vessel_voyageDSDesigner2: TStringField;
|
|
|
v_vessel_voyageDSDesigner3: TStringField;
|
|
|
v_vessel_voyageDSDesigner4: TStringField;
|
|
|
v_vessel_voyageDSDesigner5: TStringField;
|
|
|
v_vessel_voyageDSDesigner6: TStringField;
|
|
|
v_vessel_voyageDSDesigner7: TStringField;
|
|
|
v_vessel_voyageDSDesigner8: TDateTimeField;
|
|
|
v_vessel_voyageDSDesigner9: TDateTimeField;
|
|
|
v_vessel_voyageDSDesigner10: TDateTimeField;
|
|
|
v_vessel_voyageDSDesigner11: TDateTimeField;
|
|
|
bsSkinButton18: TbsSkinButton;
|
|
|
Button3: TButton;
|
|
|
DBEdit41: TDBEdit;
|
|
|
Label133: TLabel;
|
|
|
Label22: TLabel;
|
|
|
DBEdit33: TDBEdit;
|
|
|
t_op_ctn_fendanDSDesigner16: TBCDField;
|
|
|
t_op_ctn_fendanDSDesigner17: TBCDField;
|
|
|
t_op_ctn_fendanDSDesigner18: TBCDField;
|
|
|
procedure bsSkinPanel2Resize(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure t_op_seae_assistantAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_op_seae_assistantBeforeInsert(DataSet: TDataSet);
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure DBEdit9KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit7KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo49KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit63KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBDateTimePicker2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo52KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit10KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit11KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo21KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit25KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBDateTimePicker4KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo15KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit26KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit27KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit5KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit81KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo61KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit82KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit83KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo2Change(Sender: TObject);
|
|
|
procedure RxDBLookupCombo3Change(Sender: TObject);
|
|
|
procedure RxDBLookupCombo4Change(Sender: TObject);
|
|
|
procedure DBMemo40Change(Sender: TObject);
|
|
|
procedure DBMemo41Change(Sender: TObject);
|
|
|
procedure DBMemo41Exit(Sender: TObject);
|
|
|
procedure DBMemo42Change(Sender: TObject);
|
|
|
procedure DBMemo42Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo61Change(Sender: TObject);
|
|
|
procedure RxDBLookupCombo19Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo2Enter(Sender: TObject);
|
|
|
procedure wwDBLookupCombo5Enter(Sender: TObject);
|
|
|
procedure wwDBLookupCombo6Enter(Sender: TObject);
|
|
|
procedure wwDBLookupCombo2Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo5Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo6Change(Sender: TObject);
|
|
|
procedure wwDBLookupCombo2Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo5Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo6Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo5KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo6KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo4KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
procedure t_op_seae_assistantBeforePost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton21Click(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
procedure wwDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo19KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo1Enter(Sender: TObject);
|
|
|
procedure wwDBLookupCombo1Exit(Sender: TObject);
|
|
|
procedure wwDBLookupCombo1Change(Sender: TObject);
|
|
|
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit7DblClick(Sender: TObject);
|
|
|
procedure DBEdit7Exit(Sender: TObject);
|
|
|
procedure RxDBLookupCombo15Change(Sender: TObject);
|
|
|
procedure bsSkinButton12Click(Sender: TObject);
|
|
|
procedure bsSkinButton13Click(Sender: TObject);
|
|
|
procedure DBEditEh1EditButtons0Click(Sender: TObject;
|
|
|
var Handled: Boolean);
|
|
|
procedure t_op_seae_assistantAfterPost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton14Click(Sender: TObject);
|
|
|
procedure dxDBGrid1Column1CustomDraw(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 N3Click(Sender: TObject);
|
|
|
procedure bsSkinSpeedButton2Click(Sender: TObject);
|
|
|
procedure wwDBLookupCombo4Change(Sender: TObject);
|
|
|
procedure t_op_ctn_fendanAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_op_seae_assistantAfterScroll(DataSet: TDataSet);
|
|
|
procedure t_op_ctn_fendanBeforeInsert(DataSet: TDataSet);
|
|
|
procedure bsSkinButton15Click(Sender: TObject);
|
|
|
procedure DBMemo33Click(Sender: TObject);
|
|
|
procedure DBMemo34Click(Sender: TObject);
|
|
|
procedure DBMemo35Click(Sender: TObject);
|
|
|
procedure bsSkinButton16Click(Sender: TObject);
|
|
|
procedure bsSkinButton17Click(Sender: TObject);
|
|
|
procedure bsSkinSpeedButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton18Click(Sender: TObject);
|
|
|
procedure Button3Click(Sender: TObject);
|
|
|
private
|
|
|
updates:boolean;
|
|
|
function getYardCode(yard:string):string;
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_seae_assistant: Tfrm_op_seae_assistant;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_op_seae, u_main, my_sys_function, u_data_share,u_op_seae_assistant_qr ,
|
|
|
u_send_msg ;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinPanel2Resize(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
i:=round(bsSkinPanel2.width/9);
|
|
|
bsSkinButton9.width:=i;
|
|
|
bsSkinButton1.width:=i;
|
|
|
bsSkinButton2.width:=i;
|
|
|
bsSkinButton4.width:=i;
|
|
|
bsSkinButton3.width:=i;
|
|
|
bsSkinButton13.width:=i;
|
|
|
bsSkinButton12.width:=i;
|
|
|
bsSkinButton14.width:=i;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae_assistant.insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
//t_op_seae_assistant.fieldbyname('<27>ڶ<EFBFBD>֪ͨ<CDA8><D6AA>').AsString:=frm_op_seae.t_op_seae.fieldbyname('<27>ڶ<EFBFBD>֪ͨ<CDA8><D6AA>').AsString;
|
|
|
table_post(t_op_seae_assistant);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_op_seae_assistant);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_op_seae_assistant);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton9Click(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
str:widestring;
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
if t_op_seae_assistant.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
{
|
|
|
if dxDBGrid1.SelectedCount<1 then
|
|
|
begin
|
|
|
ShowMessage('ѡ<><D1A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ֵ<EFBFBD>Ϊ0,<2C><>ѡ<EFBFBD><D1A1>');
|
|
|
exit;
|
|
|
end;
|
|
|
if dxDBGrid1.SelectedCount>=0 then
|
|
|
begin
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do
|
|
|
begin
|
|
|
t_op_seae_assistant.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
if i=0 then
|
|
|
str:='('+t_op_seae_assistant.fieldbyname('AS_ID').asstring
|
|
|
else
|
|
|
str:=str+','+t_op_seae_assistant.fieldbyname('AS_ID').asstring;
|
|
|
end;
|
|
|
str:=str+')';
|
|
|
|
|
|
}
|
|
|
if dxDBGrid1.SelectedCount>0 then
|
|
|
begin
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do begin
|
|
|
t_op_seae_assistant.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
if i=0 then
|
|
|
str:='('+''''+t_op_seae_assistant.fieldbyname('AS_ID').asstring+''''
|
|
|
else
|
|
|
str:=str+','+''''+t_op_seae_assistant.fieldbyname('AS_ID').asstring+'''';
|
|
|
end;
|
|
|
end else begin
|
|
|
str:='('+''''+t_op_seae_assistant.fieldbyname('AS_ID').asstring+'''';
|
|
|
end;
|
|
|
str:=str+')';
|
|
|
|
|
|
|
|
|
|
|
|
t_pt_fendan.close;
|
|
|
t_pt_fendan.sql.clear;
|
|
|
t_pt_fendan.sql.add('select * from t_op_seae_assistant '
|
|
|
+'where AS_ID in '+str
|
|
|
+' order by <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>');
|
|
|
t_pt_fendan.open;
|
|
|
|
|
|
if t_op_seae_assistant.DataSource.DataSet.FieldByName('<27>ͻ<EFBFBD><CDBB>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>').AsString<>'' then begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
close;sql.Clear;
|
|
|
SQL.Add('select * from t_code_cust_mailproject_detail where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_op_seae_assistant.DataSource.DataSet.FieldByName('<27>ͻ<EFBFBD><CDBB>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27>ᵥ<EFBFBD><E1B5A5><EFBFBD>»<EFBFBD>ֽ'' ');
|
|
|
Open;
|
|
|
if not IsEmpty then begin
|
|
|
mailSend.EmptyTable;
|
|
|
mailSend.Open;
|
|
|
mailSend.Insert;
|
|
|
mailSend.FieldByName('<27>ռ<EFBFBD><D5BC><EFBFBD>').AsString:=fieldbyname('<27>ռ<EFBFBD><D5BC><EFBFBD>').AsString;
|
|
|
str:=fieldbyname('<27><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>').AsString;
|
|
|
str:=StringReplace(str,'[<5B><><EFBFBD>ᵥ<EFBFBD><E1B5A5>]',t_op_seae_assistant.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString,[]);
|
|
|
// <20><><EFBFBD><EFBFBD>ί<EFBFBD>б<EFBFBD><D0B1><EFBFBD> <20>̽<EFBFBD><CCBD><EFBFBD> 2017-07-22
|
|
|
str:=StringReplace(str,'[ί<>б<EFBFBD><D0B1><EFBFBD>]',t_op_seae_assistant.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString,[]);
|
|
|
|
|
|
str:=StringReplace(str,'[<5B><><EFBFBD><EFBFBD>]',t_op_seae_assistant.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,[]);
|
|
|
str:=StringReplace(str,'[<5B><><EFBFBD><EFBFBD>]',t_op_seae_assistant.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,[]);
|
|
|
str:=StringReplace(str,'[ί<>е<EFBFBD>λ]',t_op_seae_assistant.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString,[]);
|
|
|
mailSend.FieldByName('<27>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>').AsString:=str;
|
|
|
str:=fieldbyname('<27>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
str:=StringReplace(str,'[<5B><><EFBFBD>ᵥ<EFBFBD><E1B5A5>]',t_op_seae_assistant.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString,[]);
|
|
|
// <20><><EFBFBD><EFBFBD>ί<EFBFBD>б<EFBFBD><D0B1><EFBFBD> <20>̽<EFBFBD><CCBD><EFBFBD> 2017-07-22
|
|
|
str:=StringReplace(str,'[ί<>б<EFBFBD><D0B1><EFBFBD>]',t_op_seae_assistant.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString,[]);
|
|
|
|
|
|
str:=StringReplace(str,'[<5B><><EFBFBD><EFBFBD>]',t_op_seae_assistant.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,[]);
|
|
|
str:=StringReplace(str,'[<5B><><EFBFBD><EFBFBD>]',t_op_seae_assistant.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,[]);
|
|
|
str:=StringReplace(str,'[ί<>е<EFBFBD>λ]',t_op_seae_assistant.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString,[]);
|
|
|
mailSend.FieldByName('<27>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>').AsString:=str;
|
|
|
frm_data_share.t_sys_employee.Locate('<27><><EFBFBD><EFBFBD>',employee,[]);
|
|
|
mailSend.FieldByName('<27>ʼ<EFBFBD>ǩ<EFBFBD><C7A9>').AsString:=MailSignName;//frm_data_share.t_sys_employee.fieldbyname('<27>ʼ<EFBFBD>ǩ<EFBFBD><C7A9>').AsString;
|
|
|
str:=fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
str:=StringReplace(str,'[<5B><><EFBFBD>ᵥ<EFBFBD><E1B5A5>]',t_op_seae_assistant.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString,[]);
|
|
|
// <20><><EFBFBD><EFBFBD>ί<EFBFBD>б<EFBFBD><D0B1><EFBFBD> <20>̽<EFBFBD><CCBD><EFBFBD> 2017-07-22
|
|
|
str:=StringReplace(str,'[ί<>б<EFBFBD><D0B1><EFBFBD>]',t_op_seae_assistant.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString,[]);
|
|
|
|
|
|
str:=StringReplace(str,'[<5B><><EFBFBD><EFBFBD>]',t_op_seae_assistant.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,[]);
|
|
|
str:=StringReplace(str,'[<5B><><EFBFBD><EFBFBD>]',t_op_seae_assistant.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,[]);
|
|
|
str:=StringReplace(str,'[ί<>е<EFBFBD>λ]',t_op_seae_assistant.DataSource.DataSet.fieldbyname('ί<>е<EFBFBD>λ').AsString,[]);
|
|
|
mailSend.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=str;
|
|
|
mailSend.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
mailSend.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae_assistant.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
mailSend.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString:=t_op_seae_assistant.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
mailSend.Post;
|
|
|
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤',2,t_pt_fendan1,t_op_seae_assistant.DataSource,nil,nil,nil,nil,nil,nil,nil,nil,nil,True,'',nil,nil,mailSend);
|
|
|
end else sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤',2,t_pt_fendan1,t_op_seae_assistant.DataSource,nil,nil,nil,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end else begin
|
|
|
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤',2,t_pt_fendan1,t_op_seae_assistant.DataSource,nil,nil,nil,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.t_op_seae_assistantAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
var
|
|
|
afield : variant;
|
|
|
i: Integer;
|
|
|
aAdoQuery:TAdoQuery;
|
|
|
begin
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
|
|
|
if application.MessageBox('<27><><EFBFBD>Ƿ<EFBFBD>Ҫ<EFBFBD><D2AA>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뷢<EFBFBD><EBB7A2><EFBFBD><EFBFBD>\<5C>ջ<EFBFBD><D5BB><EFBFBD>\֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>Ϣ?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
|
|
|
begin
|
|
|
for i:=0 to (t_op_seae_assistant.DataSource.DataSet.fieldcount-1) do
|
|
|
begin
|
|
|
try
|
|
|
if t_op_seae_assistant.FindField(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName)<>nil then
|
|
|
t_op_seae_assistant[t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName]:=
|
|
|
t_op_seae_assistant.DataSource.DataSet.fields[i].value;
|
|
|
except
|
|
|
;
|
|
|
end;
|
|
|
end;
|
|
|
t_op_seae_assistant['<27>ύȷ<E1BDBB><C8B7>']:=td_sate1 ;
|
|
|
t_op_seae_assistant['<27>ᵥ<EFBFBD><E1B5A5><EFBFBD><EFBFBD>']:='ֱ<><D6B1>';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
for i:=0 to (t_op_seae_assistant.DataSource.DataSet.fieldcount-1) do
|
|
|
begin
|
|
|
try
|
|
|
if (t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
|
|
|
and(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName<>'<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>')
|
|
|
and(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName<>'<27>ջ<EFBFBD><D5BB><EFBFBD>')
|
|
|
and(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName<>'<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>')
|
|
|
and(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName<>'֪ͨ<CDA8><D6AA>')
|
|
|
and(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName<>'֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>')then
|
|
|
if t_op_seae_assistant.FindField(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName)<>nil then
|
|
|
t_op_seae_assistant[t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName]:=
|
|
|
t_op_seae_assistant.DataSource.DataSet.fields[i].value;
|
|
|
except
|
|
|
;
|
|
|
end;
|
|
|
end;
|
|
|
t_op_seae_assistant['<27>ύȷ<E1BDBB><C8B7>']:=td_sate1 ;
|
|
|
t_op_seae_assistant['<27>ᵥ<EFBFBD><E1B5A5><EFBFBD><EFBFBD>']:='<27><EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('select * from t_op_ctn');
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD>=:bsno');
|
|
|
Parameters.ParamByName('bsno').Value:=t_op_seae_assistant.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
Open;First;
|
|
|
while not eof do
|
|
|
begin
|
|
|
t_op_ctn_fendan.Insert;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
t_op_ctn_fendan.FieldByName('<27>ߴ<EFBFBD>').Value:=FieldByName('<27>ߴ<EFBFBD>').Value;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
t_op_ctn_fendan.FieldByName('TEU').Value:=FieldByName('TEU').Value;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').Value:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').Value;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
t_op_ctn_fendan.FieldByName('<27><>װ').Value:=FieldByName('<27><>װ').Value;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
t_op_ctn_fendan.post;
|
|
|
Next;
|
|
|
end;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.t_op_seae_assistantBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if t_op_seae_assistant.DataSource.DataSet.State=dsinsert then
|
|
|
t_op_seae_assistant.DataSource.DataSet.post;
|
|
|
if t_op_seae_assistant.DataSource.DataSet.ISEMPTY then
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton8Click(Sender: TObject);
|
|
|
var
|
|
|
afield : variant;
|
|
|
i: Integer;
|
|
|
begin
|
|
|
// ˢ<>¸<EFBFBD><C2B8><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
if t_op_seae_assistant.IsEmpty then
|
|
|
exit;
|
|
|
t_op_seae_assistant.edit;
|
|
|
if application.MessageBox('<27><><EFBFBD>Ƿ<EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\<5C>ջ<EFBFBD><D5BB><EFBFBD>\֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>Ϣ?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
|
|
|
begin
|
|
|
for i:=0 to (t_op_seae_assistant.DataSource.DataSet.fieldcount-1) do
|
|
|
begin
|
|
|
try
|
|
|
if t_op_seae_assistant.FindField(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName)<>nil then
|
|
|
t_op_seae_assistant[t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName]:=
|
|
|
t_op_seae_assistant.DataSource.DataSet.fields[i].value;
|
|
|
except
|
|
|
;
|
|
|
end;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
for i:=0 to (t_op_seae_assistant.DataSource.DataSet.fieldcount-1) do
|
|
|
begin
|
|
|
try
|
|
|
if (t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
|
|
|
and(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName<>'<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>')
|
|
|
and(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName<>'<27>ջ<EFBFBD><D5BB><EFBFBD>')
|
|
|
and(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName<>'<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>')
|
|
|
and(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName<>'֪ͨ<CDA8><D6AA>')
|
|
|
and(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName<>'֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>')then
|
|
|
if t_op_seae_assistant.FindField(t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName)<>nil then
|
|
|
t_op_seae_assistant[t_op_seae_assistant.DataSource.DataSet.fields[i].FieldName]:=
|
|
|
t_op_seae_assistant.DataSource.DataSet.fields[i].value;
|
|
|
except
|
|
|
;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
frm_op_seae_assistant.Hide;
|
|
|
frm_op_seae_assistant.ManualFloat(frm_op_seae_assistant.BoundsRect );
|
|
|
action:=cafree;
|
|
|
frm_op_seae_assistant:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae_assistant.open;
|
|
|
t_op_ctn_fendan.Open;
|
|
|
{
|
|
|
try
|
|
|
if strtobool(get_parameters_value(154,'false')) then
|
|
|
t_op_seae_assistant_online.Open
|
|
|
except
|
|
|
on E: Exception do
|
|
|
begin
|
|
|
ShowMessage(e.Message);
|
|
|
end;
|
|
|
end;
|
|
|
}
|
|
|
updates:=false;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit9KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_dbedit(Key,DBEdit7);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit7KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_dbedit(Key,DBEdit1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo49KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_dbedit(Key,DBEdit63);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit63KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBDateTimePicker2KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo52);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo52KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_dbedit(Key,DBEdit10);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit10KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_dbedit(Key,DBEdit11);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit11KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo21);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo21KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBComboBox1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_dbedit(Key,DBEdit25);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit25KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker4);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBDateTimePicker4KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo15);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.RxDBLookupCombo15KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_dbedit(Key,DBEdit26);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit26KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_dbedit(Key,DBEdit27);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit27KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo28);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit5KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo38);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit81KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo61);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo61KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_dbedit(Key,DBEdit82);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit82KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_dbedit(Key,DBEdit83);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit83KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_dbedit(Key,DBEdit80);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.RxDBLookupCombo2Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_assistant.State=dsinsert)or(t_op_seae_assistant.State=dsedit)then
|
|
|
begin
|
|
|
if RxDBLookupCombo2.DisplayValue<>'' then
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_shiper.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.RxDBLookupCombo3Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_assistant.State=dsinsert)or(t_op_seae_assistant.State=dsedit)then
|
|
|
begin
|
|
|
if RxDBLookupCombo3.DisplayValue<>'' then
|
|
|
t_op_seae_assistant['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_shouhuo.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.RxDBLookupCombo4Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_assistant.State=dsinsert)or(t_op_seae_assistant.State=dsedit)then
|
|
|
begin
|
|
|
if RxDBLookupCombo4.DisplayValue<>'' then
|
|
|
t_op_seae_assistant['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_crm_client_tongzhi.fieldbyname('<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBMemo40Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_assistant.state=dsedit)or(t_op_seae_assistant.state=dsinsert)then
|
|
|
begin
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD>']:=total_num(DBMemo40);
|
|
|
t_op_seae_assistant['<27><>װ']:=total_package(dbmemo40);
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']
|
|
|
:='SAY:'+ntoc(t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat,true)
|
|
|
+t_op_seae_assistant.FieldByName('<27><>װ').asstring+' ONLY.';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBMemo41Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_assistant.state=dsedit)or(t_op_seae_assistant.state=dsinsert)then
|
|
|
begin
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD>']:=total_num(DBMemo41);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBMemo41Exit(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_assistant.state=dsedit)or(t_op_seae_assistant.state=dsinsert)then
|
|
|
begin
|
|
|
kgs_cbm(DBMemo41,'KGS');
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=DBMemo41.text;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBMemo42Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_assistant.state=dsedit)or(t_op_seae_assistant.state=dsinsert)then
|
|
|
begin
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD>']:=total_num(DBMemo42);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBMemo42Exit(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_assistant.state=dsedit)or(t_op_seae_assistant.state=dsinsert)then
|
|
|
begin
|
|
|
kgs_cbm(DBMemo42,'CBM');
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=DBMemo42.text;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo61Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_assistant.state=dsedit)or(t_op_seae_assistant.state=dsinsert)then
|
|
|
begin
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']
|
|
|
:='SAY:'+ntoc(t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat,true)
|
|
|
+wwDBLookupCombo61.text+' ONLY.';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.RxDBLookupCombo19Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_seae_assistant.state=dsinsert)or(t_op_seae_assistant.state=dsedit)then
|
|
|
begin
|
|
|
if RxDBLookupCombo19.DisplayValue='' then
|
|
|
exit;
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_crm_client_daili['<27><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>'];
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo2Enter(Sender: TObject);
|
|
|
begin
|
|
|
with frm_data_share do
|
|
|
begin
|
|
|
t_code_code.Filtered:=false;
|
|
|
t_code_code.Filter:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=1';
|
|
|
t_code_code.Filtered:=true;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo5Enter(Sender: TObject);
|
|
|
begin
|
|
|
with frm_data_share do
|
|
|
begin
|
|
|
t_code_code.Filtered:=false;
|
|
|
t_code_code.Filter:='<27>ջ<EFBFBD><D5BB><EFBFBD>=1';
|
|
|
t_code_code.Filtered:=true;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo6Enter(Sender: TObject);
|
|
|
begin
|
|
|
with frm_data_share do
|
|
|
begin
|
|
|
t_code_code.Filtered:=false;
|
|
|
t_code_code.Filter:='֪ͨ<CDA8><D6AA>=1';
|
|
|
t_code_code.Filtered:=true;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo2Change(Sender: TObject);
|
|
|
begin
|
|
|
if frm_data_share.t_code_code.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo2.text,[]) then
|
|
|
begin
|
|
|
t_op_seae_assistant.edit;
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_code_code.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo5Change(Sender: TObject);
|
|
|
begin
|
|
|
if frm_data_share.t_code_code.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo5.text,[]) then
|
|
|
begin
|
|
|
t_op_seae_assistant.edit;
|
|
|
t_op_seae_assistant['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_code_code.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo6Change(Sender: TObject);
|
|
|
begin
|
|
|
if frm_data_share.t_code_code.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo6.text,[]) then
|
|
|
begin
|
|
|
t_op_seae_assistant.edit;
|
|
|
t_op_seae_assistant['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>']:=frm_data_share.t_code_code.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo2Exit(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo2.Clear;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo5Exit(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo5.Clear;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo6Exit(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo6.Clear;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo33);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo5KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo34);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo6KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo35);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.RxDBLookupCombo2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.RxDBLookupCombo3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.RxDBLookupCombo4KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo6);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
Column_sort(Column,t_op_seae_assistant,'<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.t_op_seae_assistantBeforePost(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_op_seae_assistant['Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>']:=date_eng(t_op_seae_assistant.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime);
|
|
|
|
|
|
try
|
|
|
if t_op_seae_assistant.state in [dsedit] then
|
|
|
if (t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').Value<>t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').oldValue) or (t_op_seae_assistant.FieldByName('<27><>װ').Value<>t_op_seae_assistant.FieldByName('<27><>װ').oldValue)
|
|
|
or (t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').Value<>t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').oldValue) or (t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').Value<>t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').oldValue)
|
|
|
or (t_op_seae_assistant.FieldByName('<27><>ͷ').Value<>t_op_seae_assistant.FieldByName('<27><>ͷ').oldValue) or (t_op_seae_assistant.FieldByName('<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>').Value<>t_op_seae_assistant.FieldByName('<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>').oldValue)
|
|
|
then begin
|
|
|
updates:=true;
|
|
|
end;
|
|
|
except
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton21Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_seae_assistant1,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_seae_assistant1,'<27><>ͷ');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_seae_assistant1,'<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_seae_assistant1,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_seae_assistant1,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton11Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_seae_assistant1,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo6);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.RxDBLookupCombo19KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo1Enter(Sender: TObject);
|
|
|
begin
|
|
|
with frm_data_share do
|
|
|
begin
|
|
|
t_code_code.Filtered:=false;
|
|
|
t_code_code.Filter:='<27><><EFBFBD><EFBFBD>=1';
|
|
|
t_code_code.Filtered:=true;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo1Exit(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo1.Clear;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo1Change(Sender: TObject);
|
|
|
begin
|
|
|
if frm_data_share.t_code_code.locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo1.text,[]) then
|
|
|
begin
|
|
|
t_op_seae_assistant.edit;
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_code_code.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo49);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit7DblClick(Sender: TObject);
|
|
|
begin
|
|
|
with p_getMaxHblno do begin
|
|
|
close;
|
|
|
Parameters.ParamByName('@hblhead').value:=DBEdit7.text+'%';
|
|
|
open;
|
|
|
if (not IsEmpty) and (FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString<>'') then begin
|
|
|
lblhbl.Caption:=FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
bsSkinPanel10.Visible:=true;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEdit7Exit(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinPanel10.Visible:=false;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.RxDBLookupCombo15Change(Sender: TObject);
|
|
|
begin
|
|
|
if RxDBLookupCombo15.DisplayValues[1]='FREIGHT PREPAID' then begin
|
|
|
t_op_seae_assistant1.DataSet['Ԥ<><D4A4><EFBFBD>ص<EFBFBD>']:=t_op_seae_assistant1.DataSet['װ<><D7B0><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>']:='';
|
|
|
end;
|
|
|
if RxDBLookupCombo15.DisplayValues[1]='FREIGHT COLLECT' then begin
|
|
|
t_op_seae_assistant1.DataSet['Ԥ<><D4A4><EFBFBD>ص<EFBFBD>']:='';
|
|
|
t_op_seae_assistant1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>']:='DESTINATION';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton12Click(Sender: TObject);
|
|
|
var i:integer ;
|
|
|
myfield:string ;
|
|
|
begin
|
|
|
//<2F>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD>ᵥȷ<E1B5A5><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if t_op_seae_assistant.IsEmpty then exit ;
|
|
|
if t_op_seae_assistant.State in [dsedit,dsinsert] then t_op_seae_assistant.post ;
|
|
|
if (t_op_seae_assistant['<27>ύȷ<E1BDBB><C8B7>']<>td_sate1) then exit ;
|
|
|
if t_op_seae_assistant.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString='' then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>Ϊ<EFBFBD>ղ<EFBFBD><D5B2><EFBFBD><EFBFBD>ύȷ<E1BDBB>ϣ<EFBFBD>');
|
|
|
exit ;
|
|
|
end ;
|
|
|
try
|
|
|
t_op_seae_assistant_online.Close ;
|
|
|
t_op_seae_assistant_online.Open;
|
|
|
while t_op_seae_assistant_online.RecordCount>0 do t_op_seae_assistant_online.Delete ;
|
|
|
t_op_seae_assistant.Edit ;
|
|
|
t_op_seae_assistant['<27>ύȷ<E1BDBB><C8B7>']:=td_sate2 ;
|
|
|
t_op_seae_assistant.Post ;
|
|
|
////add <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ݿ<EFBFBD>
|
|
|
t_op_seae_assistant_online.Insert ;
|
|
|
for i:=0 to (t_op_seae_assistant_online.fieldcount-1) do
|
|
|
begin
|
|
|
try
|
|
|
myfield:=t_op_seae_assistant_online.Fields[i].fieldName ;
|
|
|
if t_op_seae_assistant.FindField(myfield)<>nil then
|
|
|
t_op_seae_assistant_online[myfield]:=t_op_seae_assistant[myfield];
|
|
|
except
|
|
|
;
|
|
|
end;
|
|
|
end ;
|
|
|
t_op_seae_assistant_online['<27>ύȷ<E1BDBB><C8B7>']:=td_assate1 ;
|
|
|
t_op_seae_assistant_online.post ;
|
|
|
except
|
|
|
showmessage('<27>ύʧ<E1BDBB><CAA7>');
|
|
|
exit ;
|
|
|
end ;
|
|
|
//<2F><><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if (yctx<>'<27><><EFBFBD><EFBFBD>') then exit ;
|
|
|
if (trim(get_parameters_value(136,'<27><>'))='<27><>') then exit;
|
|
|
frm_send_msg:=Tfrm_send_msg.Create(self);
|
|
|
try
|
|
|
frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_seae_assistant1.DataSet['ί<>е<EFBFBD>λ'],[]);
|
|
|
frm_send_msg.t_crm_client_link.Open;
|
|
|
frm_send_msg.memmsg.open;
|
|
|
frm_send_msg.memmsg.insert;
|
|
|
frm_send_msg.memmsg.FieldByName('<27>ռ<EFBFBD><D5BC><EFBFBD>λ').AsString:=t_op_seae_assistant1.DataSet['ί<>е<EFBFBD>λ'];
|
|
|
if not frm_send_msg.t_crm_client_link.IsEmpty then begin
|
|
|
frm_send_msg.t_crm_client_link.first;
|
|
|
frm_send_msg.memmsg.FieldByName('<27>ռ<EFBFBD><D5BC><EFBFBD>').AsString:=frm_send_msg.t_crm_client_link['<27><><EFBFBD><EFBFBD>'];
|
|
|
end;
|
|
|
|
|
|
frm_send_msg.memmsg.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>:'+t_op_seae_assistant1.DataSet['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']+','
|
|
|
+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+t_op_seae_assistant1.DataSet.Fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+','
|
|
|
+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+t_op_seae_assistant1.DataSet.Fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+','
|
|
|
+'<27><><EFBFBD>Σ<EFBFBD>'+t_op_seae_assistant1.DataSet.Fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+' '+'<27><><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>';
|
|
|
if trim(get_parameters_value(136,'<27><>'))='MSN' then
|
|
|
frm_send_msg.checkboxMSN.Checked:=true;
|
|
|
if trim(get_parameters_value(136,'<27><>'))='<27>ʼ<EFBFBD>' then
|
|
|
frm_send_msg.checkboxMAIL.Checked:=true;
|
|
|
if trim(get_parameters_value(136,'<27><>'))='<27><><EFBFBD><EFBFBD>' then
|
|
|
frm_send_msg.checkboxMSG.Checked:=true;
|
|
|
frm_send_msg.ShowModal;
|
|
|
finally
|
|
|
FreeAndNil(frm_send_msg);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton13Click(Sender: TObject);
|
|
|
begin
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᵥȷ<E1B5A5><C8B7> ״̬
|
|
|
if t_op_seae_assistant.IsEmpty then exit ;
|
|
|
if t_op_seae_assistant['<27>ύȷ<E1BDBB><C8B7>']=td_sate3 then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ״̬<D7B4><CCAC><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>ȷ<EFBFBD>ϣ<EFBFBD>');
|
|
|
exit ;
|
|
|
end ;
|
|
|
t_op_seae_assistant.Edit ;
|
|
|
t_op_seae_assistant['<27>ύȷ<E1BDBB><C8B7>']:=td_sate1 ;
|
|
|
t_op_seae_assistant.Post ;
|
|
|
////del <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ݿ<EFBFBD>
|
|
|
with frm_main.qryTmp,sql do
|
|
|
begin
|
|
|
close ; clear ;
|
|
|
add('delete from t_op_seae_assistant_on where as_id=:as_id');
|
|
|
parameters.ParamByName('as_id').value:=t_op_seae_assistant.Fieldbyname('as_id').AsInteger ;
|
|
|
execsql ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBEditEh1EditButtons0Click(
|
|
|
Sender: TObject; var Handled: Boolean);
|
|
|
begin
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ᵥȷ<E1B5A5>ϸ<EFBFBD><CFB8>µ<EFBFBD><C2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
if t_op_seae_assistant['<27>ύȷ<E1BDBB><C8B7>']=td_sate1 then exit ;
|
|
|
if t_op_seae_assistant.State in [dsedit,dsinsert] then t_op_seae_assistant.post ;
|
|
|
frm_op_seae_assistant_qr:=Tfrm_op_seae_assistant_qr.Create(self);
|
|
|
frm_op_seae_assistant_qr.showasid(t_op_seae_assistant,t_op_seae_assistant.FieldByName('as_id').asinteger) ;
|
|
|
frm_op_seae_assistant_qr.Free ;
|
|
|
t_op_seae_assistant.Refresh ;
|
|
|
if (t_op_seae_assistant.DataSource.DataSet<>nil)and (t_op_seae_assistant.DataSource.DataSet.Active) then
|
|
|
t_op_seae_assistant.DataSource.DataSet.Refresh ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.t_op_seae_assistantAfterPost(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
// TAdoQuery(t_op_seae_assistant.DataSource.DataSet).Refresh;
|
|
|
//<2F><><EFBFBD>ļ<EFBFBD><C4BC>س߸<D8B3><DFB8>»<EFBFBD><C2BB><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
try
|
|
|
if updates then
|
|
|
if MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD>ء<EFBFBD><D8A1><EFBFBD><DFBB><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѷ<EFBFBD><D1B7><EFBFBD><EFBFBD>ı<EFBFBD>,<2C>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ݣ<EFBFBD>',mtWarning,[mbYes,mbNo],0)=mrYes then begin
|
|
|
t_op_seae_assistant.DataSource.DataSet.Edit;
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><>װ']:=t_op_seae_assistant['<27><>װ'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><>ͷ']:=t_op_seae_assistant['<27><>ͷ'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д'];
|
|
|
frm_op_seae.assup:=true;
|
|
|
t_op_seae_assistant.DataSource.DataSet.post;
|
|
|
updates:=false;
|
|
|
end;
|
|
|
finally
|
|
|
frm_op_seae.assup:=false;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton14Click(Sender: TObject);
|
|
|
begin
|
|
|
//<2F><><EFBFBD>µ<EFBFBD><C2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|
|
try
|
|
|
if MessageDlg('ȷʵҪ<CAB5><D2AA><EFBFBD>»<EFBFBD><C2BB><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbYes,mbNo],0)=mrYes then begin
|
|
|
t_op_seae_assistant.DataSource.DataSet.Edit;
|
|
|
if t_op_seae_assistant.FieldByName('<27>ᵥ<EFBFBD><E1B5A5><EFBFBD><EFBFBD>').AsString='ֱ<><D6B1>' then begin
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:=t_op_seae_assistant['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>']:=t_op_seae_assistant['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>'];
|
|
|
end;
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['װ<><D7B0><EFBFBD><EFBFBD>']:=t_op_seae_assistant['װ<><D7B0><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['ж<><D0B6><EFBFBD><EFBFBD>']:=t_op_seae_assistant['ж<><D0B6><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['Ŀ<>ĵ<EFBFBD>']:=t_op_seae_assistant['Ŀ<>ĵ<EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27>ᵥ<EFBFBD><E1B5A5><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27>ᵥ<EFBFBD><E1B5A5><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['ǩ<><C7A9><EFBFBD>ص<EFBFBD>']:=t_op_seae_assistant['ǩ<><C7A9><EFBFBD>ص<EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae_assistant['ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:=t_op_seae_assistant['<27><><EFBFBD>ѷ<EFBFBD>ʽ'];
|
|
|
|
|
|
t_op_seae_assistant.DataSource.DataSet['Ԥ<><D4A4><EFBFBD>ص<EFBFBD>']:=t_op_seae_assistant['Ԥ<><D4A4><EFBFBD>ص<EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><>ͷ']:=t_op_seae_assistant['<27><>ͷ'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>'];
|
|
|
|
|
|
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><>װ']:=t_op_seae_assistant['<27><>װ'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_seae_assistant.DataSource.DataSet.post;
|
|
|
end;
|
|
|
except
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.dxDBGrid1Column1CustomDraw(
|
|
|
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 Trim(ANode.Strings[dxDBGrid1Column3.Index])='ֱ<><D6B1>' then
|
|
|
AColor:=clgreen;
|
|
|
AFont.Color:=clblack;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.N3Click(Sender: TObject);
|
|
|
begin
|
|
|
//ǿ<><C7BF>ת<EFBFBD><D7AA><EFBFBD>ɴ<EFBFBD>д
|
|
|
if t_op_seae_assistant.state in [dsedit,dsinsert] then t_op_seae_assistant.post;
|
|
|
|
|
|
if t_op_seae_assistant.IsEmpty then exit;
|
|
|
t_op_seae_assistant.Edit;
|
|
|
t_op_seae_assistant.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27><>ͷ').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><>ͷ').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>').AsString);
|
|
|
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
|
t_op_seae_assistant.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('Ŀ<>ĵ<EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('Ŀ<>ĵ<EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('ǩ<><C7A9><EFBFBD>ص<EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('ǩ<><C7A9><EFBFBD>ص<EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.FieldByName('Ԥ<><D4A4><EFBFBD>ص<EFBFBD>').AsString:=UpperCase(t_op_seae_assistant.FieldByName('Ԥ<><D4A4><EFBFBD>ص<EFBFBD>').AsString);
|
|
|
t_op_seae_assistant.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinSpeedButton2Click(Sender: TObject);
|
|
|
var
|
|
|
Edistring:TStrings;
|
|
|
filenames:string;
|
|
|
begin
|
|
|
EdiString:=TStringList.Create;
|
|
|
try
|
|
|
OpenDialog1.Execute;
|
|
|
FileNames:=OpenDialog1.FileName;
|
|
|
if FileNames<>'' then begin
|
|
|
EdiString.LoadFromFile(FileNames);
|
|
|
NewEdiSEAE(EdiString,t_op_seae_assistant1);
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(EdiString);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.wwDBLookupCombo4Change(Sender: TObject);
|
|
|
begin
|
|
|
if (t_op_ctn_fendan.State=dsedit)or(t_op_ctn_fendan.State=dsinsert) then
|
|
|
begin
|
|
|
if frm_data_share.t_code_ctn.Locate('<27><><EFBFBD><EFBFBD>',wwDBLookupCombo4.text,[]) then
|
|
|
begin
|
|
|
t_op_ctn_fendan['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'];
|
|
|
t_op_ctn_fendan['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_op_ctn_fendan['<27>ߴ<EFBFBD>']:=frm_data_share.t_code_ctn['<27>ߴ<EFBFBD>'];
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_op_ctn_fendan['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:='';
|
|
|
t_op_ctn_fendan['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
t_op_ctn_fendan['<27>ߴ<EFBFBD>']:='';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.t_op_ctn_fendanAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_op_ctn_fendan['<27><><EFBFBD><EFBFBD>']:=t_op_seae_assistant.FieldByName('AS_ID').AsInteger;
|
|
|
t_op_ctn_fendan['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.t_op_seae_assistantAfterScroll(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_op_ctn_fendan.Open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.t_op_ctn_fendanBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if t_op_seae_assistant.IsEmpty then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD>ȵ<EFBFBD><C8B5><EFBFBD><EFBFBD>ӷֵ<D3B7><D6B5><EFBFBD>ť,<2C><><EFBFBD>ӷֵ<D3B7>');
|
|
|
Abort;
|
|
|
end;
|
|
|
if t_op_seae_assistant.State in [dsEdit,dsInsert] then
|
|
|
t_op_seae_assistant.Post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton15Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_ctn_fendan1,'Ʒ<><C6B7>');
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBMemo33Click(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo2.Text:='Num:'+IntToStr(Length(DBMemo33.Lines[DBMemo33.CaretPos.Y]));
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBMemo34Click(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo5.Text:='Num:'+IntToStr(Length(DBMemo34.Lines[DBMemo34.CaretPos.Y]));
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.DBMemo35Click(Sender: TObject);
|
|
|
begin
|
|
|
wwDBLookupCombo6.Text:='Num:'+IntToStr(Length(DBMemo35.Lines[DBMemo35.CaretPos.Y]));
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton16Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_main.view_momo(t_op_seae_assistant1,'EDI<44><49>ע');
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton17Click(Sender: TObject);
|
|
|
var
|
|
|
bok:Tbookmark;
|
|
|
if_first:boolean;
|
|
|
pkgs:integer;
|
|
|
kgs,cbm:double;
|
|
|
s,package:string;
|
|
|
list1,list2,list3,list4:TStringList;
|
|
|
begin
|
|
|
if t_op_ctn_fendan.IsEmpty then
|
|
|
exit;
|
|
|
t_op_seae_assistant.AfterPost:=nil;
|
|
|
|
|
|
t_op_ctn_fendan.First;
|
|
|
if_first:=true;
|
|
|
pkgs:=0;
|
|
|
kgs:=0.00;
|
|
|
cbm:=0.00;
|
|
|
bok:=t_op_ctn_fendan.GetBookmark;
|
|
|
try
|
|
|
list1:=TStringList.Create;
|
|
|
list2:=TStringList.Create;
|
|
|
list3:=TStringList.Create;
|
|
|
list4:=TStringList.Create;
|
|
|
t_op_ctn_fendan.DisableControls;
|
|
|
while not t_op_ctn_fendan.Eof do
|
|
|
begin
|
|
|
if if_first then
|
|
|
begin
|
|
|
if (Trim(t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)<>'') then
|
|
|
list1.Text:=t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'/'+t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
list2.Text:=t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+t_op_ctn_fendan.fieldbyname('<27><>װ').asstring;
|
|
|
list3.Text:=t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'KGS';
|
|
|
list4.Text:=t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'CBM';
|
|
|
pkgs:=t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
kgs:=t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
cbm:=t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
package:=t_op_ctn_fendan.fieldbyname('<27><>װ').asstring;
|
|
|
if_first:=false;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
if (Trim(t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)<>'') then
|
|
|
list1.Add(t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'/'+t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
list2.Add(t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+t_op_ctn_fendan.fieldbyname('<27><>װ').asstring);
|
|
|
list3.Add(t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'KGS');
|
|
|
list4.Add(t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'CBM');
|
|
|
pkgs:=pkgs+t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
|
|
|
kgs:=kgs+t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
cbm:=cbm+t_op_ctn_fendan.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
|
|
|
package:=t_op_ctn_fendan.fieldbyname('<27><>װ').asstring;
|
|
|
|
|
|
|
|
|
end;
|
|
|
t_op_ctn_fendan.next;
|
|
|
end;
|
|
|
|
|
|
t_op_seae_assistant.edit;
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>').asstring:=list1.Text;
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ').asstring:=list2.Text;
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=list3.Text;
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring:=list4.Text;
|
|
|
t_op_seae_assistant.post;
|
|
|
finally
|
|
|
t_op_seae_assistant.AfterPost:=t_op_seae_assistantAfterPost;
|
|
|
t_op_ctn_fendan.EnableControls;
|
|
|
t_op_ctn_fendan.GotoBookmark(bok);
|
|
|
list1.Free;
|
|
|
list2.Free;
|
|
|
list3.Free;
|
|
|
list4.Free;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinSpeedButton3Click(Sender: TObject);
|
|
|
var
|
|
|
Ext,vessel,voyno,tmpstr,strhscode,tmpexcel,ctnnumstr,ctntype,ctnsize:String;
|
|
|
ExcelTemplet:Variant;
|
|
|
TempstrList:Tstringlist;
|
|
|
i,excelline,ctnnum:Integer;
|
|
|
aQuery,aQuery2:TADOQuery;
|
|
|
|
|
|
begin
|
|
|
|
|
|
if not (t_op_seae_assistant.State in [dsedit,dsinsert]) then
|
|
|
t_op_seae_assistant.Edit;
|
|
|
|
|
|
if OpenDialog1.Execute then begin
|
|
|
Ext:=lowercase(ExtractFileExt(OpenDialog1.FileName));
|
|
|
if Ext='.xls' then begin
|
|
|
ExcelTemplet:= CreateOleObject('Excel.Application');
|
|
|
TempstrList:=Tstringlist.Create;
|
|
|
aQuery:=createAdoQuery;
|
|
|
try
|
|
|
ExcelTemplet.Workbooks.Open(OpenDialog1.FileName);
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[6,25].Value);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString:=tmpstr;
|
|
|
// if t_op_seae_assistant.FieldByName('<27><>վ').AsString='' then t_op_seae_assistant.FieldByName('<27><>վ').AsString:='<27><>½<EFBFBD><C2BD>վ(<28><><EFBFBD><EFBFBD>)';
|
|
|
// t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString:='MSC';
|
|
|
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[14,23].Value);
|
|
|
if (tmpstr='') then tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[15,23].Value);
|
|
|
if (tmpstr='') then tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[16,23].Value);
|
|
|
if (tmpstr='') then tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[17,23].Value);
|
|
|
|
|
|
if (tmpstr<>'') then begin
|
|
|
TempstrList.Text:=tmpstr;
|
|
|
t_op_seae_assistant.FieldByName('EDI<44><49>ע').AsString:=tmpstr;
|
|
|
for i:=0 to TempstrList.Count-1 do
|
|
|
begin
|
|
|
tmpstr:= TempstrList.Strings[i];
|
|
|
if pos('HS:',tmpstr)>0 then begin
|
|
|
strhscode:=Copy(tmpstr,pos('HS:',tmpstr)+3,Length(tmpstr)-pos('HS:',tmpstr)-2);
|
|
|
if (strhscode<>'') then t_op_seae_assistant.FieldByName('HS<48><53><EFBFBD><EFBFBD>').AsString:=Trim(strhscode);
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
for excelline:=2 to 70 do begin
|
|
|
tmpexcel:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline,2].Value);
|
|
|
if (tmpexcel='Shipper (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)') then begin
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+1,2].Value);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString:=tmpstr;
|
|
|
end;
|
|
|
if (tmpexcel='Consignee (<28>ջ<EFBFBD><D5BB><EFBFBD>)') then begin
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+2,2].Value);
|
|
|
t_op_seae_assistant.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString:=tmpstr;
|
|
|
end;
|
|
|
if (tmpexcel='Notify Party (֪ͨ<CDA8><D6AA>)') then begin
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+1,2].Value);
|
|
|
t_op_seae_assistant.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString:=tmpstr;
|
|
|
end;
|
|
|
|
|
|
if (tmpexcel='Ocean Vessel(<28><><EFBFBD><EFBFBD>) Voy. No. (<28><><EFBFBD><EFBFBD>)') then begin
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+1,2].Value);
|
|
|
if (Pos('-',tmpstr)>0) then begin
|
|
|
vessel:=copy(tmpstr,0,Pos('-',tmpstr)-1);
|
|
|
voyno:= copy(tmpstr,Pos('-',tmpstr)+1,Length(tmpstr)-Pos('-',tmpstr)-1);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=Trim(vessel);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=Trim(voyno);
|
|
|
v_vessel_voyage.close;
|
|
|
v_vessel_voyage.sql.text:='select * from v_vessel_voyage where Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>='''+Trim(vessel)+''' and <20><><EFBFBD><EFBFBD>='''+Trim(voyno)+'''';
|
|
|
v_vessel_voyage.open;
|
|
|
if not v_vessel_voyage.isempty then t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=v_vessel_voyage['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
v_vessel_voyage.Close;
|
|
|
|
|
|
end;
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+1,12].Value);
|
|
|
t_op_seae_assistant.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').AsString:=tmpstr;
|
|
|
end;
|
|
|
if (tmpexcel='Port of Discharge (ж<><D0B6><EFBFBD><EFBFBD>)') then begin
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+1,2].Value);
|
|
|
t_op_seae_assistant.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').AsString:=tmpstr;
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+1,13].Value);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>').AsString:=tmpstr;
|
|
|
t_op_seae_assistant.FieldByName('Ŀ<>ĵ<EFBFBD>').AsString:=tmpstr;
|
|
|
end;
|
|
|
if pos('Container No.',tmpexcel)>0 then begin
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+5,2].Value);
|
|
|
t_op_seae_assistant.FieldByName('<27><>ͷ').AsString:=tmpstr;
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+5,11].Value);
|
|
|
if (tmpstr<>'') then begin
|
|
|
tmpstr:=UpperCase(StringReplace(tmpstr,',','',[rfReplaceAll]));
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ').AsString:=tmpstr;
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD>']:=totalstr_num(tmpstr);
|
|
|
t_op_seae_assistant['<27><>װ']:=totalstr_package(tmpstr);
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']
|
|
|
:='SAY:'+ntoc(t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat,true)
|
|
|
+t_op_seae_assistant.FieldByName('<27><>װ').asstring+' ONLY.';
|
|
|
end;
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+7,15].Value);
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=tmpstr;
|
|
|
if (tmpstr<>'') then begin
|
|
|
TempstrList.Text:=tmpstr;
|
|
|
if (TempstrList.Count>3) then begin
|
|
|
tmpstr:=TempstrList.Strings[TempstrList.Count-5];
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=StringReplace(tmpstr,'/','-',[]);
|
|
|
end;
|
|
|
end;
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+5,31].Value);
|
|
|
if (tmpstr<>'') then begin
|
|
|
tmpstr:=StringReplace(tmpstr,',','',[rfReplaceAll]);
|
|
|
if (Pos('KGS',tmpstr)<=0) then tmpstr:=tmpstr+'KGS';
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=tmpstr;
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD>']:=totalstr_num(tmpstr);
|
|
|
end;
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+5,35].Value);
|
|
|
if (tmpstr<>'') then begin
|
|
|
tmpstr:=StringReplace(tmpstr,',','',[rfReplaceAll]);
|
|
|
if (Pos('CBM',tmpstr)<=0) then tmpstr:=tmpstr+'CBM';
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=tmpstr;
|
|
|
t_op_seae_assistant['<27><><EFBFBD><EFBFBD>']:=totalstr_num(tmpstr);
|
|
|
end;
|
|
|
end;
|
|
|
if pos('TOTAL NUMBER OF CONTAINERS',tmpexcel)>0 then begin
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline-3,18].Value);
|
|
|
if (tmpstr<>'') then begin
|
|
|
t_op_seae_assistant.Post;
|
|
|
ctnnumstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline-3,22].Value);
|
|
|
ctnnum:=0;
|
|
|
if (ctnnumstr<>'') then begin
|
|
|
ctnnum:=StrToIntDef(ctnnumstr,0);
|
|
|
if (ctnnum<>0) then begin
|
|
|
tmpstr:=Copy(tmpstr,0,4);
|
|
|
ctnsize:=Copy(tmpstr,0,2);
|
|
|
ctntype:=Copy(tmpstr,3,2);
|
|
|
|
|
|
|
|
|
aQuery2:=createAdoQuery;
|
|
|
try
|
|
|
aQuery2.close;aQuery2.sql.Clear;
|
|
|
aQuery2.SQL.Add('select * from t_code_ctn where EDI<44><49><EFBFBD><EFBFBD>EXCEL='''+tmpstr+'''');
|
|
|
aQuery2.Open;
|
|
|
if aQuery.IsEmpty then begin
|
|
|
|
|
|
if not aQuery2.isempty then begin
|
|
|
t_op_ctn_fendan.Insert;
|
|
|
t_op_ctn_fendan.FieldByName('AS_ID').AsString:=t_op_seae_assistant.fieldbyname('AS_ID').AsString;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
t_op_ctn_fendan.FieldByName('<27>ߴ<EFBFBD>').AsString:=aQuery2.fieldbyname('<27>ߴ<EFBFBD>').AsString;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString:=aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=ctnnum;
|
|
|
if aQuery2.fieldbyname('<27>ߴ<EFBFBD>').AsString='20'then
|
|
|
t_op_ctn_fendan.FieldByName('TEU').AsInteger:=1;
|
|
|
if (aQuery2.fieldbyname('<27>ߴ<EFBFBD>').AsString='40') OR (aQuery2.fieldbyname('<27>ߴ<EFBFBD>').AsString='45') then
|
|
|
t_op_ctn_fendan.FieldByName('TEU').AsInteger:=2;
|
|
|
t_op_ctn_fendan.Post;
|
|
|
if not (t_op_seae_assistant.State in [dsedit,dsinsert]) then
|
|
|
t_op_seae_assistant.Edit;
|
|
|
t_op_seae_assistant.FieldByName('<27><>װ<EFBFBD><D7B0>').AsString:=aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString+'*'+IntToStr(ctnnum);
|
|
|
end;
|
|
|
end else begin
|
|
|
if (t_op_seae_assistant.FieldByName('<27><>װ<EFBFBD><D7B0>').AsString<>(aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString+'*'+IntToStr(ctnnum)))then
|
|
|
ShowMessage('ע<>⣺<EFBFBD><E2A3BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>£<EFBFBD>');
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
finally
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
if pos('FREIGHT & CHARGES',tmpexcel)>0 then begin
|
|
|
tmpstr:=VartoStr(ExcelTemplet.ActiveSheet.Cells[excelline+2,2].Value);
|
|
|
if (tmpstr<>'') then begin
|
|
|
if not (t_op_seae_assistant.State in [dsedit,dsinsert]) then
|
|
|
t_op_seae_assistant.Edit;
|
|
|
if (UpperCase(tmpstr)='COLLECT') then
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').AsString:='FREIGHT COLLECT';
|
|
|
if (UpperCase(tmpstr)='PREPAID') then
|
|
|
t_op_seae_assistant.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').AsString:='FREIGHT PREPAID';
|
|
|
|
|
|
// if not aQuery.IsEmpty then update_ctn(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
finally
|
|
|
ExcelTemplet.DisplayAlerts := false;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
|
|
ExcelTemplet.Quit;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>
|
|
|
FreeAndNil(TempstrList);
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
t_op_seae_assistant.Post;
|
|
|
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD>', mtConfirmation, [mbYes],0);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.bsSkinButton18Click(Sender: TObject);
|
|
|
var
|
|
|
yardcode:string;
|
|
|
IdHTTP1:TIdHTTP;
|
|
|
strmsg,company:string;
|
|
|
Url : string;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
|
|
|
ResponseStream : TStringStream; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
ResponseStr: string;
|
|
|
RequestStr : string; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
RequestStream : TStringStream;
|
|
|
jo:ISuperobject;
|
|
|
tt:TSuperArray;
|
|
|
i:Integer;
|
|
|
CTNALL,s_ctnno,s_ctnType,pkgs,kgs,cbm:string;
|
|
|
begin
|
|
|
if Trim(t_op_seae_assistant.DataSource.DataSet.fieldbyname('<27><>վ').AsString)='' then begin
|
|
|
ShowMessage('<27><>վ<EFBFBD><D5BE><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
if Trim(t_op_seae_assistant.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString)='' then begin
|
|
|
ShowMessage('<27><><EFBFBD>ᵥ<EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
yardcode:=getYardCode(Trim(t_op_seae_assistant.DataSource.DataSet.fieldbyname('<27><>վ').AsString));
|
|
|
if (yardcode='') then begin
|
|
|
ShowMessage('<27><>վ<EFBFBD><D5BE>ʤ<EFBFBD><CAA4><EFBFBD>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
company:=frm_data_share.t_sys_company.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
ResponseStream := TStringStream.Create('');
|
|
|
RequestStream := TStringStream.Create('');
|
|
|
IdHTTP1:=TIdHTTP.Create(Application);
|
|
|
try
|
|
|
IdHttp1.Request.Accept := '*/*';
|
|
|
IdHttp1.Request.AcceptLanguage:='zh-CN';
|
|
|
IdHttp1.Request.UserAgent:='Mozilla/3.0 (compatible; Indy Library)';
|
|
|
IdHttp1.Request.ContentType:='application/x-www-form-urlencoded';
|
|
|
Url:='http://47.104.90.170:5000/query';
|
|
|
try
|
|
|
RequestStr:='webusername=&webuserpass=&mblno='+Trim(t_op_seae_assistant.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString)+'&yardid='+yardcode+'&isweb=0&custname='+company+'&psw='; //<2F><>С<EFBFBD><D0A1>
|
|
|
RequestStream.WriteString(RequestStr);
|
|
|
IdHttp1.post(Url,RequestStream,ResponseStream);
|
|
|
except
|
|
|
on e : Exception do
|
|
|
begin
|
|
|
end;
|
|
|
end;
|
|
|
ResponseStr := ResponseStream.DataString; //<2F><>ȡ<EFBFBD><C8A1>ҳ<EFBFBD><D2B3><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>Ϣ
|
|
|
ResponseStr := UTF8Decode(ResponseStr); //<2F><>ҳ<EFBFBD>еĴ<D0B5><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>UTF8<46><38><EFBFBD><EFBFBD>
|
|
|
jo:=so(ResponseStr);
|
|
|
if (jo.O['status'].AsString='0') then begin
|
|
|
showmessage('<27><EFBFBD><DEB7><EFBFBD>ȡ,'+jo.O['message'].AsString);
|
|
|
end else begin
|
|
|
tt:=jo.O['message'].AsArray;
|
|
|
for i:=0 to tt.Length-1 do
|
|
|
begin
|
|
|
CTNALL:=tt.O[i].S['CTNALL'];
|
|
|
if t_op_ctn_fendan.Locate('<27><><EFBFBD><EFBFBD>',Trim(tt.O[i].S['CNTRNO']),[]) then
|
|
|
begin
|
|
|
t_op_ctn_fendan.Edit;
|
|
|
s_ctnno:=Copy(CTNALL,1,2);
|
|
|
s_ctnType:=Copy(CTNALL,3,2);
|
|
|
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
|
|
|
begin
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
end;
|
|
|
|
|
|
pkgs:=tt.O[i].S['PKGS'];
|
|
|
kgs:=tt.O[i].S['KGS'];
|
|
|
cbm:=tt.O[i].S['CBM'];
|
|
|
if pkgs='' then pkgs:='0';
|
|
|
if kgs='' then kgs:='0';
|
|
|
if cbm='' then cbm:='0';
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=tt.O[i].S['SEALNO'];
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=StrToInt(pkgs);
|
|
|
t_op_ctn_fendan.FieldByName('<27><>װ').AsString:=t_op_ctn_fendan.DataSource.DataSet.fieldbyname('<27><>װ').AsString;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=StrToFloatDef(kgs,0);
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=StrToFloatDef(cbm,0);
|
|
|
t_op_ctn_fendan.Post;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_op_ctn_fendan.append;
|
|
|
|
|
|
s_ctnno:=Copy(CTNALL,1,2);
|
|
|
s_ctnType:=Copy(CTNALL,3,2);
|
|
|
pkgs:=tt.O[i].S['PKGS'];
|
|
|
kgs:=tt.O[i].S['KGS'];
|
|
|
cbm:=tt.O[i].S['CBM'];
|
|
|
if pkgs='' then pkgs:='0';
|
|
|
if kgs='' then kgs:='0';
|
|
|
if cbm='' then cbm:='0';
|
|
|
if frm_data_share.t_code_ctn.Locate('<27>ߴ<EFBFBD>;<3B><><EFBFBD><EFBFBD>',VarArrayOf([trim(s_ctnno),trim(s_ctnType)]), []) then
|
|
|
begin
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
end;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=tt.O[i].S['CNTRNO'];
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=tt.O[i].S['SEALNO'];
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=StrToInt(pkgs);
|
|
|
t_op_ctn_fendan.FieldByName('<27><>װ').AsString:=t_op_ctn_fendan.DataSource.DataSet.fieldbyname('<27><>װ').AsString;
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=StrToFloatDef(kgs,0);
|
|
|
t_op_ctn_fendan.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=StrToFloatDef(cbm,0);
|
|
|
t_op_ctn_fendan.Post;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(IdHTTP1);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
function Tfrm_op_seae_assistant.getYardCode(yard: string): string;
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('Select <20><>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+yard+'''');
|
|
|
Open;
|
|
|
if not IsEmpty then
|
|
|
Result:=Trim(FieldByName('<27><>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD>').asstring)
|
|
|
else
|
|
|
Result:='';
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_assistant.Button3Click(Sender: TObject);
|
|
|
var
|
|
|
dsstr,PostUrl:string;
|
|
|
i:integer;
|
|
|
str:widestring;
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
if t_op_seae_assistant.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
|
|
|
dsstr:='{';
|
|
|
dsstr:=dsstr+'"orderNo":"'+t_op_seae_assistant.DataSource.DataSet.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString+'"';
|
|
|
dsstr:=dsstr+',"status":"N"';
|
|
|
dsstr:=dsstr+',"bookingId":"'+t_op_seae_assistant.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'"';
|
|
|
dsstr:=dsstr+',"bookingIdDate":"'+FormatDateTime('YYYY-MM-DD hh:mm:ss',t_op_seae_assistant.DataSource.DataSet.FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime)+'"';
|
|
|
dsstr:=dsstr+',"bookingNumber":"'+t_op_seae_assistant.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'"';
|
|
|
dsstr:=dsstr+',"loadingOrderNo":"'+t_op_seae_assistant.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'"';
|
|
|
dsstr:=dsstr+',"hawbNo":""';
|
|
|
dsstr:=dsstr+',"pickUpCode":""';
|
|
|
dsstr:=dsstr+',"shipName":"'+t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'"';
|
|
|
dsstr:=dsstr+',"voyageNum":"'+t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+'"';
|
|
|
dsstr:=dsstr+',"imo":"'+t_op_seae_assistant.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˱<EFBFBD><CBB1><EFBFBD>').AsString+'"';
|
|
|
dsstr:=dsstr+',"expectSailDate":"'+t_op_seae_assistant.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'"';
|
|
|
dsstr:=dsstr+',"expectArrivalDate":"'+t_op_seae_assistant.DataSource.DataSet.FieldByName('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'"';
|
|
|
dsstr:=dsstr+',"actualSailDate":""';
|
|
|
dsstr:=dsstr+',"actualArrivalDate":""';
|
|
|
dsstr:=dsstr+',"twoShipName":""';
|
|
|
dsstr:=dsstr+',"twoVoyageNum":""';
|
|
|
dsstr:=dsstr+',"twoexpectSailDate":""';
|
|
|
dsstr:=dsstr+',"twoexpectArrivalDate":""';
|
|
|
dsstr:=dsstr+',"twoactualSailDate":""';
|
|
|
dsstr:=dsstr+',"twoactualArrivalDate":""';
|
|
|
dsstr:=dsstr+',"station":"'+t_op_seae_assistant.DataSource.DataSet.FieldByName('<27><>վ').AsString+'"';
|
|
|
dsstr:=dsstr+',"stationAddress":""';
|
|
|
dsstr:=dsstr+',"stationContacts":"'+t_op_seae_assistant.DataSource.DataSet.FieldByName('<27><>վ<EFBFBD><D5BE>ϵ<EFBFBD><CFB5>').AsString+'"';
|
|
|
dsstr:=dsstr+',"stationContactsPhone":""';
|
|
|
dsstr:=dsstr+',"portCutDate":"'+t_op_seae_assistant.DataSource.DataSet.FieldByName('<27>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>').AsString+'"';
|
|
|
dsstr:=dsstr+',"orderCutDate":"'+t_op_seae_assistant.DataSource.DataSet.FieldByName('<27>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>').AsString+'"';
|
|
|
dsstr:=dsstr+',"suitcaseDate":""';
|
|
|
dsstr:=dsstr+',"cutOffDate":""';
|
|
|
dsstr:=dsstr+',"ebdDate":""';
|
|
|
dsstr:=dsstr+',"hbrDate":""';
|
|
|
dsstr:=dsstr+',"remark":""';
|
|
|
dsstr:=dsstr+'}';
|
|
|
PostUrl:=get_parameters_value(2124,'http://47.104.90.170:6857/api/clp/bookingMsgReceipt');
|
|
|
|
|
|
TDsHaierThread.create(PostUrl,dsstr,'',t_op_seae_assistant.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString);
|
|
|
InsertSysLog('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>»<EFBFBD>ֽ',t_op_seae_assistant.DataSource.DataSet.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
|
|
|
|
|
|
if dxDBGrid1.SelectedCount>0 then
|
|
|
begin
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do begin
|
|
|
t_op_seae_assistant.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
if i=0 then
|
|
|
str:='('+''''+t_op_seae_assistant.fieldbyname('AS_ID').asstring+''''
|
|
|
else
|
|
|
str:=str+','+''''+t_op_seae_assistant.fieldbyname('AS_ID').asstring+'''';
|
|
|
end;
|
|
|
end else begin
|
|
|
str:='('+''''+t_op_seae_assistant.fieldbyname('AS_ID').asstring+'''';
|
|
|
end;
|
|
|
str:=str+')';
|
|
|
|
|
|
|
|
|
|
|
|
t_pt_fendan.close;
|
|
|
t_pt_fendan.sql.clear;
|
|
|
t_pt_fendan.sql.add('select * from t_op_seae_assistant '
|
|
|
+'where AS_ID in '+str
|
|
|
+' order by <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>');
|
|
|
t_pt_fendan.open;
|
|
|
|
|
|
mailSend.EmptyTable;
|
|
|
mailSend.Open;
|
|
|
mailSend.Insert;
|
|
|
mailSend.FieldByName('<27>ռ<EFBFBD><D5BC><EFBFBD>').AsString:=get_parameters_value(2125,'');
|
|
|
mailSend.FieldByName('<27>ʼ<EFBFBD>ǩ<EFBFBD><C7A9>').AsString:=MailSignName;
|
|
|
mailsend.fieldbyname('<27>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>').AsString :=t_op_seae_assistant.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27>»<EFBFBD>ֽ';
|
|
|
mailSend.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae_assistant.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
mailSend.FieldByName('<27>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>').AsString:='';
|
|
|
mailSend.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='PDF';
|
|
|
mailSend.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae_assistant.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
mailSend.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString:=t_op_seae_assistant.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;//t_op_letter.DataSource.DataSet.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
mailSend.Post;
|
|
|
try
|
|
|
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3>ڵ<EFBFBD>֤',5,t_pt_fendan1,t_op_seae_assistant.DataSource,nil,nil,nil,nil,nil,nil,nil,nil,nil,true,t_op_seae_assistant.DataSource.DataSet.FieldByName('ί<>е<EFBFBD>λ').asstring,nil,nil,mailSend,'PDF','HAIER <20><><EFBFBD>յ<EFBFBD>');
|
|
|
except
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|