Browse Source

fix: 修复计量台账-附件 上传者、时间不正确的bug

lanjianrong 4 years ago
parent
commit
508f70fc59
1 changed files with 4 additions and 5 deletions
  1. 4 5
      app/public/js/stage.js

+ 4 - 5
app/public/js/stage.js

@@ -3161,8 +3161,7 @@ $(document).ready(() => {
     });
 
     // 获取附件信息
-    $('body').on('click', '.list-table a.att-file-name', function () {
-        console.log($(this))
+    $('.list-table').on('click', '.att-file-name', function () {
         const fid = $(this).attr('file-id');
         if ($('#showAttachment').attr('file-id') === fid && !$('#showAttachment').is(":hidden")) {
             return;
@@ -3180,9 +3179,9 @@ $(document).ready(() => {
             $('#show-att tr').eq(1).children('td').text($.trim(name + ' ' + att.lname));
             // $('#show-att tr').eq(2).find('a').attr('href', '/tender/' + tender.id + '/measure/stage/' + stage.order + '/download/file/' + att.id);
             // $('#show-att tr').eq(2).find('a').attr('href', att.filepath);
-            $('#show-att tr').eq(3).children('td').eq(0).text(att.username);
-            $('#show-att tr').eq(3).children('td').eq(1).text(att.in_time);
-            $('#show-att tr').eq(4).children('td').text(att.remark);
+            $('#show-att tr').eq(2).children('td').eq(0).text(att.username);
+            $('#show-att tr').eq(2).children('td').eq(1).text(att.in_time);
+            $('#show-att tr').eq(3).children('td').text(att.remark);
             // 附件uid等于当前用户id, 附件上传本人
             if (parseInt(cur_uid) === att.uid) {
                 $('#btn-att').show();