diff --git a/src/api/ai/auditContent/index.ts b/src/api/ai/auditContent/index.ts index 73b9e1d..d65078b 100644 --- a/src/api/ai/auditContent/index.ts +++ b/src/api/ai/auditContent/index.ts @@ -464,9 +464,9 @@ export async function exportAssetsTable(data: { // =============== 审计内容7:重大投资情况 =============== /** - * 生成重大对外投资审计表 + * 生成重大投资情况审计表 */ -export async function generateInvestmentTable(data: { +export async function generateInvestmentSituationTable(data: { kbIds?: string; libraryIds?: string; projectLibrary?: string; @@ -476,7 +476,7 @@ export async function generateInvestmentTable(data: { fileList?: any[]; }) { const res = await request.post>( - MODULES_API_URL + '/ai/auditContent7/generateInvestmentTable', + MODULES_API_URL + '/ai/auditContent7/generateInvestmentSituationTable', data ); @@ -487,60 +487,15 @@ export async function generateInvestmentTable(data: { } /** - * 导出重大对外投资审计表到Excel + * 导出重大投资情况审计表到Excel */ -export async function exportInvestmentTable(data: { +export async function exportInvestmentSituationTable(data: { data?: any[]; companyName?: string; auditTime?: string; }) { const res = await request.post( - MODULES_API_URL + '/ai/auditContent7/exportInvestmentTable', - data, - { - responseType: 'blob' - } - ); - - if (res.status === 200) { - return res.data; - } - return Promise.reject(new Error('导出失败')); -} - -/** - * 生成重大工程建设审计表 - */ -export async function generateProjectConstructionTable(data: { - kbIds?: string; - libraryIds?: string; - projectLibrary?: string; - history?: string; - suggestion?: string; - docList?: any[]; - fileList?: any[]; -}) { - const res = await request.post>( - MODULES_API_URL + '/ai/auditContent7/generateProjectConstructionTable', - data - ); - - if (res.data.code === 0) { - return res.data; - } - return Promise.reject(new Error(res.data.message)); -} - -/** - * 导出重大工程建设审计表到Excel - */ -export async function exportProjectConstructionTable(data: { - data?: any[]; - companyName?: string; - auditTime?: string; -}) { - const res = await request.post( - MODULES_API_URL + '/ai/auditContent7/exportProjectConstructionTable', + MODULES_API_URL + '/ai/auditContent7/exportInvestmentSituationTable', data, { responseType: 'blob' diff --git a/src/views/pwl/pwlProject/components/data/table7Columns.ts b/src/views/pwl/pwlProject/components/data/table7Columns.ts index 5ed5a3e..1171b36 100644 --- a/src/views/pwl/pwlProject/components/data/table7Columns.ts +++ b/src/views/pwl/pwlProject/components/data/table7Columns.ts @@ -1,22 +1,38 @@ import { createTestResultRender } from './table2Columns'; -// 重大对外投资审计表格列 -export const majorInvestmentColumns = [ +// 重大投资情况审计表格列 +export const investmentSituationColumns = [ + { + title: '', + dataIndex: 'category', + key: 'category', + width: 150, + align: 'center', + // filters: [ + // { text: '重大对外投资审计', value: '重大对外投资审计' }, + // { text: '重大工程建设审计', value: '重大工程建设审计' }, + // { text: '重大资本运作审计', value: '重大资本运作审计' }, + // { text: '重大资产处置审计', value: '重大资产处置审计' }, + // { text: '重大物资(服务)采购审计', value: '重大物资(服务)采购审计' }, + // { text: '重大担保借款审计', value: '重大担保借款审计' }, + // ], + // onFilter: (value, record) => record.category === value, + }, { title: '审计内容', dataIndex: 'auditContent', key: 'auditContent', - align: 'left', + align: 'center', width: 300, - ellipsis: true + // ellipsis: true }, { title: '检查的证据及测试内容', dataIndex: 'checkEvidence', key: 'checkEvidence', - align: 'left', + align: 'center', width: 400, - ellipsis: true + // ellipsis: true }, { title: '测试结果', @@ -32,49 +48,7 @@ export const majorInvestmentColumns = [ key: 'workPaperIndex', align: 'center', width: 140, - ellipsis: true - }, - { - title: '操作', - key: 'action', - align: 'center', - width: 100 - } -]; - -// 重大工程建设审计表格列 -export const majorProjectConstructionColumns = [ - { - title: '审计内容', - dataIndex: 'auditContent', - key: 'auditContent', - align: 'left', - width: 250, - ellipsis: true - }, - { - title: '检查的证据及测试内容', - dataIndex: 'checkEvidence', - key: 'checkEvidence', - align: 'left', - width: 350, - ellipsis: true - }, - { - title: '测试结果', - dataIndex: 'testResult', - key: 'testResult', - align: 'center', - width: 100, - customRender: createTestResultRender() - }, - { - title: '工作底稿索引', - dataIndex: 'workPaperIndex', - key: 'workPaperIndex', - align: 'center', - width: 140, - ellipsis: true + // ellipsis: true }, { title: '操作', @@ -84,7 +58,7 @@ export const majorProjectConstructionColumns = [ } ]; +// 删除不再需要的单独列配置 export default { - majorInvestmentColumns, - majorProjectConstructionColumns + investmentSituationColumns }; \ No newline at end of file diff --git a/src/views/pwl/pwlProject/components/data/tableCommon.ts b/src/views/pwl/pwlProject/components/data/tableCommon.ts index e4bb321..5172e6d 100644 --- a/src/views/pwl/pwlProject/components/data/tableCommon.ts +++ b/src/views/pwl/pwlProject/components/data/tableCommon.ts @@ -1,4 +1,3 @@ -// 表格配置管理器 export const tableConfigs = { // 审计内容1表格配置 auditContent1: { @@ -81,12 +80,10 @@ export const tableConfigs = { type: 'auditContent7', title: '重大投资情况', options: [ - { title: '重大对外投资审计', value: 'investment', columns: () => import('./table7Columns').then(m => m.majorInvestmentColumns) }, - { title: '重大工程建设审计', value: 'projectConstruction', columns: () => import('./table7Columns').then(m => m.majorProjectConstructionColumns) } + { title: '重大投资情况审计', value: 'investmentSituation', columns: () => import('./table7Columns').then(m => m.investmentSituationColumns) }, ], interfaceMap: { - investment: '/api/ai/auditContent7/generateInvestmentTable', - projectConstruction: '/api/ai/auditContent7/generateProjectConstructionTable' + investmentSituation: '/api/ai/auditContent7/generateInvestmentSituationTable' } }, auditContent8: { @@ -207,6 +204,16 @@ export function createDataMapper(type: string) { indicatorBalance: formatAmount(item.indicatorBalance), // 指标结余 workPaperIndex: Array.isArray(item.workPaperIndex) ? item.workPaperIndex : [], // 工作底稿索引 })), + investmentSituation: (data) => data.map((item, index) => ({ + key: index, + index: index + 1, + category: item.category || '未分类', + auditContent: item.auditContent || item.content || '', + checkEvidence: item.checkEvidence || item.evidence || '', + testResult: item.testResult || '待检查', + workPaperIndex: Array.isArray(item.workPaperIndex) ? item.workPaperIndex : [], + ...item + })), // 其他类型的映射... default: (data) => data.map((item, index) => ({ key: index, index: index + 1, ...item })) }; @@ -245,8 +252,7 @@ export const apiMethodMap = { // 审计内容6 assets: { generate: 'generateAssetsTable', export: 'exportAssetsTable' }, // 审计内容7 - investment: { generate: 'generateInvestmentTable', export: 'exportInvestmentTable' }, - projectConstruction: { generate: 'generateProjectConstructionTable', export: 'exportProjectConstructionTable' }, + investmentSituation: { generate: 'generateInvestmentSituationTable', export: 'exportInvestmentSituationTable' }, // 审计内容8 internalControl: { generate: 'generateInternalControlTable', export: 'exportInternalControlTable' }, // 审计内容9