325 lines
16 KiB
Plaintext
325 lines
16 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8" %>
|
||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||
<% request.setAttribute("Status_Issue", com.sipai.entity.timeefficiency.PatrolRecord.Status_Issue); %>
|
||
<% request.setAttribute("Status_Start", com.sipai.entity.timeefficiency.PatrolRecord.Status_Start); %>
|
||
<% request.setAttribute("Status_Finish", com.sipai.entity.timeefficiency.PatrolRecord.Status_Finish); %>
|
||
<% request.setAttribute("Status_PartFinish", com.sipai.entity.timeefficiency.PatrolRecord.Status_PartFinish); %>
|
||
<% request.setAttribute("Status_Undo", com.sipai.entity.timeefficiency.PatrolRecord.Status_Undo); %>
|
||
<%String contextPath = request.getContextPath();%>
|
||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||
|
||
<style type="text/css">
|
||
.select2-container .select2-selection--single {
|
||
height: 34px;
|
||
line-height: 34px;
|
||
}
|
||
|
||
.select2-selection__arrow {
|
||
margin-top: 3px;
|
||
}
|
||
.fixed-table-body {
|
||
overflow-x: auto;
|
||
overflow-y: auto;
|
||
height: auto;
|
||
}
|
||
</style>
|
||
<script type="text/javascript">
|
||
|
||
//流程审核文件上传所需参数
|
||
var masterId_process = '${scrapApply.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 + "/timeEfficiency/patrolRecord/handleProcess.do", $("#subForm").serialize(), function (data) {
|
||
if (data.res == 1) {
|
||
closeModal('subModalPatrol')
|
||
// $("#table2").bootstrapTable('refresh');
|
||
$("#table").bootstrapTable('refresh');
|
||
} else if (data.res == 0) {
|
||
showAlert('d', '操作执行失败,请重试');
|
||
} else {
|
||
showAlert('d', data.res);
|
||
}
|
||
}, 'json');
|
||
}
|
||
}
|
||
|
||
var showUser4SelectsFun = function () {
|
||
var userIds = $("#targetusers").val();
|
||
var jobIds = $("#targetjobs").val();
|
||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {
|
||
formId: "subForm",
|
||
hiddenId: "targetusers",
|
||
textId: "targetUsersName",
|
||
userIds: userIds,
|
||
jobIds: jobIds
|
||
}, function (data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal("user4SelectModal");
|
||
});
|
||
};
|
||
|
||
//$(function () {
|
||
//初始化选择框,方法在workflow.js里
|
||
processSelectNodeForHandle("${businessUnitHandle.taskid}");
|
||
//输入框验证
|
||
$("#subForm").bootstrapValidator({
|
||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||
fields: {
|
||
targetUsersName: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '提交人员不能为空'
|
||
}
|
||
}
|
||
},
|
||
}
|
||
});
|
||
|
||
//显示流程详情
|
||
var id = '${entity.id}';
|
||
$.post(ext.contextPath + '/timeEfficiency/patrolRecord/showProcessView.do', {
|
||
id: id,
|
||
inModal: 'inModal'
|
||
}, function (data) {
|
||
$("#showViewprtc").html(data);
|
||
});
|
||
|
||
$("#table_patrolPoint").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/timeEfficiency/patrolPoint/getPatrolPointForRecord.do', // 获取表格数据的url
|
||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||
striped: true, //表格显示条纹,默认为false
|
||
pagination: true, // 在表格底部显示分页组件,默认false
|
||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||
pageSize: 10, // 页面数据条数
|
||
pageNumber: 1, // 首页页码
|
||
sidePagination: 'client', // 设置为服务器端分页
|
||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||
return {
|
||
rows: params.limit, // 每页要显示的数据条数
|
||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||
sort: params.sort, // 要排序的字段
|
||
order: params.order,
|
||
patrolRecordId: '${entity.id}'
|
||
}
|
||
},
|
||
responseHandler: function (res) {
|
||
return res.result
|
||
},
|
||
sortName: 'id', // 要排序的字段
|
||
sortOrder: 'desc', // 排序规则
|
||
columns: [
|
||
{
|
||
field: 'name', // 返回json数据中的name
|
||
title: '巡检点名称', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: '26%',
|
||
formatter: function (value, row, index) {
|
||
if (row.patrolPoint != null && row.patrolPoint != '') {
|
||
return row.patrolPoint.name;
|
||
}
|
||
}
|
||
},
|
||
{
|
||
field: 'finishNumContent', // 返回json数据中的name
|
||
title: '巡检内容', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: '10%',
|
||
formatter: function (value, row, index) {
|
||
return row.finishNumContent + "/" + row.allNumContent;
|
||
}
|
||
},
|
||
{
|
||
field: 'finishNumMeasurePoint', // 返回json数据中的name
|
||
title: '填报内容', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: '10%',
|
||
formatter: function (value, row, index) {
|
||
return row.finishNumMeasurePoint + "/" + row.allNumMeasurePoint;
|
||
}
|
||
},
|
||
{
|
||
field: 'abnormityNum', // 返回json数据中的name
|
||
title: '异常数量', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: '8%',
|
||
formatter: function (value, row, index) {
|
||
if (row.abnormityNum != null && row.abnormityNum != '' && row.abnormityNum > 0) {
|
||
return '<span style="color:#c12e2a">' + row.abnormityNum + '</span>';
|
||
}
|
||
}
|
||
},
|
||
{
|
||
field: 'caption', // 返回json数据中的name
|
||
title: '打卡人员', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: '10%',
|
||
formatter: function (value, row, index) {
|
||
if (row.worker != null) {
|
||
return row.worker.caption;
|
||
}
|
||
}
|
||
},
|
||
{
|
||
field: 'finishdt', // 返回json数据中的name
|
||
title: '完成时间', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: '18%',
|
||
formatter: function (value, row, index) {
|
||
return value.substring(0, 19);
|
||
}
|
||
},
|
||
{
|
||
field: 'status', // 返回json数据中的name
|
||
title: '状态', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: '10%',
|
||
formatter: function (value, row, index) {
|
||
var str = "";
|
||
if ("${Status_Issue}" == value) {
|
||
// str = '<span style="color:#c12e2a;"><i class="fa fa-times-circle-o" aria-hidden="true"></i> 已下发</span>';
|
||
str = '<span style="color:#c12e2a;"><i class="fa fa-close" aria-hidden="true"></i>未打卡</span>';
|
||
}
|
||
if ("${Status_Finish}" == value) {
|
||
// str = '<span style="color:#3e8f3e"><i class="fa fa-check-circle-o" aria-hidden="true"></i> 已完成</span>';
|
||
str = '<span style="color:#3e8f3e"><i class="fa fa-check" aria-hidden="true"></i>已打卡</span>';
|
||
}
|
||
return str;
|
||
}
|
||
},
|
||
{
|
||
title: "操作",
|
||
align: 'center',
|
||
valign: 'middle',
|
||
width: '8%', // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
var buts = '';
|
||
if (row.patrolPoint != null && row.patrolPoint != '') {
|
||
buts += '<button class="btn btn-default btn-sm" onclick="viewContentsFun(\'' + row.patrolRecordId + '\',\'' + row.patrolPoint.id + '\',\'' + row.patrolPoint.unitId + '\')" data-toggle="tooltip" title="查看"><i class="fa fa-eye "></i><span class="hidden-md hidden-lg"> 查看</span></button>';
|
||
} else {
|
||
buts += '<button class="btn btn-default btn-sm" onclick="viewContentsFun(\'' + row.patrolRecordId + '\',\'' + '' + '\',\'' + '' + '\')" data-toggle="tooltip" title="查看"><i class="fa fa-eye "></i><span class="hidden-md hidden-lg"> 查看</span></button>';
|
||
}
|
||
buts = '<div class = "btn-group">' + buts + '</div>';
|
||
return buts;
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function () { //加载成功时执行
|
||
adjustBootstrapTableView("table_patrolPoint");
|
||
},
|
||
onLoadError: function () { //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
})
|
||
|
||
</script>
|
||
<div class="modal fade" id="subModalPatrol">
|
||
<div class="modal-dialog modal-xlg">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||
<span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title">巡检审核(${taskName})</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="row">
|
||
<div class="col-md-7 col-xs-12">
|
||
<!-- 新增界面formid强制为subForm -->
|
||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||
<!-- 界面提醒div强制id为alertDiv -->
|
||
<div id="alertDiv"></div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">巡检任务</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.name}</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">备注</label>
|
||
<div class="col-sm-10">
|
||
<input class="form-control-static" value="$${entity.workResult}"></input>
|
||
</div>
|
||
</div>
|
||
|
||
<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=unitid value="${param.unitId}">
|
||
<input type="hidden" class="form-control" name="taskdefinitionkey"
|
||
value="${businessUnitHandle.taskdefinitionkey}">
|
||
|
||
<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>
|
||
</form>
|
||
|
||
<div class="box box-primary">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">巡检情况</h3>
|
||
|
||
<!-- <div class="box-tools pull-right">
|
||
<a onclick="doEditPatrolPoint()" class="btn btn-box-tool" data-toggle="tooltip" title="编辑"><i class="glyphicon glyphicon-edit"></i></a>
|
||
</div> -->
|
||
</div>
|
||
|
||
<div class="box-body ">
|
||
<table id="table_patrolPoint"></table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-md-5 col-xs-12" id="showViewprtc"></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="doSubmit()" id="btn_update">提交</button>
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div> |