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