Select Case e.DataCol.Name
Case "审批结果1","审批人1","审批结果2","审批人2","审批结果3","审批人3","审批结果4","审批人4","审批结果5","审批人5","审批人6","审批日期6","审批日期7","审批人7","维修厂"
Dim dr As DataRow = e.DataRow
If dr("所属部门") <> "行政管理部"
If dr.IsNull("审批结果1") = False AndAlso dr.IsNull("审批人1") = False Then
e.DataRow("进度") = "2A"
If dr.IsNull("审批结果2") = False AndAlso dr.IsNull("审批人2") = False Then
e.DataRow("进度") = "3A"
If dr.IsNull("审批结果3") = False AndAlso dr.IsNull("审批人3") = False Then
e.DataRow("进度") = "4A"
If dr.IsNull("审批结果4") = False AndAlso dr.IsNull("审批人4") = False Then
e.DataRow("进度") = "5A"
If dr.IsNull("审批结果5") = False AndAlso dr.IsNull("审批人5") = False
If User.IsRole(dr("维修厂")) Then
e.DataRow("进度") = "6A"
Else
e.DataRow("进度") = "7A"
End If
If dr.IsNull("审批人6") = False AndAlso dr.IsNull("审批日期6") = False Then
e.DataRow("进度") = "7A"
If dr.IsNull("审批人7") = False AndAlso dr.IsNull("审批日期7") = False Then
e.DataRow("进度") = "8A"
End If
End If
End If
End If
End If
End If
End If
Else
If dr.IsNull("审批结果1") = False AndAlso dr.IsNull("审批人1") = False Then
e.DataRow("进度") = "4A"
If dr.IsNull("审批结果4") = False AndAlso dr.IsNull("审批人4") = False Then
e.DataRow("进度") = "5A"
If dr.IsNull("审批结果5") = False AndAlso dr.IsNull("审批人5") = False
If User.IsRole(dr("维修厂")) Then
e.DataRow("进度") = "6A" Else
e.DataRow("进度") = "7A"
End If
If dr.IsNull("审批人6") = False AndAlso dr.IsNull("审批日期6") = False Then
e.DataRow("进度") = "7A"
If dr.IsNull("审批人7") = False AndAlso dr.IsNull("审批日期7") = False Then
e.DataRow("进度") = "8A" End If
End If
End If
End If
End If
End If
End Select
审批人和审批时间为系统自动填充,打开就自动填充;审批结果为手动选择。
1、流程走到红色部分就自动跳过了,进度不论什么条件自动执行ELSE下面的代码进度变为"7A"。当我选择字段“维修厂”的为系统设置好的“修理厂审核员”角色时,还是会跳过红色部分, User.IsRole(dr("维修厂")) 好像有点问题,麻烦指定点一下。
2、紫色部分代码也没有执行,即便"审批人7"、"审批日期7"有审批记录了。