以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  代码调试异常求助  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=151724)

--  作者:段虎成
--  发布时间:2020/7/2 10:07:00
--  代码调试异常求助
老师您好,下面的代码哪里有问题么?最后一段代码不起作用。请老师指教,谢谢。

\'限制销售人员编辑其他人订单
If user.Type = UserTypeEnum.User Then
    If e.Row("签约人")<> user.name And user.IsRole("判单") = False  Then
        e.Cancel = True
    End If
End If

\' 禁止编辑已审核或者已审批行
Select Case e.Col.name
    Case "审核人","审核日期","审批人","审批日期"
        e.cancel = True                                    
    Case Else
        If e.Row.IsNull("审核人")= False Then              
            e.cancel = True
        End If
End Select

\' 判断一个用户是否具有审核取消审核审批取消审批的权限
If user.IsRole("录入") = False Then
    e.cancel = True
End If

\' 财务部可以编辑的列
Select Case e.Col.name
    Case "认证日期","提成日期","工资计算额","销售计单","提成计单"
        If user.Group <> "财务部" Then
            e.cancel = True
        End If
End Select

(本带代码,财务人员进入之后,这5个字段为什么不能编辑那?)

--  作者:有点蓝
--  发布时间:2020/7/2 10:24:00
--  
这个和上面的其它权限冲突了。比如这个财务人员没有"判单"角色,第一个权限判断就已经限制无法编辑了
--  作者:段虎成
--  发布时间:2020/7/2 10:31:00
--  
好的老师,谢谢,明白了。