feat:项目管理-审计内容7-优化表格生成功能
This commit is contained in:
@@ -464,9 +464,9 @@ export async function exportAssetsTable(data: {
|
|||||||
// =============== 审计内容7:重大投资情况 ===============
|
// =============== 审计内容7:重大投资情况 ===============
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成重大对外投资审计表
|
* 生成重大投资情况审计表
|
||||||
*/
|
*/
|
||||||
export async function generateInvestmentTable(data: {
|
export async function generateInvestmentSituationTable(data: {
|
||||||
kbIds?: string;
|
kbIds?: string;
|
||||||
libraryIds?: string;
|
libraryIds?: string;
|
||||||
projectLibrary?: string;
|
projectLibrary?: string;
|
||||||
@@ -476,7 +476,7 @@ export async function generateInvestmentTable(data: {
|
|||||||
fileList?: any[];
|
fileList?: any[];
|
||||||
}) {
|
}) {
|
||||||
const res = await request.post<ApiResult<any>>(
|
const res = await request.post<ApiResult<any>>(
|
||||||
MODULES_API_URL + '/ai/auditContent7/generateInvestmentTable',
|
MODULES_API_URL + '/ai/auditContent7/generateInvestmentSituationTable',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -487,60 +487,15 @@ export async function generateInvestmentTable(data: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出重大对外投资审计表到Excel
|
* 导出重大投资情况审计表到Excel
|
||||||
*/
|
*/
|
||||||
export async function exportInvestmentTable(data: {
|
export async function exportInvestmentSituationTable(data: {
|
||||||
data?: any[];
|
data?: any[];
|
||||||
companyName?: string;
|
companyName?: string;
|
||||||
auditTime?: string;
|
auditTime?: string;
|
||||||
}) {
|
}) {
|
||||||
const res = await request.post(
|
const res = await request.post(
|
||||||
MODULES_API_URL + '/ai/auditContent7/exportInvestmentTable',
|
MODULES_API_URL + '/ai/auditContent7/exportInvestmentSituationTable',
|
||||||
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<ApiResult<any>>(
|
|
||||||
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',
|
|
||||||
data,
|
data,
|
||||||
{
|
{
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
|
|||||||
@@ -1,22 +1,38 @@
|
|||||||
import { createTestResultRender } from './table2Columns';
|
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: '审计内容',
|
title: '审计内容',
|
||||||
dataIndex: 'auditContent',
|
dataIndex: 'auditContent',
|
||||||
key: 'auditContent',
|
key: 'auditContent',
|
||||||
align: 'left',
|
align: 'center',
|
||||||
width: 300,
|
width: 300,
|
||||||
ellipsis: true
|
// ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '检查的证据及测试内容',
|
title: '检查的证据及测试内容',
|
||||||
dataIndex: 'checkEvidence',
|
dataIndex: 'checkEvidence',
|
||||||
key: 'checkEvidence',
|
key: 'checkEvidence',
|
||||||
align: 'left',
|
align: 'center',
|
||||||
width: 400,
|
width: 400,
|
||||||
ellipsis: true
|
// ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '测试结果',
|
title: '测试结果',
|
||||||
@@ -32,49 +48,7 @@ export const majorInvestmentColumns = [
|
|||||||
key: 'workPaperIndex',
|
key: 'workPaperIndex',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 140,
|
width: 140,
|
||||||
ellipsis: true
|
// 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
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
@@ -84,7 +58,7 @@ export const majorProjectConstructionColumns = [
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// 删除不再需要的单独列配置
|
||||||
export default {
|
export default {
|
||||||
majorInvestmentColumns,
|
investmentSituationColumns
|
||||||
majorProjectConstructionColumns
|
|
||||||
};
|
};
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
// 表格配置管理器
|
|
||||||
export const tableConfigs = {
|
export const tableConfigs = {
|
||||||
// 审计内容1表格配置
|
// 审计内容1表格配置
|
||||||
auditContent1: {
|
auditContent1: {
|
||||||
@@ -81,12 +80,10 @@ export const tableConfigs = {
|
|||||||
type: 'auditContent7',
|
type: 'auditContent7',
|
||||||
title: '重大投资情况',
|
title: '重大投资情况',
|
||||||
options: [
|
options: [
|
||||||
{ title: '重大对外投资审计', value: 'investment', columns: () => import('./table7Columns').then(m => m.majorInvestmentColumns) },
|
{ title: '重大投资情况审计', value: 'investmentSituation', columns: () => import('./table7Columns').then(m => m.investmentSituationColumns) },
|
||||||
{ title: '重大工程建设审计', value: 'projectConstruction', columns: () => import('./table7Columns').then(m => m.majorProjectConstructionColumns) }
|
|
||||||
],
|
],
|
||||||
interfaceMap: {
|
interfaceMap: {
|
||||||
investment: '/api/ai/auditContent7/generateInvestmentTable',
|
investmentSituation: '/api/ai/auditContent7/generateInvestmentSituationTable'
|
||||||
projectConstruction: '/api/ai/auditContent7/generateProjectConstructionTable'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
auditContent8: {
|
auditContent8: {
|
||||||
@@ -207,6 +204,16 @@ export function createDataMapper(type: string) {
|
|||||||
indicatorBalance: formatAmount(item.indicatorBalance), // 指标结余
|
indicatorBalance: formatAmount(item.indicatorBalance), // 指标结余
|
||||||
workPaperIndex: Array.isArray(item.workPaperIndex) ? item.workPaperIndex : [], // 工作底稿索引
|
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 }))
|
default: (data) => data.map((item, index) => ({ key: index, index: index + 1, ...item }))
|
||||||
};
|
};
|
||||||
@@ -245,8 +252,7 @@ export const apiMethodMap = {
|
|||||||
// 审计内容6
|
// 审计内容6
|
||||||
assets: { generate: 'generateAssetsTable', export: 'exportAssetsTable' },
|
assets: { generate: 'generateAssetsTable', export: 'exportAssetsTable' },
|
||||||
// 审计内容7
|
// 审计内容7
|
||||||
investment: { generate: 'generateInvestmentTable', export: 'exportInvestmentTable' },
|
investmentSituation: { generate: 'generateInvestmentSituationTable', export: 'exportInvestmentSituationTable' },
|
||||||
projectConstruction: { generate: 'generateProjectConstructionTable', export: 'exportProjectConstructionTable' },
|
|
||||||
// 审计内容8
|
// 审计内容8
|
||||||
internalControl: { generate: 'generateInternalControlTable', export: 'exportInternalControlTable' },
|
internalControl: { generate: 'generateInternalControlTable', export: 'exportInternalControlTable' },
|
||||||
// 审计内容9
|
// 审计内容9
|
||||||
|
|||||||
Reference in New Issue
Block a user