From 7d1673f42d764cb08dc4e29b9202dd1988298013 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: Wed, 9 Jul 2025 15:30:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=86=E5=85=A5=E6=9F=A5=E7=9C=8B=E4=B8=8E?= =?UTF-8?q?=E9=9B=B6=E6=98=9F=E9=87=87=E8=B4=AD/=E5=BA=94=E6=80=A5?= =?UTF-8?q?=E9=87=87=E8=B4=AD/=E4=B8=AA=E4=BA=BA=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E5=92=8C=E4=B8=AA=E4=BA=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/proxy.ts | 4 +- .../CompanyInfo/component/PeBaseInfoTab.tsx | 11 ++- .../admission/SupplierCategoryEntry/index.tsx | 2 +- .../SupplierCategoryEntryReview/index.tsx | 2 +- .../components/ViewModal.tsx | 67 +++++++++++++------ .../admission/SupplierEntryReview/index.tsx | 35 ++++------ .../components/CreateModal.tsx | 59 ++++++++++++++-- .../components/ViewModal.tsx | 63 ++++++++++++----- .../admission/admissionManagement/index.tsx | 23 ++++--- .../components/ViewModal.tsx | 63 ++++++++++++----- .../admissionReviewManagement/index.tsx | 18 ++++- 11 files changed, 250 insertions(+), 97 deletions(-) diff --git a/config/proxy.ts b/config/proxy.ts index 20a8009..db75cf8 100644 --- a/config/proxy.ts +++ b/config/proxy.ts @@ -3,8 +3,8 @@ export default { '/api': { // target: 'http://10.242.37.148:18022',// // target: 'http://10.0.0.10:18012',// 茂 - target: 'http://10.0.0.125:18012',// 测试 - // target: 'http://10.0.0.14:18012',// 李 + // target: 'http://10.0.0.125:18012',// 测试 + target: 'http://10.0.0.14:18012',// 李 // target: 'http://10.0.0.46:18030',// 袁 changeOrigin: true, pathRewrite: { '^/api': '' }, diff --git a/src/components/CompanyInfo/component/PeBaseInfoTab.tsx b/src/components/CompanyInfo/component/PeBaseInfoTab.tsx index 2e15c28..9503f03 100644 --- a/src/components/CompanyInfo/component/PeBaseInfoTab.tsx +++ b/src/components/CompanyInfo/component/PeBaseInfoTab.tsx @@ -25,8 +25,13 @@ export interface Request { socialCreditCode: string; telephone: string; workAddress: string; + coscoSupplierSurveyAttachments:coscoSupplierSurveyAttachments[]; [property: string]: any; } +interface coscoSupplierSurveyAttachments { + fileUrl: string; + fileName: string; +} interface BaseInfoTabProps { viewType?:boolean; @@ -89,9 +94,9 @@ const BaseInfoTab: React.FC = (props) => { {registerInfo.coscoSupplierBase.personAccount} - {/* - {registerInfo.coscoSupplierBase.socialCreditCode} - */} + + {registerInfo.coscoSupplierSurveyAttachments[0].fileName} + { diff --git a/src/pages/supplier/admission/SupplierCategoryEntryReview/index.tsx b/src/pages/supplier/admission/SupplierCategoryEntryReview/index.tsx index 14de895..a8bafd7 100644 --- a/src/pages/supplier/admission/SupplierCategoryEntryReview/index.tsx +++ b/src/pages/supplier/admission/SupplierCategoryEntryReview/index.tsx @@ -87,7 +87,7 @@ const SupplierCategoryEntryReview: React.FC = () => { diff --git a/src/pages/supplier/admission/SupplierEntryReview/components/ViewModal.tsx b/src/pages/supplier/admission/SupplierEntryReview/components/ViewModal.tsx index 3482cf7..13f8b89 100644 --- a/src/pages/supplier/admission/SupplierEntryReview/components/ViewModal.tsx +++ b/src/pages/supplier/admission/SupplierEntryReview/components/ViewModal.tsx @@ -9,6 +9,12 @@ interface Data { coscoAccessSupplierList: coscoAccessSupplierLists[]; coscoAccessCategoryList: coscoAccessCategoryLists[]; coscoAccessUserls: coscoAccessUserl[]; + coscoAccessWorkAttachments: coscoAccessWorkAttachments; +} + +interface coscoAccessWorkAttachments { + fileName: string; + fileUrl: string; } interface coscoAccessUserl { deptId: string; @@ -27,13 +33,15 @@ interface coscoAccessWorks { startTime: string; endTime: string; reviewStatusText: string; + accessType: string; + accessDesc: string; } const ViewModal: React.FC<{ visible: boolean; - record?: string | null; + record?: any; onCancel: () => void; -}> = ({ visible, record, onCancel }) => { +}> = ({ visible, record = {}, onCancel }) => { //渲染数据 const [data, setData] = useState(null); //初始化 @@ -60,23 +68,44 @@ const ViewModal: React.FC<{ ) })} - - {data.coscoAccessCategoryList.map((item) => { - return ( -
{item.categoryName}
- ) - })} -
- {data.coscoAccessWork.startTime} - {data.coscoAccessWork.endTime} - - {data.coscoAccessUserls.map((item) => { - return ( -
{item.deptId} - {item.userId}
- ) - })} -
- {data.coscoAccessWork.reviewStatusText} + + {data.coscoAccessWork.accessType === 'scattered' && ( + <> + {data.coscoAccessWork.accessDesc} + + {data.coscoAccessWorkAttachments.fileName} + + + )} + {data.coscoAccessWork.accessType === 'offline' && ( + + {data.coscoAccessWorkAttachments.fileName} + + )} + + + {data.coscoAccessWork.accessType === 'online' && ( + <> + + {data.coscoAccessCategoryList.map((item) => { + return ( +
{item.categoryName}
+ ) + })} +
+ {data.coscoAccessWork.startTime} + {data.coscoAccessWork.endTime} + + {data.coscoAccessUserls.map((item) => { + return ( +
{item.deptId} - {item.userId}
+ ) + })} +
+ {data.coscoAccessWork.reviewStatusText} + + )} + )} diff --git a/src/pages/supplier/admission/SupplierEntryReview/index.tsx b/src/pages/supplier/admission/SupplierEntryReview/index.tsx index 588dd4d..1e4454b 100644 --- a/src/pages/supplier/admission/SupplierEntryReview/index.tsx +++ b/src/pages/supplier/admission/SupplierEntryReview/index.tsx @@ -23,24 +23,7 @@ interface ModalInfo { visible: boolean; record: string | null; } -const statusColorMap: Record = { - '未开始': 'default', - '进行中': 'processing', - '已完成': 'success', -}; -const methodOptions = [ - { label: '全部', value: '' }, - { label: '线上准入', value: '线上准入' }, - { label: '线下准入', value: '线下准入' }, -]; - -const statusOptions = [ - { label: '全部', value: '' }, - { label: '未开始', value: '未开始' }, - { label: '进行中', value: '进行中' }, - { label: '已完成', value: '已完成' }, -]; const deptOptions = [ { label: '全部', value: '' }, @@ -142,22 +125,33 @@ const SupplierEntryReview: React.FC = () => { title: '准入方式', dataIndex: 'accessTypeText', align: 'center', + ellipsis: true, }, { title: '准入品类', - dataIndex: 'categoryName', + dataIndex: 'categoryNameList', align: 'center', - ellipsis: true, + render: (_: any, record: any) => { + return ( + <> + {record.categoryNameList.map((item:string) => { + return
{`${item}`}
+ })} + + ) + }, }, { title: '开始时间', dataIndex: 'startTime', align: 'center', + ellipsis: true, }, { title: '结束时间', dataIndex: 'endTime', align: 'center', + ellipsis: true, }, { title: '流程状态', @@ -173,7 +167,6 @@ const SupplierEntryReview: React.FC = () => { title: '操作', width: 120, render: (_: any, record: any) => { - console.log(record, 'record'); return ( openModal(record.id)}>查看 @@ -195,7 +188,7 @@ const SupplierEntryReview: React.FC = () => {
diff --git a/src/pages/supplier/admission/admissionManagement/components/CreateModal.tsx b/src/pages/supplier/admission/admissionManagement/components/CreateModal.tsx index 8c861ae..7858620 100644 --- a/src/pages/supplier/admission/admissionManagement/components/CreateModal.tsx +++ b/src/pages/supplier/admission/admissionManagement/components/CreateModal.tsx @@ -143,12 +143,14 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi accessType: string; accessWorkName: string; deptId: string; + accessDesc: string; }; categoryIds: string[]; supplierIds: string[]; coscoAccessUserls: { userId: string; deptId: string; isLeader: number }[]; coscoAccessItems: { itemName: string; reviewBy: string[] }[]; coscoAccessWorkAttachments: any; + attachmentsType: any; } = { coscoAccessWork: { startTime: '', @@ -156,12 +158,14 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi accessType: '', accessWorkName: '', deptId: '', + accessDesc: '', }, categoryIds: [], supplierIds: [], coscoAccessUserls: [], coscoAccessItems: [], coscoAccessWorkAttachments: {}, + attachmentsType: {}, }; //标题名称 @@ -170,6 +174,8 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi finalPayload.coscoAccessWork.accessType = values.accessType; //准入部门 finalPayload.coscoAccessWork.deptId = values.deptId; + // 准入说明 + finalPayload.coscoAccessWork.accessDesc = values.accessDesc; //品类选择 finalPayload.categoryIds = values.categoryIds; //选择供应商 @@ -200,7 +206,8 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi }); } else { // 供应商符合性审查 - finalPayload.coscoAccessWorkAttachments = values.supplierCompliance[0].response + finalPayload.coscoAccessWorkAttachments = values.supplierCompliance[0].response; + finalPayload.coscoAccessWorkAttachments.fileUrl = values.supplierCompliance[0].response.url; } const res = await add(finalPayload); @@ -278,7 +285,7 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi 线上准入 线下准入 - 零星采购/应急采购 + 零星采购/应急采购/个人供应商 @@ -425,10 +432,54 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi )} + + {admissionMethod === 'scattered' && ( + <> + + + + (Array.isArray(e) ? e : e && e.fileList)} + > + { + if (fileList.length >= 1) { + message.error('只能上传一个文件'); + return Upload.LIST_IGNORE; + } + return true; // 允许进入 customRequest + }} + onChange={({ fileList: newFileList }) => { + setFileList(newFileList); + form.setFieldsValue({ supplierCompliance: newFileList }); + }} + onRemove={(file) => { + const newList = fileList.filter(item => item.uid !== file.uid); + setFileList(newList); + form.setFieldsValue({ supplierCompliance: newList }); + }} + accept=".pdf,.doc,.docx" // 可选,限制文件类型 + maxCount={1} // 只允许一个 + > + + + + + )} + - +
diff --git a/src/pages/supplier/admission/admissionReviewManagement/components/ViewModal.tsx b/src/pages/supplier/admission/admissionReviewManagement/components/ViewModal.tsx index aa4b4a4..795998c 100644 --- a/src/pages/supplier/admission/admissionReviewManagement/components/ViewModal.tsx +++ b/src/pages/supplier/admission/admissionReviewManagement/components/ViewModal.tsx @@ -9,6 +9,12 @@ interface Data { coscoAccessSupplierList: coscoAccessSupplierLists[]; coscoAccessCategoryList: coscoAccessCategoryLists[]; coscoAccessUserls: coscoAccessUserl[]; + coscoAccessWorkAttachments: coscoAccessWorkAttachments; +} + +interface coscoAccessWorkAttachments { + fileName: string; + fileUrl: string; } interface coscoAccessUserl { deptId: string; @@ -27,6 +33,8 @@ interface coscoAccessWorks { startTime: string; endTime: string; reviewStatusText: string; + accessType: string; + accessDesc: string; } const ViewModal: React.FC<{ @@ -60,23 +68,44 @@ const ViewModal: React.FC<{ ) })} - - {data.coscoAccessCategoryList.map((item) => { - return ( -
{item.categoryName}
- ) - })} -
- {data.coscoAccessWork.startTime} - {data.coscoAccessWork.endTime} - - {data.coscoAccessUserls.map((item) => { - return ( -
{item.deptId} - {item.userId}
- ) - })} -
- {data.coscoAccessWork.reviewStatusText} + + {data.coscoAccessWork.accessType === 'scattered' && ( + <> + {data.coscoAccessWork.accessDesc} + + {data.coscoAccessWorkAttachments.fileName} + + + )} + {data.coscoAccessWork.accessType === 'offline' && ( + + {data.coscoAccessWorkAttachments.fileName} + + )} + + + {data.coscoAccessWork.accessType === 'online' && ( + <> + + {data.coscoAccessCategoryList.map((item) => { + return ( +
{item.categoryName}
+ ) + })} +
+ {data.coscoAccessWork.startTime} + {data.coscoAccessWork.endTime} + + {data.coscoAccessUserls.map((item) => { + return ( +
{item.deptId} - {item.userId}
+ ) + })} +
+ {data.coscoAccessWork.reviewStatusText} + + )} + )} diff --git a/src/pages/supplier/admission/admissionReviewManagement/index.tsx b/src/pages/supplier/admission/admissionReviewManagement/index.tsx index e953aba..63e3123 100644 --- a/src/pages/supplier/admission/admissionReviewManagement/index.tsx +++ b/src/pages/supplier/admission/admissionReviewManagement/index.tsx @@ -97,21 +97,33 @@ const CooperateEnterprise: React.FC = () => { title: '发起单位', dataIndex: 'deptId', key: 'deptId', + ellipsis: true, }, { title: '准入部门', dataIndex: 'deptId', key: 'deptId', + ellipsis: true, }, { - title: '品类', - dataIndex: 'categoryName', - key: 'categoryName', + title: '准入品类', + dataIndex: 'categoryNameList', + align: 'center', + render: (_: any, record: any) => { + return ( + <> + {record.categoryNameList.map((item:string) => { + return
{`${item}`}
+ })} + + ) + }, }, { title: '准入方式', dataIndex: 'accessTypeText', key: 'accessTypeText', + ellipsis: true, }, { title: '评审时间',