This commit is contained in:
linxd
2025-08-12 16:26:38 +08:00
17 changed files with 99 additions and 65 deletions

View File

@ -99,6 +99,10 @@ const ViewBlacklistModal: React.FC<ViewBlacklistModalProps> = ({
{ title: "发起单位", dataIndex: "orgName", align: "center", ellipsis: true, width: 160 }, { title: "发起单位", dataIndex: "orgName", align: "center", ellipsis: true, width: 160 },
{ title: "发起部门", dataIndex: "deptName", align: "center", ellipsis: true, width: 160 }, { title: "发起部门", dataIndex: "deptName", align: "center", ellipsis: true, width: 160 },
{ title: "退出品类", dataIndex: "categoryName", align: "center", ellipsis: true, width: 160 }, { title: "退出品类", dataIndex: "categoryName", align: "center", ellipsis: true, width: 160 },
{
title: "退出原因", dataIndex: "exitReason", align: "center", ellipsis: true, width: 180,
render: (dom, record:any) => <span>{record.exitReason}</span>,
},
{ title: "退出时间", dataIndex: "createTime", align: "center", width: 180 }, { title: "退出时间", dataIndex: "createTime", align: "center", width: 180 },
]; ];

View File

@ -81,13 +81,13 @@ const SupplierCategoryEntry: React.FC = () => {
const closeModal = () => { const closeModal = () => {
setModalInfo({ type: '', visible: false }); setModalInfo({ type: '', visible: false });
const values = form.getFieldsValue(); const values = form.getFieldsValue();
getList(values, 1, 10); getList(values, 1, pagination.pageSize);
}; };
// 重置 // 重置
const handleReset = () => { const handleReset = () => {
form.resetFields() form.resetFields()
const values = form.getFieldsValue(); const values = form.getFieldsValue();
getList(values, 1, 10); getList(values, 1, pagination.pageSize);
}; };
const handleApproval = (accessWorkId: string) => { const handleApproval = (accessWorkId: string) => {
@ -98,7 +98,7 @@ const SupplierCategoryEntry: React.FC = () => {
if (res.code === 200) { if (res.code === 200) {
message.success('发起审批成功'); message.success('发起审批成功');
const values = form.getFieldsValue(); const values = form.getFieldsValue();
getList(values, 1, 10); getList(values, 1, pagination.pageSize);
} }
}, },
}); });

View File

