Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/report/rptCreateTree.jsp

207 lines
7.8 KiB
Plaintext
Raw Normal View History

2026-01-16 14:13:44 +08:00
<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page import="com.sipai.entity.base.ServerObject" %>
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<title>
<%= ServerObject.atttable.get("TOPTITLE")%>
</title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<%--<jsp:include page="/jsp/frameset.jsp"></jsp:include>--%>
<!-- 文件上传-->
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
<script type="text/javascript"
src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js"
charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js"
charset="utf-8"></script>
<script src="<%=request.getContextPath()%>/JS/activiti/workflow.js" type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
<%-- 引入CSS --%>
<link rel="stylesheet" href="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.css" type="text/css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/style-activiti.css" type="text/css">
<!-- 引入daterangepicker-->
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
charset="utf-8"></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
charset="utf-8"></script>
<style type="text/css">
/*.buttonDiv {
float: left;
}*/
</style>
<script type="text/javascript">
var unitId = "";
$(function () {
if ("${param.urlUnitId}" != '' && "${param.urlUnitId}".length > 0) {
unitId = "${param.urlUnitId}";
} else {
unitId = unitId;
}
treeViewGenerate();
});
var choiceGenerateFun = function (id, unitId, rpttype, text) {
var minViewMode = 0;
var format = 'yyyy-mm-dd';
if (rpttype == 'sp_report_mth_01') {
var minViewMode = 1;
var format = 'yyyy-mm';
} else if (rpttype == 'sp_report_qua_01') {
var minViewMode = 2;
var format = 'yyyy-mm';
} else if (rpttype == 'sp_report_halfYear_01') {
var minViewMode = 1;
var format = 'yyyy-mm';
} else if (rpttype == 'sp_report_year_01') {
var minViewMode = 3;
var format = 'yyyy';
}
$.post(ext.contextPath + '/report/rptCreate/showList4Generate.do', {
classId: id,
unitId: unitId,
rpttype: rpttype,
text: text,
minViewMode: minViewMode,
format: format
}, function (data) {
$("#right_div").html(data);
});
};
var choiceCheckFun = function (id, unitId, text) {
$.post(ext.contextPath + '/report/rptCreate/showList4Check.do', {
classId: id,
unitId: unitId,
text: text
}, function (data) {
$("#right_div").html(data);
});
};
//获取报表生成tree
var treeViewGenerate = function () {
$.post(ext.contextPath + '/report/rptInfoSet/getTree4Generate.do', {unitId: unitId}, function (data) {
$('#tree').treeview({
data: data,
levels: 3
});
$('#tree').on('nodeSelected', function (event, data) {
choiceGenerateFun(data.id, data.unitId, data.rpttype, data.text);
});
}, 'json');
$("#right_div").html("");
};
//获取报表审核tree
var treeViewCheck = function () {
$.post(ext.contextPath + '/report/rptInfoSet/getTree4Check.do', {unitId: unitId}, function (data) {
// console.log(data);
$('#tree').treeview({
data: data,
showTags: true,//显示徽章
levels: 3
});
$('#tree').on('nodeSelected', function (event, data) {
choiceCheckFun(data.id, data.unitId, data.text);
});
}, 'json');
$("#right_div").html("");
};
//选择报表生成
function choiceGenerate() {
document.getElementById('button1').className = 'btn btn-primary btn-sm';
document.getElementById('button2').className = 'btn btn-default btn-sm';
treeViewGenerate();
}
//选择报表审核
function choiceCheck() {
document.getElementById('button1').className = 'btn btn-default btn-sm';
document.getElementById('button2').className = 'btn btn-primary btn-sm';
treeViewCheck();
}
</script>
</head>
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
<div class="wrapper">
<div class="content-wrapper">
<section class="content-header">
<div class="btn-group" style="width: 100%;">
<button type="button" id="button1" class="btn btn-primary btn-sm" onclick="choiceGenerate();"><i
class="fa fa-file-text-o"></i>
报表生成
</button>
<button type="button" id="button2" class="btn btn-default btn-sm" onclick="choiceCheck();"><i
class="fa fa-check-square"></i>
报表审核
</button>
</div>
</section>
<section class="content container-fluid" style="padding-top:2px;">
<div id="mainAlertdiv"></div>
<div id="subDiv"></div>
<div id="user4SelectDiv"></div>
<div class="row">
<div class="col-md-3">
<div class="box box-solid">
<div class="box-header with-border">
<h3 class="box-title">报表类别</h3>
<div class="box-tools" id="addDiv" style="display:none">
</div>
</div>
<div class="box-body no-padding">
<div id="tree" style="height:700px;overflow:auto; "></div>
</div>
</div>
</div>
<div class="col-md-9" id="right_div"></div>
</div>
<%--<div id="viewFile" style="display:none;height:900px;">
<!-- sheet列表 -->
<div id="viewFile_top" style="width:100%;height:5%;float:left;">
</div>
<!-- 报表内容 -->
<div id="viewFile_bottom" style="width:20000px;height:95%;float:left;" @contextmenu.prevent></div>
</div>
<!-- 修订记录 -->
<div id="viewHis" style="display:none;height:300px;">
<table id="tableLog" style="table-layout:fixed;">
</table>
</div>--%>
</section>
</div>
</div>
</body>
</html>