|
|
@@ -72,7 +72,15 @@
|
|
|
编辑生成
|
|
|
</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"
|
|
|
size="small"
|
|
|
@click="handlePreviewFile(row)"
|
|
|
@@ -167,6 +175,18 @@
|
|
|
{{ row.pageCount || 0 }}
|
|
|
</template>
|
|
|
</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>
|
|
|
|
|
|
<div slot="footer" style="text-align: right; margin-top: 20px">
|
|
|
@@ -180,7 +200,7 @@
|
|
|
title="卷内目录"
|
|
|
:show-confirm-btn="false"
|
|
|
:show-footer="true"
|
|
|
- width="80%"
|
|
|
+ width="60%"
|
|
|
@cancel="handleCancelCatalog"
|
|
|
>
|
|
|
<!-- 目录表格(只读) -->
|
|
|
@@ -203,12 +223,12 @@
|
|
|
width="200"
|
|
|
align="center"
|
|
|
/>
|
|
|
- <el-table-column
|
|
|
+ <!-- <el-table-column
|
|
|
prop="remark"
|
|
|
label="备注"
|
|
|
min-width="200"
|
|
|
align="left"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
</el-table>
|
|
|
|
|
|
<div slot="footer" style="text-align: right">
|
|
|
@@ -264,6 +284,40 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</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>
|
|
|
</template>
|
|
|
|
|
|
@@ -311,9 +365,28 @@
|
|
|
archiveNo: '',
|
|
|
},
|
|
|
generateRules: {
|
|
|
- // 根据需要添加验证规则
|
|
|
+ retentionPeriod: [
|
|
|
+ { required: true, message: '请输入保管期限', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ archiveNo: [
|
|
|
+ { required: true, message: '请输入卷宗号', trigger: 'blur' },
|
|
|
+ ],
|
|
|
},
|
|
|
currentGenerateRow: null,
|
|
|
+ // 卷宗封底说明弹窗相关 (documentType=3)
|
|
|
+ coverRemarkDialogVisible: false,
|
|
|
+ coverRemarkForm: {
|
|
|
+ id: '',
|
|
|
+ taskId: '',
|
|
|
+ documentType: 3,
|
|
|
+ remark: '',
|
|
|
+ },
|
|
|
+ coverRemarkRules: {
|
|
|
+ remark: [
|
|
|
+ { required: true, message: '请输入封底说明内容', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ currentCoverRemarkRow: null,
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -401,10 +474,25 @@
|
|
|
window.open(row.attachmentUrl, '_blank')
|
|
|
},
|
|
|
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() {
|
|
|
try {
|
|
|
@@ -419,6 +507,14 @@
|
|
|
this.catalogData = Array.isArray(response.value)
|
|
|
? response.value
|
|
|
: response.value.list || []
|
|
|
+
|
|
|
+ // 过滤掉前两条记录
|
|
|
+ if (this.catalogData.length > 2) {
|
|
|
+ this.catalogData = this.catalogData.slice(2)
|
|
|
+ } else {
|
|
|
+ this.catalogData = []
|
|
|
+ }
|
|
|
+
|
|
|
console.log('卷内目录数据:', this.catalogData)
|
|
|
} else {
|
|
|
this.catalogData = []
|
|
|
@@ -511,7 +607,40 @@
|
|
|
this.$emit('prev-step')
|
|
|
},
|
|
|
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')
|
|
|
},
|
|
|
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() {
|
|
|
// 确认生成
|
|
|
this.$refs.generateForm.validate(async (valid) => {
|