|
|
@@ -1,315 +1,457 @@
|
|
|
<template>
|
|
|
- <div class="material-tab">
|
|
|
- <!-- <span class="link-text">被监审单位需报送材料:</span> -->
|
|
|
- <!-- <el-button
|
|
|
- plain
|
|
|
- type="success"
|
|
|
- icon="el-icon-circle-plus"
|
|
|
- style="margin-bottom: 20px"
|
|
|
- :disabled="isView"
|
|
|
- @click="handleAddMaterial"
|
|
|
- >
|
|
|
- 添加材料
|
|
|
- </el-button> -->
|
|
|
- <CostAuditTable
|
|
|
- v-loading="loading"
|
|
|
- :table-data="actualMaterialData.list"
|
|
|
- :columns="actualMaterialData.materialColumns"
|
|
|
- :show-index="true"
|
|
|
- :show-pagination="true"
|
|
|
- :show-action-column="true"
|
|
|
- :pagination="actualMaterialData.pagination"
|
|
|
- @pagination-change="handlePaginationChange"
|
|
|
+ <div class="material-tab-container">
|
|
|
+ <!-- 综合性资料 -->
|
|
|
+ <div v-if="materialGroups.comprehensive.length > 0" class="material-group">
|
|
|
+ <h4 class="group-title">综合性资料</h4>
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="materialGroups.comprehensive"
|
|
|
+ style="width: 100%"
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <el-table-column prop="orderNum" label="序号" width="80" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="informationName"
|
|
|
+ label="报送资料"
|
|
|
+ min-width="200"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="informationTypeName"
|
|
|
+ label="资料类型"
|
|
|
+ min-width="150"
|
|
|
+ align="center"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="isRequired"
|
|
|
+ label="是否必项"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{
|
|
|
+ scope.row.isRequired === '1' || scope.row.isRequired === 1
|
|
|
+ ? '是'
|
|
|
+ : '否'
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="isUpload"
|
|
|
+ label="是否上传"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span
|
|
|
+ :class="
|
|
|
+ scope.row.isUpload === '1' || scope.row.isUpload === 1
|
|
|
+ ? 'status-uploaded'
|
|
|
+ : 'status-not-uploaded'
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ scope.row.isUpload === '1' || scope.row.isUpload === 1
|
|
|
+ ? '已上传'
|
|
|
+ : '未上传'
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="updateTime"
|
|
|
+ label="上传时间"
|
|
|
+ min-width="180"
|
|
|
+ align="center"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="auditedStatus"
|
|
|
+ label="初审结果"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ formatAuditStatus(scope.row.auditedStatus) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="100" align="center" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="handleViewDetail(scope.row)"
|
|
|
+ >
|
|
|
+ 查看
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 财务会计资料 -->
|
|
|
+ <div v-if="materialGroups.financial.length > 0" class="material-group">
|
|
|
+ <h4 class="group-title">财务会计资料</h4>
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="materialGroups.financial"
|
|
|
+ style="width: 100%"
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <el-table-column prop="orderNum" label="序号" width="80" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="informationName"
|
|
|
+ label="报送资料"
|
|
|
+ min-width="200"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="informationTypeName"
|
|
|
+ label="资料类型"
|
|
|
+ min-width="150"
|
|
|
+ align="center"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="isRequired"
|
|
|
+ label="是否必项"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{
|
|
|
+ scope.row.isRequired === '1' || scope.row.isRequired === 1
|
|
|
+ ? '是'
|
|
|
+ : '否'
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="isUpload"
|
|
|
+ label="是否上传"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span
|
|
|
+ :class="
|
|
|
+ scope.row.isUpload === '1' || scope.row.isUpload === 1
|
|
|
+ ? 'status-uploaded'
|
|
|
+ : 'status-not-uploaded'
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ scope.row.isUpload === '1' || scope.row.isUpload === 1
|
|
|
+ ? '已上传'
|
|
|
+ : '未上传'
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="updateTime"
|
|
|
+ label="上传时间"
|
|
|
+ min-width="180"
|
|
|
+ align="center"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="auditedStatus"
|
|
|
+ label="初审结果"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ formatAuditStatus(scope.row.auditedStatus) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="100" align="center" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="handleViewDetail(scope.row)"
|
|
|
+ >
|
|
|
+ 查看
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 其他资料 -->
|
|
|
+ <div v-if="materialGroups.other.length > 0" class="material-group">
|
|
|
+ <h4 class="group-title">其他资料</h4>
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="materialGroups.other"
|
|
|
+ style="width: 100%"
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <el-table-column prop="orderNum" label="序号" width="80" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="informationName"
|
|
|
+ label="报送资料"
|
|
|
+ min-width="200"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="informationTypeName"
|
|
|
+ label="资料类型"
|
|
|
+ min-width="150"
|
|
|
+ align="center"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="isRequired"
|
|
|
+ label="是否必项"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{
|
|
|
+ scope.row.isRequired === '1' || scope.row.isRequired === 1
|
|
|
+ ? '是'
|
|
|
+ : '否'
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="isUpload"
|
|
|
+ label="是否上传"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span
|
|
|
+ :class="
|
|
|
+ scope.row.isUpload === '1' || scope.row.isUpload === 1
|
|
|
+ ? 'status-uploaded'
|
|
|
+ : 'status-not-uploaded'
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ scope.row.isUpload === '1' || scope.row.isUpload === 1
|
|
|
+ ? '已上传'
|
|
|
+ : '未上传'
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="updateTime"
|
|
|
+ label="上传时间"
|
|
|
+ min-width="180"
|
|
|
+ align="center"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="auditedStatus"
|
|
|
+ label="初审结果"
|
|
|
+ min-width="120"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ formatAuditStatus(scope.row.auditedStatus) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="100" align="center" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="handleViewDetail(scope.row)"
|
|
|
+ >
|
|
|
+ 查看
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 无数据提示 -->
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ materialGroups.comprehensive.length === 0 &&
|
|
|
+ materialGroups.financial.length === 0 &&
|
|
|
+ materialGroups.other.length === 0 &&
|
|
|
+ !loading
|
|
|
+ "
|
|
|
+ class="no-data-tip"
|
|
|
>
|
|
|
- <template #orderNum="scope">
|
|
|
- <el-input
|
|
|
- v-model="scope.row.orderNum"
|
|
|
- size="mini"
|
|
|
- style="width: 60px"
|
|
|
- @blur="handleSortChange(scope.row)"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
- </CostAuditTable>
|
|
|
- <legal-dialog
|
|
|
- ref="legalDialog"
|
|
|
- :dialog-visible="materialData.materialDialogVisible"
|
|
|
- :dialog-title="materialData.materialDialogTitle"
|
|
|
- :template-data="templateData"
|
|
|
- :template-columns="templateColumns"
|
|
|
- :form-data="formData.material"
|
|
|
- @submit="handleMaterialSubmit"
|
|
|
- @cancel="handleMaterialCancel"
|
|
|
- />
|
|
|
+ <p>暂无报送资料数据</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {
|
|
|
- addCostProjectMaterial,
|
|
|
- updateCostProjectMaterial,
|
|
|
- deleteCostProjectMaterial,
|
|
|
- getCostProjectMaterialDetail,
|
|
|
- } from '@/api/taskCustomizedRelease.js'
|
|
|
- import CostAuditTable from '@/components/costAudit/CostAuditTable.vue'
|
|
|
- import LegalDialog from '@/views/costAudit/baseInfo/catalogManage/legalDialog.vue'
|
|
|
+ import { getMaterialByTaskId } from '@/api/home'
|
|
|
+
|
|
|
export default {
|
|
|
- components: {
|
|
|
- CostAuditTable,
|
|
|
- LegalDialog,
|
|
|
- },
|
|
|
+ name: 'MaterialTab',
|
|
|
props: {
|
|
|
project: {
|
|
|
type: Object,
|
|
|
- default: () => {},
|
|
|
+ default: () => ({}),
|
|
|
},
|
|
|
isView: {
|
|
|
type: Boolean,
|
|
|
default: false,
|
|
|
},
|
|
|
- materialData: {
|
|
|
- type: Object,
|
|
|
- default: () => ({
|
|
|
- list: [],
|
|
|
- pagination: {
|
|
|
- currentPage: 1,
|
|
|
- pageSize: 50,
|
|
|
- total: 0,
|
|
|
- },
|
|
|
- materialColumns: [],
|
|
|
- materialDialogVisible: false,
|
|
|
- materialDialogTitle: '添加',
|
|
|
- }),
|
|
|
- },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
loading: false,
|
|
|
- projectIdCache: null, // 缓存已加载的 projectId,避免重复加载
|
|
|
- templateData: [],
|
|
|
- templateColumns: [
|
|
|
- {
|
|
|
- prop: 'surveyTemplateName',
|
|
|
- label: '模板名称',
|
|
|
- align: 'center',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'surveyTemplateCode',
|
|
|
- label: '模板编码',
|
|
|
- align: 'center',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'createTime',
|
|
|
- label: '创建时间',
|
|
|
- align: 'center',
|
|
|
- },
|
|
|
- ],
|
|
|
- formData: {
|
|
|
- material: {},
|
|
|
- },
|
|
|
- // 内部管理的数据
|
|
|
- internalMaterialData: {
|
|
|
- list: [],
|
|
|
- pagination: {
|
|
|
- currentPage: 1,
|
|
|
- pageSize: 50,
|
|
|
- total: 0,
|
|
|
- },
|
|
|
+ materialData: [],
|
|
|
+ materialGroups: {
|
|
|
+ comprehensive: [], // 综合性资料
|
|
|
+ financial: [], // 财务会计资料
|
|
|
+ other: [], // 其他资料
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- // 合并外部 materialData 和内部数据
|
|
|
- actualMaterialData() {
|
|
|
- return {
|
|
|
- ...this.materialData,
|
|
|
- list: this.internalMaterialData.list,
|
|
|
- pagination: this.internalMaterialData.pagination,
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
watch: {
|
|
|
project: {
|
|
|
handler(newVal) {
|
|
|
- if (newVal && newVal.projectId) {
|
|
|
- // 如果 projectId 没有变化,不重复加载
|
|
|
- if (this.projectIdCache === newVal.projectId) {
|
|
|
- return
|
|
|
- }
|
|
|
- this.projectIdCache = newVal.projectId
|
|
|
- // 重置分页
|
|
|
- this.internalMaterialData.pagination.currentPage = 1
|
|
|
- // 调用接口加载数据
|
|
|
+ if (newVal && newVal.taskId) {
|
|
|
this.loadMaterialData()
|
|
|
}
|
|
|
},
|
|
|
deep: true,
|
|
|
immediate: true,
|
|
|
},
|
|
|
- materialData: {
|
|
|
- handler(val) {
|
|
|
- if (val) {
|
|
|
- this.formData.material = val.material || {}
|
|
|
- }
|
|
|
- },
|
|
|
- deep: true,
|
|
|
- },
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- // 如果已有 projectId,立即加载
|
|
|
- if (this.project && this.project.projectId) {
|
|
|
- this.loadMaterialData()
|
|
|
- }
|
|
|
},
|
|
|
methods: {
|
|
|
- handleSortChange(row) {
|
|
|
- let data = {
|
|
|
- ...row,
|
|
|
- projectId: this.project.projectId,
|
|
|
- }
|
|
|
- updateCostProjectMaterial(data)
|
|
|
- .then((res) => {
|
|
|
- this.$message.success('修改成功')
|
|
|
- // 重新加载数据
|
|
|
- this.loadMaterialData()
|
|
|
- this.$emit('refresh')
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
- },
|
|
|
- handleAddMaterial() {
|
|
|
- this.formData.material = {
|
|
|
- informationType: '',
|
|
|
- informationName: '',
|
|
|
- informationRequire: '',
|
|
|
- formatRequired: '',
|
|
|
- templateId: '',
|
|
|
- surveyTemplateName: '',
|
|
|
- orderNum: 1,
|
|
|
- isRequired: '0',
|
|
|
- }
|
|
|
- this.$emit('update:materialData', {
|
|
|
- ...this.materialData,
|
|
|
- addMaterial: true,
|
|
|
- materialDialogVisible: true,
|
|
|
- materialDialogTitle: '添加',
|
|
|
- })
|
|
|
- },
|
|
|
- handleEditMaterial(row) {
|
|
|
- this.formData.material = { ...row }
|
|
|
- this.$emit('update:materialData', {
|
|
|
- ...this.materialData,
|
|
|
- materialDialogTitle: '修改',
|
|
|
- materialDialogVisible: true,
|
|
|
- })
|
|
|
- },
|
|
|
- handleDeleteMaterial(row) {
|
|
|
- this.$confirm(
|
|
|
- `确定要删除资料名称为${row.informationName}的数据吗?`,
|
|
|
- '提示',
|
|
|
- {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- }
|
|
|
- )
|
|
|
- .then(() => {
|
|
|
- try {
|
|
|
- deleteCostProjectMaterial(row.id).then((res) => {
|
|
|
- this.$message.success('删除成功')
|
|
|
- // 重新加载数据
|
|
|
- this.loadMaterialData()
|
|
|
- this.$emit('refresh')
|
|
|
- })
|
|
|
- } catch (error) {
|
|
|
- console.error('删除失败:', error)
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$message.info('已取消删除')
|
|
|
- })
|
|
|
- },
|
|
|
- handleMaterialSubmit(formData) {
|
|
|
- let data = {
|
|
|
- ...formData,
|
|
|
- projectId: this.project.projectId,
|
|
|
- }
|
|
|
- if (!formData.id) {
|
|
|
- addCostProjectMaterial(data).then((res) => {
|
|
|
- this.$message.success('添加成功')
|
|
|
- this.$refs.legalDialog.setSubmitting(false)
|
|
|
- this.$emit('update:materialData', {
|
|
|
- ...this.materialData,
|
|
|
- materialDialogVisible: false,
|
|
|
- })
|
|
|
- // 重新加载数据
|
|
|
- this.loadMaterialData()
|
|
|
- this.$emit('refresh')
|
|
|
- })
|
|
|
- } else {
|
|
|
- updateCostProjectMaterial(data).then((res) => {
|
|
|
- this.$message.success('修改成功')
|
|
|
- this.$refs.legalDialog.setSubmitting(false)
|
|
|
- this.$emit('update:materialData', {
|
|
|
- ...this.materialData,
|
|
|
- materialDialogVisible: false,
|
|
|
- })
|
|
|
- // 重新加载数据
|
|
|
- this.loadMaterialData()
|
|
|
- this.$emit('refresh')
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- handleLegalSubmit() {},
|
|
|
- handleMaterialCancel() {
|
|
|
- this.$emit('update:materialData', {
|
|
|
- ...this.materialData,
|
|
|
- materialDialogVisible: false,
|
|
|
- })
|
|
|
- },
|
|
|
- getTemplateOptions() {},
|
|
|
- templatePaginationChange() {},
|
|
|
// 加载报送资料数据
|
|
|
async loadMaterialData() {
|
|
|
- if (!this.project || !this.project.projectId) {
|
|
|
+ if (!this.project || !this.project.taskId) {
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
try {
|
|
|
this.loading = true
|
|
|
- const res = await getCostProjectMaterialDetail({
|
|
|
- pageNum: this.internalMaterialData.pagination.currentPage,
|
|
|
- pageSize: this.internalMaterialData.pagination.pageSize,
|
|
|
- id: this.project.projectId,
|
|
|
+ const res = await getMaterialByTaskId({
|
|
|
+ taskId: this.project.taskId,
|
|
|
})
|
|
|
|
|
|
- if (res && res.value && res.value.code == 200) {
|
|
|
- this.internalMaterialData.list = res.value.value.records || []
|
|
|
- this.internalMaterialData.pagination.total =
|
|
|
- res.value.value.total || 0
|
|
|
+ if (res && res.state && res.value) {
|
|
|
+ // 根据接口返回的数据结构进行处理
|
|
|
+ // 如果返回是数组,直接使用;否则获取 records 或 data
|
|
|
+ const materialList = Array.isArray(res.value)
|
|
|
+ ? res.value
|
|
|
+ : res.value.records || res.value.data || []
|
|
|
+
|
|
|
+ this.materialData = materialList
|
|
|
+ // 按资料类型分组
|
|
|
+ this.groupMaterialData(materialList)
|
|
|
} else {
|
|
|
- this.internalMaterialData.list = []
|
|
|
- this.internalMaterialData.pagination.total = 0
|
|
|
+ this.materialData = []
|
|
|
+ this.resetMaterialGroups()
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- console.error('加载报送资料数据失败:', error)
|
|
|
- // this.$message.error('加载报送资料数据失败')
|
|
|
- this.internalMaterialData.list = []
|
|
|
- this.internalMaterialData.pagination.total = 0
|
|
|
+ console.error('加载报送资料失败:', error)
|
|
|
+ this.materialData = []
|
|
|
+ this.resetMaterialGroups()
|
|
|
} finally {
|
|
|
this.loading = false
|
|
|
}
|
|
|
},
|
|
|
- handlePaginationChange({ currentPage, pageSize }) {
|
|
|
- this.internalMaterialData.pagination.currentPage = currentPage
|
|
|
- this.internalMaterialData.pagination.pageSize = pageSize
|
|
|
- // 重新加载数据
|
|
|
- this.loadMaterialData()
|
|
|
- // 同时通知父组件(如果需要)
|
|
|
- this.$emit('paginationChange', { currentPage, pageSize })
|
|
|
+
|
|
|
+ // 按资料类型分组
|
|
|
+ groupMaterialData(data) {
|
|
|
+ this.materialGroups.comprehensive = []
|
|
|
+ this.materialGroups.financial = []
|
|
|
+ this.materialGroups.other = []
|
|
|
+
|
|
|
+ data.forEach((item, index) => {
|
|
|
+ const typeName = item.informationTypeName || ''
|
|
|
+
|
|
|
+ // 根据资料类型名称分类
|
|
|
+ if (
|
|
|
+ typeName.includes('财务') ||
|
|
|
+ typeName.includes('会计') ||
|
|
|
+ typeName.includes('金融')
|
|
|
+ ) {
|
|
|
+ this.materialGroups.financial.push(item)
|
|
|
+ } else if (
|
|
|
+ typeName.includes('综合') ||
|
|
|
+ typeName.includes('基本') ||
|
|
|
+ typeName.includes('一般')
|
|
|
+ ) {
|
|
|
+ this.materialGroups.comprehensive.push(item)
|
|
|
+ } else {
|
|
|
+ this.materialGroups.other.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 重置分组数据
|
|
|
+ resetMaterialGroups() {
|
|
|
+ this.materialGroups.comprehensive = []
|
|
|
+ this.materialGroups.financial = []
|
|
|
+ this.materialGroups.other = []
|
|
|
+ },
|
|
|
+
|
|
|
+ // 查看详情
|
|
|
+ handleViewDetail(row) {
|
|
|
+ this.$message.info(`查看资料:${row.informationName}`)
|
|
|
+ // 可在此处添加打开详情弹窗的逻辑
|
|
|
+ },
|
|
|
+
|
|
|
+ // 格式化审核状态
|
|
|
+ formatAuditStatus(status) {
|
|
|
+ const statusMap = {
|
|
|
+ 0: '未审核',
|
|
|
+ 1: '已审核',
|
|
|
+ 2: '审核通过',
|
|
|
+ 3: '审核不通过',
|
|
|
+ }
|
|
|
+ return statusMap[status] || '未知'
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- @import '@/styles/costAudit.scss';
|
|
|
+ .material-tab-container {
|
|
|
+ padding: 20px 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .material-group {
|
|
|
+ margin-bottom: 30px;
|
|
|
+
|
|
|
+ .group-title {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #333;
|
|
|
+ margin: 0 0 15px 0;
|
|
|
+ padding-left: 10px;
|
|
|
+ border-left: 4px solid #409eff;
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ padding: 10px 15px;
|
|
|
+ margin-left: -20px;
|
|
|
+ margin-right: -20px;
|
|
|
+ padding-left: 26px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .no-data-tip {
|
|
|
+ text-align: center;
|
|
|
+ padding: 40px 20px;
|
|
|
+ color: #909399;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .status-uploaded {
|
|
|
+ color: #67c23a;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+
|
|
|
+ .status-not-uploaded {
|
|
|
+ color: #f56c6c;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
</style>
|