This commit is contained in:
linxd
2025-07-21 15:55:35 +08:00
7 changed files with 190 additions and 27 deletions

View File

@ -102,7 +102,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
</Form.Item>
</Col>
<Col span={8}>
<Form.Item name={['coscoSupplierBase', 'vat']} label="增值税号VAT">
<Form.Item name={['coscoSupplierBase', 'vat']} label="税号">
<Input placeholder="请输入增值税号" />
</Form.Item>
</Col>
@ -159,7 +159,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
<Input.Password placeholder="请再次输入密码" />
</Form.Item>
</Col> */}
<Col span={8}>
{/* <Col span={8}>
<Form.Item
name={['coscoSupplierBase', 'regAddress']}
label="注册地址"
@ -167,7 +167,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
>
<Input prefix={<EnvironmentOutlined />} placeholder="请具体注明" />
</Form.Item>
</Col>
</Col> */}
<Col span={8}>
<Form.Item
name={['coscoSupplierBase', 'workAddress']}
@ -196,7 +196,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
<Input placeholder="请输入企业法定代表人" />
</Form.Item>
</Col>
<Col span={8}>
{/* <Col span={8}>
<Form.Item
name={['coscoSupplierBase', 'enterpriseType']}
label="企业类型"
@ -210,7 +210,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
}))}
/>
</Form.Item>
</Col>
</Col> */}
{/* <Col span={8}>
<Form.Item
name="supplierType"
@ -299,17 +299,17 @@ const ForeignForm: React.FC<ForeignFormProps> = ({
<Input placeholder="请输入验证码" />
</Form.Item>
</Col>
<Col span={8}>
{/* <Col span={8}>
<Form.Item
name={['coscoSupplierBase', 'contactsPhone']}
label="联系人手机"
>
<Input placeholder="请输入企业联系电话" prefix={<MobileOutlined />} />
</Form.Item>
</Col>
</Col> */}
<Col span={8}>
<Form.Item name={['coscoSupplierBase', 'telephone']} label="固定电话">
<Input placeholder="请输入企业固定电话" />
<Form.Item name={['coscoSupplierBase', 'contactsPhone']} label="联系电话">
<Input placeholder="请输入企业联系电话" />
</Form.Item>
</Col>
{/* <Col span={8}>

View File

@ -109,13 +109,17 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
form.setFieldsValue({ accessWorkName: autoTitle });
}
};
//获取 cuCompanyNumber
const onChangeDepartmentSelect = (value: any, label: any, extra: any) => {
form.setFieldsValue({ orgId: extra?.triggerNode?.props.cuCompanyNumber });
}
// 提交
const onFinish = async (values: any) => {
const finalPayload: {
coscoAccessWork: {
accessWorkName: string;
deptId: string;
orgId: string;
};
categoryIds: string[];
supplierIds: string[];
@ -123,6 +127,7 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
coscoAccessWork: {
accessWorkName: '',
deptId: '',
orgId: '',
},
categoryIds: [],
supplierIds: [],
@ -131,6 +136,8 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
finalPayload.coscoAccessWork.accessWorkName = values.accessWorkName;
//准入部门
finalPayload.coscoAccessWork.deptId = values.deptId;
//准入单位
finalPayload.coscoAccessWork.orgId = values.orgId;
//品类选择
finalPayload.categoryIds = values.categoryIds;
//选择供应商
@ -207,9 +214,11 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
name="deptId"
rules={[{ required: true, message: '请选择准入部门' }]}
>
<AccessDepartmentSelect style={{ width: '100%' }} orgCategory='' />
<AccessDepartmentSelect style={{ width: '100%' }} orgCategory='' onChange={onChangeDepartmentSelect} />
</Form.Item>
<Form.Item name="orgId" noStyle>
<Input type="hidden" />
</Form.Item>
<Form.Item
label="选择供应商"
@ -245,7 +254,7 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
</Form.Item>
<Form.Item wrapperCol={{ offset: 6 }}>
<Button type="primary" htmlType="submit" style={{ marginRight: 8 }} disabled={submitting}>
<Button type="primary" htmlType="submit" style={{ marginRight: 8 }} disabled={submitting}>
</Button>
<Button

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}