修改注册银行账户 地址以及 融合样式改动
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
|
@ -2,7 +2,7 @@
|
||||
* 供应商注册表单通用部分
|
||||
* 封装了国内企业和境外企业注册表单相同的部分
|
||||
*/
|
||||
import React from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import {
|
||||
Form,
|
||||
Input,
|
||||
@ -20,55 +20,26 @@ import {
|
||||
import { UploadOutlined, PlusOutlined, DeleteOutlined } from '@ant-design/icons';
|
||||
import { message } from 'antd';
|
||||
import { validateFileSize } from '@/utils/utils';
|
||||
import { getRegionTree, getregionInternational } from '@/servers/api/register';
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
// 中国省市区级联数据
|
||||
export const addressOptions = [
|
||||
{
|
||||
value: '330000',
|
||||
label: '浙江省',
|
||||
children: [
|
||||
{
|
||||
value: '330100',
|
||||
label: '杭州市',
|
||||
children: [
|
||||
{ value: '330102', label: '上城区' },
|
||||
{ value: '330103', label: '下城区' },
|
||||
{ value: '330104', label: '江干区' },
|
||||
{ value: '330105', label: '拱墅区' },
|
||||
{ value: '330106', label: '西湖区' },
|
||||
{ value: '330108', label: '滨江区' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: '310000',
|
||||
label: '上海市',
|
||||
children: [
|
||||
{
|
||||
value: '310100',
|
||||
label: '上海市',
|
||||
children: [
|
||||
{ value: '310101', label: '黄浦区' },
|
||||
{ value: '310104', label: '徐汇区' },
|
||||
{ value: '310105', label: '长宁区' },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
interface CommonFormSectionsProps {
|
||||
form: any;
|
||||
supplierType?: string;
|
||||
}
|
||||
|
||||
// 扩展问卷部分的属性接口
|
||||
interface SurveySectionProps extends CommonFormSectionsProps {
|
||||
surveyQuestions?: API.SurveyQuestionResponse;
|
||||
}
|
||||
|
||||
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,
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* 资质信息表单部分
|
||||
* 包含资质证书类型、名称、编号、等级、发证机构、发证日期、有效期等
|
||||
@ -326,7 +297,21 @@ export const InvoiceSection: React.FC<CommonFormSectionsProps> = ({ form }) => {
|
||||
* 银行账户表单部分
|
||||
* 包含开户银行、账户名称、账号、所在地区等
|
||||
*/
|
||||
export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form }) => {
|
||||
export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form, supplierType }) => {
|
||||
// 地区
|
||||
const [addressOptions, setAddressOptions] = useState<API.RegionOption[]>([]);
|
||||
|
||||
useEffect(() => {
|
||||
if(supplierType) {
|
||||
const submitInterface = supplierType === 'dvs'? getRegionTree : getregionInternational;
|
||||
submitInterface().then(res => {
|
||||
if (res.code === 200) {
|
||||
setAddressOptions(convertToCascaderOptions(res.data));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}, [supplierType]);
|
||||
return (
|
||||
<>
|
||||
<div className="form-section-title">银行账户</div>
|
||||
@ -391,7 +376,7 @@ export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form })
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '国家、省、市',
|
||||
title: '地址',
|
||||
dataIndex: 'location',
|
||||
render: (_, record) => (
|
||||
<Form.Item
|
||||
@ -401,7 +386,7 @@ export const BankAccountSection: React.FC<CommonFormSectionsProps> = ({ form })
|
||||
>
|
||||
<Cascader
|
||||
options={addressOptions}
|
||||
placeholder="请选择省市区"
|
||||
placeholder="请选择地址"
|
||||
showSearch={{
|
||||
filter: (inputValue, path) => {
|
||||
return path.some((option) => {
|
||||
|
@ -256,12 +256,12 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
||||
{ required: true, message: '请输入电子邮箱' },
|
||||
]}
|
||||
>
|
||||
<Input prefix={<MailOutlined />} placeholder="请输入企业联系电话" />
|
||||
<Input prefix={<MailOutlined />} placeholder="XXX@XXX.com " />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="telephone" label="固定电话">
|
||||
<Input placeholder="XXX@XXX.com" />
|
||||
<Input placeholder="请输入企业联系电话" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
@ -269,7 +269,7 @@ const DomesticForm: React.FC<DomesticFormProps> = ({
|
||||
{/* 使用通用表单组件 */}
|
||||
<QualificationSection form={form} />
|
||||
<InvoiceSection form={form} />
|
||||
<BankAccountSection form={form} />
|
||||
<BankAccountSection form={form} supplierType={'dvs'} />
|
||||
<SurveySection form={form} surveyQuestions={surveyQuestions} />
|
||||
<AttachmentSection form={form} />
|
||||
</>
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* 境外企业 表单项 */
|
||||
import React from 'react';
|
||||
import { Form, Input, Button, Select, Row, Col } from 'antd';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Form, Input, Button, Select, Row, Col, Cascader } from 'antd';
|
||||
import {
|
||||
MobileOutlined,
|
||||
MailOutlined,
|
||||
@ -17,6 +17,8 @@ import {
|
||||
AttachmentSection,
|
||||
} from './CommonFormSections';
|
||||
|
||||
import { getregionInternational } from '@/servers/api/register';
|
||||
|
||||
const { Option } = Select;
|
||||
const { TextArea } = Input;
|
||||
|
||||
@ -33,6 +35,16 @@ interface ForeignFormProps {
|
||||
* 其他部分使用通用表单组件
|
||||
*/
|
||||
const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCaptcha, surveyQuestions }) => {
|
||||
// 全球
|
||||
const [regionOptions, setRegionOptions] = useState<API.RegionOption[]>([]);
|
||||
useEffect(() => {
|
||||
getregionInternational().then(res => {
|
||||
if (res.code === 200) {
|
||||
setRegionOptions(res.data);
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* 境外企业特有的基本信息部分 */}
|
||||
@ -73,16 +85,11 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
rules={[{ required: true, message: '请选择国家/地区' }]}
|
||||
>
|
||||
<Select placeholder="请选择国家/地区">
|
||||
<Option value="US">美国</Option>
|
||||
<Option value="UK">英国</Option>
|
||||
<Option value="JP">日本</Option>
|
||||
<Option value="DE">德国</Option>
|
||||
<Option value="FR">法国</Option>
|
||||
<Option value="AU">澳大利亚</Option>
|
||||
<Option value="CA">加拿大</Option>
|
||||
<Option value="SG">新加坡</Option>
|
||||
<Option value="HK">中国香港</Option>
|
||||
<Option value="OTHER">其他</Option>
|
||||
{
|
||||
regionOptions.map((item) => {
|
||||
return <Option value={item.id}>{item.name}</Option>
|
||||
})
|
||||
}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
@ -307,7 +314,7 @@ const ForeignForm: React.FC<ForeignFormProps> = ({ form, countdown, handleGetCap
|
||||
{/* 使用通用表单组件 */}
|
||||
<QualificationSection form={form} />
|
||||
<InvoiceSection form={form} />
|
||||
<BankAccountSection form={form} />
|
||||
<BankAccountSection form={form} supplierType={'ovs'} />
|
||||
<SurveySection form={form} surveyQuestions={surveyQuestions} />
|
||||
<AttachmentSection form={form} />
|
||||
</>
|
||||
|
@ -80,8 +80,8 @@ const supplierNews: React.FC = () => {
|
||||
},
|
||||
{
|
||||
title: '业务类型',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
dataIndex: 'typeCn',
|
||||
key: 'typeCn',
|
||||
},
|
||||
{
|
||||
title: '发送时间',
|
||||
|
@ -120,12 +120,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
|
||||
key: "exitTime",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "进入黑名单时间",
|
||||
dataIndex: "blackTime",
|
||||
key: "blackTime",
|
||||
align: "center",
|
||||
},
|
||||
|
||||
];
|
||||
return (
|
||||
<Modal
|
||||
|
@ -115,12 +115,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
|
||||
key: "exitTime",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "进入黑名单时间",
|
||||
dataIndex: "blackTime",
|
||||
key: "blackTime",
|
||||
align: "center",
|
||||
},
|
||||
|
||||
];
|
||||
return (
|
||||
<Modal
|
||||
|
@ -11,7 +11,7 @@ const messageTypeOptions = [
|
||||
{ label: '供应商评价', value: '供应商评价' },
|
||||
{ label: '供应商评审', value: '供应商评审' },
|
||||
{ label: '供应商退出', value: '供应商退出' },
|
||||
{ label: '供应商黑灰名单', value: '供应商黑灰名单' },
|
||||
{ label: '供应商黑名单', value: '供应商黑名单' },
|
||||
];
|
||||
|
||||
const SupplierMessage: React.FC = () => {
|
||||
|
Reference in New Issue
Block a user