salsumjia.pas
来自「pasa人力资源考勤管理系统」· PAS 代码 · 共 589 行 · 第 1/3 页
PAS
589 行
procedure TFormsalsumjia.ppReport8PreviewFormCreate(Sender: TObject);
begin
tppReport(Sender).PreviewForm.WindowState:=wsMaximized ;
end;
procedure TFormsalsumjia.Button1Click(Sender: TObject);
begin
case radiogroup3.ItemIndex of
0:
begin
if (trim(edit1.Text) <>'/') then
begin
adodataset4.Close;
if (radiogroup1.itemindex=0)and (radiogroup2.ItemIndex=0) then
begin
Adodataset4.commandtext:=' select max(a.monthy) monthy,a.deptname,sum(isnull(a.otjieri,0)) otjieri,sum(isnull(a.yearmoney,0)) yearmoney,sum(isnull(a.othours,0)) othours,sum(isnull(a.otmoney,0)) otmoney,'+
'sum(isnull(a.otjiari,0)) otjiari,sum(isnull(a.smoney,0)) smoney,sum(isnull(a.factbasepay,0)) factbasepay,sum(isnull(a.factdays,0)) factdays,sum(isnull(a.facthours,0)) facthours,'+
'sum(isnull(a.noname55,0)) noname55,sum(isnull(a.insurance,0)) insurance,sum(isnull(a.facttech,0)) facttech,sum(isnull(a.mustgive,0)) mustgive,sum(isnull(a.mustdec,0)) mustdec,'+
'sum(isnull(a.factmoney,0)) factmoney,sum(isnull(a.eightornine,0)) eightornine,sum(isnull(a.latedec,0)) latedec,sum(isnull(a.kuanggongdec,0)) kuanggongdec ,sum(isnull(a.mustdec,0)-isnull(a.facttech,0)'+
'-isnull(a.insurance,0)-isnull(a.medmoney,0)-isnull(a.latedec,0)-isnull(a.kuanggongdec,0)) otherdec, sum(isnull(a.mustgive,0)-isnull(a.factbasepay,0)-isnull(a.otmoney,0)-isnull(a.yearmoney,0)'+
'-isnull(a.smoney,0)-isnull(a.noname55,0)) otheradd from sal21010 a left join per24010 b on a.workno=b.workno'+
' where a.monthy='''+edit1.text+''' and b.leave<>1 and b.mankind<>''计件'' group by a.deptname';
adodataset4.Open;
ppreport8.Print;
end
else if (radiogroup1.itemindex=1)and (radiogroup2.ItemIndex=0) then
begin
Adodataset4.commandtext:=' select max(monthy) monthy,deptname,sum(isnull(a.otjieri,0)) otjieri,sum(isnull(a.yearmoney,0)) yearmoney,sum(isnull(a.othours,0)) othours,sum(isnull(a.otmoney,0)) otmoney,'+
'sum(isnull(a.otjiari,0)) otjiari,sum(isnull(a.smoney,0)) smoney,sum(isnull(a.factbasepay,0)) factbasepay,sum(isnull(a.factdays,0)) factdays,sum(isnull(a.facthours,0)) facthours,'+
'sum(isnull(a.noname55,0)) noname55,sum(isnull(a.insurance,0)) insurance,sum(isnull(a.facttech,0)) facttech,sum(isnull(a.mustgive,0)) mustgive,sum(isnull(a.mustdec,0)) mustdec,'+
'sum(isnull(a.factmoney,0)) factmoney,sum(isnull(a.eightornine,0)) eightornine,sum(isnull(a.latedec,0)) latedec,sum(isnull(a.kuanggongdec,0)) kuanggongdec ,sum(isnull(a.mustdec,0)-isnull(a.facttech,0)'+
'-isnull(a.insurance,0)-isnull(a.medmoney,0)-isnull(a.latedec,0)-isnull(a.kuanggongdec,0)) otherdec, sum(isnull(a.mustgive,0)-isnull(a.factbasepay,0)-isnull(a.otmoney,0)-isnull(a.yearmoney,0)'+
'-isnull(a.smoney,0)-isnull(a.noname55,0)) otheradd from sal21010 a left join per24010 b on a.workno=b.workno'+
' where a.deptname='''+combobox1.text+''' and a.monthy='''+edit1.text+''' and b.leave<>1 and b.mankind<>''计件'' group by a.deptname';
adodataset4.open;
ppreport8.Print;
end
else if (radiogroup1.itemindex=0)and (radiogroup2.ItemIndex=1) then
begin
Adodataset4.commandtext:=' select max(monthy) monthy,deptname,sum(isnull(a.otjieri,0)) otjieri,sum(isnull(a.yearmoney,0)) yearmoney,sum(isnull(a.othours,0)) othours,sum(isnull(a.otmoney,0)) otmoney,'+
'sum(isnull(a.otjiari,0)) otjiari,sum(isnull(a.smoney,0)) smoney,sum(isnull(a.factbasepay,0)) factbasepay,sum(isnull(a.factdays,0)) factdays,sum(isnull(a.facthours,0)) facthours,'+
'sum(isnull(a.noname55,0)) noname55,sum(isnull(a.insurance,0)) insurance,sum(isnull(a.facttech,0)) facttech,sum(isnull(a.mustgive,0)) mustgive,sum(isnull(a.mustdec,0)) mustdec,'+
'sum(isnull(a.factmoney,0)) factmoney,sum(isnull(a.eightornine,0)) eightornine,sum(isnull(a.latedec,0)) latedec,sum(isnull(a.kuanggongdec,0)) kuanggongdec ,sum(isnull(a.mustdec,0)-isnull(a.facttech,0)'+
'-isnull(a.insurance,0)-isnull(a.medmoney,0)-isnull(a.latedec,0)-isnull(a.kuanggongdec,0)) otherdec, sum(isnull(a.mustgive,0)-isnull(a.factbasepay,0)-isnull(a.otmoney,0)-isnull(a.yearmoney,0)'+
'-isnull(a.smoney,0)-isnull(a.noname55,0)) otheradd from sal21010 a left join per24010 b on a.workno=b.workno'+
' where a.monthy='''+edit1.text+''' and b.leave=1 and b.leaveworkmoney=0 and b.mankind<>''计件'' group by a.deptname ';
adodataset4.Open;
ppreport8.Print;
end
else if (radiogroup1.itemindex=1)and (radiogroup2.ItemIndex=1) then
begin
Adodataset4.commandtext:=' select max(monthy) monthy,deptname,sum(isnull(a.otjieri,0)) otjieri,sum(isnull(a.yearmoney,0)) yearmoney,sum(isnull(a.othours,0)) othours,sum(isnull(a.otmoney,0)) otmoney,'+
'sum(isnull(a.otjiari,0)) otjiari,sum(isnull(a.smoney,0)) smoney,sum(isnull(a.factbasepay,0)) factbasepay,sum(isnull(a.factdays,0)) factdays,sum(isnull(a.facthours,0)) facthours,'+
'sum(isnull(a.noname55,0)) noname55,sum(isnull(a.insurance,0)) insurance,sum(isnull(a.facttech,0)) facttech,sum(isnull(a.mustgive,0)) mustgive,sum(isnull(a.mustdec,0)) mustdec,'+
'sum(isnull(a.factmoney,0)) factmoney,sum(isnull(a.eightornine,0)) eightornine,sum(isnull(a.latedec,0)) latedec,sum(isnull(a.kuanggongdec,0)) kuanggongdec ,sum(isnull(a.mustdec,0)-isnull(a.facttech,0)'+
'-isnull(a.insurance,0)-isnull(a.medmoney,0)-isnull(a.latedec,0)-isnull(a.kuanggongdec,0)) otherdec, sum(isnull(a.mustgive,0)-isnull(a.factbasepay,0)-isnull(a.otmoney,0)-isnull(a.yearmoney,0)'+
'-isnull(a.smoney,0)-isnull(a.noname55,0)) otheradd from sal21010 a left join per24010 b on a.workno=b.workno'+
' where a.deptname='''+combobox1.text+''' and a.monthy='''+edit1.text+''' and b.leave=1 and b.leaveworkmoney=0 and b.mankind<>''计件'' group by a.deptname';
adodataset4.open;
ppreport8.Print;
end
else if (radiogroup1.itemindex=0)and (radiogroup2.ItemIndex=2) then
begin
Adodataset4.commandtext:=' select max(monthy) monthy,deptname,sum(isnull(a.otjieri,0)) otjieri,sum(isnull(a.yearmoney,0)) yearmoney,sum(isnull(a.othours,0)) othours,sum(isnull(a.otmoney,0)) otmoney,'+
'sum(isnull(a.otjiari,0)) otjiari,sum(isnull(a.smoney,0)) smoney,sum(isnull(a.factbasepay,0)) factbasepay,sum(isnull(a.factdays,0)) factdays,sum(isnull(a.facthours,0)) facthours,'+
'sum(isnull(a.noname55,0)) noname55,sum(isnull(a.insurance,0)) insurance,sum(isnull(a.facttech,0)) facttech,sum(isnull(a.mustgive,0)) mustgive,sum(isnull(a.mustdec,0)) mustdec,'+
'sum(isnull(a.factmoney,0)) factmoney,sum(isnull(a.eightornine,0)) eightornine,sum(isnull(a.latedec,0)) latedec,sum(isnull(a.kuanggongdec,0)) kuanggongdec ,sum(isnull(a.mustdec,0)-isnull(a.facttech,0)'+
'-isnull(a.insurance,0)-isnull(a.medmoney,0)-isnull(a.latedec,0)-isnull(a.kuanggongdec,0)) otherdec, sum(isnull(a.mustgive,0)-isnull(a.factbasepay,0)-isnull(a.otmoney,0)-isnull(a.yearmoney,0)'+
'-isnull(a.smoney,0)-isnull(a.noname55,0)) otheradd from sal21010 a left join per24010 b on a.workno=b.workno'+
' where a.monthy='''+edit1.text+''' and b.leave=1 and b.leaveworkmoney=1 and b.mankind<>''计件'' group by a.deptname ';
adodataset4.Open;
ppreport8.Print;
end
else if (radiogroup1.itemindex=1)and (radiogroup2.ItemIndex=2) then
begin
Adodataset4.commandtext:=' select max(monthy) monthy,deptname,sum(isnull(a.otjieri,0)) otjieri,sum(isnull(a.yearmoney,0)) yearmoney,sum(isnull(a.othours,0)) othours,sum(isnull(a.otmoney,0)) otmoney,'+
'sum(isnull(a.otjiari,0)) otjiari,sum(isnull(a.smoney,0)) smoney,sum(isnull(a.factbasepay,0)) factbasepay,sum(isnull(a.factdays,0)) factdays,sum(isnull(a.facthours,0)) facthours,'+
'sum(isnull(a.noname55,0)) noname55,sum(isnull(a.insurance,0)) insurance,sum(isnull(a.facttech,0)) facttech,sum(isnull(a.mustgive,0)) mustgive,sum(isnull(a.mustdec,0)) mustdec,'+
'sum(isnull(a.factmoney,0)) factmoney,sum(isnull(a.eightornine,0)) eightornine,sum(isnull(a.latedec,0)) latedec,sum(isnull(a.kuanggongdec,0)) kuanggongdec ,sum(isnull(a.mustdec,0)-isnull(a.facttech,0)'+
'-isnull(a.insurance,0)-isnull(a.medmoney,0)-isnull(a.latedec,0)-isnull(a.kuanggongdec,0)) otherdec, sum(isnull(a.mustgive,0)-isnull(a.factbasepay,0)-isnull(a.otmoney,0)-isnull(a.yearmoney,0)'+
'-isnull(a.smoney,0)-isnull(a.noname55,0)) otheradd from sal21010 a left join per24010 b on a.workno=b.workno'+
' where a.deptname='''+combobox1.text+''' and a.monthy='''+edit1.text+''' and b.leave=1 and b.leaveworkmoney=1 and b.mankind<>''计件'' group by a.deptname ';
adodataset4.open;
ppreport8.Print;
end;
datamod.ADOQuery1.Close;
datamod.ADOQuery1.sql.clear;
datamod.ADOQuery1.SQL.Add(adodataset4.commandtext);
end;
end;
1:
begin
if (trim(edit1.Text) <>'/') then
begin
adodataset5.Close;
if (radiogroup1.itemindex=0)and (radiogroup2.ItemIndex=0) then
begin
adodataset5.commandtext:=' select max(monthy) monthy,deptname,sum(isnull(a.otjieri,0)) otjieri,sum(isnull(a.yearmoney,0)) yearmoney,sum(isnull(a.othours,0)) othours,sum(isnull(a.otmoney,0)) otmoney,'+
'sum(isnull(a.otjiari,0)) otjiari,sum(isnull(a.smoney,0)) smoney,sum(isnull(a.factbasepay,0)) factbasepay,sum(isnull(a.factdays,0)) factdays,sum(isnull(a.facthours,0)) facthours,'+
'sum(isnull(a.noname55,0)) noname55,sum(isnull(a.insurance,0)) insurance,sum(isnull(a.facttech,0)) facttech,sum(isnull(a.mustgive,0)) mustgive,sum(isnull(a.mustdec,0)) mustdec,'+
'sum(isnull(a.factmoney,0)) factmoney,sum(isnull(a.eightornine,0)) eightornine,sum(isnull(a.latedec,0)) latedec,sum(isnull(a.kuanggongdec,0)) kuanggongdec ,sum(isnull(a.mustdec,0)-isnull(a.facttech,0)'+
'-isnull(a.insurance,0)-isnull(a.medmoney,0)-isnull(a.latedec,0)-isnull(a.kuanggongdec,0)) otherdec, sum(isnull(a.mustgive,0)-isnull(a.factbasepay,0)-isnull(a.otmoney,0)-isnull(a.yearmoney,0)'+
'-isnull(a.smoney,0)-isnull(a.noname55,0)) otheradd from sal21010 a left join per24010 b on a.workno=b.workno'+
' where a.monthy='''+edit1.text+''' and b.leave<>1 and b.mankind=''计件'' group by a.deptname';
adodataset5.Open;
ppreport4.Print;
end
else if (radiogroup1.itemindex=1)and (radiogroup2.ItemIndex=0) then
begin
adodataset5.commandtext:=' select max(monthy) monthy,deptname,sum(isnull(a.otjieri,0)) otjieri,sum(isnull(a.yearmoney,0)) yearmoney,sum(isnull(a.othours,0)) othours,sum(isnull(a.otmoney,0)) otmoney,'+
'sum(isnull(a.otjiari,0)) otjiari,sum(isnull(a.smoney,0)) smoney,sum(isnull(a.factbasepay,0)) factbasepay,sum(isnull(a.factdays,0)) factdays,sum(isnull(a.facthours,0)) facthours,'+
'sum(isnull(a.noname55,0)) noname55,sum(isnull(a.insurance,0)) insurance,sum(isnull(a.facttech,0)) facttech,sum(isnull(a.mustgive,0)) mustgive,sum(isnull(a.mustdec,0)) mustdec,'+
'sum(isnull(a.factmoney,0)) factmoney,sum(isnull(a.eightornine,0)) eightornine,sum(isnull(a.latedec,0)) latedec,sum(isnull(a.kuanggongdec,0)) kuanggongdec ,sum(isnull(a.mustdec,0)-isnull(a.facttech,0)'+
'-isnull(a.insurance,0)-isnull(a.medmoney,0)-isnull(a.latedec,0)-isnull(a.kuanggongdec,0)) otherdec, sum(isnull(a.mustgive,0)-isnull(a.factbasepay,0)-isnull(a.otmoney,0)-isnull(a.yearmoney,0)'+
'-isnull(a.smoney,0)-isnull(a.noname55,0)) otheradd from sal21010 a left join per24010 b on a.workno=b.workno'+
' where a.deptname='''+combobox1.text+''' and a.monthy='''+edit1.text+''' and b.leave<>1 and b.mankind=''计件'' group by a.deptname';
adodataset5.open;
ppreport4.Print;
end
else if (radiogroup1.itemindex=0)and (radiogroup2.ItemIndex=1) then
begin
adodataset5.commandtext:=' select max(monthy) monthy,deptname,sum(isnull(a.otjieri,0)) otjieri,sum(isnull(a.yearmoney,0)) yearmoney,sum(isnull(a.othours,0)) othours,sum(isnull(a.otmoney,0)) otmoney,'+
'sum(isnull(a.otjiari,0)) otjiari,sum(isnull(a.smoney,0)) smoney,sum(isnull(a.factbasepay,0)) factbasepay,sum(isnull(a.factdays,0)) factdays,sum(isnull(a.facthours,0)) facthours,'+
'sum(isnull(a.noname55,0)) noname55,sum(isnull(a.insurance,0)) insurance,sum(isnull(a.facttech,0)) facttech,sum(isnull(a.mustgive,0)) mustgive,sum(isnull(a.mustdec,0)) mustdec,'+
'sum(isnull(a.factmoney,0)) factmoney,sum(isnull(a.eightornine,0)) eightornine,sum(isnull(a.latedec,0)) latedec,sum(isnull(a.kuanggongdec,0)) kuanggongdec ,sum(isnull(a.mustdec,0)-isnull(a.facttech,0)'+
'-isnull(a.insurance,0)-isnull(a.medmoney,0)-isnull(a.latedec,0)-isnull(a.kuanggongdec,0)) otherdec, sum(isnull(a.mustgive,0)-isnull(a.factbasepay,0)-isnull(a.otmoney,0)-isnull(a.yearmoney,0)'+
'-isnull(a.smoney,0)-isnull(a.noname55,0)) otheradd from sal21010 a left join per24010 b on a.workno=b.workno'+
' where a.monthy='''+edit1.text+''' and b.leave=1 and b.leaveworkmoney=0 and b.mankind=''计件'' group by a.deptname';
adodataset5.Open;
ppreport4.Print;
end
else if (radiogroup1.itemindex=1)and (radiogroup2.ItemIndex=1) then
begin
adodataset5.commandtext:=' select max(monthy) monthy,deptname,sum(isnull(a.otjieri,0)) otjieri,sum(isnull(a.yearmoney,0)) yearmoney,sum(isnull(a.othours,0)) othours,sum(isnull(a.otmoney,0)) otmoney,'+
'sum(isnull(a.otjiari,0)) otjiari,sum(isnull(a.smoney,0)) smoney,sum(isnull(a.factbasepay,0)) factbasepay,sum(isnull(a.factdays,0)) factdays,sum(isnull(a.facthours,0)) facthours,'+
'sum(isnull(a.noname55,0)) noname55,sum(isnull(a.insurance,0)) insurance,sum(isnull(a.facttech,0)) facttech,sum(isnull(a.mustgive,0)) mustgive,sum(isnull(a.mustdec,0)) mustdec,'+
'sum(isnull(a.factmoney,0)) factmoney,sum(isnull(a.eightornine,0)) eightornine,sum(isnull(a.latedec,0)) latedec,sum(isnull(a.kuanggongdec,0)) kuanggongdec ,sum(isnull(a.mustdec,0)-isnull(a.facttech,0)'+
'-isnull(a.insurance,0)-isnull(a.medmoney,0)-isnull(a.latedec,0)-isnull(a.kuanggongdec,0)) otherdec, sum(isnull(a.mustgive,0)-isnull(a.factbasepay,0)-isnull(a.otmoney,0)-isnull(a.yearmoney,0)'+
'-isnull(a.smoney,0)-isnull(a.noname55,0)) otheradd from sal21010 a left join per24010 b on a.workno=b.workno'+
' where a.deptname='''+combobox1.text+''' and a.monthy='''+edit1.text+''' and b.leave=1 and b.leaveworkmoney=0 and b.mankind=''计件'' group by a.deptname';
adodataset5.open;
ppreport4.Print;
end
else if (radiogroup1.itemindex=0)and (radiogroup2.ItemIndex=2) then
begin
adodataset5.commandtext:=' select max(monthy) monthy,deptname,sum(isnull(a.otjieri,0)) otjieri,sum(isnull(a.yearmoney,0)) yearmoney,sum(isnull(a.othours,0)) othours,sum(isnull(a.otmoney,0)) otmoney,'+
'sum(isnull(a.otjiari,0)) otjiari,sum(isnull(a.smoney,0)) smoney,sum(isnull(a.factbasepay,0)) factbasepay,sum(isnull(a.factdays,0)) factdays,sum(isnull(a.facthours,0)) facthours,'+
'sum(isnull(a.noname55,0)) noname55,sum(isnull(a.insurance,0)) insurance,sum(isnull(a.facttech,0)) facttech,sum(isnull(a.mustgive,0)) mustgive,sum(isnull(a.mustdec,0)) mustdec,'+
'sum(isnull(a.factmoney,0)) factmoney,sum(isnull(a.eightornine,0)) eightornine,sum(isnull(a.latedec,0)) latedec,sum(isnull(a.kuanggongdec,0)) kuanggongdec ,sum(isnull(a.mustdec,0)-isnull(a.facttech,0)'+
'-isnull(a.insurance,0)-isnull(a.medmoney,0)-isnull(a.latedec,0)-isnull(a.kuanggongdec,0)) otherdec, sum(isnull(a.mustgive,0)-isnull(a.factbasepay,0)-isnull(a.otmoney,0)-isnull(a.yearmoney,0)'+
'-isnull(a.smoney,0)-isnull(a.noname55,0)) otheradd from sal21010 a left join per24010 b on a.workno=b.workno'+
' where a.monthy='''+edit1.text+''' and b.leave=1 and b.leaveworkmoney=1 and b.mankind=''计件'' group by a.deptname';
adodataset5.Open;
ppreport4.Print;
end
else if (radiogroup1.itemindex=1)and (radiogroup2.ItemIndex=2) then
begin
adodataset5.commandtext:=' select max(monthy) monthy,deptname,sum(isnull(a.otjieri,0)) otjieri,sum(isnull(a.yearmoney,0)) yearmoney,sum(isnull(a.othours,0)) othours,sum(isnull(a.otmoney,0)) otmoney,'+
'sum(isnull(a.otjiari,0)) otjiari,sum(isnull(a.smoney,0)) smoney,sum(isnull(a.factbasepay,0)) factbasepay,sum(isnull(a.factdays,0)) factdays,sum(isnull(a.facthours,0)) facthours,'+
'sum(isnull(a.noname55,0)) noname55,sum(isnull(a.insurance,0)) insurance,sum(isnull(a.facttech,0)) facttech,sum(isnull(a.mustgive,0)) mustgive,sum(isnull(a.mustdec,0)) mustdec,'+
'sum(isnull(a.factmoney,0)) factmoney,sum(isnull(a.eightornine,0)) eightornine,sum(isnull(a.latedec,0)) latedec,sum(isnull(a.kuanggongdec,0)) kuanggongdec ,sum(isnull(a.mustdec,0)-isnull(a.facttech,0)'+
'-isnull(a.insurance,0)-isnull(a.medmoney,0)-isnull(a.latedec,0)-isnull(a.kuanggongdec,0)) otherdec, sum(isnull(a.mustgive,0)-isnull(a.factbasepay,0)-isnull(a.otmoney,0)-isnull(a.yearmoney,0)'+
'-isnull(a.smoney,0)-isnull(a.noname55,0)) otheradd from sal21010 a left join per24010 b on a.workno=b.workno'+
' where a.deptname='''+combobox1.text+''' and a.monthy='''+edit1.text+''' and b.leave=1 and b.leaveworkmoney=1 and b.mankind=''计件'' group by a.deptname ';
adodataset5.open;
ppreport4.Print;
end;
datamod.ADOQuery1.Close;
datamod.ADOQuery1.sql.clear;
datamod.ADOQuery1.SQL.Add(adodataset5.commandtext);
end;
end;
end;
end;
procedure TFormsalsumjia.ppReport4BeforePrint(Sender: TObject);
begin
pplabel23.caption:=pubworkname;
pplabel19.Caption:= companyname1;
pplabel24.Caption:='计件员工'+ Edit1.Text+'月薪资';
end;
procedure TFormsalsumjia.ppReport4PreviewFormCreate(Sender: TObject);
begin
tppReport(Sender).PreviewForm.WindowState:=wsMaximized ;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?