1、新增生成条数

2、新增生成记录
This commit is contained in:
2025-11-17 10:27:30 +08:00
parent fa26684612
commit d24ee4e730
3 changed files with 404 additions and 24 deletions

View File

@@ -0,0 +1,357 @@
<!-- 编辑弹窗 -->
<template>
<ele-modal
width="80%"
:visible="visible"
:maskClosable="false"
title="历史记录"
:body-style="{ paddingBottom: '28px' }"
@update:visible="updateVisible"
:footer="null"
>
<ele-pro-table
ref="tableRef"
row-key="id"
:columns="columns"
:datasource="datasource"
:customRow="customRow"
:scroll="{ x: 4000 }"
tool-class="ele-toolbar-form"
class="sys-org-table"
bordered
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<a-tag v-if="record.status === 0" color="green">已完成</a-tag>
<a-tag v-if="record.status === 1" color="red">未完成</a-tag>
</template>
<template v-if="column.key === 'draftUser'">
<a-space direction="vertical" v-if="record.draftUser">
<a-tag
v-for="(item, index) in JSON.parse(record.draftUser)"
:key="index"
>{{ item }}</a-tag
>
</a-space>
</template>
<template v-if="column.key === 'users'">
<a-space direction="vertical" v-if="record.users">
<a-tag
v-for="(item, index) in JSON.parse(record.users)"
:key="index"
>{{ item }}</a-tag
>
</a-space>
</template>
<template v-if="column.key === 'signUser'">
<a-space direction="vertical" v-if="record.signUser">
<a-tag
v-for="(item, index) in JSON.parse(record.signUser)"
:key="index"
>{{ item }}</a-tag
>
</a-space>
</template>
<template v-if="column.key === 'saleUser'">
<a-space direction="vertical" v-if="record.saleUser">
<a-tag
v-for="(item, index) in JSON.parse(record.saleUser)"
:key="index"
>{{ item }}</a-tag
>
</a-space>
</template>
<template v-if="column.key === 'electron'">
<span>电子</span>
<a-tag v-if="record.electron === 0" color="green">已完成</a-tag>
<a-tag v-else color="red">未完成</a-tag>
<span>纸质</span>
<a-tag v-if="record.paper === 0" color="green">已完成</a-tag>
<a-tag v-else color="red">未完成</a-tag>
</template>
<template v-if="column.key === 'createTime'">
<a-tooltip
:title="`创建于:${record.createTime}`"
class="flex flex-col"
>
<a-space>
<span>{{ toDateString(record.createTime, 'YYYY-MM-dd') }}</span>
<a-avatar :src="record.avatar" size="small" />
</a-space>
</a-tooltip>
</template>
</template>
</ele-pro-table>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref, reactive, watch } from 'vue';
import { type EleProTable, toDateString } from 'ele-admin-pro';
import Search from '@/views/pwl/pwlProject/components/search.vue';
import type {
ColumnItem,
DatasourceFunction
} from 'ele-admin-pro/es/ele-pro-table/types';
import { pagePwlProject } from '@/api/pwl/pwlProject';
import type { PwlProjectParam } from '@/api/pwl/pwlProject/model';
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
}>();
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
const emit = defineEmits<{
(e: 'update:visible', visible: boolean): void;
}>();
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
return pagePwlProject({
...where,
...orders,
page,
limit
});
};
// 表格列配置
const columns = ref<ColumnItem[]>([
{
title: '序号',
key: 'index',
width: 48,
fixed: 'left',
align: 'center',
customRender: ({ index }) => index + (tableRef.value?.tableIndex ?? 0)
},
{
title: '被审计单位',
dataIndex: 'name',
key: 'name',
width: 240,
fixed: 'left',
align: 'center'
},
{
title: '项目名称',
dataIndex: 'code',
key: 'code',
width: 240,
sorter: true,
align: 'center'
},
{
title: '项目完成进度',
dataIndex: 'status',
key: 'status',
width: 120,
align: 'center'
},
{
title: '报告时间',
dataIndex: 'expirationTime',
key: 'expirationTime',
align: 'center',
width: 120
},
// {
// title: '类型',
// dataIndex: 'type',
// key: 'type',
// align: 'center',
// customRender: ({text}) => ['审字', '专审', '验证', '咨询'][text]
// },
{
title: '项目信息',
dataIndex: 'itemName',
key: 'itemName',
align: 'center',
children: [
{
title: '开票单位/汇款人',
dataIndex: 'itemName',
key: 'itemName',
align: 'center',
width: 180
},
{
title: '所属年度',
dataIndex: 'itemYear',
key: 'itemYear',
align: 'center'
},
{
title: '类型',
dataIndex: 'itemType',
key: 'itemType',
align: 'center'
},
{
title: '审计意见',
dataIndex: 'itemOpinion',
key: 'itemOpinion',
align: 'center'
}
]
},
{
title: '年末资产总额(万元)',
dataIndex: 'totalAssets',
key: 'totalAssets',
align: 'center',
width: 170
},
{
title: '合同金额',
dataIndex: 'contractPrice',
key: 'contractPrice',
align: 'center'
},
{
title: '实收金额',
dataIndex: 'payPrice',
key: 'payPrice',
align: 'center',
width: 120
},
{
title: '到账信息',
dataIndex: 'itemName',
key: 'itemName',
align: 'center',
children: [
{
title: '银行',
dataIndex: 'bankName',
key: 'bankName',
align: 'center',
width: 120
},
{
title: '日期',
dataIndex: 'bankPayTime',
key: 'bankPayTime',
align: 'center',
width: 120
},
{
title: '金额',
dataIndex: 'bankPrice',
key: 'bankPrice',
align: 'center',
width: 120
}
]
},
{
title: '开票信息',
dataIndex: 'invoice',
key: 'invoice',
align: 'center',
children: [
{
title: '日期',
dataIndex: 'invoiceTime',
key: 'invoiceTime',
align: 'center',
width: 120
},
{
title: '金额',
dataIndex: 'invoicePrice',
key: 'invoicePrice',
align: 'center',
width: 120
},
{
title: '发票类型',
dataIndex: 'invoiceType',
key: 'invoiceType',
align: 'center',
width: 120
}
]
},
{
title: '报告份数',
dataIndex: 'reportNum',
key: 'reportNum',
align: 'center',
width: 90
},
{
title: '底稿人员',
dataIndex: 'draftUser',
key: 'draftUser',
align: 'center',
width: 90
},
{
title: '参与成员',
dataIndex: 'users',
key: 'users',
align: 'center',
width: 180
},
{
title: '签字注会',
dataIndex: 'signUser',
key: 'signUser',
align: 'center',
width: 90
},
{
title: '展业人员',
dataIndex: 'saleUser',
key: 'saleUser',
align: 'center',
width: 90
},
{
title: '底稿完成情况',
dataIndex: 'electron',
key: 'electron',
align: 'center',
width: 120
},
{
title: '备注',
dataIndex: 'comments',
key: 'comments',
align: 'center',
width: 180
},
{
title: '生成时间',
dataIndex: 'createTime',
key: 'createTime',
align: 'center',
sorter: true,
width: 180,
ellipsis: true,
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm')
}
]);
/* 搜索 */
const reload = (where?: PwlProjectParam) => {
selection.value = [];
tableRef?.value?.reload({ where: where });
};
watch(
() => props.visible,
(visible) => {
if (visible) {
} else {
}
},
{ immediate: true }
);
</script>

