|
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
|
import { useParams } from 'react-router-dom'
|
|
|
import ZexhiBtn from '@/components/ZexhiBtn'
|
|
|
-import { Button, Form, FormInstance, Input, InputNumber } from 'antd'
|
|
|
+import { Button, Form, FormInstance, Input, InputNumber, Select } from 'antd'
|
|
|
import ZinfoPop from '@/components/ZinfoPop'
|
|
|
import history from '@/utils/history'
|
|
|
import classNames from 'classnames'
|
|
@@ -13,6 +13,7 @@ import { B3_APIgetList, B4_APIsave } from '@/store/action/all'
|
|
|
import { B3ListApiType } from '../B3start/type'
|
|
|
import ZselectCity from '@/components/ZselectCity'
|
|
|
import TextArea from 'antd/es/input/TextArea'
|
|
|
+import { papersSelArr } from './data'
|
|
|
|
|
|
function B4form() {
|
|
|
// useEffect(() => {
|
|
@@ -99,6 +100,7 @@ function B4form() {
|
|
|
name: values[`name${v.id}`],
|
|
|
phone: values[`phone${v.id}`],
|
|
|
identity: values[`identity${v.id}`],
|
|
|
+ papers: values[`papers${v.id}`],
|
|
|
province: cityArr[0],
|
|
|
city: cityArr[1]
|
|
|
})
|
|
@@ -171,6 +173,7 @@ function B4form() {
|
|
|
onFinishFailed={onFinishFailed}
|
|
|
autoComplete='off'
|
|
|
scrollToFirstError
|
|
|
+ initialValues={{ papers1: '内地身份证' }}
|
|
|
>
|
|
|
{/* 卡片 */}
|
|
|
{formArr.map((item, index) => (
|
|
@@ -198,7 +201,7 @@ function B4form() {
|
|
|
<Form.Item
|
|
|
label='姓名'
|
|
|
name={`name${item.id}`}
|
|
|
- rules={[{ required: true, message: '请输姓名!' }]}
|
|
|
+ rules={[{ required: true, message: '请输入姓名!' }]}
|
|
|
getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
|
|
|
>
|
|
|
<Input placeholder='请输入内容,不超过6个字' maxLength={6} />
|
|
@@ -208,29 +211,37 @@ function B4form() {
|
|
|
label='联系方式'
|
|
|
name={`phone${item.id}`}
|
|
|
rules={[
|
|
|
- { required: true, message: '请输入联系方式!' },
|
|
|
- {
|
|
|
- pattern: /^1[3-9][0-9]{9}$/,
|
|
|
- message: '请输入正确格式的手机号!'
|
|
|
- }
|
|
|
+ { required: true, message: '请输入联系方式!' }
|
|
|
+ // {
|
|
|
+ // pattern: /^1[3-9][0-9]{9}$/,
|
|
|
+ // message: '请输入正确格式的手机号!'
|
|
|
+ // }
|
|
|
]}
|
|
|
>
|
|
|
- <Input placeholder='请输入11位数字' maxLength={11} />
|
|
|
+ <Input placeholder='请输入联系方式' maxLength={30} />
|
|
|
</Form.Item>
|
|
|
|
|
|
<Form.Item
|
|
|
- label='身份证号'
|
|
|
+ label='证件类型'
|
|
|
+ name={`papers${item.id}`}
|
|
|
+ rules={[{ required: true, message: '请选择证件类型!' }]}
|
|
|
+ >
|
|
|
+ <Select placeholder='请选择证件类型' options={papersSelArr} />
|
|
|
+ </Form.Item>
|
|
|
+
|
|
|
+ <Form.Item
|
|
|
+ label='证件号码'
|
|
|
name={`identity${item.id}`}
|
|
|
rules={[
|
|
|
- { required: true, message: '请输入身份证号!' },
|
|
|
- {
|
|
|
- pattern:
|
|
|
- /^[1-9]\d{5}(19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
|
|
|
- message: '请输入正确格式的身份证号!'
|
|
|
- }
|
|
|
+ { required: true, message: '请输入证件号码!' }
|
|
|
+ // {
|
|
|
+ // pattern:
|
|
|
+ // /^[1-9]\d{5}(19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
|
|
|
+ // message: '请输入正确格式的身份证号!'
|
|
|
+ // }
|
|
|
]}
|
|
|
>
|
|
|
- <Input placeholder='请输入18位证件编码' maxLength={18} />
|
|
|
+ <Input placeholder='请输入证件号码' maxLength={30} />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
))}
|