📄 index.jsp
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ page import="com.km.yewu.data.Yewu"%>
<html:html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link type="text/css" rel="stylesheet" href="../../../css/table.css">
<head><title>业务管理</title>
<script language="JavaScript">
function newyw(){
with(document.forms[1]){
operAtt.value = 'new';
submit();
}
}
function deleteyw(){
var selectRep;
with(document.forms[1]){
if(typeof(selectList)=="undefined")
return false;
if(typeof(selectList.length)!="undefined"){
for(i=0;i<selectList.length;i++)
if(selectList[i].checked == true)
selectRep = "select";
if(selectRep != "select"){
alert("请选择需要删除的业务!");
return false;
}
}else{
if(!selectList.checked){
alert("请选择需要删除的业务!");
return false;
}
}
operAtt.value = 'deleteyw';
submit();
}
}
//用来选择全部复选框
function CheckAll(){
with(document.forms[1]){
if(typeof(selectList)=="undefined")
return false;
if(selectAll.checked===true){
//在这里之所以增加这一个判断,是因为当只又一个复选框的时候系统就不把他当数组处理了
//所以也就没有length属性了
if(typeof(selectList.length)!="undefined"){
selectAll.value="1";
for (var i=0;i<selectList.length;i++){
var e = selectList[i];
e.checked = 1;
}
}
else{
selectList.checked= true;
selectAll.value="1";
}
}
else {
if(typeof(selectList.length)!="undefined"){
selectAll.value="0";
for (var i=0;i<selectList.length;i++){
var e = selectList[i];
e.checked = 0;
}
}
else {
selectList.checked = 0;
selectAll.value="0";
}
}
}
}
</script>
</head>
<body>
<html:errors/>
<html:form action="/yewuAction" method="post">
<html:hidden property="operAtt" value="search"/>
<table width="100%" border="1">
<tr>
<td>
<table>
<tr>
<td align="center">业务标题<html:text property="yewu.title" name="yewuForm"></html:text></td>
<td align="center">客户名称<html:text property="yewu.customer" name="yewuForm"></html:text></td>
<td align="center"><html:submit value=" 查 询 "></html:submit></td>
</tr>
</table>
</td>
</tr>
</table>
</html:form>
<html:form action="/yewuAction" method="post">
<html:hidden property="operAtt" value="findall"/>
<html:button property="new" value=" 新增业务 " onclick="newyw()">
</html:button>
<html:button property="delete" value=" 删除选中的业务" onclick="deleteyw()">
</html:button>
<p align="center"><font size="+2">业务列表</font></p>
<table width="100%" border="1">
<tr>
<th>选择</th>
<th align="left">标题</th>
<th align="left">客户名称</th>
<th align="left">建立时间</th>
<th align="left">附件</th>
<th align="left">操作</th>
</tr>
<logic:present name="yewuForm" property="list">
<logic:iterate id="view" name="yewuForm" property="list">
<tr>
<td align="center">
<html:multibox
name="yewuForm"
property="selectList"
value="<%=((Yewu)view).getUniversalid()%>" >
</html:multibox>
</td>
<TD><html:link page="/yewuAction.do?operAtt=title" paramId="universalid" paramName="view" paramProperty="universalid" target="_blank">
<bean:write name="view" property="title"/>
</html:link></TD>
<TD><bean:write name="view" property="customer"/></TD>
<TD><bean:write name="view" property="datetime"/></TD>
<TD><html:link page="/fujianAction.do?operAtt=findall" paramId="universalid" paramName="view" paramProperty="universalid" target="_blank">
<bean:write name="view" property="accessoriesStr"/>
</html:link></TD>
<TD><html:link page="/yewuAction.do?operAtt=forupdate" paramId="universalid" paramName="view" paramProperty="universalid" >
修改
</html:link></TD>
</tr>
</logic:iterate>
</logic:present>
<TR>
<TD colspan="5">
<html:multibox property="selectAll" onclick="CheckAll()" value="0" />选择全部</TD>
</TR>
</table>
<table>
<TR>
<TD><bean:write name="yewuForm" property="footer"
filter="false" /></TD>
</TR>
</table>
</html:form>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -