Procházet zdrojové kódy

fix:监审文书添加查看附件按钮显示条件,添加分页

luzhixia před 1 měsícem
rodič
revize
688c3e86eb

+ 30 - 3
src/components/task/taskInfo.vue

@@ -374,7 +374,10 @@
                 min-width="120"
                 align="center"
               >
-                <template slot-scope="scope">
+                <template
+                  v-if="scope.row.documentName.includes('送达回证')"
+                  slot-scope="scope"
+                >
                   <!-- <el-button
                     :disabled="isViewMode"
                     type="text"
@@ -397,6 +400,17 @@
                 </template>
               </el-table-column>
             </el-table>
+            <!-- 分页 -->
+            <el-pagination
+              style="margin: 20px 0"
+              :current-page.sync="auditDocumentPagination.page"
+              :page-sizes="[50, 100]"
+              :page-size.sync="auditDocumentPagination.pageSize"
+              layout="total, sizes, prev, pager, next, jumper"
+              :total="auditDocumentPagination.total"
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+            />
           </div>
         </el-tab-pane>
 
@@ -1046,7 +1060,7 @@
         },
         auditDocumentPagination: {
           page: 1,
-          pageSize: 10,
+          pageSize: 50,
           total: 0,
         },
         unitList: [],
@@ -1886,7 +1900,7 @@
             pageNum: this.auditDocumentPagination.page,
             pageSize: this.auditDocumentPagination.pageSize,
             projectId: this.currentTaskInfo.projectId,
-            documentName: '',
+            // documentName: '',
             permissionType: 1,
           }).then((res) => {
             this.formData.auditDocument = res.value.value.records
@@ -2377,6 +2391,19 @@
         this.messageNoticePagination.currentPage = 1
         this.loadMessageNotice()
       },
+
+      // 监审文书分页 - 每页条数改变
+      handleSizeChange(size) {
+        this.auditDocumentPagination.pageSize = size
+        this.auditDocumentPagination.page = 1
+        this.loadAuditDocument()
+      },
+
+      // 监审文书分页 - 页码改变
+      handleCurrentChange(page) {
+        this.auditDocumentPagination.page = page
+        this.loadAuditDocument()
+      },
     },
   }
 </script>

+ 57 - 1
src/views/EntDeclaration/auditTaskManagement/components/AuditDocumentTab.vue

@@ -53,7 +53,10 @@
         min-width="120"
         align="center"
       >
-        <template slot-scope="scope">
+        <template
+          v-if="scope.row.documentName.includes('送达回证')"
+          slot-scope="scope"
+        >
           <span>
             {{ scope.row.feedbackDocumentUrl ? '已回传' : '未回传' }}
           </span>
@@ -76,6 +79,18 @@
         </template>
       </el-table-column>
     </el-table>
+    <!-- 分页 -->
+    <el-pagination
+      style="margin: 20px 0"
+      background
+      layout="total, sizes, prev, pager, next"
+      :current-page="pageNum"
+      :page-sizes="[50, 100]"
+      :page-size="pageSize"
+      :total="total"
+      @size-change="handlePageSizeChange"
+      @current-change="handlePageNumChange"
+    />
     <!-- 查看监审通知书 -->
     <CostAuditDialog
       :title="documentDialogTitle"
@@ -239,6 +254,14 @@
         type: Boolean,
         default: false,
       },
+      pagination: {
+        type: Object,
+        default: () => ({
+          pageNum: 1,
+          pageSize: 50,
+          total: 0,
+        }),
+      },
     },
     data() {
       return {
@@ -252,8 +275,22 @@
         dialogMultiVisible: false,
         attachments: [],
         unitList: [],
+        // 分页相关变量
+        pageNum: 1,
+        pageSize: 50,
+        total: 0,
       }
     },
+    watch: {
+      pagination: {
+        handler(val) {
+          this.pageNum = val.pageNum
+          this.pageSize = val.pageSize
+          this.total = val.total
+        },
+        deep: true,
+      },
+    },
     mounted() {
       // this.$emit('refresh')
       this.getAllUnitList()
@@ -498,6 +535,25 @@
         this.fileUrl = ''
         this.costDocumentTemplateFiles = []
       },
+
+      // 分页处理 - 页面大小改变
+      handlePageSizeChange(newSize) {
+        this.pageSize = newSize
+        this.pageNum = 1 // 重置为第一页
+        this.$emit('paginationChange', {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+        })
+      },
+
+      // 分页处理 - 当前页码改变
+      handlePageNumChange(newPage) {
+        this.pageNum = newPage
+        this.$emit('paginationChange', {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+        })
+      },
     },
   }
 </script>

+ 7 - 0
src/views/EntDeclaration/auditTaskManagement/taskFillIn.vue

@@ -66,10 +66,12 @@
             <audit-document-tab
               :form-data="formData.auditDocument"
               :is-view-mode="isViewMode"
+              :pagination="auditDocumentPagination"
               @handleClick="handleClick"
               @handleDownload="handleDownload"
               @handleUpload="handleUpload"
               @refresh="getAuditDocumentList"
+              @paginationChange="handleAuditDocumentPaginationChange"
             />
           </el-tab-pane>
 
@@ -1479,6 +1481,11 @@
           this.auditDocumentPagination.total = res.value.value.total
         })
       },
+      handleAuditDocumentPaginationChange(val) {
+        this.auditDocumentPagination.page = val.pageNum
+        this.auditDocumentPagination.pageSize = val.pageSize
+        this.getAuditDocumentList()
+      },
       handleClick(row) {},
 
       // 下载文书

+ 13 - 11
src/views/costAudit/auditInfo/auditManage/auditDocumentsMain.vue

@@ -77,17 +77,19 @@
             >
               上传附件
             </el-button> -->
-            <span>
-              {{ scope.row.feedbackDocumentUrl ? '已回传' : '未回传' }}
-            </span>
-            <el-button
-              v-if="scope.row.feedbackDocumentUrl"
-              type="text"
-              size="mini"
-              @click="handleViewScan(scope.row.feedbackDocumentUrl)"
-            >
-              查看附件
-            </el-button>
+            <div v-if="getDocumenType(scope.row).includes('送达回证')">
+              <span>
+                {{ scope.row.feedbackDocumentUrl ? '已回传' : '未回传' }}
+              </span>
+              <el-button
+                v-if="scope.row.feedbackDocumentUrl"
+                type="text"
+                size="mini"
+                @click="handleViewScan(scope.row.feedbackDocumentUrl)"
+              >
+                查看附件
+              </el-button>
+            </div>
           </template>
           <template #electronicDocumentUrl="scope">
             <el-button

+ 13 - 11
src/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/auditNoticeTab.vue

@@ -77,17 +77,19 @@
             >
               上传附件
             </el-button> -->
-            <span>
-              {{ scope.row.feedbackDocumentUrl ? '已回传' : '未回传' }}
-            </span>
-            <el-button
-              v-if="scope.row.feedbackDocumentUrl"
-              type="text"
-              size="mini"
-              @click="handleViewScan(scope.row.feedbackDocumentUrl)"
-            >
-              查看附件
-            </el-button>
+            <div v-if="getDocumenType(scope.row).includes('送达回证')">
+              <span>
+                {{ scope.row.feedbackDocumentUrl ? '已回传' : '未回传' }}
+              </span>
+              <el-button
+                v-if="scope.row.feedbackDocumentUrl"
+                type="text"
+                size="mini"
+                @click="handleViewScan(scope.row.feedbackDocumentUrl)"
+              >
+                查看附件
+              </el-button>
+            </div>
           </template>
           <template #electronicDocumentUrl="scope">
             <el-button