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

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

@ -1,5 +1,5 @@
import React, { useEffect , useState } from "react";
import { Modal, Button, Select, Input, Table, message, Form } from "antd";
import { Modal, Button, Select, Input, Table, message, Form, Tooltip } from "antd";
import SupplierSelectModal from "./SupplierSelectModal";
import { blacklist, getAllList } from "../services";
import type { ColumnsType } from 'antd/es/table';
@ -86,7 +86,13 @@ const CreateBlacklistModal: React.FC<CreateBlacklistModalProps> = ({
}
}, [visible]);
const columns: ColumnsType<Supplier> = [
{ title: "供应商名称", dataIndex: "supplierName", align: "center" },
{ title: '供应商名称', dataIndex: 'name', ellipsis: true, width: 160, render: (_: any, record: any) => {
const name = record.supplierType === "ovs"? record.nameEn : record.name;
return(
<Tooltip placement="topLeft" title={name}>
{name}
</Tooltip>)
} },
{ title: "准入部门", dataIndex: "unit", align: "center" },
{ title: "准入时间", dataIndex: "accessTime", align: "center", render: () => "2023-04-20 13:00" },
{ title: "准入品类", dataIndex: "categoryName", align: "center" },
@ -123,6 +129,8 @@ const CreateBlacklistModal: React.FC<CreateBlacklistModalProps> = ({
rowKey="id"
bordered
pagination={false}
style={{ flex: 1, minHeight: 0 }}
scroll={{ y: 'calc(100vh - 650px)' }}
/>
<div style={{ marginTop: 24 }}>

View File

@ -1,6 +1,6 @@
import React, { useEffect, useState } from "react";
import {
Modal, Table, Button, Checkbox, Row, Col, Input, Select, Form, Space, message
Modal, Table, Button, Checkbox, Row, Col, Input, Select, Form, Space, message, Tooltip
} from "antd";
import { getSupplierCategoryPage } from '../services';
import CategorySelector from '@/components/CategorySelector';
@ -52,7 +52,7 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
const fetchData = async (params: any = {}, pageNo = 1, pageSize = 5) => {
setLoading(true);
try {
const res = await getSupplierCategoryPage({ ...params, pageNo, pageSize });
const res = await getSupplierCategoryPage({ ...params, basePageRequest: { pageNo, pageSize } });
if (res.code === 200) {
setData(res.data.records);
setPagination({ current: pageNo, pageSize: pageSize, total: res.data.total });
@ -100,9 +100,9 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
onChange={e => {
setLeftSelected(e.target.checked ? data.map(i => i.id) : []);
}}
></Checkbox>,
></Checkbox>,
dataIndex: "select",
width: 80,
width: 40,
render: (_: any, record: Supplier) => (
<Checkbox
checked={leftSelected.includes(record.id)}
@ -111,11 +111,22 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
? [...leftSelected, record.id]
: leftSelected.filter(id => id !== record.id));
}}
></Checkbox>
></Checkbox>
)
},
{ title: "供应商名称", dataIndex: "supplierName", ellipsis: true },
{ title: "准入品类", dataIndex: "categoryName" }
{ title: '供应商名称', dataIndex: 'name', ellipsis: true, width: 160, render: (_: any, record: any) => {
const name = record.supplierType === "ovs"? record.nameEn : record.name;
return(
<Tooltip placement="topLeft" title={name}>
{name}
</Tooltip>)
} },
{ title: "准入品类", dataIndex: "categoryName", ellipsis: true, width: 100, render: (_: any, record: any) => {
return(
<Tooltip placement="topLeft" title={record.categoryName}>
{record.categoryName}
</Tooltip>)
} }
];
const rightColumns = [
@ -126,9 +137,9 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
onChange={e => {
setRightSelected(e.target.checked ? rightData.map(i => i.id) : []);
}}
></Checkbox>,
></Checkbox>,
dataIndex: "select",
width: 80,
width: 40,
render: (_: any, record: Supplier) => (
<Checkbox
checked={rightSelected.includes(record.id)}
@ -137,11 +148,22 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
? [...rightSelected, record.id]
: rightSelected.filter(id => id !== record.id));
}}
></Checkbox>
></Checkbox>
)
},
{ title: "供应商名称", dataIndex: "supplierName", ellipsis: true },
{ title: "准入品类", dataIndex: "categoryName" }
{ title: '供应商名称', dataIndex: 'name', ellipsis: true, width: 160, render: (_: any, record: any) => {
const name = record.supplierType === "ovs"? record.nameEn : record.name;
return(
<Tooltip placement="topLeft" title={name}>
{name}
</Tooltip>)
} },
{ title: "准入品类", dataIndex: "categoryName", ellipsis: true, width: 100, render: (_: any, record: any) => {
return(
<Tooltip placement="topLeft" title={record.categoryName}>
{record.categoryName}
</Tooltip>)
} }
];
return (

View File

@ -96,11 +96,11 @@ const blacklistManage: React.FC = () => {
width: 60,
render: (_: any, __: any, idx: number) => (((pagination.current ?? 1) - 1) * (pagination.pageSize ?? 10)) + idx + 1,
},
{ title: "申请主题", dataIndex: "exitTheme", key: "exitTheme", align: "left" },
{ title: "发起单位", dataIndex: "deptId", key: "deptId", align: "center" },
{ title: "申请主题", dataIndex: "themeName", key: "themeName", align: "left", ellipsis: true },
{ title: "发起单位", dataIndex: "unitName", key: "unitName", align: "center" },
{ title: "发起部门", dataIndex: "deptName", key: "deptName", align: "center" },
{ title: "发起时间", dataIndex: "createTime", key: "createTime", align: "center", width: 180 },
{ title: "审批记录状态", dataIndex: "approveStatusText", key: "approveStatusText", align: "center" },
{ title: "审批记录状态", dataIndex: "approveStatusName", key: "approveStatusName", align: "center" },
{
title: "操作",
key: "option",
@ -170,7 +170,13 @@ const blacklistManage: React.FC = () => {
scroll={{ y: 'calc(100vh - 350px)' }}
/>
</div>
<CreateBlacklistModal visible={createVisible} onCancel={() => setCreateVisible(false)} onOk={() => setCreateVisible(false)} />
<CreateBlacklistModal
visible={createVisible}
onCancel={() => setCreateVisible(false)}
onOk={() => {
setCreateVisible(false)
handleSearch
}} />
<ViewBlacklistModal
visible={viewVisible}
recordId={selectedRecordId || ''}

View File

@ -22,8 +22,7 @@ export const getPage = (data: getPageData) => request.post('/black/blacklist/get
* 供应商分页列表查询
*/
interface getSupplierCategoryPageData {
pageNo: number;
pageSize: number;
basePageRequest: basePageRequest;
supplierName?: number;
categoryId?: string;
reviewResult?: string;
@ -31,11 +30,15 @@ interface getSupplierCategoryPageData {
name?: string;
}
interface basePageRequest {
pageNo: number;
pageSize: number;
}
export const getSupplierCategoryPage = (data: getSupplierCategoryPageData) => request.post('/coscoSupplierexit/getSupplierCategoryPage', { data });
export const getSupplierCategoryPage = (data: getSupplierCategoryPageData) => request.post('/coscoSupplierBase/getSupplierPage', { data });
// /coscoSupplierBase/getSupplierPage