当前位置:首页 > 人力资源管理系统毕业论文
勤日期 =:pRQ');
SQL.Add('Update 员工考勤表 set 早退次数 = 早退次数 + 1 where 员工编号=:pBH and 考勤日期 =:pRQ');
SQL.Add('Update 员工考勤表 set 事假天数 = 事假天数 +:pSJ where 员工编号=:pBH and 考勤日期 =:pRQ');
SQL.Add('Update 员工考勤表 set 病假天数 = 病假天数 +:pBJ where 员工编号=:pBH and 考勤日期 =:pRQ');
ShowMessage('考勤成功!');//添加每日考勤记录
第八节 工资管理模块窗体的实现
一、界面设计
此模块共包含四个子窗体:基本工资管理、浮动工资管理、工资发放管理以及工资调整管理。
图4.9 基本工资管理
基本工资需要手动输入,已输入的员工不再在此窗口显示,只显示未输入基本工资信息的员工或新加入的员工。
- 25 -
图4.10 浮动工资管理
窗口功能与实现与基本工资管理完全一样。
图4.11 工资发放管理
按基本工资、浮动工资、考勤结果和上月余额发放工资。
- 26 -
图4.12 工资调整管理
对员工基本工资和浮动工资进行调整。
二、设计思想与技术要点
员工基本工资和浮动工资分别保存在基本工资表和浮动工资表里。对于已经输入此项信息的用户将无法在这两个窗口中输入。只可在工资调整窗口里修改。而新加入的员工则会出现在这两个窗口里,需要手动输入他们的基本工资和浮动工资。基本工资、浮动工资和工资发放管理窗口均使用TImage、TListBox和TStringGrid控件。其中工资发放根据基本工资、浮动工资、考勤信息以及上月余额计算出来。
关键代码: begin Close;
SQL.Clear;
SQL.Add('Select 员工编号,sum(加班时间) as 加班时间,sum(事假天数) as 事假天数 from 员工考勤表');
SQL.Add(' where month(考勤日期) = month(GetDate()) group by 员工编号' ); Open; end;
begin Close;
SQL.Clear;
SQL.Add('select 余额 from 工资发放明细表 where 员工编号 = :c and year(时间) = :a
- 27 -
and month(时间) = :b');
//如果当前月份是一月,上月余额应为上一年十二月份的余额 if Month1 >1 then begin
Parameters.ParamByName('a').Value := Year1; Parameters.ParamByName('b').Value := Month1-1; end
StringGrid1.Cells[9,i]:= FloatToStr(StrToInt(StringGrid1.Cells[8,i])*StrToFloat(Edit2.Text)); if (Trim(StringGrid1.Cells[0,i])<>'')and(Trim(StringGrid1.Cells[7,i])<>'')then StringGrid1.Cells[15,i]:=
FloatToStr(StrToFloat(StringGrid1.Cells[2,i])+StrToFloat(StringGrid1.Cells[3,i])+StrToFloat(StringGrid1.Cells[4,i])
-StrToFloat(StringGrid1.Cells[5,i])+StrToFloat(StringGrid1.Cells[7,i])-StrToFloat(StringGrid1.Cells[9,i])-StrToFloat(StringGrid1.Cells[10,i])
+StrToFloat(StringGrid1.Cells[11,i])+StrToFloat(StringGrid1.Cells[12,i])+StrToFloat(StringGrid1.Cells[13,i])+StrToFloat(StringGrid1.Cells[14,i])); end else
Application.MessageBox('没有员工信息,或员工信息不完整.','提示',64);//出错提示 end;
procedure TForm83.StringGrid1SetEditText(Sender: TObject; ACol, ARow: Integer; const Value: String); begin
inherited;
if (y = 6) or (y =8) then begin
if Trim(StringGrid1.Cells[6,x])<>'' then begin
StringGrid1.Cells[7,x]:= FloatToStr(StrToInt(StringGrid1.Cells[6,x])*StrToFloat(Edit1.Text)) ; if (Trim(StringGrid1.Cells[0,x])<>'')and(Trim(StringGrid1.Cells[9,x])<>'')then StringGrid1.Cells[15,x]:=
FloatToStr(StrToFloat(StringGrid1.Cells[2,x])+StrToFloat(StringGrid1.Cells[3,x])+StrToFloat(StringGrid1.Cells[4,x])
-StrToFloat(StringGrid1.Cells[5,x])+StrToFloat(StringGrid1.Cells[7,x])-StrToFloat(StringGrid1.Cells[9,x])-StrToFloat(StringGrid1.Cells[10,x])+StrToFloat(StringGrid1.Cells[11,x])+StrToFloat(StringGrid1.C
- 28 -
共分享92篇相关文档