From c0006963db1808f066e6911574e86f6b48410c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=99=AF=E5=AD=A6?= <5412262+sun_jing_xue@user.noreply.gitee.com> Date: Mon, 11 Aug 2025 15:44:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5=E4=B8=8E?= =?UTF-8?q?=E5=85=AC=E5=8F=B8=E4=BF=A1=E6=81=AFtab=E8=B0=83=E6=9F=A5?= =?UTF-8?q?=E9=97=AE=E5=8D=B7=E5=8F=8A=E5=8F=8D=E8=B4=BF=E8=B5=82=E6=89=BF?= =?UTF-8?q?=E8=AF=BA=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CompanyInfo/index.tsx | 47 +++++++++-- src/locales/en-US/workbench.ts | 2 + src/locales/zh-CN/workbench.ts | 1 + .../supplier/backend/supplierNews/index.tsx | 79 +++++++++++++++---- .../supplier/backend/supplierNews/services.ts | 8 ++ src/pages/supplier/supplierMessage/index.tsx | 5 +- 6 files changed, 122 insertions(+), 20 deletions(-) diff --git a/src/components/CompanyInfo/index.tsx b/src/components/CompanyInfo/index.tsx index 5bc9bc5..3bebe03 100644 --- a/src/components/CompanyInfo/index.tsx +++ b/src/components/CompanyInfo/index.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react'; -import { Tabs } from 'antd'; +import { Tabs, Descriptions, Table } from 'antd'; import { useIntl } from 'umi'; import BaseInfoTab from './component/BaseInfoTab'; import QualificationTab from './component/QualificationTab'; @@ -25,11 +25,13 @@ const CompanyInfo: React.FC = (props) => { // 切换tab const [subTab, setSubTab] = useState(''); const [supplierType, setSupplierType] = useState(''); - + //供应商信息数据 + const [registerInfo, setRegisterInfo] = useState(null); useEffect(() => { - if(record) { + if (record) { coscoSupplierBase(record).then((res) => { if (res.code === 200) { + setRegisterInfo(res.data) setSupplierType(res.data.coscoSupplierBase.supplierType) if (res.data.coscoSupplierBase.supplierType === 'pe') { setSubTab('pe') @@ -47,7 +49,7 @@ const CompanyInfo: React.FC = (props) => { - ) : subTab ?( + ) : subTab ? ( <> @@ -67,8 +69,43 @@ const CompanyInfo: React.FC = (props) => { + + <> +
+ index + 1 }, + { title: intl.formatMessage({ id: 'component.globalModal.question' }), dataIndex: 'questionName', key: 'questionName' }, + { title: intl.formatMessage({ id: 'component.globalModal.answer' }), dataIndex: 'replyValue', key: 'replyValue', width: 120 }, + ]} + pagination={false} + title={() =>
{intl.formatMessage({ id: 'component.globalModal.questionnaire' })}
} + /> + + + + {registerInfo.coscoSupplierSurveyAttachments.map((item: any) => { + const { attachmentsType, fileUrl, fileName } = item; + return attachmentsType === 'commitment' ? ( + {fileName} + ) : null + })} + + + + - ):( + ) : (
)} diff --git a/src/locales/en-US/workbench.ts b/src/locales/en-US/workbench.ts index a25557f..ea2ab02 100644 --- a/src/locales/en-US/workbench.ts +++ b/src/locales/en-US/workbench.ts @@ -28,6 +28,8 @@ export default { 'page.workbench.invoice.account': 'Invoice Bank Account', 'page.workbench.invoice.updateTime': 'Update Time', 'page.workbench.invoice.qualificationCertificate': 'General Taxpayer Qualification Certificate', + 'page.workbench.SABAC': 'Questionnaire and Anti-Bribery Undertaking', + 'page.workbench.bank.index': 'Index', 'page.workbench.bank.interbankNumber': 'Bank Code', diff --git a/src/locales/zh-CN/workbench.ts b/src/locales/zh-CN/workbench.ts index be99248..e2f748f 100644 --- a/src/locales/zh-CN/workbench.ts +++ b/src/locales/zh-CN/workbench.ts @@ -28,6 +28,7 @@ export default { 'page.workbench.invoice.account': '开票户行账号', 'page.workbench.invoice.updateTime': '更新时间', 'page.workbench.invoice.qualificationCertificate': '一般纳税人资质证明', + 'page.workbench.SABAC': '调查问卷及反贿赂承诺书', 'page.workbench.bank.index': '序号', 'page.workbench.bank.interbankNumber': '银行代码', diff --git a/src/pages/supplier/backend/supplierNews/index.tsx b/src/pages/supplier/backend/supplierNews/index.tsx index 60290bf..da04308 100644 --- a/src/pages/supplier/backend/supplierNews/index.tsx +++ b/src/pages/supplier/backend/supplierNews/index.tsx @@ -1,14 +1,17 @@ import React, { useEffect, useState } from "react"; import { useIntl } from 'umi'; -import { Form, Button, Table, Select, Input, Modal } from 'antd'; +import { Form, Button, Table, Select, Input, Modal, Descriptions } from 'antd'; import type { ColumnsType, TablePaginationConfig } from 'antd/es/table'; import { SearchOutlined, DeleteOutlined } from '@ant-design/icons'; //字典与接口 -import { page, getExitMge } from './services'; +import { page, getExitMge, update } from './services'; import { getDictList } from '@/servers/api/dicts' //统一列表分页 import tableProps from '@/utils/tableProps' - +const readTypeOptions = [ + { dicName: '是', code: '1' }, + { dicName: '否', code: '0' }, +]; interface Data { deptName: string; categoryName: string; @@ -35,11 +38,15 @@ const supplierNews: React.FC = () => { const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 }); //下拉数据 const [categoryOptions, setCategoryOptions] = useState([]); + //查看信息与组件 + const [viewRecord, setViewRecord] = useState(null); // 当前查看的消息 + const [viewVisible, setViewVisible] = useState(false); // 弹窗显隐 //列表数据方法 - const getList = async (params: { pageNo: number; pageSize: number; content: string; type: string; }) => { + const getList = async (params: { pageNo: number; pageSize: number;}) => { setLoading(true); try { - const response = await page(params); + const value = searchForm.getFieldsValue(); + const response = await page({...params, ...value}); if (response.code === 200) { setData(response.data.records); setPagination({ current: params.pageNo, pageSize: params.pageSize, total: response.data.total }); @@ -53,16 +60,13 @@ const supplierNews: React.FC = () => { //搜索重置 const handleReset = () => { searchForm.resetFields(); - getList({ pageNo: 1, pageSize: pagination.pageSize ?? 10, content: '', type: '' }); + getList({ pageNo: 1, pageSize: pagination.pageSize ?? 10}); }; //搜索 - const handleSearch = (values: any) => { - const { content, type } = values; + const handleSearch = () => { getList({ pageNo: 1, pageSize: pagination.pageSize ?? 10, - content, - type, }); }; @@ -87,7 +91,7 @@ const supplierNews: React.FC = () => { dataIndex: 'type', key: 'type', width: 160, - render: (code: string) => typeMap[code] || code + render: (code: string) => typeMap[code] || code }, { title: '发送时间', @@ -95,6 +99,28 @@ const supplierNews: React.FC = () => { key: 'createTime', width: 200, }, + { + title: '是否已读', + dataIndex: 'read', + key: 'read', + align: 'center', + width: 120, + render: (_, record: any) => ({record.read === '0' ? '否' : '是'}) + }, + { + title: '操作', + key: 'option', + align: 'center', + width: 80, + render: (_, record: any) => ( + { + setViewRecord(record); + setViewVisible(true); + update({ id: record.id }) + handleSearch() + }}>查看 + ), + } ]; const [typeMap, setTypeMap] = useState<{ [code: string]: string }>({}); //初始化 @@ -134,7 +160,7 @@ const supplierNews: React.FC = () => { } } }) - getList({ pageNo: 1, pageSize: 10, content: '', type: '' }); + getList({ pageNo: 1, pageSize: 10 }); }, []); return ( @@ -151,7 +177,7 @@ const supplierNews: React.FC = () => { - {categoryOptions.map((option) => ( {option.dicName} @@ -159,6 +185,13 @@ const supplierNews: React.FC = () => { ))} + + +