处理序号字典
This commit is contained in:
@ -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': '' },
|
||||
|
@ -39,13 +39,13 @@ const RiskList = ({id}:{id:string}) => {
|
||||
]
|
||||
//合规风险
|
||||
const [dataList, setDataList] = useState<data[]>([])
|
||||
//加载
|
||||
const [loading, setLoading] = useState(false);
|
||||
//加载 const [loading, setLoading] = useState(false);
|
||||
|
||||
//分页
|
||||
|
||||
//数据渲染
|
||||
const getList = async () => {
|
||||
setLoading(true);
|
||||
// setLoading(true);
|
||||
try {
|
||||
const { code, data } = await queryRiskInfo({ supplierId: id });
|
||||
if (code === 200) {
|
||||
@ -56,7 +56,7 @@ const RiskList = ({id}:{id:string}) => {
|
||||
} catch (error) {
|
||||
message.error(intl.formatMessage({id: 'component.globalModal.apiError'}));
|
||||
} finally {
|
||||
setLoading(false);
|
||||
// setLoading(false);
|
||||
}
|
||||
};
|
||||
//初始化
|
||||
|
@ -134,7 +134,7 @@ const SupplierEntryReview: React.FC = () => {
|
||||
render: (_: any, record: any) => {
|
||||
return (
|
||||
<>
|
||||
{record.categoryNameList.map((item:string) => {
|
||||
{record.categoryNameList && record.categoryNameList.map((item:string) => {
|
||||
return <div>{`${item}`}</div>
|
||||
})}
|
||||
</>
|
||||
|
@ -112,7 +112,7 @@ const CooperateEnterprise: React.FC = () => {
|
||||
render: (_: any, record: any) => {
|
||||
return (
|
||||
<>
|
||||
{record.categoryNameList.map((item:string) => {
|
||||
{record.categoryNameList && record.categoryNameList.map((item:string) => {
|
||||
return <div>{`${item}`}</div>
|
||||
})}
|
||||
</>
|
||||
|
@ -1,52 +0,0 @@
|
||||
import { Request, Response } from 'express';
|
||||
|
||||
export default {
|
||||
'GET /api/system/bank': (req: Request, res: Response) => {
|
||||
res.json({ code: 200,
|
||||
data: [
|
||||
{
|
||||
id: '1',
|
||||
interbankNumber: '123456789',
|
||||
bank: '中国银行',
|
||||
accountName: '张三',
|
||||
account: '6228480000000000000',
|
||||
currency: '人民币',
|
||||
nation: '中国',
|
||||
province: '广东省',
|
||||
city: '广州市',
|
||||
updateTime: '2024-06-18',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
interbankNumber: '987654321',
|
||||
bank: '工商银行',
|
||||
accountName: '李四',
|
||||
account: '6228480000000000001',
|
||||
currency: '美元',
|
||||
nation: '中国',
|
||||
province: '江苏省',
|
||||
city: '南京市',
|
||||
updateTime: '2024-06-17',
|
||||
},
|
||||
],
|
||||
total: 2,
|
||||
msg: '操作成功'
|
||||
});
|
||||
},
|
||||
'GET /api/system/categoryOption': (req: Request, res: Response) => {
|
||||
res.json({ code: 200,
|
||||
data: [
|
||||
{
|
||||
value: '1',
|
||||
label: '1',
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '3',
|
||||
},
|
||||
],
|
||||
total: 2,
|
||||
msg: '操作成功'
|
||||
});
|
||||
},
|
||||
};
|
@ -15,8 +15,8 @@ interface Data {
|
||||
}
|
||||
|
||||
interface CategoryOption {
|
||||
value: string;
|
||||
label: string;
|
||||
code: string;
|
||||
dicName: string;
|
||||
}
|
||||
|
||||
const supplierNews: React.FC = () => {
|
||||
@ -82,21 +82,23 @@ const supplierNews: React.FC = () => {
|
||||
title: '业务类型',
|
||||
dataIndex: 'typeCn',
|
||||
key: 'typeCn',
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
title: '发送时间',
|
||||
dataIndex: 'createTime',
|
||||
key: 'createTime',
|
||||
width: 200,
|
||||
},
|
||||
];
|
||||
//初始化
|
||||
useEffect(() => {
|
||||
// categoryOption().then((res:any) => {
|
||||
// const { code, data } = res;
|
||||
// if(code == 200) {
|
||||
// setCategoryOptions(data)
|
||||
// }
|
||||
// })
|
||||
getDictList('message_type').then((res:any) => {
|
||||
const { code, data } = res;
|
||||
if(code == 200) {
|
||||
setCategoryOptions(data)
|
||||
}
|
||||
})
|
||||
getExitMge().then((res) => {
|
||||
const { code, data } = res;
|
||||
if (code == 200) {
|
||||
@ -138,8 +140,8 @@ const supplierNews: React.FC = () => {
|
||||
<Form.Item name="type" label="业务类型">
|
||||
<Select placeholder="请选择业务类型" allowClear>
|
||||
{categoryOptions.map((option) => (
|
||||
<Select.Option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
<Select.Option key={option.code} value={option.code}>
|
||||
{option.dicName}
|
||||
</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
|
@ -35,7 +35,7 @@ const CategoryLibraryManage: React.FC = () => {
|
||||
// 列表加载
|
||||
const [loading, setLoading] = useState(false);
|
||||
// 分页
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 188 });
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 0 });
|
||||
|
||||
// 新增弹窗
|
||||
const [addVisible, setAddVisible] = useState(false);
|
||||
|
@ -39,7 +39,7 @@ const CategoryLibraryManage: React.FC = () => {
|
||||
// 列表加载
|
||||
const [loading, setLoading] = useState(false);
|
||||
// 分页
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 188 });
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 0 });
|
||||
//
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
// 新增弹窗
|
||||
|
@ -1,34 +1,15 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Tree, Button, Modal, Form, Input, Select, message, Popconfirm, Spin } from 'antd';
|
||||
import { Table, Button, Modal, Form, Input, Select, message, Popconfirm, Spin } from 'antd';
|
||||
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons';
|
||||
import { categoryTree, add, edit, del } from './services';
|
||||
|
||||
interface CategoryNode {
|
||||
id: string;
|
||||
categoryName: string;
|
||||
parentId: string;
|
||||
type: string; // "0" 分类, "1" 品类
|
||||
orderBy: string;
|
||||
children?: CategoryNode[] | null;
|
||||
}
|
||||
interface CategoryFormFields {
|
||||
id?: string;
|
||||
categoryName: string;
|
||||
parentId: string;
|
||||
type: string;
|
||||
orderBy: string;
|
||||
}
|
||||
|
||||
const CategoryManage: React.FC = () => {
|
||||
const [treeData, setTreeData] = useState<CategoryNode[]>([]);
|
||||
const CategoryManageTable: React.FC = () => {
|
||||
const [data, setData] = useState([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
// 弹窗相关
|
||||
const [modalOpen, setModalOpen] = useState(false);
|
||||
const [modalType, setModalType] = useState<'add' | 'edit'>('add');
|
||||
const [currentNode, setCurrentNode] = useState<CategoryNode | null>(null);
|
||||
const [form] = Form.useForm<CategoryFormFields>();
|
||||
const [expandedKeys, setExpandedKeys] = useState<React.Key[]>([]);
|
||||
const [currentNode, setCurrentNode] = useState<any>(null);
|
||||
const [form] = Form.useForm();
|
||||
|
||||
// 加载树数据
|
||||
const fetchTree = async () => {
|
||||
@ -36,119 +17,97 @@ const CategoryManage: React.FC = () => {
|
||||
const res = await categoryTree();
|
||||
setLoading(false);
|
||||
if (res.code === 200) {
|
||||
setTreeData(res.data || []);
|
||||
setData(res.data || []);
|
||||
} else {
|
||||
message.error(res.message || '加载失败');
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
fetchTree();
|
||||
}, []);
|
||||
useEffect(() => { fetchTree(); }, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (treeData && treeData.length) {
|
||||
const allKeys: React.Key[] = [];
|
||||
const collectKeys = (nodes: any[]) => {
|
||||
nodes.forEach(node => {
|
||||
allKeys.push(node.id);
|
||||
if (node.children && node.children.length) {
|
||||
collectKeys(node.children);
|
||||
}
|
||||
});
|
||||
};
|
||||
collectKeys(treeData);
|
||||
setExpandedKeys(allKeys);
|
||||
}
|
||||
}, [treeData]);
|
||||
|
||||
const convertToTreeData = (data?: CategoryNode[]): any[] =>
|
||||
(data || []).map(item => ({
|
||||
key: item.id,
|
||||
title: (
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
minWidth: 600,
|
||||
}}
|
||||
>
|
||||
<span style={{ flexShrink: 0, fontWeight: 500 }}>{item.categoryName}</span>
|
||||
{/* 横线,从名字右 5px 到按钮左 8px */}
|
||||
<div
|
||||
style={{
|
||||
flex: 1,
|
||||
height: 0,
|
||||
borderBottom: '1px dashed #e5e5e5',
|
||||
margin: '0 8px 0 5px',
|
||||
}}
|
||||
/>
|
||||
{/* 按钮组整体贴右 */}
|
||||
<span style={{ flexShrink: 0, display: 'flex', gap: 4 }}>
|
||||
// 表格字段
|
||||
const columns = [
|
||||
{
|
||||
title: '品类名称',
|
||||
dataIndex: 'categoryName',
|
||||
key: 'categoryName',
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
render: (v: string) => (v === '0' ? '分类' : '品类'),
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
dataIndex: 'orderBy',
|
||||
key: 'orderBy',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 280,
|
||||
render: (_:any, record:any) => (
|
||||
<>
|
||||
<Button
|
||||
size="small"
|
||||
icon={<PlusOutlined />}
|
||||
type="link"
|
||||
disabled={item.type === '1'}
|
||||
onClick={e => {
|
||||
e.stopPropagation();
|
||||
icon={<PlusOutlined />}
|
||||
disabled={record.type === '1'}
|
||||
onClick={() => {
|
||||
setModalType('add');
|
||||
setCurrentNode(item);
|
||||
setCurrentNode(record);
|
||||
form.resetFields();
|
||||
form.setFieldsValue({
|
||||
categoryName: '',
|
||||
parentId: item.id,
|
||||
parentId: record.id,
|
||||
type: '1',
|
||||
orderBy: '',
|
||||
});
|
||||
setModalOpen(true);
|
||||
}}
|
||||
>添加</Button>
|
||||
>增加子级</Button>
|
||||
<Button
|
||||
size="small"
|
||||
icon={<EditOutlined />}
|
||||
type="link"
|
||||
onClick={e => {
|
||||
e.stopPropagation();
|
||||
icon={<EditOutlined />}
|
||||
onClick={() => {
|
||||
setModalType('edit');
|
||||
setCurrentNode(item);
|
||||
setCurrentNode(record);
|
||||
form.setFieldsValue({
|
||||
id: item.id,
|
||||
categoryName: item.categoryName,
|
||||
parentId: item.parentId,
|
||||
type: item.type,
|
||||
orderBy: item.orderBy,
|
||||
id: record.id,
|
||||
categoryName: record.categoryName,
|
||||
parentId: record.parentId,
|
||||
type: record.type,
|
||||
orderBy: record.orderBy,
|
||||
});
|
||||
setModalOpen(true);
|
||||
}}
|
||||
>修改</Button>
|
||||
{/* <Popconfirm
|
||||
>编辑</Button>
|
||||
<Popconfirm
|
||||
title="确定要删除该节点吗?"
|
||||
onConfirm={() => handleDelete(item.id)}
|
||||
disabled={!!(item.children && item.children.length > 0)}
|
||||
onConfirm={() => handleDelete(record.id)}
|
||||
disabled={!!(record.children && record.children.length > 0)}
|
||||
>
|
||||
<Button
|
||||
size="small"
|
||||
danger
|
||||
icon={<DeleteOutlined />}
|
||||
type="link"
|
||||
disabled={!!(item.children && item.children.length > 0)}
|
||||
onClick={e => e.stopPropagation()}
|
||||
icon={<DeleteOutlined />}
|
||||
disabled={!!(record.children && record.children.length > 0)}
|
||||
>删除</Button>
|
||||
</Popconfirm> */}
|
||||
</span>
|
||||
</div>
|
||||
</Popconfirm>
|
||||
</>
|
||||
),
|
||||
children: item.children ? convertToTreeData(item.children) : [],
|
||||
}));
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
// 添加/修改提交
|
||||
// 提交
|
||||
const handleOk = async () => {
|
||||
try {
|
||||
const values = await form.validateFields();
|
||||
console.log(values);
|
||||
|
||||
let res;
|
||||
if (modalType === 'add') {
|
||||
res = await add(values);
|
||||
@ -165,7 +124,6 @@ const convertToTreeData = (data?: CategoryNode[]): any[] =>
|
||||
} catch (err) { }
|
||||
};
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: string) => {
|
||||
const res = await del(id);
|
||||
if (res.code === 200) {
|
||||
@ -191,25 +149,25 @@ const convertToTreeData = (data?: CategoryNode[]): any[] =>
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{ padding: 24 }}>
|
||||
<h2>品类管理</h2>
|
||||
<div style={{ padding: 0 }}>
|
||||
<Button
|
||||
type="primary"
|
||||
style={{ marginBottom: 16 }}
|
||||
style={{ marginBottom: 10 }}
|
||||
onClick={handleAddRoot}
|
||||
>
|
||||
新增顶级分类
|
||||
</Button>
|
||||
<Spin spinning={loading}>
|
||||
<Tree
|
||||
treeData={convertToTreeData(treeData)}
|
||||
expandedKeys={expandedKeys}
|
||||
onExpand={keys => setExpandedKeys(keys as React.Key[])}
|
||||
style={{ background: '#fff', padding: 16, borderRadius: 6 }}
|
||||
<Table
|
||||
columns={columns}
|
||||
dataSource={data}
|
||||
rowKey="id"
|
||||
pagination={false}
|
||||
expandable={{
|
||||
childrenColumnName: 'children',
|
||||
}}
|
||||
/>
|
||||
</Spin>
|
||||
|
||||
{/* 弹窗 */}
|
||||
<Modal
|
||||
visible={modalOpen}
|
||||
title={modalType === 'add' ? '新增品类' : '修改品类'}
|
||||
@ -256,4 +214,4 @@ const convertToTreeData = (data?: CategoryNode[]): any[] =>
|
||||
);
|
||||
};
|
||||
|
||||
export default CategoryManage;
|
||||
export default CategoryManageTable;
|
||||
|
@ -35,7 +35,7 @@ const SupplierEntryManage: React.FC = () => {
|
||||
// 列表加载
|
||||
const [loading, setLoading] = useState(false);
|
||||
// 分页
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 188 });
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 0 });
|
||||
|
||||
// 新增弹窗
|
||||
const [addVisible, setAddVisible] = useState(false);
|
||||
|
@ -1,104 +0,0 @@
|
||||
import { Request, Response } from 'express';
|
||||
|
||||
// 代码中会兼容本地 service mock 以及部署站点的静态数据
|
||||
export default {
|
||||
'GET /api/supplier/getSupplierChangeList': (req: Request, res: Response) => {
|
||||
res.send({
|
||||
code: 200,
|
||||
msg: 'success',
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
name: '中山市合创展包装材料有限公司',
|
||||
region: '境内',
|
||||
supplierType: '中央企业',
|
||||
accessTime: '2025-03-03 09:30',
|
||||
changeTime: '2025-03-03 09:30',
|
||||
status: '未开始',
|
||||
result: '',
|
||||
},
|
||||
],
|
||||
total: 10
|
||||
});
|
||||
},
|
||||
'GET /api/supplier/list': (req: Request, res: Response) => {
|
||||
res.send({
|
||||
code: 200,
|
||||
msg: 'success',
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
name: '中山市合创展包装材料有限公司',
|
||||
region: '境内',
|
||||
supplierType: '中央企业',
|
||||
accessTime: '2025-03-03 09:30',
|
||||
changeTime: '2025-03-03 09:30',
|
||||
status: '未开始',
|
||||
result: '',
|
||||
},
|
||||
],
|
||||
total: 10
|
||||
});
|
||||
},
|
||||
'GET /api/system/getPage': (req: Request, res: Response) => {
|
||||
res.json({
|
||||
code: 200,
|
||||
data: [
|
||||
{
|
||||
deptName: '供应商名称变更',
|
||||
categoryName: '2024-05-20 13:22:11',
|
||||
createTime: '集团采购部',
|
||||
exitTime: '已通过',
|
||||
exitReason: '2024-05-21 09:10:31',
|
||||
},
|
||||
{
|
||||
deptName: '法人代表变更',
|
||||
categoryName: '2024-05-18 08:30:55',
|
||||
createTime: '分公司审核部',
|
||||
exitTime: '审核中',
|
||||
exitReason: '',
|
||||
},
|
||||
],
|
||||
total: 2,
|
||||
msg: '操作成功'
|
||||
});
|
||||
},
|
||||
|
||||
'GET /api/system/getSupplierChangeDetail': (req: Request, res: Response) => {
|
||||
res.json({
|
||||
"code": 200,
|
||||
"msg": "success",
|
||||
"data": {
|
||||
baseInfo: [
|
||||
{ label: '供应商名称', value: 'xxx' },
|
||||
{ label: '境内/境外', value: '境内' },
|
||||
{ label: '准入单位', value: 'xxxx' },
|
||||
{ label: '准入部门', value: '采购部' },
|
||||
],
|
||||
changeInfo: [
|
||||
{ label: '供应商名称-变更前', value: 'xxxx' },
|
||||
{ label: '供应商名称-变更后', value: 'xxxx' },
|
||||
],
|
||||
"supplierName": "中山市合创展包装材料有限公司",
|
||||
"accessUnit": "中远海运(青岛)有限公司",
|
||||
"region": "境内",
|
||||
"accessDept": "采购部",
|
||||
"beforeName": "中山市合创展包装材料有限公司",
|
||||
"afterName": "中山市合创展包装有限公司",
|
||||
"qualifications": [
|
||||
{
|
||||
"type": "CMMI资质",
|
||||
"name": "CMMI资质",
|
||||
"level": "高级",
|
||||
"number": "546464",
|
||||
"org": "XX机构",
|
||||
"issueDate": "2024-09-08",
|
||||
"validDate": "2028-09-10",
|
||||
"file": "https://dummyimage.com/40x30/1890ff/fff.png&text=附件"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
};
|
@ -1,11 +1,15 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Table, Form, Input, Select, Button, DatePicker, Tag, Space, message } from 'antd';
|
||||
import { Table, Form, Input, Select, Button, DatePicker, Tooltip } from 'antd';
|
||||
import { SearchOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||
//详情
|
||||
import DetailView from './components/DetailView';
|
||||
//接口
|
||||
import { getPage } from './services';
|
||||
import type { ColumnsType } from 'antd/es/table';
|
||||
//字典
|
||||
import { getDictList } from '@/servers/api/dicts'
|
||||
|
||||
//umi 相关
|
||||
import { connect } from 'umi';
|
||||
import moment from 'moment';
|
||||
const { RangePicker } = DatePicker;
|
||||
|
||||
@ -32,30 +36,39 @@ interface Dict {
|
||||
dicName: string;
|
||||
code: string;
|
||||
}
|
||||
|
||||
const SupplierChangeReviewManage: React.FC = () => {
|
||||
interface Props {
|
||||
dispatch: any;
|
||||
}
|
||||
const SupplierChangeReviewManage: React.FC<Props> = ({ dispatch }) => {
|
||||
//搜索
|
||||
const [form] = Form.useForm();
|
||||
//渲染数据
|
||||
const [data, setData] = useState<Columns[]>([]);
|
||||
//列表加载
|
||||
const [loading, setLoading] = useState(false);
|
||||
//分页
|
||||
const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 });
|
||||
//审批记录弹窗
|
||||
const [detailVisible, setDetailVisible] = useState(false);
|
||||
//审批记录弹窗 传入id
|
||||
const [currentDetailId, setCurrentDetailId] = useState<string | null>(null);
|
||||
//列表数据
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
|
||||
// 获取表格数据
|
||||
const fetchData = async (params = {}) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const values = form.getFieldsValue();
|
||||
const { supplierName, changeTime, supplierType, approveStatus } = values;
|
||||
const { changeTime } = values;
|
||||
const startTime = changeTime ? moment(changeTime[0]).format('YYYY-MM-DD') : '';
|
||||
const endTime = changeTime ? moment(changeTime[1]).format('YYYY-MM-DD') : '';
|
||||
|
||||
const { code, data, message } = await getPage({
|
||||
pageNo: pagination.current,
|
||||
pageSize: pagination.pageSize,
|
||||
supplierName, startTime, endTime, supplierType, approveStatus,
|
||||
startTime,
|
||||
endTime,
|
||||
...values
|
||||
});
|
||||
if (code === 200) {
|
||||
setData(data.records);
|
||||
@ -67,7 +80,7 @@ const SupplierChangeReviewManage: React.FC = () => {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
// 初始化
|
||||
useEffect(() => {
|
||||
getDictList('approve_type').then((res) => {
|
||||
if (res.code == 200) {
|
||||
@ -93,6 +106,7 @@ const SupplierChangeReviewManage: React.FC = () => {
|
||||
setCurrentDetailId(record.id);
|
||||
setDetailVisible(true);
|
||||
};
|
||||
// 关闭弹窗
|
||||
const handleDetailClose = () => {
|
||||
setDetailVisible(false);
|
||||
setCurrentDetailId(null);
|
||||
@ -110,6 +124,21 @@ const SupplierChangeReviewManage: React.FC = () => {
|
||||
dataIndex: 'supplierName',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
render: (dom, record) =>
|
||||
<Tooltip title={record.supplierName}>
|
||||
<a
|
||||
onClick={() => {
|
||||
dispatch({
|
||||
type: 'globalModal/show',
|
||||
payload: {
|
||||
id: record.id,
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
{record.supplierName}
|
||||
</a>
|
||||
</Tooltip>,
|
||||
},
|
||||
{
|
||||
title: '境内/境外',
|
||||
@ -131,6 +160,7 @@ const SupplierChangeReviewManage: React.FC = () => {
|
||||
title: '提交变更时间',
|
||||
dataIndex: 'changeTime',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '审批状态',
|
||||
@ -202,4 +232,4 @@ const SupplierChangeReviewManage: React.FC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default SupplierChangeReviewManage;
|
||||
export default connect()(SupplierChangeReviewManage);
|
||||
|
@ -17,7 +17,7 @@ const CategoryAddModal: React.FC<Props> = ({ visible, onCancel }) => {
|
||||
const [submitting, setSubmitting] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (!visible) setValue([]);
|
||||
if(visible) {
|
||||
//tree数据
|
||||
treeData().then((res) => {
|
||||
const { code, data } = res;
|
||||
@ -25,6 +25,9 @@ const CategoryAddModal: React.FC<Props> = ({ visible, onCancel }) => {
|
||||
setDataTree(data)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
setValue([]);
|
||||
}
|
||||
}, [visible]);
|
||||
|
||||
// 提交方法
|
||||
|
@ -8,7 +8,7 @@ import { useIntl } from 'umi';
|
||||
//本地服务/接口
|
||||
import { getCategoryPage } from '../services';
|
||||
//本地组件
|
||||
import CategoryAddModal from './CategoryAddModal';
|
||||
// import CategoryAddModal from './CategoryAddModal';
|
||||
|
||||
interface Data {
|
||||
id: number;
|
||||
@ -78,7 +78,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
align: "center",
|
||||
render: (_: any, __: any, idx: number) => idx + 1,
|
||||
render: (_: any, __: any, idx: number) => (((pagination.current ?? 1) - 1) * (pagination.pageSize ?? 10)) + idx + 1,
|
||||
width: 60,
|
||||
},
|
||||
{
|
||||
@ -143,7 +143,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
|
||||
<Form.Item>
|
||||
<Button onClick={handleReset}>重置</Button>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
{/* <Form.Item>
|
||||
<Button
|
||||
type="primary"
|
||||
style={{ background: "#52a8ff", borderColor: "#52a8ff" }}
|
||||
@ -151,7 +151,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
|
||||
>
|
||||
新增品类
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</Form.Item> */}
|
||||
</Form>
|
||||
{/* 表格内容 */}
|
||||
<Table
|
||||
@ -162,12 +162,12 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
|
||||
pagination={pagination}
|
||||
onChange={(pagination) => getList(pagination.current!, pagination.pageSize!)}
|
||||
/>
|
||||
{/* 新增品类弹窗 */}
|
||||
{/* 新增品类弹窗
|
||||
<CategoryAddModal
|
||||
visible={addModalVisible}
|
||||
onCancel={() => setAddModalVisible(false)}
|
||||
// onOk={...} // 根据你的业务需要加
|
||||
/>
|
||||
/>*/}
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
@ -1,15 +1,16 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
//第三方UI库/组件
|
||||
import { Form, Button, Table, Select, Input, Tree, Row, Col, Space, message } from 'antd';
|
||||
import { Form, Button, Table, Select, Input, Tree, Row, Col, Space, Tooltip } from 'antd';
|
||||
import { SearchOutlined, DownloadOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||
//类型定义
|
||||
import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
|
||||
//umi 相关
|
||||
import { connect } from 'umi';
|
||||
//本地组件、弹窗、业务逻辑
|
||||
import SupplierViewModal from './components/SupplierViewModal';
|
||||
import SupplierDetailModal from './components/SupplierDetailModal';
|
||||
//本地服务/接口
|
||||
import { treeData, systemDict, getPageQualified } from './services';
|
||||
import { treeData, getPageQualified } from './services';
|
||||
|
||||
const { Option } = Select;
|
||||
//下拉数据接口
|
||||
@ -23,8 +24,10 @@ interface Data {
|
||||
regTime: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
const groupQualifiedSupplierQuery: React.FC = () => {
|
||||
interface Props {
|
||||
dispatch: any;
|
||||
}
|
||||
const groupQualifiedSupplierQuery: React.FC<Props> = ({dispatch}) => {
|
||||
//搜搜表单
|
||||
const [form] = Form.useForm();
|
||||
// 树数据
|
||||
@ -38,7 +41,7 @@ const groupQualifiedSupplierQuery: React.FC = () => {
|
||||
//列表加载
|
||||
const [loading, setLoading] = useState(false);
|
||||
//分页
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 188 });
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 0 });
|
||||
//查看是否显示状态
|
||||
const [viewVisible, setViewVisible] = useState(false);
|
||||
//准入明细是否显示状态
|
||||
@ -79,7 +82,8 @@ const groupQualifiedSupplierQuery: React.FC = () => {
|
||||
const getList = async (treeId: string, pageNo: number = 1, pageSize: number = 10) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const { code, data, message } = await getPageQualified({ pageNo, pageSize, treeId });
|
||||
const values = form.getFieldsValue();
|
||||
const { code, data, message } = await getPageQualified({ pageNo, pageSize, treeId, ...values });
|
||||
if (code === 200) {
|
||||
setData(data.records);
|
||||
setPagination({ current: pageNo, pageSize, total: data.total });
|
||||
@ -102,26 +106,24 @@ const groupQualifiedSupplierQuery: React.FC = () => {
|
||||
// 初始化时选中树第一个叶子节点,并请求右表
|
||||
useEffect(() => {
|
||||
// 境内/境外 下拉
|
||||
systemDict('regionOptions').then((res) => {
|
||||
const { code, data } = res;
|
||||
if (code == 200) {
|
||||
setRegionOptions(data)
|
||||
}
|
||||
});
|
||||
// 集采类别 下拉
|
||||
systemDict('categoryOptions').then((res) => {
|
||||
const { code, data } = res;
|
||||
if (code == 200) {
|
||||
setCategoryOptions(data)
|
||||
}
|
||||
});
|
||||
// 集采库 下拉
|
||||
systemDict('storeOptions').then((res) => {
|
||||
const { code, data } = res;
|
||||
if (code == 200) {
|
||||
setStoreOptions(data)
|
||||
}
|
||||
});
|
||||
setRegionOptions([
|
||||
{ label: '境内企业', value: 'dvs' },
|
||||
{ label: '境外企业', value: 'ovs' },
|
||||
])
|
||||
// // 集采类别 下拉
|
||||
// systemDict('categoryOptions').then((res) => {
|
||||
// const { code, data } = res;
|
||||
// if (code == 200) {
|
||||
// setCategoryOptions(data)
|
||||
// }
|
||||
// });
|
||||
// // 集采库 下拉
|
||||
// systemDict('storeOptions').then((res) => {
|
||||
// const { code, data } = res;
|
||||
// if (code == 200) {
|
||||
// setStoreOptions(data)
|
||||
// }
|
||||
// });
|
||||
//tree数据
|
||||
treeData().then((res) => {
|
||||
const { code, data } = res;
|
||||
@ -145,14 +147,29 @@ const groupQualifiedSupplierQuery: React.FC = () => {
|
||||
key: 'index',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
render: (_: any, __: any, idx: number) => idx + 1,
|
||||
render: (_: any, __: any, idx: number) => (((pagination.current ?? 1) - 1) * (pagination.pageSize ?? 10)) + idx + 1,
|
||||
},
|
||||
{
|
||||
title: '供应商名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
render: (dom, record) =>
|
||||
<Tooltip title={record.name}>
|
||||
<a
|
||||
onClick={() => {
|
||||
dispatch({
|
||||
type: 'globalModal/show',
|
||||
payload: {
|
||||
id: record.id,
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
{record.name}
|
||||
</a>
|
||||
</Tooltip>,
|
||||
},
|
||||
{
|
||||
title: '统一社会信用代码/税号',
|
||||
@ -170,8 +187,8 @@ const groupQualifiedSupplierQuery: React.FC = () => {
|
||||
},
|
||||
{
|
||||
title: '企业类型',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
dataIndex: 'enterpriseTypeCn',
|
||||
key: 'enterpriseTypeCn',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
},
|
||||
@ -236,9 +253,9 @@ const groupQualifiedSupplierQuery: React.FC = () => {
|
||||
style={{ marginBottom: 12, }}
|
||||
>
|
||||
<Form.Item name="name" label="供应商名称">
|
||||
<Input placeholder="请输入供应商名称关键字" style={{ width: 180 }} />
|
||||
<Input placeholder="请输入供应商名称关键字" style={{ width: 180 }} maxLength={50} />
|
||||
</Form.Item>
|
||||
<Form.Item name="category" label="集采类别">
|
||||
{/* <Form.Item name="category" label="集采类别">
|
||||
<Select style={{ width: 150 }} allowClear>
|
||||
{categoryOptions.map(opt => (
|
||||
<Option key={opt.value} value={opt.value}>{opt.label}</Option>
|
||||
@ -251,24 +268,24 @@ const groupQualifiedSupplierQuery: React.FC = () => {
|
||||
<Option key={opt.value} value={opt.value}>{opt.label}</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item name="region" label="境内/境外">
|
||||
<Select style={{ width: 130 }} allowClear>
|
||||
</Form.Item> */}
|
||||
<Form.Item name="supplierType" label="境内/境外">
|
||||
<Select style={{ width: 130 }} allowClear placeholder="请选择境内/境外" >
|
||||
{regionOptions.map(opt => (
|
||||
<Option key={opt.value} value={opt.value}>{opt.label}</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Button type="primary" icon={<DownloadOutlined />} style={{ marginRight: 8 }} onClick={handleExport}>
|
||||
数据导出
|
||||
</Button>
|
||||
<Button type="primary" icon={<SearchOutlined />} htmlType="submit" onClick={handleSearch}>
|
||||
查询
|
||||
</Button>
|
||||
<Button style={{ marginLeft: 8 }} icon={<ReloadOutlined />} onClick={handleReset}>
|
||||
重置
|
||||
</Button>
|
||||
<Button type="primary" icon={<DownloadOutlined />} style={{ marginLeft: 8 }} onClick={handleExport}>
|
||||
数据导出
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
{/* 表格 */}
|
||||
@ -299,4 +316,4 @@ const groupQualifiedSupplierQuery: React.FC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default groupQualifiedSupplierQuery;
|
||||
export default connect()(groupQualifiedSupplierQuery);
|
||||
|
@ -92,6 +92,7 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
|
||||
|
||||
// 准入状态下拉
|
||||
setStoreOptions([
|
||||
{ label: '未准入', value: '0' },
|
||||
{ label: '已准入', value: '1' },
|
||||
{ label: '退出', value: '2' },
|
||||
])
|
||||
@ -207,15 +208,15 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Button type="primary" icon={<DownloadOutlined />} style={{ marginRight: 8 }} onClick={handleExport}>
|
||||
数据导出
|
||||
</Button>
|
||||
<Button type="primary" icon={<SearchOutlined />} htmlType="submit" onClick={handleSearch}>
|
||||
查询
|
||||
</Button>
|
||||
<Button style={{ marginLeft: 8 }} icon={<ReloadOutlined />} onClick={handleReset}>
|
||||
重置
|
||||
</Button>
|
||||
<Button type="primary" icon={<DownloadOutlined />} style={{ marginLeft: 8 }} onClick={handleExport}>
|
||||
数据导出
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
{/* 表格 */}
|
||||
|
@ -8,7 +8,7 @@ import { useIntl } from 'umi';
|
||||
//本地服务/接口
|
||||
import { getCategoryPage } from '../services';
|
||||
//本地组件
|
||||
import CategoryAddModal from './CategoryAddModal';
|
||||
// import CategoryAddModal from './CategoryAddModal';
|
||||
|
||||
interface Data {
|
||||
id: number;
|
||||
@ -78,7 +78,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
align: "center",
|
||||
render: (_: any, __: any, idx: number) => idx + 1,
|
||||
render: (_: any, __: any, idx: number) => (((pagination.current ?? 1) - 1) * (pagination.pageSize ?? 10)) + idx + 1,
|
||||
width: 60,
|
||||
},
|
||||
{
|
||||
@ -139,7 +139,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
|
||||
<Form.Item>
|
||||
<Button onClick={handleReset}>重置</Button>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
{/* <Form.Item>
|
||||
<Button
|
||||
type="primary"
|
||||
style={{ background: "#52a8ff", borderColor: "#52a8ff" }}
|
||||
@ -147,7 +147,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
|
||||
>
|
||||
新增品类
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</Form.Item> */}
|
||||
</Form>
|
||||
{/* 表格内容 */}
|
||||
<Table
|
||||
@ -158,12 +158,12 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
|
||||
pagination={pagination}
|
||||
onChange={(pagination) => getList(pagination.current!, pagination.pageSize!)}
|
||||
/>
|
||||
{/* 新增品类弹窗 */}
|
||||
{/* 新增品类弹窗
|
||||
<CategoryAddModal
|
||||
visible={addModalVisible}
|
||||
onCancel={() => setAddModalVisible(false)}
|
||||
// onOk={...} // 根据你的业务需要加
|
||||
/>
|
||||
/> */}
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
@ -1,17 +1,17 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
//第三方UI库/组件
|
||||
import { Form, Button, Table, Select, Input, Tree, Row, Col, Space, message } from 'antd';
|
||||
import { Form, Button, Table , Input, Tree, Row, Col, Space, Tooltip } from 'antd';
|
||||
import { SearchOutlined, DownloadOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||
//类型定义
|
||||
import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
|
||||
//umi 相关
|
||||
import { connect } from 'umi';
|
||||
//本地组件、弹窗、业务逻辑
|
||||
import SupplierViewModal from './components/SupplierViewModal';
|
||||
import SupplierDetailModal from './components/SupplierDetailModal';
|
||||
//本地服务/接口
|
||||
import { treeData, systemDict, getPagePe } from './services';
|
||||
|
||||
const { Option } = Select;
|
||||
//下拉数据接口
|
||||
type OptionType = { label: string; value: string };
|
||||
// 列表数据接口
|
||||
@ -20,11 +20,14 @@ interface Data {
|
||||
name: string;
|
||||
region: string;
|
||||
supplierType: string;
|
||||
personName: string;
|
||||
regTime: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
const personQualifiedSupplierQuery: React.FC = () => {
|
||||
interface Props {
|
||||
dispatch: any;
|
||||
}
|
||||
const personQualifiedSupplierQuery: React.FC<Props> = ({ dispatch }) => {
|
||||
//搜搜表单
|
||||
const [form] = Form.useForm();
|
||||
// 树数据
|
||||
@ -146,7 +149,7 @@ const personQualifiedSupplierQuery: React.FC = () => {
|
||||
key: 'index',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
render: (_: any, __: any, idx: number) => idx + 1,
|
||||
render: (_: any, __: any, idx: number) => (((pagination.current ?? 1) - 1) * (pagination.pageSize ?? 10)) + idx + 1,
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
@ -154,6 +157,21 @@ const personQualifiedSupplierQuery: React.FC = () => {
|
||||
key: 'personName',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
render: (dom, record) =>
|
||||
<Tooltip title={record.personName}>
|
||||
<a
|
||||
onClick={() => {
|
||||
dispatch({
|
||||
type: 'globalModal/show',
|
||||
payload: {
|
||||
id: record.id,
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
{record.personName}
|
||||
</a>
|
||||
</Tooltip>,
|
||||
},
|
||||
{
|
||||
title: '身份证号',
|
||||
@ -250,15 +268,15 @@ const personQualifiedSupplierQuery: React.FC = () => {
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item>
|
||||
<Button type="primary" icon={<DownloadOutlined />} style={{ marginRight: 8 }} onClick={handleExport}>
|
||||
数据导出
|
||||
</Button>
|
||||
<Button type="primary" icon={<SearchOutlined />} htmlType="submit" onClick={handleSearch}>
|
||||
查询
|
||||
</Button>
|
||||
<Button style={{ marginLeft: 8 }} icon={<ReloadOutlined />} onClick={handleReset}>
|
||||
重置
|
||||
</Button>
|
||||
<Button type="primary" icon={<DownloadOutlined />} style={{ marginLeft: 8 }} onClick={handleExport}>
|
||||
数据导出
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
{/* 表格 */}
|
||||
@ -289,4 +307,4 @@ const personQualifiedSupplierQuery: React.FC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default personQualifiedSupplierQuery;
|
||||
export default connect()(personQualifiedSupplierQuery);
|
||||
|
@ -94,7 +94,7 @@ const RegistrationQuery: React.FC<RegistrationQueryProps> = ({ dispatch }) => {
|
||||
//状态 下拉
|
||||
setStatusOptions([
|
||||
{ label: '未准入', value: '0' },
|
||||
{ label: '已准', value: '1' },
|
||||
{ label: '已准入', value: '1' },
|
||||
{ label: '退出', value: '2' },
|
||||
])
|
||||
//列表
|
||||
|
@ -34,7 +34,7 @@ const blacklistManage: React.FC = () => {
|
||||
const { exitTheme, time, deptId, approveStatus } = values;
|
||||
const startTime = time ? moment(time[0]).format('YYYY-MM-DD') : '';
|
||||
const endTime = time ? moment(time[1]).format('YYYY-MM-DD') : '';
|
||||
const { code, data } = await getPage({ basePageRequest: { pageNo, pageSize } , exitTheme, deptId, approveStatus, startTime, endTime });
|
||||
const { code, data } = await getPage({ basePageRequest: { pageNo, pageSize }, exitTheme, deptId, approveStatus, startTime, endTime });
|
||||
|
||||
if (code === 200) {
|
||||
setData(data.records);
|
||||
@ -99,7 +99,7 @@ const blacklistManage: React.FC = () => {
|
||||
key: "index",
|
||||
align: "center",
|
||||
width: 60,
|
||||
render: (_: any, __: any, idx: number) => idx + 1,
|
||||
render: (_: any, __: any, idx: number) => (((pagination.current ?? 1) - 1) * (pagination.pageSize ?? 10)) + idx + 1,
|
||||
},
|
||||
{ title: "申请主题", dataIndex: "themeName", key: "themeName", align: "center" },
|
||||
{ title: "发起单位", dataIndex: "unitName", key: "unitName", align: "center" },
|
||||
|
@ -61,6 +61,7 @@ const CreateBlacklistModal: React.FC<CreateBlacklistModalProps> = ({
|
||||
supplierIds: string[],
|
||||
} = {
|
||||
...values,
|
||||
backlistType: '0',
|
||||
supplierIds: suppliers.map((item) => item.supplierId),
|
||||
}
|
||||
const res = await blacklist(payload);
|
||||
@ -137,7 +138,7 @@ const CreateBlacklistModal: React.FC<CreateBlacklistModalProps> = ({
|
||||
layout="horizontal"
|
||||
>
|
||||
|
||||
<Form.Item
|
||||
{/* <Form.Item
|
||||
label="黑名单类型"
|
||||
name="backlistType"
|
||||
rules={[{ required: true, message: '请选择黑名单类型' }]}
|
||||
@ -147,7 +148,7 @@ const CreateBlacklistModal: React.FC<CreateBlacklistModalProps> = ({
|
||||
<Option key={opt.value} value={opt.value}>{opt.label}</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Form.Item> */}
|
||||
|
||||
<Form.Item
|
||||
label="时限类型"
|
||||
|
@ -114,9 +114,7 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
|
||||
>选择</Checkbox>
|
||||
)
|
||||
},
|
||||
{ title: "供应商名称", dataIndex: "supplierName" },
|
||||
{ title: "准入单位", dataIndex: "deptId" },
|
||||
{ title: "准入部门", dataIndex: "deptId" },
|
||||
{ title: "供应商名称", dataIndex: "supplierName", ellipsis: true },
|
||||
{ title: "准入品类", dataIndex: "categoryName" }
|
||||
];
|
||||
|
||||
@ -142,9 +140,7 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
|
||||
>选择</Checkbox>
|
||||
)
|
||||
},
|
||||
{ title: "供应商名称", dataIndex: "supplierName" },
|
||||
{ title: "准入单位", dataIndex: "deptId" },
|
||||
{ title: "准入部门", dataIndex: "deptId" },
|
||||
{ title: "供应商名称", dataIndex: "supplierName", ellipsis: true },
|
||||
{ title: "准入品类", dataIndex: "categoryName" }
|
||||
];
|
||||
|
||||
|
@ -2,9 +2,11 @@ import React, { useEffect, useState } from "react";
|
||||
import { Form, Button, Table, Select, Input, DatePicker, Space, message } from "antd";
|
||||
import { SearchOutlined, ReloadOutlined, PlusOutlined } from "@ant-design/icons";
|
||||
import type { ColumnsType } from 'antd/es/table';
|
||||
//组件
|
||||
import ViewBlacklistModal from './components/ViewBlacklistModal';
|
||||
import CreateBlacklistModal from './components/CreateBlacklistModal'
|
||||
import moment from 'moment';
|
||||
//字典与接口
|
||||
import { getDictList } from '@/servers/api/dicts'
|
||||
import { getPage } from './services'
|
||||
|
||||
@ -21,13 +23,21 @@ interface Dict {
|
||||
code: string;
|
||||
}
|
||||
const blacklistManage: React.FC = () => {
|
||||
//搜索
|
||||
const [form] = Form.useForm();
|
||||
// 渲染列表数据
|
||||
const [data, setData] = useState<Columns[]>([]);
|
||||
//列表加载
|
||||
const [loading, setLoading] = useState(false);
|
||||
//列表分页
|
||||
const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 });
|
||||
//发起申请组件
|
||||
const [createVisible, setCreateVisible] = useState(false);
|
||||
//查看组件
|
||||
const [viewVisible, setViewVisible] = useState(false);
|
||||
// 组件传递ID
|
||||
const [selectedRecordId, setSelectedRecordId] = useState<string | null>(null);
|
||||
//字典下拉
|
||||
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
|
||||
|
||||
// 查询接口
|
||||
|
@ -148,7 +148,6 @@ const supplierExitAudit: React.FC = () => {
|
||||
showTotal: total => `共${total}条`,
|
||||
}}
|
||||
onChange={handleTableChange}
|
||||
bordered
|
||||
/>
|
||||
|
||||
<CreateBlacklistModal visible={createVisible} onCancel={() => setCreateVisible(false)} onOk={handleSelectOk} />
|
||||
|
@ -115,8 +115,6 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
|
||||
)
|
||||
},
|
||||
{ title: "供应商名称", dataIndex: "supplierName" },
|
||||
{ title: "准入单位", dataIndex: "deptId" },
|
||||
{ title: "准入部门", dataIndex: "deptId" },
|
||||
{ title: "准入品类", dataIndex: "categoryName" }
|
||||
];
|
||||
|
||||
@ -143,8 +141,6 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
|
||||
)
|
||||
},
|
||||
{ title: "供应商名称", dataIndex: "supplierName" },
|
||||
{ title: "准入单位", dataIndex: "deptId" },
|
||||
{ title: "准入部门", dataIndex: "deptId" },
|
||||
{ title: "准入品类", dataIndex: "categoryName" }
|
||||
];
|
||||
|
||||
|
@ -154,7 +154,6 @@ const supplierExitManage: React.FC = () => {
|
||||
showTotal: total => `共${total}条`,
|
||||
}}
|
||||
onChange={handleTableChange}
|
||||
bordered
|
||||
/>
|
||||
|
||||
<CreateBlacklistModal visible={createVisible} onCancel={() => setCreateVisible(false)} onOk={handleSelectOk} />
|
||||
|
Reference in New Issue
Block a user