7
0

2 Revīzijas 72a1d2af85 ... ecb05bc477

Autors SHA1 Ziņojums Datums
  15110620229@163.com ecb05bc477 Merge branch 'master' of http://1.71.9.215:3000/feiyi/cbjsxt-front-master 2 nedēļas atpakaļ
  15110620229@163.com 421125d3aa 已归档完善 2 nedēļas atpakaļ

+ 0 - 6
src/views/costAudit/auditInfo/archivesManage/ArchiveDetail.vue

@@ -66,9 +66,6 @@
       nextStep() {
         if (this.currentStep < 2) {
           this.currentStep++
-        } else {
-          this.$message.success('归档完成')
-          this.backToList()
         }
       },
       prevStep() {
@@ -78,9 +75,6 @@
       },
       completeArchive() {
         // 归档确认已在 ArchivePreview 组件中处理
-        this.backToList()
-      },
-      backToList() {
         this.$emit('back')
       },
     },

+ 2 - 1
src/views/costAudit/auditInfo/archivesManage/ArchivePreview.vue

@@ -13,7 +13,7 @@
         <el-button style="margin-right: 10px" @click="handlePrevStep">
           上一步
         </el-button>
-        <el-button type="success" @click="handleComplete">完成</el-button>
+        <el-button type="success" @click="handleComplete">归档完成</el-button>
       </div>
     </div>
 
