📄 crm_project_serviceedit.jsp
字号:
<%@ include file="../../include/configuration.jsp"%>
<%@ include file="../../include/authorizemanager.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" %>
<%
SessionFactory sessionFactory=(SessionFactory)session.getAttribute("sessionFactory");
String message="";
ParameterUtils.setCharacterEncoding(request);
String status=ParameterUtils.getString(request,"status");
//修改
if(status.equals("edit"))
{
String id=ParameterUtils.getString(request,"id");//
String crm_project_info_id=sessionFactory.getCrm_project_info_id();//项目名称
String crm_customer_id=ParameterUtils.getString(request,"crm_customer_id");//客户名称
String crm_customer_contact_id=ParameterUtils.getString(request,"crm_customer_contact_id");//联系人
String service_method=ParameterUtils.getString(request,"service_method");//服务方式
String finish_info=ParameterUtils.getString(request,"finish_info");//完成情况
String start_time=ParameterUtils.getString(request,"start_time");//开始时间
String end_time=ParameterUtils.getString(request,"end_time");//结束时间
String service_name=sessionFactory.getManager_usersItem().getName();//客服人员
String service_content=ParameterUtils.getString(request,"service_content");//服务内容
if(finish_info==null||finish_info.equals("")){
out.print("finish_info 完成情况不能为空");
return;
}
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;
}
if(service_content==null||service_content.equals("")){
out.print("service_content 服务内容不能为空");
return;
}
Crm_project_serviceItem item=new Crm_project_serviceItem();
item.setId(id);
item.setCrm_project_info_id(crm_project_info_id);
item.setCrm_customer_id(crm_customer_id);
item.setCrm_customer_contact_id(crm_customer_contact_id);
item.setService_method(service_method);
item.setFinish_info(finish_info);
item.setStart_time(start_time);
item.setEnd_time(end_time);
item.setService_name(service_name);
item.setService_content(service_content);
Crm_project_serviceBean bean=new Crm_project_serviceBean();
boolean b=bean.updateItem(item);
if(b){
message="1";
}
}
String id=ParameterUtils.getString(request,"id");
Crm_project_serviceBean bean=new Crm_project_serviceBean();
Crm_project_serviceItem item=bean.find(id);
Oa_dictionaryXmlBean oa_dictionaryXmlBean=new Oa_dictionaryXmlBean();
List oa_dictionaryXmlList=oa_dictionaryXmlBean.findXmlByArray("25");
%>
<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_service.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.finish_info.value=="")
{
alert("请输入完成情况!");
form.finish_info.focus();
return;
}
if(form.service_content.value=="")
{
alert("请输入服务内容!");
form.service_content.focus();
return;
}
form.status.value="edit";
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 >
<select name="service_method" id="service_method">
<%
for(int i=0;i<oa_dictionaryXmlList.size();i++){
Oa_dictionaryItem oa_dictionaryItem=(Oa_dictionaryItem)oa_dictionaryXmlList.get(i);
if(oa_dictionaryItem.getNum().equals("25"))
{
if(item.getService_method().equals(oa_dictionaryItem.getCode()))
out.println("<option value='"+oa_dictionaryItem.getCode()+"' selected>"+oa_dictionaryItem.getCode_name()+"</option>");
else
out.println("<option value='"+oa_dictionaryItem.getCode()+"' >"+oa_dictionaryItem.getCode_name()+"</option>");
}
}
%>
</select> </td>
</tr>
<tr >
<td >开始时间:</td>
<td >
<input name="start_time" type="text" size="10" value="<%=DateUtils.formatString(item.getStart_time())%>"><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" value="<%=DateUtils.formatString(item.getEnd_time())%>"><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="finish_info" cols="70" rows="10" id="finish_info"><%=item.getFinish_info()%></textarea></td>
</tr>
<tr >
<td width=100>服务内容:</td>
<td ><textarea name="service_content" cols="70" rows="10" id="service_content"><%=item.getService_content()%></textarea></td>
</tr>
<tr >
<td colspan="2" align="center">
<input type="button" class="button" onClick="Check()" value="确定">
<input 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="id" value=<%=id%>>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -