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

11 months ago
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('û<>и<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;
data1.DataSet.append;
for i := 0 to (data1.DataSet.fieldcount-1) do
begin
data1.DataSet.fields[i].value := afield[i] ;
end;
data1.DataSet['<27>ܴ<EFBFBD>']:=WeekofYear(wwDBDateTimePicker1.date);
data1.DataSet['װ<>˷<EFBFBD>ʽ']:='<27><><EFBFBD><EFBFBD>';
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><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:='';
data1.DataSet['<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>']:='';
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD>']:='';
data1.DataSet['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
data1.DataSet['ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
data1.DataSet['<27><>ע']:='';
data1.DataSet['<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:='';
data1.DataSet['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
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><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>']:=0;
data1.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
data1.DataSet['<27><>׼<EFBFBD>ĺ<EFBFBD>']:='';
data1.DataSet['<27>ɽ<EFBFBD><C9BD><EFBFBD>ʽ']:='';
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
data1.DataSet['<27><><EFBFBD><EFBFBD><ECB5A5>']:='';
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['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=date;
t_op_aire['<27>ܴ<EFBFBD>']:=WeekofYear(date);
t_op_aire['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_op_aire['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_op_aire['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=subComp;
t_op_aire['<27><><EFBFBD><EFBFBD>Ա']:=employee;
t_op_aire['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_op_aire['<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>']:=employee;
t_op_aire['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
t_op_aire['<27>ͷ<EFBFBD>Ա']:=employee;
t_op_aire['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=department;
t_op_aire['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
t_op_aire['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_op_aire['ʼ<><CABC><EFBFBD><EFBFBD>']:=get_parameters_value(16,'QINGDAO,CHINA');
t_op_aire['<27><>ͷ']:=get_parameters_value(22,'N/M');
t_op_aire['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:=get_parameters_value(23,'FREIGHT PREPAID');
t_op_aire['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
t_op_aire['<27><><EFBFBD><EFBFBD>']:=0;
t_op_aire['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_op_aire['װ<>˷<EFBFBD>ʽ']:='<27><><EFBFBD><EFBFBD>';
t_op_aire['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>ͨ<EFBFBD><CDA8>';
end;
close;
end;
end.