📄 scheduleadd.asp
字号:
<!--#include file="../config.ini"-->
<!--#include file="../commfunction.inc" -->
<html>
<head>
<title>新建日程</title>
<script language="javascript">
function open_Event_Name() {
popupWin = window.open('help.asp?ID=Event_Name', 'remote', 'width=300,height=200')
}
function open_Event_Date() {
popupWin = window.open('help.asp?ID=Event_Date', 'remote', 'width=300,height=200')
}
function open_Event_Time() {
popupWin = window.open('help.asp?ID=Event_Time', 'remote', 'width=300,height=200')
}
function open_Event_Category() {
popupWin = window.open('help.asp?ID=Event_Category', 'remote', 'width=300,height=200')
}
function open_Event_Location() {
popupWin = window.open('help.asp?ID=Event_Location', 'remote', 'width=300,height=200')
}
function open_Event_Description() {
popupWin = window.open('help.asp?ID=Event_Description', 'remote', 'width=300,height=200')
}
function VerifyData() {
if (document.form1.Event_Name.value == ""){
alert("请输入主题!");
return false;
}
else if(document.form1.date.value == ""){
alert("请选择日期!");
return false;
}
else if(CheckDate(document.form1.date.value)){
alert("日期格式错误!");
return false;
}
else if(document.form1.time.value == ""){
alert("请选择开始时间!");
return false;
}
else if(document.form1.endtime.value == ""){
alert("请选择结束时间!");
return false;
}
//else if (document.form1.relativetype.value == "其他"){
// if(document.form1.TaskType2.value == "-1"){
// alert("请选择相关其他类型!");
// return false;}
//}
else if (document.form1.relativetype.value == "客户"){
//if(document.form1.TaskType1.value == "-1"){
//alert("请选择相关客户类型!");
//return false;}
if(document.form1.accountname.value == ""){
alert("请选择客户!");
return false;}
}
var daistring=""
for(i=0;i<form1.Right.length;i++)
{
form1.Right.selectedIndex=i
var a=form1.Right.value.split("/");
daistring=daistring+a[0]+",";
}
form1.attendant.value=daistring;
daistring="";
return true;
}
function adddata()
{
if (form1.Left.value!="")
{ var A=form1.Left.value.split("/");
form1.Right.options.add(new Option( A[1],form1.Left.value) );
form1.Left.options.remove(form1.Left.selectedIndex);
}
}
function deldata()
{
if (form1.Right.value!="")
{
var A=form1.Right.value.split("/");
form1.Left.options.add(new Option( A[1],form1.Right.value) );
form1.Right.options.remove(form1.Right.selectedIndex);
}
}
function relativetype_onchange()
{
if (form1.relativetype.value=="其他"){
accountnamesub.style.display='none';
accountname.style.display='none';
TaskType1.style.display='none';
TaskType2.style.display='block';
form1.account.value=-1;
form1.accountname.value="";
}
if (form1.relativetype.value=="客户"){
accountnamesub.style.display='block';
accountname.style.display='block';
TaskType1.style.display='block';
TaskType2.style.display='none';
}
}
function Continued_onchange()
{
if (form1.Continued.value=="0")
ContinueDate.style.display='none';
if (form1.Continued.value=="1")
ContinueDate.style.display='block';
}
function ContinuedDate_onchange()
{
if (form1.ContinuedDate.value!="5")
{
form1.CustDate.value='';
TDCustDate.style.display='none';
TDCustDateSub.style.display='none';
}
if (form1.ContinuedDate.value=="5")
{
TDCustDate.style.display='block';
TDCustDateSub.style.display='block';
}
}
</script>
<!--#include file="style.asp"-->
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<script language=javascript src="../tools/OpenWindow.js"></script>
</head>
<body vlink="#48576C" link="#48576C" alink="#000000" bgcolor="#FFFFFF" topmargin="3">
<script language=javascript src="../tools/newcalendar.js"></script>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<form action="scheduleaddsave.asp" name="form1" method="Post" onSubmit="return VerifyData()">
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><strong><font size="2" class=title><b>新建日程</b></font></strong></td>
<td> </td>
</tr>
<tr >
<td height="16" colspan="2" background="../images/title.gif"> </td>
</tr>
<tr>
<td height=4></td>
</tr>
<tr><td><div align="center" style="cursor:hand">
<input type="image" src="../images/button_save.gif" border=0>
<img src="../images/button_cancel.gif" style="cursor:hand" border=0 language=javascript onclick="form1.reset();">
<img src="../images/button_back.gif" style="cursor:hand" border=0 language=javascript onclick="history.go(-1);">
</DIV></td>
</tr>
</table>
<table border="0" cellspacing="0" width="100%">
<tr>
<td width="100%"> <font size="1">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#FFFFFF"><td align=center valign="middle">
<table border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#ffffff" width="100%" id="AutoNumber1" height="281">
<tr>
<td width="10%" bgcolor="DEDFDE"> <div align="center"><font color="#FF0000">* </font>主题</div></td>
<td width="40%" bgcolor="efefef"> <input type="text" name="Event_Name" onBlur="this.className='inputnormal'" onFocus="this.className='inputedit';this.select()" class="inputnormal" size="20" maxlength="255">
</td>
<td width="10%" height="24" bgcolor="DEDFDE"> <div align="center"><font color="#FF0000">*</font>
待做者</div></td>
<td width="30%" height="24" bgcolor="efefef"> <input name="bowner" type="hidden" size="8" value="<%=session("loginid")%>">
<input name="ownername" type="text" size="12" value="<%=session("username")%>" readonly>
<input type="button" name="bnowner" onClick="JavaScript:opensubwin2('form1','bowner')" value=... class=black>
</td>
</tr>
<tr>
<td width="10%" height="24" bgcolor="DEDFDE"> <div align="center"><font color="#FF0000">* </font>日期</div></td>
<td width="40%" height="24" bgcolor="efefef"> <input type="text" name="date" size="12" language=javascript id=dupdatetime1 value="<%=date()%>" >
<% call AddImg("date1") %>
<input type = hidden name=clicksource> <input type = hidden name=clickresult >
<!--
<a href="javascript:show_calendar('form1.date');" onMouseOver="window.status='Date Picker'; overlib('点击选择日期'); return true;" onMouseOut="window.status=''; nd(); return true;"><img src="../images/show-calendar.gif" border=0></a>
-->
</td>
<td width="10%" height="24" bgcolor="DEDFDE"> <div align="center"><font color="#FF0000">* </font>开始时间</div></td>
<td height="24" bgcolor="efefef"> <input name="time" type="text" value="" size="12" >
<a href="#" onClick="javascript:window.open ('../tools/clock.asp?theName=form1.time','','scrollbars=no,left= 200,top=150,height=40,width=200,menubar=no,location=no,toolbar=no,resizable=no','');" ><img src="../images/show-time.gif" border=0></a>
</td>
</tr>
<tr>
<td width="10%" height="24" bgcolor="DEDFDE"><div align="center">相关</div></td>
<td width="40%" height="24" bgcolor="efefef"> <select name=relativetype onchange="relativetype_onchange()">
<option value="其他">其他</option>
<option value="客户">客户</option>
</select></td>
<td width="10%" height="24" bgcolor="DEDFDE"> <div align="center"><font color="#FF0000">* </font>结束时间</div></td>
<td height="24" bgcolor="efefef"> <div align="left">
<input name="endtime" type="text" value="" size="12" >
<a href="#" onClick="javascript:window.open ('../tools/clock.asp?theName=form1.endtime','','scrollbars=no,left= 200,top=150,height=40,width=200,menubar=no,location=no,toolbar=no,resizable=no','');" ><img src="../images/show-time.gif" border=0></a>
</div></td>
</tr>
<tr>
<td width="10%" height="24" bgcolor="DEDFDE"><div align="center">日程类型</div></td>
<td width="40%" height="24" bgcolor="efefef"> <div id=TaskType1 style="display:none">
<select name="TaskType1" class="stedit">
<option value="-1">--选择类型--</option>
<%getdefinepeprotery "日程类型","客户",-1%>
</select>
</div>
<div id=TaskType2 style="display:block">
<select name="TaskType2" class="stedit">
<option value="-1">--选择类型--</option>
<%getdefinepeprotery "日程类型","其他",-1%>
</select>
</div></td>
<td width="10%" height="24" bgcolor="DEDFDE"> <div align="center" id=accountnamesub style="display:none"><font color="#FF0000">* </font>客户</div></td>
<td height="24" bgcolor="efefef"><div id=accountname style="display:none">
<input name="account" type="hidden" size="8" value="<%=straccount%>">
<input name="accountname" type="text" size="35" value="<%=straccountname%>" readonly>
<input type="button" name="bnaccount" onClick="JavaScript:opensubwin2('form1','account')" value=... class=black>
</div></td>
</tr>
<tr>
<td height="24" bgcolor="DEDFDE"><div align="center">是否连续</div></td>
<td height="24" bgcolor="efefef"><select name="Continued" onChange="Continued_onchange()">
<option value="0">否</option>
<option value="1">是</option>
</select></td>
<td height="24" align="center" bgcolor="DEDFDE"><font color="#000000">地点</font></td>
<td height="24" bgcolor="efefef"><input type="text" name="Location" onBlur="this.className='inputnormal'" onFocus="this.className='inputedit';this.select()" class="inputnormal" size="30" maxlength="255"></td>
</tr>
<tr id=ContinueDate style="display:none">
<td width="10%" height="24" bgcolor="DEDFDE"> <div align="center"><font color="#000000">连续日期</font></div></td>
<td width="40%" height="24" bgcolor="efefef"><select name="ContinuedDate" onChange="ContinuedDate_onchange()">
<option value="1">一周</option>
<option value="2">二周</option>
<option value="3">一月</option>
<option value="4">二月</option>
<option value="5">自定义</option>
</select> </td>
<td width="10%" height="24" align="center" bgcolor="DEDFDE"> <div id="TDCustDateSub" style="display:none">
<font color="#000000">自定义日期</font></div></td>
<td height="24" bgcolor="efefef"><div id="TDCustDate" style="display:none">
<!--
<input name="CustDate" type="text" value="" size="12">
<a href="javascript:show_calendar('form1.CustDate');" onMouseOver="window.status='Date Picker'; overlib('点击选择日期'); return true;" onMouseOut="window.status=''; nd(); return true;"><img src="../images/show-calendar.gif" border=0></a>
</div>
-->
<input type="text" name="CustDate" size="12" language=javascript id=dupdatetime2 value="" >
<% call AddImg("date2") %>
<input type = hidden name=clicksource> <input type = hidden name=clickresult >
</td>
</tr>
<tr>
<td width="10%" height="25" bgcolor="DEDFDE"> <div align="center"><font color="#000000" size="2">具体内容</font><font color="#000000"><br>
</font></div></td>
<td height="25" colspan="3" bgcolor="efefef"> <textarea name="Description" onBlur="this.className='inputnormal'" onFocus="this.className='inputedit';this.select()" class="inputnormal" cols="45" rows="5"></textarea>
</td>
</tr>
<tr>
<td bgcolor="DEDFDE"><div align="center"><font color="#000000" size="2">完成情况</font></div></td>
<td bgcolor="efefef" colspan=3><textarea name="result" onBlur="this.className='inputnormal'" onFocus="this.className='inputedit';this.select()" class="inputnormal" cols="45" rows="5"></textarea></td>
</tr>
<tr>
<td width="10%" bgcolor="DEDFDE"> <div align="center"><font color="#000000">参加者</font></div></td>
<td bgcolor="efefef" colspan=3> <table bgcolor="efefef">
<tr>
<td> <select name=Left size="5" style="width:80pt" ondblclick="adddata()">
<%
Dim ConnDB
Dim RsObj
Set ConnDB=Server.CreateObject("ADODB.Connection")
Set RsObj=Server.CreateObject("ADODB.RecordSet")
ConnDB.Open ConnString
RsObj.Open "select * from usertable",ConnDB
While Not RsObj.BOF and Not RsObj.EOF
%>
<option value="<%response.write RsObj("Id") &"/"&RsObj("UserName")%>" >
<%response.write RsObj("UserName") %>
</option>
<%
RsObj.MoveNext
Wend
%>
</select></td>
<td> </td>
<td bgcolor="efefef"> <p align="center">
<input type="button" name="add" value=">>" onClick="adddata()">
</p>
<p align="center">
<input type="button" name="add" value="<<" onClick="deldata()">
</p></td>
<td> </td>
<td bgcolor="#FFFFFF"> <select name=Right size=5 style="width:80pt" ondblclick="deldata()">
<% if Request.QueryString("Method") = "edit" then
While Not rsbrapview.BOF and Not rsbrapview.EOF
%>
<option value="<%response.write rsbrapview("Provinceid") &"/"&rsbrapview("Province")%>" >
<%response.write rsbrapview("Province") %>
</option>
<%
rsbrapview.MoveNext
Wend
end if
%>
</select></td>
</tr>
</table>
<input type=hidden name="attendant"> </td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -