This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
k18-ntcs-web-ntc/src/main/webapp/WEB-INF/views/cfg/complexCfgForm.jsp
wangxin 3e1b3e391d 单域配置调整
(1)简化逻辑部分代码写到了BaseController里
(2)字符串,增强字符串配置的区域GK提交
(3)单域配置的审核部分目前不会下发area_ip_cfg给maat,后续会调整
2018-04-09 16:38:45 +08:00

131 lines
5.6 KiB
Plaintext

<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="${cfgName}"></spring:message></title>
<script type="text/javascript">
$(function(){
switchIpType($("select[name$='ipType']"));
areaControlInit();
$("input[name='isAreaEffective']").on('change',function(){
var val=$(this).val();
if(val==1){
$(".areaType").removeClass("hidden");
if($("input[name='areaType']:checked").val()==1){//areaISP
$("#areaIsp").removeClass("hidden");
}else if($("input[name='areaType']:checked").val()==0){//areaIp
$("#areaIp").removeClass("hidden");
}
}else{
$(".areaType").addClass("hidden");
$("#areaIp").addClass("hidden");
$("#areaIsp").addClass("hidden");
}
});
$("select[name$='ipType']").on("change",function(){
switchIpType($(this));
});
$("input[name='areaType']").on('change',function(){
var val=$(this).val();
if($(this).is(":visible")){
if(val==0){
$("#areaIp").removeClass("hidden");
$("#areaIsp").addClass("hidden");
}else{
$("#areaIsp").removeClass("hidden");
$("#areaIp").addClass("hidden");
}
}else{
$("#areaIsp").addClass("hidden");
$("#areaIp").addClass("hidden");
}
});
$("#cancel").on("click",function(){
window.history.back();
});
$("#cfgFrom").validate({
errorPlacement: function(error,element){
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
},
submitHandler: function(form){
//loading('onloading...');
form.submit();
},
errorContainer: "#messageBox",
});
});
</script>
</head>
<body>
<div class="page-content">
<h3 class="page-title">
<spring:message code="${cfgName}"></spring:message>
</h3>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i>
<c:if test="${empty _cfg.cfgId}"><spring:message code="add"></spring:message></c:if>
<c:if test="${not empty _cfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
</div>
<!-- <div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
<a href="#portlet-config" data-toggle="modal" class="config" data-original-title="" title=""> </a>
<a href="javascript:;" class="reload" data-original-title="" title=""> </a>
<a href="javascript:;" class="remove" data-original-title="" title=""> </a>
</div> -->
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="cfgFrom" action="${ctx}/cfg/complex/saveOrUpdateCfg" method="post" class="form-horizontal">
<div class="form-body">
<%@include file="/WEB-INF/include/form/complexInfo.jsp" %>
<c:if test="${not empty _cfg.cfgId}">
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
</c:if>
<c:if test="${not empty _cfg.compileId}">
<input type="hidden" name="compileId" value="${_cfg.compileId}">
</c:if>
<input type="hidden" name="audit" value="${audit}">
<input type="hidden" name="tableName" value="${_cfg.tableName}">
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
<input type="hidden" name="cfgName" value="${cfgName}">
<input type="hidden" name="action" value="${action}">
<input type="hidden" name="district" value="${_cfg.district}">
<c:choose>
<c:when test="${action!=5 and action!=8}">
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
</c:when>
<c:otherwise>
<input type="hidden" name=requestId value="0">
</c:otherwise>
</c:choose>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-offset-3 col-md-8">
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
</div>
</div>
</div>
<div class="col-md-6"> </div>
</div>
</div>
</form>
<!-- END FORM-->
</div>
</div>
</div>
</div>
</div>
</body>
</html>