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.
139 lines
3.9 KiB
Plaintext
139 lines
3.9 KiB
Plaintext
unit u_op_aire_apply_add;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, DB, BusinessSkinForm, StdCtrls, wwdbdatetimepicker, bsSkinCtrls;
|
|
|
|
type
|
|
Tfrm_op_aire_apply_add = class(TForm)
|
|
Label1: TLabel;
|
|
bsSkinButton1: TbsSkinButton;
|
|
bsSkinButton2: TbsSkinButton;
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
bsSkinButton3: TbsSkinButton;
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
data1: TDataSource;
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
procedure FormShow(Sender: TObject);
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
private
|
|
{ Private declarations }
|
|
public
|
|
{ Public declarations }
|
|
end;
|
|
|
|
var
|
|
frm_op_aire_apply_add: Tfrm_op_aire_apply_add;
|
|
|
|
implementation
|
|
|
|
uses my_sys_function, u_main, u_data_share, u_op_apply;
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure Tfrm_op_aire_apply_add.bsSkinButton2Click(Sender: TObject);
|
|
begin
|
|
close;
|
|
end;
|
|
|
|
procedure Tfrm_op_aire_apply_add.FormShow(Sender: TObject);
|
|
begin
|
|
wwDBDateTimePicker1.MinDate:=Logininfo.endday+1;
|
|
wwDBDateTimePicker1.Date:=date;
|
|
end;
|
|
|
|
procedure Tfrm_op_aire_apply_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['周次']:=WeekofYear(wwDBDateTimePicker1.date);
|
|
data1.DataSet['装运方式']:='报关';
|
|
data1.DataSet['业务类型']:='普通货';
|
|
data1.DataSet['业务编号']:='';
|
|
data1.DataSet['主编号']:='';
|
|
if not (Trim(frm_data_share.t_sys_noset.fieldbyname('出号规则').Asstring)='手动编辑') then
|
|
data1.DataSet['委托编号']:='';
|
|
data1.DataSet['编号']:='';
|
|
data1.DataSet['报关日期']:=null;
|
|
data1.DataSet['报关员']:='';
|
|
data1.DataSet['报关单号']:='';
|
|
data1.DataSet['核销单号']:='';
|
|
data1.DataSet['手册号']:='';
|
|
data1.DataSet['是否通关']:=0;
|
|
data1.DataSet['通关日期']:=null;
|
|
data1.DataSet['备注']:='';
|
|
data1.DataSet['商品编码']:='';
|
|
data1.DataSet['是否通关']:=0;
|
|
|
|
data1.DataSet['业务状态']:='接受委托';
|
|
data1.DataSet['费用状态']:='录入状态';
|
|
data1.DataSet['录入人']:=employee;
|
|
data1.DataSet['录入日期']:=date;
|
|
data1.DataSet['分部名称']:=subComp;
|
|
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['报检日期']:=null;
|
|
data1.DataSet['报检单号']:='';
|
|
|
|
close;
|
|
end;
|
|
|
|
procedure Tfrm_op_aire_apply_add.bsSkinButton1Click(Sender: TObject);
|
|
begin
|
|
with frm_op_apply do
|
|
begin
|
|
t_op_aire.insert;
|
|
t_op_aire['会计期间']:=date;
|
|
t_op_aire['周次']:=WeekofYear(date);
|
|
t_op_aire['录入人']:=employee;
|
|
t_op_aire['录入日期']:=date;
|
|
t_op_aire['分部名称']:=subComp;
|
|
t_op_aire['操作员']:=employee;
|
|
t_op_aire['揽货人']:=employee;
|
|
t_op_aire['报关操作']:=employee;
|
|
t_op_aire['报检操作']:=employee;
|
|
t_op_aire['客服员']:=employee;
|
|
t_op_aire['销售部门']:=department;
|
|
t_op_aire['操作部门']:=department;
|
|
t_op_aire['业务来源']:='自揽货';
|
|
t_op_aire['始发港']:=get_parameters_value(16,'QINGDAO,CHINA');
|
|
t_op_aire['唛头']:=get_parameters_value(22,'N/M');
|
|
t_op_aire['付费方式']:=get_parameters_value(23,'FREIGHT PREPAID');
|
|
t_op_aire['是否通关']:=0;
|
|
t_op_aire['财务']:=0;
|
|
t_op_aire['财务凭证']:='';
|
|
t_op_aire['装运方式']:='报关';
|
|
t_op_aire['业务类型']:='普通货';
|
|
end;
|
|
|
|
close;
|
|
end;
|
|
|
|
end.
|