1、调整取证单审计人员数据来源

2、调整工作底稿索引格式
This commit is contained in:
2026-01-30 19:50:23 +08:00
parent 3abf43e054
commit fb71c9e54e
2 changed files with 52 additions and 19 deletions

View File

@@ -251,6 +251,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { PropType, reactive, ref, watch } from 'vue'; import { PropType, reactive, ref, watch } from 'vue';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { PwlProject } from '@/api/pwl/pwlProject/model';
type BaseInfo = { type BaseInfo = {
caseIndex?: string; caseIndex?: string;
@@ -268,6 +269,10 @@
type: Object as PropType<BaseInfo>, type: Object as PropType<BaseInfo>,
default: () => ({}) default: () => ({})
}, },
project: {
type: Object as PropType<PwlProject>,
default: () => ({})
},
selectedRows: { selectedRows: {
type: Array as PropType<any[]>, type: Array as PropType<any[]>,
default: () => [] default: () => []
@@ -329,7 +334,12 @@
evidenceData.evidenceBasis || form.evidenceBasis || ''; evidenceData.evidenceBasis || form.evidenceBasis || '';
form.handling = evidenceData.handling || form.handling || ''; form.handling = evidenceData.handling || form.handling || '';
form.suggestion = evidenceData.suggestion || form.suggestion || ''; form.suggestion = evidenceData.suggestion || form.suggestion || '';
form.auditors = evidenceData.auditors || form.auditors || ''; // form.auditors = evidenceData.auditors || form.auditors || '';
form.auditors = '';
if (props.project && props.project.saleUser) {
const saleUser = JSON.parse(props.project.saleUser);
form.auditors = saleUser.join();
}
form.compileDate = evidenceData.compileDate || form.compileDate || ''; form.compileDate = evidenceData.compileDate || form.compileDate || '';
// form.providerOpinion = // form.providerOpinion =
// evidenceData.providerOpinion || form.providerOpinion || ''; // evidenceData.providerOpinion || form.providerOpinion || '';
@@ -391,6 +401,16 @@
{ deep: true } { deep: true }
); );
watch(
() => props.project,
() => {
if (props.visible) {
applyBaseInfo();
}
},
{ deep: true }
);
watch( watch(
() => props.selectedRows, () => props.selectedRows,
() => { () => {

View File

@@ -218,8 +218,8 @@
<a-button @click="openEvidenceModal(index)" <a-button @click="openEvidenceModal(index)"
>导出取证单</a-button >导出取证单</a-button
> >
<a-button <a-button
type="primary" type="primary"
@click="generateEvidence(index)" @click="generateEvidence(index)"
:loading="generatingEvidenceStates[getTableKey(index)]" :loading="generatingEvidenceStates[getTableKey(index)]"
> >
@@ -340,12 +340,24 @@
class="file-link cursor-pointer text-wrap" class="file-link cursor-pointer text-wrap"
style="color: #1890ff; text-decoration: none" style="color: #1890ff; text-decoration: none"
> >
{{ fileItem.fileName || '未命名文件' }} {{
(record.cateIndex || '审计-[2026]-xxx') +
'-' +
String(fileIndex + 1).padStart(3, '0') +
'-' +
(fileItem.fileName || '未命名文件')
}}
</a> </a>
<!-- 旧格式兼容 --> <!-- 旧格式兼容 -->
<span v-else class="cursor-pointer text-wrap"> <span v-else class="cursor-pointer text-wrap">
{{ fileItem.fileName || fileItem || '未命名文件' }} {{
(record.cateIndex || '审计-[2026]-xxx') +
'-' +
String(fileIndex + 1).padStart(3, '0') +
'-' +
(fileItem.fileName || fileItem || '未命名文件')
}}
</span> </span>
</div> </div>
</div> </div>
@@ -505,6 +517,7 @@
<EvidenceModal <EvidenceModal
v-model:visible="evidenceModalVisible" v-model:visible="evidenceModalVisible"
:base-info="evidenceBaseInfo" :base-info="evidenceBaseInfo"
:project="data"
:selected-rows="evidenceSelectedRows" :selected-rows="evidenceSelectedRows"
/> />
</a-drawer> </a-drawer>
@@ -941,7 +954,7 @@
try { try {
// 获取当前表格的生成数据 // 获取当前表格的生成数据
const generationData = getTableGenerationData(tableKey); const generationData = getTableGenerationData(tableKey);
// 构建history参数使用当前表格的responseData内容 // 构建history参数使用当前表格的responseData内容
let historyData = ''; let historyData = '';
if (generationData && generationData.responseData) { if (generationData && generationData.responseData) {
@@ -981,10 +994,10 @@
providerDate: '', providerDate: '',
attachmentPages: '', attachmentPages: '',
feedbackDeadline: '', feedbackDeadline: '',
// 历史内容(用于工作流生成) // 历史内容(用于工作流生成)
history: historyData, history: historyData,
// 项目相关参数 // 项目相关参数
projectId: props.data?.id || '', projectId: props.data?.id || '',
kbIds: props.data?.kbId || '', kbIds: props.data?.kbId || '',
@@ -992,7 +1005,7 @@
projectLibrary: props.data?.projectLibrary || '', projectLibrary: props.data?.projectLibrary || '',
docList: checkedDirKeys.value, docList: checkedDirKeys.value,
fileList: selectedFileKeys.value, fileList: selectedFileKeys.value,
// 重大经济决策调查表需要三重一大数据 // 重大经济决策调查表需要三重一大数据
...(currentTable.value === 'decisionTable' ...(currentTable.value === 'decisionTable'
? { data: tripleOneData.value } ? { data: tripleOneData.value }
@@ -1005,7 +1018,7 @@
...(currentTable.value === 'budgetExecution' ...(currentTable.value === 'budgetExecution'
? { data: tableData['auditContent5_budgetManage'] } ? { data: tableData['auditContent5_budgetManage'] }
: {}), : {}),
// 用户信息(后端会自动设置,这里可以留空或传空字符串) // 用户信息(后端会自动设置,这里可以留空或传空字符串)
userName: '' userName: ''
}; };
@@ -1014,15 +1027,15 @@
if (apiResult.code === 0 && apiResult.data?.success) { if (apiResult.code === 0 && apiResult.data?.success) {
message.success('取证单生成成功'); message.success('取证单生成成功');
console.log('生成的取证单数据:', apiResult.data); console.log('生成的取证单数据:', apiResult.data);
// 自动打开取证单预览弹窗并填充数据 // 自动打开取证单预览弹窗并填充数据
evidenceBaseInfo.caseIndex = apiResult.data.caseIndex || (form as any).code || props.data?.code || ''; evidenceBaseInfo.caseIndex = apiResult.data.caseIndex || (form as any).code || props.data?.code || '';
evidenceBaseInfo.projectName = apiResult.data.projectName || form.name || props.data?.name || ''; evidenceBaseInfo.projectName = apiResult.data.projectName || form.name || props.data?.name || '';
evidenceBaseInfo.auditedTarget = apiResult.data.auditedTarget || (form as any).nickname || (props.data as any)?.nickname || ''; evidenceBaseInfo.auditedTarget = apiResult.data.auditedTarget || (form as any).nickname || (props.data as any)?.nickname || '';
evidenceBaseInfo.auditMatter = apiResult.data.auditMatter || currentTable.title || section?.title || section?.name || ''; evidenceBaseInfo.auditMatter = apiResult.data.auditMatter || currentTable.title || section?.title || section?.name || '';
// 将生成的取证单数据作为选中的行数据传入,包含所有字段 // 将生成的取证单数据作为选中的行数据传入,包含所有字段
const evidenceData = { const evidenceData = {
// 基础信息字段 // 基础信息字段
@@ -1042,22 +1055,22 @@
providerDate: apiResult.data.providerDate || '', providerDate: apiResult.data.providerDate || '',
attachmentPages: apiResult.data.attachmentPages || '', attachmentPages: apiResult.data.attachmentPages || '',
feedbackDeadline: apiResult.data.feedbackDeadline || '', feedbackDeadline: apiResult.data.feedbackDeadline || '',
// 处理附件字段,如果是数组则转换为字符串 // 处理附件字段,如果是数组则转换为字符串
attachment: Array.isArray(apiResult.data.attachment) attachment: Array.isArray(apiResult.data.attachment)
? apiResult.data.attachment.join('\n') ? apiResult.data.attachment.join('\n')
: apiResult.data.attachment || '', : apiResult.data.attachment || '',
// 确保页码字段有默认值 // 确保页码字段有默认值
pageIndex: '1', pageIndex: '1',
pageTotal: '1', pageTotal: '1',
// 保留其他可能的字段如success、processing_time、generated_time等 // 保留其他可能的字段如success、processing_time、generated_time等
success: apiResult.data.success, success: apiResult.data.success,
processing_time: apiResult.data.processing_time, processing_time: apiResult.data.processing_time,
generated_time: apiResult.data.generated_time generated_time: apiResult.data.generated_time
}; };
evidenceSelectedRows.value = [evidenceData]; evidenceSelectedRows.value = [evidenceData];
evidenceModalVisible.value = true; evidenceModalVisible.value = true;
} else { } else {