流程问题修改-准入与后台

This commit is contained in:
孙景学
2025-07-15 15:10:21 +08:00
parent 9173a13793
commit 24f6549d61
20 changed files with 283 additions and 103 deletions

View File

@ -9,6 +9,7 @@ import CreateModal from './components/CreateModal';
import CategorySelector from '@/components/CategorySelector';
//接口
import { getPage, startApprove } from './services'
import { getDictList } from '@/servers/api/dicts'
//统一列表分页
import tableProps from '@/utils/tableProps'
const { Option } = Select;
@ -20,6 +21,11 @@ interface Data {
createTime: string;
approveStatus: string;
}
interface Dict {
dicName: string;
code: string;
}
const SupplierCategoryEntry: React.FC = () => {
// 查询
@ -30,6 +36,8 @@ const SupplierCategoryEntry: React.FC = () => {
const [modalInfo, setModalInfo] = useState<{ type: string; visible: boolean; record?: any }>({ type: '', visible: false, });
//列表分页
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 0 });
//
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
//列表加载
const [loading, setLoading] = useState(false);
// 列表方法
@ -49,6 +57,11 @@ const SupplierCategoryEntry: React.FC = () => {
useEffect(() => {
const values = form.getFieldsValue();
getList(values, 1, 10);
getDictList('approve_type').then((res) => {
if (res.code == 200) {
setEnterpriseType(res.data)
}
})
}, []);
//开启弹窗
const openModal = (type: string, record?: any) => {
@ -93,7 +106,7 @@ const SupplierCategoryEntry: React.FC = () => {
{ title: '准入部门', ellipsis: true, width: 120, dataIndex: 'deptId' },
{ title: '准入方式', ellipsis: true, width: 120, dataIndex: 'accessTypeText' },
{ title: '申请时间', dataIndex: 'createTime', width: 180 },
{ title: '状态', ellipsis: true, width: 120, dataIndex: 'approveStatusText' },
{ title: '审批状态', ellipsis: true, width: 120, dataIndex: 'approveStatusText' },
{
title: '操作',
width: 140,
@ -129,12 +142,11 @@ const SupplierCategoryEntry: React.FC = () => {
<Form.Item name="categoryId" label="准入品类">
<CategorySelector multiple={false} style={{ width: 150 }} />
</Form.Item>
<Form.Item name="approveStatus" label="状态">
<Form.Item name="approveStatus" label="审批状态">
<Select style={{ width: 150 }} placeholder="请选择状态" allowClear>
<Option value="0"></Option>
<Option value="1"></Option>
<Option value="2"></Option>
<Option value="3"></Option>
{enterpriseType?.map(item => (
<Select.Option key={item.code} value={item.code}>{item.dicName}</Select.Option>
))}
</Select>
</Form.Item>
@ -159,7 +171,7 @@ const SupplierCategoryEntry: React.FC = () => {
dataSource={data}
columns={columns}
loading={loading}
pagination={{...tableProps.pagination, total: pagination.total }}
pagination={{ ...tableProps.pagination, total: pagination.total }}
onChange={(pagination) => {
const values = form.getFieldsValue();
getList(values, pagination.current!, pagination.pageSize!)

View File

@ -4,6 +4,7 @@ import { SearchOutlined, DeleteOutlined } from '@ant-design/icons';
import type { ColumnsType } from 'antd/es/table';
//接口
import { getApprovePage } from './services';
import { getDictList } from '@/servers/api/dicts'
//组件
import ViewModal from './components/ViewModal';
//统一列表分页
@ -35,7 +36,10 @@ const deptOptions = [
{ label: '采购部', value: 'DEPT001' },
{ label: '业务部', value: 'DEPT002' },
];
interface Dict {
dicName: string;
code: string;
}
const SupplierEntryReview: React.FC = () => {
const [form] = Form.useForm();
@ -43,6 +47,8 @@ const SupplierEntryReview: React.FC = () => {
const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 });
const [loading, setLoading] = useState(false);
const [modalInfo, setModalInfo] = useState<ModalInfo>({ visible: false, record: null });
//
const [enterpriseType, setEnterpriseType] = useState<Dict[]>();
// 查询数据
const fetchData = async (params = {}) => {
setLoading(true);
@ -74,6 +80,11 @@ const SupplierEntryReview: React.FC = () => {
useEffect(() => {
fetchData({ pageNo: 1 });
getDictList('approve_type').then((res) => {
if (res.code == 200) {
setEnterpriseType(res.data)
}
})
}, []);
// 表格分页切换
@ -165,13 +176,13 @@ const SupplierEntryReview: React.FC = () => {
width: 180,
},
{
title: '流程状态',
title: '评审状态',
dataIndex: 'reviewStatusText',
align: 'center',
width: 120,
},
{
title: '审',
title: '审批状态',
dataIndex: 'approveStatusText',
align: 'center',
width: 120,
@ -210,12 +221,11 @@ const SupplierEntryReview: React.FC = () => {
<Select options={deptOptions} allowClear style={{ width: 120 }} placeholder="请选择准入部门" />
</Form.Item>
<Form.Item name="approveStatus" label="流程状态">
<Form.Item name="approveStatus" label="审批状态">
<Select style={{ width: 150 }} placeholder="请选择状态" allowClear>
<Option value="0"></Option>
<Option value="1"></Option>
<Option value="2"></Option>
<Option value="3"></Option>
{enterpriseType?.map(item => (
<Select.Option key={item.code} value={item.code}>{item.dicName}</Select.Option>
))}
</Select>
</Form.Item>

View File

@ -8,6 +8,7 @@ import ReviewerSelector from './ReviewerSelector';
import DivisionModal from './DivisionModal';
// 请求
import { categoryTree, add, uploadFile } from '../services';
const { Option } = Select;
const { RangePicker } = DatePicker;
//selected 类型
@ -232,8 +233,10 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
if (code == 200) {
setCategoriesTreeData(data)
}
})
form.setFieldsValue({ method: 'online' });
}
}, [visible, form]);

View File

@ -96,7 +96,18 @@ const AccessManagement: React.FC = () => {
{ title: '准入部门', ellipsis: true, width: 120, dataIndex: 'deptId' },
{ title: '准入方式', ellipsis: true, width: 120, dataIndex: 'accessTypeText' },
{ title: '申请时间', ellipsis: true, width: 180, dataIndex: 'createTime' },
{ title: '状态', dataIndex: 'reviewStatusText', width: 80, },
{
title: '评审状态',
dataIndex: 'reviewStatusText',
key: 'reviewStatusText',
width: 120,
},
{
title: '审批状态',
dataIndex: 'approveStatusText',
key: 'approveStatusText',
width: 120,
},
{
title: '操作',
width: 200,
@ -139,8 +150,8 @@ const AccessManagement: React.FC = () => {
<Form.Item name="categoryId" label="准入品类">
<CategorySelector multiple={false} style={{ width: 150 }} />
</Form.Item>
<Form.Item name="approveStatus" label="状态">
<Select style={{ width: 150 }} placeholder="请选择状态" allowClear>
<Form.Item name="approveStatus" label="评审状态">
<Select style={{ width: 150 }} placeholder="请选择评审状态" allowClear>
<Option value="0"></Option>
<Option value="1"></Option>
<Option value="2"></Option>

View File

@ -146,6 +146,12 @@ const CooperateEnterprise: React.FC = () => {
key: 'reviewStatusText',
width: 120,
},
{
title: '审批状态',
dataIndex: 'approveStatusText',
key: 'approveStatusText',
width: 120,
},
{
title: '操作',
width: 140,