|
@@ -112,9 +112,9 @@
|
|
|
type : 'date'
|
|
|
, trigger: 'click'
|
|
|
});
|
|
|
- $("#attachment_btn").click(function () {
|
|
|
+ /*$("#attachment_btn").click(function () {
|
|
|
$("#attachment_file").click();
|
|
|
- });
|
|
|
+ });*/
|
|
|
|
|
|
$("#attachment_btn_InvoiceReimbursement").click(function () {
|
|
|
$("#attachment_InvoiceReimbursement_file").click();
|
|
@@ -591,7 +591,7 @@
|
|
|
});
|
|
|
|
|
|
}
|
|
|
- function insertTitle(tValue){
|
|
|
+ /*function insertTitle(tValue){
|
|
|
var list = "${workReimbursement.workAttachments}";
|
|
|
var size = (list.split('url')).length-1;
|
|
|
var files = $("#attachment_file")[0].files; for(var i = 0;i<files.length;i++) { var file = files[i];
|
|
@@ -601,11 +601,11 @@
|
|
|
var timestamp=new Date().getTime();
|
|
|
|
|
|
var storeAs = "wrkReimbursement";
|
|
|
- var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
|
|
|
+ var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/!*将这段字符串存到数据库即可*!/
|
|
|
var divId = "_attachment";
|
|
|
$("#addFile"+divId).show();
|
|
|
multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
async function insertTitleInvoiceReimbursement(tValue) {
|
|
|
var id = "${workReimbursement.id}";
|
|
@@ -2144,147 +2144,22 @@
|
|
|
</div>
|
|
|
</div>--%>
|
|
|
|
|
|
- <div class="form-group layui-row">
|
|
|
- <div class="form-group-label"><h2>附件信息</h2></div>
|
|
|
- <div class="layui-item nav-btns">
|
|
|
- <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
|
|
|
- <sys:collectSelect id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
|
|
|
- name="linkman.id" title="选择资料库"
|
|
|
- cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
|
|
|
- searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
|
|
|
- </div>
|
|
|
- <div id="addFile_attachment" style="display: none" class="upload-progress">
|
|
|
- <span id="fileName_attachment" ></span>
|
|
|
- <b><span id="baifenbi_attachment" ></span></b>
|
|
|
- <div class="progress">
|
|
|
- <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
|
|
|
- <span id="attachment_title"></span>
|
|
|
- <div class="layui-item layui-col-xs12" style="padding:0 16px;">
|
|
|
- <table id="upTable" class="table table-bordered table-condensed details">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <%-- <th>序号</th>--%>
|
|
|
- <th>文件预览</th>
|
|
|
- <th>上传人</th>
|
|
|
- <th>上传时间</th>
|
|
|
- <th width="200px">操作</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="file_attachment">
|
|
|
- <c:forEach items="${workReimbursement.workAttachments}" var = "workClientAttachment" varStatus="status">
|
|
|
- <tr>
|
|
|
- <%-- <td>${status.index + 1}</td>--%>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${workReimbursement.uploadMode == 2}">
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
|
|
|
- <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
- <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
- <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
|
|
|
- <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
- <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
|
|
|
- or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
|
|
|
- <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
|
|
|
- <td>${workClientAttachment.createBy.name}</td>
|
|
|
- <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
|
|
|
- <td class="op-td">
|
|
|
- <div class="op-btn-box" >
|
|
|
- <%--附件下载删除--%>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${workReimbursement.uploadMode == 2}">
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
- <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'xml')}">
|
|
|
- <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
|
|
|
- <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
|
|
|
- <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>
|
|
|
- </c:if>
|
|
|
- <c:if test="${workClientAttachment.collectFlag != 1}">
|
|
|
- <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i> 收藏</a>
|
|
|
- </c:if>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </c:forEach>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <!-- fileHandlerFuncName="myCustomHandler" 自定义函数名 -->
|
|
|
+ <!-- attachmentFlag="6" 附件标识 -->
|
|
|
+ <!-- storeAs="wrkReimbursement" 存储路径标识 -->
|
|
|
+ <!-- showOperateArea="false" 是否展示新增按钮,默认true -->
|
|
|
+ <table:attachmentManager
|
|
|
+ title="附件信息"
|
|
|
+ addBtnText="添加附件"
|
|
|
+ baseId="attachment"
|
|
|
+ attachments="${workReimbursement.workAttachments}"
|
|
|
+ fileHandlerFuncName="insertTitle"
|
|
|
+ attachmentFlag="6"
|
|
|
+ storeAs="wrkReimbursement"
|
|
|
+ />
|
|
|
+
|
|
|
|
|
|
<div class="form-group layui-row">
|
|
|
<div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>
|