Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/efficiency/constituteConfigureAdd.jsp
2026-01-16 14:13:44 +08:00

109 lines
4.3 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
var showMenu4SelectFun = function() {
$.post(ext.contextPath + '/efficiency/constituteConfigure/showTree4Select.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
$("#menu4SelectDiv").html(data);
openModal("menu4SelectModal")
});
};
function dosave() {
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/efficiency/constituteConfigure/dosave.do", $("#subForm").serialize(), function (result) {
if (result.code == 1) {
initTreeView();
//showAlert('s','保存成功');
} else {
showAlert('d', '保存失败');
}
},'json');
}
}
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
name: {
validators: {
notEmpty: {
message: '名称不能为空'
}
}
},
morder: {
validators: {
notEmpty: {
message: '顺序不能为空'
},
regexp: {
regexp: /^[0-9]*$/,
message: '顺序必须为数字'
}
}
}
}
});
</script>
<div class="box box-primary" >
<div class="box-header with-border">
<h3 class="box-title">新增</h3>
<div class="box-tools pull-right">
<a onclick="dosave()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i class="glyphicon glyphicon-floppy-disk"></i></a>
</div>
</div>
<!-- /.box-header -->
<div class="box-body ">
<form class="form-horizontal " id="subForm">
<input id="unitid" name="unitid" type="hidden" value="${param.unitId}"/>
<input id="schemeId" name="schemeId" type="hidden" value="${param.schemeId}"/>
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<div id="menu4SelectDiv"></div>
<div class="form-group">
<label class="col-sm-2 control-label">名称</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="name" name ="name" placeholder="名称" value="${constituteConfigure.name }">
</div>
<label class="col-sm-2 control-label">上级菜单</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="pname" name ="pname" placeholder="上级菜单" onclick="showMenu4SelectFun()" value="${pname}" readonly>
<input id="pid" name="pid" type="hidden" value="${param.pid}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">单位</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="unit" name ="unit" placeholder="单位" >
</div>
<label class="col-sm-2 control-label">排序</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="morder" name ="morder" placeholder="排序" value="0">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">备注</label>
<div class="col-sm-10">
<textarea class="form-control" rows="3" id ="remark" name ="remark" placeholder="请输入">${constituteConfigure.remark}</textarea>
</div>
</div>
</form>
</div>
</div>