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
f8ea63e3
Commit
f8ea63e3
authored
Apr 07, 2023
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:图片资质
parent
0516fdb8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
16 deletions
+37
-16
data.js
src/pages/businessManage/info/data.js
+5
-2
index.jsx
src/pages/businessManage/info/index.jsx
+7
-2
storeModal.jsx
src/pages/chainStoreManage/components/storeModal.jsx
+18
-4
data.js
src/pages/chainStoreManage/data.js
+0
-7
index.jsx
src/pages/chainStoreManage/index.jsx
+7
-1
No files found.
src/pages/businessManage/info/data.js
View file @
f8ea63e3
...
@@ -77,8 +77,11 @@ export async function getInfo() {
...
@@ -77,8 +77,11 @@ export async function getInfo() {
:
[];
:
[];
// 工商局
// 工商局
res
.
icbProofImage
=
res
.
icbProofImage
?
[{
uid
:
0
,
url
:
res
.
icbProofImage
}]
:
[];
res
.
icbProofImage
=
res
.
icbProofImage
?
[{
uid
:
0
,
url
:
res
.
icbProofImage
}]
:
[];
if
(
res
.
categoryQualificateImage
)
{
if
(
res
.
categoryQualificateImage
&&
res
.
categoryQualificateImage
.
length
)
{
res
.
categoryQualificateImage
=
[{
uid
:
0
,
url
:
res
.
categoryQualificateImage
}];
res
.
categoryQualificateImage
=
res
.
categoryQualificateImage
.
map
((
item
,
index
)
=>
({
uid
:
index
,
url
:
item
,
}));
}
}
if
(
res
.
otherImage
&&
res
.
otherImage
.
length
)
{
if
(
res
.
otherImage
&&
res
.
otherImage
.
length
)
{
res
.
otherImage
=
res
.
otherImage
.
map
((
item
,
index
)
=>
({
res
.
otherImage
=
res
.
otherImage
.
map
((
item
,
index
)
=>
({
...
...
src/pages/businessManage/info/index.jsx
View file @
f8ea63e3
...
@@ -259,7 +259,6 @@ class BusinessInfo extends Component {
...
@@ -259,7 +259,6 @@ class BusinessInfo extends Component {
}
}
});
});
}
}
obj
.
businessLicenseImage
=
obj
.
businessLicenseImage
=
(
imgs
?.
businessLicenseImage
?.
length
&&
imgs
?.
businessLicenseImage
[
0
].
url
)
||
''
;
(
imgs
?.
businessLicenseImage
?.
length
&&
imgs
?.
businessLicenseImage
[
0
].
url
)
||
''
;
obj
.
idCardEmblemImage
=
obj
.
idCardEmblemImage
=
...
@@ -287,10 +286,15 @@ class BusinessInfo extends Component {
...
@@ -287,10 +286,15 @@ class BusinessInfo extends Component {
delete
obj
.
otherImage
;
delete
obj
.
otherImage
;
}
}
if
(
imgs
.
categoryQualificateImage
&&
imgs
.
categoryQualificateImage
.
length
)
{
if
(
imgs
.
categoryQualificateImage
&&
imgs
.
categoryQualificateImage
.
length
)
{
obj
.
categoryQualificateImage
=
imgs
.
categoryQualificateImage
[
0
].
url
;
const
list
=
[];
imgs
.
categoryQualificateImage
.
forEach
(
item
=>
{
list
.
push
(
item
.
url
);
});
obj
.
categoryQualificateImage
=
list
;
}
else
{
}
else
{
delete
obj
.
categoryQualificateImage
;
delete
obj
.
categoryQualificateImage
;
}
}
console
.
log
(
obj
.
categoryQualificateImage
);
obj
.
legalPersonIdCard
=
obj
.
legalPersonIdCard
?.
toLocaleUpperCase
()
||
''
;
obj
.
legalPersonIdCard
=
obj
.
legalPersonIdCard
?.
toLocaleUpperCase
()
||
''
;
obj
.
bankAccountLicenseNum
=
obj
.
bankAccountLicenseNum
?.
toLocaleUpperCase
()
||
''
;
obj
.
bankAccountLicenseNum
=
obj
.
bankAccountLicenseNum
?.
toLocaleUpperCase
()
||
''
;
obj
.
socialCode
=
obj
.
socialCode
?.
toLocaleUpperCase
()
||
''
;
obj
.
socialCode
=
obj
.
socialCode
?.
toLocaleUpperCase
()
||
''
;
...
@@ -680,6 +684,7 @@ class BusinessInfo extends Component {
...
@@ -680,6 +684,7 @@ class BusinessInfo extends Component {
{
...
uploadPropsFn
.
call
(
this
,
{
{
...
uploadPropsFn
.
call
(
this
,
{
keyName
:
'
categoryQualificateImage
',
keyName
:
'
categoryQualificateImage
',
type
:
6,
type
:
6,
limit
:
9,
})}
})}
fileList=
{
businessInfo
.
categoryQualificateImage
}
fileList=
{
businessInfo
.
categoryQualificateImage
}
>
>
...
...
src/pages/chainStoreManage/components/storeModal.jsx
View file @
f8ea63e3
...
@@ -4,7 +4,7 @@ import moment from 'moment';
...
@@ -4,7 +4,7 @@ import moment from 'moment';
import
{
PlusSquareFilled
,
MinusSquareFilled
}
from
'
@ant-design/icons
'
;
import
{
PlusSquareFilled
,
MinusSquareFilled
}
from
'
@ant-design/icons
'
;
import
{
Modal
,
Input
,
TimePicker
,
Checkbox
,
Cascader
,
Radio
,
notification
,
Button
}
from
'
antd
'
;
import
{
Modal
,
Input
,
TimePicker
,
Checkbox
,
Cascader
,
Radio
,
notification
,
Button
}
from
'
antd
'
;
import
{
apiAddrArea
,
apiCreatStore
,
apiEditStore
}
from
'
../services
'
;
import
{
apiAddrArea
,
apiCreatStore
,
apiEditStore
}
from
'
../services
'
;
import
{
weekOptions
,
weekDefault
,
layout
,
businessModel
}
from
'
../data
'
;
import
{
weekOptions
,
weekDefault
,
layout
}
from
'
../data
'
;
import
MapModal
from
'
@/components/GaoDeMap
'
;
import
MapModal
from
'
@/components/GaoDeMap
'
;
import
style
from
'
./style.less
'
;
import
style
from
'
./style.less
'
;
import
{
isCheckNumberLine
}
from
'
@/utils/validator
'
;
import
{
isCheckNumberLine
}
from
'
@/utils/validator
'
;
...
@@ -31,7 +31,11 @@ const StoreModal = props => {
...
@@ -31,7 +31,11 @@ const StoreModal = props => {
});
});
const
[
disabled
,
setDisabled
]
=
useState
(
false
);
const
[
disabled
,
setDisabled
]
=
useState
(
false
);
const
[
isDisabled
,
setIsDisabled
]
=
useState
(
true
);
const
[
isDisabled
,
setIsDisabled
]
=
useState
(
true
);
const
[
businessModel
,
setBusinessModel
]
=
useState
([
{
label
:
'
到家外卖业务(外卖配送业务)
'
,
value
:
1
},
{
label
:
'
实物商品业务员
'
,
value
:
2
},
{
label
:
'
到店业务(服务类业务)
'
,
value
:
3
},
]);
const
divDom
=
useRef
();
const
divDom
=
useRef
();
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -40,8 +44,17 @@ const StoreModal = props => {
...
@@ -40,8 +44,17 @@ const StoreModal = props => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
props
.
productBusiness
.
length
)
{
if
(
props
.
productBusiness
.
length
)
{
businessModel
.
forEach
(
item
=>
{
if
(
!
props
.
productBusiness
.
includes
(
item
.
value
))
{
item
.
disabled
=
true
;
}
if
(
props
.
existTakewayShop
&&
item
.
value
===
1
)
{
item
.
disabled
=
true
;
}
});
const
val
=
props
.
productBusiness
.
includes
(
2
)
||
props
.
productBusiness
.
includes
(
3
);
const
val
=
props
.
productBusiness
.
includes
(
2
)
||
props
.
productBusiness
.
includes
(
3
);
setIsDisabled
(
val
);
setIsDisabled
(
val
);
setBusinessModel
(
businessModel
);
}
}
},
[
props
.
productBusiness
]);
},
[
props
.
productBusiness
]);
...
@@ -237,7 +250,7 @@ const StoreModal = props => {
...
@@ -237,7 +250,7 @@ const StoreModal = props => {
}
}
info
.
lnglat
=
`
${
info
.
longitude
}
,
${
info
.
latitude
}
`
;
info
.
lnglat
=
`
${
info
.
longitude
}
,
${
info
.
latitude
}
`
;
info
.
addr
=
[
info
.
provinceId
,
info
.
cityId
,
info
.
countyId
];
info
.
addr
=
[
info
.
provinceId
,
info
.
cityId
,
info
.
countyId
];
info
.
shopHeadImage
=
[
info
.
shopHeadImage
]
||
[];
info
.
shopHeadImage
=
(
info
.
shopHeadImage
&&
[
info
.
shopHeadImage
])
||
[];
if
(
info
.
townId
)
{
if
(
info
.
townId
)
{
info
.
addr
.
push
(
info
.
townId
);
info
.
addr
.
push
(
info
.
townId
);
}
}
...
@@ -278,8 +291,9 @@ const StoreModal = props => {
...
@@ -278,8 +291,9 @@ const StoreModal = props => {
<
Form
{
...
layout
}
name=
"formData"
>
<
Form
{
...
layout
}
name=
"formData"
>
<
FormItem
label=
"业务模式"
>
<
FormItem
label=
"业务模式"
>
{
getFieldDecorator
(
'
productBusiness
'
,
{
{
getFieldDecorator
(
'
productBusiness
'
,
{
rules
:
[{
required
:
true
,
message
:
'
请选择业务模式
'
}],
initialValue
:
productBusiness
,
initialValue
:
productBusiness
,
})(<
Checkbox
.
Group
disabled
options=
{
businessModel
}
/>)
}
})(<
Checkbox
.
Group
disabled
=
{
disabled
}
options=
{
businessModel
}
/>)
}
</
FormItem
>
</
FormItem
>
{
isDisabled
&&
(
{
isDisabled
&&
(
<
FormItem
label=
"门店头像"
>
<
FormItem
label=
"门店头像"
>
...
...
src/pages/chainStoreManage/data.js
View file @
f8ea63e3
...
@@ -18,13 +18,6 @@ export const layout = {
...
@@ -18,13 +18,6 @@ export const layout = {
wrapperCol
:
{
span
:
16
},
wrapperCol
:
{
span
:
16
},
};
};
// 业务模式
export
const
businessModel
=
[
{
label
:
'
到家外卖业务(外卖配送业务)
'
,
value
:
1
},
{
label
:
'
实物商品业务员
'
,
value
:
2
},
{
label
:
'
到店业务(服务类业务)
'
,
value
:
3
},
];
export
const
businessList
=
[
export
const
businessList
=
[
{
label
:
'
外卖
'
,
value
:
1
},
{
label
:
'
外卖
'
,
value
:
1
},
{
label
:
'
实物类
'
,
value
:
2
},
{
label
:
'
实物类
'
,
value
:
2
},
...
...
src/pages/chainStoreManage/index.jsx
View file @
f8ea63e3
...
@@ -31,12 +31,17 @@ export default () => {
...
@@ -31,12 +31,17 @@ export default () => {
const
[
totalNum
,
setTotalNum
]
=
useState
(
0
);
const
[
totalNum
,
setTotalNum
]
=
useState
(
0
);
const
[
pageSize
,
setPageSize
]
=
useState
(
20
);
const
[
pageSize
,
setPageSize
]
=
useState
(
20
);
const
[
productBusiness
,
setProductBusiness
]
=
useState
([]);
const
[
productBusiness
,
setProductBusiness
]
=
useState
([]);
const
[
existTakewayShop
,
setExistTakewayShop
]
=
useState
(
false
);
const
refSearch
=
useRef
();
const
refSearch
=
useRef
();
const
divDom
=
useRef
();
const
divDom
=
useRef
();
// 获取业务模式
// 获取业务模式
const
getBusiness
=
async
()
=>
{
const
getBusiness
=
async
()
=>
{
const
res
=
await
apiproductBusiness
();
const
res
=
await
apiproductBusiness
();
setProductBusiness
(
res
);
console
.
log
(
res
);
if
(
res
)
{
setProductBusiness
(
res
.
productBusiness
||
[]);
setExistTakewayShop
(
res
.
existTakewayShop
);
}
};
};
const
onCreate
=
()
=>
{
const
onCreate
=
()
=>
{
setStoreInfo
({});
setStoreInfo
({});
...
@@ -351,6 +356,7 @@ export default () => {
...
@@ -351,6 +356,7 @@ export default () => {
formInfo=
{
storeInfo
}
formInfo=
{
storeInfo
}
status=
{
status
}
status=
{
status
}
productBusiness=
{
productBusiness
}
productBusiness=
{
productBusiness
}
existTakewayShop=
{
existTakewayShop
}
/>
/>
</
div
>
</
div
>
);
);
...
...
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