| | |
| | | * @Author: dminyi 1301963064@qq.com |
| | | * @Date: 2024-08-09 09:59:43 |
| | | * @LastEditors: dminyi 1301963064@qq.com |
| | | * @LastEditTime: 2024-08-14 15:30:40 |
| | | * @LastEditTime: 2024-08-21 16:57:16 |
| | | * @FilePath: \gzDyh\gz-customerSystem\src\views\basicInformation\organization\index.jsx |
| | | * @Description: 来访登记 |
| | | */ |
| | |
| | | import "@arco-design/web-react/dist/css/arco.css"; |
| | | import '../index.less'; |
| | | import { Space } from 'antd'; |
| | | import {Button } from '@arco-design/web-react'; |
| | | import VisitorRegister from './visitorRegister'; |
| | | import { Button } from '@arco-design/web-react'; |
| | | import VisitorRegister from './component/visitorRegister'; |
| | | import Preview from './preview'; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | const Organization = () => { |
| | | // tabs当前选择的标签信息 |
| | | const [tabsActive, setTabsActive] = useState('1'); |
| | | const formRef = useRef(); |
| | | |
| | | const [tabsActive, setTabsActive] = useState('1');// tabs当前选择的标签信息 |
| | | const [isReview, setIsReview] = useState(false);//预览页面控制 |
| | | |
| | | const tabs = [ |
| | |
| | | |
| | | ]; |
| | | |
| | | //保存信息 |
| | | const handleSubmit = async () => { |
| | | } |
| | | //提交信息,需要校验规则 |
| | | const handleSubmit = async () => { |
| | | if (formRef.current) { |
| | | formRef.current.validate(undefined, (errors, values) => { |
| | | console.log(errors, values); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | //保存草稿信息,不需要校验规则 |
| | | const handleSave = async () => { |
| | | if (formRef.current) { |
| | | const data = formRef.current.getFields() |
| | | console.log(data); |
| | | } |
| | | } |
| | | |
| | | //预览信息 |
| | | const handleReview = () => { |
| | |
| | | <RegisterTab tabs={tabs} activeKey={tabsActive} onChange={(activeKey) => setTabsActive(activeKey)} style={{ background: '#fff' }} /> |
| | | {tabsActive === '1' && |
| | | <Fragment> |
| | | {isReview ? <Preview /> : <VisitorRegister />} |
| | | {isReview ? <Preview /> : <VisitorRegister formRef={formRef} />} |
| | | <div className="dataSync-excel"> |
| | | <Space size="large" style={{ margin: '4px 14px' }}> |
| | | <Button type="primary" style={{ backgroundColor: '#1A6FB8' }} >保存信息</Button> |
| | | <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={handleReview}>预览信息</Button> |
| | | <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={handleSubmit}>提交信息</Button> |
| | | <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }}>自行受理</Button> |
| | | <Button type="primary" style={{ backgroundColor: '#1A6FB8' }} onClick={handleSave} >保存</Button> |
| | | <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={handleReview}>预览</Button> |
| | | <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={handleSubmit}>提交</Button> |
| | | <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={() => selfAcceptance()}>自行受理</Button> |
| | | <Button type='secondary' onClick={handleReview}>返回上级页面</Button> |
| | | </Space> |
| | | </div> |