2025-11-27 16:55:35 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<title>回执单附件查看</title>
|
|
|
|
|
<link rel="stylesheet" type="text/css" media="screen" href="../../layui/css/layui.css">
|
|
|
|
|
<link rel="stylesheet" type="text/css" media="screen" href="../../css/viewer.min.css">
|
|
|
|
|
<script type="text/javascript" src="../../js/libs/jquery-3.6.0.js"></script>
|
|
|
|
|
<script type="text/javascript" src="../../layui/layui.js"></script>
|
2025-12-09 18:44:29 +08:00
|
|
|
<script type="text/javascript" src="../../../public/public.js"></script>
|
2025-11-27 16:55:35 +08:00
|
|
|
<script type="text/javascript" src="../../js/publicJs.js"></script>
|
|
|
|
|
<script type="text/javascript" src="../../js/jq.js"></script>
|
|
|
|
|
<script type="text/javascript" src="../../js/filePreview.js"></script>
|
|
|
|
|
<script type="text/javascript" src="../../js/viewer/viewer.min.js"></script>
|
|
|
|
|
<script type="text/javascript" src="../../js/commonUtils.js"></script>
|
|
|
|
|
<style>
|
|
|
|
|
body, html {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
float: left;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#dataDiv {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 95%;
|
|
|
|
|
float: left;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ulDiv {
|
|
|
|
|
width: 98%;
|
|
|
|
|
height: 84%;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 50px;
|
|
|
|
|
left: 22px;
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
overflow-y: scroll;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#dowebok {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 99%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.disPhotoLi {
|
|
|
|
|
/*width: 17.6%;*/
|
|
|
|
|
/*height: 30.6% !important;*/
|
|
|
|
|
width: 165px;
|
|
|
|
|
height: 200px;
|
|
|
|
|
float: left;
|
|
|
|
|
margin: 1%;
|
|
|
|
|
border: 1px solid #e8eceb;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.img {
|
|
|
|
|
/*width: 100%;*/
|
|
|
|
|
/*height: 100%;*/
|
|
|
|
|
width: 160px;
|
|
|
|
|
height: 160px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.disPhotoP1 {
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
margin-top: 4%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.disPhotoP2 {
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
margin-top: 4%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.disPhotoP3 {
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
margin-top: 2%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.disPhotoP4 {
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
margin-top: 4%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* chrome下的滚动条样式 */
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
|
width: 15px;
|
|
|
|
|
height: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 滚动槽 */
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar-track {
|
|
|
|
|
-webkit-box-shadow: inset 0 0 5px white;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 滚动条滑块 */
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
background: white;
|
|
|
|
|
-webkit-box-shadow: inset 0 0 6px white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb:window-inactive {
|
|
|
|
|
background: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar-corner {
|
|
|
|
|
background-color: white;
|
|
|
|
|
/ / 颜色
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.layui-laydate-content thead tr {
|
|
|
|
|
background: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div id="dataDiv">
|
|
|
|
|
<div id="ulDiv">
|
|
|
|
|
<ul id="dowebok">
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
var filePaths = localStorage.getItem("filePaths");
|
|
|
|
|
var layer;
|
|
|
|
|
$(function () {
|
|
|
|
|
var filePath;
|
|
|
|
|
if (!!filePaths) {
|
|
|
|
|
filePath = filePaths.split(","); //字符分割
|
|
|
|
|
}
|
|
|
|
|
getDisPhotoList(filePath);
|
|
|
|
|
layui.use(['form', 'laydate', 'layer', 'upload'], function () {
|
|
|
|
|
var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
|
|
|
|
layer = layui.layer;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 加载pdf
|
|
|
|
|
function getDisPhotoList(filePath) {
|
|
|
|
|
$("#dowebok").empty();
|
|
|
|
|
if (filePath != null && filePath.length > 0) {
|
|
|
|
|
var html = "";
|
|
|
|
|
var type = 0;
|
|
|
|
|
for (var i = 0; i < filePath.length; i++) {
|
|
|
|
|
var path = '';
|
|
|
|
|
var viewPath = '';
|
|
|
|
|
if (filePath[i].indexOf("http") != -1) {
|
|
|
|
|
path = filePath[i];
|
|
|
|
|
} else {
|
|
|
|
|
path = "/" + filePath[i];
|
|
|
|
|
}
|
|
|
|
|
//是否包含pdf
|
|
|
|
|
if(~path.indexOf(".pdf")){
|
|
|
|
|
viewPath = "../../img/fileIcon/pdf.png";
|
|
|
|
|
type = 1;
|
|
|
|
|
}else if(~path.indexOf(".xlsx") || ~path.indexOf(".xls")){
|
|
|
|
|
viewPath = "../../img/fileIcon/excel.png";
|
|
|
|
|
type = 2;
|
|
|
|
|
}else if(~path.indexOf(".docx") || ~path.indexOf(".doc")){
|
|
|
|
|
viewPath = "../../img/fileIcon/docx.png";
|
|
|
|
|
type = 3;
|
|
|
|
|
}else{
|
2025-12-09 18:44:29 +08:00
|
|
|
viewPath = smz_ht_url +path;
|
2025-11-27 16:55:35 +08:00
|
|
|
}
|
|
|
|
|
html += "<li class='disPhotoLi'>";
|
|
|
|
|
html += '<img src="' + viewPath + '" onclick="yulan(\''+path+'\',\''+type+'\')" class="img" />';
|
|
|
|
|
html += " </li>";
|
|
|
|
|
}
|
|
|
|
|
$("#dowebok").append(html);
|
|
|
|
|
} else {
|
|
|
|
|
let html = "<li style='color:black;float: left;border: none; font-size: 20px;height: 20%;position: absolute;\n" + "left: 315px;\n" + "top: 170px;'>没有相关数据</li>";
|
|
|
|
|
$("#dowebok").append(html);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//文件预览
|
|
|
|
|
function yulan(path,type) {
|
|
|
|
|
localStorage.setItem("idNumber", "");
|
|
|
|
|
localStorage.setItem("url", path);
|
|
|
|
|
localStorage.setItem("downloadFileName", "回执单附件预览");
|
|
|
|
|
let height = getDefaultHeight().toFixed(0) + 'px';
|
|
|
|
|
let width = getDefaultWidth().toFixed(0) + 'px';
|
|
|
|
|
parent.layer.open({
|
|
|
|
|
title: false,
|
|
|
|
|
type: 2,
|
|
|
|
|
content: '../wagesManage/zwagesView.html',
|
|
|
|
|
area: [width, height],
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
</html>
|