Commit 1c772b85 authored by 张子雨's avatar 张子雨

Merge branch 'feat/constructionOne' into feature/20230327_public_takeaway

* feat/constructionOne:
  feat: 增加校验规则
parents 16e7beae 8d2dd0b9
...@@ -19,6 +19,7 @@ import { ...@@ -19,6 +19,7 @@ import {
notification, notification,
Spin, Spin,
Tabs, Tabs,
InputNumber,
} from 'antd'; } from 'antd';
import styles from './style.less'; import styles from './style.less';
import { import {
...@@ -453,9 +454,12 @@ class BusinessInfo extends Component { ...@@ -453,9 +454,12 @@ class BusinessInfo extends Component {
<Col span={12}> <Col span={12}>
<FormItem label="联系人姓名" labelCol={{ span: 8 }}> <FormItem label="联系人姓名" labelCol={{ span: 8 }}>
{getFieldDecorator('contactName', { {getFieldDecorator('contactName', {
rules: [{ required: true, message: '请输入联系人姓名!' }], rules: [
{ required: true, message: '请输入联系人姓名!' },
{ pattern: /^[A-Za-z\u4e00-\u9fa5]+$/, message: '请输入汉字或字母!' },
],
initialValue: businessInfo.contactName, initialValue: businessInfo.contactName,
})(<Input maxLength={8} />)} })(<Input />)}
</FormItem> </FormItem>
</Col> </Col>
<Col span={12}> <Col span={12}>
...@@ -608,9 +612,12 @@ class BusinessInfo extends Component { ...@@ -608,9 +612,12 @@ class BusinessInfo extends Component {
<Col span={12}> <Col span={12}>
<FormItem label="统一社会信用代码" labelCol={{ span: 8 }}> <FormItem label="统一社会信用代码" labelCol={{ span: 8 }}>
{getFieldDecorator('socialCode', { {getFieldDecorator('socialCode', {
rules: [{ required: true, message: '请输入统一社会信用代码!' }], rules: [
{ required: true, message: '请输入统一社会信用代码!' },
{ pattern: /^[A-Za-z0-9]*$/, message: '仅支持输入数字和字母' },
],
initialValue: businessInfo.socialCode, initialValue: businessInfo.socialCode,
})(<Input maxLength={32} />)} })(<Input maxLength={18} />)}
</FormItem> </FormItem>
</Col> </Col>
{(!companyNamedis && {(!companyNamedis &&
...@@ -813,7 +820,10 @@ class BusinessInfo extends Component { ...@@ -813,7 +820,10 @@ class BusinessInfo extends Component {
<Col span={12}> <Col span={12}>
<FormItem label="身份证号码" labelCol={{ span: 8 }}> <FormItem label="身份证号码" labelCol={{ span: 8 }}>
{getFieldDecorator('legalPersonIdCard', { {getFieldDecorator('legalPersonIdCard', {
rules: [{ required: true, message: '请输入身份证号码!' }], rules: [
{ required: true, message: '请输入身份证号码!' },
{ pattern: /^[A-Za-z0-9]*$/, message: '请输入数字或字母' },
],
initialValue: businessInfo.legalPersonIdCard, initialValue: businessInfo.legalPersonIdCard,
})(<Input maxLength={18} />)} })(<Input maxLength={18} />)}
</FormItem> </FormItem>
...@@ -970,7 +980,7 @@ class BusinessInfo extends Component { ...@@ -970,7 +980,7 @@ class BusinessInfo extends Component {
{getFieldDecorator('bankAccount', { {getFieldDecorator('bankAccount', {
rules: [{ required: true, message: '请输入银行帐号!' }], rules: [{ required: true, message: '请输入银行帐号!' }],
initialValue: businessInfo.bankAccount, initialValue: businessInfo.bankAccount,
})(<Input maxLength={20} />)} })(<InputNumber style={{ width: '100%' }} controls={false} min={1} />)}
</FormItem> </FormItem>
</Col> </Col>
<Col span={12}> <Col span={12}>
...@@ -1053,7 +1063,7 @@ class BusinessInfo extends Component { ...@@ -1053,7 +1063,7 @@ class BusinessInfo extends Component {
{getFieldDecorator('bankAccount', { {getFieldDecorator('bankAccount', {
rules: [{ required: true, message: '请输入银行帐号!' }], rules: [{ required: true, message: '请输入银行帐号!' }],
initialValue: businessInfo.bankAccount, initialValue: businessInfo.bankAccount,
})(<Input maxLength={20} />)} })(<InputNumber style={{ width: '100%' }} controls={false} min={1} />)}
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -1114,7 +1124,7 @@ class BusinessInfo extends Component { ...@@ -1114,7 +1124,7 @@ class BusinessInfo extends Component {
{getFieldDecorator('bankAccount', { {getFieldDecorator('bankAccount', {
rules: [{ required: true, message: '请输入银行帐号!' }], rules: [{ required: true, message: '请输入银行帐号!' }],
initialValue: businessInfo.bankAccount, initialValue: businessInfo.bankAccount,
})(<Input maxLength={20} />)} })(<InputNumber style={{ width: '100%' }} controls={false} min={1} />)}
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment