|
|
unit u_op_seai_add;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, BusinessSkinForm, bsSkinCtrls, StdCtrls,ADODB,wwdbdatetimepicker,
|
|
|
wwdblook;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_seai_add = class(TForm)
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
data1: TDataSource;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
Label1: TLabel;
|
|
|
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox2: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox5: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox6: TbsSkinCheckRadioBox;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinCheckRadioBox7: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox3: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox4: TbsSkinCheckRadioBox;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
OpenDialog1: TOpenDialog;
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
Label124: TLabel;
|
|
|
Label2: TLabel;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_seai_add: Tfrm_op_seai_add;
|
|
|
frm_op_seai_add_num:integer;
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_op_seai, u_main, my_sys_function, u_data_share, u_sys_progress;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_op_seai_add.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seai_add.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
if (frm_op_seai_add_num=3) then
|
|
|
begin
|
|
|
frm_op_seai.t_op_seai1.Enabled:=false;
|
|
|
frm_op_seai.t_op_seai1.DataSet:=frm_op_seai.t_op_seai_fen;
|
|
|
frm_op_seai.t_op_seai1.Enabled:=true;
|
|
|
|
|
|
data1.DataSet.append;
|
|
|
for i := 0 to (data1.DataSet.DataSource.DataSet.fieldcount-1) do
|
|
|
begin
|
|
|
data1.DataSet[data1.DataSet.DataSource.DataSet.fields[i].FieldName]:=
|
|
|
data1.DataSet.DataSource.DataSet[data1.DataSet.DataSource.DataSet.fields[i].FieldName];
|
|
|
end;
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
// data1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.date;
|
|
|
if wwDBDateTimePicker2.Text<>'' then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=wwDBDateTimePicker2.date;
|
|
|
|
|
|
data1.DataSet['<27>ܴ<EFBFBD>']:=WeekofYear(wwDBDateTimePicker1.date);
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=subComp;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
data1.DataSet['<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27>ͷ<EFBFBD>Ա']:=employee;
|
|
|
if wwDBLookupCombo3.Text<>'' then
|
|
|
data1.DataSet['ж<><D0B6><EFBFBD><EFBFBD>']:=wwDBLookupCombo3.Text
|
|
|
else
|
|
|
data1.DataSet['ж<><D0B6><EFBFBD><EFBFBD>']:=get_parameters_value(17,'QINGDAO,CHINA');
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
data1.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=department;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ջ<EFBFBD><D5BB><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:='';
|
|
|
data1.DataSet['֪ͨ<CDA8><D6AA>']:='';
|
|
|
data1.DataSet['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox1.Caption;
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox2.Caption;
|
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox3.Caption;
|
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox4.Caption;
|
|
|
if bsSkinCheckRadioBox5.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox5.Caption;
|
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox6.Caption;
|
|
|
if bsSkinCheckRadioBox7.Checked then
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ĵ<EFBFBD>'
|
|
|
else
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>ͨ<EFBFBD><CDA8>';
|
|
|
|
|
|
end else begin
|
|
|
data1.DataSet.Insert;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.date;
|
|
|
if wwDBDateTimePicker2.Text<>'' then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=wwDBDateTimePicker2.date;
|
|
|
|
|
|
data1.DataSet['<27>ܴ<EFBFBD>']:=WeekofYear(wwDBDateTimePicker1.date);
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=subComp;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
data1.DataSet['<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27>ͷ<EFBFBD>Ա']:=employee;
|
|
|
data1.DataSet['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>']:='';
|
|
|
|
|
|
if wwDBLookupCombo3.Text<>'' then
|
|
|
data1.DataSet['ж<><D0B6><EFBFBD><EFBFBD>']:=wwDBLookupCombo3.Text
|
|
|
else
|
|
|
data1.DataSet['ж<><D0B6><EFBFBD><EFBFBD>']:=get_parameters_value(17,'QINGDAO,CHINA');
|
|
|
data1.DataSet['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:=get_parameters_value(23,'FREIGHT PREPAID');
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_parameters_value(117,'');
|
|
|
data1.DataSet['<27>ջ<EFBFBD><D5BB><EFBFBD>']:=get_parameters_value(127,'');
|
|
|
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
data1.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=department;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
|
|
|
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox1.Caption;
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox2.Caption;
|
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox3.Caption;
|
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox4.Caption;
|
|
|
if bsSkinCheckRadioBox5.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox5.Caption;
|
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox6.Caption;
|
|
|
if bsSkinCheckRadioBox7.Checked then
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ĵ<EFBFBD>'
|
|
|
else
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>ͨ<EFBFBD><CDA8>';
|
|
|
|
|
|
end;
|
|
|
|
|
|
if frm_op_seai_add_num=1 then
|
|
|
begin
|
|
|
frm_op_seai.notebook1.pageindex:=1;
|
|
|
frm_op_seai.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
frm_op_seai.bsSkinTabSheet1.Show;
|
|
|
end;
|
|
|
if frm_op_seai_add_num=2 then
|
|
|
begin
|
|
|
frm_op_seai.notebook1.pageindex:=1;
|
|
|
frm_op_seai.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
frm_op_seai.bsSkinTabSheet1.Show;
|
|
|
end;
|
|
|
if frm_op_seai_add_num=3 then
|
|
|
begin
|
|
|
frm_op_seai.notebook1.pageindex:=1;
|
|
|
frm_op_seai.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
frm_op_seai.bsSkinTabSheet1.Show;
|
|
|
// frm_op_seai.t_op_seai_fen.Post;
|
|
|
// showmessage('2');
|
|
|
end;
|
|
|
|
|
|
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seai_add.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
wwDBDateTimePicker1.MinDate:=Logininfo.endday+1;
|
|
|
wwDBDateTimePicker1.Date:=date;
|
|
|
// wwDBDateTimePicker2.Date:=date;
|
|
|
wwDBLookupCombo3.Text:=get_parameters_value(17,'QINGDAO,CHINA');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seai_add.bsSkinButton3Click(Sender: TObject);
|
|
|
var
|
|
|
afield : variant;
|
|
|
i: Integer;
|
|
|
begin
|
|
|
if data1.DataSet.IsEmpty then
|
|
|
begin
|
|
|
showmessage('û<>и<EFBFBD><D0B8><EFBFBD>ĸ<EFBFBD>壬<EFBFBD><E5A3AC><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD><EFBFBD>½<EFBFBD><C2BD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
afield := vararraycreate([0,data1.DataSet.fieldcount-1],varvariant);
|
|
|
for i := 0 to (data1.DataSet.fieldcount-1) do
|
|
|
begin
|
|
|
afield[i] :=data1.DataSet.fields[i].value ;
|
|
|
end;
|
|
|
|
|
|
if frm_op_seai_add_num=3 then
|
|
|
begin
|
|
|
frm_op_seai.t_op_seai1.Enabled:=false;
|
|
|
frm_op_seai.t_op_seai1.DataSet:=frm_op_seai.t_op_seai_fen;
|
|
|
frm_op_seai.t_op_seai1.Enabled:=true;
|
|
|
end;
|
|
|
|
|
|
|
|
|
data1.DataSet.append;
|
|
|
for i := 0 to (data1.DataSet.fieldcount-1) do
|
|
|
begin
|
|
|
data1.DataSet.fields[i].value := afield[i] ;
|
|
|
end;
|
|
|
if bsSkinCheckRadioBox7.Checked then
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ĵ<EFBFBD>'
|
|
|
else
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>ͨ<EFBFBD><CDA8>';
|
|
|
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
if not (Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>ֶ<EFBFBD><D6B6>༭') then
|
|
|
data1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:='';
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>1']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>2']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>3']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>4']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>5']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>6']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>7']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>8']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>9']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>10']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><>TEU']:=0;
|
|
|
data1.DataSet['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
//data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='';
|
|
|
data1.DataSet['<27>Ʒѱ<C6B7>']:='';
|
|
|
if frm_op_seai_add_num=3 then begin
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ջ<EFBFBD><D5BB><EFBFBD>']:='';
|
|
|
data1.DataSet['֪ͨ<CDA8><D6AA>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:='';
|
|
|
data1.DataSet['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>']:='';
|
|
|
end;
|
|
|
|
|
|
|
|
|
data1.DataSet['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=subComp;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
|
|
|
data1.DataSet['<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.date;
|
|
|
// data1.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=department;
|
|
|
{
|
|
|
if not bsSkinCheckRadioBox7.Checked then
|
|
|
begin
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
end;
|
|
|
}
|
|
|
if wwDBDateTimePicker2.Text<>'' then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=wwDBDateTimePicker2.date;
|
|
|
|
|
|
if (strtoint(get_parameters_value(158,'0'))=1) and bsSkinCheckRadioBox7.Checked then
|
|
|
AmendAccDate('T_OP_SEAI',data1);
|
|
|
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>˹<EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ڻ<EFBFBD>Դ<EFBFBD><D4B4>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ĺ<EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ɽ<EFBFBD><C9BD><EFBFBD>ʽ']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ܼ<EFBFBD>']:='';
|
|
|
data1.DataSet['<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ']:='';
|
|
|
data1.DataSet['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD>쵥<EFBFBD><ECB5A5>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=null;
|
|
|
data1.DataSet['ʵ<><CAB5>ʱ<EFBFBD><CAB1>']:=null;
|
|
|
data1.DataSet['Ѭ<><D1AC>ʱ<EFBFBD><CAB1>']:=null;
|
|
|
data1.DataSet['<27><>֤ʱ<D6A4><CAB1>']:=null;
|
|
|
data1.DataSet['ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ܴ<EFBFBD>']:=WeekofYear(wwDBDateTimePicker1.date);
|
|
|
|
|
|
data1.DataSet['<27>ϼ<EFBFBD>20']:=0;
|
|
|
data1.DataSet['<27>ϼ<EFBFBD>40']:=0;
|
|
|
data1.DataSet['<27>ϼ<EFBFBD>40H']:=0;
|
|
|
data1.DataSet['<27>ϼ<EFBFBD>45']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD>ųɱ<C5B3>']:=0;
|
|
|
data1.DataSet['ƾ֤<C6BE><D6A4><EFBFBD><EFBFBD>']:=null;
|
|
|
|
|
|
|
|
|
data1.DataSet['<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='0';
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
|
|
|
|
|
|
|
|
|
if wwDBLookupCombo3.Text<>'' then
|
|
|
data1.DataSet['ж<><D0B6><EFBFBD><EFBFBD>']:=wwDBLookupCombo3.Text
|
|
|
else
|
|
|
data1.DataSet['ж<><D0B6><EFBFBD><EFBFBD>']:=get_parameters_value(17,'QINGDAO,CHINA');
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox1.Caption;
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox2.Caption;
|
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox3.Caption;
|
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox4.Caption;
|
|
|
if bsSkinCheckRadioBox5.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox5.Caption;
|
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox6.Caption;
|
|
|
|
|
|
if frm_op_seai_add_num=1 then
|
|
|
begin
|
|
|
frm_op_seai.notebook1.pageindex:=1;
|
|
|
frm_op_seai.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
frm_op_seai.bsSkinTabSheet1.Show;
|
|
|
end;
|
|
|
if frm_op_seai_add_num=2 then
|
|
|
begin
|
|
|
frm_op_seai.notebook1.pageindex:=1;
|
|
|
frm_op_seai.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
frm_op_seai.bsSkinTabSheet1.Show;
|
|
|
end;
|
|
|
if frm_op_seai_add_num=3 then
|
|
|
begin
|
|
|
frm_op_seai.notebook1.pageindex:=1;
|
|
|
frm_op_seai.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
frm_op_seai.bsSkinTabSheet1.Show;
|
|
|
end;
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seai_add.bsSkinButton4Click(Sender: TObject);
|
|
|
var
|
|
|
EdiStrings:TStrings;
|
|
|
FileNames:String;
|
|
|
i:integer;
|
|
|
S,dddd,Heads,oldHeads,VslID,Vessel,VoyNo,eta,etd,Carrier,s2:String;
|
|
|
tempStr:TStrings;
|
|
|
aQuery,aQuery2:TAdoQuery;
|
|
|
|
|
|
function GetPosString(S1:string;m:integer):String;
|
|
|
var
|
|
|
subs:String;
|
|
|
z:integer;
|
|
|
begin
|
|
|
Result:='';
|
|
|
if pos(':',S1)=0 then exit;
|
|
|
s1:=StringReplace(s1,'??','?',[rfReplaceAll]);
|
|
|
s1:=StringReplace(s1,'?:','<27><>',[rfReplaceAll]);
|
|
|
s1:=StringReplace(s1,'?''','''',[rfReplaceAll]);
|
|
|
s1:=StringReplace(s1,'?+','+',[rfReplaceAll]);
|
|
|
|
|
|
for z:=1 to m-1 do begin
|
|
|
if Pos(':',S1)=0 then exit;
|
|
|
if Pos(':',S1)=1 then
|
|
|
S1:=Copy(S1,Pos(':',S1)+1,(length(s1)-Pos(':',S1)))
|
|
|
else
|
|
|
S1:=Copy(S1,Pos(':',S1)+1,(length(s1)-Pos(':',S1)));
|
|
|
end;
|
|
|
|
|
|
if pos(':',S1)=1 then exit;
|
|
|
if Pos(':',S1)=0 then
|
|
|
Result:=Copy(S1,1,length(S1)-1)
|
|
|
else Result:=Copy(S1,1,Pos(':',S1)-1);
|
|
|
Result:=StringReplace(Result,'<27><>','?:',[rfReplaceAll]);
|
|
|
end;
|
|
|
|
|
|
|
|
|
function FormatDateStr(ADate:String):String;
|
|
|
begin
|
|
|
Result:='';
|
|
|
if length(ADate)<>8 then exit;
|
|
|
Result:=Copy(ADate,1,4)+'-'+Copy(ADate,5,2)+'-'+Copy(ADate,7,2);
|
|
|
end;
|
|
|
|
|
|
function FormatNumStr(ANum:String):String;
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
Result:='0';
|
|
|
if length(ANum)=0 then exit;
|
|
|
for i:=1 to length(ANum) do begin
|
|
|
if Copy(ANum,1,1)='0' then
|
|
|
system.Delete(ANum,1,1)
|
|
|
else
|
|
|
Break;
|
|
|
end;
|
|
|
Result:=ANum;
|
|
|
end;
|
|
|
|
|
|
begin
|
|
|
|
|
|
EdiStrings:=TStringList.Create;
|
|
|
|
|
|
try
|
|
|
if not ASSIGNED(frm_sys_progress) then
|
|
|
frm_sys_progress:=tfrm_sys_progress.Create(self);
|
|
|
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<C8BA><F2A1A3A1><EFBFBD>';
|
|
|
|
|
|
edi_addseai:=true;
|
|
|
OpenDialog1.Execute;
|
|
|
FileNames:=OpenDialog1.FileName;
|
|
|
if FileNames<>'' then begin
|
|
|
EdiStrings.LoadFromFile(FileNames);
|
|
|
end;
|
|
|
if EdiStrings.Count=0 then exit;
|
|
|
|
|
|
frm_main.db.BeginTrans;
|
|
|
try
|
|
|
frm_sys_progress.Show;
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=EdiStrings.Count;
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
frm_sys_progress.Update;
|
|
|
|
|
|
|
|
|
for i:=0 to EdiStrings.Count-1 do
|
|
|
begin
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
S:=EdiStrings.Strings[i];
|
|
|
OldHeads:=Heads;
|
|
|
Heads:=Copy(S,1,2);
|
|
|
if Heads='00' then
|
|
|
begin
|
|
|
|
|
|
end;
|
|
|
if Heads='10' then
|
|
|
begin
|
|
|
VslID:=GetPosString(S,2);
|
|
|
Vessel:=GetPosString(S,3);
|
|
|
VoyNo:=GetPosString(S,5);
|
|
|
etd:=GetPosString(S,8);
|
|
|
eta:=GetPosString(S,9);
|
|
|
end;
|
|
|
if Heads='11' then
|
|
|
begin
|
|
|
Carrier:=GetPosString(S,2);
|
|
|
end;
|
|
|
if Heads='12' then
|
|
|
begin
|
|
|
if data1.DataSet.State in [dsinsert,dsEdit] then
|
|
|
data1.DataSet.Post;
|
|
|
|
|
|
data1.DataSet.Insert;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.date;
|
|
|
if wwDBDateTimePicker2.Text<>'' then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=wwDBDateTimePicker2.date;
|
|
|
|
|
|
data1.DataSet['<27>ܴ<EFBFBD>']:=WeekofYear(wwDBDateTimePicker1.date);
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=subComp;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
data1.DataSet['<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27>ͷ<EFBFBD>Ա']:=employee;
|
|
|
if wwDBLookupCombo3.Text<>'' then
|
|
|
data1.DataSet['ж<><D0B6><EFBFBD><EFBFBD>']:=wwDBLookupCombo3.Text
|
|
|
else
|
|
|
data1.DataSet['ж<><D0B6><EFBFBD><EFBFBD>']:=get_parameters_value(17,'QINGDAO,CHINA');
|
|
|
data1.DataSet['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:=get_parameters_value(23,'FREIGHT PREPAID');
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_parameters_value(117,'');
|
|
|
data1.DataSet['<27>ջ<EFBFBD><D5BB><EFBFBD>']:=get_parameters_value(127,'');
|
|
|
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
data1.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=department;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
|
|
|
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox1.Caption;
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox2.Caption;
|
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox3.Caption;
|
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox4.Caption;
|
|
|
if bsSkinCheckRadioBox5.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox5.Caption;
|
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox6.Caption;
|
|
|
if bsSkinCheckRadioBox7.Checked then
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ĵ<EFBFBD>'
|
|
|
else
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>ͨ<EFBFBD><CDA8>';
|
|
|
data1.DataSet.post;
|
|
|
data1.DataSet.edit;
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=Vessel;
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=VoyNo;
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString:=GetPosString(S,2);
|
|
|
if wwDBDateTimePicker2.Text<>'' then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=wwDBDateTimePicker2.date
|
|
|
else
|
|
|
if eta<>'' then
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=StrToDate(FormatDateStr(ETA));
|
|
|
data1.DataSet.FieldByName('װ<>۴<EFBFBD><DBB4><EFBFBD>').AsString:=GetPosString(S,8);
|
|
|
data1.DataSet.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').AsString:=GetPosString(S,9);
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=GetPosString(S,10);
|
|
|
S2:=GetPosString(S,11);
|
|
|
if S2='P' then
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').AsString:='FREIGHT PREPAID'
|
|
|
else
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').AsString:='FREIGHT COLLECT';
|
|
|
|
|
|
if etd<>'' then begin
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=StrToDate(FormatDateStr(ETD));
|
|
|
end else begin
|
|
|
s2:=GetPosString(S,12);
|
|
|
if s2<>'' then
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=StrToDate(FormatDateStr(s2));
|
|
|
end;
|
|
|
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString:='';
|
|
|
data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString:='';
|
|
|
data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString:='';
|
|
|
data1.DataSet.FieldByName('<27><>ͷ').AsString:='';
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='';
|
|
|
end;
|
|
|
if Heads='13' then
|
|
|
begin
|
|
|
data1.DataSet.FieldByName('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=GetPosString(S,4);
|
|
|
data1.DataSet.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').AsString:=GetPosString(S,5);
|
|
|
end;
|
|
|
if Heads='14' then
|
|
|
begin
|
|
|
|
|
|
end;
|
|
|
if Heads='15' then
|
|
|
begin
|
|
|
|
|
|
end;
|
|
|
if Heads='16' then
|
|
|
begin
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,3);
|
|
|
if GetPosString(S,4)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,4);
|
|
|
if GetPosString(S,5)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,5);
|
|
|
if GetPosString(S,6)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,6);
|
|
|
if GetPosString(S,7)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,7);
|
|
|
if GetPosString(S,8)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,8);
|
|
|
end;
|
|
|
if Heads='17' then
|
|
|
begin
|
|
|
data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,3);
|
|
|
if GetPosString(S,4)<>'' then
|
|
|
data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,4);
|
|
|
if GetPosString(S,5)<>'' then
|
|
|
data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,5);
|
|
|
if GetPosString(S,6)<>'' then
|
|
|
data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,6);
|
|
|
if GetPosString(S,7)<>'' then
|
|
|
data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,7);
|
|
|
if GetPosString(S,8)<>'' then
|
|
|
data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,8);
|
|
|
end;
|
|
|
if Heads='18' then
|
|
|
begin
|
|
|
data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,3);
|
|
|
if GetPosString(S,4)<>'' then
|
|
|
data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,4);
|
|
|
if GetPosString(S,5)<>'' then
|
|
|
data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,5);
|
|
|
if GetPosString(S,6)<>'' then
|
|
|
data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,6);
|
|
|
if GetPosString(S,7)<>'' then
|
|
|
data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,7);
|
|
|
if GetPosString(S,8)<>'' then
|
|
|
data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString:=data1.DataSet.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString+#10#13+GetPosString(S,8);
|
|
|
end;
|
|
|
if Heads='19' then
|
|
|
begin
|
|
|
end;
|
|
|
if Heads='20' then
|
|
|
begin
|
|
|
end;
|
|
|
if Heads='41' then
|
|
|
begin
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FormatNumStr(GetPosString(S,4));
|
|
|
data1.DataSet.FieldByName('<27><>װ').AsString:=GetPosString(S,6);
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FormatNumStr(GetPosString(S,7));
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FormatNumStr(GetPosString(S,9));
|
|
|
end;
|
|
|
if Heads='43' then
|
|
|
begin
|
|
|
end;
|
|
|
if Heads='44' then
|
|
|
begin
|
|
|
data1.DataSet.FieldByName('<27><>ͷ').AsString:=data1.DataSet.FieldByName('<27><>ͷ').AsString+#10#13+GetPosString(S,2);
|
|
|
if GetPosString(S,3)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><>ͷ').AsString:=data1.DataSet.FieldByName('<27><>ͷ').AsString+#10#13+GetPosString(S,3);
|
|
|
if GetPosString(S,4)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><>ͷ').AsString:=data1.DataSet.FieldByName('<27><>ͷ').AsString+#10#13+GetPosString(S,4);
|
|
|
if GetPosString(S,5)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><>ͷ').AsString:=data1.DataSet.FieldByName('<27><>ͷ').AsString+#10#13+GetPosString(S,5);
|
|
|
if GetPosString(S,6)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><>ͷ').AsString:=data1.DataSet.FieldByName('<27><>ͷ').AsString+#10#13+GetPosString(S,6);
|
|
|
if GetPosString(S,7)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><>ͷ').AsString:=data1.DataSet.FieldByName('<27><>ͷ').AsString+#10#13+GetPosString(S,7);
|
|
|
if GetPosString(S,8)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><>ͷ').AsString:=data1.DataSet.FieldByName('<27><>ͷ').AsString+#10#13+GetPosString(S,8);
|
|
|
if GetPosString(S,9)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><>ͷ').AsString:=data1.DataSet.FieldByName('<27><>ͷ').AsString+#10#13+GetPosString(S,9);
|
|
|
if GetPosString(S,10)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><>ͷ').AsString:=data1.DataSet.FieldByName('<27><>ͷ').AsString+#10#13+GetPosString(S,10);
|
|
|
|
|
|
end;
|
|
|
if Heads='47' then
|
|
|
begin
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+#10#13+GetPosString(S,2);
|
|
|
if GetPosString(S,3)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+#10#13+GetPosString(S,3);
|
|
|
if GetPosString(S,4)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+#10#13+GetPosString(S,4);
|
|
|
if GetPosString(S,5)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+#10#13+GetPosString(S,5);
|
|
|
if GetPosString(S,6)<>'' then
|
|
|
data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+#10#13+GetPosString(S,6);
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
if Heads='51' then
|
|
|
begin
|
|
|
if (not data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').IsNull) and (data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString<>'') then
|
|
|
begin
|
|
|
aQuery:=createAdoQuery;
|
|
|
aQuery2:=createAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;sql.clear;
|
|
|
sql.Add('select * from t_op_ctn where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
DataSource:=data1;
|
|
|
open;
|
|
|
aQuery2.close;aQuery2.sql.Clear;
|
|
|
aQuery2.SQL.Add('select * from t_code_ctn where edi<64><69><EFBFBD><EFBFBD>='''+GetPosString(S,5)+'''');
|
|
|
aQuery2.Open;
|
|
|
if not aQuery2.IsEmpty then begin
|
|
|
Insert;
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
FieldByName('<27>ߴ<EFBFBD>').AsString:=aQuery2.fieldbyname('<27>ߴ<EFBFBD>').AsString;
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString:=aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=1;
|
|
|
if aQuery2.fieldbyname('<27>ߴ<EFBFBD>').AsString='20'then
|
|
|
FieldByName('TEU').AsInteger:=1;
|
|
|
if (aQuery2.fieldbyname('<27>ߴ<EFBFBD>').AsString='40') OR (aQuery2.fieldbyname('<27>ߴ<EFBFBD>').AsString='45') then
|
|
|
FieldByName('TEU').AsInteger:=2;
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=GetPosString(S,3);
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=GetPosString(S,4);
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FormatNumStr(GetPosString(S,7));
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FormatNumStr(GetPosString(S,8));
|
|
|
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FormatNumStr(GetPosString(S,10));
|
|
|
Post;
|
|
|
if data1.DataSet.fieldbyname('<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>').asstring='' then begin
|
|
|
data1.DataSet.edit;
|
|
|
data1.DataSet.fieldbyname('<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>').asstring:=GetPosString(S,3)+'/'+GetPosString(S,4);
|
|
|
end else begin
|
|
|
data1.DataSet.edit;
|
|
|
data1.DataSet.fieldbyname('<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>').asstring:=data1.DataSet.fieldbyname('<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>').asstring+#13#10+
|
|
|
GetPosString(S,3)+'/'+GetPosString(S,4);
|
|
|
end;
|
|
|
end;
|
|
|
if not IsEmpty then update_ctn(aQuery);
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
FreeAndNil(aQuery2);
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if Heads='99' then
|
|
|
begin
|
|
|
if data1.DataSet.State in [dsinsert,dsEdit] then
|
|
|
data1.DataSet.Post;
|
|
|
end;
|
|
|
{
|
|
|
|
|
|
if Heads='51' then
|
|
|
begin
|
|
|
if Pos(GetPosString(S,5),dddd)<=0 then
|
|
|
dddd:=dddd+':'+GetPosString(S,5);
|
|
|
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
frm_main.db.CommitTrans;
|
|
|
except
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,û<><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룡');
|
|
|
frm_main.db.RollbackTrans;
|
|
|
end;
|
|
|
finally
|
|
|
showmessage(dddd);
|
|
|
frm_sys_progress.close;
|
|
|
frm_sys_progress:=nil;
|
|
|
edi_addseai:=true;
|
|
|
FreeAndNil(EdiStrings);
|
|
|
end;
|
|
|
|
|
|
frm_op_seai.notebook1.pageindex:=0;
|
|
|
close;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|