回复 2# purple
var w = "";
var doc= $CURRDOC.getCurrDoc();
var rolesStr = getWebUser().getRolelist();
var roleid3= getRoleIdByName("考勤管理员");
if (doc.getItemValueAsString("公司部门名称")!=null && doc.getItemValueAsString("公司部门名称").trim().length() > 0)
w += " and 公司部门名称 like '" + doc.getItemValueAsString("公司部门名称").trim() + "%'";
if (doc.getItemValueAsString("联络人")!=null && doc.getItemValueAsString("联络人").trim().length() > 0)
w += " and 联络人 like '" + doc.getItemValueAsString("联络人").trim() + "%'";
if (doc.getItemValueAsString("电话")!=null && doc.getItemValueAsString("电话").trim().length() > 0)
w += " and 电话 like '" + doc.getItemValueAsString("电话").trim() + "%'";
if (doc.getItemValueAsString("使用日期")!=null && doc.getItemValueAsString("使用日期").trim().length() > 0)
w += " and 使用日期 like '" + doc.getItemValueAsString("使用日期").trim() + "%'";
if(rolesStr.indexOf(roleid3)>-1){
"$formname = '博士科技OA系统/用餐申请/AppForDinner'"+w ;
}else{
var u = $WEB.getWebUser();
var userid = "'"+ u.getId() + "'" ;
var rolelist = u.getRolelist() != ""? u.getRolelist(): "";
w +=" and ($state.actors.actorid in (" + userid + "," + rolelist + ")" ;
w+=" and ($state.noderts.statelabel not in ('归档'))";
"$formname = '博士科技OA系统/用餐申请/AppForDinner'"+w ;
}
你可以给我具体说明一下吗 我上面这个例子是返回待办的事务,不正确的。你可否在上面帮我改一下 |