308 lines
16 KiB
Plaintext
308 lines
16 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8" %>
|
||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||
<%@page import="com.sipai.entity.process.LibraryRoutineWork" %>
|
||
<% request.setAttribute("Frequency_Type_Day", LibraryRoutineWork.Frequency_Type_Day); %>
|
||
<% request.setAttribute("Frequency_Type_Month", LibraryRoutineWork.Frequency_Type_Month); %>
|
||
<% request.setAttribute("Frequency_Type_Year", LibraryRoutineWork.Frequency_Type_Year); %>
|
||
<% request.setAttribute("Type_Run", LibraryRoutineWork.Type_Run); %>
|
||
<% request.setAttribute("Type_Manage", LibraryRoutineWork.Type_Manage); %>
|
||
|
||
<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 = '${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 + "/process/routineWork/doHandleProcess.do", $("#subForm").serialize(), function (data) {
|
||
if (data.res == 1) {
|
||
closeModal('subModalHandle')
|
||
$("#table").bootstrapTable('refresh');
|
||
} else if (data.res == 0) {
|
||
showAlert('d', '操作执行失败,请重试');
|
||
} else {
|
||
showAlert('d', data.res);
|
||
}
|
||
}, 'json');
|
||
}
|
||
}
|
||
|
||
var showUser4SelectsFun = function () {
|
||
var userIds = $("#targetusers").val();
|
||
var jobIds = $("#targetjobs").val();
|
||
$.post(ext.contextPath + '/user/userForSelectByCompany.do', {
|
||
formId: "subForm",
|
||
hiddenId: "targetusers",
|
||
textId: "targetUsersName",
|
||
userIds: userIds,
|
||
jobIds: jobIds
|
||
}, function (data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal("user4SelectModal");
|
||
});
|
||
};
|
||
$(function () {
|
||
//初始化文件显示
|
||
getFileList_process();
|
||
//初始化选择框,方法在workflow.js里
|
||
processSelectNodeForHandle("${businessUnitHandle.taskid}");
|
||
//输入框验证
|
||
$("#subForm").bootstrapValidator({
|
||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||
fields: {
|
||
targetUsersName: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '提交人员不能为空'
|
||
}
|
||
}
|
||
},
|
||
}
|
||
});
|
||
|
||
//显示流程详情
|
||
var id = '${entity.id}';
|
||
$.post(ext.contextPath + '/process/routineWork/showProcessView.do', {
|
||
id: id,
|
||
inModal: 'inModal'
|
||
}, function (data) {
|
||
$("#showView").html(data);
|
||
});
|
||
|
||
//加载资料列表
|
||
getContentForFile();
|
||
})
|
||
|
||
function getContentForFile() {
|
||
$("#table_contentFile").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/process/routineWork/getListForFile.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 {
|
||
pid: '${entity.id}'
|
||
}
|
||
},
|
||
// sortName: 'id', // 要排序的字段
|
||
// sortOrder: 'desc', // 排序规则
|
||
columns: [
|
||
{
|
||
field: 'filename', // 返回json数据中的name
|
||
title: '档案名称', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle'
|
||
},
|
||
{
|
||
field: 'upuser', // 返回json数据中的name
|
||
title: '上传人', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle'
|
||
},
|
||
{
|
||
title: "操作",
|
||
align: 'center',
|
||
valign: 'middle',
|
||
width: '80',
|
||
formatter: function (value, row, index) {
|
||
var buts = '';
|
||
buts += '<button class="btn btn-default btn-sm" title="下载" onclick="fileDownload(\'' + row.docId + '\')"><i class="fa fa-download"></i><span class="hidden-md hidden-lg">下载</span></button>';
|
||
// buts += '<button class="btn btn-default btn-sm" title="删除" onclick="delRelation(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button>';
|
||
buts = '<div class = "btn-group">' + buts + '</div>';
|
||
return buts;
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function () { //加载成功时执行
|
||
adjustBootstrapTableView("table_contentFile");
|
||
},
|
||
onLoadError: function () { //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
});
|
||
}
|
||
|
||
//下载文件
|
||
var fileDownload = function (id) {
|
||
window.open(ext.contextPath + "/base/downloadFile.do?key=" + id + "&tbName=tb_doc_file");
|
||
};
|
||
|
||
</script>
|
||
<div class="modal fade" id="subModalHandle">
|
||
<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.libraryRoutineWork.pworkTypeName}</p>
|
||
</div>
|
||
<label class="col-sm-2 control-label">岗位类型</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.libraryRoutineWork.ppositionType}</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">工作编号</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.libraryRoutineWork.workCode}</p>
|
||
</div>
|
||
<label class="col-sm-2 control-label">工作名称</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.libraryRoutineWork.workName}</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">工作内容</label>
|
||
<div class="col-sm-10">
|
||
<p class="form-control-static">${entity.libraryRoutineWork.workContent}</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">评价标准及文件</label>
|
||
<div class="col-sm-10">
|
||
<p class="form-control-static">${entity.libraryRoutineWork.evaluationCriterion}</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">定额工时(小时)</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.libraryRoutineWork.baseHours}</p>
|
||
</div>
|
||
<label class="col-sm-2 control-label">定额费用(元)</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.libraryRoutineWork.baseCost}</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">是否可抢单</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${entity.libraryRoutineWork.robWorkorder}</p>
|
||
</div>
|
||
<label class="col-sm-2 control-label">类型</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">
|
||
<c:if test="${entity.libraryRoutineWork.type == Type_Run}">
|
||
运行
|
||
</c:if>
|
||
<c:if test="${entity.libraryRoutineWork.type == Type_Manage}">
|
||
行政
|
||
</c:if>
|
||
</p>
|
||
</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="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 class="box box-primary">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">相关资料</h3>
|
||
</div>
|
||
<div class="box-body ">
|
||
<table id="table_contentFile" style="table-layout:fixed;"></table>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="fileArea">
|
||
</div>
|
||
|
||
</form>
|
||
</div>
|
||
|
||
<div class="col-md-5 col-xs-12" id="showView"></div>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||
<button type="button" class="btn btn-primary" onclick="doSubmit()" id="btn_update">提交</button>
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div> |