Ver código fonte

归档完善

15110620229@163.com 2 semanas atrás
pai
commit
62ab6e7269

+ 31 - 33
package-lock.json

@@ -2161,6 +2161,25 @@
           "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
           "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
           "dev": true
           "dev": true
         },
         },
+        "json5": {
+          "version": "2.2.3",
+          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+          "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+          "dev": true,
+          "optional": true
+        },
+        "loader-utils": {
+          "version": "2.0.4",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
+          "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
         "ssri": {
         "ssri": {
           "version": "8.0.1",
           "version": "8.0.1",
           "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
           "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
@@ -2169,6 +2188,18 @@
           "requires": {
           "requires": {
             "minipass": "^3.1.1"
             "minipass": "^3.1.1"
           }
           }
+        },
+        "vue-loader-v16": {
+          "version": "npm:vue-loader@16.8.3",
+          "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
+          "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "chalk": "^4.1.0",
+            "hash-sum": "^2.0.0",
+            "loader-utils": "^2.0.0"
+          }
         }
         }
       }
       }
     },
     },
@@ -19479,39 +19510,6 @@
         }
         }
       }
       }
     },
     },
-    "vue-loader-v16": {
-      "version": "npm:vue-loader@16.8.3",
-      "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
-      "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "chalk": "^4.1.0",
-        "hash-sum": "^2.0.0",
-        "loader-utils": "^2.0.0"
-      },
-      "dependencies": {
-        "json5": {
-          "version": "2.2.3",
-          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
-          "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
-          "dev": true,
-          "optional": true
-        },
-        "loader-utils": {
-          "version": "2.0.4",
-          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
-          "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        }
-      }
-    },
     "vue-pdf": {
     "vue-pdf": {
       "version": "4.2.0",
       "version": "4.2.0",
       "resolved": "https://registry.npmjs.org/vue-pdf/-/vue-pdf-4.2.0.tgz",
       "resolved": "https://registry.npmjs.org/vue-pdf/-/vue-pdf-4.2.0.tgz",

+ 98 - 13
src/views/costAudit/auditInfo/archivesManage/ArchiveInduction.vue

@@ -9,17 +9,20 @@
       "
       "
     >
     >
       <div style="font-size: 16px; font-weight: 500">资料归纳</div>
       <div style="font-size: 16px; font-weight: 500">资料归纳</div>
-      <div>
+      <div style="display: flex; align-items: center">
         <el-button
         <el-button
           plain
           plain
           type="success"
           type="success"
           icon="iconfont-5039297 icon-zengjia1"
           icon="iconfont-5039297 icon-zengjia1"
           style="margin-right: 10px"
           style="margin-right: 10px"
+          size="mini"
           @click="openAddMaterialDialog"
           @click="openAddMaterialDialog"
         >
         >
           添加资料
           添加资料
         </el-button>
         </el-button>
-        <el-button type="primary" @click="handleNextStep">下一步</el-button>
+        <el-button type="primary" size="mini" @click="handleNextStep">
+          下一步
+        </el-button>
       </div>
       </div>
     </div>
     </div>
     <div
     <div
@@ -768,9 +771,10 @@
     deleteDetailInfo,
     deleteDetailInfo,
     getDetailListByMasterList,
     getDetailListByMasterList,
     getDataInductionList,
     getDataInductionList,
+    moveDataInductionWithDetails,
+    deleteDataInductionWithDetails,
   } from '@/api/audit/dataInduction'
   } from '@/api/audit/dataInduction'
   import { getAllUnitList } from '@/api/auditEntityManage'
   import { getAllUnitList } from '@/api/auditEntityManage'
