更新部分功能
This commit is contained in:
@ -19,9 +19,10 @@ interface attachmentsAdd {
|
||||
|
||||
interface Props {
|
||||
viewType?: boolean;
|
||||
record?: string;
|
||||
}
|
||||
const OtherAttachmentsTab: React.FC<Props> = (props) => {
|
||||
const { viewType = false } = props;
|
||||
const { viewType = false, record = '' } = props;
|
||||
//语言切换
|
||||
const intl = useIntl();
|
||||
//列表渲染数据
|
||||
@ -35,7 +36,7 @@ const OtherAttachmentsTab: React.FC<Props> = (props) => {
|
||||
const getList = async (pageNo = 1, pageSize = 10) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const { code, data } = await battachmentsGetPage({ pageNo, pageSize });
|
||||
const { code, data } = await battachmentsGetPage({ pageNo, pageSize, supplierId: record });
|
||||
if (code === 200) {
|
||||
setData(data.records);
|
||||
setPagination({ current: pageNo, pageSize, total: data.total });
|
||||
|
@ -20,9 +20,10 @@ interface BankInfo {
|
||||
}
|
||||
interface Props {
|
||||
viewType?: boolean;
|
||||
record?: string;
|
||||
}
|
||||
const BankInfoTab: React.FC<Props> = (props) => {
|
||||
const { viewType = false } = props;
|
||||
const { viewType = false, record = '' } = props;
|
||||
//双语
|
||||
const intl = useIntl();
|
||||
//列表渲染数据
|
||||
@ -35,7 +36,7 @@ const BankInfoTab: React.FC<Props> = (props) => {
|
||||
const getList = async (pageNo: number = 1, pageSize: number = 10) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const { code, data } = await bankGetPage({ pageNo, pageSize });
|
||||
const { code, data } = await bankGetPage({ pageNo, pageSize, supplierId: record });
|
||||
if (code === 200) {
|
||||
setData(data.records);
|
||||
setPagination({ current: pageNo, pageSize, total: data.total });
|
||||
|
@ -44,16 +44,17 @@ interface coscoSupplierSurveyAttachments {
|
||||
|
||||
interface BaseInfoTabProps {
|
||||
viewType?:boolean;
|
||||
record?:string;
|
||||
}
|
||||
|
||||
const BaseInfoTab: React.FC<BaseInfoTabProps> = (props) => {
|
||||
const { viewType = false } = props;
|
||||
const { viewType = false, record = '' } = props;
|
||||
const intl = useIntl();
|
||||
const [registerInfo, setRegisterInfo] = useState<Request>();
|
||||
//变更说明与附件
|
||||
const [changeDataValue, setChangeDataValue] = useState<changeDataValueProps>();
|
||||
const fetchData = async () => {
|
||||
const res = await coscoSupplierBase();
|
||||
const res = await coscoSupplierBase(record);
|
||||
if (res.code === 200) {
|
||||
setRegisterInfo(res.data);
|
||||
setChangeDataValue({
|
||||
|
@ -15,8 +15,12 @@ interface Contact {
|
||||
email: string;
|
||||
updateTime: string;
|
||||
}
|
||||
|
||||
const ContactsInfoTab: React.FC = () => {
|
||||
interface Props {
|
||||
viewType?: boolean;
|
||||
record?: string;
|
||||
}
|
||||
const ContactsInfoTab: React.FC<Props> = (props) => {
|
||||
const { viewType = false, record = '' } = props;
|
||||
const intl = useIntl();
|
||||
const [data, setData] = useState<Contact[]>([]);
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({
|
||||
@ -28,28 +32,11 @@ const ContactsInfoTab: React.FC = () => {
|
||||
|
||||
const fetchContacts = async (page: number = 1, pageSize: number = 10) => {
|
||||
|
||||
coscoSupplierBase().then((res) => {
|
||||
coscoSupplierBase(record).then((res) => {
|
||||
if(res.code == 200) {
|
||||
setData([res.data.coscoSupplierBase])
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
// setLoading(true);
|
||||
// try {
|
||||
// const res = await coscoSupplier(page);
|
||||
// if (res.code === 200) {
|
||||
// setData(res.contacts || []);
|
||||
// setPagination({
|
||||
// current: page,
|
||||
// pageSize,
|
||||
// total: res.totalContacts || (res.contacts?.length || 0),
|
||||
// });
|
||||
// }
|
||||
// } finally {
|
||||
// setLoading(false);
|
||||
// }
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -20,10 +20,11 @@ interface InvoiceInfo {
|
||||
|
||||
interface InvoiceTabProps {
|
||||
viewType?: boolean;
|
||||
record?: string;
|
||||
}
|
||||
|
||||
const InvoiceTab: React.FC<InvoiceTabProps> = (props) => {
|
||||
const { viewType = false } = props;
|
||||
const { viewType = false, record = '' } = props;
|
||||
//语言切换
|
||||
const intl = useIntl();
|
||||
//列表渲染数据
|
||||
@ -37,7 +38,7 @@ const InvoiceTab: React.FC<InvoiceTabProps> = (props) => {
|
||||
const getList = async (pageNo = 1, pageSize = 10) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const { code, data } = await invoiceGetPage({ pageNo, pageSize });
|
||||
const { code, data } = await invoiceGetPage({ pageNo, pageSize, supplierId: record });
|
||||
if (code === 200) {
|
||||
setData(data.records);
|
||||
setPagination({ current: pageNo, pageSize, total: data.total });
|
||||
|
@ -19,10 +19,11 @@ interface Qualification {
|
||||
|
||||
interface QualificationTabProps {
|
||||
viewType?: boolean;
|
||||
record?: string;
|
||||
}
|
||||
|
||||
const QualificationTab: React.FC<QualificationTabProps> = (props) => {
|
||||
const { viewType = false } = props;
|
||||
const { viewType = false, record = '' } = props;
|
||||
const intl = useIntl();
|
||||
const [data, setData] = useState<Qualification[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
@ -35,7 +36,7 @@ const QualificationTab: React.FC<QualificationTabProps> = (props) => {
|
||||
const getList = async (pageNo = 1, pageSize = 10) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const { code, data } = await qualificationsGetPage({ pageNo, pageSize });
|
||||
const { code, data } = await qualificationsGetPage({ pageNo, pageSize, supplierId: record });
|
||||
if (code === 200) {
|
||||
setData(data.records);
|
||||
setPagination({ current: pageNo, pageSize, total: data.total });
|
||||
|
@ -10,12 +10,13 @@ import BankInfoTab from './component/BankInfoTab';
|
||||
|
||||
interface CompanyInfoProps {
|
||||
viewType?: boolean;
|
||||
record?: string;
|
||||
}
|
||||
|
||||
const { TabPane } = Tabs;
|
||||
|
||||
const CompanyInfo: React.FC<CompanyInfoProps> = (props) => {
|
||||
const { viewType = false } = props;
|
||||
const { viewType = false, record = '' } = props;
|
||||
const intl = useIntl();
|
||||
// 切换tab
|
||||
const [subTab, setSubTab] = useState<string>('base');
|
||||
@ -23,22 +24,22 @@ const CompanyInfo: React.FC<CompanyInfoProps> = (props) => {
|
||||
return (
|
||||
<Tabs activeKey={subTab} onChange={setSubTab}>
|
||||
<TabPane tab={intl.formatMessage({ id: 'page.workbench.base' })} key="base">
|
||||
<BaseInfoTab viewType={viewType} />
|
||||
<BaseInfoTab viewType={viewType} record={record} />
|
||||
</TabPane>
|
||||
<TabPane tab={intl.formatMessage({ id: 'page.workbench.qualification' })} key="qualification">
|
||||
<QualificationTab viewType={viewType} />
|
||||
<QualificationTab viewType={viewType} record={record} />
|
||||
</TabPane>
|
||||
<TabPane tab={intl.formatMessage({ id: 'page.workbench.invoice' })} key="invoice">
|
||||
<InvoiceTab viewType={viewType} />
|
||||
<InvoiceTab viewType={viewType} record={record} />
|
||||
</TabPane>
|
||||
<TabPane tab={intl.formatMessage({ id: 'page.workbench.bank' })} key="bank">
|
||||
<BankInfoTab viewType={viewType} />
|
||||
<BankInfoTab viewType={viewType} record={record} />
|
||||
</TabPane>
|
||||
<TabPane tab={intl.formatMessage({ id: 'page.workbench.attachments' })} key="attachments">
|
||||
<AttachmentsTab viewType={viewType} />
|
||||
<AttachmentsTab viewType={viewType} record={record} />
|
||||
</TabPane>
|
||||
<TabPane tab={intl.formatMessage({ id: 'page.workbench.contacts' })} key="contacts">
|
||||
<ContactsInfoTab />
|
||||
<ContactsInfoTab viewType={viewType} record={record} />
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
);
|
||||
|
@ -5,7 +5,7 @@ import request from '@/utils/request';
|
||||
/**
|
||||
* 供应商基本信息
|
||||
*/
|
||||
export const coscoSupplierBase = () => request.get(`/coscoSupplierBase/1935265782606135296`);
|
||||
export const coscoSupplierBase = (id: string) => request.get(`/coscoSupplierBase/${id}`);
|
||||
|
||||
/**
|
||||
* 资质分页列表
|
||||
|
@ -4,6 +4,7 @@ import { RightOutlined, LeftOutlined } from '@ant-design/icons';
|
||||
import { coscoSupplierBase } from '../services';
|
||||
|
||||
const { Option } = Select;
|
||||
type OptionType = { label: string; value: string };
|
||||
|
||||
const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSelect?: (selected: any[]) => void; }> = ({ visible, onCancel, onSelect }) => {
|
||||
// 查询
|
||||
@ -20,6 +21,8 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
|
||||
const [rightSelected, setRightSelected] = useState<React.Key[]>([]);
|
||||
//确认 已选供应商
|
||||
const [chosenSuppliers, setChosenSuppliers] = useState<any[]>([]);
|
||||
// 境内/境外下拉数据
|
||||
const [regionOptions, setRegionOptions] = useState<OptionType[]>([]);
|
||||
//已选供应商 去重
|
||||
const filteredData = (chosenSuppliers:any, selected:any) => {
|
||||
const ids = new Set(chosenSuppliers.map((item:any) => item.id));
|
||||
@ -56,6 +59,11 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
|
||||
// 初始化
|
||||
useEffect(() => {
|
||||
if(visible) {
|
||||
// 境内/境外 下拉
|
||||
setRegionOptions([
|
||||
{ label: '境内企业', value: 'dvs' },
|
||||
{ label: '境外企业', value: 'ovs' },
|
||||
])
|
||||
const values = form.getFieldsValue();
|
||||
getTableList(values,1 , 10)
|
||||
}
|
||||
@ -73,20 +81,25 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
|
||||
<Modal title="选择供应商" visible={visible} onCancel={onCancel} footer={null} width="80%">
|
||||
|
||||
<Form layout="inline" form={form} onFinish={getTableList} style={{ marginBottom: 16 }}>
|
||||
<Form.Item name="accessType" label="供应商名称">
|
||||
<Input placeholder="供应商名称" allowClear />
|
||||
<Form.Item name="name" label="供应商名称">
|
||||
<Input placeholder="请输入供应商名称关键字" style={{ width: 220 }} allowClear maxLength={20} />
|
||||
</Form.Item>
|
||||
<Form.Item name="deptId" label="境内/境外">
|
||||
<Select placeholder="境内/境外" allowClear >
|
||||
<Option value="境内">境内</Option>
|
||||
<Option value="境外">境外</Option>
|
||||
<Form.Item name="supplierType" label="境内/境外">
|
||||
<Select style={{ width: 160 }} placeholder="请选择境内/境外" allowClear>
|
||||
{regionOptions.map(opt => (
|
||||
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Button type="primary" htmlType="submit">查询</Button>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Button onClick={() => form.resetFields()}>重置</Button>
|
||||
<Button onClick={() => {
|
||||
form.resetFields()
|
||||
const values = form.getFieldsValue();
|
||||
getTableList(values,1 , 10)
|
||||
}}>重置</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { RightOutlined, LeftOutlined } from '@ant-design/icons';
|
||||
import { coscoSupplierBase } from '../services';
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
type OptionType = { label: string; value: string };
|
||||
const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSelect?: (selected: any[]) => void; }> = ({ visible, onCancel, onSelect }) => {
|
||||
// 查询
|
||||
const [form] = Form.useForm();
|
||||
@ -20,6 +20,8 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
|
||||
const [rightSelected, setRightSelected] = useState<React.Key[]>([]);
|
||||
//确认 已选供应商
|
||||
const [chosenSuppliers, setChosenSuppliers] = useState<any[]>([]);
|
||||
// 境内/境外下拉数据
|
||||
const [regionOptions, setRegionOptions] = useState<OptionType[]>([]);
|
||||
//已选供应商 去重
|
||||
const filteredData = (chosenSuppliers:any, selected:any) => {
|
||||
const ids = new Set(chosenSuppliers.map((item:any) => item.id));
|
||||
@ -55,9 +57,16 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
|
||||
};
|
||||
// 初始化
|
||||
useEffect(() => {
|
||||
if(visible) {
|
||||
// 境内/境外 下拉
|
||||
setRegionOptions([
|
||||
{ label: '境内企业', value: 'dvs' },
|
||||
{ label: '境外企业', value: 'ovs' },
|
||||
])
|
||||
const values = form.getFieldsValue();
|
||||
getTableList(values,1 , 10)
|
||||
}, [])
|
||||
}
|
||||
}, [visible])
|
||||
//供应商名称
|
||||
const columns = [
|
||||
{ title: '供应商名称', dataIndex: 'name', ellipsis: true, render: (name: string) => (
|
||||
@ -71,20 +80,28 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
|
||||
<Modal title="选择供应商" visible={visible} onCancel={onCancel} footer={null} width="80%">
|
||||
|
||||
<Form layout="inline" form={form} onFinish={getTableList} style={{ marginBottom: 16 }}>
|
||||
<Form.Item name="accessType" label="供应商名称">
|
||||
<Input placeholder="供应商名称" allowClear />
|
||||
|
||||
<Form.Item name="name" label="供应商名称">
|
||||
<Input placeholder="请输入供应商名称关键字" style={{ width: 220 }} allowClear maxLength={20} />
|
||||
</Form.Item>
|
||||
<Form.Item name="deptId" label="境内/境外">
|
||||
<Select placeholder="境内/境外" allowClear >
|
||||
<Option value="境内">境内</Option>
|
||||
<Option value="境外">境外</Option>
|
||||
<Form.Item name="supplierType" label="境内/境外">
|
||||
<Select style={{ width: 160 }} placeholder="请选择境内/境外" allowClear>
|
||||
{regionOptions.map(opt => (
|
||||
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
|
||||
|
||||
<Form.Item>
|
||||
<Button type="primary" htmlType="submit">查询</Button>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Button onClick={() => form.resetFields()}>重置</Button>
|
||||
<Button onClick={() => {
|
||||
form.resetFields()
|
||||
const values = form.getFieldsValue();
|
||||
getTableList(values,1 , 10)
|
||||
}}>重置</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
|
||||
|
@ -116,11 +116,12 @@ const GroupLeaderModal: React.FC<GroupLeaderModalProps> = ({
|
||||
accessWorkId = record?.id
|
||||
}
|
||||
|
||||
if(summaryParams.length === 0) {
|
||||
message.warning('请选择审核');
|
||||
for (let index = 0; index < summaryParams.length; index++) {
|
||||
if(summaryParams[index].reviewResult === null) {
|
||||
message.warning('有未评审项');
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
update({ coscoAccessUserItemList: summaryParams, accessWorkId }).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
message.success('提交成功');
|
||||
|
@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
|
||||
import { Modal, Table, Button, Radio, Input, Upload, message, Spin } from 'antd';
|
||||
import { reviewInfo, uploadFile, update } from '../services';
|
||||
import type { ColumnsType } from 'antd/es/table';
|
||||
import { connect } from 'umi';
|
||||
//主体参数接口
|
||||
interface ResultModalProps {
|
||||
visible: boolean;
|
||||
@ -9,6 +10,7 @@ interface ResultModalProps {
|
||||
record?: { id?: string; [key: string]: any } | null;
|
||||
onCancel: () => void;
|
||||
onSubmit: () => void;
|
||||
dispatch: any;
|
||||
}
|
||||
interface RowData {
|
||||
key: string;
|
||||
@ -58,7 +60,8 @@ const ResultModal: React.FC<ResultModalProps> = ({
|
||||
view,
|
||||
record,
|
||||
onCancel,
|
||||
onSubmit
|
||||
onSubmit,
|
||||
dispatch,
|
||||
}) => {
|
||||
// type: 'teamMembers' | 'groupLeader'
|
||||
// 供应商、评审项、单元格数据
|
||||
@ -219,6 +222,13 @@ const ResultModal: React.FC<ResultModalProps> = ({
|
||||
if(record?.id) {
|
||||
accessWorkId = record?.id
|
||||
}
|
||||
|
||||
for (let index = 0; index < result.length; index++) {
|
||||
if(result[index].reviewResult === null) {
|
||||
message.warning('有未评审项');
|
||||
return
|
||||
}
|
||||
}
|
||||
// 提交审核
|
||||
update( {coscoAccessUserItemList: result, accessWorkId }).then((res) => {
|
||||
if(res.code == 200) {
|
||||
@ -238,7 +248,22 @@ const ResultModal: React.FC<ResultModalProps> = ({
|
||||
fixed: 'left'
|
||||
},
|
||||
...suppliers.map((sup, colIdx) => ({
|
||||
title: sup.supplierName,
|
||||
title: (
|
||||
<div>
|
||||
<a
|
||||
onClick={() => {
|
||||
dispatch({
|
||||
type: 'globalModal/show',
|
||||
payload: {
|
||||
id: sup.supplierId,
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
{sup.supplierName}
|
||||
</a>
|
||||
</div>
|
||||
),
|
||||
dataIndex: sup.supplierId,
|
||||
key: sup.supplierId,
|
||||
width: 300,
|
||||
@ -365,4 +390,4 @@ const ResultModal: React.FC<ResultModalProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
export default ResultModal;
|
||||
export default connect()(ResultModal);
|
||||
|
@ -0,0 +1,22 @@
|
||||
import React from "react";
|
||||
//第三方UI库/组件
|
||||
import { Modal } from "antd";
|
||||
//本地组件、业务逻辑
|
||||
import CompanyInfo from '@/components/CompanyInfo';
|
||||
//主体接口
|
||||
interface SupplierViewModalProps {
|
||||
visible: boolean;
|
||||
onCancel: () => void;
|
||||
record?: string;
|
||||
}
|
||||
// 查看主体
|
||||
const SupplierViewModal: React.FC<SupplierViewModalProps> = ({ visible, onCancel, record }) => {
|
||||
return (
|
||||
<Modal visible={visible} title="供应商信息查看" onCancel={onCancel} footer={null} width='80%' destroyOnClose >
|
||||
<CompanyInfo
|
||||
viewType={true} record={record} />
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default SupplierViewModal;
|
@ -2,9 +2,17 @@ import React, { useRef, useEffect, useState } from 'react';
|
||||
import { Table, Form, Input, Button, Row, Col, DatePicker, Tabs, Space, message } from 'antd';
|
||||
import { SearchOutlined, ReloadOutlined, PlusOutlined } from '@ant-design/icons';
|
||||
import { getPageAgent } from './services';
|
||||
|
||||
import type { ColumnsType } from 'antd/es/table';
|
||||
import SupplierViewModal from './components/SupplierViewModal';
|
||||
const { RangePicker } = DatePicker;
|
||||
const { TabPane } = Tabs;
|
||||
interface Columns {
|
||||
name: string;
|
||||
enterpriseType: string;
|
||||
deptId: string;
|
||||
createTime: string;
|
||||
id: string;
|
||||
}
|
||||
|
||||
const SupplierRegisterAgent: React.FC = () => {
|
||||
const [form] = Form.useForm();
|
||||
@ -12,7 +20,10 @@ const SupplierRegisterAgent: React.FC = () => {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 });
|
||||
const [tabKey, setTabKey] = useState('dvs');
|
||||
|
||||
//查看是否显示状态
|
||||
const [viewVisible, setViewVisible] = useState(false);
|
||||
//查看 参数传递
|
||||
const [currentRecord, setCurrentRecord] = useState('');
|
||||
// 查询数据
|
||||
const fetchData = async (page = 1, pageSize = 10) => {
|
||||
setLoading(true);
|
||||
@ -67,7 +78,7 @@ const SupplierRegisterAgent: React.FC = () => {
|
||||
};
|
||||
|
||||
// 列
|
||||
const columns = [
|
||||
const columns: ColumnsType<Columns> = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
@ -108,7 +119,7 @@ const SupplierRegisterAgent: React.FC = () => {
|
||||
align: 'center',
|
||||
render: (_: any, record: any) => (
|
||||
<Space>
|
||||
<a onClick={() => message.info(`查看:${record.name}`)}>查看</a>
|
||||
<a onClick={() => { setCurrentRecord(record.id); setViewVisible(true); }}>查看</a>
|
||||
<a onClick={() => message.info(`编辑:${record.name}`)}>编辑</a>
|
||||
</Space>
|
||||
),
|
||||
@ -161,7 +172,12 @@ const SupplierRegisterAgent: React.FC = () => {
|
||||
showSizeChanger: true,
|
||||
onChange: (current, pageSize) => handleTableChange({ current, pageSize }),
|
||||
}}
|
||||
bordered
|
||||
/>
|
||||
{/* 查看组件 */}
|
||||
<SupplierViewModal
|
||||
visible={viewVisible}
|
||||
record={currentRecord}
|
||||
onCancel={() => setViewVisible(false)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
@ -23,7 +23,7 @@ interface Data {
|
||||
interface SupplierAccessDetailModalProps {
|
||||
visible: boolean;
|
||||
onCancel: () => void;
|
||||
record?: any; // 你可以定义具体类型
|
||||
record?: string; // 你可以定义具体类型
|
||||
}
|
||||
//主体
|
||||
const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ visible, onCancel, record, }) => {
|
||||
@ -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 , ...values});
|
||||
const { code, data, message } = await getCategoryPage({ pageNo, pageSize , id:record, ...values});
|
||||
if (code === 200) {
|
||||
setData(data.records);
|
||||
setPagination({ current: pageNo, pageSize, total: data.total });
|
||||
|
@ -7,13 +7,13 @@ import CompanyInfo from '@/components/CompanyInfo';
|
||||
interface SupplierViewModalProps {
|
||||
visible: boolean;
|
||||
onCancel: () => void;
|
||||
record?: any;
|
||||
record?: string;
|
||||
}
|
||||
// 查看主体
|
||||
const SupplierViewModal: React.FC<SupplierViewModalProps> = ({ visible, onCancel, record }) => {
|
||||
return (
|
||||
<Modal visible={visible} title="供应商信息查看" onCancel={onCancel} footer={null} width='80%' destroyOnClose >
|
||||
<CompanyInfo viewType={true} />
|
||||
<CompanyInfo viewType={true} record={record} />
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
@ -39,7 +39,7 @@ const mySupplierInquiry: React.FC = () => {
|
||||
//准入明细是否显示状态
|
||||
const [detailVisible, setDetailVisible] = useState(false);
|
||||
//查看、准入明细 参数传递
|
||||
const [currentRecord, setCurrentRecord] = useState<any>(null);
|
||||
const [currentRecord, setCurrentRecord] = useState('');
|
||||
// 境内/境外下拉数据
|
||||
const [regionOptions, setRegionOptions] = useState<OptionType[]>([]);
|
||||
// 准入状态
|
||||
@ -150,11 +150,11 @@ const mySupplierInquiry: React.FC = () => {
|
||||
<Space>
|
||||
<a
|
||||
style={{ color: '#1677ff' }}
|
||||
onClick={() => { setCurrentRecord(record); setViewVisible(true); }}
|
||||
onClick={() => { setCurrentRecord(record.id); setViewVisible(true); }}
|
||||
>查看</a>
|
||||
<a
|
||||
style={{ color: '#1677ff' }}
|
||||
onClick={() => { setCurrentRecord(record); setDetailVisible(true); }}
|
||||
onClick={() => { setCurrentRecord(record.id); setDetailVisible(true); }}
|
||||
>准入明细</a>
|
||||
</Space>
|
||||
),
|
||||
|
@ -21,7 +21,7 @@ interface Data {
|
||||
interface SupplierAccessDetailModalProps {
|
||||
visible: boolean;
|
||||
onCancel: () => void;
|
||||
record?: any; // 你可以定义具体类型
|
||||
record?: string; // 你可以定义具体类型
|
||||
}
|
||||
//主体
|
||||
const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ visible, onCancel, record, }) => {
|
||||
@ -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 , ...values});
|
||||
const { code, data, message } = await getCategoryPage({ pageNo, pageSize, id: record, ...values});
|
||||
if (code === 200) {
|
||||
setData(data.records);
|
||||
setPagination({ current: pageNo, pageSize, total: data.total });
|
||||
|
@ -7,14 +7,14 @@ import CompanyInfo from '@/components/CompanyInfo';
|
||||
interface SupplierViewModalProps {
|
||||
visible: boolean;
|
||||
onCancel: () => void;
|
||||
record?: any;
|
||||
record?: string;
|
||||
}
|
||||
// 查看主体
|
||||
const SupplierViewModal: React.FC<SupplierViewModalProps> = ({ visible, onCancel, record }) => {
|
||||
return (
|
||||
<Modal visible={visible} title="供应商信息查看" onCancel={onCancel} footer={null} width='80%' destroyOnClose >
|
||||
<CompanyInfo
|
||||
viewType={true} />
|
||||
viewType={true} record={record} />
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ const RegistrationQuery: React.FC = () => {
|
||||
//准入明细是否显示状态
|
||||
const [detailVisible, setDetailVisible] = useState(false);
|
||||
//查看、准入明细 参数传递
|
||||
const [currentRecord, setCurrentRecord] = useState<any>(null);
|
||||
const [currentRecord, setCurrentRecord] = useState('');
|
||||
// 境内/境外下拉数据
|
||||
const [regionOptions, setRegionOptions] = useState<OptionType[]>([]);
|
||||
//状态 下拉数据
|
||||
@ -153,11 +153,11 @@ const RegistrationQuery: React.FC = () => {
|
||||
<Space>
|
||||
<a
|
||||
style={{ color: '#1677ff' }}
|
||||
onClick={() => { setCurrentRecord(record); setViewVisible(true); }}
|
||||
onClick={() => { setCurrentRecord(record.id); setViewVisible(true); }}
|
||||
>查看</a>
|
||||
<a
|
||||
style={{ color: '#1677ff' }}
|
||||
onClick={() => { setCurrentRecord(record); setDetailVisible(true); }}
|
||||
onClick={() => { setCurrentRecord(record.id); setDetailVisible(true); }}
|
||||
>准入明细</a>
|
||||
</Space>
|
||||
),
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
Modal, Table, Button, Checkbox, Row, Col, Input, Select, Form, Space, message
|
||||
} from "antd";
|
||||
import { getSupplierCategoryPage } from '../services';
|
||||
|
||||
import CategorySelector from '@/components/CategorySelector';
|
||||
const { Option } = Select;
|
||||
|
||||
interface Supplier {
|
||||
@ -161,23 +161,22 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
|
||||
bodyStyle={{ padding: 24 }}
|
||||
>
|
||||
<Form layout="inline" form={form} style={{ marginBottom: 16 }}>
|
||||
|
||||
|
||||
<Form.Item name="name" label="供应商名称">
|
||||
<Input style={{ width: 180 }} allowClear />
|
||||
<Input style={{ width: 140 }} allowClear maxLength={50} placeholder="请输入供应商名称" />
|
||||
</Form.Item>
|
||||
<Form.Item name="evalLevel" label="最近一次评价等级">
|
||||
<Select style={{ width: 140 }} allowClear>
|
||||
<Form.Item name="levelName" label="最近一次评价等级">
|
||||
<Select style={{ width: 140 }} allowClear placeholder="请选择最近一次评价等级" >
|
||||
{['A', 'B', 'C', 'D'].map(level => (
|
||||
<Option key={level} value={level}>{level}</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item name="category" label="准入品类">
|
||||
<Select style={{ width: 140 }} allowClear>
|
||||
{['燃油', '润滑油', '备件'].map(cat => (
|
||||
<Option key={cat} value={cat}>{cat}</Option>
|
||||
))}
|
||||
</Select>
|
||||
<Form.Item name="categoryId" label="准入品类">
|
||||
<CategorySelector multiple={false} style={{ width: 140 }} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item>
|
||||
<Space>
|
||||
<Button type="primary" onClick={handleSearch}>查询</Button>
|
||||
@ -200,7 +199,6 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
|
||||
fetchData(values, pag.current!, pag.pageSize!);
|
||||
}}
|
||||
size="small"
|
||||
bordered
|
||||
/>
|
||||
</Col>
|
||||
<Col span={2} style={{ textAlign: "center", display: "flex", flexDirection: "column", justifyContent: "center" }}>
|
||||
@ -215,7 +213,6 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
|
||||
columns={rightColumns}
|
||||
pagination={false}
|
||||
size="small"
|
||||
bordered
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
@ -27,6 +27,9 @@ interface getSupplierCategoryPageData {
|
||||
supplierName?: number;
|
||||
categoryId?: string;
|
||||
reviewResult?: string;
|
||||
levelName?: string;
|
||||
name?: string;
|
||||
|
||||
}
|
||||
|
||||
export const getSupplierCategoryPage = (data: getSupplierCategoryPageData) => request.post('/coscoSupplierexit/getSupplierCategoryPage', { data });
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
Modal, Table, Button, Checkbox, Row, Col, Input, Select, Form, Space, message
|
||||
} from "antd";
|
||||
import { getSupplierCategoryPage } from '../services';
|
||||
|
||||
import CategorySelector from '@/components/CategorySelector';
|
||||
const { Option } = Select;
|
||||
|
||||
interface Supplier {
|
||||
@ -162,21 +162,17 @@ const SupplierSelectModal: React.FC<SupplierSelectModalProps> = ({
|
||||
>
|
||||
<Form layout="inline" form={form} style={{ marginBottom: 16 }}>
|
||||
<Form.Item name="name" label="供应商名称">
|
||||
<Input style={{ width: 180 }} allowClear />
|
||||
<Input style={{ width: 140 }} allowClear maxLength={50} placeholder="请输入供应商名称" />
|
||||
</Form.Item>
|
||||
<Form.Item name="evalLevel" label="最近一次评价等级">
|
||||
<Select style={{ width: 140 }} allowClear>
|
||||
<Form.Item name="levelName" label="最近一次评价等级">
|
||||
<Select style={{ width: 140 }} allowClear placeholder="请选择最近一次评价等级" >
|
||||
{['A', 'B', 'C', 'D'].map(level => (
|
||||
<Option key={level} value={level}>{level}</Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item name="category" label="准入品类">
|
||||
<Select style={{ width: 140 }} allowClear>
|
||||
{['燃油', '润滑油', '备件'].map(cat => (
|
||||
<Option key={cat} value={cat}>{cat}</Option>
|
||||
))}
|
||||
</Select>
|
||||
<Form.Item name="categoryId" label="准入品类">
|
||||
<CategorySelector multiple={false} style={{ width: 140 }} />
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Space>
|
||||
|
@ -26,6 +26,8 @@ interface getSupplierCategoryPageData {
|
||||
supplierName?: number;
|
||||
categoryId?: string;
|
||||
reviewResult?: string;
|
||||
name?: string;
|
||||
levelName?: string;
|
||||
}
|
||||
|
||||
export const getSupplierCategoryPage = (data: getSupplierCategoryPageData) => request.post('/coscoSupplierexit/getSupplierCategoryPage', { data });
|
||||
|
@ -115,10 +115,10 @@ const SupplierMessage: React.FC = () => {
|
||||
<>
|
||||
<Form form={form} layout="inline" style={{ marginBottom: 12 }}>
|
||||
<Form.Item name="content" label="消息内容">
|
||||
<Input placeholder="请输入" style={{ width: 220 }} />
|
||||
<Input placeholder="请输入消息内容" style={{ width: 220 }} maxLength={50} />
|
||||
</Form.Item>
|
||||
<Form.Item name="type" label="业务类型">
|
||||
<Select style={{ width: 200 }}>
|
||||
<Select style={{ width: 200 }} placeholder="请选择业务类型">
|
||||
{messageTypeOptions.map(opt => (
|
||||
<Select.Option key={opt.value} value={opt.value}>{opt.label}</Select.Option>
|
||||
))}
|
||||
|
Reference in New Issue
Block a user