?? frm_rpt_kaoqinyc_z.frm
字號:
BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":19B50
Key = "earth1"
EndProperty
BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":19FA4
Key = "earth2"
EndProperty
BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1A2C0
Key = "man3"
EndProperty
BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1B114
Key = "man1"
EndProperty
BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1BF66
Key = ""
EndProperty
BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1C062
Key = ""
EndProperty
BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1C176
Key = ""
EndProperty
BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1C28A
Key = "excel"
EndProperty
BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1C5A6
Key = "word"
EndProperty
BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1C8C2
Key = "word2"
EndProperty
BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1CA5C
Key = "toleft"
EndProperty
BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1CEAE
Key = "toRight"
EndProperty
BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1D300
Key = "toUp"
EndProperty
BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1D752
Key = "toDown"
EndProperty
BeginProperty ListImage41 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1DBA4
Key = "write1"
EndProperty
BeginProperty ListImage42 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1DFF6
Key = "write2"
EndProperty
BeginProperty ListImage43 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_Rpt_KaoQinYC_Z.frx":1E448
Key = "write3"
EndProperty
EndProperty
End
Begin VB.PictureBox Picture2
Height = 0
Left = 0
ScaleHeight = 0
ScaleWidth = 0
TabIndex = 9
Top = 0
Width = 0
End
End
Begin VB.Label Label1
Height = 5295
Left = 2400
TabIndex = 3
Top = 960
Width = 135
End
Begin VB.Label Label3
Caption = "年:"
ForeColor = &H00FF0000&
Height = 255
Index = 1
Left = 600
TabIndex = 2
Top = 6600
Width = 375
End
Begin VB.Label Label3
Caption = "月:"
ForeColor = &H00FF0000&
Height = 255
Index = 2
Left = 2160
TabIndex = 1
Top = 6600
Width = 375
End
End
Attribute VB_Name = "Frm_Rpt_KaoQinYC_Z"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mDB As mDB
Dim standwktm As Single ''''存放標(biāo)準(zhǔn)工時;
Dim tLaterEarly As Single ''''存放遲到早退時間;
Dim tDatWktm As Single ''''存放核算的實際工時;
Dim SpFlg As Boolean
Dim ChejianID As Integer
Public iVar As Integer
Dim sFldString As String
'Dim WithEvents frmX As NM_Bas
Dim strSQL As String
Private adoprimaryRS As ADODB.Recordset
Private strSQL2 As String
Private adoPrimaryRS2 As ADODB.Recordset
Private strSQL3 As String
Private adoPrimaryRS3 As ADODB.Recordset
Private strSQL4 As String
Private adoprimaryRS4 As ADODB.Recordset
Private strSQL5 As String
Private adoPrimaryRS5 As ADODB.Recordset
Private strSQL6 As String
Private adoPrimaryRS6 As ADODB.Recordset
Private strSQL7 As String
Private adoPrimaryRS7 As ADODB.Recordset
Private strSQL8 As String
Private adoPrimaryRS8 As ADODB.Recordset
Private strSQL9 As String
Private adoPrimaryRS9 As ADODB.Recordset
Private Sub datagrid1_HeadClick(ByVal ColIndex As Integer)
'Sort by clicked column
' With adoprimaryRS4
Static i As Integer
i = i + 1
With adoprimaryRS4
If i Mod 2 Then
.Sort = .Fields(ColIndex).Name & " DESC"
Else
.Sort = .Fields(ColIndex).Name & " ASC"
End If
End With
DataGrid1.Refresh
End Sub
' =====================================================
' =====================================================
Private Sub DataGrid1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys vbTab
SendKeys vbTab
SendKeys vbTab
SendKeys vbTab
End If
End Sub
Private Sub DataGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim ltmp As Long
Dim stmp As String
Dim iHour As Single
Dim nCount As Integer
On Error GoTo Err1
If adoprimaryRS4.RecordCount = 0 Then Exit Sub
If Len(DataGrid1.Columns(1).Text) And Button = 2 Then
strSQL2 = "select count(*) from wktmrslt where emplyid='" & DataGrid1.Columns(0).Text & "' and caldate='" & DataGrid1.Columns(2).Text & "'"
Set adoPrimaryRS2 = mDB.adoprimaryRS(strSQL2)
If adoPrimaryRS2(0).Value Then
strSQL2 = "select * from wktmrslt where emplyid='" & DataGrid1.Columns(0).Text & "' and caldate='" & DataGrid1.Columns(2).Text & "'"
Set adoPrimaryRS2 = mDB.adoprimaryRS(strSQL2)
' tLaterEarly = Round((adoPrimaryRS2.Fields("latertime1").Value + adoPrimaryRS2.Fields("earlytime1").Value + adoPrimaryRS2.Fields("latertime2").Value + adoPrimaryRS2.Fields("earlytime2").Value) / 60, 1)
tLaterEarly = (adoPrimaryRS2.Fields("latertime1").Value + adoPrimaryRS2.Fields("earlytime1").Value + adoPrimaryRS2.Fields("latertime2").Value + adoPrimaryRS2.Fields("earlytime2").Value)
tDatWktm = adoPrimaryRS2.Fields("datwktm").Value
nCount = adoPrimaryRS2.Fields("ncount").Value
Else
tLaterEarly = 0
tDatWktm = 0
nCount = 0
End If
strSQL3 = "select left(a.wktmbg,10) as bgdate,e.wktmid,f.wktmdecs,e.wktmdays,e.regualorder,f.hours,e.regualid,bgnwktm1,bgntm1,endtm1,endwktm1,bgnwktm2,bgntm2,endtm2,endwktm2,bgnwktm3,bgntm3,endtm3,endwktm3 from empwktm a,wktmregual e,wktm f where a.regualid=e.regualid and e.wktmid=f.wktmid and a.emplyid='" & DataGrid1.Columns(0).Text & "' order by e.regualorder"
Set adoPrimaryRS3 = mDB.adoprimaryRS(strSQL3)
Dim iZQ As Integer ''''周期
Dim bgD As Date
bgD = adoPrimaryRS3.Fields("bgdate").Value
iZQ = adoPrimaryRS3.Fields("wktmdays").Value
' Debug.Print adoPrimaryRS3.RecordCount
Dim ii As Integer
ii = DateDiff("d", bgD, DataGrid1.Columns(2).Text) Mod iZQ
If ii = 0 Then
MsgBox "請先設(shè)置好班次。"
Exit Sub
End If
adoPrimaryRS3.Filter = "regualorder=" & ii
Dim bgnwktm1 As Date
Dim bgnwktm1END As Date
Dim bgntm1 As Date
Dim endtm1 As Date
'Dim endwktm1 As Date
'Dim bgnwktm2 As Date
Dim bgntm2 As Date
Dim endtm2 As Date
'Dim endwktm2 As Date
'Dim bgnwktm3 As Date
'Dim bgntm3 As Date
'Dim endtm3 As Date
'Dim endwktm3 As Date
' Debug.Print adoPrimaryRS3.RecordCount
bgnwktm1 = DataGrid1.Columns(2).Text & " " & Mid(adoPrimaryRS3.Fields("bgnwktm1").Value, 11)
bgnwktm1END = DateAdd("d", 1, bgnwktm1)
bgntm1 = Mid(adoPrimaryRS3.Fields("bgntm1").Value, 11)
endtm1 = Mid(adoPrimaryRS3.Fields("endtm1").Value, 11)
'endwktm1 = Mid(adoPrimaryRS3.Fields("endwktm1").Value, 11)
'bgnwktm2 = Mid(adoPrimaryRS3.Fields("bgnwktm2").Value, 11)
bgntm2 = Mid(adoPrimaryRS3.Fields("bgntm2").Value, 11)
endtm2 = Mid(adoPrimaryRS3.Fields("endtm2").Value, 11)
'endwktm2 = Mid(adoPrimaryRS3.Fields("endwktm2").Value, 11)
'bgnwktm3 = Mid(adoPrimaryRS3.Fields("bgnwktm3").Value, 11)
'bgntm3 = Mid(adoPrimaryRS3.Fields("bgntm3").Value, 11)
'endtm3 = Mid(adoPrimaryRS3.Fields("endtm3").Value, 11)
'endwktm3 = Mid(adoPrimaryRS3.Fields("endwktm3").Value, 11)
'Dim standwktm As Single
standwktm = (DateDiff("n", bgntm1, endtm1) + DateDiff("n", bgntm2, endtm2)) / 60
'''ltmp = oMenu.Popup(DataGrid1.Columns(1).Text & "--請假", DataGrid1.Columns(1).Text & "--出差", DataGrid1.Columns(1).Text & "--調(diào)休", DataGrid1.Columns(1).Text & "--特殊原因", "-", DataGrid1.Columns(1).Text & "--漏刷卡", DataGrid1.Columns(1).Text & "--無原因", "-", DataGrid1.Columns(1).Text & "--原始考勤")
If nCount Then
If tLaterEarly >= 2 Then ''> 0 Then
ltmp = oMenu.Popup(DataGrid1.Columns(1).Text & "--出差", DataGrid1.Columns(1).Text & "--特殊原因", DataGrid1.Columns(1).Text & "--漏刷卡", "-", DataGrid1.Columns(1).Text & "--請假", DataGrid1.Columns(1).Text & "--休息", DataGrid1.Columns(1).Text & "--(遲到、早退、曠工)", DataGrid1.Columns(1).Text & "--(遲到、早退、曠工)+漏刷", "-", DataGrid1.Columns(1).Text & "--原始考勤")
Else
ltmp = oMenu.Popup(DataGrid1.Columns(1).Text & "--出差", DataGrid1.Columns(1).Text & "--特殊原因", DataGrid1.Columns(1).Text & "--漏刷卡", "-", DataGrid1.Columns(1).Text & "--請假", DataGrid1.Columns(1).Text & "--休息", "-", "-", "-", DataGrid1.Columns(1).Text & "--原始考勤")
End If
Else
ltmp = oMenu.Popup(DataGrid1.Columns(1).Text & "--出差", DataGrid1.Columns(1).Text & "--特殊原因", DataGrid1.Columns(1).Text & "--漏刷卡", "-", DataGrid1.Columns(1).Text & "--請假", DataGrid1.Columns(1).Text & "--休息")
End If
Select Case ltmp
Case 1
'''--出差;(不扣工時)
strSQL = "select evectionid,evectiondecs from evectionkind"
Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
With Frm_Kao_Evection_Z
.endtm1 = endtm1
.bgtm2 = bgntm2
.txtFields(0).Text = DataGrid1.Columns(0).Text
.txtFields(1).Text = DataGrid1.Columns(1).Text
.Check1 = 1
.DTPicker1(0).Value = DataGrid1.Columns(2).Text
.DTPicker1(1).Value = DataGrid1.Columns(2).Text
'.txtFields(2).Text = DataGrid1.Columns(0).Text
Set .DataCombo1(0).RowSource = adoprimaryRS
.DataCombo1(0).BoundColumn = "evectionid"
.DataCombo1(0).ListField = "evectiondecs"
.DataCombo1(0).Refresh
.txtFields(3).Text = UserName
.Show vbModal
End With
Case 2
'''''''特殊原因;(不扣工時)
With sForm
.GetFindV2 "請輸入特殊原因備注和工時:", "特殊原因:", "工時:"
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -