Procházet zdrojové kódy

fix: a标签改成button后,jq用prop获取不到attr

lanjianrong před 3 roky
rodič
revize
273c3a07b1
1 změnil soubory, kde provedl 3 přidání a 5 odebrání
  1. 3 5
      app/public/js/ledger.js

+ 3 - 5
app/public/js/ledger.js

@@ -3637,7 +3637,7 @@ $(document).ready(function() {
   // 批量下载
   $('#bach-download').click(function() {
       const fileIds = [];
-      const type = $(this).prop('type');
+      const type = $(this).attr('type');
       let node = ''
       if (type === 'curr') {
           node = '#nodelist-table .check-file:checked'
@@ -3645,10 +3645,9 @@ $(document).ready(function() {
           node = '#alllist-table .check-file:checked'
       }
       $(node).each(function() {
-          const fileId = $(this).attr('file-id');
-          fileId && fileIds.push(fileId);
+        const fileId = $(this).attr('file-id');
+        fileId && fileIds.push(fileId);
       });
-
       
       if (fileIds.length) {
         if (fileIds.length > 8) {
@@ -3660,7 +3659,6 @@ $(document).ready(function() {
         postCompressFile(`/tender/${tender.id}/ledger/compresse/file`, {fileIds}, function(result) {
           toastr.success('压缩文件成功,即将开始下载')
           btn.removeAttr('disabled')
-          console.log(btn);
           const href = window.URL.createObjectURL(result)
           $('#zipDown').attr('href', href);
           $('#zipDown').attr('download', `${tender.name}-台账分解-附件.zip`);