-
   export default {
   export default {
     name: 'ArchiveInduction',
     name: 'ArchiveInduction',
     components: {
     components: {
@@ -1028,7 +1032,7 @@
             if (response && response.success !== false) {
             if (response && response.success !== false) {
               this.$message.success(response.message || '保存成功')
               this.$message.success(response.message || '保存成功')
               this.materialDialogVisible = false
               this.materialDialogVisible = false
-              this.$emit('refresh-data')
+              this.handleRefreshData()
             } else {
             } else {
               this.$message.error(response.message || '保存失败')
               this.$message.error(response.message || '保存失败')
             }
             }
@@ -1218,7 +1222,7 @@
             if (response && response.success !== false) {
             if (response && response.success !== false) {
               this.$message.success(response.message || '文件添加成功')
               this.$message.success(response.message || '文件添加成功')
               this.addFileDialogVisible = false
               this.addFileDialogVisible = false
-              this.$emit('refresh-data')
+              this.handleRefreshData()
             } else {
             } else {
               this.$message.error(response.message || '添加失败')
               this.$message.error(response.message || '添加失败')
             }
             }
@@ -1425,16 +1429,97 @@
         }
         }
       },
       },
       handleDelete(row) {
       handleDelete(row) {
-        // 处理删除操作
-        this.$emit('delete', row)
+        this.$confirm(`确定要删除资料"${row.materialName}"吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        })
+          .then(() => {
+            // this.archiveData.splice(index, 1)
+            deleteDataInductionWithDetails({ id: row.id })
+              .then((response) => {
+                if (response && response.success !== false) {
+                  this.$message.success(response.message || '删除成功')
+                  this.loadArchiveData()
+                } else {
+                  this.$message.error(response.message || '删除失败')
+                }
+              })
+              .catch((error) => {
+                // this.$message.error('删除失败')
+                console.error('删除资料失败:', error)
+              })
+          })
+          .catch(() => {
+            this.$message.info('已取消删除')
+          })
       },
       },
-      handleMoveUp(row, index) {
-        // 处理上移操作
-        this.$emit('move-up', row, index)
+      // 上移按钮点击事件
+      async handleMoveUp(row, index) {
+        if (!row) {
+          this.$message.warning('缺少数据信息')
+          return
+        }
+
+        const materialId = row.id || (row.originalData && row.originalData.id)
+        if (!materialId) {
+          this.$message.warning('缺少资料ID')
+          return
+        }
+
+        try {
+          const params = {
+            id: materialId,
+            direction: 'up',
+          }
+
+          const response = await moveDataInductionWithDetails(params)
+
+          if (response && response.success !== false) {
+            this.$message.success(response.message || '上移成功')
+            // 刷新列表
+            this.loadArchiveData()
+          } else {
+            this.$message.error(response.message || '上移失败')
+          }
+        } catch (error) {
+          // this.$message.error('上移失败')
+          console.error('上移资料失败:', error)
+        }
       },
       },
-      handleMoveDown(row, index) {
-        // 处理下移操作
-        this.$emit('move-down', row, index)
+
+      // 下移按钮点击事件
+      async handleMoveDown(row, index) {
+        if (!row) {
+          this.$message.warning('缺少数据信息')
+          return
+        }
+
+        const materialId = row.id || (row.originalData && row.originalData.id)
+        if (!materialId) {
+          this.$message.warning('缺少资料ID')
+          return
+        }
+
+        try {
+          const params = {
+            id: materialId,
+            direction: 'down',
+          }
+
+          const response = await moveDataInductionWithDetails(params)
+
+          if (response && response.success !== false) {
+            this.$message.success(response.message || '下移成功')
+            // 刷新列表
+            this.loadArchiveData()
+          } else {
+            this.$message.error(response.message || '下移失败')
+          }
+        } catch (error) {
+          // this.$message.error('下移失败')
+          console.error('下移资料失败:', error)
+        }
       },
       },
       handleRefreshData() {
       handleRefreshData() {
         // 刷新数据
         // 刷新数据

+ 13 - 16
src/views/costAudit/auditInfo/archivesManage/ArchivePreview.vue

@@ -48,20 +48,11 @@
         生成卷宗
         生成卷宗
       </el-button>
       </el-button>
 
 
-
       <!-- 已生成状态:显示预览、下载、重新生成按钮 -->
       <!-- 已生成状态:显示预览、下载、重新生成按钮 -->
       <template v-if="archiveStatus === '2'">
       <template v-if="archiveStatus === '2'">
         <el-button
         <el-button
           plain
           plain
           type="primary"
           type="primary"
-          icon="el-icon-view"
-          @click="handlePreview"
-        >
-          预览
-        </el-button>
-        <el-button
-          plain
-          type="primary"
           icon="el-icon-download"
           icon="el-icon-download"
           @click="handleDownload"
           @click="handleDownload"
         >
         >
@@ -70,7 +61,7 @@
         <el-button
         <el-button
           plain
           plain
           type="warning"
           type="warning"
-          icon="iconfont-5039297 icon-zhongzhi"
+          icon="el-icon-refresh"
           :loading="generating"
           :loading="generating"
           @click="handleRegenerate"
           @click="handleRegenerate"
         >
         >
@@ -263,17 +254,23 @@
           }
           }
         } catch (error) {
         } catch (error) {
           console.error('生成卷宗失败:', error)
           console.error('生成卷宗失败:', error)
-          this.$message.error('生成失败:' + (error.message || '请检查网络连接'))
+          this.$message.error(
+            '生成失败:' + (error.message || '请检查网络连接')
+          )
         } finally {
         } finally {
           this.generating = false
           this.generating = false
         }
         }
       },
       },
       handleRegenerate() {
       handleRegenerate() {
-        this.$confirm('确定要重新生成卷宗吗?这将覆盖现有的卷宗文件。', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning',
-        })
+        this.$confirm(
+          '确定要重新生成卷宗吗?这将覆盖现有的卷宗文件。',
+          '提示',
+          {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          }
+        )
           .then(() => {
           .then(() => {
             this.handleGenerateArchive()
             this.handleGenerateArchive()
           })
           })

+ 189 - 10
src/views/costAudit/auditInfo/archivesManage/ArchiveProofread.vue

@@ -72,7 +72,15 @@
             编辑生成
             编辑生成
           </el-button>
           </el-button>
           <el-button
           <el-button
-            v-if="[1, 3].includes(row.documentType) && row.attachmentUrl"
+            v-if="row.documentType === 3"
+            type="text"
+            size="small"
+            @click="handleViewCatalog(row)"
+          >
+            编辑生成
+          </el-button>
+          <el-button
+            v-if="[1, 2, 3].includes(row.documentType) && row.attachmentUrl"
             type="text"
             type="text"
             size="small"
             size="small"
             @click="handlePreviewFile(row)"
             @click="handlePreviewFile(row)"
@@ -167,6 +175,18 @@
             {{ row.pageCount || 0 }}
             {{ row.pageCount || 0 }}
           </template>
           </template>
         </el-table-column>
         </el-table-column>
+        <el-table-column label="操作" width="120" align="center" fixed="right">
+          <template slot-scope="{ row }">
+            <el-button
+              v-if="row.attachmentUrl"
+              type="text"
+              size="small"
+              @click="handlePreviewFile(row)"
+            >
+              查看文件
+            </el-button>
+          </template>
+        </el-table-column>
       </el-table>
       </el-table>
 
 
       <div slot="footer" style="text-align: right; margin-top: 20px">
       <div slot="footer" style="text-align: right; margin-top: 20px">
@@ -180,7 +200,7 @@
       title="卷内目录"
       title="卷内目录"
       :show-confirm-btn="false"
       :show-confirm-btn="false"
       :show-footer="true"
       :show-footer="true"
-      width="80%"
+      width="60%"
       @cancel="handleCancelCatalog"
       @cancel="handleCancelCatalog"
     >
     >
       <!-- 目录表格(只读) -->
       <!-- 目录表格(只读) -->
@@ -203,12 +223,12 @@
           width="200"
           width="200"
           align="center"
           align="center"
         />
         />
-        <el-table-column
+        <!-- <el-table-column
           prop="remark"
           prop="remark"
           label="备注"
           label="备注"
           min-width="200"
           min-width="200"
           align="left"
           align="left"
-        />
+        /> -->
       </el-table>
       </el-table>
 
 
       <div slot="footer" style="text-align: right">
       <div slot="footer" style="text-align: right">
@@ -264,6 +284,40 @@
         </el-button>
         </el-button>
       </div>
       </div>
     </CostAuditDialog>
     </CostAuditDialog>
+
+    <!-- 卷宗封底说明弹窗 (documentType=3) -->
+    <CostAuditDialog
+      :visible.sync="coverRemarkDialogVisible"
+      title="卷宗封底说明"
+      :show-confirm-btn="false"
+      :show-footer="true"
+      width="50%"
+      @cancel="handleCancelCoverRemark"
+    >
+      <el-form
+        ref="coverRemarkForm"
+        :model="coverRemarkForm"
+        :rules="coverRemarkRules"
+        label-width="120px"
+      >
+        <el-form-item label="封底说明" prop="remark">
+          <el-input
+            v-model="coverRemarkForm.remark"
+            type="textarea"
+            :rows="6"
+            placeholder="请输入卷宗封底说明内容"
+            maxlength="1000"
+            show-word-limit
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" style="text-align: right">
+        <el-button @click="handleCancelCoverRemark">取消</el-button>
+        <el-button type="primary" @click="handleConfirmCoverRemark">
+          确定
+        </el-button>
+      </div>
+    </CostAuditDialog>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -311,9 +365,28 @@
           archiveNo: '',
           archiveNo: '',
         },
         },
         generateRules: {
         generateRules: {
-          // 根据需要添加验证规则
+          retentionPeriod: [
+            { required: true, message: '请输入保管期限', trigger: 'blur' },
+          ],
+          archiveNo: [
+            { required: true, message: '请输入卷宗号', trigger: 'blur' },
+          ],
         },
         },
         currentGenerateRow: null,
         currentGenerateRow: null,
+        // 卷宗封底说明弹窗相关 (documentType=3)
+        coverRemarkDialogVisible: false,
+        coverRemarkForm: {
+          id: '',
+          taskId: '',
+          documentType: 3,
+          remark: '',
+        },
+        coverRemarkRules: {
+          remark: [
+            { required: true, message: '请输入封底说明内容', trigger: 'blur' },
+          ],
+        },
+        currentCoverRemarkRow: null,
       }
       }
     },
     },
     watch: {
     watch: {
@@ -401,10 +474,25 @@
         window.open(row.attachmentUrl, '_blank')
         window.open(row.attachmentUrl, '_blank')
       },
       },
       handleViewCatalog(row) {
       handleViewCatalog(row) {
-        // 查看卷内目录(documentType = 2)
-        this.currentCatalogRow = row
-        this.catalogDialogVisible = true
-        this.loadCatalogData()
+        // 查看卷内目录(documentType = 2)或卷宗封底说明(documentType = 3)
+        if (row.documentType === 2) {
+          this.currentCatalogRow = row
+          this.catalogDialogVisible = true
+          this.loadCatalogData()
+        } else if (row.documentType === 3) {
+          // 处理 documentType=3 的情况,打开卷宗封底说明弹窗
+          this.currentCoverRemarkRow = row
+
+          // 设置表单数据
+          this.coverRemarkForm = {
+            id: row.id || '',
+            taskId: this.taskId,
+            documentType: 3,
+            remark: row.remark || '',
+          }
+
+          this.coverRemarkDialogVisible = true
+        }
       },
       },
       async loadCatalogData() {
       async loadCatalogData() {
         try {
         try {
@@ -419,6 +507,14 @@
             this.catalogData = Array.isArray(response.value)
             this.catalogData = Array.isArray(response.value)
               ? response.value
               ? response.value
               : response.value.list || []
               : response.value.list || []
+
+            // 过滤掉前两条记录
+            if (this.catalogData.length > 2) {
+              this.catalogData = this.catalogData.slice(2)
+            } else {
+              this.catalogData = []
+            }
+
             console.log('卷内目录数据:', this.catalogData)
             console.log('卷内目录数据:', this.catalogData)
           } else {
           } else {
             this.catalogData = []
             this.catalogData = []
@@ -511,7 +607,40 @@
         this.$emit('prev-step')
         this.$emit('prev-step')
       },
       },
       handleNextStep() {
       handleNextStep() {
-        // 处理下一步操作
+        // 检查卷宗封面、卷内目录和案卷封底是否有文件数据
+        let missingFiles = []
+
+        // 查找各类型的文档
+        const coverFile = this.proofreadData.find(
+          (item) => item.documentType === 1
+        ) // 卷宗封面
+        const catalogFile = this.proofreadData.find(
+          (item) => item.documentType === 2
+        ) // 卷内目录
+        const bottomFile = this.proofreadData.find(
+          (item) => item.documentType === 3
+        ) // 案卷封底
+
+        // 检查各文件是否存在且有附件
+        if (!coverFile || !coverFile.attachmentUrl) {
+          missingFiles.push('卷宗封面')
+        }
+
+        if (!catalogFile || !catalogFile.attachmentUrl) {
+          missingFiles.push('卷内目录')
+        }
+
+        if (!bottomFile || !bottomFile.attachmentUrl) {
+          missingFiles.push('案卷封底')
+        }
+
+        // 如果有缺失的文件,提示用户
+        if (missingFiles.length > 0) {
+          this.$message.warning(`以下文件未生成:${missingFiles.join('、')}`)
+          return
+        }
+
+        // 如果所有文件都已生成,则继续下一步
         this.$emit('next-step')
         this.$emit('next-step')
       },
       },
       handleCancelGenerate() {
       handleCancelGenerate() {
@@ -524,6 +653,56 @@
           }
           }
         })
         })
       },
       },
+
+      handleCancelCoverRemark() {
+        // 取消卷宗封底说明
+        this.coverRemarkDialogVisible = false
+        this.currentCoverRemarkRow = null
+        this.$nextTick(() => {
+          if (this.$refs.coverRemarkForm) {
+            this.$refs.coverRemarkForm.resetFields()
+          }
+        })
+      },
+
+      async handleConfirmCoverRemark() {
+        // 确认卷宗封底说明
+        this.$refs.coverRemarkForm.validate(async (valid) => {
+          if (!valid) return false
+
+          try {
+            // 准备提交数据
+            const submitData = {
+              taskId: this.coverRemarkForm.taskId,
+              documentType: this.coverRemarkForm.documentType,
+              remark: this.coverRemarkForm.remark,
+            }
+
+            // 如果有ID,说明是编辑
+            if (this.coverRemarkForm.id) {
+              submitData.id = this.coverRemarkForm.id
+            }
+
+            console.log('生成卷宗封底说明数据:', submitData)
+
+            // 调用保存文书的API接口(与documentType=1和documentType=2相同的方法)
+            const response = await saveArchiveDocument(submitData)
+            if (response && response.success !== false) {
+              this.$message.success(response.message || '生成成功')
+              this.coverRemarkDialogVisible = false
+              this.loadProofreadData() // 重新加载列表
+            } else {
+              this.$message.error(response.message || '生成失败')
+            }
+          } catch (error) {
+            console.error('生成卷宗封底说明失败:', error)
+            this.$message.error(
+              '生成失败:' + (error.message || '请检查网络连接')
+            )
+          }
+        })
+      },
+
       async handleConfirmGenerate() {
       async handleConfirmGenerate() {
         // 确认生成
         // 确认生成
         this.$refs.generateForm.validate(async (valid) => {
         this.$refs.generateForm.validate(async (valid) => {

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

@@ -158,7 +158,6 @@
     </el-dialog>
     </el-dialog>
   </div>
   </div>
 </template>
 </template>
-
 <script>
 <script>
   import taskDetail from '@/components/task/taskDetail.vue'
   import taskDetail from '@/components/task/taskDetail.vue'
   import ArchiveDetail from './ArchiveDetail.vue'
   import ArchiveDetail from './ArchiveDetail.vue'