流程问题修改-准入与后台
This commit is contained in:
@ -107,6 +107,13 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
const uploadProps: UploadProps = {
|
||||
name: 'file',
|
||||
showUploadList: true,
|
||||
beforeUpload: (file) => {
|
||||
if (file.size > 1048576) { // 1MB
|
||||
message.error('文件大小不能超过1MB');
|
||||
return Upload.LIST_IGNORE; // 阻止上传
|
||||
}
|
||||
return true;
|
||||
},
|
||||
customRequest: async ({ file, onSuccess, onError }) => {
|
||||
try {
|
||||
const realFile = file as File;
|
||||
|
@ -1,10 +1,16 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Modal, Form, Input, Button, Upload, message, Row, Col, Descriptions } from 'antd';
|
||||
import { Modal, Form, Input, Button, Upload, message, Row, Col, Descriptions, Cascader } from 'antd';
|
||||
import type { UploadProps } from 'antd';
|
||||
import { UploadOutlined } from '@ant-design/icons';
|
||||
import { uploadFile, bankView, bankAdd, bankEdit, coscoSupplierBase } from '../services';
|
||||
import { getRegionTree, getregionInternational } from '@/servers/api/register';
|
||||
|
||||
function convertToCascaderOptions(data: any[]): any[] {
|
||||
return data.map(item => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
children: item.children && item.children.length > 0 ? convertToCascaderOptions(item.children) : undefined,
|
||||
}));
|
||||
}
|
||||
interface props {
|
||||
visible: boolean;
|
||||
onOk: () => void;
|
||||
@ -43,6 +49,9 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
const [form] = Form.useForm();
|
||||
//查看
|
||||
const [viewData, setViewData] = useState<viewDataData>({});
|
||||
// 地区
|
||||
const [addressOptions, setAddressOptions] = useState<API.RegionOption[]>([]);
|
||||
|
||||
useEffect(() => {
|
||||
if (visible) {
|
||||
if (initialValues) {
|
||||
@ -59,14 +68,14 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
setViewData(fields);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
form.resetFields(); // ✅ 只有无 initialValues 才重置
|
||||
}
|
||||
getRegionTree().then(res => {
|
||||
if (res.code === 200) {
|
||||
setAddressOptions(convertToCascaderOptions(res.data));
|
||||
}
|
||||
});
|
||||
}
|
||||
}, [visible, initialValues]);
|
||||
|
||||
@ -78,6 +87,10 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
...values,
|
||||
supplierId: userId,
|
||||
};
|
||||
payload.province = payload.address[0];
|
||||
payload.city = payload.address[1];
|
||||
payload.nation = payload.address[2];
|
||||
|
||||
if (!values.id) {
|
||||
bankAdd(payload).then((res) => {
|
||||
if (res.code == 200) {
|
||||
@ -103,6 +116,13 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
const uploadProps: UploadProps = {
|
||||
name: 'file',
|
||||
showUploadList: true,
|
||||
beforeUpload: (file) => {
|
||||
if (file.size > 1048576) { // 1MB
|
||||
message.error('文件大小不能超过1MB');
|
||||
return Upload.LIST_IGNORE; // 阻止上传
|
||||
}
|
||||
return true;
|
||||
},
|
||||
customRequest: async ({ file, onSuccess, onError }) => {
|
||||
try {
|
||||
const realFile = file as File;
|
||||
@ -172,7 +192,28 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
||||
<Col span={24}>
|
||||
<Form.Item name="address" label="地址" rules={[{ required: true }]}>
|
||||
<Cascader
|
||||
options={addressOptions}
|
||||
placeholder="请选择地址"
|
||||
showSearch={{
|
||||
filter: (inputValue, path) => {
|
||||
return path.some((option) => {
|
||||
if (typeof option.label === 'string') {
|
||||
return (
|
||||
option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1
|
||||
);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
{/* <Col span={24}>
|
||||
<Form.Item name="province" label="省份" rules={[{ required: true }]}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
@ -186,7 +227,7 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
<Form.Item name="nation" label="国家/地区" rules={[{ required: true }]}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Col> */}
|
||||
<Col span={24}>
|
||||
<Form.Item name="currency" label="币种" rules={[{ required: true }]}>
|
||||
<Input />
|
||||
|
@ -176,7 +176,7 @@ const BaseInfoFormModal: React.FC<Props> = ({
|
||||
...values,
|
||||
};
|
||||
//values.attachment 有附件就处理
|
||||
if(values.attachment) {
|
||||
if (values.attachment) {
|
||||
const file = values.attachment?.[0].response;
|
||||
payload.coscoSupplierSurveyAttachments = [
|
||||
{
|
||||
@ -190,9 +190,9 @@ const BaseInfoFormModal: React.FC<Props> = ({
|
||||
];
|
||||
}
|
||||
// 处理营业执照回显字段转换问题
|
||||
if(payload.coscoSupplierBase.supplierType === 'dvs') {
|
||||
if (payload.coscoSupplierBase.supplierType === 'dvs') {
|
||||
let licenceAccessoryD = payload.coscoSupplierBase.licenceAccessoryD;
|
||||
if(licenceAccessoryD[0].response) {
|
||||
if (licenceAccessoryD[0].response) {
|
||||
payload.coscoSupplierBase.licenceAccessory = payload.coscoSupplierBase.licenceAccessoryD[0].response.url
|
||||
} else {
|
||||
payload.coscoSupplierBase.licenceAccessory = payload.coscoSupplierBase.licenceAccessoryD[0].url
|
||||
@ -212,6 +212,13 @@ const BaseInfoFormModal: React.FC<Props> = ({
|
||||
const uploadProps: UploadProps = {
|
||||
name: 'file',
|
||||
showUploadList: true,
|
||||
beforeUpload: (file) => {
|
||||
if (file.size > 1048576) { // 1MB
|
||||
message.error('文件大小不能超过1MB');
|
||||
return Upload.LIST_IGNORE; // 阻止上传
|
||||
}
|
||||
return true;
|
||||
},
|
||||
customRequest: async ({ file, onSuccess, onError }) => {
|
||||
try {
|
||||
const realFile = file as File;
|
||||
|
@ -18,10 +18,17 @@ interface ForeignFormProps {
|
||||
* 其他部分使用通用表单组件
|
||||
*/
|
||||
const DomesticForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCaptcha }) => {
|
||||
//上传接口
|
||||
const uploadProps: UploadProps = {
|
||||
//上传接口
|
||||
const uploadProps: UploadProps = {
|
||||
name: 'file',
|
||||
showUploadList: true,
|
||||
beforeUpload: (file) => {
|
||||
if (file.size > 1048576) { // 1MB
|
||||
message.error('文件大小不能超过1MB');
|
||||
return Upload.LIST_IGNORE; // 阻止上传
|
||||
}
|
||||
return true;
|
||||
},
|
||||
customRequest: async ({ file, onSuccess, onError }) => {
|
||||
try {
|
||||
const realFile = file as File;
|
||||
@ -39,7 +46,7 @@ const uploadProps: UploadProps = {
|
||||
message.error(err.message || '上传失败');
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
return (
|
||||
<>
|
||||
{/* 境外企业特有的基本信息部分 */}
|
||||
|
@ -3,6 +3,8 @@ import { Modal, Form, Input, Select, Button, Upload, message, Row, Col, Descript
|
||||
import type { UploadProps } from 'antd';
|
||||
import { UploadOutlined } from '@ant-design/icons';
|
||||
import { uploadFile, invoiceView, invoiceAdd, invoiceEdit } from '../services';
|
||||
import { getDictList } from '@/servers/api/dicts'
|
||||
|
||||
interface props {
|
||||
visible: boolean;
|
||||
onOk: () => void;
|
||||
@ -10,6 +12,10 @@ interface props {
|
||||
initialValues?: any;
|
||||
readOnly?: boolean;
|
||||
}
|
||||
interface Dict {
|
||||
dicName: string;
|
||||
code: string;
|
||||
}
|
||||
interface viewDataData {
|
||||
id?: string | null;
|
||||
account?: string;
|
||||
@ -27,7 +33,7 @@ interface viewDataData {
|
||||
url: string;
|
||||
status: string;
|
||||
}[];
|
||||
}
|
||||
}
|
||||
const InvoiceFormModal: React.FC<props> = ({
|
||||
visible,
|
||||
onOk,
|
||||
@ -40,6 +46,9 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
const [form] = Form.useForm();
|
||||
//查看
|
||||
const [viewData, setViewData] = useState<viewDataData>({});
|
||||
//纳税人option
|
||||
const [taxpayerType, setTaxpayerType] = useState<Dict[]>();
|
||||
|
||||
useEffect(() => {
|
||||
if (visible) {
|
||||
if (initialValues) {
|
||||
@ -53,7 +62,7 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
? [{ uid: '-1', name: data.qualificationCertificate, url: data.qualificationCertificate, status: 'done', response: { url: data.qualificationCertificate } }]
|
||||
: [],
|
||||
};
|
||||
console.log(fields,'fields');
|
||||
console.log(fields, 'fields');
|
||||
|
||||
form.setFieldsValue(fields);
|
||||
setViewData(fields);
|
||||
@ -62,6 +71,13 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
} else {
|
||||
form.resetFields(); // ✅ 只有无 initialValues 才重置
|
||||
}
|
||||
|
||||
getDictList('taxpayer_type').then((res) => {
|
||||
if (res.code == 200) {
|
||||
setTaxpayerType(res.data)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}, [visible, initialValues]);
|
||||
|
||||
@ -76,7 +92,7 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
supplierId: userId,
|
||||
};
|
||||
|
||||
console.log(values,'values');
|
||||
console.log(values, 'values');
|
||||
|
||||
if (!values.id) {
|
||||
invoiceAdd(payload).then((res) => {
|
||||
@ -103,6 +119,13 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
const uploadProps: UploadProps = {
|
||||
name: 'file',
|
||||
showUploadList: true,
|
||||
beforeUpload: (file) => {
|
||||
if (file.size > 1048576) { // 1MB
|
||||
message.error('文件大小不能超过1MB');
|
||||
return Upload.LIST_IGNORE; // 阻止上传
|
||||
}
|
||||
return true;
|
||||
},
|
||||
customRequest: async ({ file, onSuccess, onError }) => {
|
||||
try {
|
||||
const realFile = file as File;
|
||||
@ -168,7 +191,12 @@ const InvoiceFormModal: React.FC<props> = ({
|
||||
<Row gutter={24}>
|
||||
<Col span={24}>
|
||||
<Form.Item name="taxpayerType" label="纳税人类型" rules={[{ required: true }]}>
|
||||
<Select options={[{ label: '一般纳税人', value: '一般纳税人' }, { label: '小规模纳税人', value: '小规模纳税人' }]} />
|
||||
<Select style={{ width: 150 }} placeholder="请选择纳税人类型" allowClear>
|
||||
{taxpayerType?.map(item => (
|
||||
<Select.Option key={item.code} value={item.code}>{item.dicName}</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
|
@ -106,6 +106,13 @@ const QualificationFormModal: React.FC<QualificationFormModalProps> = ({
|
||||
const uploadProps: UploadProps = {
|
||||
name: 'file',
|
||||
showUploadList: true,
|
||||
beforeUpload: (file) => {
|
||||
if (file.size > 1048576) { // 1MB
|
||||
message.error('文件大小不能超过1MB');
|
||||
return Upload.LIST_IGNORE; // 阻止上传
|
||||
}
|
||||
return true;
|
||||
},
|
||||
customRequest: async ({ file, onSuccess, onError }) => {
|
||||
try {
|
||||
const realFile = file as 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!)
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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]);
|
||||
|
@ -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>
|
||||
|
@ -146,6 +146,12 @@ const CooperateEnterprise: React.FC = () => {
|
||||
key: 'reviewStatusText',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '审批状态',
|
||||
dataIndex: 'approveStatusText',
|
||||
key: 'approveStatusText',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: 140,
|
||||
|
@ -55,7 +55,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
|
||||
setLoading(true);
|
||||
try {
|
||||
const values = form.getFieldsValue();
|
||||
const { code, data, message } = await getCategoryPage({ pageNo, pageSize , id:record, ...values});
|
||||
const { code, data, message } = await getCategoryPage({ pageNo, pageSize , supplierId:record, ...values});
|
||||
if (code === 200) {
|
||||
setData(data.records);
|
||||
setPagination({ current: pageNo, pageSize, total: data.total });
|
||||
|
@ -17,6 +17,7 @@ interface getCategoryPage {
|
||||
pageNo: number;
|
||||
pageSize: number;
|
||||
categoryNames?: string;
|
||||
supplierId?: string;
|
||||
}
|
||||
export const getCategoryPage = (data: getCategoryPage) => request.post('/coscoSupplierBase/getCategoryPage', { data });
|
||||
|
||||
|
@ -51,7 +51,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
|
||||
setLoading(true);
|
||||
try {
|
||||
const values = form.getFieldsValue();
|
||||
const { code, data, message } = await getCategoryPage({ pageNo, pageSize, id: record, ...values});
|
||||
const { code, data, message } = await getCategoryPage({ pageNo, pageSize, supplierId: record, ...values});
|
||||
if (code === 200) {
|
||||
setData(data.records);
|
||||
setPagination({ current: pageNo, pageSize, total: data.total });
|
||||
|
@ -13,6 +13,7 @@ interface getCategoryPage {
|
||||
pageNo: number;
|
||||
pageSize: number;
|
||||
categoryNames?: string;
|
||||
supplierId?: string;
|
||||
}
|
||||
export const getCategoryPage = (data: getCategoryPage) => request.post('/coscoSupplierBase/getCategoryPage', { data });
|
||||
|
||||
|
@ -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 }}>
|
||||
|
@ -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 (
|
||||
|
@ -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 || ''}
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
@ -170,7 +170,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.type}</Descriptions.Item>
|
||||
<Descriptions.Item label="业务类型">{viewRecord.typeCn}</Descriptions.Item>
|
||||
<Descriptions.Item label="接收时间">{viewRecord.createTime}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
)}
|
||||
|
Reference in New Issue
Block a user