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.

132 lines
4.7 KiB
Plaintext

unit u_info_kaoqin_shouquan;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, RxLookup, StdCtrls, BusinessSkinForm, bsSkinCtrls,
wwdbdatetimepicker;
type
Tfrm_info_kaoqin_shouquan = class(TForm)
Label13: TLabel;
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinButton10: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox2: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox3: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox4: TbsSkinCheckRadioBox;
RxDBLookupList1: TRxDBLookupList;
RxDBLookupCombo5: TRxDBLookupCombo;
Label1: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
procedure bsSkinButton5Click(Sender: TObject);
procedure RxDBLookupList1Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_info_kaoqin_shouquan: Tfrm_info_kaoqin_shouquan;
implementation
uses u_main, u_data_share, u_open_info;
{$R *.dfm}
procedure Tfrm_info_kaoqin_shouquan.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_info_kaoqin_shouquan.RxDBLookupList1Click(Sender: TObject);
begin
RxDBLookupCombo5.DisplayValue:=RxDBLookupList1.DisplayValue;
end;
procedure Tfrm_info_kaoqin_shouquan.bsSkinButton10Click(Sender: TObject);
begin
if RxDBLookupCombo5.DisplayValue=''then
begin
showmessage('请输入被授权人!!');
exit;
end;
if RxDBLookupCombo5.DisplayValue=employee then
begin
showmessage('您不能给你自己授权!!');
exit;
end;
if application.MessageBox('您确定要授权吗?','警告:',MB_OKCANCEL)<>IDOK then
exit;
if bsSkinCheckRadioBox1.Checked then
begin
frm_open_info.p_kaoqin.Parameters.ParamByName('emp').value:=RxDBLookupCombo5.DisplayValue;
frm_open_info.p_kaoqin.Parameters.ParamByName('lei').value:='上午签到';
frm_open_info.p_kaoqin.Parameters.ParamByName('cmp').value:=LocalIP;
frm_open_info.p_kaoqin.Parameters.ParamByName('sh').value:='是';
frm_open_info.p_kaoqin.Parameters.ParamByName('sh_emp').value:=employee;
frm_open_info.p_kaoqin.Parameters.ParamByName('shouquan_date').value:=wwDBDateTimePicker1.date;
frm_open_info.p_kaoqin.ExecProc;
if frm_open_info.p_kaoqin.Parameters.ParamByName('i').value=2 then
begin
showmessage('被授权人上午已经签到!!');
end;
end;
if bsSkinCheckRadioBox2.Checked then
begin
frm_open_info.p_kaoqin.Parameters.ParamByName('emp').value:=RxDBLookupCombo5.DisplayValue;
frm_open_info.p_kaoqin.Parameters.ParamByName('lei').value:='上午签退';
frm_open_info.p_kaoqin.Parameters.ParamByName('cmp').value:=LocalIP;
frm_open_info.p_kaoqin.Parameters.ParamByName('sh').value:='是';
frm_open_info.p_kaoqin.Parameters.ParamByName('sh_emp').value:=employee;
frm_open_info.p_kaoqin.Parameters.ParamByName('shouquan_date').value:=wwDBDateTimePicker1.date;
frm_open_info.p_kaoqin.ExecProc;
if frm_open_info.p_kaoqin.Parameters.ParamByName('i').value=2 then
begin
showmessage('被授权人上午已经签退!!');
end;
end;
if bsSkinCheckRadioBox4.Checked then
begin
frm_open_info.p_kaoqin.Parameters.ParamByName('emp').value:=RxDBLookupCombo5.DisplayValue;
frm_open_info.p_kaoqin.Parameters.ParamByName('lei').value:='下午签到';
frm_open_info.p_kaoqin.Parameters.ParamByName('cmp').value:=LocalIP;
frm_open_info.p_kaoqin.Parameters.ParamByName('sh').value:='是';
frm_open_info.p_kaoqin.Parameters.ParamByName('sh_emp').value:=employee;
frm_open_info.p_kaoqin.Parameters.ParamByName('shouquan_date').value:=wwDBDateTimePicker1.date;
frm_open_info.p_kaoqin.ExecProc;
if frm_open_info.p_kaoqin.Parameters.ParamByName('i').value=2 then
begin
showmessage('被授权人下午已经签到!!');
end;
end;
if bsSkinCheckRadioBox3.Checked then
begin
frm_open_info.p_kaoqin.Parameters.ParamByName('emp').value:=RxDBLookupCombo5.DisplayValue;
frm_open_info.p_kaoqin.Parameters.ParamByName('lei').value:='下午签退';
frm_open_info.p_kaoqin.Parameters.ParamByName('cmp').value:=LocalIP;
frm_open_info.p_kaoqin.Parameters.ParamByName('sh').value:='是';
frm_open_info.p_kaoqin.Parameters.ParamByName('sh_emp').value:=employee;
frm_open_info.p_kaoqin.Parameters.ParamByName('shouquan_date').value:=wwDBDateTimePicker1.date;
frm_open_info.p_kaoqin.ExecProc;
if frm_open_info.p_kaoqin.Parameters.ParamByName('i').value=2 then
begin
showmessage('被授权人下午已经签退!!');
end;
end;
showmessage('授权考勤完毕!!');
end;
procedure Tfrm_info_kaoqin_shouquan.FormShow(Sender: TObject);
begin
wwDBDateTimePicker1.date:=date;
end;
end.