@@ -328,6 +328,7 @@
               const response = await queConfirmArchive(this.taskId)
               if (response && response.success !== false) {
                 this.$message.success(response.message || '归档成功')
+                // 关闭弹窗并刷新主页面列表
                 this.$emit('complete')
               } else {
                 this.$message.error(response.message || '归档失败')

+ 73 - 95
src/views/costAudit/auditInfo/archivesManage/archiveList.vue

@@ -14,10 +14,21 @@
             ></el-date-picker>
           </el-form-item>
 
-          <el-form-item label="监审项目名称:">
+          <el-form-item label="地区:" prop="region">
+            <el-select
+              v-model="searchForm.region"
+              placeholder="请选择地区"
+              clearable
+              style="width: 150px"
+            >
+              <el-option label="山西省" value="山西省"></el-option>
+            </el-select>
+          </el-form-item>
+
+          <el-form-item label="卷宗号:" prop="archiveNo">
             <el-input
-              v-model="searchForm.projectName"
-              placeholder="请输入监审项目名称"
+              v-model="searchForm.archiveNo"
+              placeholder="请输入卷宗号"
               clearable
               style="width: 200px"
             ></el-input>
@@ -29,15 +40,7 @@
               icon="el-icon-search"
               @click="handleSearch"
             >
-              搜索
-            </el-button>
-            <el-button
-              plain
-              type="primary"
-              icon="el-icon-refresh"
-              @click="handleReset"
-            >
-              重置
+              查询
             </el-button>
           </el-form-item>
         </el-form>
@@ -49,25 +52,15 @@
         :data="tableData"
         style="width: 100%"
         border
-        default-expand-all
         row-key="id"
-        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
       >
         <el-table-column
           type="index"
           label="序号"
-          width="80"
+          width="60"
           header-align="center"
           align="center"
-        >
-          <template slot-scope="scope">
-            <!-- 只显示父节点的序号 -->
-            <span v-if="scope.row.children || !scope.row.isSubTask">
-              {{ getParentNodeIndex(scope.row) }}
-            </span>
-            <span v-else></span>
-          </template>
-        </el-table-column>
+        />
         <el-table-column
           prop="year"
           label="立项年度"
@@ -76,11 +69,27 @@
           align="center"
         />
         <el-table-column
+          prop="region"
+          label="立项地区"
+          width="100"
+          header-align="center"
+          align="center"
+        />
+        <el-table-column
+          prop="archiveNo"
+          label="卷宗号"
+          width="150"
+          header-align="center"
+          align="center"
+          show-overflow-tooltip
+        />
+        <el-table-column
           prop="projectName"
           label="成本监审项目名称"
           show-overflow-tooltip
           header-align="center"
           align="left"
+          min-width="180"
         >
           <template slot-scope="scope">
             <div class="cell-content cell-content--left">
@@ -95,44 +104,45 @@
           label="监审对象"
           header-align="center"
           align="left"
+          min-width="150"
         />
         <el-table-column
           prop="auditPeriod"
           label="监审期间"
           header-align="center"
           align="center"
-          width="200"
-        />
-        <el-table-column
-          prop="source"
-          label="立项来源"
-          header-align="center"
-          align="center"
-          width="120"
+          width="150"
         />
         <el-table-column
-          prop="form"
-          label="监审形式"
+          prop="archiver"
+          label="归档人"
+          width="100"
           header-align="center"
           align="center"
-          width="120"
         />
-        <el-table-column label="操作" align="center" width="200" fixed="right">
+        <el-table-column label="操作" align="center" width="180" fixed="right">
           <template slot-scope="scope">
             <span class="action-buttons">
               <el-button
                 type="text"
                 size="small"
-                @click="handleTaskDetail(scope.row)"
+                @click="handleView(scope.row)"
               >
                 任务详情
               </el-button>
               <el-button
                 type="text"
                 size="small"
-                @click="handleView(scope.row)"
+                @click="handleDownload(scope.row)"
+              >
+                回归档
+              </el-button>
+              <el-button
+                type="text"
+                size="small"
+                @click="handleDelete(scope.row)"
               >
-                查看
+                下载
               </el-button>
             </span>
           </template>
@@ -167,7 +177,8 @@
       return {
         searchForm: {
           projectYear: '2025',
-          projectName: '',
+          region: '',
+          archiveNo: '',
         },
         loading: false,
         tableData: [],
@@ -184,18 +195,6 @@
       this.fetchData()
     },
     methods: {
-      // 获取父节点的连续序号
-      getParentNodeIndex(row) {
-        // 过滤出所有父节点
-        const parentNodes = this.tableData.filter(
-          (item) =>
-            (item.children && item.children.length > 0) || !item.isSubTask
-        )
-        // 找到当前行在父节点数组中的索引
-        const index = parentNodes.findIndex((item) => item.id === row.id)
-        // 返回序号(索引+1)
-        return index + 1
-      },
       // 获取数据
       async fetchData() {
         try {
@@ -204,7 +203,8 @@
             currentPage: this.pagination.currentPage,
             pageSize: this.pagination.pageSize,
             projectYear: this.searchForm.projectYear,
-            projectName: this.searchForm.projectName,
+            region: this.searchForm.region,
+            archiveNo: this.searchForm.archiveNo,
             isGd: 1, // 已归档
           }
           const response = await getArchiveList(params)
@@ -213,35 +213,25 @@
           if (response && response.value) {
             // 获取记录列表
             const records = response.value.records || []
-            // 转换数据格式,将childTasks转换为children以适应表格组件
-            this.tableData = records.map((record) => {
+            // 只加载第一级数据,过滤掉子任务
+            const firstLevelRecords = records.filter(
+              (record) => !record.pid || record.pid === '0'
+            )
+
+            // 转换数据格式
+            this.tableData = firstLevelRecords.map((record) => {
               return {
                 id: record.id,
                 year: record.projectYear || record.year || '',
+                region: record.region || '',
+                archiveNo: record.archiveNo || '',
                 projectName: record.projectName,
                 auditObject: record.auditedUnitName || record.auditObject || '',
                 auditPeriod: record.auditPeriod || '',
-                source: this.getSourceTypeText(record.sourceType),
-                form: this.getAuditTypeText(record.auditType),
-                isSubTask: record.pid && record.pid !== '0',
+                archiver: record.archiver || '',
                 projectId: record.projectId,
                 auditedUnitId: record.auditedUnitId,
                 taskId: record.id,
-                children: record.childTasks
-                  ? record.childTasks.map((child) => ({
-                      id: child.id,
-                      year: '',
-                      projectName: child.projectName,
-                      auditObject: child.auditedUnitName || '',
-                      auditPeriod: record.auditPeriod || '', // 子任务可能使用父任务的审核期间
-                      source: '',
-                      form: '',
-                      isSubTask: true,
-                      projectId: child.projectId,
-                      auditedUnitId: child.auditedUnitId,
-                      taskId: child.id,
-                    }))
-                  : [],
               }
             })
             // 设置总数
@@ -259,22 +249,6 @@
           this.loading = false
         }
       },
-      // 获取来源类型文本
-      getSourceTypeText(type) {
-        const typeMap = {
-          1: '年度计划内',
-          2: '年度计划外',
-        }
-        return typeMap[type] || type || ''
-      },
-      // 获取审核类型文本
-      getAuditTypeText(type) {
-        const typeMap = {
-          1: '定期监审',
-          2: '定调价监审',
-        }
-        return typeMap[type] || type || ''
-      },
       handleSearch() {
         this.pagination.currentPage = 1
         this.fetchData()
@@ -282,7 +256,8 @@
       handleReset() {
         this.searchForm = {
           projectYear: '2025',
-          projectName: '',
+          region: '',
+          archiveNo: '',
         }
         this.pagination.currentPage = 1
         this.fetchData()
@@ -301,14 +276,17 @@
         // 可以在这里处理详情点击
         console.log('详情:', row)
       },
-      handleTaskDetail(row) {
+      handleView(row) {
         // 打开任务详情弹窗
         this.$refs.taskDetail.open(row, 'chengben')
       },
-      handleView(row) {
-        // 查看操作,可以打开查看弹窗或跳转
-        console.log('查看:', row)
-        this.$message.info('查看功能待实现')
+      handleDownload(row) {
+        // 回归档操作
+        this.$message.info('回归档功能待实现')
+      },
+      handleDelete(row) {
+        // 下载操作
+        this.$message.info('下载功能待实现')
       },
       backToList() {
         this.activeTab = 'list'

+ 1 - 0
src/views/costAudit/auditInfo/archivesManage/pendingArchiveList.vue

@@ -287,6 +287,7 @@
       },
 
       handleArchiveDrawerClose() {
+        this.fetchData()
         this.archiveDrawerVisible = false
         this.currentArchiveTaskId = ''
       },