Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
merchant-manage-ui
Commits
931c1e92
Commit
931c1e92
authored
Mar 30, 2023
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加校验
parent
a09a0f43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
482 additions
and
376 deletions
+482
-376
index.jsx
src/pages/businessManage/info/index.jsx
+482
-376
No files found.
src/pages/businessManage/info/index.jsx
View file @
931c1e92
...
@@ -52,7 +52,7 @@ const { Option } = Select;
...
@@ -52,7 +52,7 @@ const { Option } = Select;
const
{
Item
:
FormItem
}
=
Form
;
const
{
Item
:
FormItem
}
=
Form
;
const
{
RangePicker
}
=
DatePicker
;
const
{
RangePicker
}
=
DatePicker
;
const
{
TabPane
}
=
Tabs
;
const
{
TabPane
}
=
Tabs
;
const
carID
=
301008
;
// 汽车类商家
class
BusinessInfo
extends
Component
{
class
BusinessInfo
extends
Component
{
getFieldDecorator
=
this
.
props
?.
form
?.
getFieldDecorator
;
getFieldDecorator
=
this
.
props
?.
form
?.
getFieldDecorator
;
...
@@ -82,6 +82,7 @@ class BusinessInfo extends Component {
...
@@ -82,6 +82,7 @@ class BusinessInfo extends Component {
checkboxDisabled
:
false
,
checkboxDisabled
:
false
,
mainCategoryId
:
null
,
mainCategoryId
:
null
,
companyNamedis
:
false
,
// 公司名称
companyNamedis
:
false
,
// 公司名称
storedis
:
true
,
// 到店校验
};
};
async
componentDidMount
()
{
async
componentDidMount
()
{
...
@@ -321,7 +322,9 @@ class BusinessInfo extends Component {
...
@@ -321,7 +322,9 @@ class BusinessInfo extends Component {
}
}
onChangeBusinessModel
=
e
=>
{
onChangeBusinessModel
=
e
=>
{
const
storedis
=
e
.
includes
(
3
);
this
.
getCategoryList
(
e
);
this
.
getCategoryList
(
e
);
this
.
setState
({
storedis
});
this
.
props
.
form
.
setFieldsValue
({
this
.
props
.
form
.
setFieldsValue
({
mainCategoryId
:
''
,
mainCategoryId
:
''
,
});
});
...
@@ -338,7 +341,14 @@ class BusinessInfo extends Component {
...
@@ -338,7 +341,14 @@ class BusinessInfo extends Component {
const
{
const
{
form
:
{
getFieldDecorator
},
form
:
{
getFieldDecorator
},
}
=
this
.
props
;
}
=
this
.
props
;
const
{
businessInfo
,
type
,
checkboxDisabled
,
mainCategoryId
,
companyNamedis
}
=
this
.
state
;
const
{
businessInfo
,
type
,
checkboxDisabled
,
mainCategoryId
,
companyNamedis
,
storedis
,
}
=
this
.
state
;
return
(
return
(
<
div
className=
{
styles
.
infoBox
}
>
<
div
className=
{
styles
.
infoBox
}
>
<
Form
className=
"login-form"
onSubmit=
{
this
.
handleSubmit
}
{
...
formItemLayout
}
>
<
Form
className=
"login-form"
onSubmit=
{
this
.
handleSubmit
}
{
...
formItemLayout
}
>
...
@@ -417,6 +427,8 @@ class BusinessInfo extends Component {
...
@@ -417,6 +427,8 @@ class BusinessInfo extends Component {
})(<
Input
/>)
}
})(<
Input
/>)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
{
+
mainCategoryId
!==
carID
&&
(
<>
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
>
<
FormItem
label=
"客服电话"
labelCol=
{
{
span
:
5
}
}
>
<
FormItem
label=
"客服电话"
labelCol=
{
{
span
:
5
}
}
>
{
getFieldDecorator
(
'
servicePhone
'
,
{
{
getFieldDecorator
(
'
servicePhone
'
,
{
...
@@ -433,6 +445,8 @@ class BusinessInfo extends Component {
...
@@ -433,6 +445,8 @@ class BusinessInfo extends Component {
})(<
Checkbox
.
Group
options=
{
signDateTypeList
}
/>)
}
})(<
Checkbox
.
Group
options=
{
signDateTypeList
}
/>)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
</>
)
}
</
Row
>
</
Row
>
</
Card
>
</
Card
>
<
Card
title=
"店铺营业信息"
>
<
Card
title=
"店铺营业信息"
>
...
@@ -451,7 +465,8 @@ class BusinessInfo extends Component {
...
@@ -451,7 +465,8 @@ class BusinessInfo extends Component {
)
}
)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
{
+
mainCategoryId
!==
carID
&&
(
<>
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
FormItem
label=
"服务设施"
labelCol=
{
{
span
:
4
}
}
>
<
FormItem
label=
"服务设施"
labelCol=
{
{
span
:
4
}
}
>
{
getFieldDecorator
(
'
selfList
'
,
{
{
getFieldDecorator
(
'
selfList
'
,
{
...
@@ -474,6 +489,8 @@ class BusinessInfo extends Component {
...
@@ -474,6 +489,8 @@ class BusinessInfo extends Component {
})(
renderServiceTags
.
call
(
this
))
}
})(
renderServiceTags
.
call
(
this
))
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
</>
)
}
</
Card
>
</
Card
>
<
Card
title=
"证照信息录入区"
>
<
Card
title=
"证照信息录入区"
>
<
Row
gutter=
{
24
}
>
<
Row
gutter=
{
24
}
>
...
@@ -500,6 +517,7 @@ class BusinessInfo extends Component {
...
@@ -500,6 +517,7 @@ class BusinessInfo extends Component {
)
}
)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
{
+
mainCategoryId
!==
carID
&&
(
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
FormItem
label=
"企业类型"
labelCol=
{
{
span
:
4
}
}
>
<
FormItem
label=
"企业类型"
labelCol=
{
{
span
:
4
}
}
>
{
getFieldDecorator
(
'
companyType
'
,
{
{
getFieldDecorator
(
'
companyType
'
,
{
...
@@ -514,6 +532,8 @@ class BusinessInfo extends Component {
...
@@ -514,6 +532,8 @@ class BusinessInfo extends Component {
)
}
)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
)
}
<
Col
span=
{
24
}
className=
{
styles
.
imgList
}
>
<
Col
span=
{
24
}
className=
{
styles
.
imgList
}
>
<
FormItem
label=
"营业执照"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
wrapperCol
}
>
<
FormItem
label=
"营业执照"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
wrapperCol
}
>
{
getFieldDecorator
(
'
businessLicenseImage
'
,
{
{
getFieldDecorator
(
'
businessLicenseImage
'
,
{
...
@@ -533,6 +553,8 @@ class BusinessInfo extends Component {
...
@@ -533,6 +553,8 @@ class BusinessInfo extends Component {
)
}
)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
{
+
mainCategoryId
!==
carID
&&
(
<>
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
>
<
Row
>
<
Row
>
<
Col
span=
{
4
}
style=
{
{
marginTop
:
'
4px
'
}
}
>
<
Col
span=
{
4
}
style=
{
{
marginTop
:
'
4px
'
}
}
>
...
@@ -558,10 +580,16 @@ class BusinessInfo extends Component {
...
@@ -558,10 +580,16 @@ class BusinessInfo extends Component {
})(<
Input
maxLength=
{
32
}
/>)
}
})(<
Input
maxLength=
{
32
}
/>)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
{
(
!
companyNamedis
&&
businessInfo
.
companyType
&&
businessInfo
.
companyType
!==
2
)
||
{
(
!
companyNamedis
&&
businessInfo
.
companyType
&&
businessInfo
.
companyType
!==
2
)
||
(
!
companyNamedis
&&
businessInfo
?.
icbProofImage
?.
length
)
?
(
(
!
companyNamedis
&&
businessInfo
?.
icbProofImage
?.
length
)
?
(
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
>
<
FormItem
label=
"工商局变更证明"
labelCol=
{
{
span
:
8
}
}
wrapperCol=
{
wrapperCol
}
>
<
FormItem
label=
"工商局变更证明"
labelCol=
{
{
span
:
8
}
}
wrapperCol=
{
wrapperCol
}
>
{
getFieldDecorator
(
'
icbProofImage
'
,
{
{
getFieldDecorator
(
'
icbProofImage
'
,
{
rules
:
[{
required
:
true
,
message
:
'
请上传工商局变更证明!
'
}],
rules
:
[{
required
:
true
,
message
:
'
请上传工商局变更证明!
'
}],
initialValue
:
businessInfo
.
icbProofImage
,
initialValue
:
businessInfo
.
icbProofImage
,
...
@@ -581,7 +609,9 @@ class BusinessInfo extends Component {
...
@@ -581,7 +609,9 @@ class BusinessInfo extends Component {
)
:
(
)
:
(
''
''
)
}
)
}
{
(
!
companyNamedis
&&
businessInfo
.
companyType
&&
businessInfo
.
companyType
===
2
)
||
{
(
!
companyNamedis
&&
businessInfo
.
companyType
&&
businessInfo
.
companyType
===
2
)
||
(
!
companyNamedis
&&
businessInfo
?.
householdRegisterImage
?.
length
)
?
(
(
!
companyNamedis
&&
businessInfo
?.
householdRegisterImage
?.
length
)
?
(
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
>
<
FormItem
label=
"户口本本人页"
labelCol=
{
{
span
:
8
}
}
wrapperCol=
{
wrapperCol
}
>
<
FormItem
label=
"户口本本人页"
labelCol=
{
{
span
:
8
}
}
wrapperCol=
{
wrapperCol
}
>
...
@@ -650,7 +680,9 @@ class BusinessInfo extends Component {
...
@@ -650,7 +680,9 @@ class BusinessInfo extends Component {
)
}
)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
{
+
mainCategoryId
===
301008
&&
(
</>
)
}
{
(
+
mainCategoryId
===
carID
||
storedis
)
&&
(
<>
<>
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
FormItem
label=
"授权品牌"
labelCol=
{
{
span
:
4
}
}
>
<
FormItem
label=
"授权品牌"
labelCol=
{
{
span
:
4
}
}
>
...
@@ -686,8 +718,14 @@ class BusinessInfo extends Component {
...
@@ -686,8 +718,14 @@ class BusinessInfo extends Component {
</
Card
>
</
Card
>
<
Card
title=
"法人信息录入区"
>
<
Card
title=
"法人信息录入区"
>
<
Row
gutter=
{
24
}
>
<
Row
gutter=
{
24
}
>
{
+
mainCategoryId
!==
carID
&&
(
<>
<
Col
span=
{
12
}
className=
{
styles
.
imgList
}
>
<
Col
span=
{
12
}
className=
{
styles
.
imgList
}
>
<
FormItem
label=
"法人身份证人像面"
labelCol=
{
{
span
:
8
}
}
wrapperCol=
{
wrapperCol
}
>
<
FormItem
label=
"法人身份证人像面"
labelCol=
{
{
span
:
8
}
}
wrapperCol=
{
wrapperCol
}
>
{
getFieldDecorator
(
'
idCardPortraitImage
'
,
{
{
getFieldDecorator
(
'
idCardPortraitImage
'
,
{
rules
:
[{
required
:
true
,
message
:
'
请上传身份证人像面!
'
}],
rules
:
[{
required
:
true
,
message
:
'
请上传身份证人像面!
'
}],
initialValue
:
businessInfo
.
idCardPortraitImage
,
initialValue
:
businessInfo
.
idCardPortraitImage
,
...
@@ -707,7 +745,11 @@ class BusinessInfo extends Component {
...
@@ -707,7 +745,11 @@ class BusinessInfo extends Component {
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
<
Col
span=
{
12
}
className=
{
styles
.
imgList
}
>
<
Col
span=
{
12
}
className=
{
styles
.
imgList
}
>
<
FormItem
label=
"法人身份证国徽面"
labelCol=
{
{
span
:
8
}
}
wrapperCol=
{
wrapperCol
}
>
<
FormItem
label=
"法人身份证国徽面"
labelCol=
{
{
span
:
8
}
}
wrapperCol=
{
wrapperCol
}
>
{
getFieldDecorator
(
'
idCardEmblemImage
'
,
{
{
getFieldDecorator
(
'
idCardEmblemImage
'
,
{
rules
:
[{
required
:
true
,
message
:
'
请上传身份证国徽面!
'
}],
rules
:
[{
required
:
true
,
message
:
'
请上传身份证国徽面!
'
}],
initialValue
:
businessInfo
.
idCardEmblemImage
,
initialValue
:
businessInfo
.
idCardEmblemImage
,
...
@@ -779,6 +821,8 @@ class BusinessInfo extends Component {
...
@@ -779,6 +821,8 @@ class BusinessInfo extends Component {
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</
Col
>
</
Col
>
</>
)
}
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
>
<
FormItem
label=
"手机号"
labelCol=
{
{
span
:
8
}
}
>
<
FormItem
label=
"手机号"
labelCol=
{
{
span
:
8
}
}
>
{
getFieldDecorator
(
'
legalPersonPhone
'
,
{
{
getFieldDecorator
(
'
legalPersonPhone
'
,
{
...
@@ -790,6 +834,7 @@ class BusinessInfo extends Component {
...
@@ -790,6 +834,7 @@ class BusinessInfo extends Component {
})(<
Input
maxLength=
{
11
}
/>)
}
})(<
Input
maxLength=
{
11
}
/>)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
{
+
mainCategoryId
!==
carID
&&
(
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
FormItem
label=
"其它证照"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
wrapperCol
}
>
<
FormItem
label=
"其它证照"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
wrapperCol
}
>
{
getFieldDecorator
(
'
otherImage
'
,
{
{
getFieldDecorator
(
'
otherImage
'
,
{
...
@@ -804,9 +849,12 @@ class BusinessInfo extends Component {
...
@@ -804,9 +849,12 @@ class BusinessInfo extends Component {
)
}
)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
)
}
</
Row
>
</
Row
>
</
Card
>
</
Card
>
<
Card
title=
"结算信息录入区"
>
<
Card
title=
"结算信息录入区"
>
{
+
mainCategoryId
!==
carID
&&
(
<>
<
Row
gutter=
{
24
}
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
FormItem
label=
"账户类型"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
wrapperCol
}
>
<
FormItem
label=
"账户类型"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
wrapperCol
}
>
...
@@ -972,9 +1020,69 @@ class BusinessInfo extends Component {
...
@@ -972,9 +1020,69 @@ class BusinessInfo extends Component {
</
Col
>
</
Col
>
</
Row
>
</
Row
>
)
}
)
}
</>
)
}
{
+
mainCategoryId
===
carID
&&
(
<
Row
gutter=
{
24
}
>
<
Col
span=
{
12
}
>
<
FormItem
label=
"开户许可证"
labelCol=
{
{
span
:
8
}
}
wrapperCol=
{
wrapperCol
}
>
{
getFieldDecorator
(
'
accountOpenPermitImage
'
,
{
rules
:
[{
required
:
true
,
message
:
'
请上传开户许可证!
'
}],
initialValue
:
businessInfo
.
accountOpenPermitImage
,
})(
<
Upload
{
...
uploadPropsFn
.
call
(
this
,
{
keyName
:
'
accountOpenPermitImage
',
type
:
8,
})}
fileList=
{
businessInfo
.
accountOpenPermitImage
}
>
<
UploadOutlined
/>
上传文件
</
Upload
>,
)
}
</
FormItem
>
</
Col
>
<
Col
span=
{
12
}
>
<
FormItem
label=
"开户名称"
labelCol=
{
{
span
:
8
}
}
>
{
getFieldDecorator
(
'
bankAccountName
'
,
{
rules
:
[{
required
:
true
,
message
:
'
请输入开户名称!
'
}],
initialValue
:
businessInfo
.
bankAccountName
,
})(<
Input
maxLength=
{
32
}
/>)
}
</
FormItem
>
</
Col
>
<
Col
span=
{
12
}
>
<
FormItem
label=
"开户行"
labelCol=
{
{
span
:
8
}
}
>
{
getFieldDecorator
(
'
accountBankName
'
,
{
rules
:
[{
required
:
true
,
message
:
'
请选择开户行!
'
}],
initialValue
:
businessInfo
.
accountBankName
,
})(
<
Select
showSearch
filterOption=
{
(
input
,
option
)
=>
(
option
?.
value
??
''
).
toLowerCase
().
includes
(
input
.
toLowerCase
())
}
>
{
this
.
state
.
bankList
.
map
(
item
=>
(
<
Option
value=
{
item
.
bankName
}
key=
{
item
.
bankName
}
>
{
item
.
bankName
}
</
Option
>
))
}
</
Select
>,
)
}
</
FormItem
>
</
Col
>
<
Col
span=
{
12
}
>
<
FormItem
label=
"银行帐号"
labelCol=
{
{
span
:
8
}
}
>
{
getFieldDecorator
(
'
bankAccount
'
,
{
rules
:
[{
required
:
true
,
message
:
'
请输入银行帐号!
'
}],
initialValue
:
businessInfo
.
bankAccount
,
})(<
Input
maxLength=
{
20
}
/>)
}
</
FormItem
>
</
Col
>
</
Row
>
)
}
</
Card
>
</
Card
>
{
/* 汽车301008 */
}
{
(
+
mainCategoryId
===
carID
||
storedis
)
&&
(
{
+
mainCategoryId
===
301008
?
(
<
Card
title=
"其他信息"
>
<
Card
title=
"其他信息"
>
<
Row
gutter=
{
24
}
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
...
@@ -987,8 +1095,6 @@ class BusinessInfo extends Component {
...
@@ -987,8 +1095,6 @@ class BusinessInfo extends Component {
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</
Card
>
</
Card
>
)
:
(
''
)
}
)
}
<
div
className=
{
styles
.
formBtns
}
>
<
div
className=
{
styles
.
formBtns
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment