system-copyright-react/src/route/TrademarkMall/components/EditThree/EditThree.tsx

230 lines
6.6 KiB
TypeScript
Raw Normal View History

2025-06-13 16:43:21 +08:00
import { useState } from 'react'
2025-06-18 21:03:36 +08:00
import { Button, Form, Input, message, Modal, Radio } from "antd"
import {
PlusOutlined
} from '@ant-design/icons';
import './edit-three.css'
2025-06-13 16:43:21 +08:00
export default function EditThree(props: any) {
2025-06-18 21:03:36 +08:00
// const [form] = Form.useForm();
const [formA] = Form.useForm<any>(); //
const onFinishA = (values:any) => {
console.log(values);
}
2025-06-04 09:25:40 +08:00
const height = window.innerHeight - 350;
2025-06-18 21:03:36 +08:00
const [addPeopleModal, setAddPeopleModal] = useState(false)
2025-06-13 16:43:21 +08:00
2025-06-18 21:03:36 +08:00
const [applicantType, setApplicantType] = useState('1') //申请人类型
const applicantTypeChange = (e: any) => {
setApplicantType(e.target.value)
}
const [qualifications, setQualifications] = useState('1') //资质类型
const qualificationsChange = (e: any) => {
setQualifications(e.target.value)
}
const handleSubmit = () => {
// form.submit();
2025-06-04 09:25:40 +08:00
props.setEditProcess(4);
};
2025-06-18 21:03:36 +08:00
2025-06-04 09:25:40 +08:00
return (
<div className='editOneTwo'>
<div className='topLine'></div>
2025-06-13 16:43:21 +08:00
<div className='' style={{
2025-06-04 09:25:40 +08:00
height: height,
2025-06-13 16:43:21 +08:00
// background: 'pink'
padding: '50px 50px',
boxSizing: 'border-box',
}}>
2025-06-18 21:03:36 +08:00
<div>
<div className='editFormItem'>
<div className='editFormItemTitle'>
<span className='redTitle' >*</span>
</div>
<div style={{
// background:'pink',
position: 'relative'
2025-06-13 16:43:21 +08:00
}}>
2025-06-18 21:03:36 +08:00
<Input style={{
width: 300,
height: 46,
background: '#FFF',
// color: 'black'
}}
placeholder="选择申请人"></Input>
2025-06-13 16:43:21 +08:00
<div style={{
position: 'absolute',
2025-06-18 21:03:36 +08:00
width: 290,
height: '46px',
2025-06-13 16:43:21 +08:00
top: '0',
right: '0',
// background: 'skyblue',
2025-06-18 21:03:36 +08:00
// textAlign: 'right',
// lineHeight: '42px',
2025-06-13 16:43:21 +08:00
cursor: 'pointer',
paddingRight: '10px',
color: '#1F79FF',
2025-06-18 21:03:36 +08:00
}}>
2025-06-13 16:43:21 +08:00
</div>
</div>
2025-06-18 21:03:36 +08:00
</div>
<div className='addPeopleBox' onClick={() => {
setAddPeopleModal(true)
}}>
<div style={{
fontSize: 30,
2025-06-13 16:43:21 +08:00
2025-06-18 21:03:36 +08:00
}}><PlusOutlined /></div>
<div style={{
// fontSize:16
marginTop: 10
}}
2025-06-13 16:43:21 +08:00
2025-06-18 21:03:36 +08:00
></div>
2025-06-13 16:43:21 +08:00
</div>
2025-06-18 21:03:36 +08:00
</div>
2025-06-13 16:43:21 +08:00
</div>
2025-06-04 09:25:40 +08:00
<div className='topLine'></div>
<div style={{
marginTop: '8px',
display: 'flex',
justifyContent: 'flex-end',
}}>
<Button
style={{
width: '100px',
height: '40px',
borderRadius: '5px',
}}
onClick={() => {
props.setEditProcess(2)
}}
></Button>
<Button
type='primary'
style={{
width: '100px',
height: '40px',
borderRadius: '5px',
marginLeft: '10px',
}}
onClick={() => {
handleSubmit()
}}
></Button>
</div>
2025-06-18 21:03:36 +08:00
<Modal title="新建申请人"
2025-06-13 16:43:21 +08:00
destroyOnClose
centered
2025-06-18 21:03:36 +08:00
open={addPeopleModal}
width={1000}
2025-06-13 16:43:21 +08:00
footer={null}
onCancel={() => {
2025-06-18 21:03:36 +08:00
setAddPeopleModal(false)
2025-06-13 16:43:21 +08:00
}}>
2025-06-18 21:03:36 +08:00
<div>
<div className='addPeopleTitle'></div>
<div className='addPeopleItem' style={{
}}>
<div className='addPeopleItemTitle'>
<span className='redTitle'>*</span>
</div>
<div style={{
marginLeft: '2px',
}}>
<Radio.Group
onChange={applicantTypeChange} value={applicantType}
>
<Radio value="1"></Radio>
<Radio value="2"></Radio>
</Radio.Group>
</div>
</div>
<div className='redTips'>
():(/) ():()
</div>
<div className='redTips'>
不支持修改类型:如需修改
</div>
<div style={{
display: applicantType == '1' ? 'unset' : 'none'
}}>
<div className='addPeopleItem' style={{
}}>
<div className='addPeopleItemTitle'>
<span className='redTitle'>*</span>
</div>
<div style={{
marginLeft: '2px',
}}>
<Radio.Group
onChange={qualificationsChange} value={qualifications}
>
<Radio value="1"></Radio>
<Radio value="2"></Radio>
</Radio.Group>
</div>
</div>
<Form
name="FormA"
form={formA}
onFinish={onFinishA}
onFinishFailed={(errorInfo) => {
// console.log(errorInfo)
// message.error('请填写完整的信息!')
errorInfo.errorFields.forEach((field) => {
if (field.errors.length > 0) {
// 显示每条错误信息
message.error(field.errors[0]);
}
});
}}
initialValues={{ softWare: '' }}
style={{ marginTop: 20 }}
>
<div className='editFormItem'>
<div className='editFormItemTitle'>
<span className='redTitle' >*</span>
</div>
<div style={{
// background:'pink',
position: 'relative',
}}>
<Form.Item
name="trademarkName"
rules={[{ required: true, message: '请输入商标名称' }]}
>
<Input style={{
width: 600,
height: 46,
background: '#FFF',
color: 'black'
}}
placeholder="商标名称"
>
</Input>
</Form.Item>
</div>
2025-06-13 16:43:21 +08:00
2025-06-18 21:03:36 +08:00
</div>
</Form>
</div>
</div>
2025-06-13 16:43:21 +08:00
</Modal>
2025-06-04 09:25:40 +08:00
</div>
)
}