Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/process/processAdjustment_processView_alone.jsp

261 lines
11 KiB
Plaintext
Raw Normal View History

2026-01-16 14:13:44 +08:00
<%@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="processViewModal">
<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">&times;</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>
</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>