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 bdba4ce5
authored
Apr 15, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改商户省市回显调整
1 parent
bcfee26a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
27 deletions
src/components/province-city/index.vue
src/views/account/detailAccount.vue
src/views/account/editAccount.vue
src/views/baseInfo/editInfo.vue
src/components/province-city/index.vue
View file @
bdba4ce
...
...
@@ -29,32 +29,33 @@ export default {
}
}
},
inject
:
[
'provinceEditAccount'
],
//
inject: ['provinceEditAccount'],
mounted
()
{
// 初始化
// this.getProvinceList()
console
.
log
(
this
.
provinceEditAccount
,
'===='
)
// if (this.province.provinceName) {
// console.log('++++')
// this.init(this.province.provinceName, this.province.cityName)
// console.log(this.provinceEditAccount, '====')
// console.log(JSON.stringify(this.provinceEditAccount.cityName))
// if (this.provinceEditAccount) {
// this.init(this.provinceEditAccount.provinceName, this.provinceEditAccount.cityName)
// console.log(this.provinceEditAccount.provinceName, this.provinceEditAccount.cityName)
// }
},
methods
:
{
init
(
province
Name
,
cityName
)
{
console
.
log
(
province
Name
,
cityName
)
init
(
province
,
city
)
{
console
.
log
(
province
,
city
)
this
.
provinceForm
=
{
provinceName
:
province
Name
,
cityName
:
city
Name
provinceName
:
province
,
cityName
:
city
}
this
.
getProvinceList
(
province
Name
,
cityName
)
this
.
getProvinceList
(
province
,
city
)
},
async
getProvinceList
(
provinceName
,
cityName
)
{
const
{
provinceInfoList
:
provinceList
}
=
await
this
.
provinceList
this
.
AllData
=
provinceList
// this.$set(this, 'AllData', provinceList)
if
(
this
.
provinceEditAccount
)
{
this
.
init
(
this
.
provinceEditAccount
.
provinceName
,
this
.
provinceEditAccount
.
cityName
)
}
//
if (this.provinceEditAccount) {
//
this.init(this.provinceEditAccount.provinceName, this.provinceEditAccount.cityName)
//
}
if
(
provinceName
)
{
this
.
AllData
.
map
(
item
=>
{
if
(
item
.
provinceName
.
indexOf
(
provinceName
)
!=
-
1
)
{
...
...
src/views/account/detailAccount.vue
View file @
bdba4ce
...
...
@@ -132,12 +132,12 @@
</el-col>
</el-row>
<el-row>
<el-col
:span=
"1
2
"
class=
"flexCol"
>
<el-col
:span=
"1
4
"
class=
"flexCol"
>
<span
class=
"itemName"
>
主营品牌:
</span>
<span
class=
"itemValue"
>
{{ firstPageObj.merchantBrandName || '-' }}
</span>
</el-col>
<el-col
:span=
"1
2
"
class=
"flexCol"
>
<span
class=
"itemName"
>
驻店电话:
</span>
<el-col
:span=
"1
0
"
class=
"flexCol"
>
<span
class=
"itemName
itemNameCol2
"
>
驻店电话:
</span>
<span
class=
"itemValue"
>
{{ firstPageObj.residentPhone || '-' }}
</span>
</el-col>
</el-row>
...
...
@@ -350,7 +350,7 @@ export default {
},
//将后台返回数据中数值为空的字段全部替换为“-”
formateNullFieldData
(
initialData
)
{
const
isEmpty
=
function
(
val
)
{
const
isEmpty
=
function
(
val
)
{
if
(
!
String
(
val
)
||
String
(
val
)
===
'null'
)
{
return
'-'
}
...
...
@@ -358,7 +358,7 @@ export default {
}
var
that
=
this
if
(
initialData
instanceof
Array
)
{
initialData
.
forEach
(
function
(
val
,
key
,
array
)
{
initialData
.
forEach
(
function
(
val
,
key
,
array
)
{
array
[
key
]
=
that
.
formateNullFieldData
(
val
)
})
}
else
if
(
initialData
instanceof
Object
)
{
...
...
src/views/account/editAccount.vue
View file @
bdba4ce
...
...
@@ -167,11 +167,11 @@ export default {
}
}
},
provide
()
{
return
{
provinceEditAccount
:
this
.
accountAddForm
}
},
//
provide() {
//
return {
//
provinceEditAccount: this.accountAddForm
//
}
//
},
watch
:
{
filterText
(
val
)
{
this
.
$refs
.
brandTree
.
filter
(
val
)
...
...
@@ -312,7 +312,7 @@ export default {
if
(
params
.
businessType
)
{
params
.
businessType
=
params
.
businessType
.
join
(
','
)
}
//
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
)
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
(
item
=>
item
.
name
)
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
','
)
...
...
@@ -431,6 +431,7 @@ export default {
merchantBrandMain
})
// 省市回显
this
.
$refs
.
baseInfoForm
.
init
(
this
.
accountAddForm
.
provinceName
,
this
.
accountAddForm
.
cityName
)
merchantBrandMain
=
merchantBrandMain
.
replaceAll
(
';'
,
','
).
split
(
','
)
this
.
$refs
.
baseInfoForm
.
checkBrandList
(
merchantBrandMain
)
this
.
$refs
.
baseInfoForm
.
checkBusinessType
(
businessType
)
...
...
src/views/baseInfo/editInfo.vue
View file @
bdba4ce
...
...
@@ -13,7 +13,7 @@
<el-form
ref=
"baseForm"
:model=
"infoForm"
class=
"account-body-form"
label-width=
"120px"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"map-row"
>
<Province
ref=
"provinceForm"
@
getProvince=
"getProvince"
@
getCity=
"getCity"
></Province>
<el-input
v-model=
"infoForm.merchantAddress"
placeholder=
"请选择商户地址"
readonly=
"readonly"
></el-input>
<el-input
class=
"input-width"
v-model=
"infoForm.merchantAddress"
placeholder=
"请选择商户地址"
readonly=
"readonly"
></el-input>
<el-button
@
click=
"hanleSelectMap"
type=
"primary"
>
选择地址
</el-button>
</el-form-item>
<el-form-item
size=
"small"
label=
"经营业务类型"
>
...
...
@@ -88,7 +88,6 @@ export default {
methods
:
{
async
brandList
()
{
this
.
$refs
.
brandListTree
.
loading
=
true
const
brandListTree
=
await
this
.
$apis
.
baseInfo
.
brandList
({})
brandListTree
.
forEach
(
item
=>
{
let
child
=
item
.
children
...
...
@@ -98,7 +97,6 @@ export default {
})
})
this
.
brandListTree
=
brandListTree
this
.
$refs
.
brandListTree
.
getCheckList
(
this
.
infoForm
.
merchantBrandMain
)
this
.
$nextTick
(()
=>
{
this
.
$refs
.
brandListTree
.
loading
=
false
...
...
@@ -279,4 +277,7 @@ export default {
color
:
#5850ff
;
cursor
:
pointer
;
}
.input-width
{
min-width
:
200px
;
}
</
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