|
|
|
|
unit u_op_seaictn_list;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, bsSkinCtrls, ExtCtrls, dxExEdtr, dxCntner, dxTL, dxDBCtrl,
|
|
|
|
|
dxDBGrid, Grids, Wwdbigrd, Wwdbgrid, StdCtrls, DB,
|
|
|
|
|
ADODB, dxDBTLCl, dxGrClms, ComCtrls, bsSkinTabs, DBCtrls, wwdblook,
|
|
|
|
|
wwdbdatetimepicker, RxLookup, Menus, XPMenu, Mask, wwdbedit, Wwdotdot,
|
|
|
|
|
Wwdbcomb,inifiles;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_op_seaictn_list = class(TForm)
|
|
|
|
|
Panel2: TPanel;
|
|
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
|
|
t_op_seae: TADOQuery;
|
|
|
|
|
t_op_seae1: TDataSource;
|
|
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
|
|
N10: TMenuItem;
|
|
|
|
|
N11: TMenuItem;
|
|
|
|
|
N14: TMenuItem;
|
|
|
|
|
N13: TMenuItem;
|
|
|
|
|
N12: TMenuItem;
|
|
|
|
|
N15: TMenuItem;
|
|
|
|
|
N16: TMenuItem;
|
|
|
|
|
XPMenu1: TXPMenu;
|
|
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column7: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column8: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column12: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column15: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column16: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column20: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column23: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column24: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column25: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column26: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column27: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column28: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column29: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column30: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column31: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column37: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column38: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column40: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column41: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column42: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column43: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column44: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column45: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column46: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column47: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column52: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column76: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column77: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column78: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column79: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column80: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column81: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column82: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column107: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column108: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column109: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column110: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column111: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column112: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column113: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column114: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column118: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column193: TdxDBGridDateColumn;
|
|
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
|
|
lblcount: TLabel;
|
|
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
|
|
dxDBGrid1Column53: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column54: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column55: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column56: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column57: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column58: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column59: TdxDBGridColumn;
|
|
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
|
|
Label10: TLabel;
|
|
|
|
|
Label5: TLabel;
|
|
|
|
|
Label125: TLabel;
|
|
|
|
|
Label30: TLabel;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
Label8: TLabel;
|
|
|
|
|
Label6: TLabel;
|
|
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
|
|
wwDBLookupCombo49: TwwDBLookupCombo;
|
|
|
|
|
Edit7: TEdit;
|
|
|
|
|
Edit2: TEdit;
|
|
|
|
|
Edit3: TEdit;
|
|
|
|
|
RxDBLookupCombo6: TRxDBLookupCombo;
|
|
|
|
|
Edit1: TEdit;
|
|
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
|
|
Label38: TLabel;
|
|
|
|
|
DBEdit9: TDBEdit;
|
|
|
|
|
Label36: TLabel;
|
|
|
|
|
DBEdit7: TDBEdit;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
Label20: TLabel;
|
|
|
|
|
Label124: TLabel;
|
|
|
|
|
t_code_sendedi1: TDataSource;
|
|
|
|
|
t_code_sendedi: TADOQuery;
|
|
|
|
|
SaveDialog1: TSaveDialog;
|
|
|
|
|
RxDBLookupCombo8: TRxDBLookupCombo;
|
|
|
|
|
RxDBLookupCombo22: TRxDBLookupCombo;
|
|
|
|
|
dxDBGrid1Column60: TdxDBGridCheckColumn;
|
|
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid2Column3CustomDrawCell(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 bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
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 dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
procedure t_code_sendediAfterInsert(DataSet: TDataSet);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
seaestr,seaedelstr:string ;
|
|
|
|
|
function findstr:string ;
|
|
|
|
|
procedure setFootermsg;
|
|
|
|
|
procedure loadFindIni ;
|
|
|
|
|
procedure writeFindIni ;
|
|
|
|
|
function getcarrierid:string;
|
|
|
|
|
function GetCntrEdi(cntrsize: String):String;
|
|
|
|
|
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_op_seaictn_list: Tfrm_op_seaictn_list;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
uses u_main,my_sys_function,u_data_share ;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.FormClose(Sender: TObject;
|
|
|
|
|
var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
writeFindIni;
|
|
|
|
|
savereggrid(dxdbgrid1,caption+'1');
|
|
|
|
|
frm_op_seaictn_list.Hide;
|
|
|
|
|
frm_op_seaictn_list.ManualFloat(frm_op_seaictn_list.BoundsRect );
|
|
|
|
|
frm_main.freeTabs('frm_op_seaictn_list');
|
|
|
|
|
action:=cafree;
|
|
|
|
|
frm_op_seaictn_list:=nil;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
sys_print('<27><><EFBFBD>˽<EFBFBD><CBBD>ڼ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD>б<EFBFBD>',2,nil,nil,nil,nil,t_op_seae1,Nil,nil,nil,nil,nil,nil);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.N10Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.N14Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.N12Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
update_grid(dxdbgrid1,210);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.N16Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.FormShow(Sender: TObject);
|
|
|
|
|
var i:integer ;
|
|
|
|
|
begin
|
|
|
|
|
loadFindIni;
|
|
|
|
|
loadreggrid(dxdbgrid1,true,caption+'1');
|
|
|
|
|
t_code_sendedi.Open;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.dxDBGrid2Column3CustomDrawCell(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 frm_data_share.t_code_state.Locate('ҵ<><D2B5>״̬',backstate,[])then
|
|
|
|
|
AColor:=stringtocolor(frm_data_share.t_code_state.fieldbyname('<27><>ɫ').asstring)
|
|
|
|
|
else AColor:=clwhite ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
edit1.Text:='' ;
|
|
|
|
|
edit2.text:='' ;
|
|
|
|
|
edit3.text:='' ;
|
|
|
|
|
edit7.Text:='' ;
|
|
|
|
|
wwDBDateTimePicker1.Clear ;
|
|
|
|
|
wwDBDateTimePicker2.Clear ;
|
|
|
|
|
RxDBLookupCombo6.ClearValue ;
|
|
|
|
|
RxDBLookupCombo22.ClearValue ;
|
|
|
|
|
RxDBLookupCombo8.ClearValue ;
|
|
|
|
|
wwDBLookupCombo49.clear ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_seaictn_list.findstr: string;
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.setFootermsg;
|
|
|
|
|
var backteu,ggteu,thcteu:integer ;
|
|
|
|
|
i,teu1,teu2,teu3,teu4,teu5,teu6,teu7,teu8,teu9,teu10,teuot,teuall:integer;
|
|
|
|
|
steu:string;
|
|
|
|
|
teu:Array [1..10] of integer;
|
|
|
|
|
begin
|
|
|
|
|
{
|
|
|
|
|
lblcount.Caption:='Ʊ<><C6B1> <20><>: '+inttostr(t_op_seae.recordcount) ;
|
|
|
|
|
ggteu:=0 ; backteu:=0 ;thcteu:=0 ;
|
|
|
|
|
teu[1]:=0;
|
|
|
|
|
teu[2]:=0;
|
|
|
|
|
teu[3]:=0;
|
|
|
|
|
teu[4]:=0;
|
|
|
|
|
teu[5]:=0;
|
|
|
|
|
teu[6]:=0;
|
|
|
|
|
teu[7]:=0;
|
|
|
|
|
teu[8]:=0;
|
|
|
|
|
teu[9]:=0;
|
|
|
|
|
teu[10]:=0;
|
|
|
|
|
teuot:=0;
|
|
|
|
|
teuall:=0;
|
|
|
|
|
|
|
|
|
|
with t_op_seae do
|
|
|
|
|
begin
|
|
|
|
|
disablecontrols ;
|
|
|
|
|
first ;
|
|
|
|
|
while not eof do
|
|
|
|
|
begin
|
|
|
|
|
teu[1]:=teu[1]+fieldbyname('<27><><EFBFBD><EFBFBD>1').AsInteger;
|
|
|
|
|
teu[2]:=teu[2]+fieldbyname('<27><><EFBFBD><EFBFBD>2').AsInteger;
|
|
|
|
|
teu[3]:=teu[3]+fieldbyname('<27><><EFBFBD><EFBFBD>3').AsInteger;
|
|
|
|
|
teu[4]:=teu[4]+fieldbyname('<27><><EFBFBD><EFBFBD>4').AsInteger;
|
|
|
|
|
teu[5]:=teu[5]+fieldbyname('<27><><EFBFBD><EFBFBD>5').AsInteger;
|
|
|
|
|
teu[6]:=teu[6]+fieldbyname('<27><><EFBFBD><EFBFBD>6').AsInteger;
|
|
|
|
|
teu[7]:=teu[7]+fieldbyname('<27><><EFBFBD><EFBFBD>7').AsInteger;
|
|
|
|
|
teu[8]:=teu[8]+fieldbyname('<27><><EFBFBD><EFBFBD>8').AsInteger;
|
|
|
|
|
teu[9]:=teu[9]+fieldbyname('<27><><EFBFBD><EFBFBD>9').AsInteger;
|
|
|
|
|
teu[10]:=teu[10]+fieldbyname('<27><><EFBFBD><EFBFBD>10').AsInteger;
|
|
|
|
|
teuot:=teuot+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger;
|
|
|
|
|
teuall:=teuall+fieldbyname('<27><>TEU').AsInteger;
|
|
|
|
|
next ;
|
|
|
|
|
end ;
|
|
|
|
|
enablecontrols ;
|
|
|
|
|
steu:='<27><>װ<EFBFBD><D7B0>:';
|
|
|
|
|
for i:=1 to 10 do
|
|
|
|
|
begin
|
|
|
|
|
try
|
|
|
|
|
if trim(frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>'+inttostr(i)).asstring)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
if frm_data_share.t_code_ctn.locate('<27><><EFBFBD><EFBFBD>',trim(frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>'+inttostr(i)).asstring),[]) then
|
|
|
|
|
begin
|
|
|
|
|
steu:=steu+' '+trim(frm_data_share.t_code_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring)+': '+inttostr(teu[i]);
|
|
|
|
|
end;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
end;
|
|
|
|
|
except
|
|
|
|
|
;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
steu:=steu+' '+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: '+inttostr(teuot);
|
|
|
|
|
steu:=steu+' '+'<27>ϼ<EFBFBD>TEU: '+inttostr(teuall);
|
|
|
|
|
|
|
|
|
|
lblcount.Caption:='Ʊ<><C6B1><EFBFBD><EFBFBD>: '+inttostr(t_op_seae.recordcount) ;
|
|
|
|
|
lblcount.Caption:=lblcount.Caption+' '+steu;
|
|
|
|
|
end ;
|
|
|
|
|
}
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.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
|
|
|
|
|
AColor:=dxgrid_color('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>',ANode.Strings[dxDBGrid1Column4.Index]);
|
|
|
|
|
AFont.Color:=clblack;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort(Column,t_op_seae,'<27><><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.loadFindIni;
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.writeFindIni;
|
|
|
|
|
begin
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
var str,delstr:string ;
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
str:='where 1=1 ' ;
|
|
|
|
|
if edit2.Text<>'' then str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit2.text+'%'+'''';
|
|
|
|
|
if edit1.Text<>'' then str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
|
|
|
|
|
if edit3.text<>'' then str:=str+' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+'''';
|
|
|
|
|
if edit7.text<>'' then str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit7.text+'%'+'''';
|
|
|
|
|
|
|
|
|
|
if wwDBLookupCombo49.text<>''then
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+wwDBLookupCombo49.text+'%'+'''';
|
|
|
|
|
if wwDBDateTimePicker1.text<>''then
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
|
|
if wwDBDateTimePicker2.text<>''then
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
|
|
|
|
|
if RxDBLookupCombo22.DisplayValue<>''then
|
|
|
|
|
str:=str+' and װ<>۴<EFBFBD><DBB4><EFBFBD>='+''''+RxDBLookupCombo22.DisplayValues[2]+'''';
|
|
|
|
|
if RxDBLookupCombo8.DisplayValue<>''then
|
|
|
|
|
str:=str+' and ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo8.DisplayValues[2]+'''';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if RxDBLookupCombo6.DisplayValues[1]<>'' then str:=str+' and <20><><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo6.DisplayValues[1]+'''';
|
|
|
|
|
|
|
|
|
|
delstr:=str;
|
|
|
|
|
|
|
|
|
|
screen.Cursor:=crSQLwait ;
|
|
|
|
|
try
|
|
|
|
|
with t_op_seae,SQL do
|
|
|
|
|
begin
|
|
|
|
|
close ; Clear ;
|
|
|
|
|
add('select * from v_op_seai_ctn ');
|
|
|
|
|
add(str);
|
|
|
|
|
open ;
|
|
|
|
|
end ;
|
|
|
|
|
setfootermsg ;
|
|
|
|
|
finally
|
|
|
|
|
screen.Cursor:=crDefault ;
|
|
|
|
|
end ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
Str:TStrings;
|
|
|
|
|
i:integer;
|
|
|
|
|
SenderCode,ReciverCode,S:String;
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
if Trim(DBEdit9.Text)='' then begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>!');
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
if Trim(DBEdit7.Text)='' then begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD>շ<EFBFBD><D5B7><EFBFBD><EFBFBD>벻<EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>!');
|
|
|
|
|
Exit;
|
|
|
|
|
end;
|
|
|
|
|
if t_code_sendedi.State in [dsedit,dsinsert] then t_code_sendedi.Post;
|
|
|
|
|
str:=Tstringlist.Create;
|
|
|
|
|
try
|
|
|
|
|
SenderCode:=trim(DBEdit9.Text) ;
|
|
|
|
|
ReciverCode:=trim(DBEdit7.Text) ;
|
|
|
|
|
|
|
|
|
|
str.Add('00:BAPLIE:BAYPLAN:9:'+ SenderCode+':'+ReciverCode+':'+GetDatetime(datetimetostr(now),2)+#39);
|
|
|
|
|
str.Add('10::' + trim(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) +'::'
|
|
|
|
|
+ trim(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'::::'
|
|
|
|
|
+ GetDatetime(datetimetostr(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asdatetime),0)+':'
|
|
|
|
|
+trim(t_op_seae.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').asstring)+':'
|
|
|
|
|
+trim(t_op_seae.fieldbyname('װ<><D7B0><EFBFBD><EFBFBD>').asstring)+':'
|
|
|
|
|
+trim(t_op_seae.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) +':'
|
|
|
|
|
+trim(t_op_seae.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD>').asstring)+':'
|
|
|
|
|
+inttostr(t_op_seae.RecordCount) +#39); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӫ<EFBFBD><D3AA>
|
|
|
|
|
str.Add('11:'+getcarrierid+#39);
|
|
|
|
|
|
|
|
|
|
t_op_seae.First;
|
|
|
|
|
while not t_op_seae.eof do begin
|
|
|
|
|
S:='50:' + trim(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) +':'
|
|
|
|
|
+ trim(GetCntrEdi(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring))+':'
|
|
|
|
|
+trim(t_op_seae.fieldbyname('<27><>״̬').asstring)+':'
|
|
|
|
|
+trim(t_op_seae.fieldbyname('<27><>λ').asstring)+':';
|
|
|
|
|
if trim(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ').asstring)='R' then begin
|
|
|
|
|
S:=S+trim(t_op_seae.fieldbyname('<27>¶ȵ<C2B6>λ').asstring)+':'+trim(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>').asstring)+':';
|
|
|
|
|
end else begin
|
|
|
|
|
S:=S+':'+':';
|
|
|
|
|
end;
|
|
|
|
|
S:=S+':::::::';
|
|
|
|
|
S:=S+trim(floattostr(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat+t_op_seae.fieldbyname('<27><>Ƥ<EFBFBD><C6A4>').asfloat))+':'
|
|
|
|
|
+trim(floattostr(t_op_seae.fieldbyname('<27><>Ƥ<EFBFBD><C6A4>').asfloat))+':'+t_op_seae.fieldbyname('<27>侭Ӫ<E4BEAD>˴<EFBFBD><CBB4><EFBFBD>').asstring+#39; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӫ<EFBFBD><D3AA>
|
|
|
|
|
Str.add(S);
|
|
|
|
|
str.Add('52:'+trim(t_op_seae.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').asstring)+':'
|
|
|
|
|
+trim(t_op_seae.fieldbyname('װ<><D7B0><EFBFBD><EFBFBD>').asstring)+':'
|
|
|
|
|
+trim(t_op_seae.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) +':'
|
|
|
|
|
+trim(t_op_seae.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD>').asstring)+#39);
|
|
|
|
|
if trim(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ').asstring)='D' then begin
|
|
|
|
|
str.Add('54:'+trim(t_op_seae.fieldbyname('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').asstring)+':'
|
|
|
|
|
+trim(t_op_seae.fieldbyname('Σ<><CEA3>Ʒҳ<C6B7><D2B3>').asstring)+':'
|
|
|
|
|
+trim(t_op_seae.fieldbyname('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').asstring) +':'
|
|
|
|
|
+trim(t_op_seae.fieldbyname('Σ<><CEA3>Ʒ<EFBFBD><C6B7>ǩ').asstring) +#39);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
t_op_seae.Next;
|
|
|
|
|
end;
|
|
|
|
|
I:=str.Count;
|
|
|
|
|
str.Add('99:'+intToStr(i+1)+'''');
|
|
|
|
|
{
|
|
|
|
|
for i:=0 to Str.Count-1 do begin
|
|
|
|
|
if IsZhongwen(Str[i]) then begin
|
|
|
|
|
MessageDlg('<27><>Ʊҵ<C6B1><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>TAB<41>Ȳ<EFBFBD><C8B2>淶<EFBFBD>ַ<EFBFBD>,<2C><>ȥ<EFBFBD><C8A5><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD>',mtWarning,[mbYes],0);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
SaveDialog1.FileName:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
if SaveDialog1.Execute then
|
|
|
|
|
begin
|
|
|
|
|
str.SaveToFile(SaveDialog1.FileName+'.txt');
|
|
|
|
|
showmessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ɳɹ<C9B3><C9B9><EFBFBD>');
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
showmessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(Str);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_seaictn_list.getcarrierid: string;
|
|
|
|
|
var
|
|
|
|
|
aQuery:TADOQuery;
|
|
|
|
|
begin
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
try
|
|
|
|
|
with aQuery do begin
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('Select <20><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD> from t_code_vessel where Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>='''+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''');
|
|
|
|
|
Open;
|
|
|
|
|
if IsEmpty then
|
|
|
|
|
Result:=''
|
|
|
|
|
else
|
|
|
|
|
Result:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_seaictn_list.GetCntrEdi(cntrsize: String): String;
|
|
|
|
|
var
|
|
|
|
|
aQuery:TADOQuery;
|
|
|
|
|
begin
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
try
|
|
|
|
|
with aQuery do begin
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('Select Edi<64><69><EFBFBD><EFBFBD> from t_code_ctn where <20><><EFBFBD><EFBFBD>='''+cntrsize+'''');
|
|
|
|
|
Open;
|
|
|
|
|
if IsEmpty then
|
|
|
|
|
Result:=''
|
|
|
|
|
else
|
|
|
|
|
Result:=FieldByName('Edi<64><69><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seaictn_list.t_code_sendediAfterInsert(
|
|
|
|
|
DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
t_code_sendedi.FieldByName('EDI<44><49><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD>ڴ<EFBFBD>ͼ';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|