-- 作者:hongyefor
-- 发布时间:2016/7/20 16:50:00
--
Dim chk As WinForm.CheckBox chk = Forms("员工工资系统").Controls("是否满勤") Dim jkje As WinForm.TextBox = e.Form.Controls("TB借款金额") Dim kcfk As WinForm.TextBox = e.Form.Controls("TB扣除罚款") Dim shbx As WinForm.TextBox = e.Form.Controls("TB社会保险") Dim hjkc As WinForm.Label = e.Form.Controls("扣除金额") Dim v1 As Double = Val(jkje.Text) Dim v2 As Double = Val(kcfk.Text) Dim v3 As Double = Val(shbx.Text)
Dim scbt As WinForm.TextBox = e.Form.Controls("TB生产补贴") Dim clbt As WinForm.TextBox = e.Form.Controls("TB差旅补贴") Dim fybx As WinForm.TextBox = e.Form.Controls("TB费用报销") Dim btje As WinForm.Label = e.Form.Controls("补贴金额") Dim v4 As Double = Val(scbt.Text) Dim v5 As Double = Val(clbt.Text) Dim v6 As Double = Val(fybx.Text)
Dim gzlb As WinForm.Label = e.Form.Controls("工资类别") Dim tbgz As WinForm.TextBox = e.Form.Controls("TB工资数据") Dim gzss As WinForm.TextBox = e.Form.Controls("TB工作时间") Dim gzts As WinForm.TextBox = e.Form.Controls("TB工作天数") Dim yfgz As WinForm.Label = e.Form.Controls("应发工资") Dim mqts As WinForm.TextBox = e.Form.Controls("TB天数") Dim sfgz As WinForm.Label = e.Form.Controls("实发工资") Dim xg As WinForm.TextBox = e.Form.Controls("TB工资修改") Dim g2 As Double = Val(tbgz.Text) Dim g3 As Double = Val(gzss.Text) Dim g4 As Double = Val(gzts.Text) Dim g5 As Double = Val(mqts.Text) Dim j1 As Double = Val(xg.Text)
Dim k As Double Dim d As Double Dim d2 As Double Dim d3 As Double Dim d4 As Double Dim d5 As Double Dim d6 As Double Dim d7 As Double Dim d8 As Double
If chk.Checked = True Then k = v2 Else k = v2 + 100 End If
d = v1 + k + v3 d2 = v4 + v5 + v6 d3 = g2 * g3 d4 = g2 * g3 - d + d2 d5 = g2 / g5 * g4 d6 = g2 / g5 * g4 - d + d2 d7 = g2 d8 = g2 - d + d2
If d > 0 Then e.Form.Controls("扣除金额").Visible=True e.Form.Controls("L扣元").Visible=True hjkc.text =format(d,"n") Else e.Form.Controls("扣除金额").Visible=False e.Form.Controls("L扣元").Visible=False End If If d2 > 0 Then e.Form.Controls("补贴金额").Visible=True e.Form.Controls("L补元").Visible=True btje.text =format(d2,"n") Else e.Form.Controls("补贴金额").Visible=False e.Form.Controls("L补元").Visible=False End If
If gzlb.Visible = True Then If gzlb.text= "计时工资"Then If xg.text ="" Then If d3 > 0 Or d4 > 0 Then e.Form.Controls("应发工资").Visible=True e.Form.Controls("实发工资").Visible=True e.Form.Controls("L1元").Visible=True e.Form.Controls("L实元").Visible=True Tables("工资报表").Current("正常工资") = format(d3,"n") Tables("工资报表").Current("实发工资") =format(d4,"n") Else e.Form.Controls("应发工资").Visible=False e.Form.Controls("L1元").Visible=False e.Form.Controls("实发工资").Visible=False e.Form.Controls("L1元").Visible=False End If Else e.Form.Controls("应发工资").Visible=True e.Form.Controls("实发工资").Visible=True e.Form.Controls("L1元").Visible=True e.Form.Controls("L实元").Visible=True Tables("工资报表").Current("正常工资") = format(d3,"n") Tables("工资报表").Current("实发工资") =format(j1,"n") End If Else If gzlb.text= "固定工资" Then If chk.Checked = True Then If xg.text ="" Then If d7 > 0 Or d8 > 0 Then e.Form.Controls("应发工资").Visible=True e.Form.Controls("实发工资").Visible=True e.Form.Controls("L1元").Visible=True e.Form.Controls("L实元").Visible=True Tables("工资报表").Current("正常工资") = format(d7,"n") Tables("工资报表").Current("实发工资") =format(d8,"n") Else e.Form.Controls("应发工资").Visible=False e.Form.Controls("L1元").Visible=False e.Form.Controls("实发工资").Visible=False e.Form.Controls("L1元").Visible=False End If Else e.Form.Controls("应发工资").Visible=True e.Form.Controls("实发工资").Visible=True e.Form.Controls("L1元").Visible=True e.Form.Controls("L实元").Visible=True Tables("工资报表").Current("正常工资") = format(d7,"n") Tables("工资报表").Current("实发工资") =format(j1,"n") End If Else If xg.text ="" Then If d5 > 0 Or d6 > 0 Then e.Form.Controls("应发工资").Visible=True e.Form.Controls("实发工资").Visible=True e.Form.Controls("L1元").Visible=True e.Form.Controls("L实元").Visible=True Tables("工资报表").Current("正常工资") = format(d5,"n") Tables("工资报表").Current("实发工资") =format(d6,"n") Else e.Form.Controls("应发工资").Visible=False e.Form.Controls("L1元").Visible=False e.Form.Controls("实发工资").Visible=False e.Form.Controls("L1元").Visible=False End If Else e.Form.Controls("应发工资").Visible=True e.Form.Controls("实发工资").Visible=True e.Form.Controls("L1元").Visible=True e.Form.Controls("L实元").Visible=True Tables("工资报表").Current("正常工资") = format(d5,"n") Tables("工资报表").Current("实发工资") =format(j1,"n") End If End If End If End If End If
此主题相关图片如下:cw.jpg

|