字典转换问题修改
This commit is contained in:
@ -3,6 +3,7 @@ import { Modal, Input, Row, Col, Table, Button, Form, Tooltip } from 'antd';
|
||||
import { RightOutlined, LeftOutlined } from '@ant-design/icons';
|
||||
import { coscoSupplierBase } from '../services';
|
||||
import RegionTypeSelect from '@/components/CommonSelect/RegionTypeSelect'
|
||||
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
|
||||
|
||||
const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSelect?: (selected: any[]) => void; }> = ({ visible, onCancel, onSelect }) => {
|
||||
// 查询
|
||||
@ -26,6 +27,8 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
|
||||
const newSelected = selected.filter((item:any) => !ids.has(item.id));
|
||||
return [...chosenSuppliers, ...newSelected];
|
||||
};
|
||||
const supplierDetailModal = useSupplierDetailModal();
|
||||
|
||||
//获取已选供应商
|
||||
const moveToRight = () => {
|
||||
const selected = tableListData.filter((item:any) => leftSelected.includes(item.id));
|
||||
@ -65,7 +68,7 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
|
||||
const name = record.supplierType === "ovs"? record.nameEn : record.name;
|
||||
return(
|
||||
<Tooltip placement="topLeft" title={name}>
|
||||
{name}
|
||||
<a onClick={() => supplierDetailModal?.(record.id)}>{name}</a>
|
||||
</Tooltip>)
|
||||
} },
|
||||
{ title: '统一社会信用代码/税号', ellipsis: true, dataIndex: 'unifiedCode' },
|
||||
|
@ -81,13 +81,21 @@ const CooperateEnterprise: React.FC = () => {
|
||||
},
|
||||
{
|
||||
title: '准入单位',
|
||||
dataIndex: 'orgName',
|
||||
key: 'orgName',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '准入部门',
|
||||
dataIndex: 'deptName',
|
||||
key: 'deptName',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '准入品类',
|
||||
dataIndex: 'categoryName',
|
||||
key: 'categoryName',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '准入时间',
|
||||
|
@ -172,12 +172,12 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
|
||||
bodyStyle={{ padding: 24 }}
|
||||
>
|
||||
<Form layout="inline" form={form} style={{ marginBottom: 16 }}>
|
||||
<Form.Item name="name" label="供应商名称">
|
||||
<Form.Item name="supplierName" label="供应商名称">
|
||||
<Input style={{ width: 140 }} allowClear maxLength={50} placeholder="请输入供应商名称" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item name="categoryId" label="准入品类">
|
||||
<CategorySelector multiple={false} style={{ width: 140 }} />
|
||||
<CategorySelector multiple={false} style={{ width: 200 }} />
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Space>
|
||||
|
@ -177,7 +177,7 @@ const SupplierMessage: React.FC = () => {
|
||||
{viewRecord && (
|
||||
<Descriptions bordered column={1} size="small">
|
||||
<Descriptions.Item labelStyle={{ width: '120px' }} label="消息内容">{viewRecord.content}</Descriptions.Item>
|
||||
<Descriptions.Item label="业务类型">{viewRecord.typeCn}</Descriptions.Item>
|
||||
<Descriptions.Item label="业务类型">{typeMap[viewRecord.type] || viewRecord.type }</Descriptions.Item>
|
||||
<Descriptions.Item label="接收时间">{viewRecord.createTime}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
)}
|
||||
|
Reference in New Issue
Block a user