带录入与评审查看字段替换

This commit is contained in:
孙景学
2025-07-21 14:55:25 +08:00
parent b6f76ea54f
commit 7baf43e21a
6 changed files with 177 additions and 23 deletions

View File

@ -20,6 +20,7 @@ interface coscoAccessWorkAttachments {
interface coscoAccessUserl {
deptId: string;
deptName: string;
userName: string;
userId: string;
}
interface coscoAccessCategoryLists {
@ -62,7 +63,7 @@ const ViewModal: React.FC<{
}, [record])
return (
<Modal title="查看详情" visible={visible} footer={null} onCancel={onCancel}>
<Modal title="查看详情" visible={visible} footer={null} onCancel={onCancel} width={800} >
{data && (
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
<Descriptions.Item label="准入部门">{data.coscoAccessWork.deptName}</Descriptions.Item>
@ -103,7 +104,7 @@ const ViewModal: React.FC<{
<Descriptions.Item label="评审专家">
{data.coscoAccessUserls.map((item) => {
return (
<div style={{ margin: '5px' }}>{item.deptName} - {item.userId}</div>
<div style={{ margin: '5px' }}>{item.deptName} - {item.userName}</div>
)
})}
</Descriptions.Item>

View File

@ -20,6 +20,7 @@ interface coscoAccessWorkAttachments {
interface coscoAccessUserl {
deptName: string;
deptId: string;
userName: string;
userId: string;
}
interface coscoAccessCategoryLists {
@ -63,7 +64,7 @@ const ViewModal: React.FC<{
}, [record])
return (
<Modal title="查看详情" visible={visible} footer={null} onCancel={onCancel}>
<Modal title="查看详情" visible={visible} footer={null} onCancel={onCancel} width={800}>
{data && (
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
<Descriptions.Item label="准入部门">{data.coscoAccessWork.deptName}</Descriptions.Item>
@ -105,7 +106,7 @@ const ViewModal: React.FC<{
<Descriptions.Item label="评审专家">
{data.coscoAccessUserls.map((item) => {
return (
<div style={{ margin: '5px' }}>{item.deptName} - {item.userId}</div>
<div style={{ margin: '5px' }}>{item.deptName} - {item.userName}</div>
)
})}
</Descriptions.Item>

View File

@ -20,6 +20,7 @@ interface coscoAccessWorkAttachments {
interface coscoAccessUserl {
deptId: string;
deptName: string;
userName: string;
userId: string;
}
interface coscoAccessCategoryLists {
@ -62,7 +63,7 @@ const ViewModal: React.FC<{
}, [record])
return (
<Modal title="查看详情" visible={visible} footer={null} onCancel={onCancel}>
<Modal title="查看详情" visible={visible} footer={null} onCancel={onCancel} width={800}>
{data && (
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
<Descriptions.Item label="准入部门" >{data.coscoAccessWork.deptName}</Descriptions.Item>
@ -105,7 +106,7 @@ const ViewModal: React.FC<{
<Descriptions.Item label="评审专家">
{data.coscoAccessUserls.map((item) => {
return (
<div style={{ margin: '5px' }}>{item.deptName} - {item.userId}</div>
<div style={{ margin: '5px' }}>{item.deptName} - {item.userName}</div>
)
})}
</Descriptions.Item>

View File

@ -1,5 +1,5 @@
// components/SupplierExitModal.tsx
import React from 'react';
import React, { useMemo } from 'react';
import { Modal } from 'antd';
import Register from '@/pages/register/supplier'
interface SupplierExitModalProps {
@ -9,6 +9,7 @@ interface SupplierExitModalProps {
}
const SupplierExitModal: React.FC<SupplierExitModalProps> = ({ visible, exitId, onOk }) => {
const registerKey = useMemo(() => `${exitId}-${Date.now()}`, [visible, exitId]);
return (
<Modal
title="供应商注册代录"
@ -18,11 +19,11 @@ const SupplierExitModal: React.FC<SupplierExitModalProps> = ({ visible, exitId,
okText="知道了"
cancelButtonProps={{ style: { display: 'none' } }}
width='80%'
style={{height:"75vh"}}
style={{ height: "75vh" }}
footer={false}
centered
>
<Register supplierWithInput={true} exitId={exitId} onOk={onOk} />
<Register key={registerKey} supplierWithInput={true} exitId={exitId} onOk={onOk} />
</Modal>
);
};

View File

@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import { Table, Form, Input, Button, Row, Col, DatePicker, Tabs, Space, Tooltip } from 'antd';
import { SearchOutlined, DeleteOutlined } from '@ant-design/icons';
import type { ColumnsType } from 'antd/es/table';
@ -88,8 +88,8 @@ const SupplierRegisterAgent: React.FC = () => {
fetchData(pag.current, pag.pageSize);
};
// 列
const columns: ColumnsType<Columns> = [
// 列 境内
const columnsDvs: ColumnsType<Columns> = [
{
title: '序号',
dataIndex: 'index',
@ -97,7 +97,7 @@ const SupplierRegisterAgent: React.FC = () => {
width: 80,
render: (_: any, __: any, idx: number) => ((pagination.current - 1) * pagination.pageSize) + idx + 1,
},
{
title: "供应商名称", dataIndex: "name", align: "left",
width: 200,
@ -110,16 +110,163 @@ const SupplierRegisterAgent: React.FC = () => {
)
}
},
{
title: '统一社会信息用代码',
dataIndex: 'socialCreditCode',
align: 'center',
width: 160,
ellipsis: true,
},
{
title: '企业类型',
dataIndex: 'enterpriseTypeCn',
align: 'center',
width: 140,
ellipsis: true,
},
{
title: '创建单位',
dataIndex: 'orgName',
align: 'center',
width: 120,
ellipsis: true,
},
{
title: '创建部门',
dataIndex: 'deptName',
align: 'center',
width: 120,
ellipsis: true,
},
{
title: '创建时间',
dataIndex: 'createTime',
align: 'center',
width: 180,
},
{
title: '操作',
align: 'center',
fixed: 'right',
width: 120,
render: (_: any, record: any) => (
<Space>
<a onClick={() => { setCurrentRecord(record.id); setViewVisible(true); }}></a>
</Space>
),
},
];
// 列 境外
const columnsOvs: ColumnsType<Columns> = [
{
title: '序号',
dataIndex: 'index',
align: 'center',
width: 80,
render: (_: any, __: any, idx: number) => ((pagination.current - 1) * pagination.pageSize) + idx + 1,
},
{
title: "供应商名称", dataIndex: "name", align: "left",
width: 200,
ellipsis: true,
render: (dom, record) => {
return (
<Tooltip title={record.name} overlayStyle={{ zIndex: 1200 }}>
<a onClick={() => supplierDetailModal?.(record.id)}>{record.name || ''}</a>
</Tooltip>
)
}
},
{
title: '税号',
dataIndex: 'unifiedCode',
align: 'center',
width: 120,
ellipsis: true,
},
{
title: '创建单位',
dataIndex: 'orgName',
align: 'center',
width: 120,
ellipsis: true,
},
{
title: '创建部门',
dataIndex: 'deptName',
align: 'center',
width: 120,
ellipsis: true,
},
{
title: '创建时间',
dataIndex: 'createTime',
align: 'center',
width: 180,
},
{
title: '操作',
align: 'center',
fixed: 'right',
width: 120,
render: (_: any, record: any) => (
<Space>
<a onClick={() => { setCurrentRecord(record.id); setViewVisible(true); }}></a>
</Space>
),
},
];
// 列 境外
const columnsPe: ColumnsType<Columns> = [
{
title: '序号',
dataIndex: 'index',
align: 'center',
width: 80,
render: (_: any, __: any, idx: number) => ((pagination.current - 1) * pagination.pageSize) + idx + 1,
},
{
title: "姓名", dataIndex: "name", align: "left",
width: 200,
ellipsis: true,
render: (dom, record) => {
return (
<Tooltip title={record.name} overlayStyle={{ zIndex: 1200 }}>
<a onClick={() => supplierDetailModal?.(record.id)}>{record.name || ''}</a>
</Tooltip>
)
}
},
{
title: '身份证号',
dataIndex: 'idCard',
align: 'center',
width: 160,
ellipsis: true,
},
{
title: '联系电话',
dataIndex: 'personPhone',
width: 120,
align: 'center',
ellipsis: true,
},
{
title: '创建单位',
width: 120,
dataIndex: 'orgName',
align: 'center',
ellipsis: true,
},
{
title: '创建部门',
width: 120,
dataIndex: 'deptName',
align: 'center',
ellipsis: true,
},
{
title: '创建时间',
@ -131,6 +278,7 @@ const SupplierRegisterAgent: React.FC = () => {
title: '操作',
align: 'center',
width: 120,
fixed: 'right',
render: (_: any, record: any) => (
<Space>
<a onClick={() => { setCurrentRecord(record.id); setViewVisible(true); }}></a>
@ -178,7 +326,9 @@ const SupplierRegisterAgent: React.FC = () => {
</Row>
{/* 表格 */}
<Table
columns={columns}
columns={
tabKey === 'dvs' ? columnsDvs : tabKey === 'ovs' ? columnsOvs : columnsPe
}
dataSource={data}
rowKey="id"
loading={loading}