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
4ffa6725
Commit
4ffa6725
authored
Apr 03, 2023
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 业务类型判断
parent
b9cb10e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
37 deletions
+68
-37
data.js
src/pages/businessManage/info/data.js
+1
-0
index.jsx
src/pages/businessManage/info/index.jsx
+65
-35
index.jsx
src/pages/contractView/index.jsx
+2
-2
No files found.
src/pages/businessManage/info/data.js
View file @
4ffa6725
...
...
@@ -119,6 +119,7 @@ export async function getInfo() {
companyNamedis
,
categoryList
,
mainCategoryId
:
res
.
mainCategoryId
,
companyType
:
res
.
companyType
,
});
}
...
...
src/pages/businessManage/info/index.jsx
View file @
4ffa6725
...
...
@@ -82,6 +82,7 @@ class BusinessInfo extends Component {
checkboxDisabled
:
false
,
mainCategoryId
:
null
,
companyNamedis
:
false
,
// 公司名称
companyType
:
null
,
// 企业类型
};
async
componentDidMount
()
{
...
...
@@ -135,10 +136,28 @@ class BusinessInfo extends Component {
// 帐号类型切换
onChangeSettlType
(
e
)
{
this
.
setState
({
settlementType
:
e
.
target
.
value
,
settlementType
:
e
,
});
}
// 切换企业类型
onChangeCompanyType
=
e
=>
{
const
{
value
}
=
e
.
target
;
this
.
setState
({
companyType
:
value
,
});
let
type
=
null
;
if
([
1
,
3
].
includes
(
value
))
{
type
=
1
;
}
else
{
type
=
2
;
}
this
.
onChangeSettlType
(
type
);
this
.
props
.
form
.
setFieldsValue
({
settlementType
:
type
,
});
};
// 处理图片
dealImgInfo
=
async
(
type
,
url
)
=>
{
const
imgType
=
{
...
...
@@ -274,14 +293,11 @@ class BusinessInfo extends Component {
obj
.
socialCode
=
obj
.
socialCode
?.
toLocaleUpperCase
()
||
''
;
obj
.
id
=
this
.
state
.
id
;
obj
.
headImage
=
obj
.
primaryImage
;
// this.setState({
// loading: true,
// });
console
.
log
(
'
obj :>>提交
'
,
obj
);
this
.
setState
({
loading
:
true
,
});
const
data
=
await
apiEditStoreInfo
(
obj
);
console
.
log
(
data
,
'
.........
'
);
if
(
data
.
businessCode
===
'
0000
'
)
{
// const msg = this.state.type === infoTypeChecked ? '审核完成' : '保存成功';
notification
.
success
({
message
:
`
${
data
.
msg
}
!~`
});
}
this
.
setState
({
...
...
@@ -347,7 +363,14 @@ class BusinessInfo extends Component {
const
{
form
:
{
getFieldDecorator
},
}
=
this
.
props
;
const
{
businessInfo
,
type
,
checkboxDisabled
,
mainCategoryId
,
companyNamedis
}
=
this
.
state
;
const
{
businessInfo
,
type
,
checkboxDisabled
,
mainCategoryId
,
companyNamedis
,
companyType
,
}
=
this
.
state
;
return
(
<
div
className=
{
styles
.
infoBox
}
>
<
Form
className=
"login-form"
onSubmit=
{
this
.
handleSubmit
}
{
...
formItemLayout
}
>
...
...
@@ -367,6 +390,29 @@ class BusinessInfo extends Component {
)
}
</
FormItem
>
</
Col
>
<
Col
span=
{
24
}
>
<
FormItem
label=
"主营类目"
labelCol=
{
{
span
:
4
}
}
>
{
getFieldDecorator
(
'
mainCategoryId
'
,
{
rules
:
[{
required
:
true
,
message
:
'
请选择主营类目!
'
}],
initialValue
:
businessInfo
.
mainCategoryId
,
})(
<
Select
onChange=
{
e
=>
this
.
onMainCategory
(
e
)
}
showSearch
filterOption=
{
(
input
,
option
)
=>
option
.
props
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
}
disabled=
{
+
businessInfo
.
mainCategoryId
===
301008
}
>
{
this
.
state
.
categoryList
.
map
(
item
=>
(
<
Option
value=
{
item
.
id
}
key=
{
item
.
id
}
>
{
item
.
name
}
</
Option
>
))
}
</
Select
>,
)
}
</
FormItem
>
</
Col
>
<
Col
span=
{
24
}
>
<
FormItem
label=
"商户名称"
labelCol=
{
{
span
:
4
}
}
>
{
getFieldDecorator
(
'
name
'
,
{
...
...
@@ -494,29 +540,6 @@ class BusinessInfo extends Component {
</
Card
>
<
Card
title=
"证照信息录入区"
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
24
}
>
<
FormItem
label=
"主营类目"
labelCol=
{
{
span
:
4
}
}
>
{
getFieldDecorator
(
'
mainCategoryId
'
,
{
rules
:
[{
required
:
true
,
message
:
'
请选择主营类目!
'
}],
initialValue
:
businessInfo
.
mainCategoryId
,
})(
<
Select
onChange=
{
e
=>
this
.
onMainCategory
(
e
)
}
showSearch
filterOption=
{
(
input
,
option
)
=>
option
.
props
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
}
disabled=
{
+
businessInfo
.
mainCategoryId
===
301008
}
>
{
this
.
state
.
categoryList
.
map
(
item
=>
(
<
Option
value=
{
item
.
id
}
key=
{
item
.
id
}
>
{
item
.
name
}
</
Option
>
))
}
</
Select
>,
)
}
</
FormItem
>
</
Col
>
{
+
mainCategoryId
!==
carID
&&
(
<
Col
span=
{
24
}
>
<
FormItem
label=
"企业类型"
labelCol=
{
{
span
:
4
}
}
>
...
...
@@ -524,7 +547,10 @@ class BusinessInfo extends Component {
rules
:
[{
required
:
true
,
message
:
'
请选择企业类型!
'
}],
initialValue
:
businessInfo
.
companyType
,
})(
<
Radio
.
Group
disabled=
{
businessInfo
.
companyType
}
>
<
Radio
.
Group
onChange=
{
this
.
onChangeCompanyType
}
disabled=
{
businessInfo
.
companyType
}
>
<
Radio
value=
{
1
}
>
一般纳税人
</
Radio
>
<
Radio
value=
{
2
}
>
小规模
</
Radio
>
<
Radio
value=
{
3
}
>
个体工商
</
Radio
>
...
...
@@ -862,9 +888,13 @@ class BusinessInfo extends Component {
rules
:
[{
required
:
true
,
message
:
'
请选择账户类型!
'
}],
initialValue
:
businessInfo
.
settlementType
,
})(
<
Radio
.
Group
onChange=
{
e
=>
this
.
onChangeSettlType
(
e
)
}
>
<
Radio
value=
{
1
}
>
对公
</
Radio
>
<
Radio
value=
{
2
}
>
对私(小微商户)
</
Radio
>
<
Radio
.
Group
onChange=
{
e
=>
this
.
onChangeSettlType
(
e
?.
target
?.
value
)
}
>
<
Radio
value=
{
1
}
disabled=
{
[
2
].
includes
(
companyType
)
}
>
对公
</
Radio
>
<
Radio
value=
{
2
}
disabled=
{
[
1
,
3
].
includes
(
companyType
)
}
>
对私(小微商户)
</
Radio
>
</
Radio
.
Group
>,
)
}
</
FormItem
>
...
...
src/pages/contractView/index.jsx
View file @
4ffa6725
...
...
@@ -39,9 +39,9 @@ const ContractView = () => {
align
:
'
center
'
,
hideInSearch
:
true
,
render
:
(
val
,
data
)
=>
{
if
(
val
?
.
length
)
{
if
(
data
.
signDate
&&
data
?.
signDate
.
length
)
{
let
date
=
''
;
val
.
forEach
((
item
,
index
)
=>
{
data
.
signDate
.
forEach
((
item
,
index
)
=>
{
if
(
item
&&
item
.
toString
().
length
===
1
)
{
item
=
`0
${
item
}
`
;
}
...
...
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