View File

@@ -19,7 +19,8 @@ export default ref([
extra1: true, extra1: true,
file1: true, file1: true,
mode: 'table', mode: 'table',
columns: table1Columns.columns0 columns: table1Columns.columns0,
count: 1
}, },
{ {
number: '二', number: '二',
@@ -32,7 +33,8 @@ export default ref([
formCommit: 20, formCommit: 20,
rows: 6, rows: 6,
generating: false, generating: false,
mode: 'text' mode: 'text',
count: 2
}, },
{ {
number: '三', number: '三',
@@ -45,7 +47,8 @@ export default ref([
generateMethod: null, generateMethod: null,
mode: 'table', mode: 'table',
columns: table3Columns.columns0, columns: table3Columns.columns0,
data: [] data: [],
count: 3
}, },
{ {
number: '四', number: '四',
@@ -54,7 +57,8 @@ export default ref([
description: '点击"AI生成"按钮让AI为您生成该部分内容或直接在下方编辑', description: '点击"AI生成"按钮让AI为您生成该部分内容或直接在下方编辑',
generating: false, generating: false,
mode: 'table', mode: 'table',
columns: table4Columns.columns0 columns: table4Columns.columns0,
count: 4
}, },
{ {
number: '五', number: '五',
@@ -63,7 +67,8 @@ export default ref([
description: '点击"AI生成"按钮让AI为您生成该部分内容或直接在下方编辑', description: '点击"AI生成"按钮让AI为您生成该部分内容或直接在下方编辑',
generating: false, generating: false,
mode: 'text', mode: 'text',
columns: [] columns: [],
count: 5
}, },
{ {
number: '六', number: '六',
@@ -72,6 +77,7 @@ export default ref([
description: '点击"AI生成"按钮让AI为您生成该部分内容或直接在下方编辑', description: '点击"AI生成"按钮让AI为您生成该部分内容或直接在下方编辑',
generating: false, generating: false,
mode: 'text', mode: 'text',
count: 6,
textareaList: [ textareaList: [
{ {
label: '审查财务支出凭据', label: '审查财务支出凭据',
@@ -108,7 +114,8 @@ export default ref([
rows: 8, rows: 8,
generating: false, generating: false,
mode: 'text', mode: 'text',
columns columns,
count: 7
}, },
{ {
number: '八', number: '八',
@@ -122,6 +129,7 @@ export default ref([
rows: 10, rows: 10,
generating: false, generating: false,
mode: 'radio', mode: 'radio',
count: 8,
radioList: [ radioList: [
{ {
label: '1审计是否确定内部控制职能部门或牵头部门。', label: '1审计是否确定内部控制职能部门或牵头部门。',
@@ -220,7 +228,8 @@ export default ref([
formCommit: 90, formCommit: 90,
rows: 8, rows: 8,
generating: false, generating: false,
mode: 'text' mode: 'text',
count: 9
}, },
{ {
number: '十', number: '十',
@@ -234,6 +243,7 @@ export default ref([
rows: 8, rows: 8,
generating: false, generating: false,
mode: 'table', mode: 'table',
count: 10,
columns: [ columns: [
{ {
title: '大类', title: '大类',

View File

@@ -215,24 +215,30 @@
</a-button> </a-button>
</a-space> </a-space>
</template> </template>
<template v-if="item.extra1"> <div class="flex justify-between items-center">
<div class="mb-2"> <div class="flex justify-start items-center">
<TableSwitcher <template v-if="item.extra1">
:title="table1Title" <div class="mb-2">
:btns="['贯彻决策部署', '领导班子名单', '决策支出表']" <TableSwitcher
@change="changeTable1" :title="table1Title"
/> :btns="['贯彻决策部署', '领导班子名单', '决策支出表']"
@change="changeTable1"
/>
</div>
</template>
<template v-if="item.extra3">
<div class="mb-2">
<TableSwitcher
:title="table3Title"
:btns="['重大经济决策调查表', '三重一大']"
@change="changeTable3"
/>
</div>
</template>
<span class="ml-2">共生成{{ item.count }}条数据</span>
</div> </div>
</template> <a @click="openHistory" class="cursor-pointer">历史记录</a>
<template v-if="item.extra3"> </div>
<div class="mb-2">
<TableSwitcher
:title="table3Title"
:btns="['重大经济决策调查表', '三重一大']"
@change="changeTable3"
/>
</div>
</template>
<a-table <a-table
v-if="item.mode === 'table'" v-if="item.mode === 'table'"
:columns="item.columns" :columns="item.columns"
@@ -369,6 +375,7 @@
<!-- 返回顶部按钮 --> <!-- 返回顶部按钮 -->
<a-back-top :target="getScrollContainer" /> <a-back-top :target="getScrollContainer" />
<FileModal ref="fileModal" :current-company-id="currentCompanyId" /> <FileModal ref="fileModal" :current-company-id="currentCompanyId" />
<HistoryModal v-model:visible="showHistory"/>
<!-- 文档选择弹窗 --> <!-- 文档选择弹窗 -->
</a-drawer> </a-drawer>
@@ -408,6 +415,7 @@
buildExportData, buildExportData,
hasContent hasContent
} from './data/funcs'; } from './data/funcs';
import HistoryModal from '@/views/pwl/pwlProject/components/components/HistoryModal.vue';
const useForm = Form.useForm; const useForm = Form.useForm;
@@ -1126,6 +1134,11 @@
} }
} }
); );
const showHistory = ref(false);
const openHistory = () => {
showHistory.value = true;
};
</script> </script>
<script lang="ts"> <script lang="ts">