Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f3bf3093
authored
Jun 15, 2023
by
徐忆琳
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'xuyl_dev_v3.12.0' into 'v3.12.0'
修改页面添加校验 See merge request
!98
2 parents
1b1ccc42
24c0a094
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
13 deletions
src/views/account/editAccount.vue
src/views/account/index.vue
src/views/baseInfo/editInfo.vue
src/views/account/editAccount.vue
View file @
f3bf309
...
@@ -315,13 +315,33 @@ export default {
...
@@ -315,13 +315,33 @@ export default {
params
.
businessType
=
params
.
businessType
.
join
(
','
)
params
.
businessType
=
params
.
businessType
.
join
(
','
)
}
}
params
.
merchantBrandMain
=
''
params
.
merchantBrandMain
=
''
// params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',')
// params.merchantBrand = this.$refs.baseInfoForm.$refs.brandTree.getCheckedKeys().join(',')
params
.
isloginName
?
(
params
.
isloginName
=
1
)
:
(
params
.
isloginName
=
0
)
params
.
isloginName
?
(
params
.
isloginName
=
1
)
:
(
params
.
isloginName
=
0
)
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
(
item
=>
item
.
name
)
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
(
item
=>
item
.
name
)
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
','
)
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
','
)
params
.
merchantFiles
=
JSON
.
stringify
(
params
.
merchantFiles
)
params
.
merchantFiles
=
JSON
.
stringify
(
params
.
merchantFiles
)
const
merchantBrandList
=
this
.
$refs
.
baseInfoForm
.
$refs
.
brandListTree
.
getMerchantBrandList
()
const
merchantBrandList
=
this
.
$refs
.
baseInfoForm
.
$refs
.
brandListTree
.
getMerchantBrandList
()
if
(
!
merchantBrandList
?.
length
){
this
.
loading
=
false
this
.
$message
({
message
:
'请选择主营品牌'
,
type
:
'error'
})
return
}
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantBrandList
)
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantBrandList
)
// 判断省市地址填写
if
(
!
params
.
provinceName
||
!
params
.
cityName
||
!
params
.
merchantAddress
){
this
.
loading
=
false
this
.
$message
({
message
:
'请选择省市地址'
,
type
:
'error'
})
return
}
Promise
.
all
([
pm1
,
pm2
]).
then
(()
=>
{
Promise
.
all
([
pm1
,
pm2
]).
then
(()
=>
{
this
.
$apis
.
store
.
updateMerchant
(
params
).
then
(
res
=>
{
this
.
$apis
.
store
.
updateMerchant
(
params
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
...
...
src/views/account/index.vue
View file @
f3bf309
...
@@ -133,6 +133,7 @@ export default {
...
@@ -133,6 +133,7 @@ export default {
}
}
]
]
},
},
buttonList
:
[
buttonList
:
[
{
{
type
:
'GLButton'
,
type
:
'GLButton'
,
...
...
src/views/baseInfo/editInfo.vue
View file @
f3bf309
...
@@ -12,7 +12,13 @@
...
@@ -12,7 +12,13 @@
<div
class=
"information-title"
>
修改企业信息
</div>
<div
class=
"information-title"
>
修改企业信息
</div>
<div
class=
"information-form-box"
>
<div
class=
"information-form-box"
>
<el-form
ref=
"baseForm"
:model=
"infoForm"
class=
"account-body-form"
label-width=
"154px"
:rules=
"baseFormRules"
>
<el-form
ref=
"baseForm"
:model=
"infoForm"
class=
"account-body-form"
label-width=
"154px"
:rules=
"baseFormRules"
>
<Province
ref=
"provinceForm"
:subdistrict=
"subdistrict"
@
selectProvince=
"selectProvince"
@
selectCity=
"selectCity"
@
selectAddressByMap=
"selectAddressByMap"
:detailAddressLabel=
"detailAddressLabel"
></Province>
<div
class=
"province-sty"
>
<span
class=
"province-icon"
>
*
</span>
<Province
ref=
"provinceForm"
:subdistrict=
"subdistrict"
@
selectProvince=
"selectProvince"
@
selectCity=
"selectCity"
@
selectAddressByMap=
"selectAddressByMap"
:detailAddressLabel=
"detailAddressLabel"
></Province>
</div>
<!--
<el-form-item
size=
"small"
label=
"商户地址:"
class=
"map-row"
>
<!--
<el-form-item
size=
"small"
label=
"商户地址:"
class=
"map-row"
>
<Province
ref=
"provinceForm"
:subdistrict=
"subdistrict"
@
selectProvince=
"selectProvince"
@
selectCity=
"selectCity"
></Province>
<Province
ref=
"provinceForm"
:subdistrict=
"subdistrict"
@
selectProvince=
"selectProvince"
@
selectCity=
"selectCity"
></Province>
<el-input
class=
"input-width"
v-model=
"infoForm.merchantAddress"
placeholder=
"请选择商户地址"
readonly=
"readonly"
></el-input>
<el-input
class=
"input-width"
v-model=
"infoForm.merchantAddress"
placeholder=
"请选择商户地址"
readonly=
"readonly"
></el-input>
...
@@ -20,17 +26,26 @@
...
@@ -20,17 +26,26 @@
</el-form-item>
-->
</el-form-item>
-->
<el-form-item
size=
"small"
label=
"经营业务类型:"
class=
"bussiness-type"
>
<el-form-item
size=
"small"
label=
"经营业务类型:"
class=
"bussiness-type"
>
<el-checkbox-group
v-model=
"infoForm.businessType"
>
<el-checkbox-group
v-model=
"infoForm.businessType"
>
<el-checkbox
:label=
"item.dictValue"
v-for=
"item in businessType"
:key=
"item.dictValue"
:disabled=
"item.dictValue
<
= 6">
{{
item
.
dictLabel
}}
</el-checkbox>
<el-checkbox
:label=
"item.dictValue"
v-for=
"item in businessType"
:key=
"item.dictValue"
:disabled=
"item.dictValue
<
= 6">
{{
item
.
dictLabel
}}
</el-checkbox>
</el-checkbox-group>
</el-checkbox-group>
</el-form-item>
</el-form-item>
<el-form-item
size=
"small"
label=
"营业时间:"
class=
"time-row"
>
<el-form-item
size=
"small"
label=
"营业时间:"
class=
"time-row"
>
<el-time-picker
size=
"small"
value-format=
"HH:mm:ss"
is-range
v-model=
"infoForm.bussinessTime"
range-separator=
"至"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
placeholder=
"选择时间范围"
></el-time-picker>
<el-time-picker
size=
"small"
value-format=
"HH:mm:ss"
is-range
v-model=
"infoForm.bussinessTime"
range-separator=
"至"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
placeholder=
"选择时间范围"
></el-time-picker>
</el-form-item>
</el-form-item>
<el-form-item
size=
"small"
label=
"驻店电话:"
style=
"position: relative"
prop=
"residentPhone"
>
<el-form-item
size=
"small"
label=
"驻店电话:"
style=
"position: relative"
prop=
"residentPhone"
>
<el-input
v-model=
"infoForm.residentPhone"
class=
"phone-input"
maxlength=
"13"
placeholder=
"此电话会在小程序上显示,请填写真实有效的电话或手机号"
></el-input>
<el-input
v-model=
"infoForm.residentPhone"
class=
"phone-input"
maxlength=
"13"
placeholder=
"此电话会在小程序上显示,请填写真实有效的电话或手机号"
></el-input>
<div
@
click=
"showTelDia"
class=
"show-address"
>
显示位置
</div>
<div
@
click=
"showTelDia"
class=
"show-address"
>
显示位置
</div>
</el-form-item>
</el-form-item>
<el-form-item
size=
"small"
label=
"主营品牌:"
style=
"height: 500px"
>
<el-form-item
size=
"small"
style=
"height: 500px"
>
<div
slot=
"label"
>
<span
class=
"province-icon"
>
*
</span>
主营品牌:
</div>
<select-brand
:brandListTree=
"brandListTree"
@
clickBrand=
"clickBrand"
ref=
"brandListTree"
></select-brand>
<select-brand
:brandListTree=
"brandListTree"
@
clickBrand=
"clickBrand"
ref=
"brandListTree"
></select-brand>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -61,6 +76,7 @@ import util from '@/utils/util'
...
@@ -61,6 +76,7 @@ import util from '@/utils/util'
import
SelectBrand
from
'./selectBrand.vue'
import
SelectBrand
from
'./selectBrand.vue'
import
TelPosition
from
'./telPosition.vue'
import
TelPosition
from
'./telPosition.vue'
import
Province
from
'@/components/province-city/index.vue'
import
Province
from
'@/components/province-city/index.vue'
export
default
{
export
default
{
name
:
'EditInfo'
,
name
:
'EditInfo'
,
components
:
{
components
:
{
...
@@ -103,7 +119,7 @@ export default {
...
@@ -103,7 +119,7 @@ export default {
brandListTree
:
[],
brandListTree
:
[],
isFirstBrand
:
false
,
isFirstBrand
:
false
,
baseFormRules
:
{
baseFormRules
:
{
residentPhone
:
[{
validator
:
validatePhoneTwo
,
trigger
:
'blur'
}]
residentPhone
:
[{
validator
:
validatePhoneTwo
,
trigger
:
'blur'
}]
},
},
addressData
:
{}
addressData
:
{}
}
}
...
@@ -130,9 +146,28 @@ export default {
...
@@ -130,9 +146,28 @@ export default {
})
})
},
},
async
getUserInfo
()
{
async
getUserInfo
()
{
this
.
businessType
=
await
this
.
$apis
.
store
.
findAllDictData
({
dictType
:
'business_type'
})
this
.
businessType
=
await
this
.
$apis
.
store
.
findAllDictData
({
dictType
:
'business_type'
})
const
infoForm
=
await
this
.
$apis
.
store
.
findMerchantBaseInfo
({
merchantId
:
this
.
$globalState
.
session
.
merchantId
})
const
infoForm
=
await
this
.
$apis
.
store
.
findMerchantBaseInfo
({
merchantId
:
this
.
$globalState
.
session
.
merchantId
})
const
{
merchantAddress
,
provinceName
,
residentPhone
,
cityName
,
provinceCode
,
cityCode
,
lng
,
lat
,
id
,
merchantName
,
businessType
,
bussinessTime
,
bussinessBegintime
,
bussinessEndtime
,
channelId
,
merchantNo
,
merchantBrandMain
,
merchantBrandName
}
=
infoForm
const
{
merchantAddress
,
provinceName
,
residentPhone
,
cityName
,
provinceCode
,
cityCode
,
lng
,
lat
,
id
,
merchantName
,
businessType
,
bussinessTime
,
bussinessBegintime
,
bussinessEndtime
,
channelId
,
merchantNo
,
merchantBrandMain
,
merchantBrandName
}
=
infoForm
this
.
infoForm
=
{
this
.
infoForm
=
{
merchantAddress
,
merchantAddress
,
lng
,
lng
,
...
@@ -265,7 +300,7 @@ export default {
...
@@ -265,7 +300,7 @@ export default {
// 通过地图选择省市和详细地址
// 通过地图选择省市和详细地址
selectAddressByMap
(
val
)
{
selectAddressByMap
(
val
)
{
console
.
log
(
val
)
console
.
log
(
val
)
const
{
provinceName
,
cityName
,
fullAddress
,
lat
,
lng
}
=
val
const
{
provinceName
,
cityName
,
fullAddress
,
lat
,
lng
}
=
val
this
.
infoForm
.
merchantAddress
=
fullAddress
this
.
infoForm
.
merchantAddress
=
fullAddress
this
.
infoForm
.
provinceName
=
provinceName
this
.
infoForm
.
provinceName
=
provinceName
this
.
infoForm
.
cityName
=
cityName
this
.
infoForm
.
cityName
=
cityName
...
@@ -291,13 +326,22 @@ export default {
...
@@ -291,13 +326,22 @@ export default {
}
}
params
.
merchantBrandMain
=
''
params
.
merchantBrandMain
=
''
// 获取省市信息
// 获取省市信息
const
{
provinceName
,
provinceCode
,
cityName
,
cityCode
}
=
this
.
$refs
.
provinceForm
.
provinceForm
const
{
provinceName
,
provinceCode
,
cityName
,
cityCode
}
=
this
.
$refs
.
provinceForm
.
provinceForm
if
(
!
params
.
provinceCode
)
{
if
(
!
params
.
provinceCode
)
{
params
.
provinceName
=
provinceName
params
.
provinceName
=
provinceName
params
.
provinceCode
=
provinceCode
params
.
provinceCode
=
provinceCode
params
.
cityName
=
cityName
params
.
cityName
=
cityName
params
.
cityCode
=
cityCode
params
.
cityCode
=
cityCode
}
}
// 判断省市地址填写
if
(
!
params
.
provinceName
||
!
params
.
cityName
||
!
params
.
merchantAddress
)
{
this
.
$message
({
message
:
'请选择省市地址'
,
type
:
'error'
})
return
}
if
(
params
.
bussinessTime
)
{
if
(
params
.
bussinessTime
)
{
params
.
bussinessBegintime
=
params
.
bussinessTime
[
0
]
params
.
bussinessBegintime
=
params
.
bussinessTime
[
0
]
params
.
bussinessEndtime
=
params
.
bussinessTime
[
1
]
params
.
bussinessEndtime
=
params
.
bussinessTime
[
1
]
...
@@ -306,13 +350,22 @@ export default {
...
@@ -306,13 +350,22 @@ export default {
params
.
bussinessEndtime
=
''
params
.
bussinessEndtime
=
''
}
}
delete
params
.
stores
delete
params
.
stores
params
.
businessType
=
params
.
businessType
.
join
(
','
)
params
.
businessType
=
typeof
params
.
businessType
==
'string'
?
params
.
businessType
:
params
.
businessType
.
join
(
','
)
//merchantBrandMain 品牌id
//merchantBrandMain 品牌id
const
merchantBrandList
=
this
.
$refs
.
brandListTree
.
getMerchantBrandList
()
const
merchantBrandList
=
this
.
$refs
.
brandListTree
.
getMerchantBrandList
()
if
(
!
merchantBrandList
?.
length
)
{
this
.
loading
=
false
this
.
$message
({
message
:
'请选择主营品牌'
,
type
:
'error'
})
return
}
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantBrandList
)
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantBrandList
)
this
.
$apis
.
store
.
updateMerchant
(
params
).
then
(
res
=>
{
this
.
$apis
.
store
.
updateMerchant
(
params
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
$router
.
push
({
path
:
'/baseInfo/index'
})
this
.
$router
.
push
({
path
:
'/baseInfo/index'
})
}
}
})
})
},
},
...
@@ -329,6 +382,7 @@ export default {
...
@@ -329,6 +382,7 @@ export default {
border-radius
:
2px
;
border-radius
:
2px
;
min-height
:
calc
(
100%
-
80px
);
min-height
:
calc
(
100%
-
80px
);
margin-bottom
:
20px
;
margin-bottom
:
20px
;
.information-title
{
.information-title
{
height
:
58px
;
height
:
58px
;
line-height
:
58px
;
line-height
:
58px
;
...
@@ -338,17 +392,21 @@ export default {
...
@@ -338,17 +392,21 @@ export default {
padding-left
:
20px
;
padding-left
:
20px
;
border-bottom
:
1px
solid
#dcdfe6
;
border-bottom
:
1px
solid
#dcdfe6
;
}
}
.information-form-box
{
.information-form-box
{
//
width
:
50%
;
//
width
:
50%
;
padding-top
:
30px
;
padding-top
:
30px
;
.map-row
{
.map-row
{
/deep/
.el-form-item__content
{
/deep/
.el-form-item__content
{
display
:
flex
;
display
:
flex
;
}
}
.el-input
{
.el-input
{
margin-right
:
10px
;
margin-right
:
10px
;
}
}
}
}
.time-row
{
.time-row
{
/deep/
.el-input__inner
{
/deep/
.el-input__inner
{
width
:
100%
;
width
:
100%
;
...
@@ -356,6 +414,7 @@ export default {
...
@@ -356,6 +414,7 @@ export default {
}
}
}
}
}
}
.show-address
{
.show-address
{
position
:
absolute
;
position
:
absolute
;
right
:
-66px
;
right
:
-66px
;
...
@@ -365,27 +424,48 @@ export default {
...
@@ -365,27 +424,48 @@ export default {
color
:
#5850ff
;
color
:
#5850ff
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.input-width
{
.input-width
{
//
min-width
:
200px
;
//
min-width
:
200px
;
flex
:
1
;
flex
:
1
;
}
}
/
deep
/
{
/
deep
/
{
.el-form-item
{
.el-form-item
{
margin-bottom
:
20px
!important
;
margin-bottom
:
20px
!important
;
}
}
.el-form-item__content
{
.el-form-item__content
{
width
:
432px
;
width
:
432px
;
}
}
.tree-box
{
.tree-box
{
border
:
1px
solid
#e5e5e5
;
border
:
1px
solid
#e5e5e5
;
}
}
.el-checkbox
:last-of-type
{
.el-checkbox
:last-of-type
{
margin-right
:
7px
;
margin-right
:
7px
;
}
}
}
}
.bussiness-type
{
.bussiness-type
{
/deep/
.el-form-item__content
{
/deep/
.el-form-item__content
{
min-width
:
1000px
;
min-width
:
1000px
;
}
}
}
}
.province-icon
{
color
:
#f56c6c
;
}
.province-sty
{
display
:
flex
;
//
position
:
relative
;
.province-icon
{
color
:
#f56c6c
;
position
:
absolute
;
margin-left
:
72px
;
margin-top
:
12px
;
}
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment