You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

171 lines
5.4 KiB
Plaintext

unit u_op_seai_add;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, BusinessSkinForm, bsSkinCtrls, StdCtrls, wwdbdatetimepicker;
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;
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_seai_add: Tfrm_op_seai_add;
implementation
uses u_op_seai, u_main, my_sys_function;
{$R *.dfm}
procedure Tfrm_op_seai_add.bsSkinButton2Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_seai_add.bsSkinButton1Click(Sender: TObject);
begin
data1.DataSet.Insert;
data1.DataSet['会计期间']:=wwDBDateTimePicker1.date;
data1.DataSet['周次']:=WeekofYear(wwDBDateTimePicker1.date);
data1.DataSet['财务']:=0;
data1.DataSet['财务凭证']:='';
data1.DataSet['录入人']:=employee;
data1.DataSet['录入日期']:=date;
data1.DataSet['操作员']:=employee;
data1.DataSet['报关操作']:=employee;
data1.DataSet['报检操作']:=employee;
data1.DataSet['揽货人']:=employee;
data1.DataSet['客服员']:=employee;
data1.DataSet['卸货港']:=get_parameters_value(17,'QINGDAO,CHINA');
data1.DataSet['业务来源']:='自揽货';
data1.DataSet['销售部门']:=department;
data1.DataSet['操作部门']:=department;
if bsSkinCheckRadioBox1.Checked then
data1.DataSet['装运方式']:=bsSkinCheckRadioBox1.Caption;
if bsSkinCheckRadioBox2.Checked then
data1.DataSet['装运方式']:=bsSkinCheckRadioBox2.Caption;
if bsSkinCheckRadioBox5.Checked then
data1.DataSet['装运方式']:=bsSkinCheckRadioBox5.Caption;
if bsSkinCheckRadioBox6.Checked then
data1.DataSet['装运方式']:=bsSkinCheckRadioBox6.Caption;
frm_op_seai.notebook1.pageindex:=1;
frm_op_seai.bsSkinButton11.Caption:='返回列表';
frm_op_seai.bsSkinTabSheet1.Show;
close;
end;
procedure Tfrm_op_seai_add.FormShow(Sender: TObject);
begin
wwDBDateTimePicker1.Date:=date;
end;
procedure Tfrm_op_seai_add.bsSkinButton3Click(Sender: TObject);
var
afield : variant;
i: Integer;
begin
if data1.DataSet.IsEmpty then
begin
showmessage('没有复制母体,不能复制新建!');
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;
data1.DataSet.append;
for i := 0 to (data1.DataSet.fieldcount-1) do
begin
data1.DataSet.fields[i].value := afield[i] ;
end;
data1.DataSet['业务编号']:='';
data1.DataSet['编号']:='';
data1.DataSet['箱型1']:=0;
data1.DataSet['箱型2']:=0;
data1.DataSet['箱型3']:=0;
data1.DataSet['箱型4']:=0;
data1.DataSet['箱型5']:=0;
data1.DataSet['箱型6']:=0;
data1.DataSet['箱型7']:=0;
data1.DataSet['箱型8']:=0;
data1.DataSet['箱型9']:=0;
data1.DataSet['箱型10']:=0;
data1.DataSet['其他箱型']:=0;
data1.DataSet['箱TEU']:=0;
data1.DataSet['集装箱']:='';
//data1.DataSet['箱数大写']:='';
data1.DataSet['计费标准']:='';
data1.DataSet['业务状态']:='接受委托';
data1.DataSet['费用状态']:='录入状态';
data1.DataSet['录入人']:=employee;
data1.DataSet['录入日期']:=date;
data1.DataSet['操作员']:=employee;
data1.DataSet['报关操作']:=employee;
data1.DataSet['报检操作']:=employee;
data1.DataSet['会计期间']:=wwDBDateTimePicker1.date;
data1.DataSet['财务']:=0;
data1.DataSet['财务凭证']:='';
data1.DataSet['备案号']:='';
data1.DataSet['启运国']:='';
data1.DataSet['境内货源地']:='';
data1.DataSet['批准文号']:='';
data1.DataSet['成交方式']:='';
data1.DataSet['净重']:=0;
data1.DataSet['单价']:='';
data1.DataSet['总价']:='';
data1.DataSet['商品名称']:='';
data1.DataSet['数量单位']:='';
data1.DataSet['接单日期']:=null;
data1.DataSet['报检日期']:=null;
data1.DataSet['报检单号']:='';
data1.DataSet['验货时间']:=null;
data1.DataSet['实验时间']:=null;
data1.DataSet['熏蒸时间']:=null;
data1.DataSet['出证时间']:=null;
data1.DataSet['实验内容']:='';
data1.DataSet['币制']:='';
data1.DataSet['周次']:=WeekofYear(wwDBDateTimePicker1.date);
data1.DataSet['卸货港']:=get_parameters_value(17,'QINGDAO,CHINA');
if bsSkinCheckRadioBox1.Checked then
data1.DataSet['装运方式']:=bsSkinCheckRadioBox1.Caption;
if bsSkinCheckRadioBox2.Checked then
data1.DataSet['装运方式']:=bsSkinCheckRadioBox2.Caption;
if bsSkinCheckRadioBox5.Checked then
data1.DataSet['装运方式']:=bsSkinCheckRadioBox5.Caption;
if bsSkinCheckRadioBox6.Checked then
data1.DataSet['装运方式']:=bsSkinCheckRadioBox6.Caption;
frm_op_seai.notebook1.pageindex:=1;
frm_op_seai.bsSkinButton11.Caption:='返回列表';
frm_op_seai.bsSkinTabSheet1.Show;
close;
end;
end.