📄 editcode.jsp
字号:
<%@ include file="/WEB-INF/jsp/common/Taglibs.jsp" %>
<c:set var="codeType" value="${codeForm.map['codeBean'].codeType}" scope="page"/>
<c:set var="mode" value="${codeForm.map['editMode']}" scope="page"/>
<script type="text/javascript" language="javascript">
function addCode() {
var form = document.forms[0];
var type = "<c:out value="${codeType}"/>";
if (type == "0" && form.elements["codeBean.codeTypeId"].value == "") {
alert('<bean:message key="err.admin.code.codeCategoryNoSelect"/>');
return false;
}
if (validateAddCode(form)) {
form.action = '<c:url value="/admin/code/addCode.do"/>';
form.submit();
}
else
return false;
}
function updateCode() {
var form = document.forms[0];
var type = "<c:out value="${codeType}"/>";
if (type == "0" && form.elements["codeBean.codeTypeId"].value == "") {
alert('<bean:message key="err.admin.code.codeCategoryNoSelect"/>');
return false;
}
if (validateUpdateCode(form)) {
form.action = '<c:url value="/admin/code/updateCode.do"/>';
form.submit();
}
else
return false;
}
function backListCode() {
var f = document.forms[0];
f.action = "<c:url value="/admin/code/listCode.do"/>";
f.submit();
}
function selectParentCode() {
var form = document.forms[0];
form.action = "<c:url value='/admin/code/changeCodeType.do'/>";
form.submit();
}
</script>
<html:form action="/code/initAddCode.do">
<html:hidden property="codeBean.id"/>
<html:hidden property="codeBean.version"/>
<html:hidden property="editMode"/>
<div align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="table1">
<tr>
<td height="28" colspan="2">
<img src="<c:url value='/images/dot.gif'/>" width="11" height="11" alt="">
<bean:message key="label.admin.systemSetting"/> >
<bean:message key="label.admin.code.codeManager"/>
</td>
</tr>
<tr>
<td width="2%" height="31" class="section">
<img src="<c:url value='/images/menu_dot.jpg'/>" width="6" height="19" alt="">
</td>
<td width="98%" class="section">
<bean:message key="label.admin.code.codeInfo"/>
</td>
</tr>
<tr>
<td></td>
<td>
<table width="100%" height="43" border="0" cellpadding="0" cellspacing="0"
style="font-size:12px; width:96%" id="table2">
<tr>
<c:if test="${mode == 'add'}">
<td>
<bean:message key="label.admin.code.selectCodeType"/>
</td>
<td>
<html:radio property="codeBean.codeType" value="1" onclick="selectParentCode()">
<bean:message key="label.admin.code.codeCategory"/>
</html:radio>
<html:radio property="codeBean.codeType" value="0" onclick="selectParentCode()">
<bean:message key="label.admin.code.code"/>
</html:radio>
</td>
</c:if>
<c:if test="${mode == 'update'}">
<td colspan="2">
<html:hidden property="codeBean.codeType"/>
</td>
</c:if>
<c:if test="${codeType=='0'}">
<tr>
<td>
<bean:message key="label.admin.code.codeCategory"/>
</td>
<td>
<html:select property="codeBean.codeTypeId" onchange="selectParentCode()">
<html:option value=""><bean:message key="label.admin.code.optionSelect"/></html:option>/>
<c:forEach items="${codeCategoryList}" var="i">
<html:option value="${i.id}"><c:out value="${i.shortDesc}"/></html:option>
</c:forEach>
</html:select>
</td>
</tr>
<tr>
<td>
<bean:message key="label.admin.code.parentCode"/>
</td>
<td>
<html:select property="codeBean.parentCodeId">
<html:option value=""><bean:message key="label.admin.code.optionSelect"/></html:option>/>
<c:forEach items="${parentCodeList}" var="i">
<html:option value="${i.id}"><c:out value="${i.shortDesc}"/></html:option>
</c:forEach>
</html:select>
</td>
</tr>
</c:if>
<c:if test="${codeType=='1'}">
<tr>
<td>
<bean:message key="label.admin.code.parentCode"/>
</td>
<td>
<html:select property="codeBean.parentCodeId">
<html:option value=""><bean:message key="label.admin.code.optionSelect"/></html:option>/>
<c:forEach items="${parentCodeList}" var="i">
<html:option value="${i.id}"><c:out value="${i.shortDesc}"/></html:option>
</c:forEach>
</html:select>
</td>
</tr>
</c:if>
</tr>
<tr>
<td>
<bean:message key="label.admin.code.codeValue"/>
</td>
<td>
<html:text property="codeBean.codeValue"/>
</td>
</tr>
<tr>
<td>
<bean:message key="label.admin.code.cnshortDesc"/>
</td>
<td>
<html:text property="codeBean.shortDesc"/>
</td>
</tr>
<tr>
<td>
<bean:message key="label.admin.code.cnlongDesc"/>
</td>
<td>
<html:text property="codeBean.longDesc"/>
</td>
</tr>
<tr>
<td>
<bean:message key="label.admin.code.enshortDesc"/>
</td>
<td>
<html:text property="codeBean.enShortDesc"/>
</td>
</tr>
<tr>
<td>
<bean:message key="label.admin.code.enlongDesc"/>
</td>
<td>
<html:text property="codeBean.enLongDesc"/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
<td>
<table border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td width="8" class="ButtonHOMEL-msover"></td>
<td class="ButtonHOME-msover">
<c:choose>
<c:when test="${mode == 'add'}">
<a href="#" class="hrefColor" onclick="addCode()">
<bean:message key="button.save"/>
</a>
</c:when>
<c:otherwise>
<a href="#" class="hrefColor" onclick="updateCode()">
<bean:message key="button.save"/>
</a>
</c:otherwise>
</c:choose>
</td>
<td width="8" class="ButtonHOMER-msover"></td>
<td> </td>
<td width="8" class="ButtonHOMEL-msover"></td>
<td class="ButtonHOME-msover">
<a href="#" class="hrefColor" onclick="backListCode()">
<bean:message key="button.cancel"/>
</a>
</td>
<td width="8" class="ButtonHOMER-msover"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</html:form>
<html:javascript formName="/code/addCode" method="validateAddCode"/>
<html:javascript formName="/code/updateCode" method="validateUpdateCode"/>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -