first commit
This commit is contained in:
151
src/main/webapp/jsp/administration/index4select.jsp
Normal file
151
src/main/webapp/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
src/main/webapp/jsp/administration/indexAdd.jsp
Normal file
200
src/main/webapp/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
src/main/webapp/jsp/administration/indexClass4select.jsp
Normal file
39
src/main/webapp/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
src/main/webapp/jsp/administration/indexClassAdd.jsp
Normal file
106
src/main/webapp/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
src/main/webapp/jsp/administration/indexClassEdit.jsp
Normal file
144
src/main/webapp/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
src/main/webapp/jsp/administration/indexClassList.jsp
Normal file
91
src/main/webapp/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
src/main/webapp/jsp/administration/indexEdit.jsp
Normal file
263
src/main/webapp/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
src/main/webapp/jsp/administration/indexList.jsp
Normal file
271
src/main/webapp/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
src/main/webapp/jsp/administration/indexView.jsp
Normal file
136
src/main/webapp/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
src/main/webapp/jsp/administration/indexWorkAdd.jsp
Normal file
198
src/main/webapp/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
src/main/webapp/jsp/administration/indexWorkAudit.jsp
Normal file
315
src/main/webapp/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
src/main/webapp/jsp/administration/indexWorkEdit.jsp
Normal file
268
src/main/webapp/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
src/main/webapp/jsp/administration/indexWorkExecuteView.jsp
Normal file
267
src/main/webapp/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>
|
||||
|
||||
@ -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
src/main/webapp/jsp/administration/indexWorkHandle.jsp
Normal file
306
src/main/webapp/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
src/main/webapp/jsp/administration/indexWorkList.jsp
Normal file
429
src/main/webapp/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
src/main/webapp/jsp/administration/organizationAdd.jsp
Normal file
201
src/main/webapp/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
src/main/webapp/jsp/administration/organizationAudit.jsp
Normal file
318
src/main/webapp/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>
|
||||
@ -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
src/main/webapp/jsp/administration/organizationClassAdd.jsp
Normal file
141
src/main/webapp/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
src/main/webapp/jsp/administration/organizationClassEdit.jsp
Normal file
184
src/main/webapp/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
src/main/webapp/jsp/administration/organizationClassList.jsp
Normal file
100
src/main/webapp/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
src/main/webapp/jsp/administration/organizationEdit.jsp
Normal file
238
src/main/webapp/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
src/main/webapp/jsp/administration/organizationExecuteView.jsp
Normal file
267
src/main/webapp/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>
|
||||
|
||||
@ -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>
|
||||
|
||||
315
src/main/webapp/jsp/administration/organizationHandle.jsp
Normal file
315
src/main/webapp/jsp/administration/organizationHandle.jsp
Normal file
@ -0,0 +1,315 @@
|
||||
<%@ 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(){
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
$("#subUnitForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid() && $("#subUnitForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/administration/organization/update.do", $("#subForm").serialize(), function(data) {
|
||||
var routeNum = $("#routeNum").val();
|
||||
if (data.res == 1){
|
||||
$.post(ext.contextPath + "/administration/organization/submitOrganizationHandle.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');
|
||||
}
|
||||
}
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
classid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工作类型编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
receiveUserId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单人不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$(function(){
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
//初始化选择框,方法在workflow.js里
|
||||
processSelectNodeForHandle("${businessUnitHandle.taskid}");
|
||||
//显示流程详情
|
||||
var id = '${organization.id}';
|
||||
$.post(ext.contextPath + '/administration/organization/showProcessOrganizationView.do', {id:id,inModal:'inModal'} , function(data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
//加载人员绩效table
|
||||
//getWorkAchievements(masterId_process);
|
||||
|
||||
});
|
||||
|
||||
//选择审核人
|
||||
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");
|
||||
});
|
||||
};
|
||||
|
||||
//选择工作
|
||||
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">编辑记录</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="${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-3 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-3 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-3 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-3 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-3 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-3 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: 150px;" autocomplete="off" placeholder="请选择开始时间" readonly>
|
||||
</div>
|
||||
</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 ="enclosure" name ="enclosure" placeholder="评价标准..." readonly>${organization.enclosure}</textarea>
|
||||
</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" id="quotaHours" name ="quotaHours" value="${organization.quotaHours}" readonly>
|
||||
</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" id="quotaCost" name ="quotaCost" value="${organization.quotaCost}" readonly>
|
||||
</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" id="actualCost" name ="actualCost" value="${organization.actualCost}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 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: 150px;" autocomplete="off" placeholder="请选择时间" readonly>
|
||||
</div>
|
||||
</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-3 control-label">说明:</label>
|
||||
<div class="col-sm-9">
|
||||
<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-3 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-3 control-label">提交至:</label>
|
||||
<div class="col-sm-9">
|
||||
<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-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 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" 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>
|
||||
455
src/main/webapp/jsp/administration/organizationList.jsp
Normal file
455
src/main/webapp/jsp/administration/organizationList.jsp
Normal file
@ -0,0 +1,455 @@
|
||||
<%@ 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 () {
|
||||
companyId = unitId;
|
||||
$("#searchForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#searchForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + '/administration/organization/add.do', {
|
||||
companyId: companyId,
|
||||
typeid: '${param.typeid}'
|
||||
}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
var editFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/administration/organization/edit.do', { id: id }, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var viewFun = function (id) {
|
||||
$.post(ext.contextPath + '/administration/organization/view.do', { id: id }, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var organizationProcessFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/administration/organization/showProcessOrganizationView.do', { id: id }, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('organizationExcuteModal');
|
||||
});
|
||||
};
|
||||
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/organization/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/organization/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 () {
|
||||
companyId = unitId;
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/administration/organization/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,
|
||||
typeid: '${param.typeid}',
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
},
|
||||
//detailView: true,//父子表
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
}, {
|
||||
field: 'id', // 返回json数据中的name
|
||||
title: '工单号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'organizationClass.code', // 返回json数据中的name
|
||||
title: '工作类型编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'organizationClass.name', // 返回json数据中的name
|
||||
title: '工作类型名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'planStartDate', // 返回json数据中的name
|
||||
title: '计划开始时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'projectName', // 返回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/organization/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/organization/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="organizationProcessFun(\'' + 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;">
|
||||
<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>
|
||||
</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/organization/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>
|
||||
169
src/main/webapp/jsp/administration/temporaryAdd.jsp
Normal file
169
src/main/webapp/jsp/administration/temporaryAdd.jsp
Normal file
@ -0,0 +1,169 @@
|
||||
|
||||
<%@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/temporary/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: {
|
||||
projectName: {
|
||||
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 showIndex4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/temporaryClass/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}">
|
||||
<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">
|
||||
<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">
|
||||
<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>
|
||||
273
src/main/webapp/jsp/administration/temporaryAudit.jsp
Normal file
273
src/main/webapp/jsp/administration/temporaryAudit.jsp
Normal file
@ -0,0 +1,273 @@
|
||||
<%@ 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 = '${temporary.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/temporary/AuditTemporary.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: {
|
||||
projectName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工作名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
receiveUserId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单人不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$(function(){
|
||||
//初始化文件显示
|
||||
getFileList_process();
|
||||
//初始化选择框,方法在workflow.js里
|
||||
processSelectNode("${businessUnitAudit.taskid}");
|
||||
|
||||
//加载人员绩效table
|
||||
getWorkAchievements(masterId_process);
|
||||
|
||||
//显示流程详情
|
||||
var id = '${temporary.id}';
|
||||
$.post(ext.contextPath + '/administration/temporary/showProcessTemporaryView.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 showIndex4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/temporaryClass/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="${temporary.processStatus}"/>
|
||||
|
||||
<input name="unitId" type="hidden" value="${temporary.unitId}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单号</label>
|
||||
<div class="col-sm-6">${temporary.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="${temporary.projectName}"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>${temporary.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="${temporary.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">
|
||||
<input type="text" class="form-control" id="workingHours" name ="workingHours" value="${temporary.workingHours}"readonly>
|
||||
</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="${temporary.finishDate}" style="width: 132px;" autocomplete="off" placeholder="请选择开始时间" readonly>
|
||||
</div>
|
||||
</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('${temporary.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>
|
||||
204
src/main/webapp/jsp/administration/temporaryEdit.jsp
Normal file
204
src/main/webapp/jsp/administration/temporaryEdit.jsp
Normal file
@ -0,0 +1,204 @@
|
||||
<%@ 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 = '${temporary.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/temporary/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/temporary/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: {
|
||||
projectName: {
|
||||
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 showIndex4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/temporaryClass/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="${temporary.processStatus}"/>
|
||||
|
||||
<input name="unitId" type="hidden" value="${temporary.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="id" name ="id" value="${temporary.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="${temporary.projectName}">
|
||||
</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="任务内容...">${temporary.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="${temporary.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">
|
||||
<input type="text" class="form-control" id="auditManName" name="auditManName" value="${temporary.receiveUser}" placeholder="点击选择" onclick="showUser4AuditSelectsFun();" >
|
||||
<input id="auditManId" name="receiveUserId" type="hidden" value="${temporary.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('${temporary.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
src/main/webapp/jsp/administration/temporaryExecuteView.jsp
Normal file
267
src/main/webapp/jsp/administration/temporaryExecuteView.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="temporaryExcuteModal">
|
||||
<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>
|
||||
|
||||
@ -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>
|
||||
|
||||
279
src/main/webapp/jsp/administration/temporaryHandle.jsp
Normal file
279
src/main/webapp/jsp/administration/temporaryHandle.jsp
Normal file
@ -0,0 +1,279 @@
|
||||
<%@ 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 = '${temporary.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/temporary/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/temporary/update.do", $("#subForm").serialize(), function(data) {
|
||||
var routeNum = $("#routeNum").val();
|
||||
if (data.res == 1){
|
||||
$.post(ext.contextPath + "/administration/temporary/submitTemporaryHandle.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');
|
||||
}
|
||||
}
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
|
||||
projectName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工作名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
receiveUserId: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单人不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
$(function(){ //初始化文件显示
|
||||
getFileList_process();
|
||||
//初始化选择框,方法在workflow.js里
|
||||
processSelectNodeForHandle("${businessUnitHandle.taskid}");
|
||||
//显示流程详情
|
||||
var id = '${temporary.id}';
|
||||
$.post(ext.contextPath + '/administration/temporary/showProcessTemporaryView.do', {id:id,inModal:'inModal'} , function(data) {
|
||||
$("#showView").html(data);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
//选择审核人
|
||||
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");
|
||||
});
|
||||
};
|
||||
//选择工作
|
||||
var showIndex4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/administration/temporaryClass/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">编辑记录</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="${temporary.processStatus}"/>
|
||||
|
||||
<input name="unitId" type="hidden" value="${temporary.unitId}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*工单号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="id" name ="id" value="${temporary.id}"readonly>
|
||||
</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" id="projectName" name ="projectName" value="${temporary.projectName}"readonly>
|
||||
</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 ="projectCont" name ="projectCont" placeholder="任务内容..."readonly>${temporary.projectCont}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 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="${temporary.planStartDate}" style="width: 150px;" autocomplete="off" placeholder="请选择开始时间" readonly>
|
||||
</div>
|
||||
</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" id="workingHours" name ="workingHours" value="${temporary.workingHours}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 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="${temporary.finishDate}" style="width: 150px;" autocomplete="off" placeholder="请选择开始时间" readonly>
|
||||
</div>
|
||||
</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-3 control-label">说明:</label>
|
||||
<div class="col-sm-9">
|
||||
<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-3 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-3 control-label">提交至:</label>
|
||||
<div class="col-sm-9">
|
||||
<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-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 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('${temporary.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_save">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
446
src/main/webapp/jsp/administration/temporaryList.jsp
Normal file
446
src/main/webapp/jsp/administration/temporaryList.jsp
Normal file
@ -0,0 +1,446 @@
|
||||
<%@ 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 () {
|
||||
companyId = unitId;
|
||||
$("#searchForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#searchForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + '/administration/temporary/add.do', { companyId: companyId }, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var editFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/administration/temporary/edit.do', { id: id }, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var viewFun = function (id) {
|
||||
$.post(ext.contextPath + '/administration/temporary/view.do', { id: id }, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var temporaryProcessFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/administration/temporary/showProcessTemporaryView.do', { id: id }, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('temporaryExcuteModal');
|
||||
});
|
||||
};
|
||||
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/temporary/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/temporary/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 () {
|
||||
companyId = unitId;
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/administration/temporary/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: 'id', // 返回json数据中的name
|
||||
title: '工单号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'planStartDate', // 返回json数据中的name
|
||||
title: '发单时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'receiveUser', // 返回json数据中的name
|
||||
title: '接单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'receiveDt', // 返回json数据中的name
|
||||
title: '接单时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'projectName', // 返回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/temporary/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/temporary/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="temporaryProcessFun(\'' + 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;">
|
||||
<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>
|
||||
</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/temporary/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>
|
||||
Reference in New Issue
Block a user