@ -70,13 +70,13 @@ const SupplierCategoryEntryReview: React.FC = () => {
const closeModal = () => { const closeModal = () => {
setModalInfo({ type: '', visible: false }); setModalInfo({ type: '', visible: false });
const values = form.getFieldsValue(); const values = form.getFieldsValue();
getList(values, 1, 10); getList(values, 1, pagination.pageSize);
}; };
// 重置 // 重置
const handleReset = () => { const handleReset = () => {
form.resetFields() form.resetFields()
const values = form.getFieldsValue(); const values = form.getFieldsValue();
getList(values, 1, 10); getList(values, 1, pagination.pageSize);
}; };
//列表头部数据 //列表头部数据
const columns: ColumnsType<Data> = [ const columns: ColumnsType<Data> = [

View File

@ -59,7 +59,7 @@ const AccessManagement: React.FC = () => {
//初始化 //初始化
useEffect(() => { useEffect(() => {
const values = form.getFieldsValue(); const values = form.getFieldsValue();
getList(values, 1, 10); getList(values, 1, pagination.pageSize);
getDictList('approve_type').then((res) => { getDictList('approve_type').then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -80,13 +80,13 @@ const AccessManagement: React.FC = () => {
const closeModal = () => { const closeModal = () => {
setModalInfo({ type: '', visible: false }); setModalInfo({ type: '', visible: false });
const values = form.getFieldsValue(); const values = form.getFieldsValue();
getList(values, 1, 10); getList(values, 1, pagination.pageSize);
}; };
// 重置 // 重置
const handleReset = () => { const handleReset = () => {
form.resetFields() form.resetFields()
const values = form.getFieldsValue(); const values = form.getFieldsValue();
getList(values, 1, 10); getList(values, 1, pagination.pageSize);
}; };
const handleApproval = (id: string) => { const handleApproval = (id: string) => {
@ -97,7 +97,7 @@ const AccessManagement: React.FC = () => {
if (res.code === 200) { if (res.code === 200) {
message.success('发起审批成功'); message.success('发起审批成功');
const values = form.getFieldsValue(); const values = form.getFieldsValue();
getList(values, 1, 10); getList(values, 1, pagination.pageSize);
} }
}, },
}); });

View File

@ -254,7 +254,7 @@ const CategoryLibraryManage: React.FC = () => {
onCancel={() => setAddVisible(false)} onCancel={() => setAddVisible(false)}
onSuccess={() => { onSuccess={() => {
setAddVisible(false); setAddVisible(false);
getList(); getList(1, pagination.pageSize || 10);
}} }}
/> />
{/* 添加供应商弹窗 */} {/* 添加供应商弹窗 */}
@ -264,7 +264,7 @@ const CategoryLibraryManage: React.FC = () => {
onCancel={() => setAddSupplierVisible(false)} onCancel={() => setAddSupplierVisible(false)}
onSuccess={() => { onSuccess={() => {
setAddSupplierVisible(false); setAddSupplierVisible(false);
getList(); getList(1, pagination.pageSize || 10);
}} }}
/> />
{/* 库内供应商数量弹窗 */} {/* 库内供应商数量弹窗 */}

View File

@ -75,7 +75,7 @@ const CategoryLibraryManage: React.FC = () => {
const res = await approval({ id }); const res = await approval({ id });
if (res.code === 200) { if (res.code === 200) {
message.success('提交成功'); message.success('提交成功');
getList(); // 刷新列表 getList(1, pagination.pageSize || 10);
} }
}, },
}); });

View File

@ -236,7 +236,7 @@ const SupplierEntryManage: React.FC = () => {
onCancel={() => setAddVisible(false)} onCancel={() => setAddVisible(false)}
onSuccess={() => { onSuccess={() => {
setAddVisible(false); setAddVisible(false);
getList(); getList(1, pagination.pageSize || 10);
}} }}
/> />
{/* 添加供应商弹窗 */} {/* 添加供应商弹窗 */}
@ -246,7 +246,7 @@ const SupplierEntryManage: React.FC = () => {
onCancel={() => setAddSupplierVisible(false)} onCancel={() => setAddSupplierVisible(false)}
onSuccess={() => { onSuccess={() => {
setAddSupplierVisible(false); setAddSupplierVisible(false);
getList(); getList(1, pagination.pageSize || 10);
}} }}
/> />
{/* 库内供应商数量弹窗 */} {/* 库内供应商数量弹窗 */}

View File

@ -73,7 +73,7 @@ const CategoryLibraryManage: React.FC = () => {
const res = await approval({ id }); const res = await approval({ id });
if (res.code === 200) { if (res.code === 200) {
message.success('提交成功'); message.success('提交成功');
getList(); // 刷新列表 getList(1, pagination.pageSize || 10); // 刷新列表
} }
}, },
}); });
@ -267,7 +267,7 @@ const CategoryLibraryManage: React.FC = () => {
onCancel={() => setAddVisible(false)} onCancel={() => setAddVisible(false)}
onSuccess={() => { onSuccess={() => {
setAddVisible(false); setAddVisible(false);
getList(); getList(1, pagination.pageSize || 10);
}} }}
/> />
{/* 新增品类库弹窗 */} {/* 新增品类库弹窗 */}

View File

@ -199,18 +199,18 @@ const SupplierChangeReviewManage: React.FC<Props> = ({ dispatch }) => {
fixed: 'right', fixed: 'right',
render: (_: any, record: any) => ( render: (_: any, record: any) => (
<> <>
<Button type="link" onClick={() => handleDetail(record)}> <Button type="link" onClick={() => handleDetail(record)}>
</Button> </Button>
{/* 测试使用,需删除 */} {/* 测试使用,需删除 */}
{ record.approveStatus === '0' && userId == '8' && ( {record.approveStatus === '0' && userId == '8' && (
<Button type="link" onClick={() => { <Button type="link" onClick={() => {
supplierChangeApprove({ id:record.id, approveStatus: '1' }).then(() => { supplierChangeApprove({ id: record.id, approveStatus: '1' }).then(() => {
handleReset() handleReset()
}) })
}}> }}>
</Button> </Button>
)} )}
</> </>
@ -264,7 +264,13 @@ const SupplierChangeReviewManage: React.FC<Props> = ({ dispatch }) => {
dataSource={data} dataSource={data}
loading={loading} loading={loading}
pagination={{ ...tableProps.pagination, total: pagination.total }} pagination={{ ...tableProps.pagination, total: pagination.total }}
onChange={() => setPagination({ ...pagination })} onChange={(pag) => {
setPagination({
current: pag.current ?? 1,
pageSize: pag.pageSize ?? 10,
total: pag.total ?? 0,
});
}}
style={{ flex: 1, minHeight: 0 }} style={{ flex: 1, minHeight: 0 }}
scroll={{ y: 'calc(100vh - 350px)' }} scroll={{ y: 'calc(100vh - 350px)' }}
/> />

View File

@ -40,17 +40,17 @@ const groupQualifiedSupplierQuery: React.FC<Props> = ({ dispatch }) => {
// 查询 // 查询
const handleSearch = () => { const handleSearch = () => {
setPagination(p => ({ ...p, current: 1 })); setPagination(p => ({ ...p, current: 1 }));
getList(selectedKeys ? selectedKeys : currentUser.organizationId); getList(selectedKeys ? selectedKeys : currentUser.organizationId, 1, pagination.pageSize);
}; };
const handleReset = () => { const handleReset = () => {
form.resetFields(); form.resetFields();
setPagination(p => ({ ...p, current: 1 })); setPagination(p => ({ ...p, current: 1 }));
getList(selectedKeys ? selectedKeys : currentUser.organizationId); getList(selectedKeys ? selectedKeys : currentUser.organizationId, 1, pagination.pageSize);
}; };
const handleTreeSelect = (keys: string | number) => { const handleTreeSelect = (keys: string | number) => {
const key = keys as string; const key = keys as string;
setSelectedKeys(key); setSelectedKeys(key);
getList(key); getList(key,1, pagination.pageSize);
}; };

View File

@ -1,6 +1,6 @@
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
//第三方UI库/组件 //第三方UI库/组件
import { Form, Button, Table, Input, Space, Tooltip } from 'antd'; import { Form, Button, Table, Input, Space, Tooltip, Select } from 'antd';
import { SearchOutlined, DeleteOutlined } from '@ant-design/icons'; import { SearchOutlined, DeleteOutlined } from '@ant-design/icons';
//类型定义 //类型定义
import type { ColumnsType, TablePaginationConfig } from 'antd/es/table'; import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
@ -11,14 +11,24 @@ import { connect } from 'umi';
// import SupplierDetailModal from './components/SupplierDetailModal'; // import SupplierDetailModal from './components/SupplierDetailModal';
import CategorySelector from '@/components/TreeCategorySelector'; import CategorySelector from '@/components/TreeCategorySelector';
import RegionTypeSelect from '@/components/CommonSelect/RegionTypeSelect' import RegionTypeSelect from '@/components/CommonSelect/RegionTypeSelect'
import AccessStatusSelect from '@/components/CommonSelect/AccessStatusSelect'
//本地服务/接口 //本地服务/接口
import { getPageMy } from './services'; import { getPageMy } from './services';
import { downloadFile } from '@/utils/download'; import { downloadFile } from '@/utils/download';
import { getDictList } from '@/servers/api/dicts' import { getDictList } from '@/servers/api/dicts'
//统一列表分页 //统一列表分页
import tableProps from '@/utils/tableProps' import tableProps from '@/utils/tableProps'
const accessStatusType = [
{ code: '0', dicName: '未准入' },
{ code: '1', dicName: '已准入' },
{ code: '2', dicName: '已退出' }
]
//准入状态
const statusColor = (status: string) => {
if (status === '已驳回' || status === '已退出') return '#ef6969';
if (status === '已准入') return '#004f8e';
return undefined;
};
// 列表数据接口 // 列表数据接口
interface Data { interface Data {
id: number; id: number;
@ -54,13 +64,13 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
// 查询 // 查询
const handleSearch = () => { const handleSearch = () => {
setPagination({ ...pagination, current: 1 }); setPagination({ ...pagination, current: 1 });
getList(); getList(1, pagination.pageSize);
}; };
// 重置 // 重置
const handleReset = () => { const handleReset = () => {
form.resetFields(); form.resetFields();
setPagination({ ...pagination, current: 1 }); setPagination({ ...pagination, current: 1 });
getList(); getList(1, pagination.pageSize);
}; };
//列表方法 //列表方法
const getList = async (pageNo: number = 1, pageSize: number = 10) => { const getList = async (pageNo: number = 1, pageSize: number = 10) => {
@ -79,7 +89,6 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
} }
}; };
const [enterpriseTypeMap, setEnterpriseTypeMap] = useState<{ [code: string]: string }>({}); const [enterpriseTypeMap, setEnterpriseTypeMap] = useState<{ [code: string]: string }>({});
const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({});
// 初始化 // 初始化
useEffect(() => { useEffect(() => {
getDictList('enterprise_type').then((res: any) => { getDictList('enterprise_type').then((res: any) => {
@ -92,15 +101,6 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
setEnterpriseTypeMap(map); setEnterpriseTypeMap(map);
} }
}) })
getDictList('approve_type').then((res) => {
if (res.code == 200) {
const map: { [code: string]: string } = {};
res.data.forEach((item: { code: string, dicName: string }) => {
map[item.code] = item.dicName;
});
setApproveTypeMap(map);
}
})
getList(); getList();
}, []); }, []);
@ -184,11 +184,14 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
}, },
{ {
title: '准入状态', title: '准入状态',
dataIndex: 'accessStatus', dataIndex: 'accessStatusCn',
key: 'accessStatus', key: 'accessStatusCn',
width: 160,
align: 'center', align: 'center',
width: 140, render: (val: string) =>
render: (code: string) => approveTypeMap[code] || code <span style={{
color: statusColor(val) || (val === '未准入' ? '#aaa' : undefined),
}}>{val}</span>
}, },
{ {
title: '操作', title: '操作',
@ -232,7 +235,11 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
<CategorySelector multiple={false} /> <CategorySelector multiple={false} />
</Form.Item> </Form.Item>
<Form.Item name="accessStatus" label="准入状态"> <Form.Item name="accessStatus" label="准入状态">
<AccessStatusSelect /> <Select style={{ width: 160 }} placeholder="请选择" allowClear>
{accessStatusType?.map(item => (
<Select.Option key={item.code} value={item.code}>{item.dicName}</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item name="supplierType" label="境内/境外"> <Form.Item name="supplierType" label="境内/境外">
<RegionTypeSelect /> <RegionTypeSelect />
@ -260,7 +267,7 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
pagination={{ ...tableProps.pagination, total: pagination.total }} pagination={{ ...tableProps.pagination, total: pagination.total }}
onChange={(pagination) => getList(pagination.current!, pagination.pageSize!)} onChange={(pagination) => getList(pagination.current!, pagination.pageSize!)}
style={{ flex: 1, minHeight: 0 }} style={{ flex: 1, minHeight: 0 }}
scroll={{ y: 'calc(100vh - 350px)' }} scroll={{ y: 'calc(100vh - 380px)' }}
/> />
</div> </div>
{/* 查看组件 {/* 查看组件

View File

@ -43,18 +43,18 @@ const PersonQualifiedSupplierQuery: React.FC<Props> = ({ dispatch }) => {
// 查询 // 查询
const handleSearch = () => { const handleSearch = () => {
setPagination(p => ({ ...p, current: 1 })); setPagination(p => ({ ...p, current: 1 }));
getList(selectedKeys ? selectedKeys : currentUser.organizationId); getList(selectedKeys ? selectedKeys : currentUser.organizationId, 1, pagination.pageSize);
}; };
const handleReset = () => { const handleReset = () => {
form.resetFields(); form.resetFields();
setPagination(p => ({ ...p, current: 1 })); setPagination(p => ({ ...p, current: 1 }));
getList(selectedKeys ? selectedKeys : currentUser.organizationId); getList(selectedKeys ? selectedKeys : currentUser.organizationId, 1, pagination.pageSize);
}; };
const handleTreeSelect = (keys: string | number) => { const handleTreeSelect = (keys: string | number) => {
const key = keys as string; const key = keys as string;
setSelectedKeys(key); setSelectedKeys(key);
getList(key); getList(key, 1, pagination.pageSize);
}; };
const getList = async (orgId: string, pageNo: number = 1, pageSize: number = 10) => { const getList = async (orgId: string, pageNo: number = 1, pageSize: number = 10) => {

View File

@ -1,6 +1,6 @@
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
//第三方UI库/组件 //第三方UI库/组件
import { Form, Button, Table, Input, Space, Tooltip } from 'antd'; import { Form, Button, Table, Input, Space, Tooltip, Select } from 'antd';
import { SearchOutlined, DeleteOutlined } from '@ant-design/icons'; import { SearchOutlined, DeleteOutlined } from '@ant-design/icons';
//类型定义 //类型定义
import type { ColumnsType, TablePaginationConfig } from 'antd/es/table'; import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
@ -10,7 +10,7 @@ import { useIntl, connect } from 'umi';
import SupplierViewModal from './components/SupplierViewModal'; import SupplierViewModal from './components/SupplierViewModal';
import SupplierDetailModal from './components/SupplierDetailModal'; import SupplierDetailModal from './components/SupplierDetailModal';
import RegionTypeSelect from '@/components/CommonSelect/RegionTypeSelect' import RegionTypeSelect from '@/components/CommonSelect/RegionTypeSelect'
import AccessStatusSelect from '@/components/CommonSelect/AccessStatusSelect' // import AccessStatusSelect from '@/components/CommonSelect/AccessStatusSelect'
//本地服务/接口 //本地服务/接口
import { getRegisterPage } from './services'; import { getRegisterPage } from './services';
import { getDictList } from '@/servers/api/dicts' import { getDictList } from '@/servers/api/dicts'
@ -26,6 +26,12 @@ interface Data {
regTime: string; regTime: string;
status: string; status: string;
} }
const accessStatusType = [
{ code: '0', dicName: '未准入' },
{ code: '1', dicName: '已准入' },
{ code: '2', dicName: '已退出' }
]
//准入状态 //准入状态
const statusColor = (status: string) => { const statusColor = (status: string) => {
if (status === '已驳回' || status === '已退出') return '#ef6969'; if (status === '已驳回' || status === '已退出') return '#ef6969';
@ -57,13 +63,13 @@ const RegistrationQuery: React.FC<RegistrationQueryProps> = ({ dispatch }) => {
// 搜索 // 搜索
const handleSearch = () => { const handleSearch = () => {
setPagination({ ...pagination, current: 1 }); setPagination({ ...pagination, current: 1 });
getList(); getList(1, pagination.pageSize);
}; };
// 重置 // 重置
const handleReset = () => { const handleReset = () => {
form.resetFields(); form.resetFields();
setPagination({ ...pagination, current: 1 }); setPagination({ ...pagination, current: 1 });
getList(); getList(1, pagination.pageSize);
}; };
//列表方法 //列表方法
const getList = async (pageNo: number = 1, pageSize: number = 10) => { const getList = async (pageNo: number = 1, pageSize: number = 10) => {
@ -205,7 +211,14 @@ const RegistrationQuery: React.FC<RegistrationQueryProps> = ({ dispatch }) => {
<Form.Item name="supplierType" label="境内/境外"> <Form.Item name="supplierType" label="境内/境外">
<RegionTypeSelect /> <RegionTypeSelect />
</Form.Item> </Form.Item>
<Form.Item name="accessStatus" label="准入状态">
<Select style={{ width: 160 }} placeholder="请选择" allowClear>
{accessStatusType?.map(item => (
<Select.Option key={item.code} value={item.code}>{item.dicName}</Select.Option>
))}
</Select>
</Form.Item>
<Form.Item> <Form.Item>
<Button className="buttonSubmit" type="primary" htmlType="submit" icon={<SearchOutlined />}></Button> <Button className="buttonSubmit" type="primary" htmlType="submit" icon={<SearchOutlined />}></Button>
</Form.Item> </Form.Item>
@ -222,7 +235,7 @@ const RegistrationQuery: React.FC<RegistrationQueryProps> = ({ dispatch }) => {
pagination={{ ...tableProps.pagination, total: pagination.total }} pagination={{ ...tableProps.pagination, total: pagination.total }}
onChange={(pagination) => getList(pagination.current!, pagination.pageSize!)} onChange={(pagination) => getList(pagination.current!, pagination.pageSize!)}
style={{ flex: 1, minHeight: 0 }} style={{ flex: 1, minHeight: 0 }}
scroll={{ y: 'calc(100vh - 350px)' }} scroll={{ y: 'calc(100vh - 380px)' }}
/> />
{/* 查看组件 */} {/* 查看组件 */}
<SupplierViewModal <SupplierViewModal

View File

@ -68,7 +68,7 @@ const blacklistManage: React.FC = () => {
const res = await submit({ id }); const res = await submit({ id });
if (res.code === 200) { if (res.code === 200) {
message.success('提交成功'); message.success('提交成功');
getList(); // 刷新列表 getList(1, pagination.pageSize);
} }
}, },
}); });
@ -80,7 +80,7 @@ const blacklistManage: React.FC = () => {
const res = await restoreSubmit({ id }); const res = await restoreSubmit({ id });
if (res.code === 200) { if (res.code === 200) {
message.success('提交成功'); message.success('提交成功');
getList(); // 刷新列表 getList(1, pagination.pageSize);
} }
}, },
}); });

