Foxtable(狐表)用户栏目专家坐堂 → 代码纠错(新年好)


  共有2242人关注过本帖平板打印复制链接

主题:代码纠错(新年好)

帅哥哟,离线,有人找我吗?
lisangyu
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:461 积分:4277 威望:0 精华:0 注册:2019/8/5 17:49:00
代码纠错(新年好)  发帖心情 Post By:2020/1/30 10:04:00 [只看该作者]

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"有审批记录了



 回到顶部
总数 13 1 2 下一页