📄 listhead.asp
字号:
<!-- #include file = "../../../include/asphead.asp" -->
<!-- #include file = "../../../include/function.asp" -->
<%CheckUser()%>
<script src="../../../include/function.js" type="text/javascript"></script>
<link href="../../../include/main.css" rel="stylesheet" type="text/css">
<script ID="clientEventHandlersJS" LANGUAGE="javascript">
<!--
function window_onload(){
btnAdd.disabled =false;
btnImport.disabled =false;
btnExport.disabled =false;
SetRows();
window.parent.RightData.navigate("list.asp");
}
function window_onresize() {
SetRows();
}
function SetRows()
{
parent.RightPanel.rows=RightHeadTable.clientHeight + ",*";
}
function AddRecord() {
if(window.showModalDialog("frame.asp?target=new.asp", "","dialogwidth:560px;dialogheight:225px;Status:0;center:1;resizable=1;")==true)
{
window.parent.RightData.navigate("list.asp");
}
}
function DelRecord()
{
var SelectedRow,BadRow;
BadRow=window.parent.RightData.CheckDelAuth();
if(BadRow!="")
{
alert("字典项目不能删除。\n项目号:" + BadRow+"。为了保证系统完整性,当字典项目及其子项目被其它功能引用、删除它会导致功能严重失效时,系统将不允许删除。这些重要引用包括:\n(1) 被公式使用\n(2) 用作颜色设置\n(3) 用作权限控制\n(4) 提醒模板用作提醒条件\n请查看项目的‘相关数据’,首先处理好这些引用情况,然后再删除。\n")
}
else
{
SelectedRow=window.parent.RightData.RowSelect();
if(SelectedRow=="")
{
alert("您要删除哪些项目?请选择。")
}
else
{
if(confirm("警告!\n(1) 删除字典项目时,其所有下属项目也将被删除。\n(2) 记录中填有此项目的字段将被清空。\n请参考该项目的相关数据,避免误删除。\n您确定要删除吗?")==true)
{
document.frmData.RowSelect.value =SelectedRow;
document.frmData.target ="SaveArea";
document.frmData.action="del.asp";
document.frmData.submit();
}
}
}
}
function SetOrder() {
var DictID;
DictID=frmData.DictID.value;
if(window.showModalDialog("frame.asp?target=chgorder.asp?DictID=" + DictID, "","dialogwidth:330px;dialogheight:370px;Status:0;center:1;resizable=1;")==true)
{
window.parent.RightData.navigate("list.asp");
}
}
function Import()
{
if(window.showModalDialog("frame.asp?target=../../../imexport/importdictstep1.asp", "","dialogwidth:560px;dialogheight:370px;Status:0;center:1;resizable=1;")==true)
{
window.parent.RightData.navigate("list.asp");
}
}
function Export()
{
if(HasData())
{
window.showModalDialog("frame.asp?target=exportstep1.asp","","dialogwidth:420px;dialogheight:270px;Status:0;center:1;resizable=1;");
}
else
alert("当前选项字典是空的,没有字典项目可导出。");
}
function HasData()
{
if(PageNavigate.innerText!="" && document.frmData.CurPage.value>0) //用PageNavigate.innerText有无内容和CurPage.value判断list是否已经有数据
return(true);
else
return(false);
}
//-->
</script>
<%
if instr(1,Request.ServerVariables("HTTP_REFERER"),"dicttree.asp")>0 then
'来自于选项字典树
dim WExcel
set WExcel=server.CreateObject("WExcel.System")
DictID=Request.Form ("DictID")
dim Exist
Exist=WExcel.DictExist(cint(UserID),cint(DictID))
CheckErr
if Exist=false then
Response.Redirect "/hcgis/notfound.asp?Name=选项字典&Depth=0"
end if
strWhere=""
strOrderBy=Request.Cookies("System")("DictOrderBy")
CurPage=1
Response.Cookies("System")("DictID")=DictID
Response.Cookies("System")("DictCurPage")=CurPage
Response.Cookies("System").Expires = CookieLife
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="window_onload()" onresize="window_onresize()">
<table id="RightHeadTable" name="RightHeadTable" width="100%" border="0" cellPadding=0 cellSpacing=0>
<tr height="20">
<td width="52%">
<p align="left" id="PageNavigate">
</p>
</td>
<td width="48%">
<p align="right">
<input type="button" name="btnAdd" disabled value="新增" style="cursor:hand; WIDTH: 45px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return AddRecord()">
<input type="button" name="btnDel" disabled value="删除" style="cursor:hand; WIDTH: 45px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return DelRecord()">
<input type="button" name="btnSetOrder" disabled value="调整顺序" style="cursor:hand; WIDTH: 72px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return SetOrder()">
<input type="button" name="btnImport" disabled value="导入" style="cursor:hand; WIDTH: 45px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Import()">
<input type="button" name="btnExport" disabled value="导出" style="cursor:hand; WIDTH: 45px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Export()">
</p>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" cellspacing="1" bgcolor="999999">
<tr>
<td bgcolor="white" width="5%" title="全选/全清"><input name="chkAll" onClick="SelectAll()" type="checkbox"></td>
<td bgcolor="white" width="10%">项目号</td>
<td bgcolor="white" width="30%">名称</td>
<td bgcolor="white" width="10%">不可选</td>
<td bgcolor="white" width="45%">说明</td>
</tr>
</table>
</td>
<iframe id="SaveArea" name="SaveArea" style="visibility:hidden" width="0" height="0" frameborder="0" src="">
</iframe>
</tr>
<form METHOD="post" name="frmData">
<input TYPE="hidden" NAME="OrderBy" value="<%=Request.Cookies("System")("DictOrderBy")%>">
<input TYPE="hidden" NAME="CurPage">
<input TYPE="hidden" NAME="RowSelect">
<input TYPE="hidden" NAME="DictID" value="<%=DictID%>">
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -