浏览代码

合同支付,附件,预览

MaiXinRong 2 周之前
父节点
当前提交
ff9c661579
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 3 2
      app/public/js/stage_pay.js
  2. 1 1
      app/view/stage/pay_modal.ejs

+ 3 - 2
app/public/js/stage_pay.js

@@ -35,11 +35,12 @@ function makeAttTable(payNode) {
     if (attachment !== null) {
         for (const att of attachment) {
             const delhtml = uploadPermission && parseInt(att.uid) === userID && (att.renew || stage.status !== auditConst.status.checked || deleteFilePermission)
-                ? '<a class="delete-att text-danger" href="javascript:void(0);" data-fileid="'+ att.id +'" title="删除"><i class="fa fa-remove "></i></a>'
+                ? '<a class="delete-att text-danger ml-1" href="javascript:void(0);" data-fileid="'+ att.id +'" title="删除"><i class="fa fa-remove "></i></a>'
                 : '';
+            const viewHtml = att.viewpath ? `<a class="ml-1" href="${att.viewpath}" target="_blank" title="预览"><i class="fa fa-eye"></i></a>` : '';
             html += '<tr><td style="width: 200px">' + att.filename + att.fileext + '</td><td>' + att.username + '</td><td>' + att.in_time + '</td>' +
                 '<td><a href="/tender/'+ tender.id + '/measure/stage/' + tender.ledger_times +'/pay/download/file/'+ att.id +'" title="下载"><i class="fa fa-download "></i></a> ' +
-                delhtml +
+                viewHtml + delhtml +
                 '</td></tr>';
         }
     }

+ 1 - 1
app/view/stage/pay_modal.ejs

@@ -84,7 +84,7 @@
                 <div class="modal-height-500" style="overflow:auto;">
                     <table class="table table-sm table-bordered" style="word-break:break-all; table-layout: fixed">
                         <thead>
-                        <tr><th width="240">文件名</th><th>上传人</th><th>上传时间</th><th width="40">操作</th></tr>
+                        <tr><th width="240">文件名</th><th>上传人</th><th>上传时间</th><th width="60">操作</th></tr>
                         </thead>
                         <tbody id="pay-attList">
                         <tr>