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 548e3445
authored
Mar 14, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改主营品牌和经营业务类型
1 parent
ee792b8f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
40 deletions
src/views/account/addAccount.vue
src/views/account/components/baseInfo.vue
src/views/account/editAccount.vue
src/views/approvalConfig/index.vue
src/views/baseInfo/editInfo.vue
src/views/account/addAccount.vue
View file @
548e344
...
...
@@ -299,7 +299,9 @@ export default {
if
(
params
.
businessType
)
{
params
.
businessType
=
params
.
businessType
.
join
(
','
)
}
params
.
merchantBrand
=
this
.
$refs
.
baseInfoForm
.
$refs
.
brandTree
.
getCheckedKeys
().
join
(
','
)
const
getCheckedArr
=
this
.
$refs
.
baseInfoForm
.
$refs
.
brandListTree
.
getCheckedArr
const
merchantBrandMain
=
getCheckedArr
.
map
(
item
=>
item
.
id
)
params
.
merchantBrandMain
=
merchantBrandMain
.
join
(
','
)
params
.
isloginName
?
(
params
.
isloginName
=
1
)
:
(
params
.
isloginName
=
0
)
params
.
merchantAccountLevel
=
this
.
accountDetail
.
merchantAccountLevel
params
.
status
=
1
...
...
@@ -405,6 +407,7 @@ export default {
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
accountAddForm
.
parentId
=
this
.
$route
.
params
.
id
this
.
$refs
.
baseInfoForm
.
checkBusinessType
()
this
.
findMerchantDetail
()
this
.
getCarbrandTree
()
this
.
findAllDictData
(
'business_type'
)
...
...
src/views/account/components/baseInfo.vue
View file @
548e344
...
...
@@ -81,7 +81,7 @@
<el-col
:span=
"24"
>
<el-form-item
label=
"经营业务类型"
>
<el-checkbox-group
v-model=
"accountAddForm.businessType"
>
<el-checkbox
v-for=
"item in business
Option"
:label=
"item.dictValue
"
:key=
"item"
>
{{
item
.
dictLabel
}}
</el-checkbox>
<el-checkbox
v-for=
"item in business
Type"
:label=
"item.dictValue"
:disabled=
"item.dictValue
<
= 6
" :key="item">
{{
item
.
dictLabel
}}
</el-checkbox>
</el-checkbox-group>
<!--
<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>
...
...
@@ -101,10 +101,11 @@
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"主营品牌"
>
<el-input
size=
"small"
v-model=
"filterText"
></el-input>
<select-brand
:brandListTree=
"brandListTree"
ref=
"brandListTree"
></select-brand>
<!--
<el-input
size=
"small"
v-model=
"filterText"
></el-input>
<div
class=
"brand-tree"
>
<el-tree
:data=
"brandData"
show-checkbox
default-expand-all
node-key=
"id"
ref=
"brandTree"
highlight-current
:props=
"defaultProps"
:filter-node-method=
"filterNode"
@
check=
"clickDeal"
></el-tree>
</div>
</div>
-->
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -141,10 +142,12 @@
<
script
>
import
util
from
'@/utils/util'
import
mapView
from
'@/components/mapView/index'
import
SelectBrand
from
'../../baseInfo/selectBrand.vue'
export
default
{
name
:
'base'
,
components
:
{
mapView
mapView
,
SelectBrand
},
props
:
{
accountAddForm
:
{
...
...
@@ -187,7 +190,8 @@ export default {
{
required
:
true
,
message
:
'请输入联系电话'
,
trigger
:
'blur'
},
{
validator
:
validatePhone
,
trigger
:
'blur'
}
]
}
},
brandListTree
:
[]
}
},
watch
:
{
...
...
@@ -196,6 +200,42 @@ export default {
}
},
methods
:
{
checkBrandList
(
merchantBrandMain
)
{
this
.
$set
(
this
.
accountAddForm
,
'merchantBrandMain'
,
merchantBrandMain
)
if
(
!
this
.
accountAddForm
.
merchantBrandMain
)
{
this
.
accountAddForm
.
merchantBrandMain
=
[]
}
else
{
this
.
accountAddForm
.
merchantBrandMain
=
this
.
accountAddForm
.
merchantBrandMain
.
split
(
','
)
}
this
.
$refs
.
brandListTree
.
getCheckList
(
this
.
accountAddForm
.
merchantBrandMain
)
},
checkBusinessType
(
type
)
{
if
(
!
type
)
{
this
.
accountAddForm
.
businessType
=
[
1
,
2
,
3
,
4
,
5
,
6
]
}
else
{
const
businessType
=
type
.
split
(
','
)
this
.
$set
(
this
.
accountAddForm
,
'businessType'
,
businessType
.
map
(
item
=>
(
item
=
parseInt
(
item
)))
)
}
},
async
brandList
()
{
this
.
$refs
.
brandListTree
.
loading
=
true
this
.
businessType
=
await
this
.
$apis
.
store
.
findAllDictData
({
dictType
:
'business_type'
})
const
brandListTree
=
await
this
.
$apis
.
baseInfo
.
brandList
({
needCarSeries
:
true
})
brandListTree
.
forEach
(
item
=>
{
let
child
=
item
.
childs
child
.
forEach
(
k
=>
{
delete
k
.
childs
})
})
this
.
brandListTree
=
brandListTree
this
.
$nextTick
(()
=>
{
this
.
$refs
.
brandListTree
.
loading
=
false
})
},
hanleSelectMap
()
{
this
.
dialogMapVisible
=
true
this
.
$nextTick
(()
=>
{
...
...
@@ -275,7 +315,9 @@ export default {
}
},
mounted
()
{}
mounted
()
{
this
.
brandList
()
}
}
</
script
>
...
...
src/views/account/editAccount.vue
View file @
548e344
...
...
@@ -141,7 +141,7 @@ export default {
merchantAccountLevel
:
null
,
parentId
:
null
,
merchantModel
:
null
,
business
Ty
pe
:
[],
business
Sco
pe
:
[],
bussinessTime
:
[],
merchantFiles
:
[]
},
...
...
@@ -309,11 +309,14 @@ 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(',')
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
(
item
=>
item
.
name
)
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
','
)
params
.
merchantFiles
=
JSON
.
stringify
(
params
.
merchantFiles
)
const
getCheckedArr
=
this
.
$refs
.
baseInfoForm
.
$refs
.
brandListTree
.
getCheckedArr
const
merchantBrandMain
=
getCheckedArr
.
map
(
item
=>
item
.
id
)
params
.
merchantBrandMain
=
merchantBrandMain
.
join
(
','
)
Promise
.
all
([
pm1
,
pm2
]).
then
(()
=>
{
this
.
$apis
.
store
.
updateMerchant
(
params
).
then
(
res
=>
{
if
(
res
)
{
...
...
@@ -326,7 +329,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_
ty
pe'
dictType
:
'business_
sco
pe'
})
await
Promise
.
all
([
accountLevel
,
accountType
,
businessOption
]).
then
(
res
=>
{
;[
this
.
accountLevel
,
this
.
accountType
,
this
.
businessOption
]
=
res
...
...
@@ -359,27 +362,27 @@ export default {
})
},
renderView
(
res
)
{
let
{
isloginName
,
bussinessBegintime
,
bussinessEndtime
,
lat
,
lng
,
merchantAddress
,
merchantName
,
merchantAbbreviation
,
merchantType
,
merchantOrgcode
,
merchantLegalPerson
,
merchantLegalPersonPhone
,
residentContact
,
residentPhone
,
merchantLoginAccount
,
merchantLoginPassword
,
merchantAccountLevel
,
businessTy
pe
,
businessScopeCustomize
,
merchantBrand
,
merchantFileResponses
,
merchantModel
,
accountTypes
,
accountType
,
accounttypeId
,
channelId
,
status
,
parentId
}
=
res
let
{
isloginName
,
bussinessBegintime
,
bussinessEndtime
,
lat
,
merchantBrandMain
,
businessType
,
lng
,
merchantAddress
,
merchantName
,
merchantAbbreviation
,
merchantType
,
merchantOrgcode
,
merchantLegalPerson
,
merchantLegalPersonPhone
,
residentContact
,
residentPhone
,
merchantLoginAccount
,
merchantLoginPassword
,
merchantAccountLevel
,
businessSco
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
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
.
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
.
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
=>
{
...
...
@@ -399,7 +402,7 @@ export default {
for
(
let
i
in
merchantBrand
)
{
merchantBrand
[
i
]
=
parseInt
(
merchantBrand
[
i
])
}
this
.
$refs
.
baseInfoForm
.
$refs
.
brandTree
.
setCheckedKeys
(
merchantBrand
)
//
this.$refs.baseInfoForm.$refs.brandTree.setCheckedKeys(merchantBrand)
this
.
accountAddForm
=
Object
.
assign
(
this
.
accountAddForm
,
{
isloginName
:
isloginName
?
true
:
false
,
lat
,
...
...
@@ -418,8 +421,11 @@ export default {
parentId
,
channelId
,
status
,
accounttypeId
:
accountType
accounttypeId
:
accountType
,
merchantBrandMain
})
this
.
$refs
.
baseInfoForm
.
checkBrandList
(
merchantBrandMain
)
this
.
$refs
.
baseInfoForm
.
checkBusinessType
(
businessType
)
this
.
$nextTick
(()
=>
{
this
.
$refs
.
baseInfoForm
.
$refs
.
baseForm
.
validate
()
this
.
editStatus
=
false
...
...
src/views/approvalConfig/index.vue
View file @
548e344
<!--
* @Author: your name
* @Date: 2022-03-02 18:28:20
* @LastEditTime: 2022-03-1
2 14:18:52
* @LastEditTime: 2022-03-1
4 18:24:08
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\approvalConfig\index.vue
...
...
@@ -15,8 +15,8 @@
<div
class=
"config-page"
:style=
"
{ 'min-height': clientHeight + 'px' }">
<div
class=
"page-title"
>
审批配置
<
!--
<GLButton
type=
"text"
class=
"guide-btn"
@
click=
"jumpGuide"
fn=
"审批模板创建指引"
>
查看创建审批模板指引
</GLButton>
--
>
<
el-button
type=
"text"
class=
"guide-btn"
@
click=
"jumpGuide"
>
查看创建审批模板指引>
</el-button
>
<
GLButton
type=
"text"
class=
"guide-btn"
@
click=
"jumpGuide"
fn=
"审批模板创建指引"
>
查看创建审批模板指引
</GLButton
>
<
!--
<el-button
type=
"text"
class=
"guide-btn"
@
click=
"jumpGuide"
>
查看创建审批模板指引>
</el-button>
--
>
</div>
<div
class=
"config-list"
>
<div
class=
"config-item"
v-for=
"(item, index) in configList"
:key=
"item.id"
>
...
...
@@ -77,7 +77,6 @@ export default {
this
.
getApprove
()
},
mounted
()
{
this
.
oldConfig
=
util
.
deepClone
(
this
.
config
)
this
.
clientHeight
=
document
.
documentElement
.
scrollHeight
-
140
},
methods
:
{
...
...
@@ -85,7 +84,7 @@ export default {
edit
(
index
)
{
this
.
configList
[
index
].
disabled
=
false
},
//
编辑
//
提交
submit
(
model
,
index
)
{
this
.
oldConfig
[
model
]
=
this
.
config
[
model
]
this
.
configList
[
index
].
disabled
=
true
...
...
@@ -109,6 +108,7 @@ export default {
},
// 取消
cancel
(
model
,
index
)
{
console
.
log
(
this
.
oldConfig
[
model
])
this
.
config
[
model
]
=
this
.
oldConfig
[
model
]
this
.
configList
[
index
].
disabled
=
true
},
...
...
@@ -121,6 +121,7 @@ export default {
// const merchantId = 44209572
this
.
$apis
.
approvalConfig
.
getApproveDetail
({
merchantId
}).
then
(
res
=>
{
this
.
config
.
approveTemplateId
=
res
this
.
oldConfig
=
util
.
deepClone
(
this
.
config
)
})
}
}
...
...
src/views/baseInfo/editInfo.vue
View file @
548e344
<!--
* @Author: your name
* @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-03-
07 14:43:18
* @LastEditTime: 2022-03-
14 21:04:10
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
...
...
@@ -15,9 +15,9 @@
<el-input
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=
"业务类型"
>
<el-form-item
size=
"small"
label=
"
经营
业务类型"
>
<el-checkbox-group
v-model=
"infoForm.businessType"
>
<el-checkbox
:label=
"item.dictValue"
v-for=
"item in businessType"
:key=
"item.dictValue"
>
{{
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-form-item>
<el-form-item
size=
"small"
label=
"营业时间"
class=
"time-row"
>
...
...
@@ -58,7 +58,7 @@ export default {
dialogMapVisible
:
false
,
mapHeight
:
450
,
infoForm
:
{
businessType
:
[],
businessType
:
[
1
,
2
,
3
,
4
,
5
,
6
],
bussinessTime
:
[]
},
businessType
:
[],
...
...
@@ -88,10 +88,11 @@ export default {
channelId
}
if
(
!
businessType
)
{
this
.
infoForm
.
businessType
=
[]
this
.
infoForm
.
businessType
=
[
1
,
2
,
3
,
4
,
5
,
6
]
}
else
{
const
businessType
=
this
.
infoForm
.
businessType
.
split
(
','
)
this
.
infoForm
.
businessType
=
businessType
.
map
(
item
=>
(
item
=
parseInt
(
item
)))
console
.
log
(
this
.
infoForm
.
businessType
)
}
console
.
log
(
this
.
infoForm
.
businessType
)
const
brandListTree
=
await
this
.
$apis
.
baseInfo
.
brandList
({
needCarSeries
:
true
})
...
...
@@ -139,7 +140,7 @@ export default {
if
(
params
.
bussinessTime
)
{
params
.
bussinessBegintime
=
params
.
bussinessTime
[
0
]
params
.
bussinessEndtime
=
params
.
bussinessTime
[
1
]
}
else
{
}
else
{
params
.
bussinessBegintime
=
''
params
.
bussinessEndtime
=
''
}
...
...
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