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 ee792b8f
authored
Mar 13, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'huy_dev_v2.0.0' into 'v2.0.0'
修改营业范围为经营业务类型 See merge request
!6
2 parents
09763bb2
6e13f2f8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
37 deletions
src/views/account/addAccount.vue
src/views/account/components/baseInfo.vue
src/views/account/detailAccount.vue
src/views/account/editAccount.vue
src/views/account/addAccount.vue
View file @
ee792b8
...
...
@@ -137,7 +137,7 @@ export default {
status
:
''
,
merchantFiles
:
[],
merchantType
:
1
,
business
Sco
pe
:
[],
business
Ty
pe
:
[],
parentId
:
''
,
isloginName
:
false
},
...
...
@@ -181,7 +181,7 @@ export default {
deep
:
true
},
accountAddForm
:
{
handler
()
{
handler
()
{
this
.
editStatus
=
true
},
deep
:
true
...
...
@@ -296,16 +296,16 @@ export default {
params
.
bussinessBegintime
=
params
.
bussinessTime
[
0
]
params
.
bussinessEndtime
=
params
.
bussinessTime
[
1
]
}
if
(
params
.
business
Sco
pe
)
{
params
.
business
Scope
=
params
.
businessSco
pe
.
join
(
','
)
if
(
params
.
business
Ty
pe
)
{
params
.
business
Type
=
params
.
businessTy
pe
.
join
(
','
)
}
params
.
merchantBrand
=
this
.
$refs
.
baseInfoForm
.
$refs
.
brandTree
.
getCheckedKeys
().
join
(
','
)
params
.
isloginName
?
(
params
.
isloginName
=
1
)
:
(
params
.
isloginName
=
0
)
params
.
merchantAccountLevel
=
this
.
accountDetail
.
merchantAccountLevel
params
.
status
=
1
params
.
channelId
=
this
.
accountDetail
.
channelId
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
(
item
=>
item
.
name
)
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
','
)
//
let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name)
//
params.businessScopeCustomize = businessScopeCustomize.join(',')
params
.
accounttypeId
=
this
.
accounttypeId
.
join
(
','
)
params
.
merchantFiles
=
JSON
.
stringify
(
params
.
merchantFiles
)
params
.
merchantModel
=
this
.
accountDetail
.
merchantModel
...
...
@@ -317,6 +317,7 @@ export default {
merchant
=
'saveMerchant'
}
document
.
querySelector
(
'#app'
).
scrollTop
=
0
console
.
log
(
params
)
Promise
.
all
([
pm1
,
pm2
]).
then
(()
=>
{
this
.
$apis
.
store
[
merchant
](
params
).
then
(
res
=>
{
if
(
res
)
{
...
...
@@ -342,7 +343,7 @@ export default {
}
this
.
$apis
.
store
.
findAllDictData
(
params
).
then
(
res
=>
{
if
(
res
)
{
if
(
dictType
==
'business_
sco
pe'
)
{
if
(
dictType
==
'business_
ty
pe'
)
{
this
.
businessOption
=
res
}
}
...
...
@@ -390,6 +391,9 @@ export default {
})
},
getCarbrandTree
()
{
// this.$apis.baseInfo.brandList({ needCarSeries: true }).then(res => {
// this.brandData = res
// })
this
.
$apis
.
store
.
getCarbrandTree
({}).
then
(
res
=>
{
this
.
brandData
=
res
})
...
...
@@ -403,7 +407,7 @@ export default {
this
.
accountAddForm
.
parentId
=
this
.
$route
.
params
.
id
this
.
findMerchantDetail
()
this
.
getCarbrandTree
()
this
.
findAllDictData
(
'business_
sco
pe'
)
this
.
findAllDictData
(
'business_
ty
pe'
)
}
}
</
script
>
...
...
src/views/account/components/baseInfo.vue
View file @
ee792b8
...
...
@@ -78,16 +78,16 @@
</el-col>
</el-row>
<el-row>
<el-col
:span=
"
12
"
>
<el-form-item
label=
"
营业范围
"
>
<el-checkbox-group
v-model=
"accountAddForm.business
Sco
pe"
>
<el-col
:span=
"
24
"
>
<el-form-item
label=
"
经营业务类型
"
>
<el-checkbox-group
v-model=
"accountAddForm.business
Ty
pe"
>
<el-checkbox
v-for=
"item in businessOption"
:label=
"item.dictValue"
:key=
"item"
>
{{
item
.
dictLabel
}}
</el-checkbox>
</el-checkbox-group>
<div
class=
"scrm-flex-center"
v-for=
"(item, index) in businessScopeCustomize"
:key=
"index"
>
<
!--
<
div
class=
"scrm-flex-center"
v-for=
"(item, index) in businessScopeCustomize"
:key=
"index"
>
<el-input
size=
"small"
v-model=
"businessScopeCustomize[index].name"
placeholder=
"请自定义营业范围,建议不超过10个"
></el-input>
<i
class=
"el-icon-circle-plus el-icon-btn"
@
click=
"addBusinessScope"
v-if=
"index == businessScopeCustomize.length - 1"
></i>
<i
class=
"el-icon-remove el-icon-btn"
@
click=
"removeBusinessScope"
v-else
></i>
</div>
</div>
-->
</el-form-item>
</el-col>
</el-row>
...
...
src/views/account/detailAccount.vue
View file @
ee792b8
...
...
@@ -126,9 +126,9 @@
</span>
</el-col>
<el-col
:span=
"10"
class=
"flexCol"
>
<span
class=
"itemName itemNameCol2"
>
营业范围
:
</span>
<!--
roleData.businessScopName = roleData.businessScopName ? roleData.businessScopName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize
-->
<span
class=
"itemValue"
>
{{ firstPageObj.business
ScopName ? firstPageObj.businessScopName + ',' + firstPageObj.businessScopeCustomize : firstPageObj.businessScopeCustomize ? firstPageObj.businessScopeCustomiz
e : '-' }}
</span>
<span
class=
"itemName itemNameCol2"
>
经营业务类型
:
</span>
<!--
<span class="itemValue">{{ firstPageObj.businessScopName ? firstPageObj.businessScopName + ',' + firstPageObj.businessScopeCustomize : firstPageObj.businessScopeCustomize ? firstPageObj.businessScopeCustomize : '-' }}</span>
-->
<span
class=
"itemValue"
>
{{ firstPageObj.business
TypeName ? firstPageObj.businessTypeNam
e : '-' }}
</span>
</el-col>
</el-row>
<el-row>
...
...
src/views/account/editAccount.vue
View file @
ee792b8
...
...
@@ -141,7 +141,7 @@ export default {
merchantAccountLevel
:
null
,
parentId
:
null
,
merchantModel
:
null
,
business
Sco
pe
:
[],
business
Ty
pe
:
[],
bussinessTime
:
[],
merchantFiles
:
[]
},
...
...
@@ -306,13 +306,13 @@ export default {
params
.
bussinessBegintime
=
''
params
.
bussinessEndtime
=
''
}
if
(
params
.
business
Sco
pe
)
{
params
.
business
Scope
=
params
.
businessSco
pe
.
join
(
','
)
if
(
params
.
business
Ty
pe
)
{
params
.
business
Type
=
params
.
businessTy
pe
.
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
(
','
)
//
let businessScopeCustomize = this.businessScopeCustomize.map(item => item.name)
//
params.businessScopeCustomize = businessScopeCustomize.join(',')
params
.
merchantFiles
=
JSON
.
stringify
(
params
.
merchantFiles
)
Promise
.
all
([
pm1
,
pm2
]).
then
(()
=>
{
this
.
$apis
.
store
.
updateMerchant
(
params
).
then
(
res
=>
{
...
...
@@ -326,7 +326,7 @@ export default {
let
accountLevel
=
this
.
$apis
.
store
.
findAllDictData
({
dictType
:
'account_level'
})
let
accountType
=
this
.
$apis
.
store
.
findAllDictData
({
dictType
:
'account_type'
})
let
businessOption
=
this
.
$apis
.
store
.
findAllDictData
({
dictType
:
'business_
sco
pe'
dictType
:
'business_
ty
pe'
})
await
Promise
.
all
([
accountLevel
,
accountType
,
businessOption
]).
then
(
res
=>
{
;[
this
.
accountLevel
,
this
.
accountType
,
this
.
businessOption
]
=
res
...
...
@@ -359,27 +359,27 @@ export default {
})
},
renderView
(
res
)
{
let
{
isloginName
,
bussinessBegintime
,
bussinessEndtime
,
lat
,
lng
,
merchantAddress
,
merchantName
,
merchantAbbreviation
,
merchantType
,
merchantOrgcode
,
merchantLegalPerson
,
merchantLegalPersonPhone
,
residentContact
,
residentPhone
,
merchantLoginAccount
,
merchantLoginPassword
,
merchantAccountLevel
,
business
Sco
pe
,
businessScopeCustomize
,
merchantBrand
,
merchantFileResponses
,
merchantModel
,
accountTypes
,
accountType
,
accounttypeId
,
channelId
,
status
,
parentId
}
=
res
let
{
isloginName
,
bussinessBegintime
,
bussinessEndtime
,
lat
,
lng
,
merchantAddress
,
merchantName
,
merchantAbbreviation
,
merchantType
,
merchantOrgcode
,
merchantLegalPerson
,
merchantLegalPersonPhone
,
residentContact
,
residentPhone
,
merchantLoginAccount
,
merchantLoginPassword
,
merchantAccountLevel
,
business
Ty
pe
,
businessScopeCustomize
,
merchantBrand
,
merchantFileResponses
,
merchantModel
,
accountTypes
,
accountType
,
accounttypeId
,
channelId
,
status
,
parentId
}
=
res
this
.
accountInfoForm
.
merchantLoginAccount
=
merchantLoginAccount
this
.
accountInfoForm
.
merchantLoginPassword
=
merchantLoginPassword
this
.
accountTypes
=
accountTypes
this
.
accountAddForm
.
business
Scope
=
businessScope
?
businessSco
pe
.
split
(
','
)
:
[]
if
(
this
.
accountAddForm
.
business
Sco
pe
.
length
>
0
)
{
for
(
let
i
in
this
.
accountAddForm
.
business
Sco
pe
)
{
this
.
accountAddForm
.
business
Scope
[
i
]
=
parseInt
(
this
.
accountAddForm
.
businessSco
pe
[
i
])
this
.
accountAddForm
.
business
Type
=
businessType
?
businessTy
pe
.
split
(
','
)
:
[]
if
(
this
.
accountAddForm
.
business
Ty
pe
.
length
>
0
)
{
for
(
let
i
in
this
.
accountAddForm
.
business
Ty
pe
)
{
this
.
accountAddForm
.
business
Type
[
i
]
=
parseInt
(
this
.
accountAddForm
.
businessTy
pe
[
i
])
}
}
this
.
accountAddForm
.
bussinessTime
=
[
bussinessBegintime
,
bussinessEndtime
]
businessScopeCustomize
=
businessScopeCustomize
?
businessScopeCustomize
.
split
(
','
)
:
[]
if
(
businessScopeCustomize
.
length
>
0
)
{
this
.
businessScopeCustomize
=
businessScopeCustomize
.
map
(
item
=>
{
return
{
name
:
item
}
})
}
else
{
this
.
businessScopeCustomize
=
[{
name
:
''
}]
}
//
businessScopeCustomize = businessScopeCustomize ? businessScopeCustomize.split(',') : []
//
if (businessScopeCustomize.length > 0) {
//
this.businessScopeCustomize = businessScopeCustomize.map(item => {
//
return {
//
name: item
//
}
//
})
//
} else {
//
this.businessScopeCustomize = [{ name: '' }]
//
}
this
.
accounttypeId
=
accountType
?
accountType
.
split
(
','
)
:
[]
if
(
this
.
accounttypeId
.
length
>
0
)
{
this
.
accounttypeId
=
this
.
accounttypeId
.
map
(
item
=>
{
...
...
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