(1)特定服务管理UL修改
(2)特定服务管理加入协议号重复验证,有上级配置则上级配置的所有下级配置ID不能重复,无上级配置一级配置ID不能重复 (3)取消jBox的Cookie打印
This commit is contained in:
@@ -250,21 +250,32 @@ public class SpecificServiceCfgController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value = "isIdRepeat")
|
@RequestMapping(value = "isCodeNotRepeat")
|
||||||
public boolean isIdRepeat(String specServiceId,String oldId){
|
public boolean isIdRepeat(@RequestParam(required=false,value="parentId")Integer parentId,@RequestParam(required=false,value="specServiceId")Integer specServiceId,@RequestParam(required=true,value="specServiceCode")Integer specServiceCode,@RequestParam(required=true,value="cfgType")Integer cfgType){
|
||||||
if(oldId!=null){
|
if(parentId!=null&&parentId.intValue()!=0) {
|
||||||
if(oldId.trim().equals(specServiceId)){
|
Integer parentCode=specificServiceCfgService.getParentCode(parentId);
|
||||||
return true;
|
if(parentCode!=null&&parentCode.intValue()==specServiceCode) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(specServiceId!=null){
|
if(specServiceId!=null){
|
||||||
SpecificServiceCfg ss = specificServiceCfgService.getBySpecServiceId(Integer.valueOf(specServiceId));
|
SpecificServiceCfg ss = specificServiceCfgService.getBySpecServiceId(Integer.valueOf(specServiceId));
|
||||||
if(ss==null){
|
if(ss!=null){
|
||||||
return true;
|
if(ss.getSpecServiceCode().intValue()==specServiceCode.intValue()&&cfgType.intValue()==ss.getCfgType().intValue()) {
|
||||||
|
return true;
|
||||||
|
}else {
|
||||||
|
ss=specificServiceCfgService.getRepeat(specServiceCode, cfgType,parentId);
|
||||||
|
if(ss==null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
SpecificServiceCfg ss=specificServiceCfgService.getRepeat(specServiceCode, cfgType,parentId);
|
||||||
|
if(ss==null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,5 +48,7 @@ public interface SpecificServiceCfgDao extends CrudDao<SpecificServiceCfg> {
|
|||||||
|
|
||||||
Integer updateConfigGroupInfobyGroupId(ConfigGroupInfo entity);
|
Integer updateConfigGroupInfobyGroupId(ConfigGroupInfo entity);
|
||||||
Integer getParentType(Integer specServiceId);
|
Integer getParentType(Integer specServiceId);
|
||||||
|
Integer getParentCode(Integer specServiceId);
|
||||||
|
SpecificServiceCfg getRepeat(@Param("specServiceCode")Integer code, @Param("cfgType")Integer cfgType,@Param("parentId")Integer parentId);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -37,10 +37,21 @@
|
|||||||
select <include refid="specificServiceCfgColumns" />
|
select <include refid="specificServiceCfgColumns" />
|
||||||
from specific_service_cfg s where s.spec_service_id = #{specServiceId}
|
from specific_service_cfg s where s.spec_service_id = #{specServiceId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getRepeat" resultType="com.nis.domain.specific.SpecificServiceCfg" >
|
||||||
|
select <include refid="specificServiceCfgColumns" />
|
||||||
|
from specific_service_cfg s where s.spec_service_code = #{specServiceCode} and s.cfg_type=#{cfgType} and s.is_valid=1
|
||||||
|
<if test="parentId != null and parentId !=''">
|
||||||
|
and parent_id= #{parentId}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
<select id="getParentType" resultType="java.lang.Integer" parameterType="java.lang.Integer">
|
<select id="getParentType" resultType="java.lang.Integer" parameterType="java.lang.Integer">
|
||||||
select cfg_type
|
select cfg_type
|
||||||
from specific_service_cfg s where s.spec_service_id = #{specServiceId}
|
from specific_service_cfg s where s.spec_service_id = #{specServiceId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getParentCode" resultType="java.lang.Integer" parameterType="java.lang.Integer">
|
||||||
|
select spec_service_code
|
||||||
|
from specific_service_cfg s where s.spec_service_id = #{specServiceId}
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 查出所有符合条件的顶层数据 -->
|
<!-- 查出所有符合条件的顶层数据 -->
|
||||||
|
|
||||||
|
|||||||
@@ -143,5 +143,11 @@ public class SpecificServiceCfgService extends BaseService{
|
|||||||
public Integer getParentType(Integer specServiceId) {
|
public Integer getParentType(Integer specServiceId) {
|
||||||
return specificServiceCfgDao.getParentType(specServiceId);
|
return specificServiceCfgDao.getParentType(specServiceId);
|
||||||
}
|
}
|
||||||
|
public Integer getParentCode(Integer specServiceId) {
|
||||||
|
return specificServiceCfgDao.getParentCode(specServiceId);
|
||||||
|
}
|
||||||
|
public SpecificServiceCfg getRepeat (Integer code,Integer cfgType,Integer parentId) {
|
||||||
|
return specificServiceCfgDao.getRepeat(code,cfgType,parentId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,11 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title></title>
|
<title></title>
|
||||||
|
<style type="text/css">
|
||||||
|
.tabbable-custom > .tab-content {
|
||||||
|
margin-top:-121px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var validateForm;
|
var validateForm;
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
@@ -23,16 +28,34 @@
|
|||||||
|
|
||||||
$("#name").focus();
|
$("#name").focus();
|
||||||
validateForm = $("#inputForm").validate({
|
validateForm = $("#inputForm").validate({
|
||||||
/* rules:{
|
rules:{
|
||||||
specServiceId:{
|
/* specServiceCode:{
|
||||||
remote:'${ctx}/specific/specificServiceCfg/isIdRepeat?oldId=${specificServiceCfg.specServiceId}'
|
remote:{
|
||||||
}
|
url:"${ctx}/specific/specificServiceCfg/isCodeNotRepeat",
|
||||||
|
type:"post",
|
||||||
|
//dataType:"json",
|
||||||
|
//contentType:"application/json; charset=utf-8",
|
||||||
|
data:{
|
||||||
|
parentId:function(){
|
||||||
|
return $("[name='parent.specServiceId']").val();
|
||||||
|
},
|
||||||
|
specServiceCode:function(){
|
||||||
|
return $("#specServiceCode").val();
|
||||||
|
},
|
||||||
|
cfgType:function(){
|
||||||
|
return $("[name='cfgType']").val();
|
||||||
|
},
|
||||||
|
specServiceId:'${specificServiceCfg.specServiceId}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} */
|
||||||
},
|
},
|
||||||
messages: {
|
messages: {
|
||||||
specServiceId:{
|
/* specServiceCode:{
|
||||||
remote:'<spring:message code="repeat"/>'
|
remote:'<spring:message code="repeat"/>'
|
||||||
}
|
} */
|
||||||
}, */
|
|
||||||
|
},
|
||||||
|
|
||||||
submitHandler: function(form){
|
submitHandler: function(form){
|
||||||
if(!validateForm.form()) {
|
if(!validateForm.form()) {
|
||||||
@@ -51,42 +74,61 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if("${specificServiceCfg.parentType}"){
|
//if("${specificServiceCfg.parentType}"){
|
||||||
$("[name=cfgType]").each(function(){
|
// $("[name=cfgType]").each(function(){
|
||||||
$(this).attr("parent-type","${specificServiceCfg.parentType}");
|
// $(this).attr("parent-type","${specificServiceCfg.parentType}");
|
||||||
|
// });
|
||||||
|
//}
|
||||||
|
if(!$("[name='cfgType']").val()){
|
||||||
|
$("[name='cfgType']").val(1);
|
||||||
|
$(".cfgType").each(function(){
|
||||||
|
if($(this).attr("cfgType")!=1){
|
||||||
|
$(this).addClass("hidden");
|
||||||
|
$(this).find("[name='parent.specServiceId']").removeAttr("name");
|
||||||
|
$(this).find("[name='parent.specServiceName']").removeAttr("name");
|
||||||
|
}
|
||||||
|
if($(this).attr("cfgType")==3){
|
||||||
|
$(this).find("input").unbind("click");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$(".cfgType").each(function(){
|
||||||
|
if($(this).attr("cfgType")!=$("[name='cfgType']").val()){
|
||||||
|
$(this).addClass("hidden");
|
||||||
|
$(this).find("[name='parent.specServiceId']").removeAttr("name");
|
||||||
|
$(this).find("[name='parent.specServiceName']").removeAttr("name");
|
||||||
|
}
|
||||||
|
if($(this).attr("cfgType")==3){
|
||||||
|
$(this).find("input").unbind("click");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$("#specificServiceCfgId").on("change",function(){
|
$(".tabs-left li").on("click",function(){
|
||||||
var data=$(this).attr("cfgtype");
|
var cfgType=$(this).attr("cfgType");
|
||||||
if(data!=0){
|
$("[name=cfgType]").val(cfgType);
|
||||||
$("[name=cfgType]").each(function(){
|
$(".cfgType").each(function(){
|
||||||
$(this).attr("parent-type",data);
|
if($(this).attr("cfgType")==cfgType){
|
||||||
if($(this).val()==data){
|
$(this).removeClass("hidden");
|
||||||
$(this).click();
|
$("#specificServiceCfg"+cfgType+"Id").attr("name","parent.specServiceId");
|
||||||
}
|
}else{
|
||||||
})
|
$(this).addClass("hidden").addClass("disable");
|
||||||
|
$(this).find("[name='parent.specServiceId']").removeAttr("name");
|
||||||
}
|
$(this).find("[name='parent.specServiceName']").removeAttr("name");
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
|
||||||
<div class="theme-panel hidden-xs hidden-sm">
|
<div class="theme-panel hidden-xs hidden-sm">
|
||||||
|
|
||||||
<button type="button" class="btn btn-default" onclick="history.go(-1)"><spring:message code="back"/></button>
|
<button type="button" class="btn btn-default" onclick="history.go(-1)"><spring:message code="back"/></button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<h3 class="page-title">
|
<h3 class="page-title">
|
||||||
<spring:message code="specific_service_cfg"/>
|
<spring:message code="specific_service_cfg"/>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="portlet box blue">
|
<div class="portlet box blue">
|
||||||
@@ -100,87 +142,105 @@
|
|||||||
<a href="javascript:;" class="remove"> </a> -->
|
<a href="javascript:;" class="remove"> </a> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="portlet-body form">
|
<div class="portlet-body form">
|
||||||
|
|
||||||
|
|
||||||
<div class="form-body">
|
|
||||||
|
|
||||||
<!-- BEGIN FORM-->
|
<!-- BEGIN FORM-->
|
||||||
<form:form id="inputForm" modelAttribute="specificServiceCfg" action="${ctx}/specific/specificServiceCfg/saveOrUpdate" method="post" class="form-horizontal">
|
<form:form id="inputForm" modelAttribute="specificServiceCfg" action="${ctx}/specific/specificServiceCfg/saveOrUpdate" method="post" class="form-horizontal">
|
||||||
<input name="specServiceId" type="hidden" value="${specificServiceCfg.specServiceId}"/>
|
<input name="specServiceId" type="hidden" value="${specificServiceCfg.specServiceId}"/>
|
||||||
|
<input name="cfgType" type="hidden" value="${specificServiceCfg.cfgType}"/>
|
||||||
<form:hidden path="isValid" class="form-control"/>
|
<form:hidden path="isValid" class="form-control"/>
|
||||||
<sys:message content="${message}"/>
|
<div class="form-body">
|
||||||
<div class="form-group">
|
<div class="portlet-body flip-scroll">
|
||||||
<label class="col-md-3 control-label"><spring:message code="superior_config"/>:</label>
|
<div class="row-fluid">
|
||||||
<div class="col-md-4">
|
<div class="span12">
|
||||||
<c:set var="fatherName"><spring:message code="root_node"/></c:set>
|
<div class="tabbable tabbable-custom tabs-left">
|
||||||
<sys:treeselect id="specificServiceCfg" name="parent.specServiceId" value="${specificServiceCfg.parent.specServiceId}" labelName="parent.specServiceName" labelValue="${specificServiceCfg.parent.specServiceId eq '0'?fatherName:fns:getBySpecServiceId(specificServiceCfg.parent.specServiceId).specServiceName}"
|
<ul class="nav nav-tabs tabs-left">
|
||||||
title="" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=0" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
|
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||||
</div>
|
<li class="<c:if test="${(specificServiceCfg.specServiceId ==null and dict.itemCode==1) or specificServiceCfg.cfgType eq dict.itemCode}">active</c:if>" cfgType="${dict.itemCode}" >
|
||||||
</div>
|
<a data-toggle="tab" href="#">
|
||||||
<div class="form-group">
|
<spring:message code="${dict.itemValue}"/>
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="protocol_code"/>:</label>
|
</a>
|
||||||
<div class="col-md-4">
|
</li>
|
||||||
<input id="specServiceCode" name="specServiceCode" maxlength="50" range="[0,2147483647]" class="form-control required digits" value="${specificServiceCfg.specServiceCode}"/>
|
</c:forEach>
|
||||||
</div>
|
</ul>
|
||||||
</div>
|
<div class="tab-content">
|
||||||
<div class="form-group">
|
<c:set var="fatherName"><spring:message code="root_node"/></c:set>
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="protocol_name"/>:</label>
|
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||||
<div class="col-md-4">
|
<div class="form-group cfgType" cfgType="${dict.itemCode}">
|
||||||
<form:input path="specServiceName" htmlEscape="false" maxlength="64" class="form-control required noBlankSpace"/>
|
<label class="col-md-3 control-label"><spring:message code="superior_config"/>:</label>
|
||||||
</div>
|
<div class="col-md-4">
|
||||||
</div>
|
<c:if test="${empty specificServiceCfg.specServiceId}">
|
||||||
<div class="form-group">
|
<sys:treeselect id="${'specificServiceCfg'.concat(dict.itemCode)}" name="parent.specServiceId" value="${specificServiceCfg.parent.specServiceId}" labelName="parent.specServiceName" labelValue="${fatherName}"
|
||||||
<label class="col-md-3 control-label hidden"><spring:message code="group_id"/>:</label>
|
title="" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${dict.itemCode}" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
|
||||||
<div class="col-md-4">
|
</c:if>
|
||||||
<form:input path="groupId" htmlEscape="false" maxlength="50" range="[0,2147483647]" class="form-control digits hidden" placeholder="0"/>
|
<c:if test="${not empty specificServiceCfg.specServiceId}">
|
||||||
</div>
|
<sys:treeselect id="${'specificServiceCfg'.concat(dict.itemCode)}" name="parent.specServiceId" value="${specificServiceCfg.cfgType eq dict.itemCode?specificServiceCfg.parent.specServiceId:0}" labelName="parent.specServiceName" labelValue="${(specificServiceCfg.cfgType eq dict.itemCode and specificServiceCfg.parent.specServiceId ne '0')?fns:getBySpecServiceId(specificServiceCfg.parent.specServiceId).specServiceName:fatherName}"
|
||||||
</div>
|
title="" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${dict.itemCode}" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
|
||||||
<%-- <div class="form-group">
|
</c:if>
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
|
</div>
|
||||||
<div class="col-md-4">
|
</div>
|
||||||
<form:select path="isLeaf" class="form-control leafChange">
|
</c:forEach>
|
||||||
<c:forEach items="${fns:getDictList('INT_YES_NO')}" var="dict">
|
<div class="form-group">
|
||||||
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
|
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="protocol_code"/>:</label>
|
||||||
</c:forEach>
|
<div class="col-md-4">
|
||||||
</form:select>
|
<input id="specServiceCode" name="specServiceCode" maxlength="50" range="[0,2147483647]" class="form-control required digits specServiceCodeCheck" value="${specificServiceCfg.specServiceCode}" ctx="${ctx}"/>
|
||||||
</div>
|
</div>
|
||||||
</div> --%>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="cfg_type"/>:</label>
|
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="protocol_name"/>:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
<form:input path="specServiceName" htmlEscape="false" maxlength="64" class="form-control required noBlankSpace"/>
|
||||||
<label class="radio-inline"><form:radiobutton path="cfgType" class="required checkParent" value="${dict.itemCode}"/><spring:message code="${dict.itemValue}"/></label>
|
</div>
|
||||||
</c:forEach>
|
</div>
|
||||||
</div>
|
<div class="form-group">
|
||||||
</div>
|
<label class="col-md-3 control-label hidden"><spring:message code="group_id"/>:</label>
|
||||||
<div class="form-group">
|
<div class="col-md-4">
|
||||||
<label class="col-md-3 control-label"><spring:message code="protocol_desc"/>:</label>
|
<form:input path="groupId" htmlEscape="false" maxlength="50" range="[0,2147483647]" class="form-control digits hidden" placeholder="0"/>
|
||||||
<div class="col-md-4">
|
</div>
|
||||||
<form:textarea path="specServiceDesc" htmlEscape="false" maxlength="64" class="form-control"/>
|
</div>
|
||||||
</div>
|
<%-- <div class="form-group">
|
||||||
</div>
|
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
|
||||||
<div class="form-actions">
|
<div class="col-md-4">
|
||||||
<div class="row">
|
<form:select path="isLeaf" class="form-control leafChange">
|
||||||
<div class="col-md-offset-3 col-md-9">
|
<c:forEach items="${fns:getDictList('INT_YES_NO')}" var="dict">
|
||||||
<shiro:hasPermission name="specific:service:edit"><button type="submit" class="btn btn-circle blue"><spring:message code="submit"/></button></shiro:hasPermission>
|
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
|
||||||
<button type="button" class="btn btn-circle grey-salsa btn-outline" onclick="history.go(-1)"><spring:message code="cancel"/></button>
|
</c:forEach>
|
||||||
|
</form:select>
|
||||||
|
</div>
|
||||||
|
</div> --%>
|
||||||
|
<%-- <div class="form-group">
|
||||||
|
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="cfg_type"/>:</label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||||
|
<label class="radio-inline"><form:radiobutton path="cfgType" class="required checkParent" value="${dict.itemCode}"/><spring:message code="${dict.itemValue}"/></label>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
</div> --%>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-3 control-label"><spring:message code="protocol_desc"/>:</label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<form:textarea path="specServiceDesc" htmlEscape="false" maxlength="64" class="form-control"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-actions">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-offset-3 col-md-9">
|
||||||
|
<shiro:hasPermission name="specific:service:edit"><button type="submit" class="btn btn-circle blue"><spring:message code="submit"/></button></shiro:hasPermission>
|
||||||
|
<button type="button" class="btn btn-circle grey-salsa btn-outline" onclick="history.go(-1)"><spring:message code="cancel"/></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form:form>
|
</form:form>
|
||||||
<!-- END FORM-->
|
<!-- END FORM-->
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -606,7 +606,7 @@
|
|||||||
var lang = navigator.userLanguage;//支持IE
|
var lang = navigator.userLanguage;//支持IE
|
||||||
}*/
|
}*/
|
||||||
var arrCookie = document.cookie.toLowerCase().split(";");
|
var arrCookie = document.cookie.toLowerCase().split(";");
|
||||||
console.log(document.cookie);
|
//console.log(document.cookie);
|
||||||
for(i=0;i<arrCookie.length;i++){
|
for(i=0;i<arrCookie.length;i++){
|
||||||
var key=arrCookie[i].split("=")[0];
|
var key=arrCookie[i].split("=")[0];
|
||||||
var value=arrCookie[i].split("=")[1];
|
var value=arrCookie[i].split("=")[1];
|
||||||
|
|||||||
@@ -601,6 +601,30 @@ jQuery.validator.addMethod("checkParent",function(value, element) {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
jQuery.validator.addMethod("specServiceCodeCheck",function(value, element) {
|
||||||
|
var ctx=$(element).attr("ctx");
|
||||||
|
var parentId= $("[name='parent.specServiceId']").val();
|
||||||
|
var specServiceCode= $("#specServiceCode").val();
|
||||||
|
var cfgType= $("[name='cfgType']").val();
|
||||||
|
var specServiceId= $("[name='specServiceId']").val();
|
||||||
|
var url=ctx+"/specific/specificServiceCfg/isCodeNotRepeat";
|
||||||
|
var val=true;
|
||||||
|
$.ajax({
|
||||||
|
url:url,
|
||||||
|
type:"post",
|
||||||
|
async:false,
|
||||||
|
data:{
|
||||||
|
parentId:parentId,
|
||||||
|
specServiceCode:specServiceCode,
|
||||||
|
cfgType:cfgType,
|
||||||
|
specServiceId:specServiceId
|
||||||
|
},
|
||||||
|
success:function(data){
|
||||||
|
val=data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return val;
|
||||||
|
});
|
||||||
//ip v4转数字
|
//ip v4转数字
|
||||||
var ipToNumber=function (ip){
|
var ipToNumber=function (ip){
|
||||||
var num =0;
|
var num =0;
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
timeout:"timeout",
|
timeout:"timeout",
|
||||||
areaIpPrefix:"Forbiden value: ",
|
areaIpPrefix:"Forbiden value: ",
|
||||||
domainCheck:"Please enter a valid domain.",
|
domainCheck:"Please enter a valid domain.",
|
||||||
checkParent:"Configuration Type must match it's parent."
|
checkParent:"Configuration Type must match it's parent.",
|
||||||
|
specServiceCodeCheck:"Protocol No is repeat."
|
||||||
});
|
});
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
timeout:"timeout",
|
timeout:"timeout",
|
||||||
areaIpPrefix:"Forbiden value: ",
|
areaIpPrefix:"Forbiden value: ",
|
||||||
domainCheck:"Please enter a valid domain.",
|
domainCheck:"Please enter a valid domain.",
|
||||||
checkParent:"Configuration Type must match it's parent."
|
checkParent:"Configuration Type must match it's parent.",
|
||||||
|
specServiceCodeCheck:"Protocol No is repeat."
|
||||||
});
|
});
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
@@ -59,6 +59,7 @@
|
|||||||
timeout:"超时",
|
timeout:"超时",
|
||||||
areaIpPrefix:"禁止使用的值: ",
|
areaIpPrefix:"禁止使用的值: ",
|
||||||
domainCheck:"请输入有效的域名",
|
domainCheck:"请输入有效的域名",
|
||||||
checkParent:"配置类型必须与上级配置一致!"
|
checkParent:"配置类型必须与上级配置一致!",
|
||||||
|
specServiceCodeCheck:"协议号重复"
|
||||||
});
|
});
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|||||||
Reference in New Issue
Block a user