Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-shop
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 a10a1d7e
authored
Aug 16, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
地图样式。loading
1 parent
8f29722d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
49 deletions
src/views/customerManage/components/province-city/index.vue
src/views/customerManage/editCustomer.vue
src/views/customerManage/components/province-city/index.vue
View file @
a10a1d7
...
@@ -369,7 +369,7 @@ export default {
...
@@ -369,7 +369,7 @@ export default {
width
:
136px
!important
;
width
:
136px
!important
;
}
}
.gl-form-page
.el-form
.province-textarea
.el-textarea
{
.gl-form-page
.el-form
.province-textarea
.el-textarea
{
width
:
432
px
!important
;
width
:
580
px
!important
;
}
}
.province-textarea
{
.province-textarea
{
position
:
relative
;
position
:
relative
;
...
...
src/views/customerManage/editCustomer.vue
View file @
a10a1d7
...
@@ -3,19 +3,21 @@
...
@@ -3,19 +3,21 @@
<div
class=
"edit-zone shop edit-box"
>
<div
class=
"edit-zone shop edit-box"
>
<div
class=
"container edit-container all-page"
>
<div
class=
"container edit-container all-page"
>
<p
class=
"page-title"
>
基础信息
</p>
<p
class=
"page-title"
>
基础信息
</p>
<glsx-combi-form
class=
"edit-form-container m-r-20"
ref=
"editFormRef"
:isEdit=
"isEdit"
:isWatch=
"isWatch"
:labelWidth=
"defaultLabelWidth"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<div
v-loading=
"loading"
>
<div
slot=
"map"
slot-scope=
"scope"
class=
"flex"
>
<glsx-combi-form
class=
"edit-form-container m-r-20"
ref=
"editFormRef"
:isEdit=
"isEdit"
:isWatch=
"isWatch"
:labelWidth=
"defaultLabelWidth"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<span
class=
"province-icon"
>
*
</span>
<div
slot=
"map"
slot-scope=
"scope"
class=
"flex"
>
<Province
ref=
"provinceForm"
:subdistrict=
"subdistrict"
:provinceLabel=
"scope.scope.labelName"
:inline=
"scope.scope.inline"
@
selectProvince=
"selectProvince"
@
selectCity=
"selectCity"
@
selectAddressByMap=
"selectAddressByMap"
:detailAddressLabel=
"detailAddressLabel"
></Province>
<span
class=
"province-icon"
>
*
</span>
</div>
<Province
ref=
"provinceForm"
:subdistrict=
"subdistrict"
:provinceLabel=
"scope.scope.labelName"
:inline=
"scope.scope.inline"
@
selectProvince=
"selectProvince"
@
selectCity=
"selectCity"
@
selectAddressByMap=
"selectAddressByMap"
:detailAddressLabel=
"detailAddressLabel"
></Province>
<div
slot=
"business"
slot-scope=
"scope"
class=
"business"
>
</div>
<el-select
v-model=
"editForm[scope.scope.name]"
multiple
filterable
placeholder=
"请选择"
@
change=
"handleMutiSelctChange"
>
<div
slot=
"business"
slot-scope=
"scope"
class=
"business"
>
<el-option-group
v-for=
"group in baseData.sceneList"
:key=
"group.sceneCode"
:label=
"group.name"
>
<el-select
v-model=
"editForm[scope.scope.name]"
multiple
filterable
collapse-tags
placeholder=
"请选择"
@
change=
"handleMutiSelctChange"
>
<el-option
v-for=
"item in group.productList"
:key=
"item.productCode"
:label=
"item.productName"
:value=
"item.productCode"
></el-option>
<el-option-group
v-for=
"group in baseData.sceneList"
:key=
"group.sceneCode"
:label=
"group.name"
>
</el-option-group>
<el-option
v-for=
"item in group.productList"
:key=
"item.productCode"
:label=
"item.productName"
:value=
"item.productCode"
></el-option>
</el-select>
</el-option-group>
</div>
</el-select>
</glsx-combi-form>
</div>
</glsx-combi-form>
</div>
</div>
</div>
<GLFooter
class=
"m-t-20"
>
<GLFooter
class=
"m-t-20"
>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
取消
</el-button>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
取消
</el-button>
...
@@ -39,6 +41,7 @@ export default {
...
@@ -39,6 +41,7 @@ export default {
editType
:
'add'
,
editType
:
'add'
,
id
:
''
id
:
''
},
},
loading
:
false
,
editStatus
:
false
,
editStatus
:
false
,
editForm
:
{
editForm
:
{
shopMerchantId
:
''
,
shopMerchantId
:
''
,
...
@@ -96,7 +99,7 @@ export default {
...
@@ -96,7 +99,7 @@ export default {
label
:
'联系人'
,
label
:
'联系人'
,
name
:
'contactName'
,
name
:
'contactName'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
2
0
maxlength
:
1
0
},
},
{
{
label
:
'联系电话'
,
label
:
'联系电话'
,
...
@@ -207,34 +210,40 @@ export default {
...
@@ -207,34 +210,40 @@ export default {
oldPhone
:
this
.
routeInfo
.
merchantInfo
?.
phone
,
oldPhone
:
this
.
routeInfo
.
merchantInfo
?.
phone
,
oldMerchantName
:
this
.
routeInfo
.
merchantInfo
.
shopMerchantName
||
''
oldMerchantName
:
this
.
routeInfo
.
merchantInfo
.
shopMerchantName
||
''
}
}
this
.
$apis
.
customer
.
getMerchantInfo
({
merchantId
:
this
.
routeInfo
.
merchantInfo
.
shopMerchantId
}).
then
(
res
=>
{
this
.
loading
=
true
this
.
editForm
.
provinceCode
=
res
.
provinceCode
this
.
$apis
.
customer
this
.
editForm
.
provinceName
=
res
.
provinceName
.
getMerchantInfo
({
merchantId
:
this
.
routeInfo
.
merchantInfo
.
shopMerchantId
})
this
.
editForm
.
cityCode
=
res
.
cityCode
.
then
(
res
=>
{
this
.
editForm
.
cityName
=
res
.
cityName
this
.
editForm
.
provinceCode
=
res
.
provinceCode
this
.
editForm
.
latitude
=
res
.
lat
this
.
editForm
.
provinceName
=
res
.
provinceName
this
.
editForm
.
longitude
=
res
.
lng
this
.
editForm
.
cityCode
=
res
.
cityCode
this
.
editForm
.
merchantAddress
=
res
.
merchantAddress
this
.
editForm
.
cityName
=
res
.
cityName
const
merchantBrandList
=
res
.
brandTreeList
||
[]
this
.
editForm
.
latitude
=
res
.
lat
this
.
editForm
.
merchantBrandList
=
[]
this
.
editForm
.
longitude
=
res
.
lng
this
.
editForm
.
merchantBrandIds
=
''
this
.
editForm
.
merchantAddress
=
res
.
merchantAddress
merchantBrandList
.
forEach
(
item
=>
{
const
merchantBrandList
=
res
.
brandTreeList
||
[]
this
.
editForm
.
merchantBrandList
.
push
({
this
.
editForm
.
merchantBrandList
=
[]
merchantFirstBrandDetail
:
{
this
.
editForm
.
merchantBrandIds
=
''
id
:
item
.
id
,
merchantBrandList
.
forEach
(
item
=>
{
name
:
item
.
name
this
.
editForm
.
merchantBrandList
.
push
({
},
merchantFirstBrandDetail
:
{
merchantSecondBrandDetailList
:
item
.
subList
id
:
item
.
id
,
name
:
item
.
name
},
merchantSecondBrandDetailList
:
item
.
subList
})
this
.
editForm
.
merchantBrandIds
=
this
.
editForm
.
merchantBrandIds
+
(
this
.
editForm
.
merchantBrandIds
?
','
:
''
)
+
item
.
subList
.
map
(
k
=>
k
.
id
).
join
(
','
)
})
this
.
editForm
.
merchantBrandIds
=
this
.
editForm
.
merchantBrandIds
.
split
(
','
)
this
.
$refs
.
editFormRef
.
brandList
()
this
.
$refs
.
provinceForm
&&
this
.
$refs
.
provinceForm
.
init
(
this
.
editForm
)
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
})
})
this
.
editForm
.
merchantBrandIds
=
this
.
editForm
.
merchantBrandIds
+
(
this
.
editForm
.
merchantBrandIds
?
','
:
''
)
+
item
.
subList
.
map
(
k
=>
k
.
id
).
join
(
','
)
})
})
this
.
editForm
.
merchantBrandIds
=
this
.
editForm
.
merchantBrandIds
.
split
(
','
)
.
finally
(()
=>
{
this
.
$refs
.
editFormRef
.
brandList
()
this
.
loading
=
false
this
.
$refs
.
provinceForm
&&
this
.
$refs
.
provinceForm
.
init
(
this
.
editForm
)
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
})
})
})
},
},
hasDuplicate
(
arr1
,
arr2
)
{
hasDuplicate
(
arr1
,
arr2
)
{
const
set1
=
new
Set
(
arr1
)
const
set1
=
new
Set
(
arr1
)
...
@@ -265,7 +274,6 @@ export default {
...
@@ -265,7 +274,6 @@ export default {
return
return
}
}
if
(
!
this
.
editForm
.
merchantBrandList
?.
length
)
{
if
(
!
this
.
editForm
.
merchantBrandList
?.
length
)
{
this
.
loading
=
false
this
.
$message
({
this
.
$message
({
message
:
'请选择主营品牌'
,
message
:
'请选择主营品牌'
,
type
:
'error'
type
:
'error'
...
@@ -290,15 +298,20 @@ export default {
...
@@ -290,15 +298,20 @@ export default {
})
})
.
then
(()
=>
{
.
then
(()
=>
{
const
apiName
=
this
.
routeInfo
.
editType
==
'edit'
?
'updateMerchant'
:
'createMerchant'
const
apiName
=
this
.
routeInfo
.
editType
==
'edit'
?
'updateMerchant'
:
'createMerchant'
this
.
$apis
.
customer
[
apiName
](
params
).
then
(
res
=>
{
this
.
loading
=
true
this
.
$message
({
this
.
$apis
.
customer
[
apiName
](
params
)
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
.
then
(
res
=>
{
type
:
res
.
code
==
'0'
?
'success'
:
'error'
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
cancelJump
()
}
})
.
finally
(()
=>
{
this
.
loading
=
false
})
})
if
(
res
.
code
==
'0'
)
{
this
.
cancelJump
()
}
})
})
})
.
catch
(()
=>
{
})
.
catch
(()
=>
{
})
}
}
...
...
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