Merge branch 'dev' of http://59.110.10.99:53000/liuc/fe_supplier_frontend into dev
This commit is contained in:
@ -111,8 +111,8 @@ const DomesticForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCa
|
|||||||
{/* <Col span={12}>
|
{/* <Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name={['coscoSupplierBase', 'supplierType']}
|
name={['coscoSupplierBase', 'supplierType']}
|
||||||
label="供应商分类"
|
label="企业类型"
|
||||||
rules={[{ required: true, message: '请选择供应商分类' }]}
|
rules={[{ required: true, message: '请选择企业类型' }]}
|
||||||
>
|
>
|
||||||
<Select placeholder="请选择">
|
<Select placeholder="请选择">
|
||||||
<Option value="dvs">境内企业/机构</Option>
|
<Option value="dvs">境内企业/机构</Option>
|
||||||
|
@ -1,20 +1,21 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { Modal, Form, Select, Button, Tree, message, Input } from 'antd';
|
import { Modal, Form, Button, Tree, message, Input } from 'antd';
|
||||||
//组件
|
//组件
|
||||||
import SupplierSelector from './SupplierSelector';
|
import SupplierSelector from './SupplierSelector';
|
||||||
import AccessDepartmentSelect from '@/components/AccessDepartmentSelect';
|
import AccessDepartmentSelect from '@/components/AccessDepartmentSelect';
|
||||||
// 请求
|
// 请求
|
||||||
import { categoryTree, add } from '../services';
|
import { categoryTree, add } from '../services';
|
||||||
const { Option } = Select;
|
|
||||||
|
|
||||||
// 主体
|
// 主体
|
||||||
const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ visible, onCancel }) => {
|
const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ visible, onCancel }) => {
|
||||||
|
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
//名称输入
|
||||||
|
const [accessWorkNameEdited, setAccessWorkNameEdited] = useState(false);
|
||||||
|
|
||||||
//品类选择
|
//品类选择
|
||||||
const [checkedKeys, setCheckedKeys] = useState<React.Key[]>([]);
|
const [checkedKeys, setCheckedKeys] = useState<React.Key[]>([]);
|
||||||
//供应商
|
const [disabledCategories, setDisabledCategories] = useState<string[]>([]);
|
||||||
const [selectedSuppliers, setSelectedSuppliers] = useState<any[]>([]);
|
|
||||||
//供应商弹出
|
//供应商弹出
|
||||||
const [supplierModalVisible, setSupplierModalVisible] = useState(false);
|
const [supplierModalVisible, setSupplierModalVisible] = useState(false);
|
||||||
//品类选择渲染数据
|
//品类选择渲染数据
|
||||||
@ -26,7 +27,7 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
title: item.categoryName,
|
title: item.categoryName,
|
||||||
key: item.id,
|
key: item.id,
|
||||||
children: item.children ? convertTreeData(item.children) : undefined,
|
children: item.children ? convertTreeData(item.children) : undefined,
|
||||||
|
disabled: disabledCategories.includes(item.id),
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
function findLeafKeys(treeData: any[]): string[] {
|
function findLeafKeys(treeData: any[]): string[] {
|
||||||
@ -56,8 +57,55 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
// 只取叶子节点 key
|
// 只取叶子节点 key
|
||||||
const leafKeys = findLeafKeys(convertTreeData(categoriesTreeData));
|
const leafKeys = findLeafKeys(convertTreeData(categoriesTreeData));
|
||||||
const onlyLeafChecked = keys.filter(key => leafKeys.includes(String(key)));
|
const onlyLeafChecked = keys.filter(key => leafKeys.includes(String(key)));
|
||||||
|
|
||||||
|
console.log(onlyLeafChecked,'onlyLeafChecked', leafKeys ,keys);
|
||||||
|
|
||||||
|
|
||||||
setCheckedKeys(keys); // UI 显示用,还是全量
|
setCheckedKeys(keys); // UI 显示用,还是全量
|
||||||
form.setFieldsValue({ categoryIds: onlyLeafChecked }); // 只存叶子到表单
|
form.setFieldsValue({ categoryIds: onlyLeafChecked }); // 只存叶子到表单
|
||||||
|
|
||||||
|
// ==============================
|
||||||
|
// 增加自动拼标题的逻辑
|
||||||
|
// ==============================
|
||||||
|
if (!accessWorkNameEdited) {
|
||||||
|
// 1. 获取供应商名
|
||||||
|
const supplier = (form.getFieldValue('supplier') || [])[0];
|
||||||
|
let supplierName = '';
|
||||||
|
if (supplier) {
|
||||||
|
supplierName = supplier.supplierType === 'ovs' ? supplier.nameEn : supplier.name;
|
||||||
|
}
|
||||||
|
// 2. 获取已选品类名称
|
||||||
|
const findNamesByIds = (treeData: any[], ids: any[]) => {
|
||||||
|
let names: string[] = [];
|
||||||
|
const dfs = (list: any[]) => {
|
||||||
|
list.forEach(item => {
|
||||||
|
if (ids.includes(item.id)) {
|
||||||
|
names.push(item.categoryName);
|
||||||
|
}
|
||||||
|
if (item.children) dfs(item.children);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
dfs(treeData);
|
||||||
|
return names;
|
||||||
|
};
|
||||||
|
const categoryNames = findNamesByIds(categoriesTreeData, onlyLeafChecked);
|
||||||
|
|
||||||
|
let autoTitle = supplierName;
|
||||||
|
if (supplierName && categoryNames.length) {
|
||||||
|
if (categoryNames.length === 1) {
|
||||||
|
autoTitle = `${supplierName}-${categoryNames[0]}-品类准入工作`;
|
||||||
|
} else {
|
||||||
|
autoTitle = `${supplierName}-${categoryNames[0]}等-品类准入工作`;
|
||||||
|
}
|
||||||
|
} else if (!supplierName && categoryNames.length) {
|
||||||
|
if (categoryNames.length === 1) {
|
||||||
|
autoTitle = categoryNames[0];
|
||||||
|
} else {
|
||||||
|
autoTitle = `${categoryNames[0]}等-品类准入工作`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
form.setFieldsValue({ accessWorkName: autoTitle });
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
@ -95,7 +143,6 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
message.success('创建成功');
|
message.success('创建成功');
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
setCheckedKeys([]);
|
setCheckedKeys([]);
|
||||||
setSelectedSuppliers([]);
|
|
||||||
onCancel();
|
onCancel();
|
||||||
} else {
|
} else {
|
||||||
message.error('创建失败');
|
message.error('创建失败');
|
||||||
@ -120,7 +167,6 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
setCheckedKeys([]);
|
setCheckedKeys([]);
|
||||||
setSelectedSuppliers([]);
|
|
||||||
onCancel();
|
onCancel();
|
||||||
}}
|
}}
|
||||||
width="700px"
|
width="700px"
|
||||||
@ -137,7 +183,14 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
name="accessWorkName"
|
name="accessWorkName"
|
||||||
rules={[{ required: true, message: '请输入标题名称' }]}
|
rules={[{ required: true, message: '请输入标题名称' }]}
|
||||||
>
|
>
|
||||||
<Input placeholder="请输入标题名称" allowClear />
|
<Input placeholder="请输入标题名称" allowClear
|
||||||
|
onChange={e => {
|
||||||
|
if (e.target.value) {
|
||||||
|
setAccessWorkNameEdited(true);
|
||||||
|
} else {
|
||||||
|
setAccessWorkNameEdited(false);
|
||||||
|
}
|
||||||
|
}}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="准入部门"
|
label="准入部门"
|
||||||
@ -148,6 +201,17 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
|
||||||
|
<Form.Item
|
||||||
|
label="选择供应商"
|
||||||
|
name="supplier"
|
||||||
|
rules={[{ required: true, message: '请选择供应商' }]}
|
||||||
|
>
|
||||||
|
<Button onClick={() => setSupplierModalVisible(true)}>
|
||||||
|
选择供应商
|
||||||
|
</Button>
|
||||||
|
<span style={{marginLeft: 10}}>{`${form.getFieldValue('supplier')? form.getFieldValue('supplier')[0].supplierType === 'ovs' ? form.getFieldValue('supplier')[0].nameEn : form.getFieldValue('supplier')[0].name : ''}`}</span>
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="品类选择"
|
label="品类选择"
|
||||||
name="categoryIds"
|
name="categoryIds"
|
||||||
@ -170,15 +234,6 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
|
||||||
label="选择供应商"
|
|
||||||
name="supplier"
|
|
||||||
rules={[{ required: true, message: '请选择供应商' }]}
|
|
||||||
>
|
|
||||||
<Button onClick={() => setSupplierModalVisible(true)}>
|
|
||||||
选择供应商
|
|
||||||
</Button>
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item wrapperCol={{ offset: 6 }}>
|
<Form.Item wrapperCol={{ offset: 6 }}>
|
||||||
<Button type="primary" htmlType="submit" style={{ marginRight: 8 }}>
|
<Button type="primary" htmlType="submit" style={{ marginRight: 8 }}>
|
||||||
提交
|
提交
|
||||||
@ -187,7 +242,6 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
setCheckedKeys([]);
|
setCheckedKeys([]);
|
||||||
setSelectedSuppliers([]);
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
重置
|
重置
|
||||||
@ -197,11 +251,31 @@ const CreateModal: React.FC<{ visible: boolean; onCancel: () => void; }> = ({ vi
|
|||||||
|
|
||||||
<SupplierSelector
|
<SupplierSelector
|
||||||
visible={supplierModalVisible}
|
visible={supplierModalVisible}
|
||||||
|
selectedKeys={(form.getFieldValue('supplier') || []).map((i: any) => i.id)}
|
||||||
onCancel={() => setSupplierModalVisible(false)}
|
onCancel={() => setSupplierModalVisible(false)}
|
||||||
onSelect={(selected) => {
|
onSelect={(selected) => {
|
||||||
setSelectedSuppliers(selected);
|
|
||||||
form.setFieldsValue({ supplier: selected });
|
form.setFieldsValue({ supplier: selected });
|
||||||
|
setCheckedKeys([]);
|
||||||
setSupplierModalVisible(false);
|
setSupplierModalVisible(false);
|
||||||
|
// 取所有已选供应商的 categoryName 并分割
|
||||||
|
const allCategories = selected
|
||||||
|
.map(item => item.categoryIds) // 取出字符串
|
||||||
|
.filter(Boolean) // 防止空
|
||||||
|
.flatMap(str => str.split(',')) // 逗号切分
|
||||||
|
.map(c => c.trim()) // 去空格
|
||||||
|
.filter(Boolean);
|
||||||
|
setDisabledCategories(Array.from(new Set(allCategories))); // 去重
|
||||||
|
|
||||||
|
//名称
|
||||||
|
if (!accessWorkNameEdited) {
|
||||||
|
if (selected.length > 0) {
|
||||||
|
console.log(selected, 'accessWorkName');
|
||||||
|
const suppliersName = `${selected[0].supplierType === 'ovs' ? selected[0].nameEn : selected[0].name}-品类准入工作`
|
||||||
|
form.setFieldsValue({ 'accessWorkName': suppliersName });
|
||||||
|
} else {
|
||||||
|
form.setFieldsValue({ 'accessWorkName': '' });
|
||||||
|
}
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
@ -1,46 +1,28 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { Modal, Input, Select, Row, Col, Table, Button, Form, Tooltip } from 'antd';
|
import { Modal, Input, Button, Form, Table, Tooltip } from 'antd';
|
||||||
import { RightOutlined, LeftOutlined } from '@ant-design/icons';
|
|
||||||
import { coscoSupplierBase } from '../services';
|
import { coscoSupplierBase } from '../services';
|
||||||
import RegionTypeSelect from '@/components/CommonSelect/RegionTypeSelect'
|
import RegionTypeSelect from '@/components/CommonSelect/RegionTypeSelect'
|
||||||
|
|
||||||
|
const SupplierSelector: React.FC<{
|
||||||
const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSelect?: (selected: any[]) => void; }> = ({ visible, onCancel, onSelect }) => {
|
visible: boolean;
|
||||||
// 查询
|
onCancel: () => void;
|
||||||
|
onSelect?: (selected: any[]) => void;
|
||||||
|
selectedKeys?: React.Key[];
|
||||||
|
}> = ({ visible, onCancel, onSelect, selectedKeys = [] }) => {
|
||||||
|
// 查询表单
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
//列表渲染数据
|
// 列表数据
|
||||||
const [tableListData, setTableListData] = useState([]);
|
const [tableListData, setTableListData] = useState<any[]>([]);
|
||||||
//列表分页
|
// 单选key
|
||||||
|
const [selectedRowKey, setSelectedRowKey] = useState<string | null>(null);
|
||||||
|
// 当前选中对象
|
||||||
|
const [selectedSupplier, setSelectedSupplier] = useState<any | null>(null);
|
||||||
|
// 分页
|
||||||
const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 });
|
const [pagination, setPagination] = useState({ current: 1, pageSize: 10, total: 0 });
|
||||||
//列表加载
|
// 加载态
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
//已选供应商
|
|
||||||
const [leftSelected, setLeftSelected] = useState<React.Key[]>([]);
|
// 查询
|
||||||
//选择供应商
|
|
||||||
const [rightSelected, setRightSelected] = useState<React.Key[]>([]);
|
|
||||||
//确认 已选供应商
|
|
||||||
const [chosenSuppliers, setChosenSuppliers] = useState<any[]>([]);
|
|
||||||
//已选供应商 去重
|
|
||||||
const filteredData = (chosenSuppliers: any, selected: any) => {
|
|
||||||
const ids = new Set(chosenSuppliers.map((item: any) => item.id));
|
|
||||||
// 只把 selected 里没出现过的加进去
|
|
||||||
const newSelected = selected.filter((item: any) => !ids.has(item.id));
|
|
||||||
return [...chosenSuppliers, ...newSelected];
|
|
||||||
};
|
|
||||||
//获取已选供应商
|
|
||||||
const moveToRight = () => {
|
|
||||||
const selected = tableListData.filter((item: any) => leftSelected.includes(item.id));
|
|
||||||
const chosenSuppliersNew = filteredData(chosenSuppliers, selected);
|
|
||||||
setChosenSuppliers(chosenSuppliersNew);
|
|
||||||
setLeftSelected([]);
|
|
||||||
};
|
|
||||||
// 删除已选供应商
|
|
||||||
const moveToLeft = () => {
|
|
||||||
const remaining = chosenSuppliers.filter((item: any) => !rightSelected.includes(item.id));
|
|
||||||
setChosenSuppliers(remaining);
|
|
||||||
setRightSelected([]);
|
|
||||||
};
|
|
||||||
// 列表方法
|
|
||||||
const getTableList = async (values: any = {}, pageNo: number = 1, pageSize: number = 10) => {
|
const getTableList = async (values: any = {}, pageNo: number = 1, pageSize: number = 10) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
@ -53,29 +35,46 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
|
setSelectedRowKey(selectedKeys[0] ? selectedKeys[0].toString() : null);
|
||||||
|
form.resetFields();
|
||||||
|
setSelectedSupplier(null);
|
||||||
const values = form.getFieldsValue();
|
const values = form.getFieldsValue();
|
||||||
getTableList(values, 1, 10)
|
getTableList(values, 1, 10);
|
||||||
}
|
}
|
||||||
}, [visible])
|
// eslint-disable-next-line
|
||||||
//供应商名称
|
}, [visible, selectedKeys]);
|
||||||
|
|
||||||
|
// 列
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '供应商名称', dataIndex: 'name', ellipsis: true, width: 160, render: (_: any, record: any) => {
|
title: '供应商名称',
|
||||||
|
dataIndex: 'name',
|
||||||
|
ellipsis: true,
|
||||||
|
width: 160,
|
||||||
|
render: (_: any, record: any) => {
|
||||||
const name = record.supplierType === "ovs" ? record.nameEn : record.name;
|
const name = record.supplierType === "ovs" ? record.nameEn : record.name;
|
||||||
return (
|
return (
|
||||||
<Tooltip placement="topLeft" title={name}>
|
<Tooltip placement="topLeft" title={name}>
|
||||||
{name}
|
{name}
|
||||||
</Tooltip>)
|
</Tooltip>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '统一社会信用代码/税号', ellipsis: true, dataIndex: 'unifiedCode' },
|
{ title: '统一社会信用代码/税号', ellipsis: true, dataIndex: 'unifiedCode' },
|
||||||
];
|
];
|
||||||
return (
|
|
||||||
<Modal title="选择供应商" visible={visible} onCancel={onCancel} footer={null} width="80%">
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
title="选择供应商"
|
||||||
|
visible={visible}
|
||||||
|
onCancel={onCancel}
|
||||||
|
footer={null}
|
||||||
|
width="50%"
|
||||||
|
>
|
||||||
<Form layout="inline" form={form} onFinish={getTableList} style={{ marginBottom: 16 }}>
|
<Form layout="inline" form={form} onFinish={getTableList} style={{ marginBottom: 16 }}>
|
||||||
<Form.Item name="name" label="供应商名称">
|
<Form.Item name="name" label="供应商名称">
|
||||||
<Input placeholder="请输入供应商名称关键字" style={{ width: 220 }} allowClear maxLength={20} />
|
<Input placeholder="请输入供应商名称关键字" style={{ width: 220 }} allowClear maxLength={20} />
|
||||||
@ -88,55 +87,35 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button onClick={() => {
|
<Button onClick={() => {
|
||||||
form.resetFields()
|
form.resetFields();
|
||||||
|
setSelectedRowKey(null);
|
||||||
|
setSelectedSupplier(null);
|
||||||
const values = form.getFieldsValue();
|
const values = form.getFieldsValue();
|
||||||
getTableList(values, 1, 10)
|
getTableList(values, 1, 10);
|
||||||
}}>重置</Button>
|
}}>重置</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
|
|
||||||
<Row gutter={16}>
|
|
||||||
<Col span={10}>
|
|
||||||
<div>待选供应商</div>
|
|
||||||
<Table
|
<Table
|
||||||
rowSelection={{ type: 'checkbox', onChange: setLeftSelected, selectedRowKeys: leftSelected }}
|
rowSelection={{
|
||||||
|
type: 'radio',
|
||||||
|
selectedRowKeys: selectedRowKey ? [selectedRowKey] : [],
|
||||||
|
onChange: (selectedKeys, selectedRows) => {
|
||||||
|
setSelectedRowKey(selectedKeys[0] ? selectedKeys[0].toString() : null);
|
||||||
|
setSelectedSupplier(selectedRows[0] || null);
|
||||||
|
}
|
||||||
|
}}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={tableListData}
|
dataSource={tableListData}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={pagination}
|
pagination={pagination}
|
||||||
onChange={(pagination) => {
|
onChange={pagination => {
|
||||||
const values = form.getFieldsValue();
|
const values = form.getFieldsValue();
|
||||||
getTableList(values, pagination.current!, pagination.pageSize!)
|
getTableList(values, pagination.current!, pagination.pageSize!);
|
||||||
}}
|
}}
|
||||||
scroll={{ y: 300 }}
|
scroll={{ y: 300 }}
|
||||||
/>
|
/>
|
||||||
</Col>
|
|
||||||
|
|
||||||
<Col span={4} style={{ textAlign: 'center', paddingTop: 100 }}>
|
|
||||||
<Button onClick={moveToRight} disabled={leftSelected.length === 0}>
|
|
||||||
<RightOutlined />
|
|
||||||
</Button>
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<Button onClick={moveToLeft} disabled={rightSelected.length === 0}>
|
|
||||||
<LeftOutlined />
|
|
||||||
</Button>
|
|
||||||
</Col>
|
|
||||||
|
|
||||||
<Col span={10}>
|
|
||||||
<div>已选供应商</div>
|
|
||||||
<Table
|
|
||||||
rowSelection={{ type: 'checkbox', onChange: setRightSelected, selectedRowKeys: rightSelected }}
|
|
||||||
columns={columns}
|
|
||||||
dataSource={chosenSuppliers}
|
|
||||||
rowKey="id"
|
|
||||||
pagination={false}
|
|
||||||
scroll={{ y: 300 }}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
|
|
||||||
<div style={{ textAlign: 'right', marginTop: 16 }}>
|
<div style={{ textAlign: 'right', marginTop: 16 }}>
|
||||||
<Button style={{ marginRight: 8 }} onClick={onCancel}>
|
<Button style={{ marginRight: 8 }} onClick={onCancel}>
|
||||||
@ -144,8 +123,9 @@ const SupplierSelector: React.FC<{ visible: boolean; onCancel: () => void; onSel
|
|||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
disabled={!selectedSupplier}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onSelect?.(chosenSuppliers);
|
onSelect?.(selectedSupplier ? [selectedSupplier] : []);
|
||||||
onCancel();
|
onCancel();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -111,7 +111,7 @@ const SupplierAddModal: React.FC<{
|
|||||||
{ title: '供应商名称', dataIndex: 'name', align: 'center' },
|
{ title: '供应商名称', dataIndex: 'name', align: 'center' },
|
||||||
{ title: '境内/境外', dataIndex: 'region', align: 'center' },
|
{ title: '境内/境外', dataIndex: 'region', align: 'center' },
|
||||||
{ title: '统一社会信用代码', dataIndex: 'creditCode', align: 'center' },
|
{ title: '统一社会信用代码', dataIndex: 'creditCode', align: 'center' },
|
||||||
{ title: '供应商分类', dataIndex: 'type', align: 'center' },
|
{ title: '企业类型', dataIndex: 'type', align: 'center' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -83,7 +83,7 @@ const SupplierListModal: React.FC<{
|
|||||||
{ title: '供应商名称', dataIndex: 'name', align: 'center' },
|
{ title: '供应商名称', dataIndex: 'name', align: 'center' },
|
||||||
{ title: '境内/境外', dataIndex: 'region', align: 'center' },
|
{ title: '境内/境外', dataIndex: 'region', align: 'center' },
|
||||||
{ title: '统一社会信用代码', dataIndex: 'creditCode', align: 'center' },
|
{ title: '统一社会信用代码', dataIndex: 'creditCode', align: 'center' },
|
||||||
{ title: '供应商分类', dataIndex: 'type', align: 'center' },
|
{ title: '企业类型', dataIndex: 'type', align: 'center' },
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -124,7 +124,7 @@ const SupplierAddModal: React.FC<{
|
|||||||
{ title: '境内/境外', dataIndex: 'supplierType', align: 'center',
|
{ title: '境内/境外', dataIndex: 'supplierType', align: 'center',
|
||||||
render: (ext: any, record: any) => (<span>{`${record.supplierCategory === 'dvs'? '境内企业':'境外企业'}`}</span>) },
|
render: (ext: any, record: any) => (<span>{`${record.supplierCategory === 'dvs'? '境内企业':'境外企业'}`}</span>) },
|
||||||
{ title: '统一社会信用代码', dataIndex: 'socialCreditCode', align: 'center', ellipsis: true },
|
{ title: '统一社会信用代码', dataIndex: 'socialCreditCode', align: 'center', ellipsis: true },
|
||||||
{ title: '供应商分类', dataIndex: 'categoryName', align: 'center' , ellipsis: true },
|
{ title: '企业类型', dataIndex: 'categoryName', align: 'center' , ellipsis: true },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
@ -83,7 +83,7 @@ const SupplierListModal: React.FC<{
|
|||||||
{ title: '供应商名称', dataIndex: 'name', align: 'center' },
|
{ title: '供应商名称', dataIndex: 'name', align: 'center' },
|
||||||
{ title: '境内/境外', dataIndex: 'region', align: 'center' },
|
{ title: '境内/境外', dataIndex: 'region', align: 'center' },
|
||||||
{ title: '统一社会信用代码', dataIndex: 'creditCode', align: 'center' },
|
{ title: '统一社会信用代码', dataIndex: 'creditCode', align: 'center' },
|
||||||
{ title: '供应商分类', dataIndex: 'enterpriseTypeCn', align: 'center' },
|
{ title: '企业类型', dataIndex: 'enterpriseTypeCn', align: 'center' },
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -83,7 +83,7 @@ const SupplierListModal: React.FC<{
|
|||||||
{ title: '供应商名称', dataIndex: 'name', align: 'center' },
|
{ title: '供应商名称', dataIndex: 'name', align: 'center' },
|
||||||
{ title: '境内/境外', dataIndex: 'region', align: 'center' },
|
{ title: '境内/境外', dataIndex: 'region', align: 'center' },
|
||||||
{ title: '统一社会信用代码', dataIndex: 'creditCode', align: 'center' },
|
{ title: '统一社会信用代码', dataIndex: 'creditCode', align: 'center' },
|
||||||
{ title: '供应商分类', dataIndex: 'type', align: 'center' },
|
{ title: '企业类型', dataIndex: 'type', align: 'center' },
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -145,7 +145,7 @@ const SupplierChangeReviewManage: React.FC<Props> = ({ dispatch }) => {
|
|||||||
width: 160,
|
width: 160,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '供应商分类',
|
title: '企业类型',
|
||||||
dataIndex: 'enterpriseTypeCn',
|
dataIndex: 'enterpriseTypeCn',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 160,
|
width: 160,
|
||||||
|
@ -126,7 +126,7 @@ const RegistrationQuery: React.FC<RegistrationQueryProps> = ({ dispatch }) => {
|
|||||||
width: 160,
|
width: 160,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '供应商分类',
|
title: '企业类型',
|
||||||
dataIndex: 'enterpriseTypeCn',
|
dataIndex: 'enterpriseTypeCn',
|
||||||
key: 'enterpriseTypeCn',
|
key: 'enterpriseTypeCn',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
Reference in New Issue
Block a user