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/sysDictForm.jsp

168 lines
6.2 KiB
Plaintext
Raw Normal View History

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/pages/css/dictInfo.css" />
<title>生效范围配置管理</title>
<script type="text/javascript">
$(document).ready(function() {
jQuery.validator.addMethod("codeNumber",function(value,element){
return value>=0&value<=20000000},"请填写正确的数值");
$("#name").focus();
$("#inputForm").validate({
//需验证 item_code item_value
rules: {
'itemCode':{
required:true,
digits:true,
codeNumber:true
},
'itemValue':{
required:true
}
},
messages: {
'itemCode':{
required:'编码必须填写',
digits:'请填写整数值',
codeNumber:'请填写合适的数值0~200000000'
},
'itemValue':{
required:'编码对应值必须填写'
}
},
submitHandler: function(form){
loading('正在提交,请稍等...');
form.submit();
},
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
});
</script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="history.go(-1)">返回</button>
</div>
<h3 class="page-title">
生效范围配置管理
</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>分类性质配置<shiro:hasPermission name="sys:menu:edit">${not empty sysDictInfo.sysDictId?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:menu:edit">查看</shiro:lacksPermission></div>
<div class="tools">
<!-- <a href="javascript:;" class="collapse"> </a>
<a href="#portlet-config" data-toggle="modal" class="config"> </a>
<a href="javascript:;" class="reload"> </a>
<a href="javascript:;" class="remove"> </a> -->
</div>
</div>
<div class="portlet-body form">
<div class="form-body">
<!-- BEGIN FORM-->
<form:form id="inputForm" modelAttribute="sysDictInfo" action="${ctx}/configuration/sysDictInfo/saveOrUpdate" method="post" class="form-horizontal">
<form:hidden path="sysDictId"/>
<sys:message content="${message}"/>
<div class="form-group">
<label class="col-md-3 control-label">上级配置:</label>
<%-- <div class="col-md-4">
<sys:treeselect id="serviceDictInfo" name="parent.id" value="${serviceDictInfo.parent.serviceDictId}" labelName="serviceDictInfo.parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue}"
title="父级字典" url="/configuration/serviceDictInfo/treeData" extId="${serviceDictInfo.id}" cssClass="required form-control"/>
</div> --%>
<div class="col-md-4">
<%-- <form:input path="parent.serviceDictId" htmlEscape="false" maxlength="50" class="form-control" disabled="disabled" readonly="readonly"/> --%>
<form:input path="parent.sysDictId" htmlEscape="false" maxlength="50" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> 数据类型:</label>
<div class="col-md-4">
<select id="itemType" name="itemType" class="form-control">
<c:forEach items="${fns:getDictList('SYS_DICT_ITM_TYPE')}" var="dict">
<c:if test="${dict.itemCode eq sysDictInfo.itemType}">
<option value="${sysDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
</c:if>
<c:if test="${dict.itemCode ne sysDictInfo.itemType}">
<option value="${dict.itemCode}">${dict.itemValue}</option>
</c:if>
</c:forEach>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>编码:</label>
<div class="col-md-4">
<form:input path="itemCode" htmlEscape="false" maxlength="50" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>编码对应值:</label>
<div class="col-md-4">
<form:input path="itemValue" htmlEscape="false" maxlength="2000" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>是否叶子节点:</label>
<div class="col-md-4">
<%-- <form:radiobuttons path="isLeaf" items="${fns:getDictOption('SYS_YES_NO')}" /> --%>
<form:select path="isLeaf" class="form-control">
<form:options items="${fns:getDictList('SYS_YES_NO')}" itemLabel="itemValue" itemValue="itemCode" htmlEscape="false"/>
</form:select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">描述信息:</label>
<div class="col-md-4">
<form:textarea path="itemDesc" htmlEscape="false" maxlength="2000" class="form-control"/>
</div>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-offset-3 col-md-9">
<shiro:hasPermission name="sys:menu:edit"><button type="submit" class="btn btn-circle blue">保存</button></shiro:hasPermission>
<button type="button" class="btn btn-circle grey-salsa btn-outline" onclick="history.go(-1)">Cancel</button>
</div>
</div>
</div>
</form:form>
<!-- END FORM-->
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>