|
|
|
|
unit u_op_airi_add;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, DB, BusinessSkinForm, StdCtrls, wwdbdatetimepicker, bsSkinCtrls;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_op_airi_add = class(TForm)
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
|
|
data1: TDataSource;
|
|
|
|
|
bsSkinCheckRadioBox7: TbsSkinCheckRadioBox;
|
|
|
|
|
bsSkinCheckRadioBox4: TbsSkinCheckRadioBox;
|
|
|
|
|
bsSkinCheckRadioBox2: TbsSkinCheckRadioBox;
|
|
|
|
|
bsSkinCheckRadioBox3: TbsSkinCheckRadioBox;
|
|
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_op_airi_add: Tfrm_op_airi_add;
|
|
|
|
|
frm_op_airi_add_num:integer;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_op_airi, u_main, my_sys_function, u_data_share;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_airi_add.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_airi_add.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
wwDBDateTimePicker1.MinDate:=Logininfo.endday+1;
|
|
|
|
|
wwDBDateTimePicker1.Date:=date;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_airi_add.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
i:integer;
|
|
|
|
|
begin
|
|
|
|
|
if (frm_op_airi_add_num=3) then
|
|
|
|
|
begin
|
|
|
|
|
frm_op_airi.t_op_airi1.Enabled:=false;
|
|
|
|
|
frm_op_airi.t_op_airi1.DataSet:=frm_op_airi.t_op_airi_fen;
|
|
|
|
|
frm_op_airi.t_op_airi1.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['<27><><EFBFBD>˵<EFBFBD><CBB5><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>']:='';
|
|
|
|
|
|
|
|
|
|
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>';
|
|
|
|
|
|
|
|
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox4.Caption;
|
|
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox2.Caption;
|
|
|
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox3.Caption;
|
|
|
|
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
data1.DataSet['<27>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
data1.DataSet['ë<><C3AB>']:=0;
|
|
|
|
|
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>']:='';
|
|
|
|
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.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['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=subComp;
|
|
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
data1.DataSet['<27>ͷ<EFBFBD>Ա']:=employee;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=department;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
|
|
|
|
|
data1.DataSet['Ŀ<>ĸ<EFBFBD>']:=get_parameters_value(19,'TSINGTAO');
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_parameters_value(119,'');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
|
|
|
|
|
end else begin
|
|
|
|
|
data1.DataSet.Insert;
|
|
|
|
|
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>';
|
|
|
|
|
|
|
|
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox4.Caption;
|
|
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox2.Caption;
|
|
|
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox3.Caption;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.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['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=subComp;
|
|
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
data1.DataSet['<27>ͷ<EFBFBD>Ա']:=employee;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=department;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
|
|
|
|
|
data1.DataSet['Ŀ<>ĸ<EFBFBD>']:=get_parameters_value(19,'TSINGTAO');
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_parameters_value(119,'');
|
|
|
|
|
|
|
|
|
|
// data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
|
|
|
|
|
end;
|
|
|
|
|
data1.DataSet['fee']:=0;
|
|
|
|
|
data1.DataSet['fee2']:=0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if frm_op_airi_add_num=1 then
|
|
|
|
|
begin
|
|
|
|
|
frm_op_airi.Notebook1.PageIndex:=1;
|
|
|
|
|
frm_op_airi.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
|
|
end;
|
|
|
|
|
if frm_op_airi_add_num=2 then
|
|
|
|
|
begin
|
|
|
|
|
frm_op_airi.Notebook1.PageIndex:=1;
|
|
|
|
|
frm_op_airi.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
|
|
end;
|
|
|
|
|
if frm_op_airi_add_num=3 then
|
|
|
|
|
begin
|
|
|
|
|
frm_op_airi.Notebook1.PageIndex:=1;
|
|
|
|
|
frm_op_airi.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
|
|
// frm_op_aire.t_op_aire_fen.Post;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_airi_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_airi_add_num=3 then
|
|
|
|
|
begin
|
|
|
|
|
frm_op_airi.t_op_airi1.Enabled:=false;
|
|
|
|
|
frm_op_airi.t_op_airi1.DataSet:=frm_op_airi.t_op_airi_fen;
|
|
|
|
|
frm_op_airi.t_op_airi1.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>';
|
|
|
|
|
|
|
|
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox4.Caption;
|
|
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox2.Caption;
|
|
|
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox3.Caption;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
|
|
data1.DataSet['<27><><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>Ʒѱ<C6B7>']:='';
|
|
|
|
|
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><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.date;
|
|
|
|
|
data1.DataSet['<27>ܴ<EFBFBD>']:=WeekofYear(wwDBDateTimePicker1.date);
|
|
|
|
|
if (strtoint(get_parameters_value(158,'0'))=1) and bsSkinCheckRadioBox7.Checked then
|
|
|
|
|
AmendAccDate('T_OP_AIRI',data1);
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
|
|
data1.DataSet['Ŀ<>ĸ<EFBFBD>']:=get_parameters_value(19,'TSINGTAO');
|
|
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
|
|
|
|
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>ǰ״̬']:='';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data1.DataSet['fee']:=0;
|
|
|
|
|
data1.DataSet['fee2']:=0;
|
|
|
|
|
|
|
|
|
|
if frm_op_airi_add_num=1 then
|
|
|
|
|
begin
|
|
|
|
|
frm_op_airi.Notebook1.PageIndex:=1;
|
|
|
|
|
frm_op_airi.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
|
|
end;
|
|
|
|
|
if frm_op_airi_add_num=2 then
|
|
|
|
|
begin
|
|
|
|
|
frm_op_airi.Notebook1.PageIndex:=1;
|
|
|
|
|
frm_op_airi.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
|
|
end;
|
|
|
|
|
if frm_op_airi_add_num=3 then
|
|
|
|
|
begin
|
|
|
|
|
frm_op_airi.Notebook1.PageIndex:=1;
|
|
|
|
|
frm_op_airi.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
|
|
end;
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|