Browse Source

附件分页15->20 补齐

laiguoran 3 years ago
parent
commit
11d0a0d6f7
3 changed files with 11 additions and 11 deletions
  1. 4 4
      app/public/js/change_information.js
  2. 4 4
      app/public/js/ledger.js
  3. 3 3
      app/public/js/sr_detail.js

+ 4 - 4
app/public/js/change_information.js

@@ -180,8 +180,8 @@ $(document).ready(() => {
             // const cid = $('#changeId').val();
             // $('#downloadZip').attr('href', `/tender/${tid}/change/${cid}/download/compresse-file?fileIds=${JSON.stringify(fileIds)}`);
             // $('#downloadZip')[0].click();
-            if (fileIds.length > 10) {
-              return toastr.warning(`最大允许10个文件(当前${fileIds.length}个)`);
+            if (fileIds.length > 20) {
+              return toastr.warning(`最大允许20个文件(当前${fileIds.length}个)`);
             }
             const tid = $('#tenderId').val();
             const cid = $('#changeId').val();
@@ -297,7 +297,7 @@ function findDecimal(unit) {
 // 生成附件列表
 function getAllList(currPageNum = 1) {
     // 每页最多几个附件
-    const pageCount = 15;
+    const pageCount = 20;
     // 附件总数
     const total = attData.length;
     // 总页数
@@ -312,7 +312,7 @@ function getAllList(currPageNum = 1) {
     for(const [index,att] of currPageAttData.entries()) {
         html += `<tr>
         <td width="25"><input type="checkbox" class="check-file" file-id=${att.id}></td>
-        <td>${((currPageNum-1)*15)+index+1}</td>
+        <td>${((currPageNum-1)*pageCount)+index+1}</td>
         <td><a href="javascript:void(0)" class="pl-0 col-11 att-file-name" file-id=${att.id}>${att.filename}${att.fileext}</a></td>
         <td>${moment(att.in_time * 1000).format('YYYY-MM-DD')}<br>${bytesToSize(att.filesize)}</td>
         <td>

+ 4 - 4
app/public/js/ledger.js

@@ -3630,7 +3630,7 @@ $(document).ready(function() {
       const filename = name.substring(0, name.lastIndexOf("."));
       const fileext = name.substr(name.indexOf("."));
       const filesize = file.size;
-      if (filesize > 10 * 1024 * 1024) {
+      if (filesize > 30 * 1024 * 1024) {
           toastr.error('文件大小过大!');
           $('#change-att-btn').val('');
           return false;
@@ -3676,8 +3676,8 @@ $(document).ready(function() {
       });
 
       if (fileIds.length) {
-        if (fileIds.length > 10) {
-          return toastr.warning(`最大允许10个文件(当前${fileIds.length}个)`)
+        if (fileIds.length > 20) {
+          return toastr.warning(`最大允许20个文件(当前${fileIds.length}个)`)
         }
         toastr.success('正在进行压缩文件...', '', { timeOut: 0, extendedTimeOut: 0})
         $(this).attr('disabled', "true")
@@ -3762,7 +3762,7 @@ function getNodeList(node) {
 // 生成所有附件列表
 function getAllList(currPageNum = 1) {
   // 每页最多几个附件
-  const pageCount = 15;
+  const pageCount = 20;
   // 附件总数
   const total = attData.length;
   // 总页数

+ 3 - 3
app/public/js/sr_detail.js

@@ -74,7 +74,7 @@ function customizeStageTreeSetting(setting, customDisplay) {
 // 生成所有附件列表
 function getAllList(currPageNum = 1) {
     // 每页最多几个附件
-    const pageCount = 15;
+    const pageCount = 20;
     // 附件总数
     const total = attData.length;
     // 总页数
@@ -1217,8 +1217,8 @@ $(document).ready(() => {
         });
 
         if (fileIds.length) {
-            if (fileIds.length > 10) {
-              return toastr.warning(`最大允许10个文件(当前${fileIds.length}个)`)
+            if (fileIds.length > 20) {
+              return toastr.warning(`最大允许20个文件(当前${fileIds.length}个)`)
             }
             toastr.success('正在进行压缩文件...', '', { timeOut: 0, extendedTimeOut: 0})
             $(this).attr('disabled', "true")