View File

@ -42,11 +42,11 @@ const supplierExitAudit: React.FC = () => {
setLoading(true); setLoading(true);
// 可传查询条件 form.getFieldsValue() // 可传查询条件 form.getFieldsValue()
const values = form.getFieldsValue(); const values = form.getFieldsValue();
const { exitTheme, time, orgId, approveStatus } = values; const { time } = values;
const startTime = time ? moment(time[0]).format('YYYY-MM-DD') : ''; const startTime = time ? moment(time[0]).format('YYYY-MM-DD') : '';
const endTime = time ? moment(time[1]).format('YYYY-MM-DD') : ''; const endTime = time ? moment(time[1]).format('YYYY-MM-DD') : '';
const { code, data } = await getPage({ pageNo, pageSize, exitTheme, orgId, approveStatus, startTime, endTime }); const { code, data } = await getPage({ pageNo, pageSize, ...values, startTime, endTime });
if (code === 200) { if (code === 200) {
setData(data.records); setData(data.records);
setPagination(prev => ({ ...prev, current: pageNo, pageSize, total: data.total })); setPagination(prev => ({ ...prev, current: pageNo, pageSize, total: data.total }));
@ -74,7 +74,7 @@ const supplierExitAudit: React.FC = () => {
setCreateVisible(true) setCreateVisible(true)
}; };
const handleSelectOk = () => { const handleSelectOk = () => {
getList(); getList(1, pagination.pageSize);
setCreateVisible(false); setCreateVisible(false);
}; };
useEffect(() => { useEffect(() => {

View File

@ -93,6 +93,10 @@ const ViewBlacklistModal: React.FC<ViewBlacklistModalProps> = ({
{ title: "发起单位", dataIndex: "orgName", align: "center", ellipsis: true, width: 160 }, { title: "发起单位", dataIndex: "orgName", align: "center", ellipsis: true, width: 160 },
{ title: "发起部门", dataIndex: "deptName", align: "center", ellipsis: true, width: 160 }, { title: "发起部门", dataIndex: "deptName", align: "center", ellipsis: true, width: 160 },
{ title: "退出品类", dataIndex: "categoryName", align: "center", ellipsis: true, width: 160 }, { title: "退出品类", dataIndex: "categoryName", align: "center", ellipsis: true, width: 160 },
{
title: "退出原因", dataIndex: "exitReason", align: "center", ellipsis: true, width: 180,
render: (dom, record:any) => <span>{record.exitReason}</span>,
},
{ title: "退出时间", dataIndex: "createTime", align: "center", width: 180 }, { title: "退出时间", dataIndex: "createTime", align: "center", width: 180 },
]; ];
@ -111,7 +115,7 @@ const ViewBlacklistModal: React.FC<ViewBlacklistModalProps> = ({
<Form.Item name="exitTheme" label="供应商名称"> <Form.Item name="exitTheme" label="供应商名称">
<Input placeholder="请输入" style={{ width: 150 }} allowClear maxLength={100} /> <Input placeholder="请输入" style={{ width: 150 }} allowClear maxLength={100} />
</Form.Item> </Form.Item>
<Form.Item name="time" label="退出时间"> <Form.Item name="time" label="退出时间">
<DatePicker.RangePicker style={{ width: 220 }} allowClear /> <DatePicker.RangePicker style={{ width: 220 }} allowClear />
</Form.Item> </Form.Item>

View File

@ -41,11 +41,11 @@ const supplierExitManage: React.FC = () => {
// 可传查询条件 form.getFieldsValue() // 可传查询条件 form.getFieldsValue()
const values = form.getFieldsValue(); const values = form.getFieldsValue();
const { exitTheme, time, deptId, approveStatus } = values; const { time } = values;
const startTime = time ? moment(time[0]).format('YYYY-MM-DD') : ''; const startTime = time ? moment(time[0]).format('YYYY-MM-DD') : '';
const endTime = time ? moment(time[1]).format('YYYY-MM-DD') : ''; const endTime = time ? moment(time[1]).format('YYYY-MM-DD') : '';
const { code, data } = await getPage({ pageNo, pageSize, exitTheme, deptId, approveStatus, startTime, endTime }); const { code, data } = await getPage({ pageNo, pageSize, ...values, startTime, endTime });
if (code === 200) { if (code === 200) {
setData(data.records); setData(data.records);
setPagination(prev => ({ ...prev, current: pageNo, pageSize, total: data.total })); setPagination(prev => ({ ...prev, current: pageNo, pageSize, total: data.total }));
@ -73,7 +73,7 @@ const supplierExitManage: React.FC = () => {
setCreateVisible(true) setCreateVisible(true)
}; };
const handleSelectOk = () => { const handleSelectOk = () => {
getList(); getList(1, pagination.pageSize);
setCreateVisible(false); setCreateVisible(false);
}; };
useEffect(() => { useEffect(() => {