From e15c97d741d42bc7dc13d8d8c20f64a58fd04c71 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: Thu, 3 Jul 2025 10:24:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=83=A8=E5=88=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyInfo/component/AttachmentsTab.tsx | 5 ++- .../CompanyInfo/component/BankInfoTab.tsx | 5 ++- .../CompanyInfo/component/BaseInfoTab.tsx | 5 ++- .../CompanyInfo/component/ContactsInfoTab.tsx | 27 +++-------- .../CompanyInfo/component/InvoiceTab.tsx | 5 ++- .../component/QualificationTab.tsx | 5 ++- src/components/CompanyInfo/index.tsx | 15 ++++--- src/components/CompanyInfo/services.ts | 2 +- .../components/SupplierSelector.tsx | 33 +++++++++----- .../components/SupplierSelector.tsx | 45 +++++++++++++------ .../components/GroupLeaderModal.tsx | 9 ++-- .../components/ResultModal.tsx | 31 +++++++++++-- .../admissionReviewManagement/index.tsx | 2 +- .../components/SupplierViewModal.tsx | 22 +++++++++ .../SupplierRegisterAgent/index.tsx | 26 ++++++++--- .../components/SupplierDetailModal.tsx | 4 +- .../components/SupplierViewModal.tsx | 4 +- .../mySupplierInquiry/index.tsx | 6 +-- .../components/SupplierDetailModal.tsx | 4 +- .../components/SupplierViewModal.tsx | 4 +- .../registrationQuery/index.tsx | 6 +-- .../components/SupplierSelectModal.tsx | 21 ++++----- .../blacklistManage/services.ts | 3 ++ .../components/SupplierSelectModal.tsx | 18 +++----- .../supplierExitManage/services.ts | 2 + src/pages/supplier/supplierMessage/index.tsx | 4 +- 26 files changed, 199 insertions(+), 114 deletions(-) create mode 100644 src/pages/supplier/informationManagement/SupplierRegisterAgent/components/SupplierViewModal.tsx diff --git a/src/components/CompanyInfo/component/AttachmentsTab.tsx b/src/components/CompanyInfo/component/AttachmentsTab.tsx index 04a781a..5141b37 100644 --- a/src/components/CompanyInfo/component/AttachmentsTab.tsx +++ b/src/components/CompanyInfo/component/AttachmentsTab.tsx @@ -19,9 +19,10 @@ interface attachmentsAdd { interface Props { viewType?: boolean; + record?: string; } const OtherAttachmentsTab: React.FC = (props) => { - const { viewType = false } = props; + const { viewType = false, record = '' } = props; //语言切换 const intl = useIntl(); //列表渲染数据 @@ -35,7 +36,7 @@ const OtherAttachmentsTab: React.FC = (props) => { const getList = async (pageNo = 1, pageSize = 10) => { setLoading(true); try { - const { code, data } = await battachmentsGetPage({ pageNo, pageSize }); + const { code, data } = await battachmentsGetPage({ pageNo, pageSize, supplierId: record }); if (code === 200) { setData(data.records); setPagination({ current: pageNo, pageSize, total: data.total }); diff --git a/src/components/CompanyInfo/component/BankInfoTab.tsx b/src/components/CompanyInfo/component/BankInfoTab.tsx index 6187ef2..fe4de7e 100644 --- a/src/components/CompanyInfo/component/BankInfoTab.tsx +++ b/src/components/CompanyInfo/component/BankInfoTab.tsx @@ -20,9 +20,10 @@ interface BankInfo { } interface Props { viewType?: boolean; + record?: string; } const BankInfoTab: React.FC = (props) => { - const { viewType = false } = props; + const { viewType = false, record = '' } = props; //双语 const intl = useIntl(); //列表渲染数据 @@ -35,7 +36,7 @@ const BankInfoTab: React.FC = (props) => { const getList = async (pageNo: number = 1, pageSize: number = 10) => { setLoading(true); try { - const { code, data } = await bankGetPage({ pageNo, pageSize }); + const { code, data } = await bankGetPage({ pageNo, pageSize, supplierId: record }); if (code === 200) { setData(data.records); setPagination({ current: pageNo, pageSize, total: data.total }); diff --git a/src/components/CompanyInfo/component/BaseInfoTab.tsx b/src/components/CompanyInfo/component/BaseInfoTab.tsx index d78ab39..227f6ed 100644 --- a/src/components/CompanyInfo/component/BaseInfoTab.tsx +++ b/src/components/CompanyInfo/component/BaseInfoTab.tsx @@ -44,16 +44,17 @@ interface coscoSupplierSurveyAttachments { interface BaseInfoTabProps { viewType?:boolean; + record?:string; } const BaseInfoTab: React.FC = (props) => { - const { viewType = false } = props; + const { viewType = false, record = '' } = props; const intl = useIntl(); const [registerInfo, setRegisterInfo] = useState(); //变更说明与附件 const [changeDataValue, setChangeDataValue] = useState(); const fetchData = async () => { - const res = await coscoSupplierBase(); + const res = await coscoSupplierBase(record); if (res.code === 200) { setRegisterInfo(res.data); setChangeDataValue({ diff --git a/src/components/CompanyInfo/component/ContactsInfoTab.tsx b/src/components/CompanyInfo/component/ContactsInfoTab.tsx index 8bf2bcd..ec5c897 100644 --- a/src/components/CompanyInfo/component/ContactsInfoTab.tsx +++ b/src/components/CompanyInfo/component/ContactsInfoTab.tsx @@ -15,8 +15,12 @@ interface Contact { email: string; updateTime: string; } - -const ContactsInfoTab: React.FC = () => { +interface Props { + viewType?: boolean; + record?: string; +} +const ContactsInfoTab: React.FC = (props) => { + const { viewType = false, record = '' } = props; const intl = useIntl(); const [data, setData] = useState([]); const [pagination, setPagination] = useState({ @@ -28,28 +32,11 @@ const ContactsInfoTab: React.FC = () => { const fetchContacts = async (page: number = 1, pageSize: number = 10) => { - coscoSupplierBase().then((res) => { + coscoSupplierBase(record).then((res) => { if(res.code == 200) { setData([res.data.coscoSupplierBase]) } }) - - - - // setLoading(true); - // try { - // const res = await coscoSupplier(page); - // if (res.code === 200) { - // setData(res.contacts || []); - // setPagination({ - // current: page, - // pageSize, - // total: res.totalContacts || (res.contacts?.length || 0), - // }); - // } - // } finally { - // setLoading(false); - // } }; useEffect(() => { diff --git a/src/components/CompanyInfo/component/InvoiceTab.tsx b/src/components/CompanyInfo/component/InvoiceTab.tsx index d3f5a48..c404ead 100644 --- a/src/components/CompanyInfo/component/InvoiceTab.tsx +++ b/src/components/CompanyInfo/component/InvoiceTab.tsx @@ -20,10 +20,11 @@ interface InvoiceInfo { interface InvoiceTabProps { viewType?: boolean; + record?: string; } const InvoiceTab: React.FC = (props) => { - const { viewType = false } = props; + const { viewType = false, record = '' } = props; //语言切换 const intl = useIntl(); //列表渲染数据 @@ -37,7 +38,7 @@ const InvoiceTab: React.FC = (props) => { const getList = async (pageNo = 1, pageSize = 10) => { setLoading(true); try { - const { code, data } = await invoiceGetPage({ pageNo, pageSize }); + const { code, data } = await invoiceGetPage({ pageNo, pageSize, supplierId: record }); if (code === 200) { setData(data.records); setPagination({ current: pageNo, pageSize, total: data.total }); diff --git a/src/components/CompanyInfo/component/QualificationTab.tsx b/src/components/CompanyInfo/component/QualificationTab.tsx index c4e4df2..4915042 100644 --- a/src/components/CompanyInfo/component/QualificationTab.tsx +++ b/src/components/CompanyInfo/component/QualificationTab.tsx @@ -19,10 +19,11 @@ interface Qualification { interface QualificationTabProps { viewType?: boolean; + record?: string; } const QualificationTab: React.FC = (props) => { - const { viewType = false } = props; + const { viewType = false, record = '' } = props; const intl = useIntl(); const [data, setData] = useState([]); const [loading, setLoading] = useState(false); @@ -35,7 +36,7 @@ const QualificationTab: React.FC = (props) => { const getList = async (pageNo = 1, pageSize = 10) => { setLoading(true); try { - const { code, data } = await qualificationsGetPage({ pageNo, pageSize }); + const { code, data } = await qualificationsGetPage({ pageNo, pageSize, supplierId: record }); if (code === 200) { setData(data.records); setPagination({ current: pageNo, pageSize, total: data.total }); diff --git a/src/components/CompanyInfo/index.tsx b/src/components/CompanyInfo/index.tsx index 88df49f..3784aba 100644 --- a/src/components/CompanyInfo/index.tsx +++ b/src/components/CompanyInfo/index.tsx @@ -10,12 +10,13 @@ import BankInfoTab from './component/BankInfoTab'; interface CompanyInfoProps { viewType?: boolean; + record?: string; } const { TabPane } = Tabs; const CompanyInfo: React.FC = (props) => { - const { viewType = false } = props; + const { viewType = false, record = '' } = props; const intl = useIntl(); // 切换tab const [subTab, setSubTab] = useState('base'); @@ -23,22 +24,22 @@ const CompanyInfo: React.FC = (props) => { return ( - + - + - + - + - + - + ); diff --git a/src/components/CompanyInfo/services.ts b/src/components/CompanyInfo/services.ts index d078531..2b1a5d3 100644 --- a/src/components/CompanyInfo/services.ts +++ b/src/components/CompanyInfo/services.ts @@ -5,7 +5,7 @@ import request from '@/utils/request'; /** * 供应商基本信息 */ -export const coscoSupplierBase = () => request.get(`/coscoSupplierBase/1935265782606135296`); +export const coscoSupplierBase = (id: string) => request.get(`/coscoSupplierBase/${id}`); /** * 资质分页列表 diff --git a/src/pages/supplier/admission/SupplierCategoryEntry/components/SupplierSelector.tsx b/src/pages/supplier/admission/SupplierCategoryEntry/components/SupplierSelector.tsx index ba0bf4c..3d65d15 100644 --- a/src/pages/supplier/admission/SupplierCategoryEntry/components/SupplierSelector.tsx +++ b/src/pages/supplier/admission/SupplierCategoryEntry/components/SupplierSelector.tsx @@ -4,6 +4,7 @@ import { RightOutlined, LeftOutlined } from '@ant-design/icons'; import { coscoSupplierBase } from '../services'; const { Option } = Select; +type OptionType = { label: string; value: string }; const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSelect?: (selected: any[]) => void; }> = ({ visible, onCancel, onSelect }) => { // 查询 @@ -20,6 +21,8 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel const [rightSelected, setRightSelected] = useState([]); //确认 已选供应商 const [chosenSuppliers, setChosenSuppliers] = useState([]); + // 境内/境外下拉数据 + const [regionOptions, setRegionOptions] = useState([]); //已选供应商 去重 const filteredData = (chosenSuppliers:any, selected:any) => { const ids = new Set(chosenSuppliers.map((item:any) => item.id)); @@ -56,6 +59,11 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel // 初始化 useEffect(() => { if(visible) { + // 境内/境外 下拉 + setRegionOptions([ + { label: '境内企业', value: 'dvs' }, + { label: '境外企业', value: 'ovs' }, + ]) const values = form.getFieldsValue(); getTableList(values,1 , 10) } @@ -73,20 +81,25 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
- - - - - - + + + + + + - +
diff --git a/src/pages/supplier/admission/admissionManagement/components/SupplierSelector.tsx b/src/pages/supplier/admission/admissionManagement/components/SupplierSelector.tsx index a0f78bc..06d1353 100644 --- a/src/pages/supplier/admission/admissionManagement/components/SupplierSelector.tsx +++ b/src/pages/supplier/admission/admissionManagement/components/SupplierSelector.tsx @@ -4,7 +4,7 @@ import { RightOutlined, LeftOutlined } from '@ant-design/icons'; import { coscoSupplierBase } from '../services'; const { Option } = Select; - +type OptionType = { label: string; value: string }; const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSelect?: (selected: any[]) => void; }> = ({ visible, onCancel, onSelect }) => { // 查询 const [form] = Form.useForm(); @@ -20,6 +20,8 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel const [rightSelected, setRightSelected] = useState([]); //确认 已选供应商 const [chosenSuppliers, setChosenSuppliers] = useState([]); + // 境内/境外下拉数据 + const [regionOptions, setRegionOptions] = useState([]); //已选供应商 去重 const filteredData = (chosenSuppliers:any, selected:any) => { const ids = new Set(chosenSuppliers.map((item:any) => item.id)); @@ -55,9 +57,16 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel }; // 初始化 useEffect(() => { - const values = form.getFieldsValue(); - getTableList(values,1 , 10) - }, []) + if(visible) { + // 境内/境外 下拉 + setRegionOptions([ + { label: '境内企业', value: 'dvs' }, + { label: '境外企业', value: 'ovs' }, + ]) + const values = form.getFieldsValue(); + getTableList(values,1 , 10) + } + }, [visible]) //供应商名称 const columns = [ { title: '供应商名称', dataIndex: 'name', ellipsis: true, render: (name: string) => ( @@ -71,20 +80,28 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
- - - - - - + + + + + + + + + - +
diff --git a/src/pages/supplier/admission/admissionReviewManagement/components/GroupLeaderModal.tsx b/src/pages/supplier/admission/admissionReviewManagement/components/GroupLeaderModal.tsx index fc21329..d9c4dce 100644 --- a/src/pages/supplier/admission/admissionReviewManagement/components/GroupLeaderModal.tsx +++ b/src/pages/supplier/admission/admissionReviewManagement/components/GroupLeaderModal.tsx @@ -116,11 +116,12 @@ const GroupLeaderModal: React.FC = ({ accessWorkId = record?.id } - if(summaryParams.length === 0) { - message.warning('请选择审核'); - return + for (let index = 0; index < summaryParams.length; index++) { + if(summaryParams[index].reviewResult === null) { + message.warning('有未评审项'); + return + } } - return update({ coscoAccessUserItemList: summaryParams, accessWorkId }).then((res: any) => { if (res.code === 200) { message.success('提交成功'); diff --git a/src/pages/supplier/admission/admissionReviewManagement/components/ResultModal.tsx b/src/pages/supplier/admission/admissionReviewManagement/components/ResultModal.tsx index bdb14e0..cbc1538 100644 --- a/src/pages/supplier/admission/admissionReviewManagement/components/ResultModal.tsx +++ b/src/pages/supplier/admission/admissionReviewManagement/components/ResultModal.tsx @@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react'; import { Modal, Table, Button, Radio, Input, Upload, message, Spin } from 'antd'; import { reviewInfo, uploadFile, update } from '../services'; import type { ColumnsType } from 'antd/es/table'; +import { connect } from 'umi'; //主体参数接口 interface ResultModalProps { visible: boolean; @@ -9,6 +10,7 @@ interface ResultModalProps { record?: { id?: string; [key: string]: any } | null; onCancel: () => void; onSubmit: () => void; + dispatch: any; } interface RowData { key: string; @@ -58,7 +60,8 @@ const ResultModal: React.FC = ({ view, record, onCancel, - onSubmit + onSubmit, + dispatch, }) => { // type: 'teamMembers' | 'groupLeader' // 供应商、评审项、单元格数据 @@ -219,6 +222,13 @@ const ResultModal: React.FC = ({ if(record?.id) { accessWorkId = record?.id } + + for (let index = 0; index < result.length; index++) { + if(result[index].reviewResult === null) { + message.warning('有未评审项'); + return + } + } // 提交审核 update( {coscoAccessUserItemList: result, accessWorkId }).then((res) => { if(res.code == 200) { @@ -238,7 +248,22 @@ const ResultModal: React.FC = ({ fixed: 'left' }, ...suppliers.map((sup, colIdx) => ({ - title: sup.supplierName, + title: ( + + ), dataIndex: sup.supplierId, key: sup.supplierId, width: 300, @@ -365,4 +390,4 @@ const ResultModal: React.FC = ({ ); }; -export default ResultModal; +export default connect()(ResultModal); diff --git a/src/pages/supplier/admission/admissionReviewManagement/index.tsx b/src/pages/supplier/admission/admissionReviewManagement/index.tsx index 8a462db..e953aba 100644 --- a/src/pages/supplier/admission/admissionReviewManagement/index.tsx +++ b/src/pages/supplier/admission/admissionReviewManagement/index.tsx @@ -50,7 +50,7 @@ const CooperateEnterprise: React.FC = () => { setLoading(true); try { const values = searchForm.getFieldsValue(); - const { code, data } = await getPage({...params, ...values }); + const { code, data } = await getPage({...params, ...values}); if (code === 200) { setData(data.records); setPagination({ current: params.pageNo, pageSize: params.pageSize, total: data.total }); diff --git a/src/pages/supplier/informationManagement/SupplierRegisterAgent/components/SupplierViewModal.tsx b/src/pages/supplier/informationManagement/SupplierRegisterAgent/components/SupplierViewModal.tsx new file mode 100644 index 0000000..647b61d --- /dev/null +++ b/src/pages/supplier/informationManagement/SupplierRegisterAgent/components/SupplierViewModal.tsx @@ -0,0 +1,22 @@ +import React from "react"; +//第三方UI库/组件 +import { Modal } from "antd"; +//本地组件、业务逻辑 +import CompanyInfo from '@/components/CompanyInfo'; +//主体接口 +interface SupplierViewModalProps { + visible: boolean; + onCancel: () => void; + record?: string; +} +// 查看主体 +const SupplierViewModal: React.FC = ({ visible, onCancel, record }) => { + return ( + + + + ); +}; + +export default SupplierViewModal; diff --git a/src/pages/supplier/informationManagement/SupplierRegisterAgent/index.tsx b/src/pages/supplier/informationManagement/SupplierRegisterAgent/index.tsx index 7a81362..5e8aeb6 100644 --- a/src/pages/supplier/informationManagement/SupplierRegisterAgent/index.tsx +++ b/src/pages/supplier/informationManagement/SupplierRegisterAgent/index.tsx @@ -2,9 +2,17 @@ import React, { useRef, useEffect, useState } from 'react'; import { Table, Form, Input, Button, Row, Col, DatePicker, Tabs, Space, message } from 'antd'; import { SearchOutlined, ReloadOutlined, PlusOutlined } from '@ant-design/icons'; import { getPageAgent } from './services'; - +import type { ColumnsType } from 'antd/es/table'; +import SupplierViewModal from './components/SupplierViewModal'; const { RangePicker } = DatePicker; const { TabPane } = Tabs; +interface Columns { + name: string; + enterpriseType: string; + deptId: string; + createTime: string; + id: string; +} const SupplierRegisterAgent: React.FC = () => { const [form] = Form.useForm(); @@ -12,7 +20,10 @@ const SupplierRegisterAgent: React.FC = () => { const [loading, setLoading] = useState(false); const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 }); const [tabKey, setTabKey] = useState('dvs'); - + //查看是否显示状态 + const [viewVisible, setViewVisible] = useState(false); + //查看 参数传递 + const [currentRecord, setCurrentRecord] = useState(''); // 查询数据 const fetchData = async (page = 1, pageSize = 10) => { setLoading(true); @@ -67,7 +78,7 @@ const SupplierRegisterAgent: React.FC = () => { }; // 列 - const columns = [ + const columns: ColumnsType = [ { title: '序号', dataIndex: 'index', @@ -108,7 +119,7 @@ const SupplierRegisterAgent: React.FC = () => { align: 'center', render: (_: any, record: any) => ( - message.info(`查看:${record.name}`)}>查看 + { setCurrentRecord(record.id); setViewVisible(true); }}>查看 message.info(`编辑:${record.name}`)}>编辑 ), @@ -161,7 +172,12 @@ const SupplierRegisterAgent: React.FC = () => { showSizeChanger: true, onChange: (current, pageSize) => handleTableChange({ current, pageSize }), }} - bordered + /> + {/* 查看组件 */} + setViewVisible(false)} /> ); diff --git a/src/pages/supplier/informationRetrieval/mySupplierInquiry/components/SupplierDetailModal.tsx b/src/pages/supplier/informationRetrieval/mySupplierInquiry/components/SupplierDetailModal.tsx index 3fe6c9c..570bf41 100644 --- a/src/pages/supplier/informationRetrieval/mySupplierInquiry/components/SupplierDetailModal.tsx +++ b/src/pages/supplier/informationRetrieval/mySupplierInquiry/components/SupplierDetailModal.tsx @@ -23,7 +23,7 @@ interface Data { interface SupplierAccessDetailModalProps { visible: boolean; onCancel: () => void; - record?: any; // 你可以定义具体类型 + record?: string; // 你可以定义具体类型 } //主体 const SupplierAccessDetailModal: React.FC = ({ visible, onCancel, record, }) => { @@ -55,7 +55,7 @@ const SupplierAccessDetailModal: React.FC = ({ v setLoading(true); try { const values = form.getFieldsValue(); - const { code, data, message } = await getCategoryPage({ pageNo, pageSize , ...values}); + const { code, data, message } = await getCategoryPage({ pageNo, pageSize , id:record, ...values}); if (code === 200) { setData(data.records); setPagination({ current: pageNo, pageSize, total: data.total }); diff --git a/src/pages/supplier/informationRetrieval/mySupplierInquiry/components/SupplierViewModal.tsx b/src/pages/supplier/informationRetrieval/mySupplierInquiry/components/SupplierViewModal.tsx index b310d61..231690c 100644 --- a/src/pages/supplier/informationRetrieval/mySupplierInquiry/components/SupplierViewModal.tsx +++ b/src/pages/supplier/informationRetrieval/mySupplierInquiry/components/SupplierViewModal.tsx @@ -7,13 +7,13 @@ import CompanyInfo from '@/components/CompanyInfo'; interface SupplierViewModalProps { visible: boolean; onCancel: () => void; - record?: any; + record?: string; } // 查看主体 const SupplierViewModal: React.FC = ({ visible, onCancel, record }) => { return ( - + ); }; diff --git a/src/pages/supplier/informationRetrieval/mySupplierInquiry/index.tsx b/src/pages/supplier/informationRetrieval/mySupplierInquiry/index.tsx index 094eecf..00a3d31 100644 --- a/src/pages/supplier/informationRetrieval/mySupplierInquiry/index.tsx +++ b/src/pages/supplier/informationRetrieval/mySupplierInquiry/index.tsx @@ -39,7 +39,7 @@ const mySupplierInquiry: React.FC = () => { //准入明细是否显示状态 const [detailVisible, setDetailVisible] = useState(false); //查看、准入明细 参数传递 - const [currentRecord, setCurrentRecord] = useState(null); + const [currentRecord, setCurrentRecord] = useState(''); // 境内/境外下拉数据 const [regionOptions, setRegionOptions] = useState([]); // 准入状态 @@ -150,11 +150,11 @@ const mySupplierInquiry: React.FC = () => { { setCurrentRecord(record); setViewVisible(true); }} + onClick={() => { setCurrentRecord(record.id); setViewVisible(true); }} >查看 { setCurrentRecord(record); setDetailVisible(true); }} + onClick={() => { setCurrentRecord(record.id); setDetailVisible(true); }} >准入明细 ), diff --git a/src/pages/supplier/informationRetrieval/registrationQuery/components/SupplierDetailModal.tsx b/src/pages/supplier/informationRetrieval/registrationQuery/components/SupplierDetailModal.tsx index b5d086a..0b42636 100644 --- a/src/pages/supplier/informationRetrieval/registrationQuery/components/SupplierDetailModal.tsx +++ b/src/pages/supplier/informationRetrieval/registrationQuery/components/SupplierDetailModal.tsx @@ -21,7 +21,7 @@ interface Data { interface SupplierAccessDetailModalProps { visible: boolean; onCancel: () => void; - record?: any; // 你可以定义具体类型 + record?: string; // 你可以定义具体类型 } //主体 const SupplierAccessDetailModal: React.FC = ({ visible, onCancel, record, }) => { @@ -51,7 +51,7 @@ const SupplierAccessDetailModal: React.FC = ({ v setLoading(true); try { const values = form.getFieldsValue(); - const { code, data, message } = await getCategoryPage({ pageNo, pageSize , ...values}); + const { code, data, message } = await getCategoryPage({ pageNo, pageSize, id: record, ...values}); if (code === 200) { setData(data.records); setPagination({ current: pageNo, pageSize, total: data.total }); diff --git a/src/pages/supplier/informationRetrieval/registrationQuery/components/SupplierViewModal.tsx b/src/pages/supplier/informationRetrieval/registrationQuery/components/SupplierViewModal.tsx index 9a8249d..601dab9 100644 --- a/src/pages/supplier/informationRetrieval/registrationQuery/components/SupplierViewModal.tsx +++ b/src/pages/supplier/informationRetrieval/registrationQuery/components/SupplierViewModal.tsx @@ -7,14 +7,14 @@ import CompanyInfo from '@/components/CompanyInfo'; interface SupplierViewModalProps { visible: boolean; onCancel: () => void; - record?: any; + record?: string; } // 查看主体 const SupplierViewModal: React.FC = ({ visible, onCancel, record }) => { return ( + viewType={true} record={record} /> ); }; diff --git a/src/pages/supplier/informationRetrieval/registrationQuery/index.tsx b/src/pages/supplier/informationRetrieval/registrationQuery/index.tsx index a38fac8..d1c3166 100644 --- a/src/pages/supplier/informationRetrieval/registrationQuery/index.tsx +++ b/src/pages/supplier/informationRetrieval/registrationQuery/index.tsx @@ -46,7 +46,7 @@ const RegistrationQuery: React.FC = () => { //准入明细是否显示状态 const [detailVisible, setDetailVisible] = useState(false); //查看、准入明细 参数传递 - const [currentRecord, setCurrentRecord] = useState(null); + const [currentRecord, setCurrentRecord] = useState(''); // 境内/境外下拉数据 const [regionOptions, setRegionOptions] = useState([]); //状态 下拉数据 @@ -153,11 +153,11 @@ const RegistrationQuery: React.FC = () => { { setCurrentRecord(record); setViewVisible(true); }} + onClick={() => { setCurrentRecord(record.id); setViewVisible(true); }} >查看 { setCurrentRecord(record); setDetailVisible(true); }} + onClick={() => { setCurrentRecord(record.id); setDetailVisible(true); }} >准入明细 ), diff --git a/src/pages/supplier/supplierBlacklist/blacklistManage/components/SupplierSelectModal.tsx b/src/pages/supplier/supplierBlacklist/blacklistManage/components/SupplierSelectModal.tsx index 67d3747..50dee31 100644 --- a/src/pages/supplier/supplierBlacklist/blacklistManage/components/SupplierSelectModal.tsx +++ b/src/pages/supplier/supplierBlacklist/blacklistManage/components/SupplierSelectModal.tsx @@ -3,7 +3,7 @@ import { Modal, Table, Button, Checkbox, Row, Col, Input, Select, Form, Space, message } from "antd"; import { getSupplierCategoryPage } from '../services'; - +import CategorySelector from '@/components/CategorySelector'; const { Option } = Select; interface Supplier { @@ -161,23 +161,22 @@ const SupplierSelectModal: React.FC = ({ bodyStyle={{ padding: 24 }} >
+ + - + - - {['A', 'B', 'C', 'D'].map(level => ( ))} - - + + + @@ -200,7 +199,6 @@ const SupplierSelectModal: React.FC = ({ fetchData(values, pag.current!, pag.pageSize!); }} size="small" - bordered /> @@ -215,7 +213,6 @@ const SupplierSelectModal: React.FC = ({ columns={rightColumns} pagination={false} size="small" - bordered /> diff --git a/src/pages/supplier/supplierBlacklist/blacklistManage/services.ts b/src/pages/supplier/supplierBlacklist/blacklistManage/services.ts index 94be81f..cfdc0b6 100644 --- a/src/pages/supplier/supplierBlacklist/blacklistManage/services.ts +++ b/src/pages/supplier/supplierBlacklist/blacklistManage/services.ts @@ -27,6 +27,9 @@ interface getSupplierCategoryPageData { supplierName?: number; categoryId?: string; reviewResult?: string; + levelName?: string; + name?: string; + } export const getSupplierCategoryPage = (data: getSupplierCategoryPageData) => request.post('/coscoSupplierexit/getSupplierCategoryPage', { data }); diff --git a/src/pages/supplier/supplierExit/supplierExitManage/components/SupplierSelectModal.tsx b/src/pages/supplier/supplierExit/supplierExitManage/components/SupplierSelectModal.tsx index 67d3747..2a0dfb4 100644 --- a/src/pages/supplier/supplierExit/supplierExitManage/components/SupplierSelectModal.tsx +++ b/src/pages/supplier/supplierExit/supplierExitManage/components/SupplierSelectModal.tsx @@ -3,7 +3,7 @@ import { Modal, Table, Button, Checkbox, Row, Col, Input, Select, Form, Space, message } from "antd"; import { getSupplierCategoryPage } from '../services'; - +import CategorySelector from '@/components/CategorySelector'; const { Option } = Select; interface Supplier { @@ -161,22 +161,18 @@ const SupplierSelectModal: React.FC = ({ bodyStyle={{ padding: 24 }} > - - + + - - {['A', 'B', 'C', 'D'].map(level => ( ))} - - + + diff --git a/src/pages/supplier/supplierExit/supplierExitManage/services.ts b/src/pages/supplier/supplierExit/supplierExitManage/services.ts index c95aa93..b0ca016 100644 --- a/src/pages/supplier/supplierExit/supplierExitManage/services.ts +++ b/src/pages/supplier/supplierExit/supplierExitManage/services.ts @@ -26,6 +26,8 @@ interface getSupplierCategoryPageData { supplierName?: number; categoryId?: string; reviewResult?: string; + name?: string; + levelName?: string; } export const getSupplierCategoryPage = (data: getSupplierCategoryPageData) => request.post('/coscoSupplierexit/getSupplierCategoryPage', { data }); diff --git a/src/pages/supplier/supplierMessage/index.tsx b/src/pages/supplier/supplierMessage/index.tsx index d752e9a..7ffedd2 100644 --- a/src/pages/supplier/supplierMessage/index.tsx +++ b/src/pages/supplier/supplierMessage/index.tsx @@ -115,10 +115,10 @@ const SupplierMessage: React.FC = () => { <> - + - {messageTypeOptions.map(opt => ( {opt.label} ))}