以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]分级审核 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=41672) |
||||
-- 作者:kingcl -- 发布时间:2013/10/24 18:23:00 -- [求助]分级审核 求助各位老师:我想在结算表中实现分级审核。 1、采购部审核必须满足进货人不能为空,审核人只能从“采购部”的列表项目中选择并为当前用户; 2、品管部审核必须在采购部审核之后,审核人只能从“品管部”的列表项目中选择并为当前用户; 3、结算审核必须在品管部审核之后,第三列、第四列不能为空,审核人只能从“结算审核”的列表项目中选择并为当前用户; 4、支付审核必须在结算审核之后,第六列不能为空,审核人只能从“支付审核”的列表项目中选择并为当前用户; 5、支付审核完成后才允许财务审核,User.Group只能是”财务“。
|
||||
-- 作者:rjh4078 -- 发布时间:2013/10/24 19:27:00 --
我简单做了下前两个要求的示例,后面的差不多就是这个重复,楼主自己复制修改下。 不过从楼主的代码中看出 楼主对用户管理的理解有所错误 |
||||
-- 作者:kingcl -- 发布时间:2013/10/24 19:29:00 -- 谢谢!继续学习! |
||||
-- 作者:有点甜 -- 发布时间:2013/10/24 19:44:00 -- 代码如下,参考着改一下。 If e.DataCol.Name = "部门审核" Then If e.DataRow.IsNull("进货人") Then msgbox("进货人不能为空") e.Cancel = True Else If e.NewValue <> user.name Then MessageBox.Show("请采购部长审核!") e.Cancel = True End If End If If e.DataCol.Name = "品管部" Then If e.DataRow.IsNull("部门审核") Then msgbox("采购部没审核") e.Cancel = True Else If e.NewValue <> user.name Then MessageBox.Show("品管部检验人员才能进行质量审核!") e.Cancel = True End If End If If e.DataCol.Name = "结算审核" Then If e.DataRow.Isnull("品管部") OrElse e.DataRow.IsNull("第三列") OrElse e.DataRow.IsNull("第四列") Then MessageBox.Show("先由品管部进行质量检查合格后请刘总或徐总审核!") e.Cancel = True Else If e.NewValue <> user.name Then MessageBox.Show("请刘总或徐总审核!") e.Cancel = True End If End If If e.DataCol.Name = "支付审核" Then If e.DataRow.IsNull("结算审核") Then msgbox("没有结算审核") e.cancel = True Else If e.DataRow.IsNull("第六列") Then msgbox("第六列不能为空") e.Cancel = True Else If e.NewValue <> user.name Then MessageBox.Show("请刘总审核!") e.Cancel = True End If End If If e.DataCol.Name = "财务审核" Then If e.DataRow.IsNull("支付审核") Then msgbox("没有支付审核") e.Cancel = True Else If e.NewValue=True AndAlso user.group<>"财务" Then MessageBox.Show("请财务审核!") e.Cancel = True End If End If |
||||
-- 作者:kingcl -- 发布时间:2013/10/24 20:43:00 -- 谢谢甜老师指教! |