📄 editservice.asp
字号:
<!--#include file="../function/connect.asp"-->
<!--#include file="../function/function.asp"-->
<%
Service_ID=request("Service_ID")
if Service_ID="" then
Service_ID=request("IID")
end if
if Service_ID="" then
response.write "参数错误"
response.end
else
response.write "<script>top.frame2.location.href='user_design5.asp?strTable=51&service_ID=" & service_ID & "';top.frame2.location.reload();</script>"
end if
strsql="select * from service where Service_ID=" & Service_ID
Set objRs = Server.CreateObject("adodb.recordset")
objRs.Open strsql,objConn,1,1
if not objrs.eof then
Regarding=objrs.fields("Regarding")
Start_Date=objrs.fields("Start_Date")
client_ID=objrs.fields("client_ID")
Contact_ID=objrs.fields("Contact_ID")
Service_Type_ID=objrs.fields("Service_Type_ID")
Product_ID=objrs.fields("Product_ID")
Details=objrs.fields("Details")
Close_Date=objrs.fields("Close_Date")
Solution=objrs.fields("Solution")
IsPublic=objrs.fields("IsPublic")
end if
%>
<html>
<head>
<title>服务反馈</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../cssD.css" rel=stylesheet>
<script language = "javascript" src="../function/date-picker.js"></script>
<script>
function checkEnd(obj)
{
if(obj.checked==true){
document.form1.Close_Date.disabled=false;
document.form1.Solution.disabled=false;
}else{
document.form1.Close_Date.disabled=true;
document.form1.Solution.disabled=true;
}
}
function check()
{
if(document.form1.Regarding.value==""){
alert("主题不能为空");
document.form1.Regarding.focus();
return false;
}
if(document.form1.client_ID.value==""){
alert("相关客户不能为空");
document.form1.client_ID.focus();
return false;
}
if(document.form1.Contact_ID.value==""){
alert("相关联系人不能为空");
document.form1.Contact_ID.focus();
return false;
}
}
function Openwin(str)
{
window.open(str,"","left=100,top=100,Width=500,Height=400,scrolling=yes");
}
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
function fnDo(strTable,strFIdName,strIdName,strIDValue,strShowName)
{
var xmlDom = new ActiveXObject("Msxml2.DOMDocument");
var strURL = "GetCity.asp?strIDValue=" + strIDValue + "&strIdName="+strIdName+"&strTable="+strTable+"&strShowName="+strShowName+"&strFIdName="+strFIdName;
//alert(strURL);
xmlhttp.Open("POST",strURL , true);
xmlhttp.onreadystatechange = fnRun;
xmlhttp.Send(xmlDom);
}
//--------------------------------------------------------
function fnRun()
{
var state = xmlhttp.readyState;
var xmlDom = new ActiveXObject("Msxml2.DOMDocument");
if (state == 4)
{
xmlDom.loadXML(xmlhttp.responseXML.xml);
//alert(xmlDom.documentElement.selectSingleNode("//objXML").text)
var getInfo = xmlDom.documentElement.selectSingleNode("//objXML").text;
//document.write(getInfo);
subcat = new Array();
eval(getInfo);
changelocation(subcat)
}
}
function changelocation(subcat)
{
document.form1.Contact_ID.length = 0;
var i;
document.form1.Contact_ID.options[0] = new Option('====选择====','');
for (i=0;i <subcat.length; i++)
{
document.form1.Contact_ID.options[document.form1.Contact_ID.length] = new Option(subcat[i][0], subcat[i][1]);
if(subcat[i][1]=='<%=Contact_ID%>')
{
document.form1.Contact_ID.options[i+1].selected=true;
}
}
}
</script>
</head>
<body>
<table width="68%" border="1" cellpadding="2" cellspacing="0" bordercolorlight='#000000' bordercolordark='#FFFFFF'>
<form name="form1" method="post" action="../function/updateToDB.asp?InsertTable=Service&ModifyID=<%=Service_ID%>&ModifyIDName=Service_ID&RedirectUrl=../clients/editService.asp?Service_ID=<%=Service_ID%>" onsubmit="return check();">
<tr>
<td height="22" colspan="4" class="tablehead"><div align="center">服务反馈</div></td>
</tr>
<tr>
<td width="98" height="22" nowrap>
<div align="right">反馈主题:</div></td>
<td width="202" height="22">
<input name="Regarding" type="text" class="input" id="Regarding" size="30" maxlength="50" value="<%=Regarding%>"></td>
<td width="90" height="22" nowrap>
<div align="right">反馈日期:</div></td>
<td width="271" height="22">
<input name="Start_Date" type="text" id="Start_Date" size="15" class="input" onclick="show_calendar('form1.Start_Date',null,null,'MM-DD-YYYY')" onmouseover="window.status='选择时间';return true;" onmouseout="window.status='';return true;" value="<%=Start_Date%>"><input type="button" class=button value="..." onclick="show_calendar('form1.Start_Date',null,null,'YYYY-MM-DD')"></td>
</tr>
<tr>
<td width="98" height="22" nowrap>
<div align="right">相关客户:</div></td>
<td height="22" width="202">
<select name="client_ID" style='width:150;' onchange="fnDo('Contacts','client_ID','Contact_ID',this.value,'Contact_Name');">
<option value="">====选择====</option>
<%
strsql="select * from clients where client_owner='" & session("loginuser") & "' or IsPublic=1"
Set objRs = Server.CreateObject("adodb.recordset")
objRs.Open strsql,objConn,1,1
if not objrs.eof then
do while not objrs.eof
if client_id & "" = objrs.fields("client_id") & "" then
response.write "<option value=" & objrs.fields("client_id") & " selected>" & objrs.fields("client_name") & "</option>"
else
response.write "<option value=" & objrs.fields("client_id") & ">" & objrs.fields("client_name") & "</option>"
end if
objrs.movenext
loop
end if
%>
</select>
</td>
<td width="90" height="22" nowrap>
<div align="right">相关联系人:</div></td>
<td height="22" width="271">
<select name="Contact_ID" style="width:100">
<option value="">====选择====</option>
</select>
</td>
</tr>
<tr>
<td width="98" height="22" nowrap>
<div align="right">服务反馈类型:</div></td>
<td height="22" width="202">
<%getSelected "Service_Type_ID","select * from Dict_ServiceTypes ","Service_Type","Service_Type_ID",Service_Type_ID%>
</td>
<td width="90" height="22" nowrap>
<div align="right">相关产品:</div></td>
<td height="22" width="271">
<%getSelected150 "Product_ID","select * from products ","product_Name","Product_ID",Product_ID%>
</td>
</tr>
<tr>
<td width="98" height="10">
<div align="right">详细描述:</div></td>
<td height="10" width="202">
<textarea name="Details" cols="30" rows="10" id="Details" class="input"><%=Details%></textarea></td>
<td width="90" height="10" nowrap>
<div align="right">结束反馈:</div></td>
<td height="10" width="271">
<table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight='#000000' bordercolordark='#FFFFFF'>
<tr>
<td height="22" colspan="2" nowrap><input name="Closed" type="checkbox" id="Closed" value="1" onclick="checkEnd(this);">
结束该服务反馈</td>
</tr>
<tr>
<td width="20%" height="22" nowrap>
<div align="right">结束日期:</div></td>
<td width="80%" height="22"><input name="Close_Date" class="input" type="text" size="10" id="Close_Date" onclick="show_calendar('form1.Close_Date',null,null,'MM-DD-YYYY')" onmouseover="window.status='选择时间';return true;" onmouseout="window.status='';return true;" value="<%=Close_Date%>" disabled><input type="button" class=button value="..." onclick="show_calendar('form1.Close_Date',null,null,'YYYY-MM-DD')"></td>
</tr>
<tr>
<td height="80" nowrap><div align="right">处理结果:</div></td>
<td height="80"><textarea name="Solution" rows="6" id="Solution" class="input" disabled><%=Solution%></textarea></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="6" height="22">
<input type="checkbox" name="IsPublic" value="1" <%if IsPublic & ""="1" then%>checked<%end if%>>公开此条纪录
</td>
</tr>
<tr>
<td height="10" colspan="4"><div align="center">
<input type="submit" value=" 提交 " class="button">
<input type="reset" value=" 重设 " class="button">
</div></td>
</tr>
</form>
</table>
</body>
</html>
<script>
if(document.form1.client_ID.options[document.form1.client_ID.selectedIndex].value!=""){
fnDo('Contacts','client_ID','Contact_ID',document.form1.client_ID.options[document.form1.client_ID.selectedIndex].value,'Contact_Name');
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -