165 lines
6.4 KiB
Plaintext
165 lines
6.4 KiB
Plaintext
|
|
<%@ 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 showDocument4SelectFun = function() {
|
|||
|
|
$.post(ext.contextPath + '/document/showDocumentList4Select.do', {formId:"subForm",hiddenId:"pid",textId:"pname",doctype:"${param.doctype}",companyId:'${param.companyId}',rootID:'${param.rootID}'} , function(data) {
|
|||
|
|
$("#doc4SelectDiv").html(data);
|
|||
|
|
openModal('doc4SelectModal');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
function doupdate() {
|
|||
|
|
$("#subForm").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|||
|
|
$.post(ext.contextPath + '/document/doupdate.do', $("#subForm").serialize(), function(result) {
|
|||
|
|
if (result == 1) {
|
|||
|
|
initFun();
|
|||
|
|
}else{
|
|||
|
|
showAlert('d','保存失败');
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function dodel() {
|
|||
|
|
if('${data.id}'!='${param.rootID}'){
|
|||
|
|
swal({
|
|||
|
|
text: "您确定要删除此记录?",
|
|||
|
|
dangerMode: true,
|
|||
|
|
buttons: {
|
|||
|
|
cancel: {
|
|||
|
|
text: "取消",
|
|||
|
|
value: null,
|
|||
|
|
visible: true,
|
|||
|
|
className: "btn btn-default btn-sm",
|
|||
|
|
closeModal: true,
|
|||
|
|
},
|
|||
|
|
confirm: {
|
|||
|
|
text: "确定",
|
|||
|
|
value: true,
|
|||
|
|
visible: true,
|
|||
|
|
className: "btn btn-danger btn-sm",
|
|||
|
|
closeModal: true
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
.then(function(willDelete) {
|
|||
|
|
if (willDelete) {
|
|||
|
|
$.post(ext.contextPath + '/document/dodel.do', $("#subForm").serialize(), function(data) {
|
|||
|
|
if(data.res>0){
|
|||
|
|
initFun();
|
|||
|
|
}else{
|
|||
|
|
showAlert('d','删除失败');
|
|||
|
|
}
|
|||
|
|
},'json');
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}else{
|
|||
|
|
showAlert('d','根节点无法删除');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//输入框验证
|
|||
|
|
$("#subForm").bootstrapValidator({
|
|||
|
|
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
|||
|
|
fields: {
|
|||
|
|
docname: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '名称不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
number: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
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="doupdate()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i class="glyphicon glyphicon-floppy-disk"></i></a>
|
|||
|
|
<a onclick="dodel()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-trash"></i></a>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.box-header -->
|
|||
|
|
<div class="box-body ">
|
|||
|
|
<form class="form-horizontal " id="subForm">
|
|||
|
|
<input id="id" name="id" type="hidden" value="${data.id}"/>
|
|||
|
|
<input id="bizId" name="bizId" type="hidden" value="${data.bizId}"/>
|
|||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
<div id="fault4SelectDiv"></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="docname" name ="docname" placeholder="名称" value="${data.docname }">
|
|||
|
|
</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="showDocument4SelectFun();" value="${data.pname}">
|
|||
|
|
<input id="pid" name="pid" type="hidden" value="${data.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="number" name ="number" placeholder="编号" value="${data.number}">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">启用</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<select id ="st" name="st" class="form-control select2">
|
|||
|
|
<option value="1" >启用</option>
|
|||
|
|
<option value="0" >禁用</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">简要说明</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<textarea class="form-control " id="details" name="details" rows="2">${data.details}</textarea>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</form>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<%-- <div class="box box-primary" >
|
|||
|
|
<div class="box-header with-border">
|
|||
|
|
<h3 class="box-title">${param.text}</h3>
|
|||
|
|
<div class="box-tools pull-right">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.box-header -->
|
|||
|
|
<div class="box-body ">
|
|||
|
|
<div >
|
|||
|
|
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
|||
|
|
<button type="button" class="btn btn-default" onclick="fileinput();"><i class="fa fa-plus"></i>上传文件</button>
|
|||
|
|
<!-- <button type="button" class="btn btn-default" onclick="delDocFun();"><i class="fa fa-trash"></i> 删除</button> -->
|
|||
|
|
</div>
|
|||
|
|
<div class="input-group input-group-sm pull-right" style="width:250px" >
|
|||
|
|
<input type="text" id="search_fileName" name="search_fileName" autocomplete="off" style="height:35px" class="form-control pull-right" placeholder="资料名称...">
|
|||
|
|
<div class="input-group-btn">
|
|||
|
|
<button class="btn btn-default" style="height:35px" onclick="dosearchFile();"><i class="fa fa-search"></i></button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<table id="fileTable"></table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div> --%>
|