📄 add.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="crm.entity.sys.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
List userlist=(List)session.getAttribute("userlist");
%>
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'add.jsp' starting page</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<script src="script/common.js"></script>
</head>
<body>
<script type="text/javascript">
function save(val)
{
with(document.chanceForm)
{
document.chanceForm.submit();
}
}
</script>
<form action="chance.do" method="post" name="chanceForm" onsubmit="return pass()">
<input type="hidden" name="flag" value="add">
<div class="page_title">销售机会管理 > 新建销售机会</div>
<div class="button_bar">
<button class="common_button" onclick="help('');">帮助</button>
<button class="common_button" onclick="history.go(-1);">返回</button>
<button class="common_button" onclick="return pass()">保存</button>
</div>
<table class="query_form_table">
<tr>
<th>编号</th>
<td><input readonly /></td>
<th>机会来源</th>
<td>
<input id="chcSource" name="entity.chcSource" size="20" /></td>
</tr>
<tr>
<th>客户名称</th>
<td><input id="chcCustName" name="entity.chcCustName" /><span class="red_star">*</span></td>
<th>成功机率</th>
<td><input id="chcRate" name="entity.chcRate" /><span class="red_star">*</span></td>
</tr>
<tr>
<th>概要</th>
<td colspan="3"><input id="chcTitle" name="entity.chcTitle" size="52" /><span class="red_star">*</span></td>
</tr>
<tr>
<th>联系人</th>
<td><input name="entity.chcLinkman" size="20" /></td>
<th>联系人电话</th>
<td><input name="entity.chcTel" size="20" /></td>
</tr>
<tr>
<th>机会描述</th>
<td colspan="3"><textarea rows="6" cols="50" name="entity.chcDesc"></textarea><span class="red_star">*</span></td>
</tr>
<tr>
<th>创建人</th>
<td><input name="entity.chcCreateBy" value="刘颖" readonly size="20" /><span class="red_star">*</span></td>
<th>创建时间</th>
<td><input id="t1" name="dateItme" size="20" /><span class="red_star">*</span></td>
</tr>
</table>
<br />
<table class="query_form_table" id="table1">
<tr>
<th>指派给</th>
<td>
<select name="entity.chcDueTo" >
<option>请选择...</option>
<%
for(int i=0;i<userlist.size();i++)
{
UserEntity en=(UserEntity)userlist.get(i);
%>
<option value="<%=en.getUsrId() %>"><%=en.getUsrName() %></option>
<%} %>
</select> <span class="red_star">*</span></td>
<th>指派时间</th>
<td>
<%--
<input id="t2" name="entity.chcDueDate" value="<%=new Date() %>" readonly="readonly" size="20" /><span class="red_star">*</span>
<input type="hidden" name="entity.chcStatus" size="20" />
--%>
</td>
</tr>
</table>
</form>
</body>
<script type="text/javascript">
setCurTime('t1');
function setCurTime(oid){
var now=new Date();
var year=now.getYear();
var month=now.getMonth();
var day=now.getDate();
var hours=now.getHours();
var minutes=now.getMinutes();
var seconds=now.getSeconds();
var timeString = year+"-"+month+"-"+day+" "+hours+":"+minutes+":"+seconds;
var oCtl = document.getElementById(oid);
oCtl.value = timeString;
}
function show(url){
window.location.href=url;
}
function pass(){
var pass = false;
if( document.chanceForm.chcRate.value =="" ){
alert("请将信息填写完整");
pass= false;
}else if(document.chanceForm.chcSource.value == ""){
alert("请将信息填写完整");
pass = false;
}
else if(document.chanceForm.chcCustName.value == ""){
alert("请将信息填写完整");
pass = false;
}
else if(document.chanceForm.chcSource.value == ""){
alert("请将信息填写完整");
pass = false;
}
else {
document.chanceForm.submit();
}
return pass;
}
</script>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -