📄 crm_project_info_verifyrecordadd.jsp
字号:
<%@ include file="../../include/configuration.jsp"%>
<%@ page import="com.vere.crm.customer.bean.*"%>
<%@ page import="com.vere.crm.customer.item.*"%>
<%@ page import="com.vere.crm.project.bean.*"%>
<%@ page import="com.vere.crm.project.item.*"%>
<%@ page contentType="text/html; charset=gb2312" %>
<%
ParameterUtils.setCharacterEncoding(request);
String status=ParameterUtils.getString(request,"status");
String id=ParameterUtils.getString(request,"id");
Crm_project_infoBean crm_project_infoBean=new Crm_project_infoBean();
Crm_project_infoItem crm_project_infoItem=crm_project_infoBean.find(id);
String message="";
//判断是否已经审批,公文,状态下的审批情况
Crm_project_info_verifyrecordBean crm_project_info_verifyrecordBean=new Crm_project_info_verifyrecordBean();
Crm_project_info_verifyrecordItem crm_project_info_verifyrecordItem=new Crm_project_info_verifyrecordItem();
SessionFactory sessionFactory=(SessionFactory)session.getAttribute("sessionFactory");
Manager_usersItem usersItem=sessionFactory.getManager_usersItem();
crm_project_info_verifyrecordItem.setAppraisal_user(usersItem.getUsername());
crm_project_info_verifyrecordItem.setCrm_project_info_id(id);
crm_project_info_verifyrecordItem.setWorkflow_state_id(crm_project_infoItem.getWorkflow_state_id());
List crm_project_info_verifyrecordList=crm_project_info_verifyrecordBean.find(crm_project_info_verifyrecordItem);
if(crm_project_info_verifyrecordList!=null&&crm_project_info_verifyrecordList.size()>0)
{
out.println("<script>");
out.println("alert('您已经审批!');");
out.println("location='crm_project_info_verify.jsp';");
out.println("</script>");
return;
}
//添加
if(status.equals("add"))
{
message=ParameterUtils.getString(request,"message");
String workflow_id=crm_project_infoItem.getWorkflow_id();//流程
String crm_project_info_id=crm_project_infoItem.getId();//文件编号
String approval_type=crm_project_infoItem.getApproval_type();//审批类型
String appraisal_method=crm_project_infoItem.getAppraisal_method();//评审方式
String appraisal_user=usersItem.getUsername();//评审用户
String appraisal_name=usersItem.getName();//评审人
String approval_departmentid=usersItem.getManager_departmentItem().getId();
String approval_department=usersItem.getManager_departmentItem().getName();
String start_time=ParameterUtils.getString(request,"start_time");//审批开始时间
String end_time=ParameterUtils.getString(request,"end_time");//审批结束时间
String verify_option=ParameterUtils.getString(request,"verify_option");//审批意见
String appraisal_result=ParameterUtils.getString(request,"appraisal_result");//审批结果
String workflow_state_id=crm_project_infoItem.getWorkflow_state_id();//流程状态编号
String workflow_state_name=crm_project_infoItem.getWorkflow_state_name();//流程状态
String fileExt=ParameterUtils.getString(request,"fileExt");//参考附件
if(start_time==null||!Check.isDateTime(start_time)){
out.print("start_time 审批开始时间只能是短日期,形如 (2003-12-05)");
return;
}
if(end_time==null||!Check.isDateTime(end_time)){
out.print("end_time 审批结束时间只能是短日期,形如 (2003-12-05)");
return;
}
Crm_project_info_verifyrecordItem item=new Crm_project_info_verifyrecordItem();
item.setWorkflow_id(workflow_id);
item.setCrm_project_info_id(crm_project_info_id);
item.setApproval_type(approval_type);
item.setAppraisal_method(appraisal_method);
item.setAppraisal_user(appraisal_user);
item.setAppraisal_name(appraisal_name);
item.setApproval_departmentid(approval_departmentid);
item.setApproval_department(approval_department);
item.setStart_time(start_time);
item.setEnd_time(end_time);
item.setVerify_option(verify_option);
item.setAppraisal_result(appraisal_result);
item.setWorkflow_state_id(workflow_state_id);
item.setWorkflow_state_name(workflow_state_name);
item.setFileExt(fileExt);
Crm_project_info_verifyrecordBean bean=new Crm_project_info_verifyrecordBean();
boolean b=bean.addItem(item);
if(b)//修改借阅的文档审批结果
{
crm_project_infoBean.updateAppraisal_result(appraisal_result,id);
}
}
%>
<html>
<head>
<title><%=titleName%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/css.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../../js/check.js"></script>
<link href="../../css/date.css" rel="stylesheet" type="text/css">
<script src="../../js/ShowDate.js"></script>
<script language="javascript">
init();
</script>
</head>
<script language="javascript">
function back()
{
location="crm_project_info_verifyrecord.jsp";
}
function Check()
{
var form=form1;
if(!isDateTime(form.start_time.value))
{
alert("审批开始时间只能是短日期,形如 (2003-12-05)!");
form.start_time.focus();
return;
}
if(!isDateTime(form.end_time.value))
{
alert("审批结束时间只能是短日期,形如 (2003-12-05)!");
form.end_time.focus();
return;
}
if(form.verify_option.value=="")
{
alert("请输入审批意见!");
form.verify_option.focus();
return;
}
form.status.value="add";
form.message.value=1;
form.submit();
}
</script>
<body>
<form action="" method="post" name="form1" >
<table class="firsttable">
<tr>
<td align="center" valign="top">
<table class="centertable">
<tr>
<td></td>
</tr>
<tr>
<td align="center" class="addborder">
<table class="addTable">
<tr align="center" >
<td colspan="2">
<font class="message">
<%
if(message.equals("1"))
{
out.println("添加成功:继续");
}
%>
</font> </td>
</tr>
<tr >
<td >审批开始时间:</td>
<td >
<input name="start_time" type="text" size="10" ><a href="javascript:" onClick="show_cele_date(start_time,'','',start_time)"><img src='../../icon/cal.gif' border=0></a> </td>
</tr>
<tr >
<td >审批结束时间:</td>
<td >
<input name="end_time" type="text" size="10" ><a href="javascript:" onClick="show_cele_date(end_time,'','',end_time)"><img src='../../icon/cal.gif' border=0></a> </td>
</tr>
<tr >
<td width=100>审批意见:</td>
<td ><textarea name="verify_option" cols="70" rows="10" id="verify_option"></textarea></td>
</tr>
<tr >
<td >审批结果:</td>
<td >
<%
String appraisal_result="1";
if(!ParameterUtils.getString(request,"appraisal_result").equals(""))
appraisal_result=ParameterUtils.getString(request,"appraisal_result");
Oa_dictionaryBean oa_dictionaryBean=new Oa_dictionaryBean();
List oa_dictionaryList=oa_dictionaryBean.findByNum("9");
Iterator oa_dictionaryE=oa_dictionaryList.iterator();
while(oa_dictionaryE.hasNext()){
Oa_dictionaryItem oa_dictionaryItem=(Oa_dictionaryItem)oa_dictionaryE.next();
if(appraisal_result.equals(oa_dictionaryItem.getCode()))
out.println("<input type='radio' name='appraisal_result' value='"+oa_dictionaryItem.getCode()+"' checked>"+oa_dictionaryItem.getCode_name());
else
out.println("<input type='radio' name='appraisal_result' value='"+oa_dictionaryItem.getCode()+"' >"+oa_dictionaryItem.getCode_name());
}
%></td>
</tr>
<script language='javascript'>
function selectFile()
{
var url="../public/fileupload.jsp?dir_name=crm_project_info_verifyrecord&file_name=fileExt";
open(url,'win','scrollbars=no,width=600,height=400,resizable=no,left=200,top=100,resizable=false');
}
</script>
<tr >
<td >参考附件:</td>
<td ><textarea name="fileExt" cols="70" rows="5" id="fileExt" readonly="readonly"></textarea> <input name="Buttonfile" type="button" class="button" onClick="selectFile()" value="上传"></td>
</tr>
<tr >
<td colspan="2" align="center">
<input name="Button" type="button" class="button" onClick="Check()" value="确定">
<input name="Submit2" type="button" class="button" onClick="back()" value="返回"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="status" >
<input type="hidden" name="message" >
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -