first commit
This commit is contained in:
158
WebRoot/jsp/accident/accidentAdd.jsp
Normal file
158
WebRoot/jsp/accident/accidentAdd.jsp
Normal file
@ -0,0 +1,158 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
|
||||
<%request.setAttribute("Wait", MaintenanceDetail.Status_Wait); %>
|
||||
<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">
|
||||
function dosave() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('happenDate', 'NOT_VALIDATED',null)
|
||||
.validateField('happenDate');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('accidentTypeName', 'NOT_VALIDATED',null)
|
||||
.validateField('accidentTypeName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/accident/accident/dosave.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
happenDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
happenPlace: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '地点不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
accidentTypeName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '事故分类不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
emergencyPlanTrue: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '是否响应应急预案不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
$(function(){
|
||||
|
||||
$("#emergencyPlanTrue").select2({ minimumResultsForSearch: 10 }).val("0").trigger("change");
|
||||
|
||||
$("#happenDate").datetimepicker({
|
||||
// startDate: date,
|
||||
language:'zh-CN',
|
||||
format: 'yyyy-mm-dd',
|
||||
startView: "month", //初始化视图是‘年’
|
||||
minView: 2,
|
||||
maxView: "year",
|
||||
autoclose: true
|
||||
// todayBtn: "linked"
|
||||
});
|
||||
});
|
||||
|
||||
//选择设备,根据厂区id和工艺段id选择厂内设备,可多选
|
||||
var showEquipment4SelectsFun = function(formId,hiddenId,textId) {
|
||||
$.post(ext.contextPath + '/accident/accidentType/showAccidentType4Select4Use.do', { formId: formId, hiddenId: hiddenId, textId: textId }, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增事故管理</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${accident.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${param.unitId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*日期</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" type="text" id="happenDate" name ="happenDate" value="${accident.happenDate}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*地点</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" type="text" id="happenPlace" name ="happenPlace" value="${accident.happenPlace}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">事故分类</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" id="accidentTypeId" name="accidentTypeId" type="hidden" value="${accident.accidentTypeId}" />
|
||||
<input class="form-control" id="accidentTypeName" name ="accidentTypeName" value="${accident.accidentType.name}" onclick="showEquipment4SelectsFun('subForm','accidentTypeId','accidentTypeName');" placeholder="选择事故分类">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否响应应急预案</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="emergencyPlanTrue" name="emergencyPlanTrue" 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" rows="2" id ="handleResult" name ="handleResult" placeholder="处理结果">${accident.handleResult}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
311
WebRoot/jsp/accident/accidentBrowse.jsp
Normal file
311
WebRoot/jsp/accident/accidentBrowse.jsp
Normal file
@ -0,0 +1,311 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%request.setAttribute("Finish", MaintenanceDetail.Status_Finish); %>
|
||||
<%request.setAttribute("Start", MaintenanceDetail.Status_Start); %>
|
||||
<%request.setAttribute("Wait", MaintenanceDetail.Status_Wait); %>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
.table-hover>tbody>tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/accident/accident/doadd.do', {unitId:unitId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/accident/accident/doedit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/accident/accident/doview.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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 + '/accident/accident/dodelete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/accident/accident/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
var companyId = unitId;
|
||||
$(function() {
|
||||
companyId = unitId;
|
||||
initFun();
|
||||
});
|
||||
var initFun = function(){
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/accident/accident/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: unitId,
|
||||
// pSectionId: $("#processSection").val(),
|
||||
// statusSelect:$("#statusSelect").val(),
|
||||
}
|
||||
},
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
},
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
// {
|
||||
// checkbox: true, // 显示一个勾选框
|
||||
// },
|
||||
{
|
||||
field: 'happenDate', // 返回json数据中的name
|
||||
title: '日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
return value.substring(0,10);
|
||||
}
|
||||
},{
|
||||
field: 'happenPlace', // 返回json数据中的name
|
||||
title: '地点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'accidentType.name', // 返回json数据中的name
|
||||
title: '事故分类', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '上报时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
return value.substring(0,19);
|
||||
}
|
||||
},{
|
||||
field: 'user.caption', // 返回json数据中的name
|
||||
title: '上报人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}
|
||||
// ,{
|
||||
// title: "操作",
|
||||
// align: 'center',
|
||||
// valign: 'middle',
|
||||
// width: 120, // 定义列的宽度,单位为像素px
|
||||
// formatter: function (value, row, index) {
|
||||
// var buts="";
|
||||
|
||||
// buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
// buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
// buts='<div class="btn-group" >'+buts+'</div>';
|
||||
// return buts;
|
||||
// }
|
||||
// }
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv" style="width: 220px;height:10px;"></div>
|
||||
<div id="subDivAbnorm"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="library4SelectDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div >
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
|
||||
</div>
|
||||
<div class="form-group form-inline" style="padding:0;">
|
||||
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
|
||||
<!-- <security:authorize buttonUrl="maintenance/abnormity/add.do"> -->
|
||||
<!-- <button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
|
||||
<!--
|
||||
<button type="button" class="btn btn-default btn-sm" title="异常中有设备的生成维修,没设备的生成缺陷" onclick="createDefectFun();"><i class="fa fa-send-o"></i>生成缺陷或维修单</button> -->
|
||||
<!-- </security:authorize> -->
|
||||
</div>
|
||||
<!--
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="form-group">
|
||||
<label class="form-label">工艺段:</label>
|
||||
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 160px;"></select>
|
||||
<label class="form-label">状态:</label>
|
||||
<select class="form-control select2 " id="statusSelect" name ="statusSelect" style="width: 160px;">
|
||||
<option value= "${Wait}">待处理</option>
|
||||
<option value= "${Start}">处理中</option>
|
||||
<option value= "${Finish}">已完成</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- bootstrap switch -->
|
||||
<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>
|
||||
</html>
|
||||
154
WebRoot/jsp/accident/accidentEdit.jsp
Normal file
154
WebRoot/jsp/accident/accidentEdit.jsp
Normal file
@ -0,0 +1,154 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<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">
|
||||
function doupdate() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('happenDate', 'NOT_VALIDATED',null)
|
||||
.validateField('happenDate');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('accidentTypeName', 'NOT_VALIDATED',null)
|
||||
.validateField('accidentTypeName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/accident/accident/doupdate.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.msg);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
happenDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
happenPlace: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '地点不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
accidentTypeName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '事故分类不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
emergencyPlanTrue: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '是否响应应急预案不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$(function(){
|
||||
|
||||
$("#emergencyPlanTrue").select2({ minimumResultsForSearch: 10 }).val("${accident.emergencyPlanTrue}").trigger("change");
|
||||
|
||||
$("#happenDate").datetimepicker({
|
||||
// startDate: date,
|
||||
language:'zh-CN',
|
||||
format: 'yyyy-mm-dd',
|
||||
startView: "month", //初始化视图是‘年’
|
||||
minView: 2,
|
||||
maxView: "year",
|
||||
autoclose: true
|
||||
// todayBtn: "linked"
|
||||
});
|
||||
})
|
||||
//选择设备,根据厂区id和工艺段id选择厂内设备,可多选
|
||||
var showEquipment4SelectsFun = function(formId,hiddenId,textId) {
|
||||
$.post(ext.contextPath + '/accident/accidentType/showAccidentType4Select4Use.do', { formId: formId, hiddenId: hiddenId, textId: textId }, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑事故管理</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${accident.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${accident.unitId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*日期</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" type="text" id="happenDate" name ="happenDate" value="${accident.happenDate.substring(0,10)}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*地点</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" type="text" id="happenPlace" name ="happenPlace" value="${accident.happenPlace}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">事故分类</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" id="accidentTypeId" name="accidentTypeId" type="hidden" value="${accident.accidentTypeId}" />
|
||||
<input class="form-control" id="accidentTypeName" name ="accidentTypeName" value="${accident.accidentType.name}" onclick="showEquipment4SelectsFun('subForm','accidentTypeId','accidentTypeName');" placeholder="选择事故分类">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否响应应急预案</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="emergencyPlanTrue" name="emergencyPlanTrue" 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" rows="2" id ="handleResult" name ="handleResult" placeholder="处理结果">${accident.handleResult}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
308
WebRoot/jsp/accident/accidentList.jsp
Normal file
308
WebRoot/jsp/accident/accidentList.jsp
Normal file
@ -0,0 +1,308 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%request.setAttribute("Finish", MaintenanceDetail.Status_Finish); %>
|
||||
<%request.setAttribute("Start", MaintenanceDetail.Status_Start); %>
|
||||
<%request.setAttribute("Wait", MaintenanceDetail.Status_Wait); %>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
.table-hover>tbody>tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/accident/accident/doadd.do', {unitId:unitId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/accident/accident/doedit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/accident/accident/doview.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
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 + '/accident/accident/dodelete.do', {id : id}, function(data) {
|
||||
if(data.code=="1"){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/accident/accident/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data.code>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
var companyId = unitId;
|
||||
$(function() {
|
||||
companyId = unitId;
|
||||
initFun();
|
||||
});
|
||||
var initFun = function(){
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/accident/accident/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: unitId,
|
||||
// pSectionId: $("#processSection").val(),
|
||||
// statusSelect:$("#statusSelect").val(),
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'happenDate', // 返回json数据中的name
|
||||
title: '日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
return value.substring(0,10);
|
||||
}
|
||||
},{
|
||||
field: 'happenPlace', // 返回json数据中的name
|
||||
title: '地点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'accidentType.name', // 返回json数据中的name
|
||||
title: '事故分类', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '上报时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
return value.substring(0,19);
|
||||
}
|
||||
},{
|
||||
field: 'user.caption', // 返回json数据中的name
|
||||
title: '上报人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts="";
|
||||
|
||||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv" style="width: 220px;height:10px;"></div>
|
||||
<div id="subDivAbnorm"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="library4SelectDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div >
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
|
||||
</div>
|
||||
<div class="form-group form-inline" style="padding:0;">
|
||||
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
|
||||
<!-- <security:authorize buttonUrl="maintenance/abnormity/add.do"> -->
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
<!--
|
||||
<button type="button" class="btn btn-default btn-sm" title="异常中有设备的生成维修,没设备的生成缺陷" onclick="createDefectFun();"><i class="fa fa-send-o"></i>生成缺陷或维修单</button> -->
|
||||
<!-- </security:authorize> -->
|
||||
</div>
|
||||
<!--
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="form-group">
|
||||
<label class="form-label">工艺段:</label>
|
||||
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 160px;"></select>
|
||||
<label class="form-label">状态:</label>
|
||||
<select class="form-control select2 " id="statusSelect" name ="statusSelect" style="width: 160px;">
|
||||
<option value= "${Wait}">待处理</option>
|
||||
<option value= "${Start}">处理中</option>
|
||||
<option value= "${Finish}">已完成</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- bootstrap switch -->
|
||||
<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>
|
||||
</html>
|
||||
43
WebRoot/jsp/accident/accidentType4select.jsp
Normal file
43
WebRoot/jsp/accident/accidentType4select.jsp
Normal file
@ -0,0 +1,43 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
var selectMenu = function() {
|
||||
|
||||
alert('${param.hiddenId}'+'${param.textId}');
|
||||
}
|
||||
$(function() {
|
||||
$.post(ext.contextPath + '/accident/accidentType/getAccidentTypeTree.do', {ng:''} , function(data) {
|
||||
// console.info(data);
|
||||
if(data.length>0){
|
||||
$('#menu_select_tree').treeview({
|
||||
data: data,
|
||||
});
|
||||
$('#menu_select_tree').on('nodeSelected', function(event, data) {
|
||||
$('#${param.formId} #${param.hiddenId}' ).val(data.id);
|
||||
$('#${param.formId} #${param.textId}').val(data.text);
|
||||
closeModal("menu4SelectModal")
|
||||
});
|
||||
}
|
||||
},'json');
|
||||
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="menu4SelectModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择事故分类</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="menu_select_tree" style="height:430px;overflow:auto;width:100%"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<!-- <button type="button" class="btn btn-primary" onclick="selectMenu()">保存</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
43
WebRoot/jsp/accident/accidentType4select4Use.jsp
Normal file
43
WebRoot/jsp/accident/accidentType4select4Use.jsp
Normal file
@ -0,0 +1,43 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
var selectMenu = function() {
|
||||
|
||||
alert('${param.hiddenId}'+'${param.textId}');
|
||||
}
|
||||
$(function() {
|
||||
$.post(ext.contextPath + '/accident/accidentType/getAccidentTypeTree4Use.do', {ng:''} , function(data) {
|
||||
// console.info(data);
|
||||
if(data.length>0){
|
||||
$('#menu_select_tree').treeview({
|
||||
data: data,
|
||||
});
|
||||
$('#menu_select_tree').on('nodeSelected', function(event, data) {
|
||||
$('#${param.formId} #${param.hiddenId}' ).val(data.id);
|
||||
$('#${param.formId} #${param.textId}').val(data.text);
|
||||
closeModal("equipment4SelectModal")
|
||||
});
|
||||
}
|
||||
},'json');
|
||||
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="equipment4SelectModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择事故分类</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="menu_select_tree" style="height:430px;overflow:auto;width:100%"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<!-- <button type="button" class="btn btn-primary" onclick="selectMenu()">保存</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
143
WebRoot/jsp/accident/accidentTypeAdd.jsp
Normal file
143
WebRoot/jsp/accident/accidentTypeAdd.jsp
Normal file
@ -0,0 +1,143 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<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 + '/accident/accidentType/showAccidentType4Select.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 + "/accident/accidentType/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: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
// _pname: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '上级菜单不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
morder: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '顺序不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^[0-9]*$/,
|
||||
message: '顺序必须为数字'
|
||||
}
|
||||
}
|
||||
},
|
||||
active: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '启用不能为空'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
$(function () {
|
||||
//var active=$("#active").select2();
|
||||
$("#active").select2({ minimumResultsForSearch: 10 }).val("").trigger("change");
|
||||
});
|
||||
</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="id" name="id" type="hidden" value="${accidentType.id}" />
|
||||
<!-- 界面提醒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="${accidentType.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}">
|
||||
<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-10">
|
||||
<textarea class="form-control" rows="2" id ="harmDescription" name ="harmDescription" placeholder="危害性描述">${accidentType.harmDescription}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">注意事项</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="note" name ="note" placeholder="注意事项">${accidentType.note}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="memo" name ="memo" placeholder="备注">${accidentType.meme}</textarea>
|
||||
</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="morder" name="morder" placeholder="顺序"
|
||||
value="${accidentType.morder}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="active" name="active" class="form-control select2">
|
||||
<option value="启用">启用</option>
|
||||
<option value="禁用">禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
183
WebRoot/jsp/accident/accidentTypeEdit.jsp
Normal file
183
WebRoot/jsp/accident/accidentTypeEdit.jsp
Normal file
@ -0,0 +1,183 @@
|
||||
<%@ 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 + '/accident/accidentType/showAccidentType4Select.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 + "/accident/accidentType/doupdate.do", $("#subForm").serialize(), function (result) {
|
||||
if (result.code == 1) {
|
||||
showAlert('s', '保存成功');
|
||||
} else {
|
||||
showAlert('d', '保存失败');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
_pname: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '上级菜单不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
morder: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '顺序不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^[0-9]*$/,
|
||||
message: '顺序必须为数字'
|
||||
}
|
||||
}
|
||||
},
|
||||
active: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '启用不能为空'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function dodel() {
|
||||
|
||||
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 + '/accident/accidentType/dodelete.do', $("#subForm").serialize(), function (data) {
|
||||
if (data.code > 0) {
|
||||
initTreeView();
|
||||
showAlert('s', '删除成功');
|
||||
} else {
|
||||
showAlert('d', data.msg);
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#active").select2({ minimumResultsForSearch: 10 }).val("${accidentType.active}").trigger("change");
|
||||
|
||||
});
|
||||
</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>
|
||||
<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="${accidentType.id}" />
|
||||
<!-- 界面提醒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="${accidentType.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}">
|
||||
<input id="pid" name="pid" type="hidden" value="${accidentType.pid}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">危害性描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="harmDescription" name ="harmDescription" placeholder="危害性描述">${accidentType.harmDescription}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">注意事项</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="note" name ="note" placeholder="注意事项">${accidentType.note}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="memo" name ="memo" placeholder="备注">${accidentType.memo}</textarea>
|
||||
</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="morder" name="morder" placeholder="顺序"
|
||||
value="${accidentType.morder}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="active" name="active" class="form-control select2">
|
||||
<option value="启用">启用</option>
|
||||
<option value="禁用">禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
100
WebRoot/jsp/accident/accidentTypeTree.jsp
Normal file
100
WebRoot/jsp/accident/accidentTypeTree.jsp
Normal file
@ -0,0 +1,100 @@
|
||||
<%@ 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>
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
var node=$('#tree').treeview('getSelected');
|
||||
var pid="";
|
||||
if(node!=null && node.length>0){
|
||||
pid=node[0].id;
|
||||
}
|
||||
$.post(ext.contextPath + '/accident/accidentType/doadd.do', {pid:pid} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/accident/accidentType/doedit.do', {id:id} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
var initTreeView = function() {
|
||||
$.post(ext.contextPath + '/accident/accidentType/getAccidentTypeTree.do', {ng:''} , function(data) {
|
||||
//console.info(data)
|
||||
$('#tree').treeview({data: data,
|
||||
});
|
||||
$('#tree').on('nodeSelected', function(event, data) {
|
||||
editFun(data.id);
|
||||
//var node=$('#tree').treeview('getSelected');
|
||||
});
|
||||
},'json');
|
||||
$("#menuBox").html("");
|
||||
};
|
||||
$(function() {
|
||||
initTreeView();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></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">
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun();"><i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:550px;overflow:auto; "></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" id="menuBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
157
WebRoot/jsp/accident/accidentView.jsp
Normal file
157
WebRoot/jsp/accident/accidentView.jsp
Normal file
@ -0,0 +1,157 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<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">
|
||||
function doupdate() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('happenDate', 'NOT_VALIDATED',null)
|
||||
.validateField('happenDate');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('accidentTypeName', 'NOT_VALIDATED',null)
|
||||
.validateField('accidentTypeName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/accident/accident/doupdate.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.msg);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
happenDate: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '日期不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
happenPlace: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '地点不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
accidentTypeName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '事故分类不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
emergencyPlanTrue: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '是否响应应急预案不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$(function(){
|
||||
|
||||
// $("#emergencyPlanTrue").select2("disable",true);
|
||||
|
||||
$("#emergencyPlanTrue").select2({ minimumResultsForSearch: 10 }).val("${accident.emergencyPlanTrue}").trigger("change");
|
||||
|
||||
|
||||
$("#happenDate").datetimepicker({
|
||||
// startDate: date,
|
||||
language:'zh-CN',
|
||||
format: 'yyyy-mm-dd',
|
||||
startView: "month", //初始化视图是‘年’
|
||||
minView: 2,
|
||||
maxView: "year",
|
||||
autoclose: true
|
||||
// todayBtn: "linked"
|
||||
});
|
||||
})
|
||||
//选择设备,根据厂区id和工艺段id选择厂内设备,可多选
|
||||
var showEquipment4SelectsFun = function(formId,hiddenId,textId) {
|
||||
$.post(ext.contextPath + '/accident/accidentType/showAccidentType4Select4Use.do', { formId: formId, hiddenId: hiddenId, textId: textId }, function (data) {
|
||||
$("#equ4SelectDiv").html(data);
|
||||
openModal("equipment4SelectModal");
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑事故管理</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${accident.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${accident.unitId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*日期</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" type="text" id="happenDate" name ="happenDate" value="${accident.happenDate.substring(0,10)}" readonly>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*地点</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" type="text" id="happenPlace" name ="happenPlace" value="${accident.happenPlace}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">事故分类</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" id="accidentTypeId" name="accidentTypeId" type="hidden" value="${accident.accidentTypeId}" />
|
||||
<input class="form-control" id="accidentTypeName" name ="accidentTypeName" value="${accident.accidentType.name}" onclick="showEquipment4SelectsFun('subForm','accidentTypeId','accidentTypeName');" placeholder="选择事故分类" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否响应应急预案</label>
|
||||
<div class="col-sm-4">
|
||||
<select disabled="disabled" id="emergencyPlanTrue" name="emergencyPlanTrue" class="form-control select2" readonly>
|
||||
<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" rows="2" id ="handleResult" name ="handleResult" placeholder="处理结果" readonly>${accident.handleResult}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<!-- <button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
189
WebRoot/jsp/accident/reasonableAdviceAdd.jsp
Normal file
189
WebRoot/jsp/accident/reasonableAdviceAdd.jsp
Normal file
@ -0,0 +1,189 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.accident.AccidentCommString"%>
|
||||
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
|
||||
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
|
||||
<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">
|
||||
function dosave() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('solvername', 'NOT_VALIDATED',null)
|
||||
.validateField('happenDate');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/accident/reasonableAdvice/dosave.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function dosubmit(){
|
||||
$("#takeFlag").val('${AUDIT}');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('auditManName', 'NOT_VALIDATED',null)
|
||||
.validateField('auditManName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath +"/accident/reasonableAdvice/startProcess.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else if(data.res == 2){
|
||||
showAlert('d','未检测到合理化建议审核流程,请先部署合理化建议审核流程!');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
//提交时先验证审核人不能为空,保存时审核人可以为空
|
||||
function submitFun(){
|
||||
//新增的输入框添加验证
|
||||
$("#subForm").data('bootstrapValidator').addField('auditManName',{
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '审核人不能为空'
|
||||
},
|
||||
}
|
||||
});
|
||||
dosubmit();
|
||||
}
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
solvername: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '建议人不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(function(){
|
||||
|
||||
});
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#userLead").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"userLead",textId:"solvername",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
var showUser4SelectsFun1 = function() {
|
||||
var userIds= $("#usersHelp").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"usersHelp",textId:"solvername1",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//选择审核人
|
||||
var showUser4AuditSelectsFun = function() {
|
||||
var userIds= $("#auditManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"auditManId",textId:"auditManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增合理化建议</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${reasonableAdvice.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${param.unitId}">
|
||||
<input type="hidden" class="form-control" id="takeFlag" name ="takeFlag" value ="${START}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*建议名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" id="name" name ="name" placeholder="名称" value="${reasonableAdvice.name}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">建议类型</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" id="adviceType" name ="adviceType" placeholder="类型" value="${reasonableAdvice.adviceType}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">建议内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="5" id ="content" name ="content" placeholder="不超过500字">${reasonableAdvice.content}</textarea>
|
||||
</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="solvername" name ="solvername" placeholder="请选择建议人" onclick="showUser4SelectsFun();" value="${userName}">
|
||||
<input id="userLead" name="userLead" type="hidden" value="${userId}" />
|
||||
</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="solvername1" name ="solvername1" placeholder="请选择辅议人" onclick="showUser4SelectsFun1();">
|
||||
<input id="usersHelp" name="usersHelp" type="hidden" />
|
||||
</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="auditManName" name="auditManName" placeholder="点击选择" onclick="showUser4AuditSelectsFun();">
|
||||
<input id="auditManId" name="auditManId" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
<button type="button" class="btn btn-primary" onclick="submitFun()" id="btn_submit">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
178
WebRoot/jsp/accident/reasonableAdviceAudit.jsp
Normal file
178
WebRoot/jsp/accident/reasonableAdviceAudit.jsp
Normal file
@ -0,0 +1,178 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@page import="com.sipai.entity.accident.AccidentCommString"%>
|
||||
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
|
||||
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
|
||||
<%request.setAttribute("FINISH", AccidentCommString.STATUS_RA_FINISH); %>
|
||||
<%request.setAttribute("FAIL", AccidentCommString.STATUS_RA_FAIL); %>
|
||||
<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 masterId_process = '${reasonableAdvice.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
function doSubmit() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED',null)
|
||||
.validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码 */
|
||||
$.post(ext.contextPath + "/accident/reasonableAdvice/AuditReasonableAdvice.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','操作执行失败,请重试');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
var jobIds= $("#targetjobs").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds,jobIds:jobIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
$(function(){
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
//初始化选择框,方法在workflow.js里
|
||||
processSelectNode("${businessUnitAudit.taskid}");
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
targetUsersName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '提交人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
//显示流程详情
|
||||
var id = '${reasonableAdvice.id}';
|
||||
$.post(ext.contextPath + '/accident/reasonableAdvice/showProcessReasonableAdviceView.do', {id:id,inModal:'inModal'} , function(data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">流程处理(${taskName})</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data" >
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">建议名称</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static" >${reasonableAdvice.name}</p>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label">建议类型</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static" >${reasonableAdvice.adviceType}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">建议内容</label>
|
||||
<div class="col-sm-9">
|
||||
<p class="form-control-static" >${reasonableAdvice.content}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">建议人</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static" >${solvername}</p>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label">辅议人</label>
|
||||
<div class="col-sm-3">
|
||||
<p class="form-control-static" >${solvername1}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审核人</label>
|
||||
<div class="col-sm-9">
|
||||
${reasonableAdvice.auditManName}
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*审核结果</label>
|
||||
<div class="col-sm-3">
|
||||
<select class="form-control select2" id="passstatus" name ="passstatus" style="width: 100%;">
|
||||
<option value= true>采纳</option>
|
||||
<option value= false>不采纳</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*下一节点</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="routeNum" name ="routeNum" style="width: 100%;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审核意见</label>
|
||||
<div class="col-sm-6">
|
||||
<textarea class="form-control" rows="2" id ="auditopinion" name ="auditopinion" placeholder="检验意见">通过</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div id = "selectUsers" class="form-group">
|
||||
<label class="col-sm-3 control-label">提交至:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div>
|
||||
<div id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-5 col-xs-12" id="showView"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSubmit()" id="btn_update">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
281
WebRoot/jsp/accident/reasonableAdviceEdit.jsp
Normal file
281
WebRoot/jsp/accident/reasonableAdviceEdit.jsp
Normal file
@ -0,0 +1,281 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.accident.AccidentCommString"%>
|
||||
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
|
||||
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
|
||||
<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 masterId1='${reasonableAdvice.id}';
|
||||
var tbName1='TB_Process_UploadFile'; //数据表
|
||||
var nameSpace1='ProcessUploadFile';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
function doupdate() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('solvername', 'NOT_VALIDATED',null)
|
||||
.validateField('happenDate');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/accident/reasonableAdvice/doupdate.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.msg);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function dosubmit(){
|
||||
$("#takeFlag").val('${AUDIT}');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('auditManName', 'NOT_VALIDATED',null)
|
||||
.validateField('auditManName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath +"/accident/reasonableAdvice/startProcess.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else if(data.res == 2){
|
||||
showAlert('d','未检测到合理化建议审核流程,请先部署合理化建议审核流程!');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
//提交时先验证审核人不能为空,保存时审核人可以为空
|
||||
function submitFun(){
|
||||
//新增的输入框添加验证
|
||||
$("#subForm").data('bootstrapValidator').addField('auditManName',{
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '审核人不能为空'
|
||||
},
|
||||
}
|
||||
});
|
||||
dosubmit();
|
||||
}
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
solvername: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '建议人不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#userLead").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"userLead",textId:"solvername",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
var showUser4SelectsFun1 = function() {
|
||||
var userIds= $("#usersHelp").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"usersHelp",textId:"solvername1",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//以下为上传图片
|
||||
//名称定义不可修改
|
||||
var getFileList = function() {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId1,tbName:tbName1} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
previews=new Array();
|
||||
$('#maintenancefile').show();
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
|
||||
previews.push(path);
|
||||
previewConfig['width']= '50px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
console.log(data[i].filename)
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("maintenanceDetailFile");
|
||||
}else{
|
||||
$('#maintenanceDetailFile').hide();
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:''
|
||||
},
|
||||
deleteUrl:ext.contextPath+"/base/deleteInputFile.do",
|
||||
deleteExtraData:function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName1
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
|
||||
var fileinput1 = function() {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {masterId:masterId1,tbName:tbName1,nameSpace:nameSpace1} , function(data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
|
||||
//选择审核人
|
||||
var showUser4AuditSelectsFun = function() {
|
||||
var userIds= $("#auditManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"auditManId",textId:"auditManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
$(function(){
|
||||
|
||||
getFileList();
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑合理化建议</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${reasonableAdvice.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${reasonableAdvice.unitId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*建议名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" id="name" name ="name" placeholder="名称" value="${reasonableAdvice.name}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">建议类型</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" id="adviceType" name ="adviceType" placeholder="类型" value="${reasonableAdvice.adviceType}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">建议内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="5" id ="content" name ="content" placeholder="不超过500字">${reasonableAdvice.content}</textarea>
|
||||
</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="solvername" name ="solvername" placeholder="请选择建议人" onclick="showUser4SelectsFun();" value="${solvername}">
|
||||
<input id="userLead" name="userLead" type="hidden" value="${reasonableAdvice.userLead}"/>
|
||||
</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="solvername1" name ="solvername1" placeholder="请选择辅议人" onclick="showUser4SelectsFun1();" value="${solvername1}">
|
||||
<input id="usersHelp" name="usersHelp" type="hidden" value="${reasonableAdvice.usersHelp}"/>
|
||||
</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="auditManName" name="auditManName" placeholder="点击选择" value="${reasonableAdvice.auditManName}" onclick="showUser4AuditSelectsFun();">
|
||||
<input id="auditManId" name="auditManId" type="hidden" value="${reasonableAdvice.auditManId}" />
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" class="form-control" id="takeFlag" name ="takeFlag" value ="${reasonableAdvice.takeFlag}">
|
||||
|
||||
<div class="form-group" style="margin:8px">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput1()" id="btn_save"><i class="fa fa-paperclip"></i>上传图片</button>
|
||||
</div>
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple class="file-loading" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
|
||||
<button type="button" class="btn btn-primary" onclick="submitFun()" id="btn_submit">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
239
WebRoot/jsp/accident/reasonableAdviceEdittake.jsp
Normal file
239
WebRoot/jsp/accident/reasonableAdviceEdittake.jsp
Normal file
@ -0,0 +1,239 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<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 masterId1='${reasonableAdvice.id}';
|
||||
var tbName1='tb_reasonable_advice_file'; //数据表
|
||||
var nameSpace1='ReasonableAdvicePicture';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
function doupdate(takeFlag) {
|
||||
$('#takeFlag').val(takeFlag);
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('solvername', 'NOT_VALIDATED',null)
|
||||
.validateField('happenDate');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/accident/reasonableAdvice/doupdate.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.msg);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
solvername: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '建议人不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#userLead").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"userLead",textId:"solvername",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
var showUser4SelectsFun1 = function() {
|
||||
var userIds= $("#usersHelp").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"usersHelp",textId:"solvername1",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//以下为上传图片
|
||||
//名称定义不可修改
|
||||
var getFileList = function() {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId1,tbName:tbName1} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
previews=new Array();
|
||||
$('#maintenancefile').show();
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
|
||||
previews.push(path);
|
||||
previewConfig['width']= '50px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
console.log(data[i].filename)
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("maintenanceDetailFile");
|
||||
}else{
|
||||
$('#maintenanceDetailFile').hide();
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:''
|
||||
},
|
||||
deleteUrl:ext.contextPath+"/base/deleteInputFile.do",
|
||||
deleteExtraData:function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName1
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
|
||||
var fileinput1 = function() {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {masterId:masterId1,tbName:tbName1,nameSpace:nameSpace1} , function(data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
|
||||
$(function(){
|
||||
|
||||
getFileList();
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑合理化建议</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${reasonableAdvice.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${reasonableAdvice.unitId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*建议名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" id="name" name ="name" placeholder="名称" value="${reasonableAdvice.name}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">建议类型</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" id="adviceType" name ="adviceType" placeholder="类型" value="${reasonableAdvice.adviceType}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">建议内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="5" id ="content" name ="content" placeholder="不超过500字" readonly>${reasonableAdvice.content}</textarea>
|
||||
</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="solvername" name ="solvername" placeholder="请选择建议人" value="${solvername}" readonly>
|
||||
<input id="userLead" name="userLead" type="hidden" value="${reasonableAdvice.userLead}"/>
|
||||
</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="solvername1" name ="solvername1" placeholder="请选择辅议人" value="${solvername1}" readonly>
|
||||
<input id="usersHelp" name="usersHelp" type="hidden" value="${reasonableAdvice.usersHelp}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control" id="takeFlag" name ="takeFlag" value ="${reasonableAdvice.takeFlag}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">审核意见</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="5" id ="auditContent" name ="auditContent" placeholder="不超过500字">${reasonableAdvice.auditContent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="margin:8px">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput1()" id="btn_save"><i class="fa fa-paperclip"></i>上传图片</button>
|
||||
</div>
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple class="file-loading" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate('不采纳')" id="btn_save">不采纳</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate('已采纳')" id="btn_save">采纳</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
267
WebRoot/jsp/accident/reasonableAdviceExecuteView.jsp
Normal file
267
WebRoot/jsp/accident/reasonableAdviceExecuteView.jsp
Normal file
@ -0,0 +1,267 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem='tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance='tb_maintenance_file'; //数据表
|
||||
var nameSpace='MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
resizeImage:true,
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:'',
|
||||
actionDelete:''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
var viewHandleDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${param.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'view';//有查看权限
|
||||
|
||||
$(function() {
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
$("#judgemaintainerstaff").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
$("#judgeresult").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
var result='${businessUnitRecords}';
|
||||
result=result.replace(new RegExp("\r\n","gm"),"");
|
||||
var json =JSON.parse(result);
|
||||
$.each(json, function(index, item) {
|
||||
if(item.id!=null &&item.id!=""){
|
||||
previews=new Array();
|
||||
$('#'+item.id).show();
|
||||
var data =item.files;
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");
|
||||
previews.push(path);
|
||||
previewConfig['width']= '30px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput(item.id);
|
||||
}
|
||||
});
|
||||
})
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
var printpage = function (myDiv){
|
||||
$('.printContent').show();
|
||||
var printHtml = document.getElementById(myDiv).innerHTML;
|
||||
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
|
||||
/*
|
||||
var ss = ".coversheet-pageBoder{"
|
||||
+" padding: 10px;"
|
||||
+" margin-top: 10px;"
|
||||
+" border: 1px solid gray;"
|
||||
+" page-break-after: always;"
|
||||
+" border-radius: 5px;"
|
||||
+" box-shadow: 0 1px 2px 1px rgba(0,0,0,.08), 0 3px 6px rgba(0,0,0,.08);"
|
||||
+"}"
|
||||
+".noprint{display: none;}"
|
||||
+".select2-container .select2-selection--single{ "
|
||||
+" height:34px; "
|
||||
+" line-height: 34px; "
|
||||
+" }"
|
||||
+" .select2-selection__arrow{"
|
||||
+" margin-top:3px;"
|
||||
+" } "
|
||||
+" .div-row{"
|
||||
+" margin-left:3px;"
|
||||
+" margin-right:3px;"
|
||||
+" }"
|
||||
+" .div-border{"
|
||||
+" border-style:solid;"
|
||||
+" border-width:1px;"
|
||||
+" text-align:center;"
|
||||
+" }"
|
||||
+" .right-border{"
|
||||
+" border-right:none;"
|
||||
+" }"
|
||||
+" .top-right-border{"
|
||||
+" border-top:none;"
|
||||
+" border-right:none;"
|
||||
+" }"
|
||||
+" .top-border{"
|
||||
+" border-top:none;"
|
||||
+" }";
|
||||
*/
|
||||
//for Chrome Firefox Opera Safari
|
||||
//wind.document.body.innerHTML = printHtml;
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
|
||||
wind.document.head.appendChild(link);
|
||||
/*
|
||||
var style = document.createElement('style');
|
||||
style.type = 'text/css';
|
||||
style.rel = 'stylesheet';
|
||||
style.appendChild(document.createTextNode(ss));
|
||||
wind.document.head.appendChild(style);
|
||||
*/
|
||||
wind.document.body.innerHTML = printHtml;
|
||||
//console.log(wind.document);
|
||||
wind.print();
|
||||
wind.close();
|
||||
$('.printContent').hide();
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
<div class="modal fade" id="reasonableAdviceExcuteModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">合理化建议处理详情</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="padding-left:0;padding-right:0;">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise >
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
|
||||
<div>
|
||||
${item.record}
|
||||
</div>
|
||||
<c:if test ="${item.id!=''}">
|
||||
<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading" />
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文件附件:</label>
|
||||
</div>
|
||||
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<!-- 流程打印布局 开始 -->
|
||||
<div id="reasonableAdviceExcuteDetail">
|
||||
<div class="printContent" style="display:none">
|
||||
<h4 style="text-align:center;">合理化建议处理详情</h4>
|
||||
</div>
|
||||
<div class="printContent" style="display:none">
|
||||
<table style="border-collapse:collapse;margin:0 auto">
|
||||
<tr >
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
|
||||
</tr>
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
|
||||
<td style="border:1px solid black;width:300px;">${item.record}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文件附件:</label>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- 流程打印布局 结束-->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" onclick="printpage('reasonableAdviceExcuteDetail');"><i class="fa fa-print"></i>打印</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
191
WebRoot/jsp/accident/reasonableAdviceExecuteViewInModal.jsp
Normal file
191
WebRoot/jsp/accident/reasonableAdviceExecuteViewInModal.jsp
Normal file
@ -0,0 +1,191 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem='tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance='tb_maintenance_file'; //数据表
|
||||
var nameSpace='MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
resizeImage:true,
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:'',
|
||||
actionDelete:''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
var viewHandleDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${param.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'view';//有查看权限
|
||||
|
||||
$(function() {
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
$("#judgemaintainerstaff").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
$("#judgeresult").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
var result='${businessUnitRecords}';
|
||||
result=result.replace(new RegExp("\r\n","gm"),"");
|
||||
var json =JSON.parse(result);
|
||||
$.each(json, function(index, item) {
|
||||
if(item.id!=null &&item.id!=""){
|
||||
previews=new Array();
|
||||
$('#'+item.id).show();
|
||||
var data =item.files;
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");
|
||||
previews.push(path);
|
||||
previewConfig['width']= '30px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput(item.id);
|
||||
}
|
||||
});
|
||||
})
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
var printpage = function (myDiv){
|
||||
$('.printContent').show();
|
||||
var printHtml = document.getElementById(myDiv).innerHTML;
|
||||
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
|
||||
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
|
||||
wind.document.head.appendChild(link);
|
||||
wind.document.body.innerHTML = printHtml;
|
||||
wind.print();
|
||||
wind.close();
|
||||
$('.printContent').hide();
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise >
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
|
||||
<div>
|
||||
${item.record}
|
||||
</div>
|
||||
<c:if test ="${item.id!=''}">
|
||||
<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading" />
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- 流程打印布局 开始 -->
|
||||
<div id="reasonableAdviceExcuteDetail">
|
||||
<div class="printContent" style="display:none">
|
||||
<h4 style="text-align:center;">合理化建议处理详情</h4>
|
||||
</div>
|
||||
<div class="printContent" style="display:none;">
|
||||
<table style="border-collapse:collapse;margin:0 auto">
|
||||
<tr >
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
|
||||
</tr>
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
|
||||
<td style="border:1px solid black;width:300px;">${item.record}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">文件附件:</label>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
387
WebRoot/jsp/accident/reasonableAdviceList.jsp
Normal file
387
WebRoot/jsp/accident/reasonableAdviceList.jsp
Normal file
@ -0,0 +1,387 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%@page import="com.sipai.entity.accident.AccidentCommString"%>
|
||||
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
|
||||
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
|
||||
<%request.setAttribute("FINISH", AccidentCommString.STATUS_RA_FINISH); %>
|
||||
<%request.setAttribute("FAIL", AccidentCommString.STATUS_RA_FAIL); %>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
.table-hover>tbody>tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/accident/reasonableAdvice/doadd.do', {unitId:unitId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/accident/reasonableAdvice/doedit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/accident/reasonableAdvice/view.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
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 + '/accident/reasonableAdvice/dodelete.do', {id : id}, function(data) {
|
||||
if(data.code=="1"){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/accident/reasonableAdvice/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data.code>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var reasonableAdviceProcessFun = function(id){
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/accident/reasonableAdvice/showProcessReasonableAdviceView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('reasonableAdviceExcuteModal');
|
||||
});
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
//初始化采集类型选择框
|
||||
var refreshtypeForSelect = function() {
|
||||
var select = $("#typeForSelect").select2({
|
||||
data: null,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
});
|
||||
select.val("未提交").trigger("change");
|
||||
select.on("change", function (e) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
|
||||
};
|
||||
var companyId = unitId;
|
||||
$(function() {
|
||||
companyId = unitId;
|
||||
refreshtypeForSelect();
|
||||
initFun();
|
||||
});
|
||||
var initFun = function(){
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/accident/reasonableAdvice/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: unitId,
|
||||
takeFlag: $("#typeForSelect").val(),
|
||||
// statusSelect:$("#statusSelect").val(),
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'caption', // 返回json数据中的name
|
||||
title: '建议人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'adviceType', // 返回json数据中的name
|
||||
title: '建议类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '建议名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'company.name', // 返回json数据中的name
|
||||
title: '部门', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
return value.substring(0,10);
|
||||
}
|
||||
},{
|
||||
field: 'takeFlag', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index){
|
||||
switch (value){
|
||||
case '${FAIL}' :
|
||||
return "未采纳";
|
||||
case '${FINISH}' :
|
||||
return "已采纳";
|
||||
case '${START}' :
|
||||
return "未提交";
|
||||
case '${AUDIT}' :
|
||||
return "已提交";
|
||||
default :
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts="";
|
||||
if(row.takeFlag == '${START}'){
|
||||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
}else{
|
||||
buts+= '<button class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg">浏览</span></button>';
|
||||
buts+= '<button class="btn btn-default btn-sm" title="流程详情" onclick="reasonableAdviceProcessFun(\'' + row.id + '\')"><i class="fa fa-history"></i><span class="hidden-md hidden-lg">流程详情</span></button>';
|
||||
}
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
//导出设备表,要用get请求的方式
|
||||
function downloadFun() {
|
||||
var search_name = $("#search_name").val();
|
||||
var takeFlag = $("#typeForSelect").val();
|
||||
|
||||
window.open(ext.contextPath + "/accident/reasonableAdvice/downloadExcel.do?unitId="+unitId
|
||||
+"&search_name="+search_name
|
||||
+"&takeFlag="+takeFlag);
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv" style="width: 220px;height:10px;"></div>
|
||||
<div id="subDivAbnorm"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="library4SelectDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div >
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
|
||||
</div>
|
||||
<div class="form-group form-inline" style="padding:0;">
|
||||
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
|
||||
<!-- <security:authorize buttonUrl="maintenance/abnormity/add.do"> -->
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="downloadFun();"><i class="fa fa-cloud-download"></i> 导出</button>
|
||||
<!--
|
||||
<button type="button" class="btn btn-default btn-sm" title="异常中有设备的生成维修,没设备的生成缺陷" onclick="createDefectFun();"><i class="fa fa-send-o"></i>生成缺陷或维修单</button> -->
|
||||
<!-- </security:authorize> -->
|
||||
</div>
|
||||
<!--
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="form-group">
|
||||
<label class="form-label">工艺段:</label>
|
||||
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 160px;"></select>
|
||||
<label class="form-label">状态:</label>
|
||||
<select class="form-control select2 " id="statusSelect" name ="statusSelect" style="width: 160px;">
|
||||
<option value= "${Wait}">待处理</option>
|
||||
<option value= "${Start}">处理中</option>
|
||||
<option value= "${Finish}">已完成</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group input-group-sm ">
|
||||
<label class="form-label">状态</label>
|
||||
<select type="text" id="typeForSelect" class="form-control pull-right"
|
||||
name="typeForSelect" style="width: 180px;">
|
||||
<option value="${START}">未提交</option>
|
||||
<option value="${AUDIT}">已提交</option>
|
||||
<option value="${FINISH}">已采纳</option>
|
||||
<option value="${FAIL}">未采纳</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- bootstrap switch -->
|
||||
<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>
|
||||
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
</html>
|
||||
318
WebRoot/jsp/accident/reasonableAdviceListtake.jsp
Normal file
318
WebRoot/jsp/accident/reasonableAdviceListtake.jsp
Normal file
@ -0,0 +1,318 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%request.setAttribute("Finish", MaintenanceDetail.Status_Finish); %>
|
||||
<%request.setAttribute("Start", MaintenanceDetail.Status_Start); %>
|
||||
<%request.setAttribute("Wait", MaintenanceDetail.Status_Wait); %>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
.table-hover>tbody>tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/accident/reasonableAdvice/doadd.do', {unitId:unitId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/accident/reasonableAdvice/doedittake.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/accident/reasonableAdvice/doview.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
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 + '/accident/reasonableAdvice/dodelete.do', {id : id}, function(data) {
|
||||
if(data.code=="1"){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/accident/reasonableAdvice/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data.code>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
var companyId = unitId;
|
||||
$(function() {
|
||||
companyId = unitId;
|
||||
initFun();
|
||||
});
|
||||
var initFun = function(){
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/accident/reasonableAdvice/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: unitId,
|
||||
takeFlag: "已提交",
|
||||
// statusSelect:$("#statusSelect").val(),
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'caption', // 返回json数据中的name
|
||||
title: '建议人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'adviceType', // 返回json数据中的name
|
||||
title: '建议类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '建议名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'company.name', // 返回json数据中的name
|
||||
title: '部门', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
return value.substring(0,10);
|
||||
}
|
||||
},{
|
||||
field: 'takeFlag', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts="";
|
||||
|
||||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv" style="width: 220px;height:10px;"></div>
|
||||
<div id="subDivAbnorm"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="library4SelectDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div >
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
|
||||
</div>
|
||||
<div class="form-group form-inline" style="padding:0;">
|
||||
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
|
||||
<!-- <security:authorize buttonUrl="maintenance/abnormity/add.do"> -->
|
||||
<!-- <button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
|
||||
<!--
|
||||
<button type="button" class="btn btn-default btn-sm" title="异常中有设备的生成维修,没设备的生成缺陷" onclick="createDefectFun();"><i class="fa fa-send-o"></i>生成缺陷或维修单</button> -->
|
||||
<!-- </security:authorize> -->
|
||||
</div>
|
||||
<!--
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="form-group">
|
||||
<label class="form-label">工艺段:</label>
|
||||
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 160px;"></select>
|
||||
<label class="form-label">状态:</label>
|
||||
<select class="form-control select2 " id="statusSelect" name ="statusSelect" style="width: 160px;">
|
||||
<option value= "${Wait}">待处理</option>
|
||||
<option value= "${Start}">处理中</option>
|
||||
<option value= "${Finish}">已完成</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- bootstrap switch -->
|
||||
<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>
|
||||
</html>
|
||||
121
WebRoot/jsp/accident/reasonableAdviceView.jsp
Normal file
121
WebRoot/jsp/accident/reasonableAdviceView.jsp
Normal file
@ -0,0 +1,121 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.accident.AccidentCommString"%>
|
||||
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
|
||||
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
|
||||
<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 masterId1='${reasonableAdvice.id}';
|
||||
var tbName1='TB_Process_UploadFile'; //数据表
|
||||
var nameSpace1='ProcessUploadFile';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
//以下为上传图片
|
||||
//名称定义不可修改
|
||||
var getFileList = function() {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId1,tbName:tbName1} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
previews=new Array();
|
||||
$('#maintenancefile').show();
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
|
||||
previews.push(path);
|
||||
previewConfig['width']= '50px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
console.log(data[i].filename)
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("maintenanceDetailFile");
|
||||
}else{
|
||||
$('#maintenanceDetailFile').hide();
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
|
||||
$(function(){
|
||||
|
||||
getFileList();
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">查看合理化建议</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${reasonableAdvice.id}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">建议名称</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static" >${reasonableAdvice.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">建议类型</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static" >${reasonableAdvice.adviceType}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">建议内容</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static" >${reasonableAdvice.content}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">建议人</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static" >${solvername}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">辅议人</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static" >${solvername1}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">审核人</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static" >${reasonableAdvice.auditManName}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple class="file-loading" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
242
WebRoot/jsp/accident/roastAdd.jsp
Normal file
242
WebRoot/jsp/accident/roastAdd.jsp
Normal file
@ -0,0 +1,242 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.accident.AccidentCommString" %>
|
||||
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
|
||||
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
|
||||
<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">
|
||||
function dosave() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('solvername', 'NOT_VALIDATED', null)
|
||||
.validateField('happenDate');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/accident/roast/dosave.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
showAlert('s', '保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
//刷新app页面
|
||||
initAPP();
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function dosubmit() {
|
||||
$("#takeFlag").val('${AUDIT}');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('auditManName', 'NOT_VALIDATED', null)
|
||||
.validateField('auditManName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/accident/roast/startProcess.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
//刷新app页面
|
||||
initAPP();
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else if (data.res == 2) {
|
||||
showAlert('d', '未检测到吐槽大会审核流程,请先部署吐槽大会审核流程!');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
//提交时先验证审核人不能为空,保存时审核人可以为空
|
||||
function submitFun() {
|
||||
//新增的输入框添加验证
|
||||
$("#subForm").data('bootstrapValidator').addField('auditManName', {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '审核人不能为空'
|
||||
},
|
||||
}
|
||||
});
|
||||
dosubmit();
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
solvername: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '吐槽人不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
|
||||
});
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#userLead").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "userLead",
|
||||
textId: "solvername",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
var showUser4SelectsFun1 = function () {
|
||||
var userIds = $("#usersHelp").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "usersHelp",
|
||||
textId: "solvername1",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//选择审核人
|
||||
var showUser4AuditSelectsFun = function () {
|
||||
var userIds = $("#auditManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "auditManId",
|
||||
textId: "auditManName",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var selelct_type = $("#anonymous").select2({
|
||||
placeholder: '请选择',
|
||||
minimumResultsForSearch: 10
|
||||
});
|
||||
selelct_type.on('change', function () {
|
||||
var anonymous = $('#anonymous').val();
|
||||
if ('0' == anonymous) {//不匿名
|
||||
$("#userLeadDiv").attr("style", "display:block;");
|
||||
} else {//匿名
|
||||
$("#userLeadDiv").attr("style", "display:none;");
|
||||
$('#solvername').val("");
|
||||
$('#userLead').val("");
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name="id" value="${roast.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name="unitId" value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" id="takeFlag" name="takeFlag" value="${START}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*吐槽名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" id="name" name="name" placeholder="名称"
|
||||
value="${roast.name}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽类型</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" id="adviceType" name="adviceType" placeholder="类型"
|
||||
value="${roast.adviceType}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="5" id="content" name="content"
|
||||
placeholder="不超过500字">${roast.content}</textarea>
|
||||
</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="anonymous" name="anonymous">
|
||||
<option value="0">否</option>
|
||||
<option value="1">是</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="userLeadDiv">
|
||||
<label class="col-sm-2 control-label">*吐槽人</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="solvername" name="solvername"
|
||||
placeholder="请选择吐槽人" onclick="showUser4SelectsFun();" value="${userName}">
|
||||
<input id="userLead" name="userLead" type="hidden" value="${userId}"/>
|
||||
</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="solvername1" name ="solvername1" placeholder="请选择辅议人" onclick="showUser4SelectsFun1();">
|
||||
<input id="usersHelp" name="usersHelp" type="hidden" />
|
||||
</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="auditManName" name="auditManName"
|
||||
placeholder="点击选择" onclick="showUser4AuditSelectsFun();">
|
||||
<input id="auditManId" name="auditManId" type="hidden"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
<button type="button" class="btn btn-primary" onclick="submitFun()" id="btn_submit">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
212
WebRoot/jsp/accident/roastAudit.jsp
Normal file
212
WebRoot/jsp/accident/roastAudit.jsp
Normal file
@ -0,0 +1,212 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@page import="com.sipai.entity.accident.AccidentCommString" %>
|
||||
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
|
||||
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
|
||||
<%request.setAttribute("FINISH", AccidentCommString.STATUS_RA_FINISH); %>
|
||||
<%request.setAttribute("FAIL", AccidentCommString.STATUS_RA_FAIL); %>
|
||||
<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 masterId_process = '${roast.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process = 'ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
function doSubmit() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED', null)
|
||||
.validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码 */
|
||||
$.post(ext.contextPath + "/accident/roast/AuditRoast.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '操作执行失败,请重试');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#targetusers").val();
|
||||
var jobIds = $("#targetjobs").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "targetusers",
|
||||
textId: "targetUsersName",
|
||||
userIds: userIds,
|
||||
jobIds: jobIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
$(function () {
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
//初始化选择框,方法在workflow.js里
|
||||
processSelectNode("${businessUnitAudit.taskid}");
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
targetUsersName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '提交人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
//显示流程详情
|
||||
var id = '${roast.id}';
|
||||
$.post(ext.contextPath + '/accident/roast/showProcessRoastView.do', {
|
||||
id: id,
|
||||
inModal: 'inModal'
|
||||
}, function (data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<%-- <div class="modal-dialog modal-xlg">--%>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">流程处理(${taskName})</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${roast.name}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">吐槽类型</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${roast.adviceType}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽内容</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${roast.content}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否匿名</label>
|
||||
<div class="col-sm-10">
|
||||
<c:if test="${roast.anonymous==0}">
|
||||
<p class="form-control-static">否</p>
|
||||
</c:if>
|
||||
<c:if test="${roast.anonymous==1}">
|
||||
<p class="form-control-static">是</p>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽人</label>
|
||||
<div class="col-sm-10">
|
||||
<c:if test="${roast.userLead!=null && roast.userLead!= ''}">
|
||||
<p class="form-control-static">${solvername}</p>
|
||||
</c:if>
|
||||
<c:if test="${roast.userLead==null || roast.userLead== ''}">
|
||||
<p class="form-control-static">匿名</p>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">审核人</label>
|
||||
<div class="col-sm-10">
|
||||
${roast.auditManName}
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" class="form-control" name="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name="processid"
|
||||
value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name="businessid"
|
||||
value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name=unitId value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name="taskdefinitionkey"
|
||||
value="${businessUnitAudit.taskdefinitionkey}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核结果</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control select2" id="passstatus" name="passstatus"
|
||||
style="width: 320px">
|
||||
<option value=true>通过</option>
|
||||
<option value=false>不通过</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*下一节点</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control select2" id="routeNum" name="routeNum"
|
||||
style="width: 320px">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">审核意见</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id="auditopinion" name="auditopinion"
|
||||
placeholder="检验意见">通过</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="selectUsers" class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName"
|
||||
placeholder="下一级人员" onclick="showUser4SelectsFun();">
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden"
|
||||
value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<%--<div class="col-md-5 col-xs-12" id="showView"></div>--%>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSubmit()" id="btn_update">审核</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
343
WebRoot/jsp/accident/roastEdit.jsp
Normal file
343
WebRoot/jsp/accident/roastEdit.jsp
Normal file
@ -0,0 +1,343 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.accident.AccidentCommString" %>
|
||||
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
|
||||
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
|
||||
<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 masterId1 = '${roast.id}';
|
||||
var tbName1 = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace1 = 'ProcessUploadFile';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
function doupdate() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('solvername', 'NOT_VALIDATED', null)
|
||||
.validateField('happenDate');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/accident/roast/doupdate.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
showAlert('s', '保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
//刷新app页面
|
||||
initAPP();
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.msg);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function dosubmit() {
|
||||
$("#takeFlag").val('${AUDIT}');
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('auditManName', 'NOT_VALIDATED', null)
|
||||
.validateField('auditManName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/accident/roast/startProcess.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else if (data.res == 2) {
|
||||
showAlert('d', '未检测到吐槽大会审核流程,请先部署吐槽大会审核流程!');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
//提交时先验证审核人不能为空,保存时审核人可以为空
|
||||
function submitFun() {
|
||||
//新增的输入框添加验证
|
||||
$("#subForm").data('bootstrapValidator').addField('auditManName', {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '审核人不能为空'
|
||||
},
|
||||
}
|
||||
});
|
||||
dosubmit();
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
solvername: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '吐槽人不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#userLead").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "userLead",
|
||||
textId: "solvername",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
/*var showUser4SelectsFun1 = function () {
|
||||
var userIds = $("#usersHelp").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "usersHelp",
|
||||
textId: "solvername1",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};*/
|
||||
|
||||
//以下为上传图片
|
||||
//名称定义不可修改
|
||||
var getFileList = function () {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId: masterId1, tbName: tbName1}, function (data) {
|
||||
//console.info(data)
|
||||
if (data.length > 0) {
|
||||
previews = new Array();
|
||||
$('#maintenancefile').show();
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path = path.substring(path.indexOf('webapps') + 7, path.length);
|
||||
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");
|
||||
;
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '50px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
console.log(data[i].filename)
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("maintenanceDetailFile");
|
||||
} else {
|
||||
$('#maintenanceDetailFile').hide();
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
};
|
||||
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: ''
|
||||
},
|
||||
deleteUrl: ext.contextPath + "/base/deleteInputFile.do",
|
||||
deleteExtraData: function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName1
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
var fileinput1 = function () {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {
|
||||
masterId: masterId1,
|
||||
tbName: tbName1,
|
||||
nameSpace: nameSpace1
|
||||
}, function (data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
|
||||
//选择审核人
|
||||
var showUser4AuditSelectsFun = function () {
|
||||
var userIds = $("#auditManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "auditManId",
|
||||
textId: "auditManName",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var selelct_type = $("#anonymous").select2({
|
||||
placeholder: '请选择',
|
||||
minimumResultsForSearch: 10
|
||||
});
|
||||
selelct_type.on('change', function () {
|
||||
var anonymous = $('#anonymous').val();
|
||||
if ('0' == anonymous) {//不匿名
|
||||
$("#userLeadDiv").attr("style", "display:block;");
|
||||
} else {//匿名
|
||||
$("#userLeadDiv").attr("style", "display:none;");
|
||||
$('#solvername').val("");
|
||||
$('#userLead').val("");
|
||||
}
|
||||
})
|
||||
|
||||
$(function () {
|
||||
getFileList();
|
||||
|
||||
var anonymous = '${roast.anonymous}';
|
||||
$("#anonymous").val(anonymous).trigger("change");
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name="id" value="${roast.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name="unitId" value="${roast.unitId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*吐槽名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" id="name" name="name" placeholder="名称"
|
||||
value="${roast.name}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽类型</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" id="adviceType" name="adviceType" placeholder="类型"
|
||||
value="${roast.adviceType}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="5" id="content" name="content"
|
||||
placeholder="不超过500字">${roast.content}</textarea>
|
||||
</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="anonymous" name="anonymous">
|
||||
<option value="0">否</option>
|
||||
<option value="1">是</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="userLeadDiv">
|
||||
<label class="col-sm-2 control-label">*吐槽人</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="solvername" name="solvername"
|
||||
placeholder="请选择吐槽人" onclick="showUser4SelectsFun();" value="${solvername}">
|
||||
<input id="userLead" name="userLead" type="hidden" value="${roast.userLead}"/>
|
||||
</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="solvername1" name ="solvername1" placeholder="请选择辅议人" onclick="showUser4SelectsFun1();" value="${solvername1}">
|
||||
<input id="usersHelp" name="usersHelp" type="hidden" value="${roast.usersHelp}"/>
|
||||
</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="auditManName" name="auditManName"
|
||||
placeholder="点击选择" value="${roast.auditManName}"
|
||||
onclick="showUser4AuditSelectsFun();">
|
||||
<input id="auditManId" name="auditManId" type="hidden" value="${roast.auditManId}"/>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" class="form-control" id="takeFlag" name="takeFlag" value="${roast.takeFlag}">
|
||||
|
||||
<%--<div class="form-group" style="margin:8px">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput1()" id="btn_save"><i class="fa fa-paperclip"></i>上传图片</button>
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple
|
||||
class="file-loading"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
|
||||
<button type="button" class="btn btn-primary" onclick="submitFun()" id="btn_submit">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
239
WebRoot/jsp/accident/roastEdittake.jsp
Normal file
239
WebRoot/jsp/accident/roastEdittake.jsp
Normal file
@ -0,0 +1,239 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<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 masterId1='${roast.id}';
|
||||
var tbName1='tb_reasonable_advice_file'; //数据表
|
||||
var nameSpace1='RoastPicture';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
function doupdate(takeFlag) {
|
||||
$('#takeFlag').val(takeFlag);
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('solvername', 'NOT_VALIDATED',null)
|
||||
.validateField('happenDate');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/accident/roast/doupdate.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.msg);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
solvername: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '吐槽人不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#userLead").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"userLead",textId:"solvername",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
var showUser4SelectsFun1 = function() {
|
||||
var userIds= $("#usersHelp").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"usersHelp",textId:"solvername1",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//以下为上传图片
|
||||
//名称定义不可修改
|
||||
var getFileList = function() {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId1,tbName:tbName1} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
previews=new Array();
|
||||
$('#maintenancefile').show();
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
|
||||
previews.push(path);
|
||||
previewConfig['width']= '50px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
console.log(data[i].filename)
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("maintenanceDetailFile");
|
||||
}else{
|
||||
$('#maintenanceDetailFile').hide();
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:''
|
||||
},
|
||||
deleteUrl:ext.contextPath+"/base/deleteInputFile.do",
|
||||
deleteExtraData:function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName1
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
|
||||
var fileinput1 = function() {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {masterId:masterId1,tbName:tbName1,nameSpace:nameSpace1} , function(data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
|
||||
$(function(){
|
||||
|
||||
getFileList();
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑合理化吐槽</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${roast.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${roast.unitId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*吐槽名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" id="name" name ="name" placeholder="名称" value="${roast.name}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽类型</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" id="adviceType" name ="adviceType" placeholder="类型" value="${roast.adviceType}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="5" id ="content" name ="content" placeholder="不超过500字" readonly>${roast.content}</textarea>
|
||||
</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="solvername" name ="solvername" placeholder="请选择吐槽人" value="${solvername}" readonly>
|
||||
<input id="userLead" name="userLead" type="hidden" value="${roast.userLead}"/>
|
||||
</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="solvername1" name ="solvername1" placeholder="请选择辅议人" value="${solvername1}" readonly>
|
||||
<input id="usersHelp" name="usersHelp" type="hidden" value="${roast.usersHelp}"/>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<input type="hidden" class="form-control" id="takeFlag" name ="takeFlag" value ="${roast.takeFlag}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">审核意见</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="5" id ="auditContent" name ="auditContent" placeholder="不超过500字">${roast.auditContent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="margin:8px">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput1()" id="btn_save"><i class="fa fa-paperclip"></i>上传图片</button>
|
||||
</div>
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple class="file-loading" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate('不通过')" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate('已通过')" >已通过</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
267
WebRoot/jsp/accident/roastExecuteView.jsp
Normal file
267
WebRoot/jsp/accident/roastExecuteView.jsp
Normal file
@ -0,0 +1,267 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem='tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance='tb_maintenance_file'; //数据表
|
||||
var nameSpace='MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
resizeImage:true,
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:'',
|
||||
actionDelete:''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
var viewHandleDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${param.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'view';//有查看权限
|
||||
|
||||
$(function() {
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
$("#judgemaintainerstaff").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
$("#judgeresult").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
var result='${businessUnitRecords}';
|
||||
result=result.replace(new RegExp("\r\n","gm"),"");
|
||||
var json =JSON.parse(result);
|
||||
$.each(json, function(index, item) {
|
||||
if(item.id!=null &&item.id!=""){
|
||||
previews=new Array();
|
||||
$('#'+item.id).show();
|
||||
var data =item.files;
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");
|
||||
previews.push(path);
|
||||
previewConfig['width']= '30px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput(item.id);
|
||||
}
|
||||
});
|
||||
})
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
var printpage = function (myDiv){
|
||||
$('.printContent').show();
|
||||
var printHtml = document.getElementById(myDiv).innerHTML;
|
||||
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
|
||||
/*
|
||||
var ss = ".coversheet-pageBoder{"
|
||||
+" padding: 10px;"
|
||||
+" margin-top: 10px;"
|
||||
+" border: 1px solid gray;"
|
||||
+" page-break-after: always;"
|
||||
+" border-radius: 5px;"
|
||||
+" box-shadow: 0 1px 2px 1px rgba(0,0,0,.08), 0 3px 6px rgba(0,0,0,.08);"
|
||||
+"}"
|
||||
+".noprint{display: none;}"
|
||||
+".select2-container .select2-selection--single{ "
|
||||
+" height:34px; "
|
||||
+" line-height: 34px; "
|
||||
+" }"
|
||||
+" .select2-selection__arrow{"
|
||||
+" margin-top:3px;"
|
||||
+" } "
|
||||
+" .div-row{"
|
||||
+" margin-left:3px;"
|
||||
+" margin-right:3px;"
|
||||
+" }"
|
||||
+" .div-border{"
|
||||
+" border-style:solid;"
|
||||
+" border-width:1px;"
|
||||
+" text-align:center;"
|
||||
+" }"
|
||||
+" .right-border{"
|
||||
+" border-right:none;"
|
||||
+" }"
|
||||
+" .top-right-border{"
|
||||
+" border-top:none;"
|
||||
+" border-right:none;"
|
||||
+" }"
|
||||
+" .top-border{"
|
||||
+" border-top:none;"
|
||||
+" }";
|
||||
*/
|
||||
//for Chrome Firefox Opera Safari
|
||||
//wind.document.body.innerHTML = printHtml;
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
|
||||
wind.document.head.appendChild(link);
|
||||
/*
|
||||
var style = document.createElement('style');
|
||||
style.type = 'text/css';
|
||||
style.rel = 'stylesheet';
|
||||
style.appendChild(document.createTextNode(ss));
|
||||
wind.document.head.appendChild(style);
|
||||
*/
|
||||
wind.document.body.innerHTML = printHtml;
|
||||
//console.log(wind.document);
|
||||
wind.print();
|
||||
wind.close();
|
||||
$('.printContent').hide();
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
<div class="modal fade" id="roastExcuteModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">吐槽处理详情</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="padding-left:0;padding-right:0;">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise >
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
|
||||
<div>
|
||||
${item.record}
|
||||
</div>
|
||||
<c:if test ="${item.id!=''}">
|
||||
<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading" />
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文件附件:</label>
|
||||
</div>
|
||||
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<!-- 流程打印布局 开始 -->
|
||||
<div id="roastExcuteDetail">
|
||||
<div class="printContent" style="display:none">
|
||||
<h4 style="text-align:center;">吐槽内容处理详情</h4>
|
||||
</div>
|
||||
<div class="printContent" style="display:none">
|
||||
<table style="border-collapse:collapse;margin:0 auto">
|
||||
<tr >
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
|
||||
</tr>
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
|
||||
<td style="border:1px solid black;width:300px;">${item.record}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文件附件:</label>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- 流程打印布局 结束-->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" onclick="printpage('roastExcuteDetail');"><i class="fa fa-print"></i>打印</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
191
WebRoot/jsp/accident/roastExecuteViewInModal.jsp
Normal file
191
WebRoot/jsp/accident/roastExecuteViewInModal.jsp
Normal file
@ -0,0 +1,191 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem='tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance='tb_maintenance_file'; //数据表
|
||||
var nameSpace='MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
resizeImage:true,
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:'',
|
||||
actionDelete:''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
var viewHandleDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${param.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'view';//有查看权限
|
||||
|
||||
$(function() {
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
$("#judgemaintainerstaff").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
$("#judgeresult").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
var result='${businessUnitRecords}';
|
||||
result=result.replace(new RegExp("\r\n","gm"),"");
|
||||
var json =JSON.parse(result);
|
||||
$.each(json, function(index, item) {
|
||||
if(item.id!=null &&item.id!=""){
|
||||
previews=new Array();
|
||||
$('#'+item.id).show();
|
||||
var data =item.files;
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");
|
||||
previews.push(path);
|
||||
previewConfig['width']= '30px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput(item.id);
|
||||
}
|
||||
});
|
||||
})
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
var printpage = function (myDiv){
|
||||
$('.printContent').show();
|
||||
var printHtml = document.getElementById(myDiv).innerHTML;
|
||||
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
|
||||
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
|
||||
wind.document.head.appendChild(link);
|
||||
wind.document.body.innerHTML = printHtml;
|
||||
wind.print();
|
||||
wind.close();
|
||||
$('.printContent').hide();
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise >
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
|
||||
<div>
|
||||
${item.record}
|
||||
</div>
|
||||
<c:if test ="${item.id!=''}">
|
||||
<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading" />
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- 流程打印布局 开始 -->
|
||||
<div id="roastExcuteDetail">
|
||||
<div class="printContent" style="display:none">
|
||||
<h4 style="text-align:center;">吐槽处理详情</h4>
|
||||
</div>
|
||||
<div class="printContent" style="display:none;">
|
||||
<table style="border-collapse:collapse;margin:0 auto">
|
||||
<tr >
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
|
||||
</tr>
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
|
||||
<td style="border:1px solid black;width:300px;">${item.record}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<%-- <label class="col-sm-4 control-label">文件附件:</label>--%>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
359
WebRoot/jsp/accident/roastListApp.jsp
Normal file
359
WebRoot/jsp/accident/roastListApp.jsp
Normal file
@ -0,0 +1,359 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail" %>
|
||||
<%@ 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" %>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%@page import="com.sipai.entity.accident.AccidentCommString" %>
|
||||
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
|
||||
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
|
||||
<%request.setAttribute("FINISH", AccidentCommString.STATUS_RA_FINISH); %>
|
||||
<%request.setAttribute("FAIL", AccidentCommString.STATUS_RA_FAIL); %>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.table-hover > tbody > tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.nav-tabs-custom {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
#contentAPP .col-xs-3, #contentAPP .col-xs-9, #contentAPP .col-xs-12 {
|
||||
padding-right: 0px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#contentAPP .panel {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#contentAPP .panel .row {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#contentAPP .panel-body {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var addFun = function () {
|
||||
$.post(ext.contextPath + '/accident/roast/doadd.do', {unitId: unitId}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/accident/roast/doedit.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function (id) {
|
||||
$.post(ext.contextPath + '/accident/roast/view.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function (id) {
|
||||
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 + '/accident/roast/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var deletesFun = function () {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
} else {
|
||||
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 + '/accident/roast/dodeletes.do', {ids: datas}, function (data) {
|
||||
if (data.code > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var roastProcessFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/accident/roast/showProcessRoastView.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('roastExcuteModal');
|
||||
});
|
||||
};
|
||||
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
//初始化采集类型选择框
|
||||
var refreshtypeForSelect = function () {
|
||||
var select = $("#typeForSelect").select2({
|
||||
data: null,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
});
|
||||
select.val("未提交").trigger("change");
|
||||
select.on("change", function (e) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
var companyId = unitId;
|
||||
$(function () {
|
||||
companyId = unitId;
|
||||
// refreshtypeForSelect();
|
||||
|
||||
initAPP();
|
||||
});
|
||||
|
||||
//导出设备表,要用get请求的方式
|
||||
function downloadFun() {
|
||||
var search_name = $("#search_name").val();
|
||||
var takeFlag = $("#typeForSelect").val();
|
||||
window.open(ext.contextPath + "/accident/roast/downloadExcel.do?unitId=" + unitId
|
||||
+ "&search_name=" + search_name
|
||||
+ "&takeFlag=" + takeFlag);
|
||||
}
|
||||
|
||||
function initAPP() {
|
||||
var htmlStr = '<div class="panel panel-default">' +
|
||||
'<div class="panel-body text-center">正在努力加载的数据中,请稍后......</div>' +
|
||||
'</div>';
|
||||
$("#contentAPP").html(htmlStr);
|
||||
var list = {};
|
||||
// 存在
|
||||
$.ajax({
|
||||
//请求方式
|
||||
type: "POST",
|
||||
//请求的媒体类型
|
||||
contentType: "application/json;charset=UTF-8",
|
||||
//请求地址
|
||||
url: ext.contextPath + '/accident/roast/getlistApp.do',
|
||||
//数据,json字符串
|
||||
data: JSON.stringify(list),
|
||||
dataType: "json",
|
||||
//请求成功
|
||||
success: function (result) {
|
||||
console.log(result);
|
||||
htmlStr = '';
|
||||
if (result.length > 0) {
|
||||
$.each(result, function (key, value) {
|
||||
var str = "";
|
||||
/*if (!value.task.assignee) {
|
||||
str += '<button class="btn btn-default btn-sm" onclick="claimFun(\'' + value.task.id + '\')" data-toggle="tooltip" title="签收"><i class="fa fa-tag"></i><span class="hidden-md hidden-lg"> 签收</span></button>';
|
||||
} else {
|
||||
if (value.type.indexOf('${KPI_MAKE_PLAN}') != -1 || value.type.indexOf('${KPI_MARK}') != -1 || value.type.indexOf('${OVERHAUL}') != -1) {
|
||||
str += '<button class="btn btn-default btn-sm" onclick="viewDetailFun(\'' + value.processInstance.businessKey + '\',\'' + value.type + '\',\'' + value.task.id + '\',\'' + value.task.status + '\',\'' + value.processInstance.id + '\')" data-toggle="tooltip" title="查看详情"><i class="fa fa-history"></i><span class="hidden-md hidden-lg"> 查看详情</span></button>'
|
||||
}
|
||||
if (value.business != null) {
|
||||
str += '<button class="btn btn-default btn-sm" onclick="gotoTaskFun(\'' + value.type + '\',\'' + value.business.status + '\',\'' + value.processInstance.id + '\',\'' + value.task.id + '\',\'' + value.processInstance.businessKey + '\');" data-toggle="tooltip" title="处理">' +
|
||||
'<i class="fa fa-play"></i><span class="hidden-md hidden-lg"> 处理 </span></button>';
|
||||
}
|
||||
}*/
|
||||
console.log(value.takeFlag);
|
||||
if (value.takeFlag == '${START}') {
|
||||
str += '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + value.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
str += '<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\'' + value.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
} else {
|
||||
str += '<button class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + value.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg">浏览</span></button>';
|
||||
}
|
||||
|
||||
htmlStr += '<div class="panel panel-default">' +
|
||||
'<div class="panel-body app-title">' +
|
||||
'<div class="row">' +
|
||||
'<div class="col-xs-3">吐槽时间:</div><div class="col-xs-9 app-content">' + value.insdt.substring(0, 10) + '</div>' +
|
||||
'</div>' +
|
||||
'<div class="row">' +
|
||||
'<div class="col-xs-3">吐槽名称:</div><div class="col-xs-9 app-datetime">' + value.name + '</div>' +
|
||||
'</div>' +
|
||||
'<div class="row">' +
|
||||
'<div class="col-xs-3">吐槽内容:</div><div class="col-xs-9 app-content">' + value.content + '</div>' +
|
||||
'</div>' +
|
||||
'<div class="row">' +
|
||||
'<div class="col-xs-3">操作:</div><div class="col-xs-9"><div class="btn-group app-content" >' + str + '</div></div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
})
|
||||
} else {
|
||||
htmlStr = '<div class="panel panel-default">' +
|
||||
'<div class="panel-body text-center">没有找到匹配的记录</div>' +
|
||||
'</div>';
|
||||
}
|
||||
$("#contentAPP").html(htmlStr);
|
||||
},
|
||||
//请求失败,包含具体的错误信息
|
||||
error: function (e) {
|
||||
console.log(e.status);
|
||||
console.log(e.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="subDivAbnorm"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="library4SelectDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
|
||||
<div class="form-group form-inline" style="padding:0;">
|
||||
<div class="btn-group" style="width: 280px;">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i> 删除
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-right form-inline hidden-xs">
|
||||
<div class="input-group input-group-sm ">
|
||||
<label class="form-label">状态:</label>
|
||||
<select type="text" id="typeForSelect" class="form-control pull-right"
|
||||
name="typeForSelect" style="width: 120px;">
|
||||
<option value="${START}">未提交</option>
|
||||
<option value="${AUDIT}">已提交</option>
|
||||
<option value="${FINISH}">已通过</option>
|
||||
<option value="${FAIL}">未通过</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right"
|
||||
style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i
|
||||
class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="contentAPP">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body text-center">正在努力加载的数据中,请稍后......</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- bootstrap switch -->
|
||||
<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>
|
||||
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
</html>
|
||||
375
WebRoot/jsp/accident/roastListWeb.jsp
Normal file
375
WebRoot/jsp/accident/roastListWeb.jsp
Normal file
@ -0,0 +1,375 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail" %>
|
||||
<%@ 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" %>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%@page import="com.sipai.entity.accident.AccidentCommString" %>
|
||||
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
|
||||
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
|
||||
<%request.setAttribute("FINISH", AccidentCommString.STATUS_RA_FINISH); %>
|
||||
<%request.setAttribute("FAIL", AccidentCommString.STATUS_RA_FAIL); %>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.table-hover > tbody > tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var addFun = function () {
|
||||
$.post(ext.contextPath + '/accident/roast/doadd.do', {unitId: unitId}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/accident/roast/doedit.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function (id) {
|
||||
$.post(ext.contextPath + '/accident/roast/view.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function (id) {
|
||||
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 + '/accident/roast/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function () {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
} else {
|
||||
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 + '/accident/roast/dodeletes.do', {ids: datas}, function (data) {
|
||||
if (data.code > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var roastProcessFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/accident/roast/showProcessRoastView.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('roastExcuteModal');
|
||||
});
|
||||
};
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
//初始化采集类型选择框
|
||||
var refreshtypeForSelect = function () {
|
||||
var select = $("#typeForSelect").select2({
|
||||
data: null,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
});
|
||||
select.val("未提交").trigger("change");
|
||||
select.on("change", function (e) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
|
||||
};
|
||||
var companyId = unitId;
|
||||
$(function () {
|
||||
companyId = unitId;
|
||||
refreshtypeForSelect();
|
||||
initFun();
|
||||
});
|
||||
var initFun = function () {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/accident/roast/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: unitId,
|
||||
takeFlag: $("#typeForSelect").val(),
|
||||
// statusSelect:$("#statusSelect").val(),
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
}, {
|
||||
field: 'caption', // 返回json数据中的name
|
||||
title: '吐槽人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
if(value!=null && value!=''){
|
||||
return value;
|
||||
}else{
|
||||
return '匿名';
|
||||
}
|
||||
}
|
||||
}, {
|
||||
field: 'adviceType', // 返回json数据中的name
|
||||
title: '吐槽类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '吐槽名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'content', // 返回json数据中的name
|
||||
title: '吐槽内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 10);
|
||||
}
|
||||
}, {
|
||||
field: 'takeFlag', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
switch (value) {
|
||||
case '${FAIL}' :
|
||||
return "未通过";
|
||||
case '${FINISH}' :
|
||||
return "已通过";
|
||||
case '${START}' :
|
||||
return "未提交";
|
||||
case '${AUDIT}' :
|
||||
return "已提交";
|
||||
default :
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
if (row.takeFlag == '${START}') {
|
||||
buts += '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
} else {
|
||||
buts += '<button class="btn btn-default btn-sm" title="浏览" onclick="viewFun(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg">浏览</span></button>';
|
||||
// buts += '<button class="btn btn-default btn-sm" title="流程详情" onclick="roastProcessFun(\'' + row.id + '\')"><i class="fa fa-history"></i><span class="hidden-md hidden-lg">流程详情</span></button>';
|
||||
}
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
//导出设备表,要用get请求的方式
|
||||
function downloadFun() {
|
||||
var search_name = $("#search_name").val();
|
||||
var takeFlag = $("#typeForSelect").val();
|
||||
|
||||
window.open(ext.contextPath + "/accident/roast/downloadExcel.do?unitId=" + unitId
|
||||
+ "&search_name=" + search_name
|
||||
+ "&takeFlag=" + takeFlag);
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv" style="width: 220px;"></div>
|
||||
<div id="subDivAbnorm"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="library4SelectDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div>
|
||||
<%--<div class="form-group">
|
||||
<input id="search_pid" name="search_pid" type="hidden"/>
|
||||
<span id="companyName"
|
||||
style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
|
||||
</div>--%>
|
||||
<div class="form-group form-inline" style="padding:0;">
|
||||
<div class="btn-group" style="width: 280px;">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i> 删除
|
||||
</button>
|
||||
<%--<button type="button" class="btn btn-default btn-sm" onclick="downloadFun();"><i
|
||||
class="fa fa-cloud-download"></i> 导出
|
||||
</button>--%>
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-right form-inline hidden-xs">
|
||||
<div class="input-group input-group-sm ">
|
||||
<label class="form-label">状态:</label>
|
||||
<select type="text" id="typeForSelect" class="form-control pull-right"
|
||||
name="typeForSelect" style="width: 120px;">
|
||||
<option value="${START}">未提交</option>
|
||||
<option value="${AUDIT}">已提交</option>
|
||||
<option value="${FINISH}">已通过</option>
|
||||
<option value="${FAIL}">未通过</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right"
|
||||
style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i
|
||||
class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- bootstrap switch -->
|
||||
<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>
|
||||
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
</html>
|
||||
318
WebRoot/jsp/accident/roastListtake.jsp
Normal file
318
WebRoot/jsp/accident/roastListtake.jsp
Normal file
@ -0,0 +1,318 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail"%>
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%request.setAttribute("Finish", MaintenanceDetail.Status_Finish); %>
|
||||
<%request.setAttribute("Start", MaintenanceDetail.Status_Start); %>
|
||||
<%request.setAttribute("Wait", MaintenanceDetail.Status_Wait); %>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
.table-hover>tbody>tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/accident/roast/doadd.do', {unitId:unitId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/accident/roast/doedittake.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/accident/roast/doview.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
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 + '/accident/roast/dodelete.do', {id : id}, function(data) {
|
||||
if(data.code=="1"){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/accident/roast/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data.code>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
var companyId = unitId;
|
||||
$(function() {
|
||||
companyId = unitId;
|
||||
initFun();
|
||||
});
|
||||
var initFun = function(){
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/accident/roast/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: unitId,
|
||||
takeFlag: "已提交",
|
||||
// statusSelect:$("#statusSelect").val(),
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'caption', // 返回json数据中的name
|
||||
title: '吐槽人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'adviceType', // 返回json数据中的name
|
||||
title: '吐槽类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '吐槽名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'company.name', // 返回json数据中的name
|
||||
title: '部门', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
return value.substring(0,10);
|
||||
}
|
||||
},{
|
||||
field: 'takeFlag', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts="";
|
||||
|
||||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv" style="width: 220px;height:10px;"></div>
|
||||
<div id="subDivAbnorm"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="library4SelectDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div >
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
|
||||
</div>
|
||||
<div class="form-group form-inline" style="padding:0;">
|
||||
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
|
||||
<!-- <security:authorize buttonUrl="maintenance/abnormity/add.do"> -->
|
||||
<!-- <button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
|
||||
<!--
|
||||
<button type="button" class="btn btn-default btn-sm" title="异常中有设备的生成维修,没设备的生成缺陷" onclick="createDefectFun();"><i class="fa fa-send-o"></i>生成缺陷或维修单</button> -->
|
||||
<!-- </security:authorize> -->
|
||||
</div>
|
||||
<!--
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="form-group">
|
||||
<label class="form-label">工艺段:</label>
|
||||
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 160px;"></select>
|
||||
<label class="form-label">状态:</label>
|
||||
<select class="form-control select2 " id="statusSelect" name ="statusSelect" style="width: 160px;">
|
||||
<option value= "${Wait}">待处理</option>
|
||||
<option value= "${Start}">处理中</option>
|
||||
<option value= "${Finish}">已完成</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- bootstrap switch -->
|
||||
<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>
|
||||
</html>
|
||||
161
WebRoot/jsp/accident/roastView.jsp
Normal file
161
WebRoot/jsp/accident/roastView.jsp
Normal file
@ -0,0 +1,161 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@page import="com.sipai.entity.accident.AccidentCommString" %>
|
||||
<%request.setAttribute("START", AccidentCommString.STATUS_RA_START); %>
|
||||
<%request.setAttribute("AUDIT", AccidentCommString.STATUS_RA_AUDIT); %>
|
||||
<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 masterId1 = '${roast.id}';
|
||||
var tbName1 = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace1 = 'ProcessUploadFile';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
//以下为上传图片
|
||||
//名称定义不可修改
|
||||
var getFileList = function () {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId: masterId1, tbName: tbName1}, function (data) {
|
||||
//console.info(data)
|
||||
if (data.length > 0) {
|
||||
previews = new Array();
|
||||
$('#maintenancefile').show();
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path = path.substring(path.indexOf('webapps') + 7, path.length);
|
||||
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");
|
||||
;
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '50px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
console.log(data[i].filename)
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("maintenanceDetailFile");
|
||||
} else {
|
||||
$('#maintenanceDetailFile').hide();
|
||||
}
|
||||
}, 'json');
|
||||
};
|
||||
|
||||
var getProcessList = function () {
|
||||
//加载维修流程
|
||||
$.post(ext.contextPath + '/accident/roast/showProcessRoastView.do', {
|
||||
id: masterId1,
|
||||
inModal: 'inModal'
|
||||
}, function (data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
getFileList();
|
||||
getProcessList();
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<%-- <div class="modal-dialog modal-xlg">--%>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">查看</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-xs-12">
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name="id" value="${roast.id}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽名称</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${roast.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽类型</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${roast.adviceType}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽内容</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${roast.content}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否匿名</label>
|
||||
<div class="col-sm-10">
|
||||
<c:if test="${roast.anonymous==0}">
|
||||
<p class="form-control-static">否</p>
|
||||
</c:if>
|
||||
<c:if test="${roast.anonymous==1}">
|
||||
<p class="form-control-static">是</p>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">吐槽人</label>
|
||||
<div class="col-sm-10">
|
||||
<c:if test="${roast.userLead!=null && roast.userLead!= ''}">
|
||||
<p class="form-control-static">${solvername}</p>
|
||||
</c:if>
|
||||
<c:if test="${roast.userLead==null || roast.userLead== ''}">
|
||||
<p class="form-control-static">匿名</p>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--<div class="form-group">
|
||||
<label class="col-sm-2 control-label">辅议人</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${solvername1}</p>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">审核人</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${roast.auditManName}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="maintenanceDetailFile" id="maintenanceDetailFile" multiple
|
||||
class="file-loading"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<%--<div class="col-md-5 col-xs-12" id="showView"></div>--%>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
249
WebRoot/jsp/achievement/MPoint4Select.jsp
Normal file
249
WebRoot/jsp/achievement/MPoint4Select.jsp
Normal file
@ -0,0 +1,249 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<script type="text/javascript">
|
||||
var doSearchPatrolPoint = function() {
|
||||
$("#table_patrolPoint4Select").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
function doSelect(dialog,grid) {
|
||||
//var checkedItems = $("#table_user").bootstrapTable('getAllSelections');
|
||||
var datas="";
|
||||
datas_name="";
|
||||
$.each(selectionIds, function(index, item){
|
||||
if(datas!=""){
|
||||
datas+=",";
|
||||
}
|
||||
datas+=item;
|
||||
});
|
||||
//调用上一界面方法完成选择
|
||||
doFinishSelectMPoint(datas);
|
||||
closeModal("MPointModel");
|
||||
};
|
||||
|
||||
function stateFormatter(value, row, index) {
|
||||
var flag=false;
|
||||
$.each(eval('${mPoints}'), function(index, item){
|
||||
if(row.id==item.id){
|
||||
flag=true;
|
||||
}
|
||||
});
|
||||
if (flag){
|
||||
return {
|
||||
checked : true//设置选中
|
||||
};
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
var $table;
|
||||
var switchStatus=false;
|
||||
var selectionIds = [];
|
||||
|
||||
function initialSelectionIds(){
|
||||
var check_array =eval('${mPoints}');
|
||||
if(check_array!=null&& check_array.length>0){
|
||||
selectionIds =new Array(check_array.length);
|
||||
for(var i=0;i<check_array.length;i++){
|
||||
selectionIds[i]=check_array[i].id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getCheckedIds(){
|
||||
var ids="";
|
||||
var check_array =eval('${mPoints}');
|
||||
$.each(check_array, function(index, item){
|
||||
if(ids!=""){
|
||||
ids+=",";
|
||||
}
|
||||
ids+=item.id;
|
||||
});
|
||||
return ids;
|
||||
}
|
||||
|
||||
function queryParams(params) {
|
||||
var temp={
|
||||
rows: params.limit,
|
||||
page: params.offset/params.limit+1,
|
||||
sort: params.sort,
|
||||
order: params.order,
|
||||
search_name: $('#search_name_mpoint').val(),
|
||||
companyId: unitId
|
||||
}
|
||||
var status =$('#switchBtn').bootstrapSwitch('state');
|
||||
if(status){
|
||||
temp.checkedIds=getCheckedIds();
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#searchForm_MPoint").attr("onsubmit", "return false;");
|
||||
$("#search_name_mpoint").keyup(function () {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
doSearchPatrolPoint();
|
||||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
$('#searchBox').boxWidget();
|
||||
$('#switchBtn').bootstrapSwitch({
|
||||
onText:'是',
|
||||
offText:'否',
|
||||
size:"small",
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
||||
|
||||
initialSelectionIds();
|
||||
|
||||
$table=$("#table_patrolPoint4Select").bootstrapTable({
|
||||
url: ext.contextPath + '/work/mpoint/getlist.do',
|
||||
clickToSelect:true,
|
||||
striped: true,
|
||||
pagination: true,
|
||||
pageList: [10, 20],
|
||||
pageSize: 20,
|
||||
pageNumber: 1,
|
||||
sidePagination: 'server',
|
||||
clickToSelect:true,
|
||||
responseHandler:responseHandler,
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'id',
|
||||
sortOrder: 'asc',
|
||||
columns: [
|
||||
{
|
||||
checkbox: true,
|
||||
formatter: function (i,row) {
|
||||
if($.inArray(row.id,Array.from(selectionIds))!=-1){
|
||||
return {
|
||||
checked : true
|
||||
}
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'parmname',
|
||||
title: "名称",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '50%'
|
||||
},{
|
||||
field: 'mpointcode',
|
||||
title: "测量点Code",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '50%'
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){
|
||||
adjustBootstrapTableView("table_patrolPoint4Select");
|
||||
},
|
||||
onLoadError: function(){
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e,rows, obj) {
|
||||
var ids = $.map(!$.isArray(rows) ? [rows] : rows, function (row) {
|
||||
return row.id;
|
||||
});
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
selectionIds = _[func](selectionIds, ids);
|
||||
if('check'==e.type){
|
||||
obj.parent().addClass("checked");
|
||||
}else{
|
||||
obj.parent().removeClass("checked");
|
||||
}
|
||||
});
|
||||
});
|
||||
//选中事件操作数组
|
||||
var union = function(array,ids){
|
||||
$.each(ids, function (i, id) {
|
||||
if($.inArray(id,array)==-1){
|
||||
array[array.length] = id;
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
//取消选中事件操作数组
|
||||
var difference = function(array,ids){
|
||||
$.each(ids, function (i, id) {
|
||||
var index = $.inArray(id,array);
|
||||
if(index!=-1){
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
var _ = {"union":union,"difference":difference};
|
||||
|
||||
//表格分页之前处理多选框数据
|
||||
function responseHandler(res) {
|
||||
$.each(res.rows, function (i, row) {
|
||||
row.checkStatus = $.inArray(row.id, selectionIds) != -1;
|
||||
});
|
||||
return res;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="MPointModel">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择测量点</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="width:100%">
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="box box-primary box-solid collapsed-box" id="searchBox" collapsed>
|
||||
<div class="box-header">
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-primary btn-sm pull-right" data-widget="collapse"
|
||||
style="margin-right: 5px;">
|
||||
<i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /. tools -->
|
||||
<i class="fa fa-search"></i>
|
||||
</div>
|
||||
<div class="box-body collapse" >
|
||||
<form class="form-horizontal " id="searchForm_MPoint">
|
||||
<div class="form-group" style="margin-right: 20px;">
|
||||
<!-- <label class="col-sm-2 control-label">部门</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="search_pid" name ="search_pid" style="width:170px;"></select>
|
||||
</div> -->
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" id="search_name_mpoint" name="search_name_mpoint" class="form-control input-sm" placeholder="名称" style="width:170px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin-right: 20px;">
|
||||
<label class="col-sm-2 control-label">只看选中</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id ="switchBtn" type="checkbox" />
|
||||
</div>
|
||||
</div>
|
||||
<div class=" col-sm-offset-6 button-group" style="padding: 0;">
|
||||
<button type ="button" class="btn btn-default btn-sm pull-right" onclick="doSearchPatrolPoint();"><i class="fa fa-search"> 搜索</i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="table_patrolPoint4Select" style="height:230px;overflow:auto;width:100%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSelect()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
264
WebRoot/jsp/achievement/MPoint4Select4Single.jsp
Normal file
264
WebRoot/jsp/achievement/MPoint4Select4Single.jsp
Normal file
@ -0,0 +1,264 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%@page import="com.sipai.entity.scada.MPoint"%>
|
||||
<%request.setAttribute("Flag_Enable",MPoint.Flag_Enable);%>
|
||||
<%request.setAttribute("Flag_Disable",MPoint.Flag_Disable);%>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dosearchMp = function() {
|
||||
$("#table_mpoint").bootstrapTable('refresh');
|
||||
};
|
||||
function doselect(dialog,grid) {
|
||||
//var checkedItems = $("#table_user").bootstrapTable('getAllSelections');
|
||||
var datas_name="";
|
||||
var value_name="";
|
||||
var datas_code="";
|
||||
if(checkedItem!= null && checkedItem!=""){
|
||||
$.post(ext.contextPath + '/work/mpoint/getlist.do', {companyId:unitId,checkedIds : checkedItem.id,page:1,rows:50}, function(resp) {
|
||||
//console.info(checkedItem.id)
|
||||
$.each(resp.rows, function(index, item){
|
||||
datas_name=item.parmname;//测量点一次只能添加一个
|
||||
value_name=item.parmvalue;
|
||||
datas_code=item.mpointcode;
|
||||
});
|
||||
// console.log("formid","${param.formId}");
|
||||
// console.log("formid","${param.hiddenId}");
|
||||
// console.log(companyId);
|
||||
$('#${param.formId} #${param.hiddenId}' ).val(checkedItem.id);
|
||||
$('#${param.formId} #${param.textId}').val(datas_name);
|
||||
if('${param.valueId}'!=''){
|
||||
$('#${param.formId} #${param.valueId}').val(value_name);
|
||||
}
|
||||
if('${param.codeId}'!=''){
|
||||
$('#${param.formId} #${param.codeId}').val(datas_code);
|
||||
}
|
||||
if('${param.unitId}'!=''){
|
||||
$('#${param.formId} #${param.unitId}').val(unitId);
|
||||
}
|
||||
|
||||
|
||||
closeModal('mpSubModal');
|
||||
},'json');
|
||||
}else{
|
||||
showAlert('d','尚未选择测量点!','mpoint_mainAlertdiv');
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
//显示已经勾选的数据
|
||||
function stateFormatter(value, row, index) {
|
||||
var flag=false;
|
||||
if(row.id=='${mpid}'){
|
||||
flag=true;
|
||||
checkedItem = "";
|
||||
}
|
||||
if (flag)
|
||||
return {
|
||||
checked : true//设置选中
|
||||
};
|
||||
return value;
|
||||
}
|
||||
|
||||
var $table;
|
||||
|
||||
function queryParams(params) {
|
||||
|
||||
var temp={
|
||||
pid:params.pid,
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
search_name: $('#search_mpointname').val(),
|
||||
search_mpointcode: $('#search_mpointcode').val(),
|
||||
companyId:unitId
|
||||
};
|
||||
/* var status =$('#switchBtn').bootstrapSwitch('state')
|
||||
if(status){
|
||||
temp.checkedIds=getCheckedIds();
|
||||
}
|
||||
*/ return temp;
|
||||
}
|
||||
$(function() {
|
||||
/* $.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
|
||||
if(data.length == 1){
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
$("#search_code").css("display", "none");
|
||||
$("#company").text(data[0].text);
|
||||
companyId=data[0].id;
|
||||
dosearchMp();
|
||||
}else{
|
||||
$("#company").css("display", "none");
|
||||
var selelct=$("#search_code").select2({
|
||||
data : data ,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 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('').trigger("change");
|
||||
//refreshSelect();
|
||||
selelct.on("change",function(e){
|
||||
companyId= $(this).val();
|
||||
dosearchMp();
|
||||
});
|
||||
}
|
||||
},'json'); */
|
||||
//简易公司combotree
|
||||
|
||||
|
||||
//initialSelectionIds();
|
||||
//alert();
|
||||
$table=$("#table_mpoint").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/work/mpoint/getlist.do', // 获取表格数据的url
|
||||
//cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
clickToSelect:true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
//responseHandler:responseHandler, //在渲染页面数据之前执行的方法,此配置很重要!!!!!!!
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
/* showColumns: true,
|
||||
showRefresh: true, */
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
formatter: stateFormatter
|
||||
},{
|
||||
field: 'mpointcode', // 返回json数据中的name
|
||||
title: '测量点Code', // 表格表头显示文字
|
||||
sortable : true,
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'parmname', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
sortable : true,
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'signaltype', // 返回json数据中的name
|
||||
title: '信号类型', // 表格表头显示文字
|
||||
sortable : true,
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'active', // 返回json数据中的name
|
||||
title: '启用状态', // 表格表头显示文字
|
||||
sortable : true,
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter : function(value, row) {
|
||||
if('${Flag_Enable}'==value){
|
||||
return "启用";
|
||||
}else{
|
||||
return "禁用";
|
||||
}
|
||||
|
||||
} // 上下居中
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table_mpoint");
|
||||
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//绑定选中事件、取消事件、全部选中、全部取消
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e,rows, obj) {
|
||||
if('check'==e.type){
|
||||
$('#table_mpoint .checked').removeClass("checked");
|
||||
obj.parent().addClass("checked");
|
||||
checkedItem = rows;
|
||||
}else{
|
||||
obj.parent().removeClass("checked");
|
||||
checkedItem = "";
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="mpSubModal" >
|
||||
<div class="modal-dialog modal-md" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择测量点</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div id="mpoint_mainAlertdiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="modal-body">
|
||||
<!-- <div class="form-group">
|
||||
<label class="form-label" id="companylabel">水厂:</label>
|
||||
<label class="form-label" id="company" style="width:180px;border: none;background: transparent;" ></label>
|
||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select>
|
||||
</div> -->
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<input id="search_code" name="search_code" type="hidden" />
|
||||
<span id="company" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="input-group input-group-sm " style="width: 220px;margin-left:30px">
|
||||
<input type="text" id="search_mpointname" name="search_mpointname" class="form-control pull-right" placeholder="点位名称">
|
||||
</div>
|
||||
<div class="input-group input-group-sm " style="width: 220px;">
|
||||
|
||||
<input type="text" id="search_mpointcode" name="search_mpointcode" class="form-control " placeholder="点位编码">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearchMp();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <button type="button" class="btn btn-default" onclick="addFun();"><i class="fa fa-plus"></i> 重置</button> -->
|
||||
</div>
|
||||
<!-- <div class="form-group " style="padding:0;">
|
||||
<label class="form-label">班组</label>
|
||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select>
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group input-group-sm" style="width: 500px;">
|
||||
<input type="text" id="search_pid" name="search_pid" class="form-control pull-right" style="width: 200px;" placeholder="所属车间">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" style="width: 200px;margin-right:10px" placeholder="系统名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> -->
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-bordered table-striped" style="overflow:auto;width:100%" id="table_mpoint"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doselect()" id="btn_save">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
249
WebRoot/jsp/achievement/Output4Select.jsp
Normal file
249
WebRoot/jsp/achievement/Output4Select.jsp
Normal file
@ -0,0 +1,249 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<script type="text/javascript">
|
||||
var doSearchPatrolPoint = function() {
|
||||
$("#table_patrolPoint4Select").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
function doSelect(dialog,grid) {
|
||||
//var checkedItems = $("#table_user").bootstrapTable('getAllSelections');
|
||||
var datas="";
|
||||
datas_name="";
|
||||
$.each(selectionIds, function(index, item){
|
||||
if(datas!=""){
|
||||
datas+=",";
|
||||
}
|
||||
datas+=item;
|
||||
});
|
||||
//调用上一界面方法完成选择
|
||||
doFinishSelectOutput(datas);
|
||||
closeModal("MPointModel");
|
||||
};
|
||||
|
||||
function stateFormatter(value, row, index) {
|
||||
var flag=false;
|
||||
$.each(eval('${mPoints}'), function(index, item){
|
||||
if(row.id==item.id){
|
||||
flag=true;
|
||||
}
|
||||
});
|
||||
if (flag){
|
||||
return {
|
||||
checked : true//设置选中
|
||||
};
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
var $table;
|
||||
var switchStatus=false;
|
||||
var selectionIds = [];
|
||||
|
||||
function initialSelectionIds(){
|
||||
var check_array =eval('${mPoints}');
|
||||
if(check_array!=null&& check_array.length>0){
|
||||
selectionIds =new Array(check_array.length);
|
||||
for(var i=0;i<check_array.length;i++){
|
||||
selectionIds[i]=check_array[i].id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getCheckedIds(){
|
||||
var ids="";
|
||||
var check_array =eval('${mPoints}');
|
||||
$.each(check_array, function(index, item){
|
||||
if(ids!=""){
|
||||
ids+=",";
|
||||
}
|
||||
ids+=item.id;
|
||||
});
|
||||
return ids;
|
||||
}
|
||||
|
||||
function queryParams(params) {
|
||||
var temp={
|
||||
rows: params.limit,
|
||||
page: params.offset/params.limit+1,
|
||||
sort: params.sort,
|
||||
order: params.order,
|
||||
search_name: $('#search_name_mpoint').val(),
|
||||
companyId: unitId
|
||||
}
|
||||
var status =$('#switchBtn').bootstrapSwitch('state');
|
||||
if(status){
|
||||
temp.checkedIds=getCheckedIds();
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#searchForm_MPoint").attr("onsubmit", "return false;");
|
||||
$("#search_name_mpoint").keyup(function () {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
doSearchPatrolPoint();
|
||||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
$('#searchBox').boxWidget();
|
||||
$('#switchBtn').bootstrapSwitch({
|
||||
onText:'是',
|
||||
offText:'否',
|
||||
size:"small",
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
||||
|
||||
initialSelectionIds();
|
||||
|
||||
$table=$("#table_patrolPoint4Select").bootstrapTable({
|
||||
url: ext.contextPath + '/work/mpoint/getlist.do',
|
||||
clickToSelect:true,
|
||||
striped: true,
|
||||
pagination: true,
|
||||
pageList: [10, 20],
|
||||
pageSize: 20,
|
||||
pageNumber: 1,
|
||||
sidePagination: 'server',
|
||||
clickToSelect:true,
|
||||
responseHandler:responseHandler,
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'id',
|
||||
sortOrder: 'asc',
|
||||
columns: [
|
||||
{
|
||||
checkbox: true,
|
||||
formatter: function (i,row) {
|
||||
if($.inArray(row.id,Array.from(selectionIds))!=-1){
|
||||
return {
|
||||
checked : true
|
||||
}
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'parmname',
|
||||
title: "名称",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '50%'
|
||||
},{
|
||||
field: 'mpointcode',
|
||||
title: "测量点Code",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '50%'
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){
|
||||
adjustBootstrapTableView("table_patrolPoint4Select");
|
||||
},
|
||||
onLoadError: function(){
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e,rows, obj) {
|
||||
var ids = $.map(!$.isArray(rows) ? [rows] : rows, function (row) {
|
||||
return row.id;
|
||||
});
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
selectionIds = _[func](selectionIds, ids);
|
||||
if('check'==e.type){
|
||||
obj.parent().addClass("checked");
|
||||
}else{
|
||||
obj.parent().removeClass("checked");
|
||||
}
|
||||
});
|
||||
});
|
||||
//选中事件操作数组
|
||||
var union = function(array,ids){
|
||||
$.each(ids, function (i, id) {
|
||||
if($.inArray(id,array)==-1){
|
||||
array[array.length] = id;
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
//取消选中事件操作数组
|
||||
var difference = function(array,ids){
|
||||
$.each(ids, function (i, id) {
|
||||
var index = $.inArray(id,array);
|
||||
if(index!=-1){
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
var _ = {"union":union,"difference":difference};
|
||||
|
||||
//表格分页之前处理多选框数据
|
||||
function responseHandler(res) {
|
||||
$.each(res.rows, function (i, row) {
|
||||
row.checkStatus = $.inArray(row.id, selectionIds) != -1;
|
||||
});
|
||||
return res;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="MPointModel">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择测量点</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="width:100%">
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="box box-primary box-solid collapsed-box" id="searchBox" collapsed>
|
||||
<div class="box-header">
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-primary btn-sm pull-right" data-widget="collapse"
|
||||
style="margin-right: 5px;">
|
||||
<i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /. tools -->
|
||||
<i class="fa fa-search"></i>
|
||||
</div>
|
||||
<div class="box-body collapse" >
|
||||
<form class="form-horizontal " id="searchForm_MPoint">
|
||||
<div class="form-group" style="margin-right: 20px;">
|
||||
<!-- <label class="col-sm-2 control-label">部门</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="search_pid" name ="search_pid" style="width:170px;"></select>
|
||||
</div> -->
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" id="search_name_mpoint" name="search_name_mpoint" class="form-control input-sm" placeholder="名称" style="width:170px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin-right: 20px;">
|
||||
<label class="col-sm-2 control-label">只看选中</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id ="switchBtn" type="checkbox" />
|
||||
</div>
|
||||
</div>
|
||||
<div class=" col-sm-offset-6 button-group" style="padding: 0;">
|
||||
<button type ="button" class="btn btn-default btn-sm pull-right" onclick="doSearchPatrolPoint();"><i class="fa fa-search"> 搜索</i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="table_patrolPoint4Select" style="height:230px;overflow:auto;width:100%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSelect()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
35
WebRoot/jsp/achievement/acceptanceModel4Select.jsp
Normal file
35
WebRoot/jsp/achievement/acceptanceModel4Select.jsp
Normal file
@ -0,0 +1,35 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModel/getAcceptanceModelJson.do', {unitId:unitId} , function(data) {
|
||||
if(data.length>0){
|
||||
$('#menu_select_tree').treeview({
|
||||
data: data,
|
||||
});
|
||||
$('#menu_select_tree').on('nodeSelected', function(event, data) {
|
||||
$('#${param.formId} #${param.hiddenId}' ).val(data.id);
|
||||
$('#${param.formId} #${param.textId}').val(data.text);
|
||||
closeModal("menu4SelectModal")
|
||||
});
|
||||
}
|
||||
},'json');
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="menu4SelectModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">选择菜单</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="menu_select_tree" style="height:430px;overflow:auto;width:100%"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
242
WebRoot/jsp/achievement/acceptanceModelAdd.jsp
Normal file
242
WebRoot/jsp/achievement/acceptanceModelAdd.jsp
Normal file
@ -0,0 +1,242 @@
|
||||
<%@ 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 masterId='${id}';
|
||||
var tbName='TB_Achievement_AcceptanceModel_file'; //数据表
|
||||
var nameSpace='AcceptanceModel';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:''
|
||||
},
|
||||
deleteUrl:ext.contextPath+"/base/deleteInputFile.do",
|
||||
deleteExtraData:function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
//名称定义不可修改
|
||||
var getFileList = function() {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId,tbName:tbName} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
previews=new Array();
|
||||
// $('#maintenancefile').show();
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
|
||||
previews.push(path);
|
||||
previewConfig['width']= '50px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("acceptanceModelFile");
|
||||
}else{
|
||||
$('#acceptanceModelFile').hide();
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
var fileinput = function() {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {masterId:masterId,tbName:tbName,nameSpace:nameSpace} , function(data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
var showMenu4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModel/showAcceptanceModel4Select.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#menu4SelectDiv").html(data);
|
||||
openModal("menu4SelectModal")
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#userid").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"userid",textId:"auditMan",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModel/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: '顺序必须为数字'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$("#active").select2({ minimumResultsForSearch: 10 }).val("启用").trigger("change");
|
||||
});
|
||||
</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="id" name="id" type="hidden" value="${id}"/>
|
||||
<input id="unitId" name="unitId" type="hidden" value="${param.unitId}"/>
|
||||
<!-- 界面提醒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="${acceptanceModel.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}">
|
||||
<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="modelgoal" name ="modelgoal" placeholder="模型目的" value="${acceptanceModel.modelgoal }">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">评分验收标准</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="checkstandard" name ="checkstandard" placeholder="评分验收标准" value="${acceptanceModel.checkstandard }">
|
||||
</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="requirement" name ="requirement" placeholder="填报要求" value="${acceptanceModel.requirement }">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">所属厂区</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${_bizname}</p>
|
||||
</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="morder" name ="morder" placeholder="顺序" value="${acceptanceModel.morder}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="active" name="active" class="form-control select2">
|
||||
<option value="启用" selected>启用</option>
|
||||
<option value="禁用">禁用</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" rows="2" id ="auditMan" name ="auditMan" placeholder="点击选择" onclick="showUser4SelectsFun();" value="${examPlan.memo}"></textarea>
|
||||
<input id="userid" name="userid" type="hidden" />
|
||||
</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="请输入">${acceptanceModel.remark}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 col-md-2"></div>
|
||||
<div class="col-sm-4 col-md-4">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput()" id="btn_save"><i class="fa fa-paperclip"></i>上传模板</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 col-md-2"></div>
|
||||
<div class="col-sm-4 col-md-4">
|
||||
<input type="file" name="acceptanceModelFile" id="acceptanceModelFile" multiple class="file-loading" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
98
WebRoot/jsp/achievement/acceptanceModelCreateManage.jsp
Normal file
98
WebRoot/jsp/achievement/acceptanceModelCreateManage.jsp
Normal file
@ -0,0 +1,98 @@
|
||||
<%@ 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>
|
||||
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript">
|
||||
|
||||
var createFun = function(id,search_name) {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelCreate/doCreateRecord.do', {pid:id,search_name:search_name} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
var initTreeView = function() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModel/getAcceptanceModelJson.do', {unitId:unitId} , function(data) {
|
||||
//console.info(data)
|
||||
$('#tree').treeview({data: data
|
||||
});
|
||||
$('#tree').on('nodeSelected', function(event, data) {
|
||||
createFun(data.id);
|
||||
//var node=$('#tree').treeview('getSelected');
|
||||
});
|
||||
},'json');
|
||||
$("#menuBox").html("");
|
||||
};
|
||||
|
||||
$(function() {
|
||||
initTreeView();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="fileInputDiv"></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">
|
||||
<!-- <button type="button" class="btn btn-box-tool" onclick="addFun();"><i class="fa fa-plus"></i>
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:550px;overflow:auto;"></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" id="menuBox">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
190
WebRoot/jsp/achievement/acceptanceModelCreateRecord.jsp
Normal file
190
WebRoot/jsp/achievement/acceptanceModelCreateRecord.jsp
Normal file
@ -0,0 +1,190 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<!-- 引入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>
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelCreate/doRecordAdd.do', {pid:'${param.pid}'} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
function queryParams(params) {
|
||||
var temp={
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid:'${param.pid}',
|
||||
search_name: '${param.search_name}'
|
||||
};
|
||||
return temp;
|
||||
}
|
||||
$(function() {
|
||||
$("#search_name_goods").keyup(function () {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
//回车执行查询
|
||||
doSearch();
|
||||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/achievement/acceptanceModelCreate/getRecordlist.do', // 获取表格数据的url
|
||||
//cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
// clickToSelect:true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 20, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'sdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
/* showColumns: true,
|
||||
showRefresh: true, */
|
||||
columns: [
|
||||
{
|
||||
checkbox:true,//单选框
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'sdt', // 返回json数据中的name
|
||||
title: '创建日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value){
|
||||
return value.substring(0,10);
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 160, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button title="文件下载" class="btn btn-default btn-sm" onclick="fileDownloadFun(\'' + row.id + '\')"><i class="fa fa-download"></i></button>'+
|
||||
'<button title="相关数据" class="btn btn-default btn-sm" onclick="showData(\'' + row.id + '\')"><i class="fa fa-object-ungroup"></i></button>'+
|
||||
'<button title="在线预览" class="btn btn-default btn-sm" onclick="onlineExcel(\'' + row.name + '\')"><i class="fa fa-eye"></i></button>'+
|
||||
'<button title="文件删除" class="btn btn-default btn-sm" onclick="delFileFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button>'+
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
function onlineExcel(filename){
|
||||
window.open(getRootPath()+'_tohtm/AcceptanceModel/data/'+filename+'.htm','onlineExcel', 'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-30)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no');
|
||||
}
|
||||
|
||||
function getRootPath(){
|
||||
var pathName = window.location.pathname.substring(1);
|
||||
var webName = pathName == '' ? '' : pathName.substring(0, pathName.indexOf('/'));
|
||||
return window.location.protocol + '//' + window.location.host +"/"+webName;
|
||||
}
|
||||
|
||||
function showData(id){
|
||||
// $.post(ext.contextPath + '/achievement/acceptanceModelCreate/doDataRecordShow.do', {pid:id} , function(data) {
|
||||
// $("#subDiv").html(data);
|
||||
// openModal('dataSubModal');
|
||||
// });
|
||||
var top=(window.screen.height-30-750)/2;
|
||||
var left=(window.screen.width-10-900)/2;
|
||||
window.open(ext.contextPath + '/achievement/acceptanceModelCreate/doDataRecordOpenShow.do?pid='+id,'showData', 'width=900,height=750,top='+top+',left='+left+',toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no');
|
||||
}
|
||||
|
||||
function fileDownloadFun(id){
|
||||
window.open(ext.contextPath + "/base/downloadFileFromMasterid.do?key="+id+"&tbName=TB_Achievement_AcceptanceModelRecord_file");
|
||||
}
|
||||
|
||||
function delFileFun(id){
|
||||
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 + '/achievement/acceptanceModelCreate/deleteRecord.do', {id:id}, function(data) {
|
||||
if(data.code==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function dosearch(){
|
||||
var search_name=$('#search_name').val();
|
||||
createFun('${param.pid}',search_name);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<body class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<section class="content container-fluid">
|
||||
<!-- <form id="searchForm"> -->
|
||||
<div >
|
||||
<div id="companySelectTree" style="float:left;"></div>
|
||||
<div class="form-group" style="padding:0;margin-bottom: 0px;float:left;" id="action">
|
||||
<div class="btn-group" style="width: 220px;">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<!-- <security:authorize buttonUrl="sparepart/channels/add.do">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
</security:authorize> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="padding:0;margin-bottom: 10px;float:right;" id="action">
|
||||
<div class="form-group pull-right form-inline" style="margin-bottom: 0px;">
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="名称" value="${param.search_name}">
|
||||
<div class="input-group-btn" style="line-height: 30px">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
152
WebRoot/jsp/achievement/acceptanceModelCreateRecordAdd.jsp
Normal file
152
WebRoot/jsp/achievement/acceptanceModelCreateRecordAdd.jsp
Normal file
@ -0,0 +1,152 @@
|
||||
<%@ 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 beginTimeStore1 = '';
|
||||
function initDate1() {
|
||||
//定义locale汉化插件
|
||||
beginTimeStore1 = moment().subtract(0, 'days').format('YYYY-MM-DD');
|
||||
var locale = {
|
||||
"format": 'YYYY-MM-DD',
|
||||
"separator": " ~ ",
|
||||
"applyLabel": "确定",
|
||||
"cancelLabel": "取消",
|
||||
"fromLabel": "起始时间",
|
||||
"toLabel": "结束时间'",
|
||||
"customRangeLabel": "自定义",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
||||
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
"firstDay": 1
|
||||
};
|
||||
$('#reservationtime1').daterangepicker({
|
||||
"singleDatePicker":true,
|
||||
"locale": locale,
|
||||
//汉化按钮部分
|
||||
ranges: {
|
||||
// '今日': [moment(), moment().subtract(-1, 'days')],
|
||||
'昨日': [moment().subtract(1, 'days'), moment()],
|
||||
'最近7日': [moment().subtract(6, 'days'), moment().subtract(-1, 'days')],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month').subtract(-1, 'days')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month').subtract(-1, 'days')]
|
||||
},
|
||||
startDate: beginTimeStore1
|
||||
}, function(start, end, label) {
|
||||
beginTimeStore1 = start.format(this.locale.format);
|
||||
if(!this.startDate){
|
||||
this.element.val('');
|
||||
}else{
|
||||
this.element.val(this.startDate.format(this.locale.format));
|
||||
}
|
||||
});
|
||||
$('#reservationtime1').val(beginTimeStore1);
|
||||
};
|
||||
|
||||
$(function() {
|
||||
initDate1();
|
||||
});
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
showname: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
reservationtime1: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '日期不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function doRecordSave(){
|
||||
var showname=$('#showname').val();
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
|
||||
$('#saveB').attr('onclick','');
|
||||
$('#saveB').text('加载中...');
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelCreate/saveExcelData.do",{pid:'${param.pid}',unitId:unitId,sdt:beginTimeStore1,showname:showname,id:'${id}'}, function(data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
|
||||
$.ajax({
|
||||
type : "GET",
|
||||
url : ext.contextPath + "/achievement/acceptanceModelCreate/saveOutput.do?pid=${id}&modelId=${param.pid}&unitId="+unitId+"&sdt="+beginTimeStore1,
|
||||
async: false,
|
||||
globle:false,
|
||||
success : function(data){
|
||||
|
||||
}
|
||||
});
|
||||
// $.post(ext.contextPath + "/achievement/acceptanceModelCreate/saveOutput.do",{pid:'${param.pid}',unitId:unitId,sdt:beginTimeStore1}, function(data) {
|
||||
|
||||
// },'json');
|
||||
|
||||
}else if(data.code == 0){
|
||||
$('#saveB').attr('onclick','doRecordSave()');
|
||||
$('#saveB').text('保存');
|
||||
showAlert('d',data.msg);
|
||||
}else{
|
||||
$('#saveB').attr('onclick','doRecordSave()');
|
||||
$('#saveB').text('保存');
|
||||
showAlert('d',data.msg);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增模型</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" id="id" name ="id" value="${id}" >
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="showname" name ="showname" placeholder="名称" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*日期</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control pull-left" id="reservationtime1" name="reservationtime1" >
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button id="saveB" type="button" class="btn btn-primary" onclick="doRecordSave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
910
WebRoot/jsp/achievement/acceptanceModelEdit.jsp
Normal file
910
WebRoot/jsp/achievement/acceptanceModelEdit.jsp
Normal file
@ -0,0 +1,910 @@
|
||||
<%@ 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>
|
||||
<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">
|
||||
var masterId='${acceptanceModel.id}';
|
||||
var tbName='TB_Achievement_AcceptanceModel_file'; //数据表
|
||||
var nameSpace='AcceptanceModel';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
allowedFileExtensions : ['xls','xlsx'],
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:''
|
||||
},
|
||||
deleteUrl:ext.contextPath+"/base/deleteInputFile.do",
|
||||
deleteExtraData:function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
//名称定义不可修改
|
||||
var getFileList = function() {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId,tbName:tbName} , function(data) {
|
||||
// console.info(data);
|
||||
if(data.length>0){
|
||||
// previews=new Array();
|
||||
// // $('#maintenancefile').show();
|
||||
// for(var i=0;i<data.length;i++){
|
||||
// var previewConfig = new Object();
|
||||
// var path = data[i].abspath;
|
||||
// path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
// path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
|
||||
// previews.push(path);
|
||||
// previewConfig['width']= '50px';
|
||||
// previewConfig['caption']= data[i].filename;
|
||||
// previewConfig['key']= data[i].id;
|
||||
// previewConfigs.push(previewConfig);
|
||||
// }
|
||||
// showFileInput("acceptanceModelFile");
|
||||
|
||||
}else{
|
||||
$('#acceptanceModelFile').hide();
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
var fileinput = function() {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModel/fileinput.do', {masterId:masterId,tbName:tbName,nameSpace:nameSpace} , function(data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
|
||||
var showMenu4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModel/showAcceptanceModel4Select.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#menu4SelectDiv").html(data);
|
||||
openModal("menu4SelectModal")
|
||||
});
|
||||
};
|
||||
|
||||
function dosave() {
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModel/doupdate.do", $("#subForm").serialize(), function(result) {
|
||||
var data= $.parseJSON(result);
|
||||
if (data.code == 1) {
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d',data.result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function dodel() {
|
||||
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 + '/achievement/acceptanceModel/dodel.do', $("#subForm").serialize(), function(result) {
|
||||
// var data= $.parseJSON(result);
|
||||
if(result.code==1){
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d',result.msg);
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
function delMpointFun(id) {
|
||||
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 + '/achievement/acceptanceModelMPoint/dodel.do', {id:id}, function(data) {
|
||||
|
||||
if(data.code==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
function delOutputFun(id) {
|
||||
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 + '/achievement/acceptanceModelOutput/dodel.do', {id:id}, function(data) {
|
||||
|
||||
if(data.code==1){
|
||||
$("#table_output").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delTextFun(id) {
|
||||
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 + '/achievement/acceptanceModelText/dodel.do', {id:id}, function(data) {
|
||||
|
||||
if(data.code==1){
|
||||
$("#texttable").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var addMpointFuns = function () {
|
||||
var allTableData = $("#table").bootstrapTable('getData');
|
||||
var mPointIds = "";
|
||||
$.each(allTableData, function (index, item) {
|
||||
if (mPointIds != "") {
|
||||
mPointIds += ",";
|
||||
}
|
||||
mPointIds += item.mPoint.mpointid;
|
||||
})
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/showMPoint4Select.do', {
|
||||
mPointIds: mPointIds,
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('MPointModel');
|
||||
});
|
||||
};
|
||||
|
||||
var addMpointFun = function () {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/doadd.do', {id:"${acceptanceModel.id}"}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var addOutputFuns = function () {
|
||||
var allTableData = $("#table_output").bootstrapTable('getData');
|
||||
var mPointIds = "";
|
||||
$.each(allTableData, function (index, item) {
|
||||
if (mPointIds != "") {
|
||||
mPointIds += ",";
|
||||
}
|
||||
mPointIds += item.baseId;
|
||||
})
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelOutput/showOutput4Select.do', {
|
||||
mPointIds: mPointIds,
|
||||
unitId: unitId,
|
||||
acceptanceModelId: '${acceptanceModel.id}'
|
||||
}, function (data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menuFuncModal');
|
||||
});
|
||||
};
|
||||
|
||||
var addOutputFun = function () {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelOutput/doadd.do', {id:"${acceptanceModel.id}"}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var editOutputFun = function (id) {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelOutput/doedit.do', {
|
||||
id: id,
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var addTextFun = function () {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelText/doadd.do', {id:"${acceptanceModel.id}"}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var editMpointFun = function (id) {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/doedit.do', {
|
||||
id: id,
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var editTextFun = function (id) {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelText/doedit.do', {
|
||||
id: id
|
||||
}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var doFinishSelectMPoint = function (data) {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/doimport.do', {
|
||||
acceptanceModelId: '${acceptanceModel.id}',
|
||||
mPointIds: data
|
||||
}, function (data) {
|
||||
if (data.code) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
}, 'json');
|
||||
};
|
||||
|
||||
// var doFinishSelectOutput = function (data) {
|
||||
// $.post(ext.contextPath + '/achievement/acceptanceModelOutput/doimport.do', {
|
||||
// acceptanceModelId: '${acceptanceModel.id}',
|
||||
// mPointIds: data
|
||||
// }, function (data) {
|
||||
// if (data.code) {
|
||||
// $("#table_output").bootstrapTable('refresh');
|
||||
// }
|
||||
// }, 'json');
|
||||
// };
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#userid").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"userid",textId:"_auditMan",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function delFileFun(id){
|
||||
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 + '/base/deleteInputFile.do', {key:id,tbName:tbName}, function(data) {
|
||||
if(data.code==1){
|
||||
$("#initialPreviewTable").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function fileDownloadFun(id){
|
||||
window.open(ext.contextPath + "/base/downloadFile.do?key="+id+"&tbName="+tbName);
|
||||
}
|
||||
|
||||
function onlineExcel(filename){
|
||||
window.open(getRootPath()+'_tohtm/'+nameSpace+'/'+filename+'.htm','newwindow', 'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-30)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no');
|
||||
}
|
||||
|
||||
function getRootPath(){
|
||||
var pathName = window.location.pathname.substring(1);
|
||||
var webName = pathName == '' ? '' : pathName.substring(0, pathName.indexOf('/'));
|
||||
return window.location.protocol + '//' + window.location.host +"/"+webName;
|
||||
}
|
||||
|
||||
|
||||
$(function() {
|
||||
// getFileList();
|
||||
$("#active").select2({ minimumResultsForSearch: 10 }).val("${acceptanceModel.active}").trigger("change");
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/achievement/acceptanceModelMPoint/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [5, 10,15], // 设置页面可以显示的数据条数
|
||||
pageSize: 5, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
id:'${acceptanceModel.id}',
|
||||
unitId:unitId
|
||||
}
|
||||
},
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'mPoint', // 返回json数据中的name
|
||||
title: '测量点编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function(value,row,index){
|
||||
return value==null?'':value.mpointcode;
|
||||
},
|
||||
},{
|
||||
field: 'mpointName', // 返回json数据中的name
|
||||
title: '测量点名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'sheetName', // 返回json数据中的name
|
||||
title: '表格名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'posX', // 返回json数据中的name
|
||||
title: '位置X', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'posY', // 返回json数据中的name
|
||||
title: '位置Y', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'morder', // 返回json数据中的name
|
||||
title: '顺序', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 100, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editMpointFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delMpointFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
|
||||
$("#table_output").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/achievement/acceptanceModelOutput/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [5, 10,15], // 设置页面可以显示的数据条数
|
||||
pageSize: 5, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
id:'${acceptanceModel.id}',
|
||||
unitId:unitId
|
||||
}
|
||||
},
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '指标名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'mPoint', // 返回json数据中的name
|
||||
title: '测量点编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function(value,row,index){
|
||||
return value==null?'':value.mpointcode;
|
||||
},
|
||||
},{
|
||||
field: 'mPoint', // 返回json数据中的name
|
||||
title: '测量点名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function(value,row,index){
|
||||
return value==null?'':value.parmname;
|
||||
},
|
||||
},{
|
||||
field: 'sheetName', // 返回json数据中的name
|
||||
title: '表格名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'posX', // 返回json数据中的name
|
||||
title: '位置X', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'posY', // 返回json数据中的name
|
||||
title: '位置Y', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'morder', // 返回json数据中的name
|
||||
title: '顺序', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 100, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editOutputFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delOutputFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
|
||||
$("#initialPreviewTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/base/getInputFileTableList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [5, 10,15], // 设置页面可以显示的数据条数
|
||||
pageSize: 5, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
masterId:masterId,
|
||||
tbName:tbName
|
||||
}
|
||||
},
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'filename', // 返回json数据中的name
|
||||
title: '文件名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'insuser', // 返回json数据中的name
|
||||
title: '上传人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function(value,row,index){
|
||||
return value==null?'':row.user.caption;
|
||||
},
|
||||
},{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '上传时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function(value,row,index){
|
||||
return value==null?'':value.substring(0,10);
|
||||
},
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 140, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button title="文件下载" class="btn btn-default btn-sm" onclick="fileDownloadFun(\'' + row.id + '\')"><i class="fa fa-download"></i></button>'+
|
||||
'<button title="文件删除" class="btn btn-default btn-sm" onclick="delFileFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button>'+
|
||||
'<button title="在线预览" class="btn btn-default btn-sm" onclick="onlineExcel(\'' + row.filename + '\')"><i class="fa fa-eye"></i></button></div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
$("#texttable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/achievement/acceptanceModelText/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [5, 10,15], // 设置页面可以显示的数据条数
|
||||
pageSize: 5, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
id:'${acceptanceModel.id}',
|
||||
unitId:unitId
|
||||
}
|
||||
},
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '测量点编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'sheetName', // 返回json数据中的name
|
||||
title: '表格名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'posX', // 返回json数据中的name
|
||||
title: '位置X', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'posY', // 返回json数据中的name
|
||||
title: '位置Y', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'morder', // 返回json数据中的name
|
||||
title: '顺序', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 100, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editTextFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delTextFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
</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>
|
||||
<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="${acceptanceModel.id}"/>
|
||||
<input id="unitId" name="unitId" type="hidden" value="${acceptanceModel.unitId}"/>
|
||||
<!-- 界面提醒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="${acceptanceModel.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}">
|
||||
<input id="pid" name="pid" type="hidden" value="${acceptanceModel.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="modelgoal" name ="modelgoal" placeholder="模型目的" value="${acceptanceModel.modelgoal }">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">评分验收标准</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="checkstandard" name ="checkstandard" placeholder="评分验收标准" value="${acceptanceModel.checkstandard }">
|
||||
</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="requirement" name ="requirement" placeholder="填报要求" value="${acceptanceModel.requirement }">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">所属厂区</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${_bizname}</p>
|
||||
</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="morder" name ="morder" placeholder="顺序" value="${acceptanceModel.morder}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="active" name="active" class="form-control select2">
|
||||
<option value="启用" selected>启用</option>
|
||||
<option value="禁用">禁用</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" rows="2" id ="_auditMan" name ="_auditMan" placeholder="点击选择" onclick="showUser4SelectsFun();" value="${_auditMan}">${_auditMan}</textarea>
|
||||
<input id="userid" name="userid" type="hidden" />
|
||||
</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="请输入">${acceptanceModel.remark}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 col-md-2"></div>
|
||||
<div class="col-sm-4 col-md-4">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput()" id="btn_save"><i class="fa fa-paperclip"></i>上传模板</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box box-solid">
|
||||
<div class="box-body ">
|
||||
<!-- <form class="form-horizontal " id="filelistsubForm"> -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 col-md-2"></div>
|
||||
<div class="col-sm-10 col-md-10">
|
||||
<table id="initialPreviewTable"></table>
|
||||
<!-- <input type="file" name="acceptanceModelFile" id="acceptanceModelFile" multiple class="file-loading" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- </form> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-solid">
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab"
|
||||
index="0" aria-expanded="true">录入参数配置</a></li>
|
||||
<li class=""><a href="#tab2" data-toggle="tab" index="1"
|
||||
aria-expanded="true" >文本配置</a></li>
|
||||
<li class=""><a href="#tab3" data-toggle="tab" index="2"
|
||||
aria-expanded="true" >输出参数配置</a></li>
|
||||
</ul>
|
||||
|
||||
<div id="powerDiv"></div>
|
||||
<div id="menu4SelectDiv_func"></div>
|
||||
<div id="mpSubDiv"></div>
|
||||
<div id="mpSubDiv1"></div>
|
||||
<div id="powerDiv_output"></div>
|
||||
<div id="menu4SelectDiv_func_output"></div>
|
||||
<div id="mpSubDiv_output"></div>
|
||||
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active" id="tab1" style="position: relative; padding:5px;">
|
||||
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">录入参数配置</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body ">
|
||||
<div >
|
||||
<div id="alertDiv_power"></div>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addMpointFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default" onclick="addMpointFuns();"><i class="fa fa-plus"></i> 批量新增</button>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tab2" style="position: relative; padding:5px;overflow:hidden">
|
||||
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">文本配置</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body ">
|
||||
<div >
|
||||
<div id="alertDiv_power"></div>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addTextFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
</div>
|
||||
|
||||
<table id="texttable"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tab3" style="position: relative; padding:5px;overflow:hidden">
|
||||
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">输出参数配置</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body ">
|
||||
<div >
|
||||
<div id="alertDiv_power_output"></div>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addOutputFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default" onclick="addOutputFuns();"><i class="fa fa-plus"></i> 批量新增</button>
|
||||
</div>
|
||||
<table id="table_output"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
190
WebRoot/jsp/achievement/acceptanceModelManage.jsp
Normal file
190
WebRoot/jsp/achievement/acceptanceModelManage.jsp
Normal file
@ -0,0 +1,190 @@
|
||||
<%@ 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>
|
||||
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript">
|
||||
var addFun = function() {
|
||||
var node=$('#tree').treeview('getSelected');
|
||||
var pid="";
|
||||
if(node!=null && node.length>0){
|
||||
pid=node[0].id;
|
||||
}else{
|
||||
pid="-1";
|
||||
}
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModel/doadd.do', {unitId:unitId,pid:pid} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModel/doedit.do', {id:id} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
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 + '/work/group/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var initTreeView = function() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModel/getAcceptanceModelJson.do', {unitId:unitId} , function(data) {
|
||||
//console.info(data)
|
||||
$('#tree').treeview({data: data
|
||||
});
|
||||
$('#tree').on('nodeSelected', function(event, data) {
|
||||
editFun(data.id);
|
||||
//var node=$('#tree').treeview('getSelected');
|
||||
});
|
||||
},'json');
|
||||
$("#menuBox").html("");
|
||||
};
|
||||
|
||||
$(function() {
|
||||
initTreeView();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="fileInputDiv"></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">
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun();"><i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:550px;overflow:auto;"></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" id="menuBox">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
268
WebRoot/jsp/achievement/acceptanceModelRptDataOpenRecord.jsp
Normal file
268
WebRoot/jsp/achievement/acceptanceModelRptDataOpenRecord.jsp
Normal file
@ -0,0 +1,268 @@
|
||||
<%@ 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>
|
||||
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript">
|
||||
function doRecordSave(){
|
||||
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) {
|
||||
$('#saveB').attr('onclick','');
|
||||
$('#saveB').text('加载中...');
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelCreate/doOverwriteData.do', {pid:'${param.pid}'} , function(data) {
|
||||
window.close();
|
||||
},'json');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function valueChange(value,id){
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelCreate/doChangeData.do', {value:value,id:id} , function(data) {
|
||||
if(data.code==1){
|
||||
// showAlert('d','修改成功');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
function textvalueChange(value,id){
|
||||
// console.log(id,value);
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelCreate/doChangeTextData.do', {value:value,id:id} , function(data) {
|
||||
if(data.code==1){
|
||||
// showAlert('d','修改成功');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
function queryParams(params) {
|
||||
var temp={
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid:'${param.pid}'
|
||||
};
|
||||
return temp;
|
||||
}
|
||||
|
||||
function showHis(mpcode){
|
||||
$.post(ext.contextPath + '/data/showOnlyLine.do', {mpcode:mpcode} , function(data) {
|
||||
$("#curveDiv").html(data);
|
||||
openModal('curveModal');
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#dataTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/achievement/acceptanceModelCreate/getRptDataRecordlist.do', // 获取表格数据的url
|
||||
//cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
// clickToSelect:true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 20, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
/* showColumns: true,
|
||||
showRefresh: true, */
|
||||
columns: [
|
||||
{
|
||||
field: 'acceptanceModelMPoint', // 返回json数据中的name
|
||||
title: '数据名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function(value,row,index){
|
||||
return value==null?'':row.acceptanceModelMPoint.mpointName;
|
||||
}
|
||||
},{
|
||||
field: 'value', // 返回json数据中的name
|
||||
title: '值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function(value,row,index){
|
||||
return "<input type=\"text\" style=\"height:34px;text-align: center;\" value=\""+value+"\" onchange=\"valueChange(this.value,'"+row.id+"');\">";
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 80, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group">'+
|
||||
'<button title="历史数据" class="btn btn-default btn-sm" onclick="showHis(\'' + row.mPoint.mpointcode + '\')"><i class="fa fa-line-chart"></i></button>'+
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("dataTable");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelCreate/getRptTextDataRecordJson.do', {pid:'${param.pid}'} , function(data) {
|
||||
// console.log(data);
|
||||
if(data!=''){
|
||||
$('#textMain').css('height',data.length*100);
|
||||
var textdataDiv="";
|
||||
for(var i=0;i<data.length;i++){//<label style='height:100%;line-height: 80px;' class='col-sm-5 control-label'>"+data[i].name+"</label>
|
||||
textdataDiv+="<div class='form-group' style='height:100px;padding:10px;'>";
|
||||
textdataDiv+="<div class='col-sm-4' style='height:100%;'>";
|
||||
textdataDiv+="<textarea style='width:100%;height:100%;' wrap='soft' readonly>"+data[i].name+"</textarea>";
|
||||
textdataDiv+="</div>";
|
||||
|
||||
textdataDiv+="<div class='col-sm-8' style='height:100%;'>";
|
||||
textdataDiv+="<textarea style='width:100%;height:100%;' wrap='soft' id=\""+data[i].id+"\" onchange=\"textvalueChange(this.value,'"+data[i].id+"');\" >"+data[i].text+"</textarea>";
|
||||
textdataDiv+="</div>";
|
||||
textdataDiv+="</div>";
|
||||
}
|
||||
$('#textdataDiv').html(textdataDiv);
|
||||
}
|
||||
|
||||
},'json');
|
||||
|
||||
$("#output_table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/achievement/acceptanceModelOutputData/getlist.do', // 获取表格数据的url
|
||||
//cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
// clickToSelect:true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 20, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'sdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
/* showColumns: true,
|
||||
showRefresh: true, */
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '指标名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: 400
|
||||
},{
|
||||
field: 'value', // 返回json数据中的name
|
||||
title: '值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: 300
|
||||
},{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '是否合格', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: 200,
|
||||
formatter: function (value, row, index) {
|
||||
if (value=="qualified") {
|
||||
return "合格";
|
||||
}else if (value=="unqualified") {
|
||||
return "不合格";
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body >
|
||||
<div class="wrapper">
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab"
|
||||
index="0" aria-expanded="true">报表数据</a></li>
|
||||
<li class=""><a href="#tab2" data-toggle="tab" index="1"
|
||||
aria-expanded="true" >文本数据</a></li>
|
||||
<li class=""><a href="#tab3" data-toggle="tab" index="2"
|
||||
aria-expanded="true" >输出数据</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active" id="tab1"
|
||||
style="position: relative; padding:5px;overflow:hidden;">
|
||||
<div id="curveDiv"></div>
|
||||
<div class="modal-body">
|
||||
<table id="dataTable" ></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" tab-pane" id="tab2"
|
||||
style="position: relative; padding:5px;overflow:hidden;">
|
||||
<div id="textMain">
|
||||
<div id="textdataDiv" style="height: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" tab-pane" id="tab3"
|
||||
style="position: relative; padding:5px;overflow:hidden;">
|
||||
<div id="output_div">
|
||||
<div id="output_table" style="height: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button id="saveB" type="button" class="btn btn-primary" onclick="doRecordSave()" id="btn_save">覆盖数据</button>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
141
WebRoot/jsp/achievement/acceptanceModelRptDataRecord.jsp
Normal file
141
WebRoot/jsp/achievement/acceptanceModelRptDataRecord.jsp
Normal file
@ -0,0 +1,141 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function doRecordSave(){
|
||||
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) {
|
||||
$('#saveB').attr('onclick','');
|
||||
$('#saveB').text('加载中...');
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelCreate/doOverwriteData.do', {pid:'${param.pid}'} , function(data) {
|
||||
closeModal('dataSubModal');
|
||||
},'json');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function valueChange(value,id){
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelCreate/doChangeData.do', {value:value,id:id} , function(data) {
|
||||
if(data.code==1){
|
||||
// showAlert('d','修改成功');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
function queryParams(params) {
|
||||
var temp={
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid:'${param.pid}'
|
||||
};
|
||||
return temp;
|
||||
}
|
||||
|
||||
function showHis(mpcode){
|
||||
$.post(ext.contextPath + '/data/showOnlyLine.do', {mpcode:mpcode} , function(data) {
|
||||
$("#curveDiv").html(data);
|
||||
openModal('curveModal');
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#dataTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/achievement/acceptanceModelCreate/getRptDataRecordlist.do', // 获取表格数据的url
|
||||
//cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
// clickToSelect:true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 20, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'mpid', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
/* showColumns: true,
|
||||
showRefresh: true, */
|
||||
columns: [
|
||||
{
|
||||
field: 'mpid', // 返回json数据中的name
|
||||
title: '测量点名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function(value,row,index){
|
||||
return row.mPoint.parmname;
|
||||
}
|
||||
},{
|
||||
field: 'value', // 返回json数据中的name
|
||||
title: '值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function(value,row,index){
|
||||
return "<input type=\"text\" style=\"height:34px;text-align: center;\" value=\""+value+"\" onchange=\"valueChange(this.value,'"+row.id+"');\">";
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 80, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group">'+
|
||||
'<button title="历史数据" class="btn btn-default btn-sm" onclick="showHis(\'' + row.mPoint.mpointcode + '\')"><i class="fa fa-line-chart"></i></button>'+
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("dataTable");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="dataSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">报表数据</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table id="dataTable" ></table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button id="saveB" type="button" class="btn btn-primary" onclick="doRecordSave()" id="btn_save">覆盖数据</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
150
WebRoot/jsp/achievement/acceptanceModel_MPointAdd.jsp
Normal file
150
WebRoot/jsp/achievement/acceptanceModel_MPointAdd.jsp
Normal file
@ -0,0 +1,150 @@
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript">
|
||||
var selectMPint = function() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/showlistForSelect.do', {formId:'subForm1',hiddenId:'mpointId',textId:'mpointName'} , function(data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
|
||||
function dosave() {
|
||||
$("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelMPoint/dosave.do", $("#subForm1").serialize(), function(data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.msg);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm1").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
mpointId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '测量点不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelMPoint/getValueTypeJson.do", {}, function(data) {
|
||||
var selelct =$("#valueType").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
|
||||
if(data.length>=1){
|
||||
selelct.val(data[0].id).trigger("change");
|
||||
|
||||
}else{
|
||||
selelct.val(data[0].id).trigger("change");
|
||||
}
|
||||
},'json');
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-md">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">添加测量点</h4>
|
||||
</div>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm1">
|
||||
<input type="hidden" class="form-control" id="acceptanceModelId" name="acceptanceModelId" value="${param.id}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">测量点编号</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="hidden" class="form-control" style="cursor: pointer" id="unitId" name="unitId" value="${curveMpoint.unitId}" >
|
||||
<input type="hidden" class="form-control" style="cursor: pointer" id="mpcode" > -->
|
||||
<input type="text" class="form-control" id="mpointId" name ="mpointId" onclick="selectMPint()" placeholder="单击选择" readonly value="${acceptanceModelMPoint.mpointId}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">测量点名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpointName" name="mpointName" value="${acceptanceModelMPoint.mpointName}" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">位置X</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posX" name ="posX" value="${acceptanceModelMPoint.posX}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">位置Y</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posY" name ="posY" value="${acceptanceModelMPoint.posY}">
|
||||
</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="sheetName" name ="sheetName" value="${acceptanceModelMPoint.sheetName}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">取值类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="valueType" name="valueType" class="form-control select2" style="width: 100%">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">数据前置(天)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="movedata" name ="movedata" value="0">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">月份范围</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="monthRange" name ="monthRange" value="${acceptanceModelMPoint.monthRange}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name ="morder" value="${acceptanceModelMPoint.morder}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
160
WebRoot/jsp/achievement/acceptanceModel_MPointEdit.jsp
Normal file
160
WebRoot/jsp/achievement/acceptanceModel_MPointEdit.jsp
Normal file
@ -0,0 +1,160 @@
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
var selectMPint = function() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/showlistForSelect.do', {formId:'subForm1',hiddenId:'mpointId',textId:'mpointName'} , function(data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
|
||||
function doupdate() {
|
||||
$("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelMPoint/doupdate.do", $("#subForm1").serialize(), function(result) {
|
||||
// var data= $.parseJSON(result);
|
||||
if (result.code == 1) {
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else{
|
||||
showAlert('d',result.msg);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm1").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
mpointId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '测量点不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelMPoint/getValueTypeJson.do", {}, function(data) {
|
||||
var selelct =$("#valueType").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
|
||||
if(data.length>=1){
|
||||
selelct.val('${acceptanceModelMPoint.valueType}').trigger("change");
|
||||
|
||||
}else{
|
||||
//selelct.val(data[0].id).trigger("change");
|
||||
}
|
||||
},'json');
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-md">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑测量点</h4>
|
||||
</div>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<div class="modal-body">
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm1">
|
||||
<input type="hidden" class="form-control" id="id" name="id" value="${acceptanceModelMPoint.id}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">测量点编号</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="hidden" class="form-control" style="cursor: pointer" id="unitId" name="unitId" value="${curveMpoint.unitId}" >
|
||||
<input type="hidden" class="form-control" style="cursor: pointer" id="mpcode" > -->
|
||||
<input type="text" class="form-control" id="mpointId" name ="mpointId" onclick="selectMPint()" placeholder="单击选择" readonly value="${acceptanceModelMPoint.mpointId}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">测量点名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpointName" name="mpointName" value="${acceptanceModelMPoint.mpointName}" >
|
||||
</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" value="${acceptanceModelMPoint.mPoint.unit}" readonly>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">换算</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="unitconversion" name ="unitconversion" value="${acceptanceModelMPoint.unitconversion}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">位置X</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posX" name ="posX" value="${acceptanceModelMPoint.posX}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">位置Y</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posY" name ="posY" value="${acceptanceModelMPoint.posY}">
|
||||
</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="sheetName" name ="sheetName" value="${acceptanceModelMPoint.sheetName}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">取值类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="valueType" name="valueType" class="form-control select2" style="width: 100%">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">数据前置(天)</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="movedata" name ="movedata" value="${acceptanceModelMPoint.movedata}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">月份范围</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="monthrange" name ="monthrange" value="${acceptanceModelMPoint.monthrange}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name ="morder" value="${acceptanceModelMPoint.morder}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
169
WebRoot/jsp/achievement/acceptanceModel_OutputAdd.jsp
Normal file
169
WebRoot/jsp/achievement/acceptanceModel_OutputAdd.jsp
Normal file
@ -0,0 +1,169 @@
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript">
|
||||
var selectMPint = function() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelOutput/showlistForSelect.do', {formId:'subForm1',hiddenId:'mpointId',textId:'mpointName'} , function(data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
|
||||
var selectBase = function() {
|
||||
$.post(ext.contextPath + '/achievement/modelLibrary/showTree4Select.do', {formId:'subForm1',hiddenId:'baseId',textId:'name'} , function(data) {
|
||||
$("#mpSubDiv1").html(data);
|
||||
openModal('modelLibrary4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function dosave() {
|
||||
// $('#subForm1').data('bootstrapValidator')
|
||||
// .updateStatus('mpointId', 'NOT_VALIDATED',null)
|
||||
// .validateField('mpointId');
|
||||
// $("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
// if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
|
||||
|
||||
|
||||
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelOutput/check.do", $("#subForm1").serialize()+"&unitId="+unitId, function(data) {
|
||||
if (data.code == 1) {
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelOutput/dosave.do", $("#subForm1").serialize(), function(data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
$("#table_output").bootstrapTable('refresh');
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.msg);
|
||||
}
|
||||
},'json');
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','指标重复');
|
||||
|
||||
}
|
||||
},'json');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// $("#subForm1").bootstrapValidator({
|
||||
// live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
// fields: {
|
||||
// mpointId: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '测量点不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
// $.post(ext.contextPath + "/achievement/acceptanceModelMPoint/getValueTypeJson.do", {}, function(data) {
|
||||
// var selelct =$("#valueType").select2({
|
||||
// data: data,
|
||||
// placeholder:'请选择',//默认文字提示
|
||||
// allowClear: false,//允许清空
|
||||
// escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
// language: "zh-CN",
|
||||
// minimumInputLength: 0,
|
||||
// minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
// formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
// formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
// });
|
||||
|
||||
// if(data.length>=1){
|
||||
// selelct.val(data[0].id).trigger("change");
|
||||
|
||||
// }else{
|
||||
// selelct.val(data[0].id).trigger("change");
|
||||
// }
|
||||
// },'json');
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-md">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">添加输出参数</h4>
|
||||
</div>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm1">
|
||||
<input type="hidden" class="form-control" id="acceptanceModelId" name="acceptanceModelId" value="${param.id}">
|
||||
|
||||
|
||||
|
||||
<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" onclick="selectBase()" value="${acceptanceModelOutput.name}" placeholder="单击选择" readonly>
|
||||
</div>
|
||||
<input type="hidden" id="baseId" name="baseId" value="${acceptanceModelOutput.baseId}">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">测量点编号</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="hidden" class="form-control" style="cursor: pointer" id="unitId" name="unitId" value="${curveMpoint.unitId}" >
|
||||
<input type="hidden" class="form-control" style="cursor: pointer" id="mpcode" > -->
|
||||
<input type="text" class="form-control" id="mpointId" name ="mpointId" onclick="selectMPint()" placeholder="单击选择" readonly value="${acceptanceModelOutput.mpointId}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">测量点名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpointName" name="mpointName" value="${acceptanceModelOutput.mpointName}" readonly>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">位置X</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posX" name ="posX" value="${acceptanceModelOutput.posX}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">位置Y</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posY" name ="posY" value="${acceptanceModelOutput.posY}">
|
||||
</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="sheetName" name ="sheetName" value="${acceptanceModelOutput.sheetName}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name ="morder" value="${acceptanceModelOutput.morder}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
150
WebRoot/jsp/achievement/acceptanceModel_OutputEdit.jsp
Normal file
150
WebRoot/jsp/achievement/acceptanceModel_OutputEdit.jsp
Normal file
@ -0,0 +1,150 @@
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
var selectMPint = function() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelOutput/showlistForSelect.do', {formId:'subForm1',hiddenId:'mpointId',textId:'mpointName'} , function(data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
|
||||
var selectBase = function() {
|
||||
$.post(ext.contextPath + '/achievement/modelLibrary/showTree4Select.do', {formId:'subForm1',hiddenId:'baseId',textId:'name'} , function(data) {
|
||||
$("#mpSubDiv1").html(data);
|
||||
openModal('modelLibrary4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
function doupdate() {
|
||||
// $('#subForm1').data('bootstrapValidator')
|
||||
// .updateStatus('mpointId', 'NOT_VALIDATED',null)
|
||||
// .validateField('mpointId');
|
||||
// $("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
// if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelOutput/doupdate.do", $("#subForm1").serialize(), function(result) {
|
||||
// var data= $.parseJSON(result);
|
||||
if (result.code == 1) {
|
||||
closeModal('subModal');
|
||||
$("#table_output").bootstrapTable('refresh');
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else{
|
||||
showAlert('d',result.msg);
|
||||
}
|
||||
},'json');
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// $("#subForm1").bootstrapValidator({
|
||||
// live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
// fields: {
|
||||
// mpointId: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '测量点不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
// $.post(ext.contextPath + "/achievement/acceptanceModelMPoint/getValueTypeJson.do", {}, function(data) {
|
||||
// var selelct =$("#valueType").select2({
|
||||
// data: data,
|
||||
// placeholder:'请选择',//默认文字提示
|
||||
// allowClear: false,//允许清空
|
||||
// escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
// language: "zh-CN",
|
||||
// minimumInputLength: 0,
|
||||
// minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
// formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
// formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
// });
|
||||
|
||||
// if(data.length>=1){
|
||||
// selelct.val('${acceptanceModelMPoint.valueType}').trigger("change");
|
||||
|
||||
// }else{
|
||||
// //selelct.val(data[0].id).trigger("change");
|
||||
// }
|
||||
// },'json');
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-md">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑输出参数</h4>
|
||||
</div>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<div class="modal-body">
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm1">
|
||||
<input type="hidden" class="form-control" id="id" name="id" value="${acceptanceModelOutput.id}">
|
||||
|
||||
|
||||
<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" onclick="selectBase()" value="${acceptanceModelOutput.name}" placeholder="单击选择" readonly>
|
||||
</div>
|
||||
<input type="hidden" id="baseId" name="baseId" value="${acceptanceModelOutput.baseId}">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">测量点编号</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="hidden" class="form-control" style="cursor: pointer" id="unitId" name="unitId" value="${curveMpoint.unitId}" >
|
||||
<input type="hidden" class="form-control" style="cursor: pointer" id="mpcode" > -->
|
||||
<input type="text" class="form-control" id="mpointId" name ="mpointId" onclick="selectMPint()" placeholder="单击选择" readonly value="${acceptanceModelOutput.mpointId}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">测量点名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpointName" name="mpointName" value="${acceptanceModelOutput.mPoint.parmname}" readonly>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">位置X</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posX" name ="posX" value="${acceptanceModelOutput.posX}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">位置Y</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posY" name ="posY" value="${acceptanceModelOutput.posY}">
|
||||
</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="sheetName" name ="sheetName" value="${acceptanceModelOutput.sheetName}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name ="morder" value="${acceptanceModelOutput.morder}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
116
WebRoot/jsp/achievement/acceptanceModel_TextAdd.jsp
Normal file
116
WebRoot/jsp/achievement/acceptanceModel_TextAdd.jsp
Normal file
@ -0,0 +1,116 @@
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript">
|
||||
function dosave() {
|
||||
$("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelText/dosave.do", $("#subForm1").serialize(), function(data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
$("#texttable").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.msg);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm1").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '文本名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
sheetName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '表格名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
posX: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '位置X不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
posY: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '位置Y不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-md">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">添加文本</h4>
|
||||
</div>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm1">
|
||||
<input type="hidden" class="form-control" id="acceptanceModelId" name="acceptanceModelId" value="${param.id}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文本名称</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="name" name ="name" style="width:100%;height:66px;" wrap="soft" >${acceptanceModelText.name}</textarea>
|
||||
</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="sheetName" name ="sheetName" value="${acceptanceModelText.sheetName}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name ="morder" value="${acceptanceModelText.morder}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">位置X</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posX" name ="posX" value="${acceptanceModelText.posX}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">位置Y</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posY" name ="posY" value="${acceptanceModelText.posY}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
115
WebRoot/jsp/achievement/acceptanceModel_TextEdit.jsp
Normal file
115
WebRoot/jsp/achievement/acceptanceModel_TextEdit.jsp
Normal file
@ -0,0 +1,115 @@
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript">
|
||||
function dosave() {
|
||||
$("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelText/doupdate.do", $("#subForm1").serialize(), function(data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
$("#texttable").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.msg);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm1").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '文本名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
sheetName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '表格名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
posX: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '位置X不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
posY: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '位置Y不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-md">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">修改文本</h4>
|
||||
</div>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm1">
|
||||
<input type="hidden" class="form-control" id="id" name="id" value="${acceptanceModelText.id}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文本名称</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="name" name ="name" style="width:100%;height:66px;" wrap="soft" >${acceptanceModelText.name}</textarea>
|
||||
</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="sheetName" name ="sheetName" value="${acceptanceModelText.sheetName}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name ="morder" value="${acceptanceModelText.morder}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">位置X</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posX" name ="posX" value="${acceptanceModelText.posX}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">位置Y</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posY" name ="posY" value="${acceptanceModelText.posY}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
128
WebRoot/jsp/achievement/modelLibrary4Tree.jsp
Normal file
128
WebRoot/jsp/achievement/modelLibrary4Tree.jsp
Normal file
@ -0,0 +1,128 @@
|
||||
<%@ 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>
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript">
|
||||
var unitId = "";
|
||||
|
||||
//type 1 为类别 2 为设备 3为部位
|
||||
var addFun = function (type) {
|
||||
var node = $('#tree').treeview('getSelected');
|
||||
var pid = "";
|
||||
if (node != null && node.length > 0) {
|
||||
pid = node[0].id;
|
||||
}
|
||||
$.post(ext.contextPath + '/achievement/modelLibrary/add.do', {pid: pid, type: type}, function (data) {
|
||||
console.log(data);
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
var editFun = function (id, type) {
|
||||
$.post(ext.contextPath + '/achievement/modelLibrary/edit.do', {id: id, type: type}, function (data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
var initTreeView = function () {
|
||||
$.post(ext.contextPath + '/achievement/modelLibrary/getTree.do', {unitId: unitId}, function (data) {
|
||||
var treeData = data.result;
|
||||
$('#tree').treeview({data: treeData, levels: 2});
|
||||
$('#tree').on('nodeSelected', function (event, treeData) {
|
||||
editFun(treeData.id, treeData.type);
|
||||
});
|
||||
}, 'json');
|
||||
$("#menuBox").html("");
|
||||
};
|
||||
|
||||
//导入
|
||||
/*function doImport(){
|
||||
$.post(ext.contextPath + '/achievement/modelLibrary/importEquipmentClass.do', {unitId:unitId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}*/
|
||||
|
||||
//导出
|
||||
/*function doExport(){
|
||||
window.open(ext.contextPath + "/achievement/modelLibrary/doExport.do?unitId="+unitId);
|
||||
}*/
|
||||
|
||||
$(function () {
|
||||
unitId = unitId;
|
||||
initTreeView();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></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">
|
||||
<%--<button type="button" class="btn btn-box-tool" onclick="doImport();"><i class="fa fa-cloud-upload"></i>
|
||||
导入
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" onclick="doExport();"><i class="fa fa-cloud-download"></i>
|
||||
导出
|
||||
</button>--%>
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun('1');"><i
|
||||
class="fa fa-plus"></i>
|
||||
数据模型
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun('2');"><i
|
||||
class="fa fa-plus"></i>
|
||||
工艺单元
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun('3');"><i
|
||||
class="fa fa-plus"></i>
|
||||
指标名称
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:750px;overflow:auto; "></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" id="menuBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
47
WebRoot/jsp/achievement/modelLibrary4select.jsp
Normal file
47
WebRoot/jsp/achievement/modelLibrary4select.jsp
Normal file
@ -0,0 +1,47 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
var selectMenu = function() {
|
||||
|
||||
alert('${param.hiddenId}'+'${param.textId}');
|
||||
}
|
||||
$(function() {
|
||||
$.post(ext.contextPath + '/achievement/modelLibrary/getTree.do', {ng:''} , function(data) {
|
||||
console.info(data.result);
|
||||
if(data.result.length>0){
|
||||
$('#menu_select_tree').treeview({
|
||||
data: data.result,
|
||||
});
|
||||
$('#menu_select_tree').on('nodeSelected', function(event, data) {
|
||||
if (data.type=="3") {
|
||||
$('#${param.formId} #${param.hiddenId}' ).val(data.id);
|
||||
$('#${param.formId} #${param.textId}').val(data.text);
|
||||
closeModal("modelLibrary4SelectModal")
|
||||
}else{
|
||||
alert("请选择最底层节点");
|
||||
}
|
||||
});
|
||||
}
|
||||
},'json');
|
||||
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="modelLibrary4SelectModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择指标</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="menu_select_tree" style="height:430px;overflow:auto;width:100%"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<!-- <button type="button" class="btn btn-primary" onclick="selectMenu()">保存</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
88
WebRoot/jsp/achievement/modelLibrary4selects.jsp
Normal file
88
WebRoot/jsp/achievement/modelLibrary4selects.jsp
Normal file
@ -0,0 +1,88 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
function doSaveMainRole() {
|
||||
var checkedtree = $('#menu_func_tree').treeview('getChecked');
|
||||
var datas="";
|
||||
// var lis = $('[data-nodeid]');
|
||||
// console.log(lis);
|
||||
// for(var i=0;i<lis.length;i++){
|
||||
// if(lis[i].dataset.nodeid.split('.').length==4){
|
||||
// var lis_element = $('#'+lis[i].id);
|
||||
// if(lis_element.hasClass('node-checked')){
|
||||
// var span = lis_element.children('.check-icon');
|
||||
// if(span.hasClass('glyphicon-check')){
|
||||
// datas+=lis[i].id+",";
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
$.each(checkedtree,function(index,item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
$.post(ext.contextPath + "/achievement/acceptanceModelOutput/doimport.do", {baseIds:datas,acceptanceModelId: '${param.acceptanceModelId}'}, function(result) {
|
||||
if (result.code >= 0) {
|
||||
closeModal('menuFuncModal');
|
||||
$("#table_output").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','保存失败')
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
function selectNode(){
|
||||
$.each(eval('${modelLibrarys}'),function(index,item){
|
||||
var node =$('#menu_func_tree').treeview('findNodes', [item.id, 'id']);
|
||||
$('#menu_func_tree').treeview('toggleNodeChecked', [ node, { silent: true } ]);
|
||||
});
|
||||
}
|
||||
// List<RoleMenu> list = menuService.getFinalMenuByRoleId(roleid);
|
||||
// JSONArray json=JSONArray.fromObject(list);
|
||||
// model.addAttribute("json",json);
|
||||
function initialTree(){
|
||||
$.post(ext.contextPath + '/achievement/modelLibrary/getTree.do', {roleid:'${roleid}'} , function(data) {
|
||||
console.info(data.result)
|
||||
if(data.result.length>0){
|
||||
$('#menu_func_tree').treeview({
|
||||
data: data.result,
|
||||
showCheckbox: true,
|
||||
showTags:true,
|
||||
showBorder:false,
|
||||
hierarchicalCheck:true,//级联勾选
|
||||
onInitialized: function(event, nodes) {
|
||||
},
|
||||
|
||||
onRendered: function(event, nodes) {
|
||||
setTimeout("selectNode();","100");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
$(function() {
|
||||
initialTree();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="menuFuncModal" >
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content" >
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" data-target="#menuFuncModal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">指标树</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="alertDiv"></div>
|
||||
<div id="menu_func_tree" style="height:400px;overflow:auto; "></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" data-target="#menuFuncModal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSaveMainRole()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
264
WebRoot/jsp/achievement/modelLibraryAdd.jsp
Normal file
264
WebRoot/jsp/achievement/modelLibraryAdd.jsp
Normal file
@ -0,0 +1,264 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
|
||||
<%@page import="com.sipai.entity.achievement.ModelLibrary" %>
|
||||
<% request.setAttribute("Type_Large", ModelLibrary.Type_Large); %>
|
||||
<% request.setAttribute("Type_Little", ModelLibrary.Type_Little); %>
|
||||
<% request.setAttribute("Type_In", ModelLibrary.Type_In); %>
|
||||
<% request.setAttribute("Type_Out", ModelLibrary.Type_Out); %>
|
||||
<% request.setAttribute("Type_NotNull", ModelLibrary.Type_NotNull); %>
|
||||
|
||||
<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 + '/user/showMenu4Select.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 + "/achievement/modelLibrary/save.do", $("#subForm").serialize(), function (data) {
|
||||
var dataStr = eval("(" + data + ")");
|
||||
if (dataStr.result == 1) {
|
||||
initTreeView();
|
||||
editFun('${id}');
|
||||
} else {
|
||||
showAlert('d', '保存失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
_pname: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '上级菜单不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
equipmentLevelId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '关联等级不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
morder: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '顺序不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^[0-9]*$/,
|
||||
message: '顺序必须为数字'
|
||||
}
|
||||
}
|
||||
},
|
||||
active: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '请选择启用状态'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function dodel() {
|
||||
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 + '/achievement/modelLibrary/delete.do', $("#subForm").serialize(), function (data) {
|
||||
if (data.result > 0) {
|
||||
initTreeView();
|
||||
} else {
|
||||
showAlert('d', '删除失败');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//是否审核 不审核则不显示 “可审核报表用户” 框
|
||||
$('#referenceType').on('change', function () {
|
||||
var val = $(this).val();
|
||||
if (val == '${Type_In}') {
|
||||
$('#checkDiv1').hide();
|
||||
$('#checkDiv2').show();
|
||||
}
|
||||
if (val == '${Type_Out}') {
|
||||
$('#checkDiv1').hide();
|
||||
$('#checkDiv2').show();
|
||||
}
|
||||
if (val == '${Type_Large}') {
|
||||
$('#checkDiv1').show();
|
||||
$('#checkDiv2').hide();
|
||||
}
|
||||
if (val == '${Type_Little}') {
|
||||
$('#checkDiv1').show();
|
||||
$('#checkDiv2').hide();
|
||||
}
|
||||
if (val == '${Type_NotNull}') {
|
||||
$('#checkDiv1').hide();
|
||||
$('#checkDiv2').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('#checkDiv1').hide();
|
||||
});
|
||||
</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>
|
||||
<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" autocomplete="off">
|
||||
<input id="id" name="id" type="hidden" value="${id}"/>
|
||||
<input id="type" name="type" type="hidden" value="${param.type}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="fault4SelectDiv111"></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="paramName" name="paramName" placeholder="名称"
|
||||
value="${entity.paramName}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上级菜单</label>
|
||||
<c:if test="${param.type == '1'}">
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" name="_pname" placeholder="上级菜单"
|
||||
value="无" readonly="true">
|
||||
<input name="pid" type="hidden" value="-1"/>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${param.type == '2' || param.type == '3'}">
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" name="_pname" placeholder="上级菜单"
|
||||
value="${pname}" readonly="true">
|
||||
<input name="pid" type="hidden" value="${param.pid}"/>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<c:if test="${param.type == '3'}">
|
||||
<label class="col-sm-2 control-label">编号</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="paramCode" name="paramCode"
|
||||
placeholder="用于指导分厂使用的标准编号" value="${entity.paramCode}">
|
||||
</div>
|
||||
</c:if>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" name="morder" placeholder="顺序"
|
||||
value="${entity.morder}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:if test="${param.type == '3'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">评价规则</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="referenceType" name="referenceType" class="form-control select2">
|
||||
<option value="${Type_In}" selected>${Type_In}</option>
|
||||
<option value="${Type_Out}">${Type_Out}</option>
|
||||
<option value="${Type_Large}">${Type_Large}</option>
|
||||
<option value="${Type_Little}">${Type_Little}</option>
|
||||
<option value="${Type_NotNull}">${Type_NotNull}</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">单位</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="unit" name="unit" placeholder="单位"
|
||||
value="${entity.unit}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="checkDiv1">
|
||||
<label class="col-sm-2 control-label">参考值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="referenceValue" name="referenceValue"
|
||||
placeholder="参考值" value="${entity.referenceValue}" step="0.1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="checkDiv2">
|
||||
<label class="col-sm-2 control-label">参考值下限</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="referenceLowValue" name="referenceLowValue"
|
||||
placeholder="参考值下限" value="${entity.referenceLowValue}" step="0.1">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">参考值上限</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="referenceHighValue" name="referenceHighValue"
|
||||
placeholder="参考值上限" value="${entity.referenceHighValue}" step="0.1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">说明</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id="explain" name="explain"
|
||||
placeholder="说明">${entity.explain}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
282
WebRoot/jsp/achievement/modelLibraryEdit.jsp
Normal file
282
WebRoot/jsp/achievement/modelLibraryEdit.jsp
Normal file
@ -0,0 +1,282 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
|
||||
<%@page import="com.sipai.entity.achievement.ModelLibrary" %>
|
||||
<% request.setAttribute("Type_Large", ModelLibrary.Type_Large); %>
|
||||
<% request.setAttribute("Type_Little", ModelLibrary.Type_Little); %>
|
||||
<% request.setAttribute("Type_In", ModelLibrary.Type_In); %>
|
||||
<% request.setAttribute("Type_Out", ModelLibrary.Type_Out); %>
|
||||
<% request.setAttribute("Type_NotNull", ModelLibrary.Type_NotNull); %>
|
||||
|
||||
<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 + '/user/showMenu4Select.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 + "/achievement/modelLibrary/update.do", $("#subForm").serialize(), function (data) {
|
||||
var dataStr = eval("(" + data + ")");
|
||||
if (dataStr.result == 1) {
|
||||
initTreeView();
|
||||
editFun('${entity.id}');
|
||||
} else {
|
||||
showAlert('d', '保存失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
_pname: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '上级菜单不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
equipmentLevelId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '关联等级不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
morder: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '顺序不能为空'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^[0-9]*$/,
|
||||
message: '顺序必须为数字'
|
||||
}
|
||||
}
|
||||
},
|
||||
active: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '请选择启用状态'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function dodel() {
|
||||
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 + '/achievement/modelLibrary/delete.do', $("#subForm").serialize(), function (data) {
|
||||
if (data.result > 0) {
|
||||
initTreeView();
|
||||
} else {
|
||||
showAlert('d', '删除失败');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*var showSubscribe4SelectsFun = function () {
|
||||
var assetClassId = $("#assetClassId").val();
|
||||
var _assetClassname = $("#_assetClassname").val();
|
||||
|
||||
$.post(ext.contextPath + '/equipment/assetClass/subscribeList4select.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "assetClassId",
|
||||
textId: "_assetClassname",
|
||||
assetClassId: assetClassId,
|
||||
_assetClassname: _assetClassname
|
||||
}, function (data) {
|
||||
$("#fault4SelectDiv111").html(data);
|
||||
openModal("subDetailModal2");
|
||||
});
|
||||
};*/
|
||||
|
||||
//是否审核 不审核则不显示 “可审核报表用户” 框
|
||||
$('#referenceType').on('change', function () {
|
||||
var val = $(this).val();
|
||||
if (val == '${Type_In}') {
|
||||
$('#checkDiv1').hide();
|
||||
$('#checkDiv2').show();
|
||||
}
|
||||
if (val == '${Type_Out}') {
|
||||
$('#checkDiv1').hide();
|
||||
$('#checkDiv2').show();
|
||||
}
|
||||
if (val == '${Type_Large}') {
|
||||
$('#checkDiv1').show();
|
||||
$('#checkDiv2').hide();
|
||||
}
|
||||
if (val == '${Type_Little}') {
|
||||
$('#checkDiv1').show();
|
||||
$('#checkDiv2').hide();
|
||||
}
|
||||
if (val == '${Type_NotNull}') {
|
||||
$('#checkDiv1').hide();
|
||||
$('#checkDiv2').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('#checkDiv1').hide();
|
||||
$('#referenceType').select2({minimumResultsForSearch: 10}).val('${entity.referenceType}').trigger('change');
|
||||
});
|
||||
</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>
|
||||
<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" autocomplete="off">
|
||||
<input id="id" name="id" type="hidden" value="${entity.id}"/>
|
||||
<input id="type" name="type" type="hidden" value="${entity.type}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="fault4SelectDiv111"></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="paramName" name="paramName" placeholder="名称"
|
||||
value="${entity.paramName}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上级菜单</label>
|
||||
<c:if test="${entity.type == '1'}">
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" name="_pname" placeholder="上级菜单"
|
||||
value="无" readonly="true">
|
||||
<input name="pid" type="hidden" value="-1"/>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${entity.type == '2' || entity.type == '3'}">
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" name="_pname" placeholder="上级菜单"
|
||||
value="${pname}" readonly="true">
|
||||
<input name="pid" type="hidden" value="${entity.pid}"/>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<c:if test="${param.type == '3'}">
|
||||
<label class="col-sm-2 control-label">编号</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="paramCode" name="paramCode"
|
||||
placeholder="用于指导分厂使用的标准编号" value="${entity.paramCode}">
|
||||
</div>
|
||||
</c:if>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" name="morder" placeholder="顺序"
|
||||
value="${entity.morder}" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<c:if test="${entity.type == '3'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">评价规则</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="referenceType" name="referenceType" class="form-control select2">
|
||||
<option value="${Type_In}" selected>${Type_In}</option>
|
||||
<option value="${Type_Out}">${Type_Out}</option>
|
||||
<option value="${Type_Large}">${Type_Large}</option>
|
||||
<option value="${Type_Little}">${Type_Little}</option>
|
||||
<option value="${Type_NotNull}">${Type_NotNull}</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">单位</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="unit" name="unit" placeholder="单位"
|
||||
value="${entity.unit}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="checkDiv1">
|
||||
<label class="col-sm-2 control-label">参考值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="referenceValue" name="referenceValue"
|
||||
placeholder="参考值" value="${entity.referenceValue}" step="0.1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="checkDiv2">
|
||||
<label class="col-sm-2 control-label">参考值下限</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="referenceLowValue" name="referenceLowValue"
|
||||
placeholder="参考值下限" value="${entity.referenceLowValue}" step="0.1">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">参考值上限</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="referenceHighValue" name="referenceHighValue"
|
||||
placeholder="参考值上限" value="${entity.referenceHighValue}" step="0.1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">说明</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id="explain" name="explain"
|
||||
placeholder="说明">${entity.explain}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
841
WebRoot/jsp/activiti/donetaskList.jsp
Normal file
841
WebRoot/jsp/activiti/donetaskList.jsp
Normal file
@ -0,0 +1,841 @@
|
||||
<%@page import="com.sipai.entity.activiti.ProcessType"%>
|
||||
<%@page import="com.sipai.entity.sparepart.SparePartCommString"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
||||
<%@page import="com.sipai.entity.process.ProcessAdjustment"%>
|
||||
<%@ 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"%>
|
||||
|
||||
<%request.setAttribute("Status_Cancel_Problem",Maintenance.Status_Cancel_Problem);%>
|
||||
<%request.setAttribute("Status_Confirm_Maintainer",Maintenance.Status_Confirm_Maintainer);%>
|
||||
<%request.setAttribute("Status_Cancel_Maintainer",Maintenance.Status_Cancel_Maintainer);%>
|
||||
<%request.setAttribute("Status_CancelTOMaintainer",Maintenance.Status_CancelTOMaintainer);%>
|
||||
<%request.setAttribute("Status_Submit_Problem",Maintenance.Status_Submit_Problem);%>
|
||||
<%request.setAttribute("Status_Launch",Maintenance.Status_Launch);%>
|
||||
<%request.setAttribute("Status_Edit",Maintenance.Status_Edit);%>
|
||||
<%request.setAttribute("Status_Submit_Maintainer",Maintenance.Status_Submit_Maintainer);%>
|
||||
|
||||
<% request.setAttribute("UNIT_HANDLE", BusinessUnit.UNIT_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_AUDIT", BusinessUnit.UNIT_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_TEAM_HANDLE", BusinessUnit.UNIT_TEAM_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_OFFICE_HANDLE", BusinessUnit.UNIT_OFFICE_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_OUTSOURCING_HANDLE", BusinessUnit.UNIT_OUTSOURCING_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_RECEIVE_HANDLE", BusinessUnit.UNIT_RECEIVE_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_BASE_AUDIT", BusinessUnit.UNIT_BASE_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_PRODUCT_AUDIT", BusinessUnit.UNIT_PRODUCT_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_CENTER_AUDIT", BusinessUnit.UNIT_CENTER_AUDIT);%>
|
||||
|
||||
<% request.setAttribute("UNIT_SUBSCRIBE_AUDIT", BusinessUnit.UNIT_SUBSCRIBE_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_DEPT_APPLY", BusinessUnit.UNIT_DEPT_APPLY);%>
|
||||
<% request.setAttribute("UNIT_INQUIRY", BusinessUnit.UNIT_INQUIRY);%>
|
||||
<% request.setAttribute("UNIT_CONTRACT_APPLY", BusinessUnit.UNIT_CONTRACT_APPLY);%>
|
||||
<% request.setAttribute("UNIT_CONTRACT_AUDIT", BusinessUnit.UNIT_CONTRACT_AUDIT);%>
|
||||
<% request.setAttribute("B_Purchase", ProcessType.B_Purchase.getId());%>
|
||||
<% request.setAttribute("B_Contract", ProcessType.B_Contract.getId());%>
|
||||
<% request.setAttribute("I_Stock", ProcessType.I_Stock.getId());%>
|
||||
<% request.setAttribute("UNIT_IN_STOCK_AUDIT", BusinessUnit.UNIT_IN_STOCK_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_IN_STOCK_HANDLE", BusinessUnit.UNIT_IN_STOCK_HANDLE);%>
|
||||
<% request.setAttribute("O_Stock", ProcessType.O_Stock.getId());%>
|
||||
<% request.setAttribute("Scetion_Stock", ProcessType.Scetion_Stock.getId());%>
|
||||
<% request.setAttribute("UNIT_OUT_STOCK_AUDIT", BusinessUnit.UNIT_OUT_STOCK_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_OUT_STOCK_HANDLE", BusinessUnit.UNIT_OUT_STOCK_HANDLE);%>
|
||||
|
||||
<% request.setAttribute("M_Plan", ProcessType.Maintain_Plan.getId());%>
|
||||
<% request.setAttribute("R_Plan", ProcessType.Repair_Plan.getId());%>
|
||||
<% request.setAttribute("UNIT_Maintain_AUDIT", BusinessUnit.UNIT_Maintain_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_Maintain_HANDLE", BusinessUnit.UNIT_Maintain_HANDLE);%>
|
||||
|
||||
<% request.setAttribute("UNIT_Repair_AUDIT", BusinessUnit.UNIT_Repair_AUDIT);%>
|
||||
|
||||
<% request.setAttribute("Stock_Check", ProcessType.Stock_Check.getId());%>
|
||||
<% request.setAttribute("UNIT_STOCK_CHECK_AUDIT", BusinessUnit.UNIT_STOCK_CHECK_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_STOCK_CHECK_HANDLE", BusinessUnit.UNIT_STOCK_CHECK_HANDLE);%>
|
||||
|
||||
<% request.setAttribute("Lose_Apply", ProcessType.Lose_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_LOSE_APPLY_AUDIT", BusinessUnit.UNIT_LOSE_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_LOSE_APPLY_ADJUST", BusinessUnit.UNIT_LOSE_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Sale_Apply", ProcessType.Sale_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_SALE_APPLY_AUDIT", BusinessUnit.UNIT_SALE_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_SALE_APPLY_ADJUST", BusinessUnit.UNIT_SALE_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Scrap_Apply", ProcessType.Scrap_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_SCRAP_APPLY_AUDIT", BusinessUnit.UNIT_SCRAP_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_SCRAP_APPLY_ADJUST", BusinessUnit.UNIT_SCRAP_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Transfers_Apply", ProcessType.Transfers_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_TRANSFERS_APPLY_AUDIT", BusinessUnit.UNIT_TRANSFERS_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_TRANSFERS_APPLY_ADJUST", BusinessUnit.UNIT_TRANSFERS_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Acceptance_Apply", ProcessType.Acceptance_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_ACCEPTANCE_APPLY_AUDIT", BusinessUnit.UNIT_ACCEPTANCE_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_ACCEPTANCE_APPLY_ADJUST", BusinessUnit.UNIT_ACCEPTANCE_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("EquipmentStop_Apply", ProcessType.EquipmentStop_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_EQUIPMENT_STOP_APPLY_AUDIT", BusinessUnit.UNIT_EQUIPMENT_STOP_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_EQUIPMENT_STOP_APPLY_ADJUST", BusinessUnit.UNIT_EQUIPMENT_STOP_APPLY_ADJUST);%>
|
||||
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL",MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN",MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR",MaintenanceCommString.MAINTENANCE_TYPE_REPAIR); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_DEFECT",MaintenanceCommString.MAINTENANCE_TYPE_DEFECT); %>
|
||||
<% request.setAttribute("Type_Detail", ProcessType.B_Maintenance.getId());%>
|
||||
|
||||
<%--工艺调整--%>
|
||||
<% request.setAttribute("Process_Adjustment", ProcessType.Process_Adjustment.getId());%>
|
||||
<%request.setAttribute("UNIT_PROCESSADJUSTMENT_EDIT",BusinessUnit.UNIT_PROCESSADJUSTMENT_EDIT); %>
|
||||
<%request.setAttribute("UNIT_PROCESSADJUSTMENT_AUDIT",BusinessUnit.UNIT_PROCESSADJUSTMENT_AUDIT); %>
|
||||
<%request.setAttribute("UNIT_PROCESSADJUSTMENT_HANDLE",BusinessUnit.UNIT_PROCESSADJUSTMENT_HANDLE); %>
|
||||
<%request.setAttribute("UNIT_PROCESSADJUSTMENT_ANALYSIS",BusinessUnit.UNIT_PROCESSADJUSTMENT_ANALYSIS); %>
|
||||
<%request.setAttribute("UNIT_PROCESSADJUSTMENT_EVALUATE",BusinessUnit.UNIT_PROCESSADJUSTMENT_EVALUATE); %>
|
||||
<%request.setAttribute("UNIT_PROCESSADJUSTMENT_DISTRIBUTION",BusinessUnit.UNIT_PROCESSADJUSTMENT_DISTRIBUTION); %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style>
|
||||
.main-header{display:none;}
|
||||
.content-header{display:none;}
|
||||
.main-footer{display:none;}
|
||||
</style>
|
||||
<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">
|
||||
<!--bootstrap-edittable 表格行内编辑 -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-editable/css/bootstrap-editable.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-editable/js/bootstrap-editable.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-editable/js/bootstrap-table-editable.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/work/group/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/work/group/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewTaskTraceFun = function(pid,ppid,taskId) {
|
||||
graphTrace(pid,ppid,taskId);
|
||||
};
|
||||
var viewDetailFun = function(id,type) {
|
||||
stopBubbleDefaultEvent();
|
||||
if(type.indexOf('${B_Purchase}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showSubscribeView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subscribeExcuteModal');
|
||||
});
|
||||
|
||||
}else if(type.indexOf('${B_Contract}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/contract/showContractView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('contractExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Process_Adjustment}')!=-1){
|
||||
$.post(ext.contextPath + '/process/processAdjustment/showProcessAdjustmentView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintenanceDetailModal');
|
||||
});
|
||||
}else if(type.indexOf('${I_Stock}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/inStockRecord/showProcessInStockView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('inStockExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${O_Stock}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showProcessOutStockView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('outStockExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Stock_Check}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/stockCheck/showProcessStockCheckView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('stockCheckExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${M_Plan}')!=-1){
|
||||
$.post(ext.contextPath + '/equipment/maintenancePlan/showProcessMaintainPlanView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintainPlanExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${R_Plan}')!=-1){
|
||||
$.post(ext.contextPath + '/equipment/equipmentRepairPlan/showProcessMaintainPlanView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('equipmentRepairPlanExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${EquipmentStop_Apply}')!=-1){//设备停用
|
||||
$.post(ext.contextPath + '/equipment/equipmentStopRecord/showProcessEquipmentStopApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('equipmentStopApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Lose_Apply}')!=-1){//丢失
|
||||
$.post(ext.contextPath + '/equipment/EquipmentLoseApply/showProcessLoseApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('loseApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Sale_Apply}')!=-1){//出售
|
||||
$.post(ext.contextPath + '/equipment/EquipmentSaleApply/showProcessSaleApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('saleApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Scrap_Apply}')!=-1){//报废
|
||||
$.post(ext.contextPath + '/equipment/EquipmentScrapApply/showProcessScrapApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('scrapApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Transfers_Apply}')!=-1){//调拨
|
||||
$.post(ext.contextPath + '/equipment/EquipmentTransfersApply/showProcessTransfersApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('transfersApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Acceptance_Apply}')!=-1){//验收
|
||||
$.post(ext.contextPath + '/equipment/equipmentAcceptanceApply/showProcessEquipmentAcceptanceApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('acceptanceApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Type_Detail}')!=-1){
|
||||
$.post(ext.contextPath + '/maintenance/showMaintenanceDetailView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintenanceDetailModal');
|
||||
});
|
||||
};
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
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 + '/activiti/workflow/process/delete.do', {deploymentId : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var claimFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/activiti/workflow/task/claim.do', {taskId : id}, function(data) {
|
||||
if(data==1){
|
||||
showAlert('s','签收成功','mainAlertdiv');
|
||||
$("#table").bootstrapTable('refresh')
|
||||
}else{
|
||||
showAlert('d','签收失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
};
|
||||
function goToLocation(url){
|
||||
$.post(ext.contextPath +"/user/getMenuRelation.do",{location:url},function(data){
|
||||
if(data.length>2){
|
||||
doforward(url,data[2].id,data[1].id,data[0].id)
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
var openModalPost= function(){
|
||||
|
||||
}
|
||||
var gotoTaskFun = function(type,status,processInstanceId,taskId,businessKey) {
|
||||
stopBubbleDefaultEvent();
|
||||
/* tabIndex为维护清单页面tab的index变量 */
|
||||
if(type=='${Type_Produce}'){
|
||||
//记录当前待办记录id,用于跳转页面后区别显示
|
||||
sessionStorage.setItem("businessKey", businessKey);
|
||||
switch (status) {
|
||||
case '${Status_Launch}':
|
||||
sessionStorage.setItem("tabIndex", '0');
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Edit}':
|
||||
case '${Status_Cancel_Problem}':
|
||||
goToLocation('maintenance/showLaunchList.do');
|
||||
break;
|
||||
case '${Status_Cancel_Maintainer}':
|
||||
sessionStorage.setItem("tabIndex", '0')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Confirm_Maintainer}':
|
||||
sessionStorage.setItem("tabIndex", '3')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Submit_Problem}':
|
||||
sessionStorage.setItem("tabIndex", '2')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Submit_Maintainer}':
|
||||
sessionStorage.setItem("tabIndex", '1')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_CancelTOMaintainer}':
|
||||
sessionStorage.setItem("tabIndex", '3')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${B_Purchase}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_SUBSCRIBE_AUDIT}'://任务审核
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showSubscribeAudit.do', {processInstanceId:processInstanceId,taskId:taskId,subscribeId:businessKey,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_DEPT_APPLY}'://部门申请
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showDeptApply.do', {processInstanceId:processInstanceId,taskId:taskId,subscribeId:businessKey,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_INQUIRY}'://采购询价
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showSubscribeInquiry.do', {processInstanceId:processInstanceId,taskId:taskId,subscribeId:businessKey,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${B_Contract}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_CONTRACT_AUDIT}'://任务审核
|
||||
$.post(ext.contextPath + '/sparepart/contract/showContractAudit.do', {processInstanceId:processInstanceId,taskId:taskId,contractId:businessKey,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_CONTRACT_APPLY}'://合同申请
|
||||
$.post(ext.contextPath + '/sparepart/contract/showDeptApply.do', {processInstanceId:processInstanceId,taskId:taskId,contractId:businessKey,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${ProcessType_ProcessAdjustment}')>-1){
|
||||
switch (status) {
|
||||
case '${UNIT_PROCESSADJUSTMENT_AUDIT_ANALYSIS}'://调整分析
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showAuditAnalysis.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_PROCESSADJUSTMENT_ADJUST}'://调整
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_PROCESSADJUSTMENT_AUDIT}'://审核
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showAudit.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_PROCESSADJUSTMENT_HANDLE}'://执行
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${I_Stock}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_IN_STOCK_AUDIT}'://入库任务审核
|
||||
$.post(ext.contextPath + '/sparepart/inStockRecord/showAuditInStock.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_IN_STOCK_HANDLE}'://入库任务处理
|
||||
$.post(ext.contextPath + '/sparepart/inStockRecord/showInStockHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${O_Stock}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_OUT_STOCK_AUDIT}'://出库任务审核
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showAuditOutStock.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_OUT_STOCK_HANDLE}'://出库任务处理
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showOutStockHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Stock_Check}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_STOCK_CHECK_AUDIT}'://库存盘点审核
|
||||
$.post(ext.contextPath + '/sparepart/stockCheck/showAuditStockCheck.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_STOCK_CHECK_HANDLE}'://库存盘点处理
|
||||
$.post(ext.contextPath + '/sparepart/stockCheck/showStockCheckHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${EquipmentStop_Apply}')!=-1){
|
||||
switch (status) {
|
||||
|
||||
case '${UNIT_EQUIPMENT_STOP_APPLY_AUDIT}'://设备停用申请审核
|
||||
$.post(ext.contextPath + '/equipment/equipmentStopRecord/showAuditEquipmentStopApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_EQUIPMENT_STOP_APPLY_ADJUST}'://设备停用申请调整
|
||||
$.post(ext.contextPath + '/equipment/equipmentStopRecord/showEquipmentStopApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
|
||||
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Lose_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_LOSE_APPLY_AUDIT}'://设备丢失申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentLoseApply/showAuditLoseApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_LOSE_APPLY_ADJUST}'://设备丢失申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentLoseApply/showLoseApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Sale_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_SALE_APPLY_AUDIT}'://设备出售申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentSaleApply/showAuditSaleApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_SALE_APPLY_ADJUST}'://设备出售申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentSaleApply/showSaleApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Scrap_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_SCRAP_APPLY_AUDIT}'://设备报废申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentScrapApply/showAuditScrapApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_SCRAP_APPLY_ADJUST}'://设备报废申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentScrapApply/showScrapApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Transfers_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_TRANSFERS_APPLY_AUDIT}'://设备调拨申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentTransfersApply/showAuditTransfersApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_TRANSFERS_APPLY_ADJUST}'://设备调拨申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentTransfersApply/showTransfersApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Acceptance_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_ACCEPTANCE_APPLY_AUDIT}'://设备验收申请审核
|
||||
$.post(ext.contextPath + '/equipment/equipmentAcceptanceApply/showAuditEquipmentAcceptanceApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_ACCEPTANCE_APPLY_ADJUST}'://设备验收申请调整
|
||||
$.post(ext.contextPath + '/equipment/equipmentAcceptanceApply/showAcceptanceApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${M_Plan}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_Maintain_AUDIT}'://保养计划审核
|
||||
$.post(ext.contextPath + '/equipment/maintenancePlan/showAuditMaintainPlan.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_Maintain_HANDLE}'://保养计划编辑
|
||||
$.post(ext.contextPath + '/equipment/maintenancePlan/showMaintainPlanHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${R_Plan}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_Repair_AUDIT}'://保养计划审核
|
||||
$.post(ext.contextPath + '/equipment/equipmentRepairPlan/showAuditMaintainPlan.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_Repair_HANDLE}'://保养计划编辑
|
||||
$.post(ext.contextPath + '/equipment/equipmentRepairPlan/showMaintainPlanHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Type_Detail}')!=-1){
|
||||
var arr = new Array();
|
||||
arr = type.split("-")
|
||||
var maintenanceType = arr[2];//运维类型:保养,维修,检修
|
||||
switch (status) {
|
||||
case '${UNIT_HANDLE}':
|
||||
if(maintenanceType == '${MAINTENANCE_TYPE_MAINTAIN}'){//保养调整
|
||||
$.post(ext.contextPath + '/maintenance/showMaintainAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_REPAIR}'){//维修调整
|
||||
$.post(ext.contextPath + '/maintenance/showMaintainAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_DEFECT}'){//缺陷调整
|
||||
$.post(ext.contextPath + '/maintenance/showDefectAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
break;
|
||||
case '${UNIT_AUDIT}'://设备专责审核
|
||||
case '${UNIT_BASE_AUDIT}'://基层领导审核
|
||||
case '${UNIT_PRODUCT_AUDIT}'://生产运营中心审核
|
||||
case '${UNIT_CENTER_AUDIT}'://中层领导审核
|
||||
if(maintenanceType == '${MAINTENANCE_TYPE_MAINTAIN}'){//保养审核
|
||||
$.post(ext.contextPath + '/maintenance/showEquipmentMaintainAudit.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_REPAIR}'){//维修审核
|
||||
$.post(ext.contextPath + '/maintenance/showAuditDetail.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_DEFECT}'){//缺陷审核
|
||||
$.post(ext.contextPath + '/maintenance/showDefectAudit.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
break;
|
||||
case '${UNIT_TEAM_HANDLE}'://维修班处理
|
||||
case '${UNIT_OFFICE_HANDLE}'://设备办处理
|
||||
case '${UNIT_OUTSOURCING_HANDLE}'://外包处理
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetail.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_RECEIVE_HANDLE}'://验收
|
||||
$.post(ext.contextPath + '/maintenance/showReceiveOpinion.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
|
||||
}
|
||||
}else{
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function() {
|
||||
var flag = IsApp();
|
||||
if (flag==true){
|
||||
|
||||
}else{
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
|
||||
//init();
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/activiti/workflow/doneworklist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'client', // 设置为服务器端分页
|
||||
/* queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name : $('#search_name').val()
|
||||
}
|
||||
},*/
|
||||
sortName: 'startTime', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow:function(row){
|
||||
//viewTaskTraceFun(row.historicProcessInstance.id,row.processDefinition.id,row.task.id);
|
||||
},
|
||||
columns: [{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '任务名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'startTime', // 返回json数据中的name
|
||||
title: '任务下发时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'endTime', // 返回json数据中的name
|
||||
title: '任务完成时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'problem', // 返回json数据中的name
|
||||
title: '问题描述', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.business==null?'':row.business.problem;
|
||||
}
|
||||
},{
|
||||
field: 'taskName', // 返回json数据中的name
|
||||
title: '任务节点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.task.name;
|
||||
}
|
||||
},{
|
||||
field: 'op',
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 80, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str = '';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="viewDetailFun(\''+row.historicProcessInstance.businessKey+'\',\''+row.type+'\')" data-toggle="tooltip" title="查看详情"><i class="fa fa-history"></i><span class="hidden-md hidden-lg"> 查看详情</span></button>'
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
//查看过待办,就清除之前的待办id
|
||||
sessionStorage.setItem("businessKey", "");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<!-- 流程图填充div -->
|
||||
<div id="traceDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="PRDetail4SelectsDiv"></div>
|
||||
<div id="stock4SelectsDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div id="outStock4SelectDiv"></div>
|
||||
<div id="selectCompanyDiv"></div>
|
||||
<div id="goodsAddDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;"></div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<!-- switch-button-->
|
||||
<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>
|
||||
</html>
|
||||
78
WebRoot/jsp/activiti/importAutoActiviti.jsp
Normal file
78
WebRoot/jsp/activiti/importAutoActiviti.jsp
Normal file
@ -0,0 +1,78 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>导入人员</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script>
|
||||
var uploader,state;
|
||||
$(function() {
|
||||
var $ = jQuery,
|
||||
$list = $('#thelist'),
|
||||
state = 'pending';
|
||||
|
||||
uploader = WebUploader.create({
|
||||
// swf文件路径
|
||||
swf: ext.contextPath+'/JS/webuploader-0.1.5/Uploader.swf',
|
||||
// 文件接收服务端。
|
||||
server: ext.contextPath+'/activiti/auto/saveImportActiviti.do',
|
||||
// 选择文件的按钮。可选。
|
||||
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
|
||||
pick: {
|
||||
id: '#picker',
|
||||
multiple: false
|
||||
},
|
||||
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
|
||||
resize: false,
|
||||
accept: {
|
||||
title: 'Excel',
|
||||
extensions: 'xls,xlsx',
|
||||
mimeTypes: 'excel/*'
|
||||
}
|
||||
});
|
||||
//当有文件被添加进队列的时候
|
||||
uploader.on( 'fileQueued', function( file ) {
|
||||
$list.append( '<div id="' + file.id + '" class="item">' +
|
||||
'<h4 class="info">' + file.name + '</h4>' +
|
||||
'<p class="state">等待上传...</p>' +
|
||||
'</div>' );
|
||||
});
|
||||
});
|
||||
|
||||
var doimport = function(dialog, grid){
|
||||
//执行上传功能
|
||||
if ( state === 'uploading' ) {
|
||||
alert("文件正在上传中,请稍等");
|
||||
} else {
|
||||
uploader.upload();
|
||||
}
|
||||
|
||||
uploader.on( 'uploadError', function( file ) {
|
||||
$( '#'+file.id ).find('p.state').text('上传出错');
|
||||
});
|
||||
|
||||
uploader.on( 'uploadSuccess', function( file,response ) {
|
||||
$( '#'+file.id ).find('p.state').text('已上传');
|
||||
if(response=="1"){
|
||||
grid.datagrid('reload');
|
||||
alert("导入成功!");
|
||||
dialog.dialog('destroy');
|
||||
}else{
|
||||
alert("导入未完成!");
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="uploader" class="wu-example">
|
||||
<div class="btns">
|
||||
<div id="picker">选择文件</div>
|
||||
</div>
|
||||
<!--用来存放文件信息-->
|
||||
<div id="thelist" class="uploader-list"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
78
WebRoot/jsp/activiti/importExcel4Model.jsp
Normal file
78
WebRoot/jsp/activiti/importExcel4Model.jsp
Normal file
@ -0,0 +1,78 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>导入人员</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script>
|
||||
var uploader,state;
|
||||
$(function() {
|
||||
var $ = jQuery,
|
||||
$list = $('#thelist'),
|
||||
state = 'pending';
|
||||
|
||||
uploader = WebUploader.create({
|
||||
// swf文件路径
|
||||
swf: ext.contextPath+'/JS/webuploader-0.1.5/Uploader.swf',
|
||||
// 文件接收服务端。
|
||||
server: ext.contextPath+'${param.dest}?param=${param.param}',
|
||||
// 选择文件的按钮。可选。
|
||||
// 内部根据当前运行是创建,可能是input元素,也可能是flash.
|
||||
pick: {
|
||||
id: '#picker',
|
||||
multiple: false
|
||||
},
|
||||
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
|
||||
resize: false,
|
||||
accept: {
|
||||
title: 'Excel',
|
||||
extensions: 'xls,xlsx',
|
||||
mimeTypes: 'excel/*'
|
||||
}
|
||||
});
|
||||
//当有文件被添加进队列的时候
|
||||
uploader.on( 'fileQueued', function( file ) {
|
||||
$list.append( '<div id="' + file.id + '" class="item">' +
|
||||
'<h4 class="info">' + file.name + '</h4>' +
|
||||
'<p class="state">等待上传...</p>' +
|
||||
'</div>' );
|
||||
});
|
||||
});
|
||||
|
||||
var doimport = function(dialog, grid){
|
||||
//执行上传功能
|
||||
if ( state === 'uploading' ) {
|
||||
alert("文件正在上传中,请稍等");
|
||||
} else {
|
||||
uploader.upload();
|
||||
}
|
||||
|
||||
uploader.on( 'uploadError', function( file ) {
|
||||
$( '#'+file.id ).find('p.state').text('上传出错');
|
||||
});
|
||||
|
||||
uploader.on( 'uploadSuccess', function( file,response ) {
|
||||
$( '#'+file.id ).find('p.state').text('已上传');
|
||||
if(response.res=="1"){
|
||||
grid.datagrid('reload');
|
||||
top.$.messager.alert('导入成功!', "以下工序:"+response.unmatch+",未查询到匹配工序,若需要,请手动编辑模型添加工序!");
|
||||
dialog.dialog('destroy');
|
||||
}else{
|
||||
alert("导入未完成!");
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="uploader" class="wu-example">
|
||||
<div class="btns">
|
||||
<div id="picker">选择文件</div>
|
||||
</div>
|
||||
<!--用来存放文件信息-->
|
||||
<div id="thelist" class="uploader-list"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
96
WebRoot/jsp/activiti/leaveAdd.jsp
Normal file
96
WebRoot/jsp/activiti/leaveAdd.jsp
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" 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"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
var g = $('#leaveDefinition').combogrid('grid'); // get datagrid object
|
||||
var r = g.datagrid('getSelected'); // get the selected row
|
||||
if(r){
|
||||
$.post(ext.contextPath + "/activiti/leavew/start.do?processId="+r.id, $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}else{
|
||||
alert("请选择请假流程");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#leaveDefinition').combogrid({
|
||||
panelWidth: 400,
|
||||
idField: 'id',
|
||||
textField: 'id',
|
||||
url: ext.contextPath +'/activiti/workflow/getProcessListForSelect.do',
|
||||
columns: [[
|
||||
{field:'id',title:'流程ID',width:50},
|
||||
{field:'name',title:'名称',width:50},
|
||||
{field:'description',title:'描述',width:80},
|
||||
{field:'revision',title:'版本号',width:30}
|
||||
]],
|
||||
fitColumns: true
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>请假流程:</td>
|
||||
<td>
|
||||
<select id="leaveDefinition" name="leaveDefinition" class="easyui-combogrid" >
|
||||
</select>
|
||||
<input name="processDefinitionId" type="hidden" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>请假类型:</td>
|
||||
<td>
|
||||
<select id="leaveType" name="leaveType" class="easyui-combobox" data-options="panelHeight:'auto'">
|
||||
<option>公休</option>
|
||||
<option>病假</option>
|
||||
<option>调休</option>
|
||||
<option>事假</option>
|
||||
<option>婚假</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>开始时间:</td>
|
||||
<td><input id="startTime" name="startTime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>结束时间:</td>
|
||||
<td><input id="endTime" name="endTime" class="Wdate"
|
||||
value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>请假原因:</td>
|
||||
<td>
|
||||
<input id="reason" name="reason" class="easyui-textbox" style="width:100%;height:100px" value=""
|
||||
data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
140
WebRoot/jsp/activiti/leaveDetail.jsp
Normal file
140
WebRoot/jsp/activiti/leaveDetail.jsp
Normal file
@ -0,0 +1,140 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript" src="json2.js"></script>
|
||||
<script src="<%=contextPath%>/JS/activiti/leave-complete.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
|
||||
}
|
||||
function doreject(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
$.messager.prompt('提示', '请填写驳回原因', function(r){
|
||||
if (r){
|
||||
complete(dialog,taskId, [{
|
||||
key: 'deptLeaderPass',
|
||||
value: false,
|
||||
type: 'B',
|
||||
comment:r
|
||||
}]);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function docomplete(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
complete(dialog,taskId, [{
|
||||
key: 'deptLeaderPass',
|
||||
value: true,
|
||||
type: 'B'
|
||||
}]);
|
||||
}
|
||||
function docompleteToSub(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
var list=["dept1","dept2"];
|
||||
var liststr="";
|
||||
$.each(list, function() {
|
||||
if (liststr != "") {
|
||||
liststr += "-";
|
||||
}
|
||||
liststr += this;
|
||||
});
|
||||
complete(dialog,taskId, [{
|
||||
key: 'deptLeaderPass',
|
||||
value: true,
|
||||
type: 'B'
|
||||
},{
|
||||
key: 'CodeList',
|
||||
value: liststr,
|
||||
type: 'A'
|
||||
}]);
|
||||
}
|
||||
function doreApply(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
complete(dialog,taskId, [{
|
||||
key: 'reApply',
|
||||
value: true,
|
||||
type: 'B'
|
||||
}]);
|
||||
}
|
||||
function dounApply(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
complete(dialog,taskId, [{
|
||||
key: 'reApply',
|
||||
value: false,
|
||||
type: 'B'
|
||||
}]);
|
||||
}
|
||||
function doPass(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
complete(dialog,taskId, null);
|
||||
}
|
||||
function docompleteToCA(dialog,taskId,leaveid) {
|
||||
complete(dialog,taskId, [{
|
||||
key: 'deptLeaderPass',
|
||||
value: true,
|
||||
type: 'B'
|
||||
},{
|
||||
key: 'leaveId',
|
||||
value: leaveid,
|
||||
type: 'S'
|
||||
}]);
|
||||
}
|
||||
var advicestr="hrpass";//除了comment其它地方含中文会产生乱码
|
||||
function docompleteFinishCA(dialog,taskId,advice) {
|
||||
complete(dialog,taskId, [{
|
||||
key: 'advice',
|
||||
value: advicestr,
|
||||
type: 'S'
|
||||
}]);
|
||||
}
|
||||
$(function() {
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input name="id" type="hidden" value="${leave.id}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>请假类型</th>
|
||||
<td>
|
||||
${leave.leaveType}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>请假开始时间</th>
|
||||
<td>
|
||||
${leave.startTime}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>请假结束时间</th>
|
||||
<td>
|
||||
${leave.endTime}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>请假人员</th>
|
||||
<td>
|
||||
${leave.userId}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>请假原因</th>
|
||||
<td>
|
||||
${leave.reason}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
86
WebRoot/jsp/activiti/leaveDetailwithComment.jsp
Normal file
86
WebRoot/jsp/activiti/leaveDetailwithComment.jsp
Normal file
@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript" src="json2.js"></script>
|
||||
<script src="<%=contextPath%>/JS/activiti/leave-complete.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
function doreApply(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
complete(dialog,taskId, [{
|
||||
key: 'reApply',
|
||||
value: true,
|
||||
type: 'B'
|
||||
}],$(".form").serialize());
|
||||
}
|
||||
function dounApply(dialog,taskId) {
|
||||
// 设置流程变量
|
||||
complete(dialog,taskId, [{
|
||||
key: 'reApply',
|
||||
value: false,
|
||||
type: 'B'
|
||||
}]);
|
||||
}
|
||||
$(function() {
|
||||
$('#leaveType').combobox("setValue",'${leave.leaveType}');
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input name="id" type="hidden" value="${leave.id}"/>
|
||||
<div class="easyui-panel" title="审批信息" style="padding:10px;">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>领导意见</th>
|
||||
<td>
|
||||
${leave.comments[0].message}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="easyui-panel" title="请假信息" style="padding:10px;">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>请假类型:</td>
|
||||
<td>
|
||||
<select id="leaveType" name="leaveType" class="easyui-combobox" data-options="panelHeight:'auto'">
|
||||
<option>公休</option>
|
||||
<option>病假</option>
|
||||
<option>调休</option>
|
||||
<option>事假</option>
|
||||
<option>婚假</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>开始时间:</td>
|
||||
<td><input id="startTime" name="startTime" class="Wdate"
|
||||
value="${leave.startTime}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>结束时间:</td>
|
||||
<td><input id="endTime" name="endTime" class="Wdate"
|
||||
value="${leave.endTime}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
|
||||
readonly/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>请假原因:</td>
|
||||
<td>
|
||||
<input id="reason" name="reason" class="easyui-textbox" style="width:100%;height:100px" value="${leave.reason}"
|
||||
data-options="multiline:true" validtype="length[0,250]" invalidMessage="有效长度0-250" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
119
WebRoot/jsp/activiti/leaveEdit.jsp
Normal file
119
WebRoot/jsp/activiti/leaveEdit.jsp
Normal file
@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" 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"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="../inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
function dosave(dialog,grid) {
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/work/group/update.do", $(".form").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
});
|
||||
}else if(data.res == 0){
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}else{
|
||||
top.$.messager.alert('提示', data.res, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#deptid').combotree({
|
||||
url : ext.contextPath + '/user/getUnitsJson.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#deptid").tree("unselect");
|
||||
}
|
||||
},
|
||||
onLoadSuccess:function(){
|
||||
$('#deptid').combotree('setValue','${group.deptid}');
|
||||
}
|
||||
});
|
||||
|
||||
var leadernames="",leaderids="",membernames="",memberids="";
|
||||
<c:forEach var="obj" items="${group.groupmembers}">
|
||||
if("${obj.usertype}"=="leader"){
|
||||
leadernames+="${obj.username}"+",";
|
||||
leaderids+="${obj.userid}"+",";
|
||||
}
|
||||
if("${obj.usertype}"=="member"){
|
||||
membernames+="${obj.username}"+",";
|
||||
memberids+="${obj.userid}"+",";
|
||||
}
|
||||
</c:forEach>
|
||||
leadernames=leadernames.substring(0,leadernames.length-1);
|
||||
membernames=membernames.substring(0,membernames.length-1);
|
||||
$('#leadername').textbox({
|
||||
required:true,
|
||||
editable:false,
|
||||
value:leadernames
|
||||
});
|
||||
$('#leadername').textbox('textbox').bind("click",function(){
|
||||
selectUsers("leadername","leaderid","${param.iframeId}");
|
||||
});
|
||||
$('#leaderid').val(leaderids);
|
||||
|
||||
$('#membername').textbox({
|
||||
required:true,
|
||||
editable:false,
|
||||
value:membernames
|
||||
});
|
||||
$('#membername').textbox('textbox').bind("click",function(){
|
||||
selectUsers("membername","memberid","${param.iframeId}");
|
||||
});
|
||||
$('#memberid').val(memberids);
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" class="form">
|
||||
<input name="id" type="hidden" value="${group.id}"/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>班组名称</th>
|
||||
<td><input name="name" class="easyui-textbox"
|
||||
data-options="required:true,validType:'isBlank'" value="${group.name}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>所属车间</th>
|
||||
<td><input id="deptid" name="deptid" class="easyui-combobox"
|
||||
data-options="required:true,validType:'isBlank'" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>组长</th>
|
||||
<td>
|
||||
<input id="leadername" name="leadername" class="easyui-textbox"/>
|
||||
<input id="leaderid" name="leaderid" type="hidden"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>组员</th>
|
||||
<td>
|
||||
<textarea id="membername" name="membername" class="easyui-textbox" data-options="multiline:true"
|
||||
style="height:100px;width:100%"></textarea>
|
||||
<input id="memberid" name="memberid" type="hidden"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td>
|
||||
<textarea name="remark" class="easyui-textbox" data-options="multiline:true" style="height:100px;width:100%"
|
||||
validtype="length[0,250]" invalidMessage="有效长度0-250">${group.remark}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
223
WebRoot/jsp/activiti/leaveList.jsp
Normal file
223
WebRoot/jsp/activiti/leaveList.jsp
Normal file
@ -0,0 +1,223 @@
|
||||
<%@page import="org.apache.poi.ss.usermodel.Row"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script src="<%=contextPath%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeadd',
|
||||
title : '添加班组',
|
||||
url : ext.contextPath + '/activiti/leavew/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeedit',
|
||||
title : '编辑班组',
|
||||
url : ext.contextPath + '/work/group/edit.do?iframeId=iframeedit&id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(pid,ppid) {
|
||||
/* var dialog = parent.ext.modalDialog({
|
||||
title : '查看用户信息',
|
||||
url : ext.contextPath + '/work/group/view.do?id=' + id
|
||||
}); */
|
||||
//alert(pid+","+ppid);
|
||||
graphTrace("",pid,ppid);
|
||||
};
|
||||
|
||||
var suspendFun = function(id,status) {
|
||||
var tip="";
|
||||
if(status=="active"){
|
||||
tip="激活";
|
||||
}else{
|
||||
tip="挂起";
|
||||
}
|
||||
parent.$.messager.confirm('提示', '您确定要'+tip+'此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/processinstance/update.do', {processInstanceId : id,state:status}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示',tip+'成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示',tip+'失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
//alert(datas);
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/activiti/leavew/getlist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '请假类型', field : 'leaveType', sortable : true, halign:'center'},
|
||||
{width : '180', title : '申请时间', field : 'applyTime', sortable : true, halign:'center'},
|
||||
{width : '280', title : '申请原因', field : 'reason', sortable : false, halign:'center'},
|
||||
{width : '80', title : '用户名', field : 'userId', sortable : true, halign:'center'},
|
||||
{width : '150', title : '流程ID', field : 'processDefinitionId', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
return row.processDefinition.id;
|
||||
}},
|
||||
{width : '150', title : '是否挂起', field : 'suspended', sortable : true, halign:'center',formatter : function(value, row) {
|
||||
var suspend=row.processInstance.suspended;
|
||||
if(suspend=='2'){
|
||||
return "已挂起";
|
||||
}else{
|
||||
return "未挂起";
|
||||
}
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
|
||||
|
||||
<%if (sessionManager.havePermission(session,"activiti/leavew/showlist.do?scope=all")) {%>
|
||||
//alert(!row.task.assignee);
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.processInstanceId+'\',\''+row.processDefinition.id+'\');"/>';
|
||||
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"activiti/leavew/edit.do")) {%>
|
||||
if(row.processInstance.suspended=="2")
|
||||
str += '<img class="iconImg ext-icon-table_lightning" title="激活" onclick="suspendFun(\''+row.processInstanceId+'\',\'active\');"/>';
|
||||
else
|
||||
str += '<img class="iconImg ext-icon-table_link" title="挂起" onclick="suspendFun(\''+row.processInstanceId+'\',\'suspend\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
//var pi;
|
||||
var pager = grid.datagrid('getPager'); // get the pager of datagrid
|
||||
pager.pagination({
|
||||
beforePageText: '第', //页数文本框前显示的汉字
|
||||
afterPageText: '页 共 {pages} 页',
|
||||
displayMsg: '显示 {from}到{to},共 {total} 条记录',
|
||||
});
|
||||
|
||||
$('#search_pid').combotree({
|
||||
url : ext.contextPath + '/user/getUnitsJson.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
width:200,
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#search_pid").tree("search_pid");
|
||||
}
|
||||
},
|
||||
editable:false
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"work/group/add.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="addFun();">添加</a>
|
||||
</td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>班组名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>所属车间</td>
|
||||
<td><input id="search_pid" name="search_pid" class="easyui-combotree"/></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
341
WebRoot/jsp/activiti/leavetaskList.jsp
Normal file
341
WebRoot/jsp/activiti/leavetaskList.jsp
Normal file
@ -0,0 +1,341 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<%-- <script src="<%=contextPath%>/JS/activiti/leave-todo.js" type="text/javascript"></script> --%>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeadd',
|
||||
title : '添加班组',
|
||||
url : ext.contextPath + '/activiti/leavew/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var completeFun = function(leaveid,taskId,tdkey,name) {
|
||||
switch(tdkey)
|
||||
{
|
||||
case 'deptLeaderAudit':
|
||||
deptLeaderAuditFun(leaveid,taskId);
|
||||
break;
|
||||
case 'deptLeaderAuditToSub':
|
||||
deptLeaderAuditFunToSub(leaveid,taskId);
|
||||
break;
|
||||
case 'deptLeaderAuditToCA':
|
||||
deptLeaderAuditFunToCA(leaveid,taskId);
|
||||
break;
|
||||
case 'modifyApply':
|
||||
modifyApplyFun(leaveid,taskId,'deptLeaderAudit');
|
||||
break;
|
||||
case 'hrAudit':
|
||||
hrAuditFun(leaveid,taskId);
|
||||
break;
|
||||
case 'hrAuditCA':
|
||||
hrAuditCAFun(leaveid,taskId);
|
||||
break;
|
||||
default:
|
||||
alert("未查询到“"+tdkey+"”任务模块!");
|
||||
}
|
||||
|
||||
};
|
||||
var deptLeaderAuditFunToSub = function(leaveid,taskId) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '任务办理',
|
||||
width : 500,
|
||||
height : 300,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/activiti/leavew/getleavedetail.do?id='+leaveid,
|
||||
buttons : [ {
|
||||
text : '通过',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.docompleteToSub(dialog, taskId);
|
||||
}
|
||||
},{
|
||||
text : '驳回',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doreject(dialog,taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
dialog.dialog({
|
||||
onDestroy:function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}
|
||||
});
|
||||
};
|
||||
var deptLeaderAuditFunToCA = function(leaveid,taskId) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '任务办理',
|
||||
width : 500,
|
||||
height : 300,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/activiti/leavew/getleavedetail.do?id='+leaveid,
|
||||
buttons : [ {
|
||||
text : '通过',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.docompleteToCA(dialog, taskId,leaveid);
|
||||
}
|
||||
},{
|
||||
text : '驳回',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doreject(dialog,taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
dialog.dialog({
|
||||
onDestroy:function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}
|
||||
});
|
||||
};
|
||||
var deptLeaderAuditFun = function(leaveid,taskId) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '任务办理',
|
||||
width : 500,
|
||||
height : 300,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/activiti/leavew/getleavedetail.do?id='+leaveid,
|
||||
buttons : [ {
|
||||
text : '通过',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.docomplete(dialog, taskId);
|
||||
}
|
||||
},{
|
||||
text : '驳回',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doreject(dialog,taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
dialog.dialog({
|
||||
onDestroy:function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}
|
||||
});
|
||||
};
|
||||
var modifyApplyFun = function(leaveid,taskId,taskKey) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : '任务办理',
|
||||
width : 500,
|
||||
height : 500,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/activiti/leavew/detail-with-vars.do?id='+leaveid+'&taskId='+taskId+'&taskKey='+taskKey,
|
||||
buttons : [ {
|
||||
text : '调整申请',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doreApply(dialog, taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消申请',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dounApply(dialog,taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
dialog.dialog({
|
||||
onDestroy:function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}
|
||||
});
|
||||
};
|
||||
var hrAuditFun = function(leaveid,taskId) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : 'HR审批',
|
||||
width : 500,
|
||||
height : 500,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/activiti/leavew/getleavedetail.do?id='+leaveid,
|
||||
buttons : [ {
|
||||
text : '通过',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doPass(dialog, taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
dialog.dialog({
|
||||
onDestroy:function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}
|
||||
});
|
||||
};
|
||||
var hrAuditCAFun = function(leaveid,taskId) {
|
||||
var dialog = top.ext.modalDialog({
|
||||
title : 'HR审批',
|
||||
width : 500,
|
||||
height : 500,
|
||||
resizable:true,
|
||||
url : ext.contextPath + '/activiti/leavew/getleavedetail.do?id='+leaveid,
|
||||
buttons : [ {
|
||||
text : '通过',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.docompleteFinishCA(dialog, taskId);
|
||||
}
|
||||
},{
|
||||
text : '取消',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
dialog.dialog({
|
||||
onDestroy:function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}
|
||||
});
|
||||
};
|
||||
var claimFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/leavew/task/claim.do', {taskId : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','签收成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','签收失败','info');
|
||||
}
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/activiti/leavew/gettasklist.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '请假类型', field : 'leaveType', sortable : true, halign:'center'},
|
||||
{width : '180', title : '申请时间', field : 'applyTime', sortable : true, halign:'center'},
|
||||
{width : '280', title : '申请原因', field : 'reason', sortable : false, halign:'center'},
|
||||
{width : '180', title : '任务下发时间', field : 'createTime', sortable : false, halign:'center', formatter : function(value, row) {
|
||||
return row.task.createTime;
|
||||
}},
|
||||
{width : '180', title : '任务节点', field : 'taskName', sortable : false, halign:'center', formatter : function(value, row) {
|
||||
return row.task.name;
|
||||
}},
|
||||
{width : '80', title : '用户名', field : 'userId', sortable : true, halign:'center'},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"activiti/leavew/edit.do")) {%>
|
||||
if(!row.task.assignee){
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="签收" onclick="claimFun(\''+row.task.id+'\');"/>';
|
||||
}else{
|
||||
str += '<img class="iconImg ext-icon-table_go" title="办理" onclick="completeFun(\''+row.id+'\',\''+row.task.id+'\',\''+row.task.taskDefinitionKey+'\',\''+row.task.name+'\');"/>';
|
||||
}
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
$('#search_pid').combotree({
|
||||
url : ext.contextPath + '/user/getUnitsJson.do?random=' + Math.random(),
|
||||
parentField : 'pid',
|
||||
method:'get',
|
||||
width:200,
|
||||
onBeforeSelect:function(node){
|
||||
if(node.id=="-1"){
|
||||
$("#search_pid").tree("search_pid");
|
||||
}
|
||||
},
|
||||
editable:false
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>班组名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>所属车间</td>
|
||||
<td><input id="search_pid" name="search_pid" class="easyui-combotree"/></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
<!-- 部门领导审批 -->
|
||||
<div id="deptLeaderAudit" style="display: none">
|
||||
|
||||
<!-- table用来显示信息,方便办理任务 -->
|
||||
<%@include file="view-form.jsp" %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
154
WebRoot/jsp/activiti/modelAdd.jsp
Normal file
154
WebRoot/jsp/activiti/modelAdd.jsp
Normal file
@ -0,0 +1,154 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
||||
<%@page import="com.sipai.entity.activiti.ProcessType"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL",MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN",MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR",MaintenanceCommString.MAINTENANCE_TYPE_REPAIR); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_DEFECT",MaintenanceCommString.MAINTENANCE_TYPE_DEFECT); %>
|
||||
<%request.setAttribute("ProcessType_Business_Maintenance", ProcessType.B_Maintenance.getId()); %>
|
||||
<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 editFlowFun = function(id) {
|
||||
var w = window.screen.width*0.7;
|
||||
var h = window.screen.height*0.7;
|
||||
var l = window.screen.width*(1-0.7)/2;
|
||||
window.open(ext.contextPath + '/modeler.html?modelId=' + id,'_black',
|
||||
"left="+ l
|
||||
+ ",top=50,scrollbars=yes,location=no,status=no,toolbar=no,resizable=yes"
|
||||
+ ",width="+w
|
||||
+ ",height="+h);
|
||||
};
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/activiti/workflow/model/create.do", $("#subForm").serialize(), function(data) {
|
||||
if (data != null ) {
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程模板名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
processType: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$(function() {
|
||||
/* var type= $(this).val();
|
||||
var unitId='${extSystem.workshopid}'; */
|
||||
$.post(ext.contextPath + "/activiti/workflow/getProcessTypes4Combo.do", function(data) {
|
||||
var selelct =$("#processType").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct.on("change",function(e){
|
||||
$("#table1").bootstrapTable("refresh")
|
||||
var type= $(this).val();
|
||||
if('${ProcessType_Business_Maintenance}'==type){
|
||||
$("#group_maintenanceType").show();
|
||||
$("#maintenanceType").select2({minimumResultsForSearch: 10}).val("${maintenanceType}").trigger("change");
|
||||
}else{
|
||||
$("#group_maintenanceType").hide();
|
||||
}
|
||||
})
|
||||
$("#processType").select2({minimumResultsForSearch: 10}).val("${processType}").trigger("change");
|
||||
},'json');
|
||||
})
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog ">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div id="alertDiv"></div>
|
||||
<input id ="id" name="id" type="hidden" value=""/>
|
||||
<input class="form-control" type="hidden" name ="companyid" value="${company.id }">
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">公司</label>
|
||||
<div class="col-sm-9">
|
||||
<p class="form-control-static" >${company.name}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*流程模板名称</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name ="name" placeholder="名称" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*流程类型</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control select2 " id="processType" name ="processType" style="width: 220px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="group_maintenanceType">
|
||||
<label class="col-sm-3 control-label">运维类型</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control select2 " id="maintenanceType" name ="maintenanceType" style="width: 220px;" >
|
||||
<option value="${MAINTENANCE_TYPE_OVERHAUL}" >检修</option>
|
||||
<option value="${MAINTENANCE_TYPE_MAINTAIN}" >保养</option>
|
||||
<option value="${MAINTENANCE_TYPE_REPAIR}" >维修</option>
|
||||
<option value="${MAINTENANCE_TYPE_DEFECT}" >缺陷</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">描述</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea class="form-control" name="description" placeholder=""></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
377
WebRoot/jsp/activiti/modelEdit.jsp
Normal file
377
WebRoot/jsp/activiti/modelEdit.jsp
Normal file
@ -0,0 +1,377 @@
|
||||
<%@page import="com.sipai.entity.activiti.ProcessType"%>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL",MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN",MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR",MaintenanceCommString.MAINTENANCE_TYPE_REPAIR); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_DEFECT",MaintenanceCommString.MAINTENANCE_TYPE_DEFECT); %>
|
||||
<%request.setAttribute("ProcessType_Business_Maintenance", ProcessType.B_Maintenance.getId()); %>
|
||||
<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 initTable = function(id) {
|
||||
$("#table1").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/activiti/workflow/model/modelNode.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
search_name: $('#search_name').val(),
|
||||
modelid:id
|
||||
}
|
||||
},
|
||||
sortName: 'resourceId', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
/* {
|
||||
field: 'properties', // 返回json数据中的name
|
||||
title: '业务/流程节点id', // 表格表头显示文字
|
||||
sortable : true,
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value.overrideid;
|
||||
}
|
||||
},{
|
||||
field: 'stencil', // 返回json数据中的name
|
||||
title: '节点类型', // 表格表头显示文字
|
||||
sortable : true,
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value.id;
|
||||
}
|
||||
}, {
|
||||
field: 'stencil', // 返回json数据中的name
|
||||
title: '节点类型', // 表格表头显示文字
|
||||
sortable : true,
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value.id;
|
||||
}
|
||||
}, */
|
||||
/* {
|
||||
field: 'resourceId', // 返回json数据中的name
|
||||
title: '流程节点ID', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
|
||||
}, */{
|
||||
field: 'properties', // 返回json数据中的name
|
||||
title: '流程节点名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value.name;
|
||||
}
|
||||
},{
|
||||
field: 'businessunit', // 返回json数据中的name
|
||||
title: '节点业务名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
if(value !=null){
|
||||
return value.name;
|
||||
}else{
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
||||
},{
|
||||
field: 'jobNames', // 返回json数据中的name
|
||||
title: '<span>节点职位<span/><span><i style="float: right;padding-top: 5px;" class="fa fa-question-circle" aria-hidden="true" title="未选职位默认为全部人员"></i><span/>', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value;
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
field: 'resourceId',
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var processTypeId=$('#processType').val();
|
||||
var companyid=$('#companyid').val();
|
||||
var jobIds = row.jobIds;
|
||||
var buts = '<button class="btn btn-default btn-sm" onclick="editNodeFun(\'' + id + '\',\'' + value + '\',\'' + processTypeId + '\',\'' + companyid + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="editJobFun(\'' + id + '\',\'' + value + '\',\'' + companyid + '\',\'' + jobIds + '\')" data-toggle="tooltip" title="编辑职位"><i class="fa fa-users"></i><span class="hidden-md hidden-lg"> 编辑职位</span></button>';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
|
||||
/* return '<i class="fa fa-edit" onclick="editFun()(\'' + row.id + '\')></i>'; */
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table1");
|
||||
$("#table1").bootstrapTable("hideRow",1)
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
var editJobFun = function (modelid,resourceid,bizid,jobIds) {
|
||||
$.post(ext.contextPath + '/user/showJob4Selects.do', {modelid:modelid,resourceid:resourceid, bizid: bizid,jobIds:jobIds }, function (data) {
|
||||
$("#subDiv_Job").html(data);
|
||||
openModal('jobModal');
|
||||
});
|
||||
};
|
||||
|
||||
var modelid = $("#id").val();
|
||||
$(function() {
|
||||
initTable(modelid);
|
||||
});
|
||||
var editFlowFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/editFlow.do', {id:id} , function(data) {
|
||||
$("#subDiv1").html(data);
|
||||
openModal('modelEditModal');
|
||||
});
|
||||
/* var w = window.screen.width*0.7;
|
||||
var h = window.screen.height*0.7;
|
||||
var l = window.screen.width*(1-0.7)/2;
|
||||
window.open(ext.contextPath + '/modeler.html?modelId=' + id,'_black',
|
||||
"left="+ l
|
||||
+ ",top=50,scrollbars=yes,location=no,status=no,toolbar=no,resizable=yes"
|
||||
+ ",width="+w
|
||||
+ ",height="+h); */
|
||||
};
|
||||
|
||||
|
||||
/* 部署 */
|
||||
var deployFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/deploy.do',{modelId:id}, function(data) {
|
||||
|
||||
if(data.res=='1'){
|
||||
showAlert('s','部署成功');
|
||||
}else{
|
||||
showAlert('d',data.restr);
|
||||
}
|
||||
},'json');
|
||||
};
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/activiti/workflow/model/update.do", $("#subForm").serialize(), function(data) {
|
||||
if (data != null ) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程模板名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
processType: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
var companyid = "";
|
||||
$(function() {
|
||||
//简易公司combotree
|
||||
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pidinner").val(data[0].id);
|
||||
$("#companyselectinner").hide();
|
||||
$("#companyNameinner").text("公司: " + data[0].text);
|
||||
companyid = data[0].id;
|
||||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
// $("#search_pidinner").val(data[0].id);
|
||||
// $("#cname_inputinner").val(data[0].text);
|
||||
// companyid = data[0].id;
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytreeinner').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
levels: 3,
|
||||
});
|
||||
$('#companytreeinner').on('nodeSelected', function (event, data) {
|
||||
$("#search_pidinner").val(data.id);
|
||||
$("#cname_inputinner").val(data.text);
|
||||
document.getElementById('ul_treeinner').style.display = "none";
|
||||
companyid= data.id;
|
||||
document.getElementById('companyid').value=data.id;
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
//防止点击树的+号收起下拉框
|
||||
$("#ul_treeinner").on("click", function (e) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
//点击空白隐藏树
|
||||
$(document).click(function (e) {
|
||||
var divTree = $('#ul_treeinner'); // 设置目标区域
|
||||
if (!divTree.is(e.target) && divTree.has(e.target).length === 0) {
|
||||
divTree.hide()
|
||||
}
|
||||
})
|
||||
/////
|
||||
$.post(ext.contextPath + "/activiti/workflow/getProcessTypes4Combo.do", function(data) {
|
||||
var selelct =$("#processType").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct.on("change",function(e){
|
||||
$("#table1").bootstrapTable("refresh")
|
||||
var type= $(this).val();
|
||||
if('${ProcessType_Business_Maintenance}'==type){
|
||||
$("#group_maintenanceType").show();
|
||||
$("#maintenanceType").select2({minimumResultsForSearch: 10}).val("${maintenanceType}").trigger("change");
|
||||
}else{
|
||||
$("#group_maintenanceType").hide();
|
||||
}
|
||||
})
|
||||
$("#processType").select2({minimumResultsForSearch: 10}).val("${processTypeId}").trigger("change");
|
||||
},'json');
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog ">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div id="alertDiv"></div>
|
||||
<input id ="id" name="id" type="hidden" value="${model.id}"/>
|
||||
<input class="form-control" type="hidden" id ="companyid" name ="companyid" value="${company.id }">
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">公司</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<input id="search_pidinner" name="search_pidinner" type="hidden" />
|
||||
<span id="companyNameinner" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
|
||||
</div>
|
||||
<ul id="companyselectinner" style="list-style-type:none;padding-left:0px;width:300px;float: left;">
|
||||
<li class="dropdown" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
|
||||
style="width:300px;" onclick="document.getElementById('ul_treeinner').style.display = 'block';">
|
||||
<div class="input-group">
|
||||
<input class="form-control " id="cname_inputinner" name="cname_inputinner"
|
||||
style="height:31px;width: 300px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly value="${company.name}"/>
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul id="ul_treeinner" class="dropdown-menu" data-stopPropagation="true">
|
||||
<li class="header">
|
||||
<div id="companytreeinner" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<i style="float: left;padding-top: 10px;" class="fa fa-question-circle" aria-hidden="true" title="改变公司后先保存再进行其它操作"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*流程模板名称</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name ="name" value="${model.name}" >
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*流程类型</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control select2 " id="processType" name ="processType" style="width: 300px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="group_maintenanceType">
|
||||
<label class="col-sm-3 control-label">运维类型</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control select2 " id="maintenanceType" name ="maintenanceType" style="width: 300px;" >
|
||||
<option value="${MAINTENANCE_TYPE_OVERHAUL}" >检修</option>
|
||||
<option value="${MAINTENANCE_TYPE_MAINTAIN}" >保养</option>
|
||||
<option value="${MAINTENANCE_TYPE_REPAIR}" >维修</option>
|
||||
<option value="${MAINTENANCE_TYPE_DEFECT}" >缺陷</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">描述</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea class="form-control" name="description" value="${description}">${description}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审批流程</label>
|
||||
<div class="col-sm-9">
|
||||
<a class="btn btn-app hidden-xs" href="javascript:" onclick="editFlowFun('${model.id}')" data-toggle="tooltip">
|
||||
<i class="fa fa-edit"></i> 流程编辑
|
||||
</a>
|
||||
<a class="btn btn-app" href="javascript:" onclick="deployFun('${model.id}')">
|
||||
<i class="fa fa-play"></i> 流程部署
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table1"></table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default " data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
30
WebRoot/jsp/activiti/modelFlowEdit.jsp
Normal file
30
WebRoot/jsp/activiti/modelFlowEdit.jsp
Normal file
@ -0,0 +1,30 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#subIframe1").attr("src",ext.contextPath + '/modeler.html?modelId=${param.id}' );
|
||||
})
|
||||
$("#modelEditModal").on("hidden.bs.modal", function() {
|
||||
$("#table1").bootstrapTable('refresh');
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade " id="modelEditModal">
|
||||
<div class="modal-dialog modal-full" style="width:99%;margin: 5px auto;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑模型</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="padding:5px">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<iframe id="subIframe1" src="about:blank" mce_src="about:blank" style="width:100%;height:710px" frameborder='0' >
|
||||
</iframe>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-right" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
439
WebRoot/jsp/activiti/modelList.jsp
Normal file
439
WebRoot/jsp/activiti/modelList.jsp
Normal file
@ -0,0 +1,439 @@
|
||||
<%@page import="org.apache.poi.ss.usermodel.Row"%>
|
||||
<%@ 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"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- bootstrap switch -->
|
||||
<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">
|
||||
var companyId = "${param.unitId}";
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/addModel.do' ,{companyId:companyId}, function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
/* 导入 */
|
||||
var importFun = function() {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/saveImportModel.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
/* 同步 */
|
||||
var synchroFun = function() {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/savePLMProcess.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
/* 查看管控内容 */
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/showProcessTechnicsList.do', {modelid:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/editModel.do', {modelid:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
//initTable(id);
|
||||
});
|
||||
};
|
||||
/* 编辑流程节点的业务 */
|
||||
var editNodeFun = function(id,resourceId,processTypeId,bizId) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/editNode.do', {modelid:id,resourceId:resourceId,processTypeId:processTypeId,bizId:bizId} , function(data) {
|
||||
$("#subDiv1").html(data);
|
||||
openModal('subModal1');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/* $('#subModal').on('shown.bs.modal', function () {
|
||||
alert(); // 执行一些动作...
|
||||
}); */
|
||||
|
||||
/* var editFlowFun = function(id) {
|
||||
var w = window.screen.width*0.7;
|
||||
var h = window.screen.height*0.7;
|
||||
var l = window.screen.width*(1-0.7)/2;
|
||||
window.open(ext.contextPath + '/modeler.html?modelId=' + id,'_black',
|
||||
"left="+ l
|
||||
+ ",top=50,scrollbars=yes,location=no,status=no,toolbar=no,resizable=yes"
|
||||
+ ",width="+w
|
||||
+ ",height="+h);
|
||||
}; */
|
||||
var copyFun = function(id) {
|
||||
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 + '/activiti/workflow/model/copycreat.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
showAlert('s','生成成功');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','生成失败');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
/* 部署 */
|
||||
var deployFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/model/deploy.do',{modelId:id}, function(data) {
|
||||
if(data.res=='1'){
|
||||
//showAlert('s','部署成功');
|
||||
showAlert('s','部署成功');
|
||||
}else{
|
||||
showAlert('d',data.restr);
|
||||
//parent.$.messager.alert('提示','部署失败','info');
|
||||
}
|
||||
},'json');
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
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 + '/activiti/workflow/model/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var init = function() {
|
||||
$.post(ext.contextPath + '/work/group/getListForSelect.do', {} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
for(var i=0;i<data.length;i++){
|
||||
console.info(data)
|
||||
$("#search_code").append("<option value='"+data[i].id+"'>"+data[i].text+"</option>");
|
||||
}
|
||||
/* $("#search_code").select2({
|
||||
placeholder: "请选择班组",
|
||||
language: "zh-CN",
|
||||
allowClear: true,
|
||||
data: data
|
||||
}); */
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
var dosearch = function() {
|
||||
var search_name = $('#search_name').val();
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
function showTable(){
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/activiti/workflow/model/getModelList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: companyId
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'id', // 返回json数据中的name
|
||||
title: '模板ID', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'name',
|
||||
title: '模板名称',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},/* {
|
||||
field: 'key',
|
||||
title: '模板key',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}, */{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
formatter : function(value, row)
|
||||
{
|
||||
//return FormatDate(value.time);
|
||||
return FormatDate(value.time);
|
||||
}
|
||||
},{
|
||||
field: 'version',
|
||||
title: '版本号',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 240, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str = '';
|
||||
str += '<security:authorize buttonUrl="activiti/workflow/model/edit.do">';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="editFun(\'' + row.id + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="copyFun(\'' + row.id + '\')" data-toggle="tooltip" title="复制"><i class="fa fa-copy"></i><span class="hidden-md hidden-lg"> 复制</span></button>';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="deployFun(\'' + row.id + '\')" data-toggle="tooltip" title="部署"><i class="fa fa-play"></i><span class="hidden-md hidden-lg"> 部署</span></button>';
|
||||
str += '</security:authorize>';
|
||||
str += '<security:authorize buttonUrl="activiti/workflow/model/delete.do">';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="deleteFun(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash"></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||||
str += '</security:authorize>';
|
||||
str ='<div class="btn-group">'+str+'</div>';
|
||||
return str;
|
||||
/* return '<i class="fa fa-edit" onclick="editFun()(\'' + row.id + '\')></i>'; */
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
function FormatDate (strTime) {
|
||||
var date = new Date(strTime);
|
||||
return date.Format("yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
if(unitId!=null && unitId!=undefined && unitId!=''){
|
||||
companyId = unitId;
|
||||
}
|
||||
//简易公司combotree
|
||||
/* $.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
||||
//console.log("data",data[0]);
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#companyName").text("公司:" + data[0].text);
|
||||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#cname_input").val(data[0].text);
|
||||
showTable();
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
levels: 3,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
$("#search_pid").val(data.id);
|
||||
$("#cname_input").val(data.text);
|
||||
document.getElementById('ul_tree').style.display = "none";
|
||||
//$table.bootstrapTable('refresh');
|
||||
dosearch();
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
|
||||
//防止点击树的+号收起下拉框
|
||||
$("#ul_tree").on("click", function (e) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
//点击空白隐藏树
|
||||
$(document).click(function (e) {
|
||||
var divTree = $('#ul_tree'); // 设置目标区域
|
||||
if (!divTree.is(e.target) && divTree.has(e.target).length === 0) {
|
||||
divTree.hide()
|
||||
}
|
||||
})
|
||||
*/
|
||||
showTable();
|
||||
})
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<!-- <div id="mainAlertdiv"></div> -->
|
||||
<div id="subDiv"></div>
|
||||
<div id="subDiv1"></div>
|
||||
<div id="subDiv_Job"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="alertDiv"></div>
|
||||
<div id='unit4SelectDiv'></div>
|
||||
<div >
|
||||
<!-- <div class="form-group " style="margin-bottom:10px;">
|
||||
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
|
||||
</div>
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown" style="width:300px;">
|
||||
Menu toggle button
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
|
||||
style="width:300px;" onclick="document.getElementById('ul_tree').style.display = 'block';">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"
|
||||
style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
|
||||
<input class="form-control " id="cname_input" name="cname_input"
|
||||
style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly />
|
||||
</div>/input-group
|
||||
</a>
|
||||
<ul id="ul_tree" class="dropdown-menu" data-stopPropagation="true">
|
||||
<li class="header">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul> -->
|
||||
<div class="form-group " style="padding:0;">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="activiti/workflow/model/add.do">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="模板名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
124
WebRoot/jsp/activiti/modelNodeEdit.jsp
Normal file
124
WebRoot/jsp/activiti/modelNodeEdit.jsp
Normal file
@ -0,0 +1,124 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/activiti/workflow/model/saveNode.do", $("#subForm1").serialize(), function(data) {
|
||||
if (data != null ) {
|
||||
closeModal('subModal1')
|
||||
$("#table1").bootstrapTable('refresh');
|
||||
}
|
||||
else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm1").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
businessid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '业务不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
/* $(function() {
|
||||
var select =$("#businessid").select2({
|
||||
ajax: {
|
||||
type:'POST',
|
||||
url: ext.contextPath +"/business/businessunit/geList4Select.do",
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: data
|
||||
}
|
||||
},
|
||||
cache: true
|
||||
},
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
select.val(['${businessid}']).trigger("change");
|
||||
}); */
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/business/businessunit/getList4Select.do",{processTypeId:'${param.processTypeId}'}, function(data) {
|
||||
var selelct =$("#businessid").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
|
||||
selelct.val('${businessid}').trigger("change");
|
||||
},'json');
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal1">
|
||||
<div class="modal-dialog ">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑业务</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm1">
|
||||
<div id="alertDiv"></div>
|
||||
<input id ="id" name="id" type="hidden" value=""/>
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<input class="form-control" type="hidden" name ="companyid" value="${company.id }">
|
||||
<!-- 界面提醒div强制id为alertdiv -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">公司</label>
|
||||
<div class="col-sm-9">
|
||||
<p class="form-control-static" >${company.name}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">流程节点名称</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name ="nodename" value="${nodename }" />
|
||||
<input type="hidden" class="form-control" name ="modelid" value="${modelid }" />
|
||||
<input type="hidden" class="form-control" name ="resourceId" value="${resourceId }" />
|
||||
<input type="hidden" class="form-control" name ="index" value="${index }" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">业务单元</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control select2 " id="businessid" name ="businessid" style="width: 220px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
932
WebRoot/jsp/activiti/oeProcessTaskList.jsp
Normal file
932
WebRoot/jsp/activiti/oeProcessTaskList.jsp
Normal file
@ -0,0 +1,932 @@
|
||||
<%@page import="com.sipai.entity.activiti.ProcessType"%>
|
||||
<%@page import="com.sipai.entity.sparepart.SparePartCommString"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString"%>
|
||||
<%@ 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"%>
|
||||
<%request.setAttribute("Status_Cancel_Problem",Maintenance.Status_Cancel_Problem);%>
|
||||
<%request.setAttribute("Status_Confirm_Maintainer",Maintenance.Status_Confirm_Maintainer);%>
|
||||
<%request.setAttribute("Status_Cancel_Maintainer",Maintenance.Status_Cancel_Maintainer);%>
|
||||
<%request.setAttribute("Status_CancelTOMaintainer",Maintenance.Status_CancelTOMaintainer);%>
|
||||
<%request.setAttribute("Status_Submit_Problem",Maintenance.Status_Submit_Problem);%>
|
||||
<%request.setAttribute("Status_Launch",Maintenance.Status_Launch);%>
|
||||
<%request.setAttribute("Status_Edit",Maintenance.Status_Edit);%>
|
||||
<%request.setAttribute("Status_Submit_Maintainer",Maintenance.Status_Submit_Maintainer);%>
|
||||
|
||||
<% request.setAttribute("UNIT_HANDLE", BusinessUnit.UNIT_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_AUDIT", BusinessUnit.UNIT_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_TEAM_HANDLE", BusinessUnit.UNIT_TEAM_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_OFFICE_HANDLE", BusinessUnit.UNIT_OFFICE_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_OUTSOURCING_HANDLE", BusinessUnit.UNIT_OUTSOURCING_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_RECEIVE_HANDLE", BusinessUnit.UNIT_RECEIVE_HANDLE);%>
|
||||
<% request.setAttribute("UNIT_BASE_AUDIT", BusinessUnit.UNIT_BASE_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_PRODUCT_AUDIT", BusinessUnit.UNIT_PRODUCT_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_CENTER_AUDIT", BusinessUnit.UNIT_CENTER_AUDIT);%>
|
||||
|
||||
<% request.setAttribute("UNIT_SUBSCRIBE_AUDIT", BusinessUnit.UNIT_SUBSCRIBE_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_DEPT_APPLY", BusinessUnit.UNIT_DEPT_APPLY);%>
|
||||
<% request.setAttribute("UNIT_INQUIRY", BusinessUnit.UNIT_INQUIRY);%>
|
||||
<% request.setAttribute("UNIT_CONTRACT_APPLY", BusinessUnit.UNIT_CONTRACT_APPLY);%>
|
||||
<% request.setAttribute("UNIT_CONTRACT_AUDIT", BusinessUnit.UNIT_CONTRACT_AUDIT);%>
|
||||
<% request.setAttribute("B_Purchase", ProcessType.B_Purchase.getId());%>
|
||||
<% request.setAttribute("B_Contract", ProcessType.B_Contract.getId());%>
|
||||
<% request.setAttribute("I_Stock", ProcessType.I_Stock.getId());%>
|
||||
<% request.setAttribute("UNIT_IN_STOCK_AUDIT", BusinessUnit.UNIT_IN_STOCK_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_IN_STOCK_HANDLE", BusinessUnit.UNIT_IN_STOCK_HANDLE);%>
|
||||
<% request.setAttribute("O_Stock", ProcessType.O_Stock.getId());%>
|
||||
<% request.setAttribute("UNIT_OUT_STOCK_AUDIT", BusinessUnit.UNIT_OUT_STOCK_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_OUT_STOCK_HANDLE", BusinessUnit.UNIT_OUT_STOCK_HANDLE);%>
|
||||
|
||||
<% request.setAttribute("ProcessType_ProcessAdjustment", ProcessType.B_ProcessAdjustment.getId());%>
|
||||
<% request.setAttribute("UNIT_PROCESSADJUSTMENT_ADJUST", BusinessUnit.UNIT_PROCESSADJUSTMENT_ADJUST);%>
|
||||
<% request.setAttribute("UNIT_PROCESSADJUSTMENT_AUDIT", BusinessUnit.UNIT_PROCESSADJUSTMENT_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_PROCESSADJUSTMENT_AUDIT_ANALYSIS", BusinessUnit.UNIT_PROCESSADJUSTMENT_AUDIT_ANALYSIS);%>
|
||||
<% request.setAttribute("UNIT_PROCESSADJUSTMENT_HANDLE", BusinessUnit.UNIT_PROCESSADJUSTMENT_HANDLE);%>
|
||||
<% request.setAttribute("M_Plan", ProcessType.Maintain_Plan.getId());%>
|
||||
<% request.setAttribute("R_Plan", ProcessType.Repair_Plan.getId());%>
|
||||
<% request.setAttribute("UNIT_Maintain_AUDIT", BusinessUnit.UNIT_Maintain_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_Maintain_HANDLE", BusinessUnit.UNIT_Maintain_HANDLE);%>
|
||||
|
||||
<% request.setAttribute("UNIT_Repair_AUDIT", BusinessUnit.UNIT_Repair_AUDIT);%>
|
||||
|
||||
<% request.setAttribute("Stock_Check", ProcessType.Stock_Check.getId());%>
|
||||
<% request.setAttribute("UNIT_STOCK_CHECK_AUDIT", BusinessUnit.UNIT_STOCK_CHECK_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_STOCK_CHECK_HANDLE", BusinessUnit.UNIT_STOCK_CHECK_HANDLE);%>
|
||||
|
||||
<% request.setAttribute("Lose_Apply", ProcessType.Lose_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_LOSE_APPLY_AUDIT", BusinessUnit.UNIT_LOSE_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_LOSE_APPLY_ADJUST", BusinessUnit.UNIT_LOSE_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Sale_Apply", ProcessType.Sale_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_SALE_APPLY_AUDIT", BusinessUnit.UNIT_SALE_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_SALE_APPLY_ADJUST", BusinessUnit.UNIT_SALE_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Scrap_Apply", ProcessType.Scrap_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_SCRAP_APPLY_AUDIT", BusinessUnit.UNIT_SCRAP_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_SCRAP_APPLY_ADJUST", BusinessUnit.UNIT_SCRAP_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Transfers_Apply", ProcessType.Transfers_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_TRANSFERS_APPLY_AUDIT", BusinessUnit.UNIT_TRANSFERS_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_TRANSFERS_APPLY_ADJUST", BusinessUnit.UNIT_TRANSFERS_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("Acceptance_Apply", ProcessType.Acceptance_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_ACCEPTANCE_APPLY_AUDIT", BusinessUnit.UNIT_ACCEPTANCE_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_ACCEPTANCE_APPLY_ADJUST", BusinessUnit.UNIT_ACCEPTANCE_APPLY_ADJUST);%>
|
||||
|
||||
<% request.setAttribute("EquipmentStop_Apply", ProcessType.EquipmentStop_Apply.getId());%>
|
||||
<% request.setAttribute("UNIT_EQUIPMENT_STOP_APPLY_AUDIT", BusinessUnit.UNIT_EQUIPMENT_STOP_APPLY_AUDIT);%>
|
||||
<% request.setAttribute("UNIT_EQUIPMENT_STOP_APPLY_ADJUST", BusinessUnit.UNIT_EQUIPMENT_STOP_APPLY_ADJUST);%>
|
||||
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL",MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN",MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR",MaintenanceCommString.MAINTENANCE_TYPE_REPAIR); %>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_DEFECT",MaintenanceCommString.MAINTENANCE_TYPE_DEFECT); %>
|
||||
<% request.setAttribute("Type_Detail", ProcessType.B_Maintenance.getId());%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style>
|
||||
.main-header{display:none;}
|
||||
.content-header{display:none;}
|
||||
.main-footer{display:none;}
|
||||
.content {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
<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">
|
||||
<!--bootstrap-edittable 表格行内编辑 -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-editable/css/bootstrap-editable.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-editable/js/bootstrap-editable.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-editable/js/bootstrap-table-editable.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/work/group/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/work/group/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewTaskTraceFun = function(pid,ppid,taskId) {
|
||||
graphTrace(pid,ppid,taskId);
|
||||
};
|
||||
var viewDetailFun = function(id,type) {
|
||||
stopBubbleDefaultEvent();
|
||||
if(type.indexOf('${B_Purchase}')!=-1){
|
||||
//console.info(11)
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showSubscribeView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subscribeExcuteModal');
|
||||
});
|
||||
|
||||
}else if(type.indexOf('${B_Contract}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/contract/showContractView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('contractExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${ProcessType_ProcessAdjustment}')!=-1){
|
||||
//console.info(22)
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showProcessAdjustmentView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintenanceDetailModal');
|
||||
});
|
||||
}else if(type.indexOf('${I_Stock}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/inStockRecord/showProcessInStockView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('inStockExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${O_Stock}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showProcessOutStockView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('outStockExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Stock_Check}')!=-1){
|
||||
$.post(ext.contextPath + '/sparepart/stockCheck/showProcessStockCheckView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('stockCheckExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${M_Plan}')!=-1){
|
||||
$.post(ext.contextPath + '/equipment/maintenancePlan/showProcessMaintainPlanView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintainPlanExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${EquipmentStop_Apply}')!=-1){//设备停用
|
||||
$.post(ext.contextPath + '/equipment/equipmentStopRecord/showProcessEquipmentStopApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('equipmentStopApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Lose_Apply}')!=-1){//丢失
|
||||
$.post(ext.contextPath + '/equipment/EquipmentLoseApply/showProcessLoseApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('loseApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Sale_Apply}')!=-1){//出售
|
||||
$.post(ext.contextPath + '/equipment/EquipmentSaleApply/showProcessSaleApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('saleApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Scrap_Apply}')!=-1){//报废
|
||||
$.post(ext.contextPath + '/equipment/EquipmentScrapApply/showProcessScrapApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('scrapApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Transfers_Apply}')!=-1){//调拨
|
||||
$.post(ext.contextPath + '/equipment/EquipmentTransfersApply/showProcessTransfersApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('transfersApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Acceptance_Apply}')!=-1){//验收
|
||||
$.post(ext.contextPath + '/equipment/equipmentAcceptanceApply/showProcessEquipmentAcceptanceApplyView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('acceptanceApplyExcuteModal');
|
||||
});
|
||||
}else if(type.indexOf('${Type_Detail}')!=-1){
|
||||
//console.info(22)
|
||||
$.post(ext.contextPath + '/maintenance/showMaintenanceDetailView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('maintenanceDetailModal');
|
||||
});
|
||||
};
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
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 + '/activiti/workflow/process/delete.do', {deploymentId : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var claimFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/activiti/workflow/task/claim.do', {taskId : id}, function(data) {
|
||||
if(data==1){
|
||||
showAlert('s','签收成功','mainAlertdiv');
|
||||
$("#table").bootstrapTable('refresh')
|
||||
}else{
|
||||
showAlert('d','签收失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
};
|
||||
function goToLocation(url){
|
||||
$.post(ext.contextPath +"/user/getMenuRelation.do",{location:url},function(data){
|
||||
console.info(data)
|
||||
if(data.length>2){
|
||||
doforward(url,data[2].id,data[1].id,data[0].id)
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
var openModalPost= function(){
|
||||
|
||||
}
|
||||
var gotoTaskFun = function(type,status,processInstanceId,taskId,businessKey) {
|
||||
stopBubbleDefaultEvent();
|
||||
console.info(type)
|
||||
/* tabIndex为维护清单页面tab的index变量 */
|
||||
/* console.log('type',type);
|
||||
console.log('status',status); */
|
||||
if(type=='${Type_Produce}'){
|
||||
//记录当前待办记录id,用于跳转页面后区别显示
|
||||
sessionStorage.setItem("businessKey", businessKey);
|
||||
switch (status) {
|
||||
case '${Status_Launch}':
|
||||
sessionStorage.setItem("tabIndex", '0');
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Edit}':
|
||||
case '${Status_Cancel_Problem}':
|
||||
goToLocation('maintenance/showLaunchList.do');
|
||||
break;
|
||||
case '${Status_Cancel_Maintainer}':
|
||||
sessionStorage.setItem("tabIndex", '0')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Confirm_Maintainer}':
|
||||
sessionStorage.setItem("tabIndex", '3')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Submit_Problem}':
|
||||
sessionStorage.setItem("tabIndex", '2')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_Submit_Maintainer}':
|
||||
sessionStorage.setItem("tabIndex", '1')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
case '${Status_CancelTOMaintainer}':
|
||||
sessionStorage.setItem("tabIndex", '3')
|
||||
goToLocation('maintenance/showlist.do');
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${B_Purchase}')!=-1){
|
||||
console.info(status)
|
||||
switch (status) {
|
||||
case '${UNIT_SUBSCRIBE_AUDIT}'://任务审核
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showSubscribeAudit.do', {processInstanceId:processInstanceId,taskId:taskId,subscribeId:businessKey} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_DEPT_APPLY}'://部门申请
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showDeptApply.do', {processInstanceId:processInstanceId,taskId:taskId,subscribeId:businessKey} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_INQUIRY}'://采购询价
|
||||
$.post(ext.contextPath + '/sparepart/subscribe/showSubscribeInquiry.do', {processInstanceId:processInstanceId,taskId:taskId,subscribeId:businessKey} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${B_Contract}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_CONTRACT_AUDIT}'://任务审核
|
||||
$.post(ext.contextPath + '/sparepart/contract/showContractAudit.do', {processInstanceId:processInstanceId,taskId:taskId,contractId:businessKey} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_CONTRACT_APPLY}'://合同申请
|
||||
$.post(ext.contextPath + '/sparepart/contract/showDeptApply.do', {processInstanceId:processInstanceId,taskId:taskId,contractId:businessKey} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${ProcessType_ProcessAdjustment}')>-1){
|
||||
console.info(status)
|
||||
switch (status) {
|
||||
case '${UNIT_PROCESSADJUSTMENT_AUDIT_ANALYSIS}'://调整分析
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showAuditAnalysis.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_PROCESSADJUSTMENT_ADJUST}'://调整
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_PROCESSADJUSTMENT_AUDIT}'://审核
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showAudit.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_PROCESSADJUSTMENT_HANDLE}'://执行
|
||||
$.post(ext.contextPath + '/work/processAdjustment/showHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${I_Stock}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_IN_STOCK_AUDIT}'://入库任务审核
|
||||
$.post(ext.contextPath + '/sparepart/inStockRecord/showAuditInStock.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_IN_STOCK_HANDLE}'://入库任务处理
|
||||
$.post(ext.contextPath + '/sparepart/inStockRecord/showInStockHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${O_Stock}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_OUT_STOCK_AUDIT}'://出库任务审核
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showAuditOutStock.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_OUT_STOCK_HANDLE}'://出库任务处理
|
||||
$.post(ext.contextPath + '/sparepart/outStockRecord/showOutStockHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Stock_Check}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_STOCK_CHECK_AUDIT}'://库存盘点审核
|
||||
$.post(ext.contextPath + '/sparepart/stockCheck/showAuditStockCheck.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_STOCK_CHECK_HANDLE}'://库存盘点处理
|
||||
$.post(ext.contextPath + '/sparepart/stockCheck/showStockCheckHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${EquipmentStop_Apply}')!=-1){
|
||||
//console.log("status================================="+status);
|
||||
switch (status) {
|
||||
|
||||
case '${UNIT_EQUIPMENT_STOP_APPLY_AUDIT}'://设备停用申请审核
|
||||
$.post(ext.contextPath + '/equipment/equipmentStopRecord/showAuditEquipmentStopApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_EQUIPMENT_STOP_APPLY_ADJUST}'://设备停用申请调整
|
||||
$.post(ext.contextPath + '/equipment/equipmentStopRecord/showEquipmentStopApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
|
||||
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Lose_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_LOSE_APPLY_AUDIT}'://设备丢失申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentLoseApply/showAuditLoseApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_LOSE_APPLY_ADJUST}'://设备丢失申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentLoseApply/showLoseApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Sale_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_SALE_APPLY_AUDIT}'://设备出售申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentSaleApply/showAuditSaleApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_SALE_APPLY_ADJUST}'://设备出售申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentSaleApply/showSaleApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Scrap_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_SCRAP_APPLY_AUDIT}'://设备报废申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentScrapApply/showAuditScrapApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_SCRAP_APPLY_ADJUST}'://设备报废申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentScrapApply/showScrapApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Transfers_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_TRANSFERS_APPLY_AUDIT}'://设备调拨申请审核
|
||||
$.post(ext.contextPath + '/equipment/EquipmentTransfersApply/showAuditTransfersApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_TRANSFERS_APPLY_ADJUST}'://设备调拨申请调整
|
||||
$.post(ext.contextPath + '/equipment/EquipmentTransfersApply/showTransfersApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Acceptance_Apply}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_ACCEPTANCE_APPLY_AUDIT}'://设备验收申请审核
|
||||
$.post(ext.contextPath + '/equipment/equipmentAcceptanceApply/showAuditEquipmentAcceptanceApply.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_ACCEPTANCE_APPLY_ADJUST}'://设备验收申请调整
|
||||
$.post(ext.contextPath + '/equipment/equipmentAcceptanceApply/showAcceptanceApplyAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${M_Plan}')!=-1){
|
||||
switch (status) {
|
||||
case '${UNIT_Maintain_AUDIT}'://保养计划审核
|
||||
$.post(ext.contextPath + '/equipment/maintenancePlan/showAuditMaintainPlan.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_Maintain_HANDLE}'://保养计划编辑
|
||||
$.post(ext.contextPath + '/equipment/maintenancePlan/showMaintainPlanHandle.do', {processInstanceId:processInstanceId,taskId:taskId,
|
||||
unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
}else if(type.indexOf('${Type_Detail}')!=-1){
|
||||
var arr = new Array();
|
||||
arr = type.split("-")
|
||||
var maintenanceType = arr[2];//运维类型:保养,维修,检修
|
||||
console.info(status)
|
||||
switch (status) {
|
||||
case '${UNIT_HANDLE}':
|
||||
if(maintenanceType == '${MAINTENANCE_TYPE_MAINTAIN}'){//保养调整
|
||||
$.post(ext.contextPath + '/maintenance/showMaintainAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_REPAIR}'){//维修调整
|
||||
$.post(ext.contextPath + '/maintenance/showMaintainAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_DEFECT}'){//缺陷调整
|
||||
$.post(ext.contextPath + '/maintenance/showDefectAdjust.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
break;
|
||||
case '${UNIT_AUDIT}'://设备专责审核
|
||||
case '${UNIT_BASE_AUDIT}'://基层领导审核
|
||||
case '${UNIT_PRODUCT_AUDIT}'://生产运营中心审核
|
||||
case '${UNIT_CENTER_AUDIT}'://中层领导审核
|
||||
if(maintenanceType == '${MAINTENANCE_TYPE_MAINTAIN}'){//保养审核
|
||||
$.post(ext.contextPath + '/maintenance/showEquipmentMaintainAudit.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_REPAIR}'){//维修审核
|
||||
$.post(ext.contextPath + '/maintenance/showAuditDetail.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}else if(maintenanceType == '${MAINTENANCE_TYPE_DEFECT}'){//缺陷审核
|
||||
$.post(ext.contextPath + '/maintenance/showDefectAudit.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
break;
|
||||
case '${UNIT_TEAM_HANDLE}'://维修班处理
|
||||
case '${UNIT_OFFICE_HANDLE}'://设备办处理
|
||||
case '${UNIT_OUTSOURCING_HANDLE}'://外包处理
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetail.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
case '${UNIT_RECEIVE_HANDLE}'://验收
|
||||
$.post(ext.contextPath + '/maintenance/showReceiveOpinion.do', {processInstanceId:processInstanceId,taskId:taskId,unitId:status} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
|
||||
}
|
||||
}else{
|
||||
showAlert('w','未查询到任务模块!','mainAlertdiv');
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
/* window.operateEvents={
|
||||
'click td':function(e,value,row,index){
|
||||
viewTaskTraceFun(row.processInstance.id,row.processDefinition.id,row.task.id);
|
||||
}
|
||||
} */
|
||||
function loginFun(){
|
||||
var url=ext.contextPath+"/j_spring_security_check";
|
||||
var username = '${cu.name}';
|
||||
$.post(url , {namelogin:username}, function(result) {
|
||||
if (result.status==true) {
|
||||
//清除localStorage缓存
|
||||
localStorage.clear();
|
||||
} else {
|
||||
if(result!=null && result!=""){
|
||||
alert(result.res);
|
||||
}else{
|
||||
alert(result);
|
||||
}
|
||||
}
|
||||
location.replace(ext.contextPath);
|
||||
},'json');
|
||||
}
|
||||
$(function() {
|
||||
|
||||
var flag = IsApp();
|
||||
if (flag==true){
|
||||
|
||||
}else{
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
//init();
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/oeProcess/getTaskList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name : $('#search_name').val(),
|
||||
userId:'${userId}'
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow:function(row){
|
||||
viewTaskTraceFun(row.processInstance.id,row.processDefinition.id,row.task.id);
|
||||
},
|
||||
columns: [
|
||||
/* {
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '流程名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
//events: operateEvents
|
||||
}, */{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '任务名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
console.log(row)
|
||||
if(row.type.indexOf('${Type_Detail}')!=-1){
|
||||
var arr = new Array();
|
||||
arr = row.type.split("-")
|
||||
var maintenanceType = arr[2];//运维类型:保养,维修,检修
|
||||
switch(maintenanceType){
|
||||
case '${MAINTENANCE_TYPE_MAINTAIN}':
|
||||
return "保养任务";
|
||||
case '${MAINTENANCE_TYPE_REPAIR}':
|
||||
return "维修任务";
|
||||
case '${MAINTENANCE_TYPE_DEFECT}':
|
||||
return "缺陷任务";
|
||||
default:
|
||||
return "--";
|
||||
}
|
||||
}else{
|
||||
return row.name;
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'createTime', // 返回json数据中的name
|
||||
title: '任务下发时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.task.createTime;
|
||||
}
|
||||
},{
|
||||
field: 'companyname', // 返回json数据中的name
|
||||
title: '问题厂区', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.business==null?'':row.business.company.name;
|
||||
}
|
||||
},{
|
||||
field: 'problem', // 返回json数据中的name
|
||||
title: '问题描述', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.business==null?'':row.business.problem;
|
||||
}
|
||||
},{
|
||||
field: 'taskName', // 返回json数据中的name
|
||||
title: '任务节点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.task.name;
|
||||
}
|
||||
},{
|
||||
field: 'op',
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 80, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str = '';
|
||||
if(!row.task.assignee){
|
||||
str += '<button class="btn btn-default btn-sm" onclick="claimFun(\''+row.task.id+'\')" data-toggle="tooltip" title="签收"><i class="fa fa-tag"></i><span class="hidden-md hidden-lg"> 签收</span></button>';
|
||||
}else{
|
||||
if(row.type.indexOf('${Type_Detail}')!=-1){
|
||||
str += '<button class="btn btn-default btn-sm" onclick="viewDetailFun(\''+row.processInstance.businessKey+'\',\''+row.type+'\')" data-toggle="tooltip" title="查看详情"><i class="fa fa-history"></i><span class="hidden-md hidden-lg"> 查看详情</span></button>'
|
||||
}
|
||||
if(row.business!=null){
|
||||
str += '<button class="btn btn-default btn-sm" onclick="gotoTaskFun(\''+row.type+'\',\''+row.business.status+'\',\''+row.processInstance.id+'\',\''+row.task.id+'\',\''+row.processInstance.businessKey+'\');" data-toggle="tooltip" title="处理"><i class="fa fa-play"></i><span class="hidden-md hidden-lg"> 处理</span></button>';
|
||||
}
|
||||
}
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
//查看过待办,就清除之前的待办id
|
||||
sessionStorage.setItem("businessKey", "");
|
||||
/* $('#table').on('click-cell.bs.table', function (e, field, value, row,element) { //$(element).css({"color":"blue","font-size":"16px;"});
|
||||
|
||||
console.info(e)
|
||||
console.info(field)
|
||||
console.info(value)
|
||||
console.info(element)
|
||||
|
||||
console.info("行点击")
|
||||
if(element.context.cellIndex!=5){
|
||||
viewTaskTraceFun(row.processInstance.id,row.processDefinition.id,row.task.id);
|
||||
}
|
||||
|
||||
}); */
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"><a class="btn btn-primary btn-sm" onclick="loginFun()"><%= ServerObject.atttable.get("TOPTITLE")%> <i class="fa fa-hand-pointer-o"></i></a></h1>
|
||||
<!-- <ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<li class="active">Here</li>
|
||||
</ol> -->
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<!-- 流程图填充div -->
|
||||
<div id="traceDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="PRDetail4SelectsDiv"></div>
|
||||
<div id="stock4SelectsDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div id="outStock4SelectDiv"></div>
|
||||
<div id="selectCompanyDiv"></div>
|
||||
<div id="goodsAddDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div >
|
||||
<div class="btn-group" style="width: 100%;">
|
||||
<!-- <button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
|
||||
</div>
|
||||
<!-- <div class="form-group " style="padding:0;">
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="问题描述">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> -->
|
||||
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<!-- switch-button-->
|
||||
<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>
|
||||
</html>
|
||||
51
WebRoot/jsp/activiti/processDefinitionTrace.jsp
Normal file
51
WebRoot/jsp/activiti/processDefinitionTrace.jsp
Normal file
@ -0,0 +1,51 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#traceForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#traceForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/work/group/save.do", $("#traceForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('traceModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#traceForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '用户名不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="traceModal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">流程模型</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="trace_body" style="overflow:auto;">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default " data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
103
WebRoot/jsp/activiti/processForSelect.jsp
Normal file
103
WebRoot/jsp/activiti/processForSelect.jsp
Normal file
@ -0,0 +1,103 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/activiti/workflow/getProcessDefinitionListForSelect.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
singleSelect:true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '流程名称', field : 'name', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.name;
|
||||
}},
|
||||
{width : '180', title : '流程描述', field : 'description', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.description;
|
||||
}},
|
||||
{width : '180', title : '流程ID', field : 'id', sortable : false, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.id;
|
||||
}},
|
||||
{width : '180', title : '部署时间', field : 'deploymentTime', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.deployment.deploymentTime;
|
||||
}},
|
||||
{width : '100', title : '版本号', field : 'revision', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.revision;
|
||||
}}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
//以json格式返回数据
|
||||
var jsonstr = "";
|
||||
var idstr = "";
|
||||
var idname = "";
|
||||
var rows = $('#grid').datagrid('getSelections');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
idstr += rows[i].processDefinition.id+",";
|
||||
idname+= rows[i].processDefinition.name+",";
|
||||
}
|
||||
if(idstr.length>0){
|
||||
idstr = idstr.substring(0,idstr.length-1);
|
||||
idname = idname.substring(0,idname.length-1);
|
||||
}
|
||||
jsonstr = '{"id":"'+idstr+'","name":"'+idname+'"}';
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}
|
||||
function datagridload() {
|
||||
$('#searchForm').serialize() // alert(弹出提示框)
|
||||
grid.datagrid('load',ext.contextPath + '/activiti/workflow/getProcessDefinitionListForSelect.do?'+$('#searchForm').serialize());
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>流程名称</td>
|
||||
<td><input id="search_name" name="search_name" class="easyui-textbox" /></td>
|
||||
<td>流程ID</td>
|
||||
<td><input id="search_code" name="search_code" class="easyui-textbox" /></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="datagridload();">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
325
WebRoot/jsp/activiti/processInstanceList.jsp
Normal file
325
WebRoot/jsp/activiti/processInstanceList.jsp
Normal file
@ -0,0 +1,325 @@
|
||||
<%@ 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>
|
||||
<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">
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/work/group/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/work/group/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(ppid) {
|
||||
graphTrace("",ppid,"");
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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 + '/activiti/workflow/process/delProcessInstance.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var init = function() {
|
||||
$.post(ext.contextPath + '/work/group/getListForSelect.do', {} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
for(var i=0;i<data.length;i++){
|
||||
console.info(data)
|
||||
$("#search_code").append("<option value='"+data[i].id+"'>"+data[i].text+"</option>");
|
||||
}
|
||||
/* $("#search_code").select2({
|
||||
placeholder: "请选择班组",
|
||||
language: "zh-CN",
|
||||
allowClear: true,
|
||||
data: data
|
||||
}); */
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function() {
|
||||
var select =$("#search_code").select2({
|
||||
ajax: {
|
||||
type:'POST',
|
||||
url: ext.contextPath +"/user/getUnitsByUserId4Select.do",
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: data
|
||||
}
|
||||
},
|
||||
cache: true
|
||||
},
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
select.on("change",function(e){
|
||||
companyid=$(this).val();
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/activiti/workflow/getAllProcessInstaces.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: $('#search_code').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '流程名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
|
||||
},{
|
||||
field: 'createTime', // 返回json数据中的name
|
||||
title: '最新任务处理时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.task==null?"":row.task.createTime;
|
||||
}
|
||||
},{
|
||||
field: 'taskName', // 返回json数据中的name
|
||||
title: '最新任务节点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.task==null?"":row.task.name;
|
||||
}
|
||||
},{
|
||||
field: 'processDefinitionId', // 返回json数据中的name
|
||||
title: '流程定义Id', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.processDefinition.id;
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str = '';
|
||||
/* str += '<button class="btn btn-default btn-sm" onclick="viewFun(\''+row.processDefinition.id+'\')"><i class="fa fa-eye"></i></button>' */
|
||||
str +='<security:authorize buttonUrl="activiti/workflow/delete.do">';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="deleteFun(\''+row.processInstance.id+'\')"><i class="fa fa-trash-o"></i></button>'
|
||||
str +='</security:authorize>';
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/user/getUnitsByUserId4Select.do", {}, function(data) {
|
||||
|
||||
/* var selelct =$("#search_code").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
}); */
|
||||
|
||||
if(data.length==1){
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
//selelct.val(data[0].id).trigger("change");
|
||||
//selelct.attr("disabled","disabled");
|
||||
$("#search_code").next().css("display", "none");
|
||||
$("#company").text(data[0].text);
|
||||
$("#companylabel").html("公司:");
|
||||
}else{
|
||||
//selelct.val("").trigger("change");
|
||||
// $("#companyname").attr("disabled","disabled");
|
||||
$("#company").css("display", "none");
|
||||
}
|
||||
},'json');
|
||||
})
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<!-- 流程图填充div -->
|
||||
<div id="traceDiv"></div>
|
||||
<div >
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<!-- <button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group " style="padding:0;">
|
||||
<label class="form-label" id="companylabel">公司</label>
|
||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select>
|
||||
<span class="select2-selection select2-selection--single" id="company" style="width:220px;border: none;background: transparent;" ></span>
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
301
WebRoot/jsp/activiti/processList.jsp
Normal file
301
WebRoot/jsp/activiti/processList.jsp
Normal file
@ -0,0 +1,301 @@
|
||||
<%@ 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>
|
||||
<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">
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/work/group/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/work/group/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(ppid) {
|
||||
graphTrace("",ppid,"");
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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 + '/activiti/workflow/process/delete.do', {deploymentId : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var companyId = "";
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
var initFun = function () {
|
||||
//refreshSelect();
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/activiti/workflow/getProcessList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
search_pid: companyId
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.processDefinition.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '工艺名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.processDefinition.name;
|
||||
}
|
||||
},/* {
|
||||
field: 'description', // 返回json数据中的name
|
||||
title: '工艺描述', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.processDefinition.description;
|
||||
}
|
||||
}, *//* {
|
||||
field: 'id', // 返回json数据中的name
|
||||
title: '工艺ID', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.processDefinition.id;
|
||||
}
|
||||
}, */{
|
||||
field: 'deploymentTime', // 返回json数据中的name
|
||||
title: '部署时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.deployment.deploymentTime;
|
||||
}
|
||||
},{
|
||||
field: 'revision', // 返回json数据中的name
|
||||
title: '版本号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value, row){
|
||||
return row.processDefinition.revision;
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str = '';
|
||||
/* str += '<button class="btn btn-default btn-sm" onclick="viewFun(\''+row.processDefinition.id+'\')"><i class="fa fa-eye"></i></button>' */
|
||||
str +='<security:authorize buttonUrl="activiti/workflow/delete.do">';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="deleteFun(\''+row.processDefinition.deploymentId+'\')"><i class="fa fa-trash-o"></i></button>'
|
||||
str +='</security:authorize>';
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
$(function() {
|
||||
initFun();
|
||||
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$(".select2-selection--single").css({ 'height': '30px', 'paddingTop': '4px' })
|
||||
$.post(ext.contextPath + "/user/showCompanySelectTree.do", {}, function (data) {
|
||||
$('#companySelectTree').html(data);
|
||||
|
||||
});
|
||||
initFun();
|
||||
/* $.post(ext.contextPath + "/user/getUnitsByUserId4Select.do", {}, function(data) {
|
||||
|
||||
|
||||
|
||||
if(data.length==1){
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
//selelct.val(data[0].id).trigger("change");
|
||||
//selelct.attr("disabled","disabled");
|
||||
$("#search_code").next().css("display", "none");
|
||||
$("#company").text(data[0].text);
|
||||
$("#companylabel").html("公司:");
|
||||
}else{
|
||||
//selelct.val("").trigger("change");
|
||||
// $("#companyname").attr("disabled","disabled");
|
||||
$("#company").css("display", "none");
|
||||
}
|
||||
},'json'); */
|
||||
})
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<!-- 流程图填充div -->
|
||||
<div id="traceDiv"></div>
|
||||
<div >
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<!-- <button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group " style="padding:0;">
|
||||
<label class="form-label" id="companylabel">公司</label>
|
||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select>
|
||||
<span class="select2-selection select2-selection--single" id="company" style="width:220px;border: none;background: transparent;" ></span>
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div id="companySelectTree">
|
||||
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
259
WebRoot/jsp/activiti/processList1.jsp
Normal file
259
WebRoot/jsp/activiti/processList1.jsp
Normal file
@ -0,0 +1,259 @@
|
||||
<%@page import="org.apache.poi.ss.usermodel.Row"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script src="<%=contextPath%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
||||
<%-- 引入CSS --%>
|
||||
<link rel="stylesheet" href="<%=contextPath%>/JS/qtip/jquery.qtip.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="<%=contextPath%>/CSS/style-activiti.css" type="text/css">
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/activiti/auto/autoCreat.do', {} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','自动导入成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','自动导入失败','info');
|
||||
}
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeedit',
|
||||
title : '编辑班组',
|
||||
url : ext.contextPath + '/work/group/edit.do?iframeId=iframeedit&id=' + id,
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var viewFun = function(ppid) {
|
||||
/* var dialog = parent.ext.modalDialog({
|
||||
title : '查看用户信息',
|
||||
url : ext.contextPath + '/work/group/view.do?id=' + id
|
||||
}); */
|
||||
//alert(pid+","+ppid);
|
||||
graphTrace("",ppid,"");
|
||||
};
|
||||
var viewTechnicsFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeedit',
|
||||
title : '模型管控',
|
||||
url : ext.contextPath + '/activiti/workflow/model/showProcessTechnicsList.do?processid=' + id,
|
||||
buttons : [ {
|
||||
text : '关闭',
|
||||
handler : function() {
|
||||
//grid.datagrid('reload');
|
||||
dialog.dialog('destroy');
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '删除此记录会将该流程关联的所有记录删除,您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/process/delete.do', {deploymentId : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','删除成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/* var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
//alert(datas);
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '您确定要删除此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}; */
|
||||
var suspendFun = function(id,status) {
|
||||
var tip="";
|
||||
if(status=="active"){
|
||||
tip="激活";
|
||||
}else{
|
||||
tip="挂起";
|
||||
}
|
||||
parent.$.messager.confirm('提示', '您确定要'+tip+'此记录?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/activiti/workflow/processdefinition/update.do', {processDefinitionId : id,state:status}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示',tip+'成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示',tip+'失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/activiti/workflow/getProcessList.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '100', title : '工艺名称', field : 'name', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.name;
|
||||
}},
|
||||
{width : '180', title : '工艺描述', field : 'description', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.description;
|
||||
}},
|
||||
{width : '180', title : '工艺ID', field : 'id', sortable : false, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.id;
|
||||
}},
|
||||
{width : '180', title : '部署时间', field : 'deploymentTime', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.deployment.deploymentTime;
|
||||
}},
|
||||
{width : '100', title : '版本号', field : 'revision', sortable : true, halign:'center',formatter:function(value, row){
|
||||
return row.processDefinition.revision;
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '160', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
|
||||
<%if (sessionManager.havePermission(session,"activiti/workflow/showlist.do?scope=all")) {%>
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.processDefinition.id+'\');"/>';
|
||||
str += '<img class="iconImg ext-icon-table_sort" title="查看管控内容" onclick="viewTechnicsFun(\''+row.processDefinition.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"activiti/workflow/edit.do")) {%>
|
||||
if(row.processDefinition.suspended=="2")
|
||||
str += '<img class="iconImg ext-icon-table_lightning" title="激活" onclick="suspendFun(\''+row.processDefinition.id+'\',\'active\');"/>';
|
||||
else
|
||||
str += '<img class="iconImg ext-icon-table_link" title="挂起" onclick="suspendFun(\''+row.processDefinition.id+'\',\'suspend\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"activiti/workflow/delete.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.processDefinition.deploymentId+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
var importFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '选择文件',
|
||||
width: 600,
|
||||
height:300,
|
||||
closeOnEscape:true,
|
||||
url : ext.contextPath + '/activiti/auto/doimport.do',
|
||||
buttons : [ {
|
||||
text : '上传',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.doimport(dialog, grid);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<br/>请从模型“配置界面”部署工艺路线
|
||||
<!--
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true"
|
||||
onclick="importFun();">自动添加</a>
|
||||
</td> -->
|
||||
<%--
|
||||
<%if (sessionManager.havePermission(session,"work/group/delete.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%> --%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>工艺名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>工艺ID</td>
|
||||
<td><input id="search_code" name="search_code" class="easyui-textbox"/></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
164
WebRoot/jsp/activiti/processTechnicsList.jsp
Normal file
164
WebRoot/jsp/activiti/processTechnicsList.jsp
Normal file
@ -0,0 +1,164 @@
|
||||
<%@page import="org.apache.poi.ss.usermodel.Row"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<script src="<%=contextPath%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/activiti/workflow/model/getProcessTechnicsList.do?modelid=${param.modelid}&processid=${param.processid}', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order // 排序规则
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
/* {
|
||||
checkbox: true, // 显示一个勾选框
|
||||
}, */
|
||||
{
|
||||
field: 'mainprocedure', // 返回json数据中的name
|
||||
title: '主流程', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'subprocedure',
|
||||
title: '分工序',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'contentno',
|
||||
title: '序号',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'subject',
|
||||
title: '管控项目',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'specifications',
|
||||
title: '管控规格',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'mode',
|
||||
title: '管控方式',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'tool',
|
||||
title: '管控工具',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'frequency',
|
||||
title: '管控频率',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'people',
|
||||
title: '管控人员',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'rejects',
|
||||
title: '不良品控制',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'filename',
|
||||
title: '管控文件/规范',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'formname',
|
||||
title: '管控表单',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'remark',
|
||||
title: '备注',
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">模型管控</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="activiti/workflow/model/saveImportModel.do">
|
||||
<button type="button" class="btn btn-default" onclick="importFun();"><i class="fa fa-clipboard"></i> 导入</button>
|
||||
</security:authorize>
|
||||
<!-- <button type="button" class="btn btn-default" onclick="editFun();"><i class="fa fa-edit"></i> 编辑</button> -->
|
||||
<!-- <button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button> -->
|
||||
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="form-group ">
|
||||
<!-- <label class="form-label">班组</label>
|
||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select> -->
|
||||
<div class="form-group pull-right" style="margin-right:20px">
|
||||
<div class="input-group input-group-sm" style="width: 200px;">
|
||||
<input type="text" id="subprocedure" name="subprocedure" class="form-control pull-right" placeholder="分工序">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group pull-right" style="margin-right:20px">
|
||||
<div class="input-group input-group-sm" style="width: 200px;">
|
||||
<input type="text" id="mainprocedure" name="mainprocedure" class="form-control pull-right" placeholder="主流程">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="table"></table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
2511
WebRoot/jsp/activiti/taskList.jsp
Normal file
2511
WebRoot/jsp/activiti/taskList.jsp
Normal file
File diff suppressed because it is too large
Load Diff
348
WebRoot/jsp/activiti/taskList4main.jsp
Normal file
348
WebRoot/jsp/activiti/taskList4main.jsp
Normal file
@ -0,0 +1,348 @@
|
||||
<%@page import="com.sipai.service.plan.DailyPlanService"%>
|
||||
<%@page import="com.sipai.entity.plan.DailyPlanTaskDemand"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<% request.setAttribute("Type_Produce", DailyPlanService.processDefKey);%>
|
||||
<%request.setAttribute("Flag_Start",DailyPlanTaskDemand.Flag_Start);%>
|
||||
<%request.setAttribute("Flag_Report",DailyPlanTaskDemand.Flag_Report);%>
|
||||
<%request.setAttribute("Flag_CarryOver",DailyPlanTaskDemand.Flag_CarryOver);%>
|
||||
<script src="<%=contextPath%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
var grid_task;
|
||||
var addFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
iframeId:'iframeadd',
|
||||
title : '添加班组',
|
||||
url : ext.contextPath + '/activiti/leavew/add.do',
|
||||
buttons : [ {
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid_task);
|
||||
}
|
||||
} ]
|
||||
});
|
||||
};
|
||||
var completeFun = function(leaveid,taskId,tdkey,name) {
|
||||
switch(tdkey)
|
||||
{
|
||||
case 'deptLeaderAudit':
|
||||
deptLeaderAuditFun(leaveid,taskId);
|
||||
break;
|
||||
case 'deptLeaderAuditToSub':
|
||||
deptLeaderAuditFunToSub(leaveid,taskId);
|
||||
break;
|
||||
case 'deptLeaderAuditToCA':
|
||||
deptLeaderAuditFunToCA(leaveid,taskId);
|
||||
break;
|
||||
case 'modifyApply':
|
||||
modifyApplyFun(leaveid,taskId,'deptLeaderAudit');
|
||||
break;
|
||||
case 'hrAudit':
|
||||
hrAuditFun(leaveid,taskId);
|
||||
break;
|
||||
case 'hrAuditCA':
|
||||
hrAuditCAFun(leaveid,taskId);
|
||||
break;
|
||||
default:
|
||||
alert("未查询到“"+tdkey+"”任务模块!");
|
||||
}
|
||||
|
||||
};
|
||||
var gotoTaskFun = function(type,tdkey,taskId) {
|
||||
if(type=='${Type_Produce}'){
|
||||
switch(tdkey)
|
||||
{
|
||||
case 'DrawDailyPlan':
|
||||
doLook(taskId);
|
||||
break;
|
||||
case 'deptLeaderAudit':
|
||||
doLookOperate();
|
||||
break;
|
||||
case 'IssueWorkOrder':
|
||||
showWorkOrders();
|
||||
break;
|
||||
case 'StartWork':
|
||||
dostart(taskId);
|
||||
break;
|
||||
case 'HandUp':
|
||||
doreport(taskId);
|
||||
break;
|
||||
case 'CarryOver':
|
||||
docarryover(taskId);
|
||||
break;
|
||||
default:
|
||||
alert("未查询到任务模块!");
|
||||
}
|
||||
}else{
|
||||
alert("未查询到任务模块!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
var doLook = function(taskId) {
|
||||
/* var nowdate = new Date();
|
||||
var dt=nowdate.Format('yyyy-MM-dd');//月日必须都是两位 */
|
||||
|
||||
var dialog = parent.ext.modalDialog({
|
||||
id:'viewDialog',
|
||||
iframeId:'view',
|
||||
title : '查看计划',
|
||||
height:"90%",
|
||||
width:"90%",
|
||||
url : ext.contextPath + '/plan/dailyplansummary/showlist.do?taskId='+taskId,
|
||||
onDestroy:function(){
|
||||
grid_task.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
var doLookOperate = function() {
|
||||
var nowdate = new Date();
|
||||
var dt=nowdate.Format('yyyy-MM-dd');//月日必须都是两位
|
||||
|
||||
var dialog = parent.ext.modalDialog({
|
||||
id:'viewDialog',
|
||||
iframeId:'view',
|
||||
title : '查看计划',
|
||||
height:"90%",
|
||||
width:"90%",
|
||||
url : ext.contextPath + '/plan/dailyplansummary/showlistoperate.do?dt='+dt,
|
||||
onDestroy:function(){
|
||||
grid_task.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
var showWorkOrders = function() {
|
||||
|
||||
var dialog = parent.ext.modalDialog({
|
||||
id:'viewDialog',
|
||||
iframeId:'view',
|
||||
title : '任务调度',
|
||||
height:"90%",
|
||||
width:"90%",
|
||||
url : ext.contextPath + '/work/workorder/showlist.do',
|
||||
onDestroy:function(){
|
||||
grid_task.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
//开工 taskId为activiti的taskid
|
||||
var dostart = function(taskId) {
|
||||
$.post(ext.contextPath + '/work/workorder/doupdate_taskdemand.do', {taskId : taskId,status:'${Flag_Start}'}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','开工成功','info',function(){
|
||||
grid_task.datagrid('reload');
|
||||
grid_task.datagrid('unselectAll');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','开工失败','info');
|
||||
}
|
||||
});
|
||||
};
|
||||
//报工
|
||||
var doreport=function(taskId){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '工单报工',
|
||||
width: 400,
|
||||
height:500,
|
||||
url : ext.contextPath + '/work/workorder/showworkorder_carryover.do?taskId='+taskId+'&status=${Flag_Report}',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog,grid_task);
|
||||
grid_task.datagrid('unselectAll');
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
//工单结转
|
||||
var docarryover=function(taskId){
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '工单结转',
|
||||
width: 400,
|
||||
height:500,
|
||||
url : ext.contextPath + '/work/workorder/showworkorder_carryover.do?taskId='+taskId+'&status=${Flag_CarryOver}',
|
||||
buttons : [{
|
||||
text : '确定',
|
||||
iconCls:'icon-ok',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog,grid_task);
|
||||
grid_task.datagrid('unselectAll');
|
||||
}
|
||||
},
|
||||
{
|
||||
text : '取消',
|
||||
iconCls:'icon-cancel',
|
||||
handler : function() {
|
||||
dialog.dialog('destroy');
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
var claimFun = function(id) {
|
||||
$.post(ext.contextPath + '/activiti/leavew/task/claim.do', {taskId : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','签收成功','info',function(){
|
||||
grid_task.datagrid('reload');
|
||||
grid_task.datagrid('unselectAll');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','签收失败','info');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var viewFun_task = function(pid,ppid,taskId) {
|
||||
graphTrace(pid,ppid,taskId);
|
||||
};
|
||||
function loadworkorders(date){
|
||||
$("#workorderno").combobox({
|
||||
url : ext.contextPath + '/work/workorder/getList4Select.do?nowdate='+date,
|
||||
valueField : 'workorderno',
|
||||
textField : 'workorderno',
|
||||
method:'get',
|
||||
panelHeight:'auto',
|
||||
onSelect: function () {
|
||||
var datas=$("#workorderno").combobox('getData');
|
||||
var workorderno = $("#workorderno").combobox('getValue');
|
||||
var wforderid ="";
|
||||
for(var i=0;i<datas.length;i++){
|
||||
if(datas[i].workorderno==workorderno){
|
||||
wforderid=datas[i].wforderid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$("#processInstanceId").val(wforderid);
|
||||
$("#procedureno").combobox({
|
||||
url : ext.contextPath + '/work/workorder/getProcedurelist4Select.do?workorderno='+workorderno,
|
||||
valueField : 'id',
|
||||
textField : 'name',
|
||||
method:'get',
|
||||
panelHeight:'auto',
|
||||
onLoadSuccess: function(record){
|
||||
if($("#procedureno").combobox('getData').length>0){
|
||||
$("#procedureno").combobox('select','${sessionScope.procedure}');
|
||||
}
|
||||
},
|
||||
onSelect: function () {
|
||||
}
|
||||
});
|
||||
},
|
||||
onLoadSuccess : function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
var searchgrid = function() {
|
||||
grid_task.datagrid('reload',ext.contextPath + '/activiti/workflow/getProduceTaskList.do?'+$('#searchForm_task').serialize());
|
||||
};
|
||||
|
||||
$(function() {
|
||||
var nowdate = new Date();
|
||||
var dt=nowdate.Format('yyyy-MM-dd');//月日必须都是两位
|
||||
loadworkorders(dt);
|
||||
grid_task = $('#grid_task').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/activiti/workflow/getProduceTaskList.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
/* {checkbox:true , field : 'ck'}, */
|
||||
{width : '80', title : '流程名称', field : 'name', sortable : false, halign:'center'},
|
||||
{width : '120', title : '任务下发时间', field : 'createTime', sortable : false, halign:'center', formatter : function(value, row) {
|
||||
return row.task.createTime;
|
||||
}},
|
||||
{width : '80', title : '任务节点', field : 'taskName', sortable : false, halign:'center', formatter : function(value, row) {
|
||||
return row.task.name;
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '70', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun_task(\''+row.processInstance.id+'\',\''+row.processDefinition.id+'\',\''+row.task.id+'\');"/>';
|
||||
if(!row.task.assignee){
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="签收" onclick="claimFun(\''+row.task.id+'\');"/>';
|
||||
}else{
|
||||
str += '<img class="iconImg ext-icon-table_go" title="办理" onclick="gotoTaskFun(\''+row.type+'\',\''+row.task.taskDefinitionKey+'\',\''+row.task.id+'\');"/>';
|
||||
}
|
||||
//str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.processInstance.id+'\');"/>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar_task',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<div class="easyui-layout" data-options="fit:true,border:false">
|
||||
<%if (sessionManager.havePermission(session,"activiti/workflow/searchForm")) {%>
|
||||
<div id="toolbar_task" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<form id="searchForm_task">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>工单</td>
|
||||
<td><input id="workorderno" name="workorderno" class="easyui-combobox" data-options="required:false" style="width: 100px;" />
|
||||
<input id="processInstanceId" name="processInstanceId" type="hidden" value=""/></td>
|
||||
<td>工序</td>
|
||||
<td><input id="procedureno" name="procedureno" class="easyui-combobox" style="width: 80px;" panelMaxHeight="400px" data-options="panelHeight:'auto'" value=""/></td>
|
||||
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="searchgrid();">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');searchgrid();">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<%}%>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid_task" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
<!-- 部门领导审批 -->
|
||||
<%-- <div id="deptLeaderAudit" style="display: none">
|
||||
|
||||
<!-- table用来显示信息,方便办理任务 -->
|
||||
<%@include file="view-form.jsp" %>
|
||||
</div> --%>
|
||||
</div>
|
||||
28
WebRoot/jsp/activiti/view-form.jsp
Normal file
28
WebRoot/jsp/activiti/view-form.jsp
Normal file
@ -0,0 +1,28 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<table class='view-info'>
|
||||
<tr>
|
||||
<td width="100" class="label">申请人:</td>
|
||||
<td name="userId"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">假种:</td>
|
||||
<td name="leaveType"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">申请时间:</td>
|
||||
<td name="applyTime"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">请假<font color="red">开始</font>时间:</td>
|
||||
<td name="startTime"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">请假<font color="red">结束</font>时间:</td>
|
||||
<td name="endTime"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">请假事由:</td>
|
||||
<td name="reason"></td>
|
||||
</tr>
|
||||
</table>
|
||||
151
WebRoot/jsp/administration/index4select.jsp
Normal file
151
WebRoot/jsp/administration/index4select.jsp
Normal file
@ -0,0 +1,151 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="java.util.Date" %>
|
||||
<%@page import="java.text.SimpleDateFormat" %>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
|
||||
<script type="text/javascript">
|
||||
var checkedItem="";
|
||||
var $table;
|
||||
function doselect() {
|
||||
if(checkedItem!= null && checkedItem!=""){
|
||||
$('#${param.formId} #${param.hiddenId}' ).val(checkedItem.id);
|
||||
$('#${param.formId} #${param.textId}').val(checkedItem.code);
|
||||
$('#${param.formId} #${param.text2Id}').val(checkedItem.name);
|
||||
$('#${param.formId} #${param.text3Id}').val(checkedItem.indexClass.name);
|
||||
$('#${param.formId} #${param.text4Id}').val(checkedItem.indexClass.code);
|
||||
closeModal("fault4SelectModal");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//显示已经勾选的数据
|
||||
function stateFormatter(value, row, index) {
|
||||
var flag=false;
|
||||
if(row.id=='${indexId}'){
|
||||
flag=true;
|
||||
checkedItem = row;
|
||||
}
|
||||
if (flag)
|
||||
return {
|
||||
checked : true//设置选中
|
||||
};
|
||||
return value;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$table = $("#table_index").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/administration/index/getList.do', // 获取表格数据的url
|
||||
clickToSelect:true,
|
||||
singleSelect:true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
//responseHandler:responseHandler, //在渲染页面数据之前执行的方法,此配置很重要!!!!!!!
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
}
|
||||
},
|
||||
queryParamsType: "limit",
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
formatter: stateFormatter
|
||||
},{
|
||||
field: 'indexClass.code', // 返回json数据中的name
|
||||
title: '指标类型编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'indexClass.name', // 返回json数据中的name
|
||||
title: '指标类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'code', // 返回json数据中的name
|
||||
title: '指标编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '指标名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'dept.name', // 返回json数据中的name
|
||||
title: '责任部门', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'userName', // 返回json数据中的name
|
||||
title: '责任人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'budget', // 返回json数据中的name
|
||||
title: '年度预算总额(元)', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table_index");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
//绑定选中事件、取消事件、全部选中、全部取消
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e,rows, obj) {
|
||||
if('check'==e.type){
|
||||
$('#table_index .checked').removeClass("checked");
|
||||
obj.parent().addClass("checked");
|
||||
checkedItem = rows;
|
||||
}else{
|
||||
obj.parent().removeClass("checked");
|
||||
checkedItem = "";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="fault4SelectModal" >
|
||||
<div class="modal-dialog modal-md" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">控制指标定额库</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="alertDiv_MaintainPlanSelect"></div>
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="modal-body">
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-bordered table-striped" style="overflow:auto;width:100%" id="table_index"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doselect()" id="btn_save">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
200
WebRoot/jsp/administration/indexAdd.jsp
Normal file
200
WebRoot/jsp/administration/indexAdd.jsp
Normal file
@ -0,0 +1,200 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<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">
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/administration/index/save.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
var showUser4SelectsFun = function(hiddenId,textId) {
|
||||
var userIds= $("#"+hiddenId).val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:hiddenId,textId:textId,userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
$(function(){
|
||||
//选择部门
|
||||
$.post(ext.contextPath + "/user/getDeptByBizId4Select.do", {companyId:'${param.companyId}'}, function(data) {
|
||||
var selelct = $("#deptid").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct.val('').trigger("change");
|
||||
},'json');
|
||||
});
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '指标名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
code: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '指标编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
userid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '责任人不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
/* deptid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '责任部门不能为空'
|
||||
}
|
||||
}
|
||||
}, */
|
||||
budget: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '年度预算总额不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
classid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '指标类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
//选择物品类别
|
||||
var showIndexClass4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/indexClass/showList4Select.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
//初始化部门
|
||||
var refreshSelect = function(companyId) {
|
||||
$.post(ext.contextPath + "/user/getDeptByBizId4Select.do", {companyId:companyId}, function(data) {
|
||||
//$("#deptId").empty();
|
||||
var selelct_ =$("#deptId").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val('${index.deptId}').trigger("change");
|
||||
},'json');
|
||||
};
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增指标信息</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name ="id" value="${index.id}">
|
||||
<input id="unitId" name="unitId" type="hidden" value="${param.companyId}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="code" name ="code" placeholder="编号" autocomplete="off" value="${index.code}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="name" name ="name" placeholder="名称" value="${index.name}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标类型</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="pname" placeholder="请选择" onclick="showIndexClass4SelectFun();" value="${index.indexClass.name}" readonly>
|
||||
<input id="pid" name="classid" type="hidden" value="${index.classid}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 col-sm-2 control-label">责任部门</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" id="deptid" name ="deptid" style="width: 100%;" >
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 col-sm-2 control-label">*责任人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="userName" name ="userName" placeholder="点击选择"
|
||||
onclick="showUser4SelectsFun('userid','userName');" value="${index.userName}">
|
||||
<input type="hidden" class="form-control" id="userid" name ="userid" value="${index.userid}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*年度预算总额(元)</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="budget" name ="budget" placeholder="年度预算总额" value="${index.budget}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="remarks" name ="remarks" placeholder="备注...">${index.remarks}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
39
WebRoot/jsp/administration/indexClass4select.jsp
Normal file
39
WebRoot/jsp/administration/indexClass4select.jsp
Normal file
@ -0,0 +1,39 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$.post(ext.contextPath + '/administration/indexClass/getIndexClassJson.do', {ng:''} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
$('#fault_select_tree').treeview({
|
||||
data: data,
|
||||
});
|
||||
$('#fault_select_tree').on('nodeSelected', function(event, data) {
|
||||
$('#${param.formId} #${param.hiddenId}' ).val(data.id);
|
||||
$('#${param.formId} #${param.textId}').val(data.text);
|
||||
closeModal("fault4SelectModal")
|
||||
});
|
||||
}
|
||||
},'json');
|
||||
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="fault4SelectModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择指标类型</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="fault_select_tree" style="height:430px;overflow:auto;width:100%"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<!-- <button type="button" class="btn btn-primary" onclick="selectMenu()">保存</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
106
WebRoot/jsp/administration/indexClassAdd.jsp
Normal file
106
WebRoot/jsp/administration/indexClassAdd.jsp
Normal file
@ -0,0 +1,106 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<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 showIndexClass4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/indexClass/showList4Select.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
$.post(ext.contextPath + "/administration/indexClass/save.do", $("#subForm").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$("#active").select2({minimumResultsForSearch: 10});
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
/* pname: {
|
||||
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="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="id" name="id" type="hidden" />
|
||||
<!-- 界面提醒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="name" name ="name" placeholder="名称" ">
|
||||
</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="showIndexClass4SelectFun();" value="${pname}"></input>
|
||||
<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="morder" name ="morder" placeholder="顺序" value=0>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">状态</label>
|
||||
<div class="col-sm-4">
|
||||
<select id ="active" name="active" class="form-control select2">
|
||||
<option value="启用" selected="selected">启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select>
|
||||
</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="code" name="code" placeholder="编号"
|
||||
value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="remarks" name ="remarks" placeholder="描述..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
144
WebRoot/jsp/administration/indexClassEdit.jsp
Normal file
144
WebRoot/jsp/administration/indexClassEdit.jsp
Normal file
@ -0,0 +1,144 @@
|
||||
<%@ 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 showIndexClass4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/indexClass/showList4Select.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
};
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
$.post(ext.contextPath + "/administration/indexClass/update.do", $("#subForm").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
showAlert('s','保存成功');
|
||||
}else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function dodel() {
|
||||
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 + '/administration/indexClass/delete.do', $("#subForm").serialize(), function(data) {
|
||||
if(data>0){
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d','删除失败');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#active").select2({minimumResultsForSearch: 10}).val("${indexClass.active}").trigger("change");
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
/* pname: {
|
||||
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="${indexClass.id}"/>
|
||||
<!-- 界面提醒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="name" name ="name" placeholder="名称" value="${indexClass.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="showIndexClass4SelectFun();" value="${indexClass.pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${indexClass.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="morder" name ="morder" placeholder="顺序" value="${indexClass.morder}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id ="active" name="active" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select>
|
||||
</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="code" name="code" placeholder="编号"
|
||||
value="${indexClass.code }">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="remarks" name ="remarks" placeholder="描述...">${indexClass.remarks}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
91
WebRoot/jsp/administration/indexClassList.jsp
Normal file
91
WebRoot/jsp/administration/indexClassList.jsp
Normal file
@ -0,0 +1,91 @@
|
||||
<%@ 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>
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
var node=$('#tree').treeview('getSelected');
|
||||
var pid="-1";
|
||||
console.info(node)
|
||||
if(node!=null && node.length>0){
|
||||
pid=node[0].id;
|
||||
}
|
||||
$.post(ext.contextPath + '/administration/indexClass/add.do', {pid:pid} , function(data) {
|
||||
$("#faultBox").html(data);
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/administration/indexClass/edit.do', {id:id} , function(data) {
|
||||
$("#faultBox").html(data);
|
||||
});
|
||||
};
|
||||
var initTreeView = function() {
|
||||
$.post(ext.contextPath + '/administration/indexClass/getIndexClassJson.do', function(data) {
|
||||
$('#tree').treeview({data: data});
|
||||
$('#tree').on('nodeSelected', function(event, data) {
|
||||
editFun(data.id);
|
||||
});
|
||||
},'json');
|
||||
$("#faultBox").html("");
|
||||
};
|
||||
$(function() {
|
||||
initTreeView();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">指标类型</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun();"><i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:550px;overflow:auto; "></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8" id="faultBox"></div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
263
WebRoot/jsp/administration/indexEdit.jsp
Normal file
263
WebRoot/jsp/administration/indexEdit.jsp
Normal file
@ -0,0 +1,263 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<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">
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/administration/index/update.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '指标名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
code: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '指标编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
userid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '责任人不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
/* deptid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '责任部门不能为空'
|
||||
}
|
||||
}
|
||||
}, */
|
||||
budget: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '年度预算总额不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
classid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '指标类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
//选择指标类别
|
||||
var showIndexClass4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/indexClass/showList4Select.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
var showUser4SelectsFun = function(hiddenId,textId) {
|
||||
var userIds= $("#"+hiddenId).val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:hiddenId,textId:textId,userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//初始化部门
|
||||
var refreshSelect = function(companyId) {
|
||||
$.post(ext.contextPath + "/user/getDeptByBizId4Select.do", {companyId:companyId}, function(data) {
|
||||
//$("#deptId").empty();
|
||||
var selelct_ =$("#deptid").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val('${index.deptid}').trigger("change");
|
||||
},'json');
|
||||
};
|
||||
$(function(){
|
||||
//选择部门
|
||||
$.post(ext.contextPath + "/user/getDeptByBizId4Select.do", {companyId:'${param.companyId}'}, function(data) {
|
||||
var selelct = $("#deptid").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct.val('${index.deptid}').trigger("change");
|
||||
},'json');
|
||||
$('#table_indexCycle').bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/administration/indexCycle/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [15], // 设置页面可以显示的数据条数
|
||||
pageSize: 15, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid:'${index.id}',
|
||||
}
|
||||
},
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '月份', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'money', // 返回json数据中的name
|
||||
title: '分解定额', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
editable: { //编辑列元素
|
||||
type: 'text',
|
||||
title: '分解定额',
|
||||
}
|
||||
}
|
||||
],
|
||||
//保存列修改后的数据
|
||||
onEditableSave: function (field, row, oldValue, $el) {
|
||||
$.post(ext.contextPath + "/administration/index/updateIndexCycle.do", {id:row.id,money:row.money}, function(data) {
|
||||
if (data.res == 1){
|
||||
$("#table_indexCycle").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','编辑失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
},
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table_indexCycle");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑指标信息</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name ="id" value="${index.id}">
|
||||
<input id="unitId" name="unitId" type="hidden" value="${index.unitId}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="code" name ="code" placeholder="编号" autocomplete="off" value="${index.code}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="name" name ="name" placeholder="名称" value="${index.name}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标类型</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="pname" placeholder="请选择" onclick="showIndexClass4SelectFun();" value="${index.indexClass.name}" readonly>
|
||||
<input id="pid" name="classid" type="hidden" value="${index.classid}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 col-sm-2 control-label">责任部门</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" id="deptid" name ="deptid" style="width: 100%;" >
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 col-sm-2 control-label">*责任人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="userName" name ="userName" placeholder="点击选择"
|
||||
onclick="showUser4SelectsFun('userid','userName');" value="${index.userName}">
|
||||
<input type="hidden" class="form-control" id="userid" name ="userid" value="${index.userid}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*年度预算总额(元)</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="budget" name ="budget" placeholder="年度预算总额" value="${index.budget}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="remarks" name ="remarks" placeholder="备注...">${index.remarks}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="box box-primary" >
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_indexCycle"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_update">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
271
WebRoot/jsp/administration/indexList.jsp
Normal file
271
WebRoot/jsp/administration/indexList.jsp
Normal file
@ -0,0 +1,271 @@
|
||||
<%@ 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>
|
||||
<!-- bootstrap switch -->
|
||||
<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">
|
||||
|
||||
var companyId = unitId;
|
||||
var addFun = function() {
|
||||
companyId = unitId;
|
||||
$.post(ext.contextPath + '/administration/index/add.do', {pid:'',companyId :companyId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var editFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
companyId = unitId;
|
||||
$.post(ext.contextPath + '/administration/index/edit.do', {id:id,companyId :companyId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var viewFun = function(id){
|
||||
$.post(ext.contextPath + '/administration/index/view.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(willDelete =>{
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/administration/index/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/administration/index/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
$(function() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/administration/index/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'indexClass.code', // 返回json数据中的name
|
||||
title: '指标类型编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'indexClass.name', // 返回json数据中的name
|
||||
title: '指标类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'code', // 返回json数据中的name
|
||||
title: '指标编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '指标名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'dept.name', // 返回json数据中的name
|
||||
title: '责任部门', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'userName', // 返回json数据中的name
|
||||
title: '责任人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'budget', // 返回json数据中的name
|
||||
title: '年度预算总额(元)', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts= '';
|
||||
buts+= '<security:authorize buttonUrl="administration/index/edit.do">';
|
||||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts+= '</security:authorize>';
|
||||
|
||||
buts+= '<security:authorize buttonUrl="administration/index/delete.do">';
|
||||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
buts+= '</security:authorize>';
|
||||
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div >
|
||||
<div class="form-group" style="padding:0;">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="administration/index/add.do">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="指标名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
136
WebRoot/jsp/administration/indexView.jsp
Normal file
136
WebRoot/jsp/administration/indexView.jsp
Normal file
@ -0,0 +1,136 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<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">
|
||||
|
||||
//表格查询参数
|
||||
function queryParamsFun (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${index.id}',
|
||||
};
|
||||
}
|
||||
$(function(){
|
||||
$("#table_indexCycle").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/administration/indexCycle/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [15], // 设置页面可以显示的数据条数
|
||||
pageSize: 15, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: queryParamsFun,
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '月份', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'money', // 返回json数据中的name
|
||||
title: '分解定额', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
editable: { //编辑列元素
|
||||
type: 'text',
|
||||
title: '分解定额',
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table_indexCycle");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">查看物品信息</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name ="id" value="${index.id}">
|
||||
<input id="unitId" name="unitId" type="hidden" value="${index.unitId}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="code" name ="code" placeholder="编号" autocomplete="off" value="${index.code}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="name" name ="name" placeholder="名称" value="${index.name}"readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标类型</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="pname" placeholder="请选择" value="${index.indexClass.name}" readonly>
|
||||
<input id="pid" name="classid" type="hidden" value="${index.classid}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 col-sm-2 control-label">*责任部门</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="deptid" name="deptid" type="text" class="form-control" value="${index.dept.name}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 col-sm-2 control-label">*责任人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="userName" name ="userName" value="${index.userName}" readonly>
|
||||
<input type="hidden" class="form-control" id="userid" name ="userid" value="${index.userid}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*年度预算总额(元)</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="budget" name ="budget" placeholder="年度预算总额" value="${index.budget}"readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="remarks" name ="remarks" readonly>${index.remarks}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="box box-primary" >
|
||||
<div class="box-body ">
|
||||
<table id="table_indexCycle"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
198
WebRoot/jsp/administration/indexWorkAdd.jsp
Normal file
198
WebRoot/jsp/administration/indexWorkAdd.jsp
Normal file
@ -0,0 +1,198 @@
|
||||
|
||||
<%@page import="com.sipai.entity.activiti.ActivitiCommStr"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%request.setAttribute("START", ActivitiCommStr.Ativiti_START); %>
|
||||
<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 masterId_process = '${id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
function dosave() {
|
||||
/* $('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('auditManName', 'NOT_VALIDATED',null)
|
||||
.validateField('auditManName'); */
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/administration/indexWork/save.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
//editFun('${id}');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
indexid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '指标控制编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
receiveUserId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单人不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$(function(){
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
|
||||
});
|
||||
|
||||
//初始化指标周期
|
||||
var showIndexCycle4SelectFun = function() {
|
||||
var pid = $("#indexid").val();
|
||||
$.post(ext.contextPath + "/administration/indexCycle/getIndexCycle4Select.do", {pid:pid}, function(data) {
|
||||
var selelct_ =$("#cycle").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val('').trigger("change");
|
||||
},'json');
|
||||
};
|
||||
//选择指标控制负责人
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#indexWorkManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"indexWorkManId",textId:"indexWorkManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
//选择指标控制审核人
|
||||
var showUser4AuditSelectsFun = function() {
|
||||
var userIds= $("#auditManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"auditManId",textId:"auditManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
//选择指标
|
||||
var showIndex4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/index/showList4Select.do', {formId:"subForm",hiddenId:"indexid",textId:"indexcode"
|
||||
,text2Id:"indexname",text3Id:"indexclassname",text4Id:"indexclasscode"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增指标控制记录</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input name="processStatus" type="hidden" value="${START}"/>
|
||||
<input id="unitId" name="unitId" type="hidden" value="${param.companyId}">
|
||||
<input name="id" type="hidden" value="${id}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexcode" name ="indexcode" placeholder="点击选择" onclick="showIndex4SelectFun();" value="" readonly>
|
||||
<input id="indexid" name="indexid" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexname" name ="indexname" placeholder="点击选择" onclick="showIndex4SelectFun();" value="" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标类型编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexclasscode" name ="indexclasscode" placeholder="点击选择" onclick="showIndex4SelectFun();" value="" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标类型名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexclassname" name ="indexclassname" placeholder="点击选择" onclick="showIndex4SelectFun();" value="" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标周期</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" id="cycle" name ="cycle" style="width: 100%;" onclick="showIndexCycle4SelectFun();" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*单位</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="unit" name ="unit" value="" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*最大值</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="max" name ="max" value="" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*最小值</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="min" name ="min" value="" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*接单人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="auditManName" name="auditManName" placeholder="点击选择" onclick="showUser4AuditSelectsFun();" >
|
||||
<input id="auditManId" name="receiveUserId" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div>
|
||||
<div id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
315
WebRoot/jsp/administration/indexWorkAudit.jsp
Normal file
315
WebRoot/jsp/administration/indexWorkAudit.jsp
Normal file
@ -0,0 +1,315 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@page import="com.sipai.entity.activiti.ActivitiCommStr"%>
|
||||
<%request.setAttribute("AUDIT", ActivitiCommStr.Activiti_AUDIT); %>
|
||||
<%request.setAttribute("HANDLE", ActivitiCommStr.Activiti_HANDLE); %>
|
||||
<%request.setAttribute("START", ActivitiCommStr.Ativiti_START); %>
|
||||
<%request.setAttribute("FINISH", ActivitiCommStr.Activiti_FINISH); %>
|
||||
|
||||
<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 masterId_process = '${indexWork.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
function doSubmit() {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED',null)
|
||||
.validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码 */
|
||||
$.post(ext.contextPath + "/administration/indexWork/AuditIndexWork.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','操作执行失败,请重试');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
var jobIds= $("#targetjobs").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds,jobIds:jobIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
//初始化指标周期
|
||||
var showIndexCycle4SelectFun = function() {
|
||||
var pid = $("#indexid").val();
|
||||
$.post(ext.contextPath + "/administration/indexCycle/getIndexCycle4Select.do", {pid:pid}, function(data) {
|
||||
var selelct_ =$("#cycle").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val('${indexWork.cycle}').trigger("change");
|
||||
},'json');
|
||||
};
|
||||
//选择指标控制负责人
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#indexWorkManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"indexWorkManId",textId:"indexWorkManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
//选择指标控制审核人
|
||||
var showUser4AuditSelectsFun = function() {
|
||||
var userIds= $("#auditManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"auditManId",textId:"auditManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
//选择指标
|
||||
var showIndex4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/index/showList4Select.do', {formId:"subForm",hiddenId:"indexid",textId:"indexcode"
|
||||
,text2Id:"indexname",text3Id:"indexclassname",text4Id:"indexclasscode"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
};
|
||||
$(function(){
|
||||
showIndexCycle4SelectFun();
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
//初始化选择框,方法在workflow.js里
|
||||
processSelectNode("${businessUnitAudit.taskid}");
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
targetUsersName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '提交人员不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
//显示流程详情
|
||||
var id = '${indexWork.id}';
|
||||
$.post(ext.contextPath + '/administration/indexWork/showProcessIndexWorkView.do', {id:id,inModal:'inModal'} , function(data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
//加载人员绩效table
|
||||
getWorkAchievements(masterId_process);
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">登记(${taskName})</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data" >
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input id="processStatus" name="processStatus" type="hidden" value="${indexWork.processStatus}"/>
|
||||
|
||||
<input name="unitId" type="hidden" value="${indexWork.unitId}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexcode" name ="indexcode" placeholder="点击选择" onclick="showIndex4SelectFun();" value="${indexWork.index.code}" readonly>
|
||||
<input id="indexid" name="indexid" type="hidden" value="${indexWork.indexid}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexname" name ="indexname" placeholder="点击选择" onclick="showIndex4SelectFun();" value="${indexWork.index.name}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标类型编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexclasscode" name ="indexclasscode" placeholder="点击选择" onclick="showIndex4SelectFun();" value="${indexWork.index.indexClass.code}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标类型名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexclassname" name ="indexclassname" placeholder="点击选择" onclick="showIndex4SelectFun();" value="${indexWork.index.indexClass.name}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标周期</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" id="cycle" name ="cycle" style="width: 100%;" onclick="showIndexCycle4SelectFun();" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标定额</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="money" name ="money" value="${indexWork.indexCycle.money}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">单位</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="unit" name ="unit" value="${indexWork.unit}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">最大值</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="max" name ="max" value="${indexWork.max}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">最小值</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="min" name ="min" value="${indexWork.min}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">指标实际值</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="actual" name ="actual" value="${indexWork.actual}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">完成率</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="complete" name ="complete" value="${indexWork.complete}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否超标</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="standard" name ="standard" value="${indexWork.standard}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">指标控制措施</label>
|
||||
<div class="col-sm-6">
|
||||
<textarea class="form-control" rows="2" id ="measures" name ="measures" placeholder="指标控制措施...">${indexWork.measures}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">定额工时</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="quotaHours" name ="quotaHours" value="${indexWork.quotaHours}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">奖惩工时</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="bonusPenalty" name ="bonusPenalty" value="${indexWork.bonusPenalty}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">评价说明</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="remarks" name ="remarks" placeholder="备注...">${indexWork.remarks}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<!-- <input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
<input type="hidden" class="form-control" id ="routeNum" name ="routeNum" > -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核结果</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="passstatus" name ="passstatus" style="width: 270px;">
|
||||
<option value= true>通过</option>
|
||||
<option value= false>驳回</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*下一节点</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="routeNum" name ="routeNum" style="width: 270px;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id = "reject" class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核意见</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="auditopinion" name ="auditopinion" placeholder="审核意见"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div id = "selectUsers" class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div>
|
||||
<div id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效 </h3>
|
||||
<!-- <span style="color: #6495ED;">工单工时:</span><span style="color: #6495ED;" id="workAlltime">0</span>
|
||||
<span style="color: #6495ED;">绩效工时:</span><span style="color: #6495ED;" id="actAlltime">0</span>
|
||||
<span style="color: #6495ED;">剩余工时:</span><span style="color: #6495ED;" id="surplustime">0</span> -->
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doAchievementAdd('${indexWork.id}')" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5 col-xs-12" id="showView">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<%-- <button type="button" class="btn btn-primary" onclick="processExecute(doPass,${businessUnitAudit.taskid},true)" id="btn_update">通过</button>
|
||||
<button type="button" class="btn btn-danger" onclick="processExecute(doBack,${businessUnitAudit.taskid},false)" id="btn_submit">驳回</button> --%>
|
||||
<button type="button" class="btn btn-primary" onclick="doSubmit()" id="btn_update">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
268
WebRoot/jsp/administration/indexWorkEdit.jsp
Normal file
268
WebRoot/jsp/administration/indexWorkEdit.jsp
Normal file
@ -0,0 +1,268 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.activiti.ActivitiCommStr"%>
|
||||
<%request.setAttribute("AUDIT", ActivitiCommStr.Activiti_AUDIT); %>
|
||||
<%request.setAttribute("HANDLE", ActivitiCommStr.Activiti_HANDLE); %>
|
||||
<%request.setAttribute("START", ActivitiCommStr.Ativiti_START); %>
|
||||
<%request.setAttribute("FINISH", ActivitiCommStr.Activiti_FINISH); %>
|
||||
|
||||
<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 masterId_process = '${indexWork.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/administration/indexWork/update.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function dosubmit(){
|
||||
$("#processStatus").val('${HANDLE}');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath +"/administration/indexWork/startProcess.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else if(data.res == 2){
|
||||
showAlert('d','未检测到审核流程,请先部署审核流程!');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
indexid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '指标控制编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
receiveUserId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单人不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
//初始化指标周期
|
||||
var showIndexCycle4SelectFun = function() {
|
||||
var pid = $("#indexid").val();
|
||||
$.post(ext.contextPath + "/administration/indexCycle/getIndexCycle4Select.do", {pid:pid}, function(data) {
|
||||
var selelct_ =$("#cycle").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val('${indexWork.cycle}').trigger("change");
|
||||
},'json');
|
||||
};
|
||||
//选择指标控制负责人
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#indexWorkManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"indexWorkManId",textId:"indexWorkManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
//选择指标控制审核人
|
||||
var showUser4AuditSelectsFun = function() {
|
||||
var userIds= $("#auditManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"auditManId",textId:"auditManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
//选择指标
|
||||
var showIndex4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/index/showList4Select.do', {formId:"subForm",hiddenId:"indexid",textId:"indexcode"
|
||||
,text2Id:"indexname",text3Id:"indexclassname",text4Id:"indexclasscode"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
$(function(){
|
||||
showIndexCycle4SelectFun();
|
||||
//加载人员绩效table
|
||||
//getWorkAchievements(masterId_process);
|
||||
});
|
||||
|
||||
//关闭模态框时刷新表格数据
|
||||
function closeModel(){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑记录</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input id="processStatus" name="processStatus" type="hidden" value="${indexWork.processStatus}"/>
|
||||
|
||||
<input name="unitId" type="hidden" value="${indexWork.unitId}"/>
|
||||
<input name="id" type="hidden" value="${indexWork.id}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexcode" name ="indexcode" placeholder="点击选择" onclick="showIndex4SelectFun();" value="${indexWork.index.code}" readonly>
|
||||
<input id="indexid" name="indexid" type="hidden" value="${indexWork.indexid}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexname" name ="indexname" placeholder="点击选择" onclick="showIndex4SelectFun();" value="${indexWork.index.name}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标类型编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexclasscode" name ="indexclasscode" placeholder="点击选择" onclick="showIndex4SelectFun();" value="${indexWork.index.indexClass.code}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标类型名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexclassname" name ="indexclassname" placeholder="点击选择" onclick="showIndex4SelectFun();" value="${indexWork.index.indexClass.name}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标周期</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" id="cycle" name ="cycle" style="width: 100%;" onclick="showIndexCycle4SelectFun();" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标定额</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="money" name ="money" value="${indexWork.indexCycle.money}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">单位</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="unit" name ="unit" value="${indexWork.unit}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">最大值</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="max" name ="max" value="${indexWork.max}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">最小值</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="min" name ="min" value="${indexWork.min}" >
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">指标实际值</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="min" name ="min" value="${indexWork.min}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">完成率</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="complete" name ="complete" value="${indexWork.complete}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否超标</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="standard" name ="standard" value="${indexWork.standard}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">指标控制措施</label>
|
||||
<div class="col-sm-6">
|
||||
<textarea class="form-control" rows="2" id ="measures" name ="measures" placeholder="指标控制措施...">${indexWork.measures}</textarea>
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*接单人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="auditManName" name="auditManName" value="${indexWork.receiveUser}" placeholder="点击选择" onclick="showUser4AuditSelectsFun();" >
|
||||
<input id="auditManId" name="receiveUserId" type="hidden" value="${indexWork.receiveUserId}"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div>
|
||||
<div id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
<%-- <div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效 </h3>
|
||||
<span style="color: #6495ED;">工单工时:</span><span style="color: #6495ED;" id="workAlltime">0</span>
|
||||
<span style="color: #6495ED;">绩效工时:</span><span style="color: #6495ED;" id="actAlltime">0</span>
|
||||
<span style="color: #6495ED;">剩余工时:</span><span style="color: #6495ED;" id="surplustime">0</span>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doAchievementAdd('${indexWork.id}')" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div> --%>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" onclick="closeModel()" >关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosubmit()" id="btn_save">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
267
WebRoot/jsp/administration/indexWorkExecuteView.jsp
Normal file
267
WebRoot/jsp/administration/indexWorkExecuteView.jsp
Normal file
@ -0,0 +1,267 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem='tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance='tb_maintenance_file'; //数据表
|
||||
var nameSpace='MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
resizeImage:true,
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:'',
|
||||
actionDelete:''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
var viewHandleDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${param.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'view';//有查看权限
|
||||
|
||||
$(function() {
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
$("#judgemaintainerstaff").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
$("#judgeresult").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
var result='${businessUnitRecords}';
|
||||
result=result.replace(new RegExp("\r\n","gm"),"");
|
||||
var json =JSON.parse(result);
|
||||
$.each(json, function(index, item) {
|
||||
if(item.id!=null &&item.id!=""){
|
||||
previews=new Array();
|
||||
$('#'+item.id).show();
|
||||
var data =item.files;
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");
|
||||
previews.push(path);
|
||||
previewConfig['width']= '30px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput(item.id);
|
||||
}
|
||||
});
|
||||
})
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
var printpage = function (myDiv){
|
||||
$('.printContent').show();
|
||||
var printHtml = document.getElementById(myDiv).innerHTML;
|
||||
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
|
||||
/*
|
||||
var ss = ".coversheet-pageBoder{"
|
||||
+" padding: 10px;"
|
||||
+" margin-top: 10px;"
|
||||
+" border: 1px solid gray;"
|
||||
+" page-break-after: always;"
|
||||
+" border-radius: 5px;"
|
||||
+" box-shadow: 0 1px 2px 1px rgba(0,0,0,.08), 0 3px 6px rgba(0,0,0,.08);"
|
||||
+"}"
|
||||
+".noprint{display: none;}"
|
||||
+".select2-container .select2-selection--single{ "
|
||||
+" height:34px; "
|
||||
+" line-height: 34px; "
|
||||
+" }"
|
||||
+" .select2-selection__arrow{"
|
||||
+" margin-top:3px;"
|
||||
+" } "
|
||||
+" .div-row{"
|
||||
+" margin-left:3px;"
|
||||
+" margin-right:3px;"
|
||||
+" }"
|
||||
+" .div-border{"
|
||||
+" border-style:solid;"
|
||||
+" border-width:1px;"
|
||||
+" text-align:center;"
|
||||
+" }"
|
||||
+" .right-border{"
|
||||
+" border-right:none;"
|
||||
+" }"
|
||||
+" .top-right-border{"
|
||||
+" border-top:none;"
|
||||
+" border-right:none;"
|
||||
+" }"
|
||||
+" .top-border{"
|
||||
+" border-top:none;"
|
||||
+" }";
|
||||
*/
|
||||
//for Chrome Firefox Opera Safari
|
||||
//wind.document.body.innerHTML = printHtml;
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
|
||||
wind.document.head.appendChild(link);
|
||||
/*
|
||||
var style = document.createElement('style');
|
||||
style.type = 'text/css';
|
||||
style.rel = 'stylesheet';
|
||||
style.appendChild(document.createTextNode(ss));
|
||||
wind.document.head.appendChild(style);
|
||||
*/
|
||||
wind.document.body.innerHTML = printHtml;
|
||||
//console.log(wind.document);
|
||||
wind.print();
|
||||
wind.close();
|
||||
$('.printContent').hide();
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
<div class="modal fade" id="indexWorkExcuteModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">流程详情</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="padding-left:0;padding-right:0;">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise >
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
|
||||
<div>
|
||||
${item.record}
|
||||
</div>
|
||||
<c:if test ="${item.id!=''}">
|
||||
<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading" />
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文件附件:</label>
|
||||
</div>
|
||||
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<!-- 流程打印布局 开始 -->
|
||||
<div id="inStockExcuteDetail">
|
||||
<div class="printContent" style="display:none">
|
||||
<h4 style="text-align:center;">处理详情</h4>
|
||||
</div>
|
||||
<div class="printContent" style="display:none">
|
||||
<table style="border-collapse:collapse;margin:0 auto">
|
||||
<tr >
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
|
||||
</tr>
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
|
||||
<td style="border:1px solid black;width:300px;">${item.record}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文件附件:</label>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- 流程打印布局 结束-->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" onclick="printpage('inStockExcuteDetail');"><i class="fa fa-print"></i>打印</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
185
WebRoot/jsp/administration/indexWorkExecuteViewInModal.jsp
Normal file
185
WebRoot/jsp/administration/indexWorkExecuteViewInModal.jsp
Normal file
@ -0,0 +1,185 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem='tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance='tb_maintenance_file'; //数据表
|
||||
var nameSpace='MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
resizeImage:true,
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:'',
|
||||
actionDelete:''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
var viewHandleDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${param.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'view';//有查看权限
|
||||
|
||||
$(function() {
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
$("#judgemaintainerstaff").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
$("#judgeresult").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
var result='${businessUnitRecords}';
|
||||
result=result.replace(new RegExp("\r\n","gm"),"");
|
||||
var json =JSON.parse(result);
|
||||
$.each(json, function(index, item) {
|
||||
if(item.id!=null &&item.id!=""){
|
||||
previews=new Array();
|
||||
$('#'+item.id).show();
|
||||
var data =item.files;
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");
|
||||
previews.push(path);
|
||||
previewConfig['width']= '30px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput(item.id);
|
||||
}
|
||||
});
|
||||
})
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
var printpage = function (myDiv){
|
||||
$('.printContent').show();
|
||||
var printHtml = document.getElementById(myDiv).innerHTML;
|
||||
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
|
||||
wind.document.head.appendChild(link);
|
||||
wind.document.body.innerHTML = printHtml;
|
||||
wind.print();
|
||||
wind.close();
|
||||
$('.printContent').hide();
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise >
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
|
||||
<div>
|
||||
${item.record}
|
||||
</div>
|
||||
<c:if test ="${item.id!=''}">
|
||||
<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading" />
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- 流程打印布局 开始 -->
|
||||
<div id="contractExcuteDetail">
|
||||
<div class="printContent" style="display:none">
|
||||
<h4 style="text-align:center;">流程详情</h4>
|
||||
</div>
|
||||
<div class="printContent" style="display:none;">
|
||||
<table style="border-collapse:collapse;margin:0 auto">
|
||||
<tr >
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
|
||||
</tr>
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
|
||||
<td style="border:1px solid black;width:300px;">${item.record}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">文件附件:</label>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
306
WebRoot/jsp/administration/indexWorkHandle.jsp
Normal file
306
WebRoot/jsp/administration/indexWorkHandle.jsp
Normal file
@ -0,0 +1,306 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.activiti.ActivitiCommStr"%>
|
||||
<%request.setAttribute("AUDIT", ActivitiCommStr.Activiti_AUDIT); %>
|
||||
<%request.setAttribute("HANDLE", ActivitiCommStr.Activiti_HANDLE); %>
|
||||
<%request.setAttribute("START", ActivitiCommStr.Ativiti_START); %>
|
||||
<%request.setAttribute("FINISH", ActivitiCommStr.Activiti_FINISH); %>
|
||||
|
||||
<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 masterId_process = '${indexWork.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/administration/indexWork/update.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function dosubmit(){
|
||||
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
$("#subUnitForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid() && $("#subUnitForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/administration/indexWork/update.do", $("#subForm").serialize(), function(data) {
|
||||
var routeNum = $("#routeNum").val();
|
||||
if (data.res == 1){
|
||||
$.post(ext.contextPath + "/administration/indexWork/submitIndexWorkHandle.do", $("#subUnitForm").serialize()+"&routeNum="+routeNum, function(unitdata) {
|
||||
if (unitdata.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(unitdata.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
//初始化指标周期
|
||||
var showIndexCycle4SelectFun = function() {
|
||||
var pid = $("#indexid").val();
|
||||
$.post(ext.contextPath + "/administration/indexCycle/getIndexCycle4Select.do", {pid:pid}, function(data) {
|
||||
var selelct_ =$("#cycle").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct_.val('${indexWork.cycle}').trigger("change");
|
||||
},'json');
|
||||
};
|
||||
//选择指标控制负责人
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#indexWorkManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"indexWorkManId",textId:"indexWorkManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
/* //选择指标控制审核人
|
||||
var showUser4AuditSelectsFun = function() {
|
||||
var userIds= $("#auditManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"auditManId",textId:"auditManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
}; */
|
||||
//选择指标
|
||||
var showIndex4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/index/showList4Select.do', {formId:"subForm",hiddenId:"indexid",textId:"indexcode"
|
||||
,text2Id:"indexname",text3Id:"indexclassname",text4Id:"indexclasscode"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
$(function(){
|
||||
showIndexCycle4SelectFun();
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
//初始化选择框,方法在workflow.js里
|
||||
processSelectNodeForHandle("${businessUnitHandle.taskid}");
|
||||
//显示流程详情
|
||||
var id = '${indexWork.id}';
|
||||
$.post(ext.contextPath + '/administration/indexWork/showProcessIndexWorkView.do', {id:id,inModal:'inModal'} , function(data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
//加载人员绩效table
|
||||
// getWorkAchievements(masterId_process);
|
||||
});
|
||||
|
||||
//关闭模态框时刷新表格数据
|
||||
function closeModel(){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
//选择审核人
|
||||
var showUser4AuditSelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
var jobIds= $("#targetjobs").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {formId:"subUnitForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds,jobIds:jobIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑记录</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input id="processStatus" name="processStatus" type="hidden" value="${indexWork.processStatus}"/>
|
||||
|
||||
<input name="unitId" type="hidden" value="${indexWork.unitId}"/>
|
||||
<input name="id" type="hidden" value="${indexWork.id}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexcode" name ="indexcode" placeholder="点击选择" onclick="showIndex4SelectFun();" value="${indexWork.index.code}" readonly>
|
||||
<input id="indexid" name="indexid" type="hidden" value="${indexWork.indexid}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexname" name ="indexname" placeholder="点击选择" onclick="showIndex4SelectFun();" value="${indexWork.index.name}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标类型编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexclasscode" name ="indexclasscode" placeholder="点击选择" onclick="showIndex4SelectFun();" value="${indexWork.index.indexClass.code}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标类型名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="indexclassname" name ="indexclassname" placeholder="点击选择" onclick="showIndex4SelectFun();" value="${indexWork.index.indexClass.name}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标周期</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" id="cycle" name ="cycle" style="width: 100%;" onclick="showIndexCycle4SelectFun();" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标定额</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="money" name ="money" value="${indexWork.indexCycle.money}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">单位</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="unit" name ="unit" value="${indexWork.unit}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">最大值</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="max" name ="max" value="${indexWork.max}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">最小值</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="min" name ="min" value="${indexWork.min}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">指标实际值</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="actual" name ="actual" value="${indexWork.actual}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">完成率</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="complete" name ="complete" value="${indexWork.complete}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否超标</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="standard" name ="standard" value="${indexWork.standard}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">指标控制措施</label>
|
||||
<div class="col-sm-6">
|
||||
<textarea class="form-control" rows="2" id ="measures" name ="measures" placeholder="指标控制措施...">${indexWork.measures}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!--审核退回后显示 -->
|
||||
<form class="form-horizontal" id="subUnitForm" enctype="multipart/form-data" >
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitHandle.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitHandle.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitHandle.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitHandle.businessid}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitHandle.taskdefinitionkey}">
|
||||
<%-- <input type="hidden" class="form-control" id= "targetusers" name ="targetusers" value="${businessUnitHandle.targetusers}"> --%>
|
||||
<input type="hidden" class="form-control" name ="unitid" value="${businessUnitHandle.unitid}">
|
||||
<c:if test='${not empty businessUnitAudit.auditopinion }'>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">处理说明:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control " id="auditopinion" name="auditopinion" rows="2" placeholder="审核意见" >${businessUnitAudit.auditopinion}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*下一节点</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="routeNum" name ="routeNum" style="width: 270px;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id = "selectUsers" class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4AuditSelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value="${businessUnitHandle.targetusers}"/>
|
||||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div>
|
||||
<div id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
<%-- <div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效 </h3>
|
||||
<span style="color: #6495ED;">工单工时:</span><span style="color: #6495ED;" id="workAlltime">0</span>
|
||||
<span style="color: #6495ED;">绩效工时:</span><span style="color: #6495ED;" id="actAlltime">0</span>
|
||||
<span style="color: #6495ED;">剩余工时:</span><span style="color: #6495ED;" id="surplustime">0</span>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doAchievementAdd('${indexWork.id}')" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div> --%>
|
||||
</div>
|
||||
<div class="col-md-5 col-xs-12" id="showView">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" onclick="closeModel()">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosubmit()" id="btn_submit">提交审核</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
429
WebRoot/jsp/administration/indexWorkList.jsp
Normal file
429
WebRoot/jsp/administration/indexWorkList.jsp
Normal file
@ -0,0 +1,429 @@
|
||||
<%@ 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"%>
|
||||
<%@page import="com.sipai.entity.activiti.ActivitiCommStr"%>
|
||||
<%request.setAttribute("AUDIT", ActivitiCommStr.Activiti_AUDIT); %>
|
||||
<%request.setAttribute("HANDLE", ActivitiCommStr.Activiti_HANDLE); %>
|
||||
<%request.setAttribute("START", ActivitiCommStr.Ativiti_START); %>
|
||||
<%request.setAttribute("FINISH", ActivitiCommStr.Activiti_FINISH); %>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- bootstrap switch -->
|
||||
<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>
|
||||
<!--bootstrap-edittable 表格行内编辑 -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-editable/css/bootstrap-editable.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-editable/js/bootstrap-editable.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-editable/js/bootstrap-table-editable.js" charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
.main-header{display:none;}
|
||||
.content-header{display:none;}
|
||||
.main-footer{display:none;}
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
.table-hover>tbody>tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var addFun = function() {
|
||||
$("#searchForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#searchForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + '/administration/indexWork/add.do', {companyId :companyId } , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var editFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/administration/indexWork/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var viewFun = function(id){
|
||||
$.post(ext.contextPath + '/administration/indexWork/view.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var indexWorkProcessFun = function(id){
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/administration/indexWork/showProcessIndexWorkView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('indexWorkExcuteModal');
|
||||
});
|
||||
};
|
||||
var deleteFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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 + '/administration/indexWork/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
showAlert('d','请先选择记录','mainAlertdiv');
|
||||
}else{
|
||||
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 + '/administration/indexWork/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
var companyId = "";
|
||||
$(function() {
|
||||
var flag = IsApp();
|
||||
if (flag==true){
|
||||
|
||||
}else{
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
//简易公司combotree
|
||||
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#companyName").text("公司: " + data[0].text);
|
||||
companyId = data[0].id;
|
||||
initFun();
|
||||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#cname_input").val(data[0].text);
|
||||
companyId = data[0].id;
|
||||
initFun();
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
levels: 3,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
$("#search_pid").val(data.id);
|
||||
$("#cname_input").val(data.text);
|
||||
document.getElementById('ul_tree').style.display = "none";
|
||||
companyId= data.id;
|
||||
initFun();
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
//防止点击树的+号收起下拉框
|
||||
$("#ul_tree").on("click", function (e) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
//点击空白隐藏树
|
||||
$(document).click(function (e) {
|
||||
var divTree = $('#ul_tree'); // 设置目标区域
|
||||
if (!divTree.is(e.target) && divTree.has(e.target).length === 0) {
|
||||
divTree.hide()
|
||||
}
|
||||
})
|
||||
|
||||
//输入框验证
|
||||
$("#searchForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
search_code: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '请先选择厂区'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
var initFun = function(){
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/administration/indexWork/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: companyId,
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
},
|
||||
//detailView: true,//父子表
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'index.indexClass.code', // 返回json数据中的name
|
||||
title: '指标类型编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'index.indexClass.name', // 返回json数据中的name
|
||||
title: '指标类型名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'index.code', // 返回json数据中的name
|
||||
title: '指标编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'index.name', // 返回json数据中的name
|
||||
title: '指标名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'indexCycle.name', // 返回json数据中的name
|
||||
title: '指标周期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'indexCycle.money', // 返回json数据中的name
|
||||
title: '指标定额', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'actual', // 返回json数据中的name
|
||||
title: '指标实际值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'processStatus', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index){
|
||||
switch (value){
|
||||
case '${FINISH}' :
|
||||
return "审核完成";
|
||||
case '${START}' :
|
||||
return "未下达";
|
||||
case '${HANDLE}' :
|
||||
return "已下达";
|
||||
case '${AUDIT}' :
|
||||
return "提交审核";
|
||||
default :
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts= '';
|
||||
if(row.processStatus == '${START}'){
|
||||
buts+= '<security:authorize buttonUrl="administration/indexWork/edit.do">';
|
||||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts+= '</security:authorize>';
|
||||
|
||||
buts+= '<security:authorize buttonUrl="administration/indexWork/delete.do">';
|
||||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
buts+= '</security:authorize>';
|
||||
}else{
|
||||
buts+= '<button class="btn btn-default btn-sm" title="查看详情" onclick="indexWorkProcessFun(\'' + row.id + '\')"><i class="fa fa-history"></i><span class="hidden-md hidden-lg">查看详情</span></button>';
|
||||
}
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="subEditDiv"></div>
|
||||
<div id="subDetailDiv"></div>
|
||||
<div id="PRDetail4SelectsDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="Goods4SelectsDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="goodsAddDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<form id="searchForm">
|
||||
<div >
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
|
||||
</div>
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
|
||||
style="width:300px;" onclick="document.getElementById('ul_tree').style.display = 'block';">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"
|
||||
style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
|
||||
<input class="form-control " id="cname_input" name="cname_input"
|
||||
style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly />
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul id="ul_tree" class="dropdown-menu" data-stopPropagation="true">
|
||||
<li class="header">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="form-group" style="padding:0;">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="administration/indexWork/add.do">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<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 type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
</html>
|
||||
201
WebRoot/jsp/administration/organizationAdd.jsp
Normal file
201
WebRoot/jsp/administration/organizationAdd.jsp
Normal file
@ -0,0 +1,201 @@
|
||||
|
||||
<%@page import="com.sipai.entity.activiti.ActivitiCommStr"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%request.setAttribute("START", ActivitiCommStr.Ativiti_START); %>
|
||||
<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 masterId_process = '${id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
function dosave() {
|
||||
/* $('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('auditManName', 'NOT_VALIDATED',null)
|
||||
.validateField('auditManName'); */
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/administration/organization/save.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
//editFun('${id}');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
classid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工作类型编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
receiveUserId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单人不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$(function(){
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
|
||||
});
|
||||
|
||||
|
||||
//选择工作控制审核人
|
||||
var showUser4AuditSelectsFun = function() {
|
||||
var userIds= $("#auditManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"auditManId",textId:"auditManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
//选择工作
|
||||
var showOrganizationClass4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/organizationClass/showList4Select.do', {formId:"subForm",hiddenId:"classid",textId:"classcode"
|
||||
,text2Id:"classname"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
//关闭模态框时刷新表格数据
|
||||
function closeModel(){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
//初始化计划开始时间
|
||||
$('#planStartDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format:'yyyy-mm-dd',
|
||||
}).on('hide',function(e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('planStartDate', 'NOT_VALIDATED',null)
|
||||
.validateField('planStartDate');
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增记录</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input name="processStatus" type="hidden" value="${START}"/>
|
||||
<input id="unitId" name="unitId" type="hidden" value="${param.companyId}" >
|
||||
<input id="typeid" name="typeid" type="hidden" value="${param.typeid}" >
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="id" name ="id" value="${id}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="projectName" name ="projectName" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作类型编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="classcode" name ="classcode" placeholder="点击选择" onclick="showOrganizationClass4SelectFun();" value="" readonly>
|
||||
<input id="classid" name="classid" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作类型名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="classname" name ="classname" placeholder="点击选择" onclick="showOrganizationClass4SelectFun();" value="" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作内容</label>
|
||||
<div class="col-sm-6">
|
||||
<textarea class="form-control" rows="2" id ="projectCont" name ="projectCont" placeholder="工作内容..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*计划开始时间</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planStartDate" name="planStartDate" style="width: 132px;" autocomplete="off" placeholder="请选择开始时间">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*评价标准</label>
|
||||
<div class="col-sm-6">
|
||||
<textarea class="form-control" rows="2" id ="enclosure" name ="enclosure" placeholder="评价标准..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*定额工时</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="quotaHours" name ="quotaHours" value="" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*定额费用(元)</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="quotaCost" name ="quotaCost" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*接单人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="auditManName" name="auditManName" placeholder="点击选择" onclick="showUser4AuditSelectsFun();" >
|
||||
<input id="auditManId" name="receiveUserId" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div>
|
||||
<div id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
318
WebRoot/jsp/administration/organizationAudit.jsp
Normal file
318
WebRoot/jsp/administration/organizationAudit.jsp
Normal file
@ -0,0 +1,318 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@page import="com.sipai.entity.activiti.ActivitiCommStr"%>
|
||||
<%request.setAttribute("AUDIT", ActivitiCommStr.Activiti_AUDIT); %>
|
||||
<%request.setAttribute("HANDLE", ActivitiCommStr.Activiti_HANDLE); %>
|
||||
<%request.setAttribute("START", ActivitiCommStr.Ativiti_START); %>
|
||||
<%request.setAttribute("FINISH", ActivitiCommStr.Activiti_FINISH); %>
|
||||
|
||||
<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 masterId_process = '${organization.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
function doSubmit() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码 */
|
||||
var routeNum = $("#routeNum").val();
|
||||
$.post(ext.contextPath + "/administration/organization/AuditOrganization.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','操作执行失败,请重试');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
var jobIds= $("#targetjobs").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds,jobIds:jobIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
classid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工作类型编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
receiveUserId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单人不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$(function(){
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
//初始化选择框,方法在workflow.js里
|
||||
processSelectNode("${businessUnitAudit.taskid}");
|
||||
//加载人员绩效table
|
||||
getWorkAchievements(masterId_process);
|
||||
|
||||
//显示流程详情
|
||||
var id = '${organization.id}';
|
||||
$.post(ext.contextPath + '/administration/organization/showProcessOrganizationView.do', {id:id,inModal:'inModal'} , function(data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//选择工作控制审核人
|
||||
var showUser4AuditSelectsFun = function() {
|
||||
var userIds= $("#auditManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"auditManId",textId:"auditManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
//选择工作
|
||||
var showOrganizationClass4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/organizationClass/showList4Select.do', {formId:"subForm",hiddenId:"classid",textId:"classcode"
|
||||
,text2Id:"classname"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
//初始化计划开始时间
|
||||
$('#planStartDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format:'yyyy-mm-dd',
|
||||
}).on('hide',function(e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('planStartDate', 'NOT_VALIDATED',null)
|
||||
.validateField('planStartDate');
|
||||
});
|
||||
//初始化计划开始时间
|
||||
$('#finishDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format:'yyyy-mm-dd',
|
||||
}).on('hide',function(e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('finishDate', 'NOT_VALIDATED',null)
|
||||
.validateField('finishDate');
|
||||
});
|
||||
|
||||
//关闭模态框时刷新表格数据
|
||||
function closeModel(){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">登记(${taskName})</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data" >
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input id="processStatus" name="processStatus" type="hidden" value="${organization.processStatus}"/>
|
||||
|
||||
<input name="unitId" type="hidden" value="${organization.unitId}"/>
|
||||
<input id="typeid" name="typeid" type="hidden" value="${organization.typeid}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单号</label>
|
||||
<div class="col-sm-6">${organization.id}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="projectName" name ="projectName" value="${organization.projectName}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作类型编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="classcode" name ="classcode" placeholder="点击选择"
|
||||
onclick="showOrganizationClass4SelectFun();" value="${organization.organizationClass.code}" readonly>
|
||||
<input id="classid" name="classid" type="hidden" value="${organization.classid}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作类型名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="classname" name ="classname" placeholder="点击选择"
|
||||
onclick="showOrganizationClass4SelectFun();" value="${organization.organizationClass.name}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作内容</label>
|
||||
<div class="col-sm-6">
|
||||
<textarea class="form-control" rows="2" id ="projectCont" name ="projectCont" placeholder="工作内容..." readonly>${organization.projectCont}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*计划开始时间</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planStartDate" name="planStartDate" value="${organization.planStartDate}" style="width: 132px;" autocomplete="off" placeholder="请选择开始时间" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*评价标准</label>
|
||||
<div class="col-sm-6">
|
||||
<textarea class="form-control" rows="2" id ="enclosure" name ="enclosure" placeholder="评价标准..." readonly>${organization.enclosure}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*定额工时</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="quotaHours" name ="quotaHours" value="${organization.quotaHours}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*定额费用(元)</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="quotaCost" name ="quotaCost" value="${organization.quotaCost}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*实际费用(元)</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="actualCost" name ="actualCost" value="${organization.actualCost}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*实际完成工作时间</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="finishDate" name="finishDate" value="${organization.finishDate}" style="width: 132px;" autocomplete="off" placeholder="请选择时间" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">奖惩工时</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="bonusPenalty" name ="bonusPenalty" value="${organization.bonusPenalty}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">验收时间</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="checkDate" name ="checkDate" value="${organization.checkDate}" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<!-- <input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
<input type="hidden" class="form-control" id ="routeNum" name ="routeNum" > -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核结果</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="passstatus" name ="passstatus" style="width: 270px;">
|
||||
<option value= true>通过</option>
|
||||
<option value= false>驳回</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*下一节点</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control select2" id="routeNum" name ="routeNum" style="width: 270px;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id = "reject" class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核意见</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="auditopinion" name ="auditopinion" placeholder="审核意见"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div id = "selectUsers" class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div>
|
||||
<div id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效 </h3>
|
||||
<!-- <span style="color: #6495ED;">工单工时:</span><span style="color: #6495ED;" id="workAlltime">0</span>
|
||||
<span style="color: #6495ED;">绩效工时:</span><span style="color: #6495ED;" id="actAlltime">0</span>
|
||||
<span style="color: #6495ED;">剩余工时:</span><span style="color: #6495ED;" id="surplustime">0</span> -->
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doAchievementAdd('${organization.id}')" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5 col-xs-12" id="showView">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<%-- <button type="button" class="btn btn-primary" onclick="processExecute(doPass,${businessUnitAudit.taskid},true)" id="btn_update">通过</button>
|
||||
<button type="button" class="btn btn-danger" onclick="processExecute(doBack,${businessUnitAudit.taskid},false)" id="btn_submit">驳回</button> --%>
|
||||
<button type="button" class="btn btn-primary" onclick="doSubmit()" id="btn_update">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
39
WebRoot/jsp/administration/organizationClass4select.jsp
Normal file
39
WebRoot/jsp/administration/organizationClass4select.jsp
Normal file
@ -0,0 +1,39 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$.post(ext.contextPath + '/administration/organizationClass/getOrganizationClassJson.do', {ng:''} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
$('#fault_select_tree').treeview({
|
||||
data: data,
|
||||
});
|
||||
$('#fault_select_tree').on('nodeSelected', function(event, data) {
|
||||
$('#${param.formId} #${param.hiddenId}' ).val(data.id);
|
||||
$('#${param.formId} #${param.textId}').val(data.text);
|
||||
closeModal("fault4SelectModal");
|
||||
});
|
||||
}
|
||||
},'json');
|
||||
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="fault4SelectModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择类型</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="fault_select_tree" style="height:430px;overflow:auto;width:100%"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<!-- <button type="button" class="btn btn-primary" onclick="selectMenu()">保存</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
141
WebRoot/jsp/administration/organizationClassAdd.jsp
Normal file
141
WebRoot/jsp/administration/organizationClassAdd.jsp
Normal file
@ -0,0 +1,141 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<%request.setAttribute("Active_True", CommString.Active_True); %>
|
||||
<%request.setAttribute("Active_False", CommString.Active_False); %>
|
||||
|
||||
<%@page import="com.sipai.entity.administration.OrganizationClass"%>
|
||||
<%request.setAttribute("Type_0", OrganizationClass.Type_0); %>
|
||||
<%request.setAttribute("Type_1", OrganizationClass.Type_1); %>
|
||||
|
||||
<%request.setAttribute("Attribute_0", OrganizationClass.Attribute_0); %>
|
||||
<%request.setAttribute("Attribute_1", OrganizationClass.Attribute_1); %>
|
||||
<%request.setAttribute("Attribute_2", OrganizationClass.Attribute_2); %>
|
||||
<%request.setAttribute("Attribute_3", OrganizationClass.Attribute_3); %>
|
||||
|
||||
<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 showOrganizationClass4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/organizationClass/showList4Select.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
$.post(ext.contextPath + "/administration/organizationClass/save.do", $("#subForm").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$("#active").select2({minimumResultsForSearch: 10});
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
code: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '编号不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
/* pname: {
|
||||
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="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="type" name="type" type="hidden" value="${param.type}"/>
|
||||
|
||||
<!-- 界面提醒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="name" name ="name" placeholder="名称" ">
|
||||
</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="showOrganizationClass4SelectFun();" value="${pname}" readonly></input>
|
||||
<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="code" name="code" placeholder="编号"
|
||||
value="">
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${param.type==Type_0}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">岗位属性</label>
|
||||
<div class="col-sm-4">
|
||||
<select id ="attribute" name="attribute" class="form-control select2">
|
||||
<option value="${Attribute_0}" >运行</option>
|
||||
<option value="${Attribute_1}" >行政</option>
|
||||
<option value="${Attribute_2}" >维修</option>
|
||||
<option value="${Attribute_3}" >化验</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<div class="form-group">
|
||||
<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>
|
||||
<label class="col-sm-2 control-label">状态</label>
|
||||
<div class="col-sm-4">
|
||||
<select id ="active" name="active" class="form-control select2">
|
||||
<option value="${Active_True}" selected="selected">启用</option>
|
||||
<option value="${Active_False}" >禁用</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" rows="2" id ="remarks" name ="remarks" placeholder="描述..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
184
WebRoot/jsp/administration/organizationClassEdit.jsp
Normal file
184
WebRoot/jsp/administration/organizationClassEdit.jsp
Normal file
@ -0,0 +1,184 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<%request.setAttribute("Active_True", CommString.Active_True); %>
|
||||
<%request.setAttribute("Active_False", CommString.Active_False); %>
|
||||
|
||||
<%@page import="com.sipai.entity.administration.OrganizationClass"%>
|
||||
<%request.setAttribute("Type_0", OrganizationClass.Type_0); %>
|
||||
<%request.setAttribute("Type_1", OrganizationClass.Type_1); %>
|
||||
|
||||
<%request.setAttribute("Attribute_0", OrganizationClass.Attribute_0); %>
|
||||
<%request.setAttribute("Attribute_1", OrganizationClass.Attribute_1); %>
|
||||
<%request.setAttribute("Attribute_2", OrganizationClass.Attribute_2); %>
|
||||
<%request.setAttribute("Attribute_3", OrganizationClass.Attribute_3); %>
|
||||
|
||||
<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 showOrganizationClass4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/organizationClass/showList4Select.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
};
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
$.post(ext.contextPath + "/administration/organizationClass/update.do", $("#subForm").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
showAlert('s','保存成功');
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function dodel() {
|
||||
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 + '/administration/organizationClass/delete.do', $("#subForm").serialize(), function(data) {
|
||||
if(data>0){
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d','删除失败');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
$("#active").select2({minimumResultsForSearch: 10}).val("${organizationClass.active}").trigger("change");
|
||||
$("#attribute").select2({minimumResultsForSearch: 10}).val("${organizationClass.attribute}").trigger("change");
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
code: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '编号不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
/* pname: {
|
||||
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="${organizationClass.id}"/>
|
||||
<!-- 界面提醒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="name" name ="name" placeholder="名称" value="${organizationClass.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="showOrganizationClass4SelectFun();" value="${organizationClass.pname}" readonly>
|
||||
<input id="pid" name="pid" type="hidden" value="${organizationClass.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="code" name="code" placeholder="编号"
|
||||
value="${organizationClass.code }">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">类型</label>
|
||||
<div class="col-sm-4" style="padding-top:7px;">
|
||||
<c:if test="${organizationClass.type==Type_0}">岗位</c:if>
|
||||
<c:if test="${organizationClass.type==Type_1}">工作</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${organizationClass.type==Type_0}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">岗位属性</label>
|
||||
<div class="col-sm-4">
|
||||
<select id ="attribute" name="attribute" class="form-control select2">
|
||||
<option value="${Attribute_0}" >运行</option>
|
||||
<option value="${Attribute_1}" >行政</option>
|
||||
<option value="${Attribute_2}" >维修</option>
|
||||
<option value="${Attribute_3}" >化验</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<div class="form-group">
|
||||
<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="${organizationClass.morder}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id ="active" name="active" class="form-control select2">
|
||||
<option value="${Active_True}" >启用</option>
|
||||
<option value="${Active_False}" >禁用</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" rows="2" id ="remarks" name ="remarks" placeholder="描述...">${organizationClass.remarks}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
100
WebRoot/jsp/administration/organizationClassList.jsp
Normal file
100
WebRoot/jsp/administration/organizationClassList.jsp
Normal file
@ -0,0 +1,100 @@
|
||||
<%@ 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"%>
|
||||
|
||||
<%@page import="com.sipai.entity.administration.OrganizationClass"%>
|
||||
<%request.setAttribute("Type_0", OrganizationClass.Type_0); %>
|
||||
<%request.setAttribute("Type_1", OrganizationClass.Type_1); %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var addFun = function(type) {
|
||||
// console.log(type);
|
||||
var node=$('#tree').treeview('getSelected');
|
||||
var pid="-1";
|
||||
// console.info(node)
|
||||
if(node!=null && node.length>0){
|
||||
pid=node[0].id;
|
||||
}
|
||||
$.post(ext.contextPath + '/administration/organizationClass/add.do', {pid:pid,type:type} , function(data) {
|
||||
$("#faultBox").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/administration/organizationClass/edit.do', {id:id} , function(data) {
|
||||
$("#faultBox").html(data);
|
||||
});
|
||||
};
|
||||
var initTreeView = function() {
|
||||
$.post(ext.contextPath + '/administration/organizationClass/getOrganizationClassJson.do', function(data) {
|
||||
$('#tree').treeview({data: data});
|
||||
$('#tree').on('nodeSelected', function(event, data) {
|
||||
editFun(data.id);
|
||||
});
|
||||
},'json');
|
||||
$("#faultBox").html("");
|
||||
};
|
||||
$(function() {
|
||||
initTreeView();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></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">
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun('${Type_0}');"><i class="fa fa-plus">新增岗位</i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun('${Type_1}');"><i class="fa fa-plus">新增工作</i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:550px;overflow:auto; "></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" id="faultBox"></div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
238
WebRoot/jsp/administration/organizationEdit.jsp
Normal file
238
WebRoot/jsp/administration/organizationEdit.jsp
Normal file
@ -0,0 +1,238 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.activiti.ActivitiCommStr"%>
|
||||
<%request.setAttribute("AUDIT", ActivitiCommStr.Activiti_AUDIT); %>
|
||||
<%request.setAttribute("HANDLE", ActivitiCommStr.Activiti_HANDLE); %>
|
||||
<%request.setAttribute("START", ActivitiCommStr.Ativiti_START); %>
|
||||
<%request.setAttribute("FINISH", ActivitiCommStr.Activiti_FINISH); %>
|
||||
<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 masterId_process = '${organization.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'delete';//有删除权限
|
||||
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/administration/organization/update.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function dosubmit(){
|
||||
$("#processStatus").val('${HANDLE}');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath +"/administration/organization/startProcess.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else if(data.res == 2){
|
||||
showAlert('d','未检测到审核流程,请先部署审核流程!');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
classid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工作类型编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
receiveUserId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单人不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$(function(){
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
//加载人员绩效table
|
||||
//getWorkAchievements(masterId_process);
|
||||
|
||||
});
|
||||
|
||||
|
||||
//选择工作控制审核人
|
||||
var showUser4AuditSelectsFun = function() {
|
||||
var userIds= $("#auditManId").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"auditManId",textId:"auditManName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
//选择工作
|
||||
var showOrganizationClass4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/organizationClass/showList4Select.do', {formId:"subForm",hiddenId:"classid",textId:"classcode"
|
||||
,text2Id:"classname"} , function(data) {
|
||||
$("#fault4SelectDiv").html(data);
|
||||
openModal('fault4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
//初始化计划开始时间
|
||||
$('#planStartDate').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format:'yyyy-mm-dd',
|
||||
}).on('hide',function(e) {
|
||||
$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('planStartDate', 'NOT_VALIDATED',null)
|
||||
.validateField('planStartDate');
|
||||
});
|
||||
//关闭模态框时刷新表格数据
|
||||
function closeModel(){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑记录</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input id="processStatus" name="processStatus" type="hidden" value="${organization.processStatus}"/>
|
||||
|
||||
<input name="unitId" type="hidden" value="${organization.unitId}"/>
|
||||
<input id="typeid" name="typeid" type="hidden" value="${organization.typeid}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="id" name ="id" value="${organization.id}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="projectName" name ="projectName" value="${organization.projectName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作类型编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="classcode" name ="classcode" placeholder="点击选择"
|
||||
onclick="showOrganizationClass4SelectFun();" value="${organization.organizationClass.code}" readonly>
|
||||
<input id="classid" name="classid" type="hidden" value="${organization.classid}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作类型名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="classname" name ="classname" placeholder="点击选择"
|
||||
onclick="showOrganizationClass4SelectFun();" value="${organization.organizationClass.name}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工作内容</label>
|
||||
<div class="col-sm-6">
|
||||
<textarea class="form-control" rows="2" id ="projectCont" name ="projectCont" placeholder="工作内容...">${organization.projectCont}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*计划开始时间</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="planStartDate" name="planStartDate" value="${organization.planStartDate}" style="width: 132px;" autocomplete="off" placeholder="请选择开始时间" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*评价标准</label>
|
||||
<div class="col-sm-6">
|
||||
<textarea class="form-control" rows="2" id ="enclosure" name ="enclosure" placeholder="评价标准...">${organization.enclosure}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*定额工时</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="quotaHours" name ="quotaHours" value="${organization.quotaHours}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*定额费用(元)</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="quotaCost" name ="quotaCost" value="${organization.quotaCost}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*接单人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="auditManName" name="auditManName" value="${organization.receiveUser}" placeholder="点击选择" onclick="showUser4AuditSelectsFun();" >
|
||||
<input id="auditManId" name="receiveUserId" type="hidden" value="${organization.receiveUserId}"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="form-group" style="margin:8px">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
|
||||
</div>
|
||||
<div id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
<%-- <div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">参与人员绩效 </h3>
|
||||
<span style="color: #6495ED;">工单工时:</span><span style="color: #6495ED;" id="workAlltime">0</span>
|
||||
<span style="color: #6495ED;">绩效工时:</span><span style="color: #6495ED;" id="actAlltime">0</span>
|
||||
<span style="color: #6495ED;">剩余工时:</span><span style="color: #6495ED;" id="surplustime">0</span>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doAchievementAdd('${organization.id}')" class="btn btn-box-tool" data-toggle="tooltip" title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deleteAchievementFun()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_achievements" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div> --%>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" onclick="closeModel()" >关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosubmit()" id="btn_save">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
267
WebRoot/jsp/administration/organizationExecuteView.jsp
Normal file
267
WebRoot/jsp/administration/organizationExecuteView.jsp
Normal file
@ -0,0 +1,267 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem='tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance='tb_maintenance_file'; //数据表
|
||||
var nameSpace='MaintenanceProblem';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
resizeImage:true,
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:'',
|
||||
actionDelete:''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
var viewHandleDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
|
||||
//流程审核文件上传所需参数
|
||||
var masterId_process = '${param.id}';//业务Id
|
||||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||||
var status = 'view';//有查看权限
|
||||
|
||||
$(function() {
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
$("#judgemaintainerstaff").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
$("#judgeresult").rating('refresh',{showClear:false,showCaption:false,readonly:true});
|
||||
var result='${businessUnitRecords}';
|
||||
result=result.replace(new RegExp("\r\n","gm"),"");
|
||||
var json =JSON.parse(result);
|
||||
$.each(json, function(index, item) {
|
||||
if(item.id!=null &&item.id!=""){
|
||||
previews=new Array();
|
||||
$('#'+item.id).show();
|
||||
var data =item.files;
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");
|
||||
previews.push(path);
|
||||
previewConfig['width']= '30px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput(item.id);
|
||||
}
|
||||
});
|
||||
})
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
var printpage = function (myDiv){
|
||||
$('.printContent').show();
|
||||
var printHtml = document.getElementById(myDiv).innerHTML;
|
||||
var wind = window.open("", "newwin", "width=1550,height=565,top=80,left=80,toolbar=no,scrollbars=yes,menubar=no");
|
||||
/*
|
||||
var ss = ".coversheet-pageBoder{"
|
||||
+" padding: 10px;"
|
||||
+" margin-top: 10px;"
|
||||
+" border: 1px solid gray;"
|
||||
+" page-break-after: always;"
|
||||
+" border-radius: 5px;"
|
||||
+" box-shadow: 0 1px 2px 1px rgba(0,0,0,.08), 0 3px 6px rgba(0,0,0,.08);"
|
||||
+"}"
|
||||
+".noprint{display: none;}"
|
||||
+".select2-container .select2-selection--single{ "
|
||||
+" height:34px; "
|
||||
+" line-height: 34px; "
|
||||
+" }"
|
||||
+" .select2-selection__arrow{"
|
||||
+" margin-top:3px;"
|
||||
+" } "
|
||||
+" .div-row{"
|
||||
+" margin-left:3px;"
|
||||
+" margin-right:3px;"
|
||||
+" }"
|
||||
+" .div-border{"
|
||||
+" border-style:solid;"
|
||||
+" border-width:1px;"
|
||||
+" text-align:center;"
|
||||
+" }"
|
||||
+" .right-border{"
|
||||
+" border-right:none;"
|
||||
+" }"
|
||||
+" .top-right-border{"
|
||||
+" border-top:none;"
|
||||
+" border-right:none;"
|
||||
+" }"
|
||||
+" .top-border{"
|
||||
+" border-top:none;"
|
||||
+" }";
|
||||
*/
|
||||
//for Chrome Firefox Opera Safari
|
||||
//wind.document.body.innerHTML = printHtml;
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = '<%=serverPath%><%=contextPath%>/plugins/bootstrap-ext/dist/bootstrap.min.css';
|
||||
wind.document.head.appendChild(link);
|
||||
/*
|
||||
var style = document.createElement('style');
|
||||
style.type = 'text/css';
|
||||
style.rel = 'stylesheet';
|
||||
style.appendChild(document.createTextNode(ss));
|
||||
wind.document.head.appendChild(style);
|
||||
*/
|
||||
wind.document.body.innerHTML = printHtml;
|
||||
//console.log(wind.document);
|
||||
wind.print();
|
||||
wind.close();
|
||||
$('.printContent').hide();
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
<div class="modal fade" id="organizationExcuteModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">流程详情</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="padding-left:0;padding-right:0;">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise >
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;">
|
||||
<div>
|
||||
${item.record}
|
||||
</div>
|
||||
<c:if test ="${item.id!=''}">
|
||||
<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading" />
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文件附件:</label>
|
||||
</div>
|
||||
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<!-- 流程打印布局 开始 -->
|
||||
<div id="inStockExcuteDetail">
|
||||
<div class="printContent" style="display:none">
|
||||
<h4 style="text-align:center;">处理详情</h4>
|
||||
</div>
|
||||
<div class="printContent" style="display:none">
|
||||
<table style="border-collapse:collapse;margin:0 auto">
|
||||
<tr >
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">时间</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">发起人</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">任务</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">流程内容详情</td>
|
||||
</tr>
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<tr>
|
||||
<td style="border:1px solid black;width:150px;text-align: center;">${item.insdt.substring(0,16)}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.user.caption}</td>
|
||||
<td style="border:1px solid black;width:120px;text-align: center;">${item.taskName}</td>
|
||||
<td style="border:1px solid black;width:300px;">${item.record}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文件附件:</label>
|
||||
</div>
|
||||
<!-- 文件上传,显示 -->
|
||||
<div class="file-border" id="fileArea">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- 流程打印布局 结束-->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" onclick="printpage('inStockExcuteDetail');"><i class="fa fa-print"></i>打印</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user