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

149 lines
6.8 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"%>
<%@page import="com.sipai.entity.report.RptInfoSet" %>
<%request.setAttribute("TYPE_CATALOGUE", RptInfoSet.TYPE_CATALOGUE);%>
<%request.setAttribute("TYPE_SETTING", RptInfoSet.TYPE_SETTING);%>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js" charset="utf-8"></script>
<script type="text/javascript">
function dosave() {
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/report/rptDeptSet/dosave.do", $("#subForm").serialize(), function(result) {
var data= $.parseJSON(result);
if (data.code == 1) {
initTreeView();
}else{
showAlert('d',data.result);
}
});
}
}
//弹出目录
var showTree4SelectFun = function () {
$.post(ext.contextPath + '/report/rptDeptSet/showTree4Select.do', {
formId: "subForm",
hiddenId: "pid",
textId: "pname",
type: "${TYPE_CATALOGUE}"
}, function (data) {
$("#menu4SelectDiv").html(data);
openModal("menu4SelectModal")
});
};
var showUser4SelectsFun = function() {
var userIds= $("#inputuser").val();
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"inputuser",textId:"auditMan",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
name: {
validators: {
notEmpty: {
message: '名称不能为空'
}
}
},
dateType: {
validators: {
notEmpty: {
message: '填报类型不能为空'
}
}
}
}
});
$(function() {
$.post(ext.contextPath + "/report/rptDeptSet/getDateType4Select.do", {}, function(data) {
var selelct =$("#dateType").select2({
data: data,
placeholder:'请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据大于10个启用搜索框
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct.val('${param.rptTypeStatic}').trigger("change");
},'json');
$("#unitId").val(unitId);
});
</script>
<div class="box box-primary" style="margin-bottom:0px;">
<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 ">
<div id="user4SelectDiv"></div>
<form class="form-horizontal " id="subForm">
<input id="id" name="id" type="hidden" value="${id}"/>
<input id="unitId" name="unitId" type="hidden" value="${param.unitId}"/>
<input id="type" name="type" type="hidden" value="${param.type}"/>
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv1"></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="${rptDeptSet.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="showTree4SelectFun()" 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">
<select class="form-control select2 " id="dateType" name ="dateType"></select>
</div>
<label class="col-sm-2 control-label">顺序</label>
<div class="col-sm-4">
<input type="number" class="form-control" id="morder" name="morder" placeholder="顺序"
value="${morder }" autocomplete="off">
</div>
</div>
<!-- <label class="col-sm-2 control-label">提醒时间/分钟</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="remindTime" name ="remindTime" placeholder="请填写分钟数 (正整数)" value="${rptDeptSet.remindTime}">
</div> -->
</div>
<!-- <div class="form-group">
<label class="col-sm-2 control-label">填报人员</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="auditMan" name ="auditMan" placeholder="点击选择" onclick="showUser4SelectsFun();" value="${auditMan}">
<input id="inputuser" name="inputuser" type="hidden" value="${rptDeptSet.inputuser}" />
</div>
</div> -->
</form>
</div>
</div>