Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
杨明
/
scrm-micro-config
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 664711f5
authored
Oct 28, 2021
by
ym
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
edit
1 parent
fb818580
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
463 additions
and
218 deletions
src/api/modules/store.js
src/router/routes.js
src/views/home/addAccount.vue → src/views/account/addAccount.vue
src/views/home/components/selectProduct.vue → src/views/account/components/selectProduct.vue
src/views/home/editAccount.vue → src/views/account/editAccount.vue
src/views/home/index.vue → src/views/account/index.vue
src/api/modules/store.js
View file @
664711f
...
...
@@ -8,74 +8,101 @@
*/
import
{
http
}
from
'@/main'
const
findMerchantByPage
=
params
=>
{
params
.
method
=
'cn.com.glsx.merchants.menu.findMerchantByPage'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
params
.
method
=
'cn.com.glsx.merchants.menu.findMerchantByPage'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
findAllDictData
=
params
=>
{
params
.
method
=
'cn.com.glsx.merchants.menu.findAllDictData'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
params
.
method
=
'cn.com.glsx.merchants.menu.findAllDictData'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//主营品牌
const
getCarbrandTree
=
params
=>
{
params
.
method
=
'cn.com.glsx.merchants.merchantCommon.getCarbrandTree'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
params
.
method
=
'cn.com.glsx.merchants.merchantCommon.getCarbrandTree'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//详情
const
findMerchantDetail
=
params
=>
{
params
.
method
=
'cn.com.glsx.merchants.merchant.findMerchantDetail'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
params
.
method
=
'cn.com.glsx.merchants.merchant.findMerchantDetail'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//下一步
const
saveMerchant
=
params
=>
{
params
.
method
=
'cn.com.glsx.merchants.merchant.saveMerchant'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
params
.
method
=
'cn.com.glsx.merchants.merchant.saveMerchant'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
findPermissionsByMerId
=
params
=>
{
params
.
method
=
'cn.com.glsx.merchants.merchant.findPermissionsByMerId
'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
const
updateMerchant
=
params
=>
{
params
.
method
=
'cn.com.glsx.merchants.merchant.updateMerchant
'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//功能权限
const
findPermissionsByMerId
=
params
=>
{
params
.
method
=
'cn.com.glsx.merchants.merchant.findPermissionsByMerId'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//功能权限
const
findMenuFunTreeByMerId
=
params
=>
{
params
.
method
=
'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
params
.
method
=
'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//草稿保存
const
updatePermissions
=
params
=>
{
params
.
method
=
'cn.com.glsx.merchants.merchant.updatePermissions'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
findMerchantByPage
,
findAllDictData
,
getCarbrandTree
,
findMerchantDetail
,
saveMerchant
,
findPermissionsByMerId
,
findMenuFunTreeByMerId
findMerchantByPage
,
findAllDictData
,
getCarbrandTree
,
findMerchantDetail
,
saveMerchant
,
updateMerchant
,
findPermissionsByMerId
,
findMenuFunTreeByMerId
,
updatePermissions
}
\ No newline at end of file
src/router/routes.js
View file @
664711f
const
staticRoutes
=
Object
.
freeze
([{
name
:
'home
'
,
path
:
'/
'
,
meta
:
{},
component
:
resolve
=>
require
([
`@/views/home
/index.vue`
],
resolve
)
},
{
name
:
'addAccount'
,
path
:
'/a
count/addAccount'
,
meta
:
{},
component
:
resolve
=>
require
([
`@/views/home
/addAccount.vue`
],
resolve
)
},
{
name
:
'editAccount'
,
path
:
'/a
count/editAccount'
,
meta
:
{},
component
:
resolve
=>
require
([
`@/views/home
/editAccount.vue`
],
resolve
)
},
{
name
:
'role'
,
path
:
'/role/index/index'
,
component
:
resolve
=>
require
([
`@/views/role/index/index.vue`
],
resolve
),
meta
:
{}
},
{
name
:
'role'
,
path
:
'/role/create/index'
,
component
:
resolve
=>
require
([
`@/views/role/create/index.vue`
],
resolve
),
meta
:
{}
},
{
name
:
'role'
,
path
:
'/role/index/look'
,
component
:
resolve
=>
require
([
`@/views/role/index/look.vue`
],
resolve
),
meta
:
{}
},
{
name
:
'baseInfo'
,
path
:
'/baseInfo/index'
,
component
:
resolve
=>
require
([
`@/views/baseInfo/index.vue`
],
resolve
),
meta
:
{}
},
{
name
:
'baseInfo'
,
path
:
'/baseInfo/relevance'
,
component
:
resolve
=>
require
([
`@/views/baseInfo/relevance.vue`
],
resolve
),
meta
:
{}
},
name
:
'account
'
,
path
:
'/account/index
'
,
meta
:
{},
component
:
resolve
=>
require
([
`@/views/account
/index.vue`
],
resolve
)
},
{
name
:
'addAccount'
,
path
:
'/ac
count/addAccount'
,
meta
:
{},
component
:
resolve
=>
require
([
`@/views/account
/addAccount.vue`
],
resolve
)
},
{
name
:
'editAccount'
,
path
:
'/ac
count/editAccount'
,
meta
:
{},
component
:
resolve
=>
require
([
`@/views/account
/editAccount.vue`
],
resolve
)
},
{
name
:
'role'
,
path
:
'/role/index/index'
,
component
:
resolve
=>
require
([
`@/views/role/index/index.vue`
],
resolve
),
meta
:
{}
},
{
name
:
'role'
,
path
:
'/role/create/index'
,
component
:
resolve
=>
require
([
`@/views/role/create/index.vue`
],
resolve
),
meta
:
{}
},
{
name
:
'role'
,
path
:
'/role/index/look'
,
component
:
resolve
=>
require
([
`@/views/role/index/look.vue`
],
resolve
),
meta
:
{}
},
{
name
:
'baseInfo'
,
path
:
'/baseInfo/index'
,
component
:
resolve
=>
require
([
`@/views/baseInfo/index.vue`
],
resolve
),
meta
:
{}
},
{
name
:
'baseInfo'
,
path
:
'/baseInfo/relevance'
,
component
:
resolve
=>
require
([
`@/views/baseInfo/relevance.vue`
],
resolve
),
meta
:
{}
},
])
export
default
staticRoutes
\ No newline at end of file
src/views/
home
/addAccount.vue
→
src/views/
account
/addAccount.vue
View file @
664711f
<
template
>
<div
class=
"scrm-main"
>
<div
v-show=
"!parentId"
>
<div
class=
"account-header scrm-flex-between scrm-box-f"
>
创建子商户/门店
</div>
<div
v-show=
"step == 1"
>
<div
class=
"account-header scrm-flex-between scrm-box-f"
>
<span>
创建子商户/门店
</span>
<el-select
v-model=
"status"
slot=
"prepend"
placeholder=
"请选择"
>
<el-option
label=
"门店"
:value=
"1"
></el-option>
<el-option
label=
"商户"
:value=
"2"
></el-option>
</el-select>
</div>
<div
class=
"account-body scrm-box-f"
>
<div
class=
"form-title"
>
企业基本信息
</div>
<el-form
...
...
@@ -69,12 +75,14 @@
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"商户地址"
>
<el-input
size=
"small"
v-model=
"accountAddForm.merchantAddress"
>
<el-button
slot=
"append"
@
click=
"dialogMapVisible = true"
>
选择地址
</el-button
>
</el-input>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"form-row"
>
<el-input
v-model=
"accountAddForm.merchantAddress"
>
</el-input>
<el-button
type=
"primary"
class=
"form-btn"
@
click=
"dialogMapVisible = true"
>
选择地址
</el-button
>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -195,16 +203,36 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"门店照片"
>
<el-upload
action=
""
class=
"image-uploader"
:show-file-list=
"false"
list-type=
"picture-card"
v-loading=
"loadingImg"
:before-upload=
"upLoadImg"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
<div
class=
"store-upload-list"
>
<template
v-if=
"
accountAddForm.merchantFiles &&
accountAddForm.merchantFiles.length > 0
"
>
<div
:key=
"index"
v-for=
"(item, index) in accountAddForm.merchantFiles"
class=
"store-border"
>
<img
:src=
"item.fileUrl"
/>
<div
class=
"uploader-del-icon"
>
<i
class=
"el-icon-delete-solid"
@
click
.
stop=
"delImg(index)"
></i>
</div>
</div>
</
template
>
<el-upload
action=
""
class=
"image-uploader"
:show-file-list=
"false"
list-type=
"picture-card"
v-loading=
"loadingImg"
:before-upload=
"upLoadImg"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</div>
<div
class=
"tips"
>
图片格式仅支持JPG,PNG格式,大小1M
</div>
</el-form-item>
</el-col>
...
...
@@ -237,6 +265,7 @@
<el-form-item
label=
"账户等级"
>
<el-select
size=
"small"
:disabled=
"nextStatus"
v-model=
"accountDetail.merchantAccountLevel"
placeholder=
"请选择"
>
...
...
@@ -254,6 +283,7 @@
<el-col
:span=
"12"
>
<el-form-item
label=
"登录账户名"
prop=
"merchantLoginAccount"
>
<el-input
:disabled=
"nextStatus"
size=
"small"
v-model=
"accountInfoForm.merchantLoginAccount"
placeholder=
"请输入登录账户名"
...
...
@@ -263,6 +293,7 @@
<el-col
:span=
"12"
>
<el-form-item
label=
"登录密码"
prop=
"merchantLoginPassword"
>
<el-input
:disabled=
"nextStatus"
size=
"small"
type=
"password"
v-model=
"accountInfoForm.merchantLoginPassword"
...
...
@@ -279,6 +310,7 @@
:key=
"index"
:btnLabel=
"item.accounttypeName"
:btnValue=
"item.accounttypeId"
:stopClick=
"nextStatus"
@
getBtnStatus=
"getBtnStatus"
></auto-button>
</el-form-item>
...
...
@@ -288,14 +320,20 @@
</div>
</div>
<select-product
v-show=
"parentId"
v-show=
"step == 2"
ref=
"productForm"
:parentId=
"parentId"
:pid=
"accountAddForm.parentId"
:accountlevel=
"accountDetail.merchantAccountLevel"
></select-product>
<div
class=
"footer-panel"
>
<el-button
type=
"primary"
@
click=
"handleNext"
>
下一步
</el-button>
<el-button
type=
"primary"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleNext"
v-show=
"step == 1"
>
下一步
</el-button>
<el-button
type=
"primary"
@
click=
"handleSave(1)"
v-show=
"step == 2"
>
存草稿
</el-button
>
<el-button
type=
"primary"
@
click=
"handlePrev"
v-show=
"step == 2"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"handleSave(2)"
v-show=
"step == 2"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"handleCancel"
>
取消
</el-button>
</div>
<el-dialog
:visible
.
sync=
"dialogMapVisible"
width=
"60%"
>
<map-view
ref=
"mapForm"
:mapHeight=
"mapHeight"
></map-view>
...
...
@@ -320,20 +358,22 @@ export default {
},
data
()
{
return
{
nextStatus
:
false
,
filterText
:
""
,
brandData
:
[],
defaultProps
:
{
children
:
"children"
,
label
:
"label"
,
},
parentId
:
"1"
,
parentId
:
""
,
step
:
1
,
mapHeight
:
400
,
typeLabel
:
""
,
typeStatus
:
false
,
loadingImg
:
false
,
dialogMapVisible
:
false
,
businessScopeCustomize
:
[{
name
:
""
}],
accountAddForm
:
{
status
:
1
,
merchantType
:
"1"
,
businessScope
:
[],
parentId
:
""
,
...
...
@@ -343,7 +383,6 @@ export default {
accountInfoForm
:
{},
accountDetail
:
{},
accountLevel
:
[],
accountType
:
[],
businessOption
:
[],
accountValidityPeriod
:
[],
baseRules
:
{
...
...
@@ -375,7 +414,6 @@ export default {
getAddress
()
{
this
.
dialogMapVisible
=
false
;
this
.
accountAddForm
.
merchantAddress
=
this
.
$refs
.
mapForm
.
address
;
console
.
log
(
this
.
accountAddForm
.
merchantAddress
);
},
getBtnStatus
(
status
,
value
)
{
if
(
status
)
{
...
...
@@ -419,6 +457,24 @@ export default {
};
}
},
handleSave
(
status
)
{
let
accountTypes
=
this
.
$refs
.
productForm
.
accountTypes
;
if
(
!
accountTypes
.
every
((
item
)
=>
item
.
products
))
{
this
.
$message
.
error
(
"请选择产品"
);
}
let
params
=
{
status
,
merchantId
:
this
.
parentId
,
accountTypes
:
this
.
$refs
.
productForm
.
accountTypes
,
};
this
.
$apis
.
store
.
updatePermissions
(
params
).
then
((
res
)
=>
{
console
.
log
(
res
);
});
},
handleCancel
()
{},
handlePrev
()
{
this
.
step
=
1
;
},
//下一步
handleNext
()
{
const
pm1
=
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -445,10 +501,22 @@ export default {
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
((
item
)
=>
item
.
name
);
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
","
);
params
.
accounttypeId
=
this
.
accounttypeId
.
join
(
","
);
let
merchant
;
if
(
this
.
nextStatus
)
{
merchant
=
"updateMerchant"
;
params
.
id
=
this
.
parentId
;
}
else
{
merchant
=
"saveMerchant"
;
}
Promise
.
all
([
pm1
,
pm2
]).
then
(()
=>
{
this
.
$apis
.
store
.
saveMerchant
(
params
).
then
((
res
)
=>
{
this
.
$apis
.
store
[
merchant
]
(
params
).
then
((
res
)
=>
{
if
(
res
)
{
this
.
parentId
=
res
;
this
.
step
=
2
;
this
.
nextStatus
=
true
;
if
(
typeof
res
==
"number"
)
{
this
.
parentId
=
res
;
}
this
.
twoMerchantDetail
(
this
.
parentId
);
}
});
});
...
...
@@ -462,13 +530,6 @@ export default {
if
(
dictType
==
"account_level"
)
{
this
.
accountLevel
=
res
;
}
if
(
dictType
==
"account_type"
)
{
this
.
accountType
=
res
;
let
idx
=
this
.
accountType
.
findIndex
(
(
item
)
=>
(
item
.
dictValue
=
this
.
accountDetail
.
accountType
)
);
this
.
typeLabel
=
this
.
accountType
[
idx
].
dictLabel
;
}
if
(
dictType
==
"business_scope"
)
{
this
.
businessOption
=
res
;
}
...
...
@@ -485,7 +546,15 @@ export default {
this
.
accountDetail
=
await
this
.
$apis
.
store
.
findMerchantDetail
({
id
:
this
.
accountAddForm
.
parentId
,
});
this
.
findAllDictData
(
"account_type"
);
},
twoMerchantDetail
(
pid
)
{
this
.
$apis
.
store
.
findMerchantDetail
({
id
:
pid
,
})
.
then
((
res
)
=>
{
console
.
log
(
res
);
});
},
getCarbrandTree
()
{
this
.
$apis
.
store
.
getCarbrandTree
({}).
then
((
res
)
=>
{
...
...
@@ -543,6 +612,49 @@ export default {
&
-form
{
width
:
80%
;
margin
:
20px
auto
;
.form-row
{
/deep/
.el-form-item__content
{
display
:
flex
;
}
.form-btn
{
margin-left
:
10px
;
}
}
.store-upload-list
{
display
:
flex
;
flex-wrap
:
wrap
;
.store-border
{
position
:
relative
;
width
:
120px
;
height
:
80px
;
border-radius
:
2px
;
margin-right
:
15px
;
margin-bottom
:
15px
;
}
.uploader-del-icon
{
position
:
absolute
;
top
:
0px
;
right
:
0px
;
width
:
30px
;
height
:
30px
;
line-height
:
30px
;
background
:
rgba
(
0
,
0
,
0
,
0.4
);
border-radius
:
0px
0px
0px
100px
;
cursor
:
pointer
;
}
.el-icon-delete-solid
{
color
:
#c5c5c5
;
font-size
:
14px
;
margin-left
:
12px
;
}
}
.image-uploader
{
/deep/
.el-upload
{
width
:
120px
;
height
:
80px
;
line-height
:
80px
;
}
}
.brand-tree
{
height
:
300px
;
overflow-y
:
auto
;
...
...
src/views/
home
/components/selectProduct.vue
→
src/views/
account
/components/selectProduct.vue
View file @
664711f
...
...
@@ -16,38 +16,54 @@
v-show=
"tabName == item.accounttypeId"
>
<label>
选择产品
</label>
<el-checkbox-group
v-model=
"item.productsArr"
@
change=
"selectPro(index)"
>
<el-checkbox
v-for=
"(itm, idx) in item.products"
:label=
"itm.productName"
:key=
"idx"
></el-checkbox>
<el-checkbox-group
v-model=
"item.productsArr"
@
change=
"selectPro()"
>
<el-checkbox
v-for=
"(itm, idx) in item.products"
:label=
"itm"
:key=
"idx"
>
{{
itm
.
productName
}}
</el-checkbox>
</el-checkbox-group>
</div>
<div
class=
"account-select-menu"
>
请选择产品权限
</div>
<div
class=
"menu-box"
>
<div
:key=
"index"
v-for=
"(item, index) in tabMenu"
>
<div
class=
"menu-box-tab"
v-show=
"tabName == item.accounttypeId"
>
<div
class=
"tab-item text-hide"
v-for=
"(itm, idx) in item.productsArr"
:key=
"idx"
>
{{
itm
}}
<div
class=
"menu-box-panel"
>
<div
:key=
"index"
v-for=
"(item, index) in tabMenu"
>
<div
class=
"menu-box-tab"
v-show=
"tabName == item.accounttypeId"
>
<div
v-show=
"item.productsArr.indexOf(itm) != -1"
class=
"tab-item text-hide"
:class=
"
{ 'select-checked': item.productId == itm.productId }"
@click="item.productId = itm.productId"
v-for="(itm, idx) in item.products"
:key="idx"
>
{{
itm
.
productName
}}
</div>
</div>
<div
v-show=
"tabName == item.accounttypeId"
class=
"menu-box-tree"
v-if=
"item.products"
:style=
"
{ height: treeHeight + 'px' }"
>
<div
v-for=
"(itm, idx) in item.products"
:key=
"idx"
v-show=
"item.productId == itm.productId"
>
<el-tree
:data=
"itm.merchantProTreeResponses"
show-checkbox
default-expand-all
node-key=
"id"
:class=
"'tree_'+ itm.productId"
:ref=
"'tree_'+ itm.productId"
highlight-current
:props=
"defaultProps"
>
</el-tree>
</div>
</div>
</div>
</div>
<div
v-if=
"item.products[0]"
class=
"menu-box-tree"
v-show=
"tabName == item.accounttypeId && item.productsArr.indexOf(item.accounttypeName) != -1"
>
<el-tree
:data=
"item.products[0].merchantProTreeResponses"
show-checkbox
default-expand-all
node-key=
"id"
ref=
"brandTree"
highlight-current
:props=
"defaultProps"
>
</el-tree>
</div>
</div>
</div>
</div>
</
template
>
...
...
@@ -70,12 +86,14 @@ export default {
data
()
{
return
{
treeHeight
:
300
,
tabMenu
:
[],
selectIndex
:
0
,
productId
:
0
,
products
:
[],
productsArr
:
[],
tabName
:
""
,
defaultProps
:
{
defaultProps
:
{
children
:
"children"
,
label
:
"label"
,
},
...
...
@@ -83,12 +101,29 @@ export default {
},
methods
:
{
selectPro
()
{},
selectPro
()
{
this
.
accountTypes
=
this
.
tabMenu
.
map
((
item
)
=>
{
let
products
=
[];
item
.
productsArr
.
forEach
((
itm
)
=>
{
console
.
log
(
this
.
$refs
[
`tree_+
${
itm
.
productId
}
`
]?
this
.
$refs
[
`tree_+
${
itm
.
productId
}
`
][
0
].
getCheckedKeys
():
0
)
products
.
push
({
productId
:
itm
.
productId
,
functionIds
:
itm
.
functionIds
,
menuIds
:
this
.
$refs
[
`tree_+
${
itm
.
productId
}
`
]?
this
.
$refs
[
`tree_+
${
itm
.
productId
}
`
][
0
].
getCheckedKeys
():[]
})
});
return
{
accounttypeId
:
item
.
accounttypeId
,
products
,
};
});
console
.
log
(
this
.
accountTypes
)
},
findPermissionsByMerId
()
{
let
params
=
{
accountlevel
:
2
,
parentId
:
415
13
,
id
:
415
55
,
parentId
:
415
68
,
id
:
415
70
,
};
this
.
$apis
.
store
.
findMenuFunTreeByMerId
(
params
).
then
((
res
)
=>
{
this
.
tabMenu
=
res
.
map
((
item
)
=>
{
...
...
@@ -97,6 +132,14 @@ export default {
products
:
item
.
products
,
accounttypeName
:
item
.
accounttypeName
,
accounttypeId
:
item
.
accounttypeId
,
merchantProTreeResponses
:
item
.
merchantProTreeResponses
,
productId
:
""
,
};
});
this
.
accountTypes
=
res
.
map
((
item
)
=>
{
return
{
products
:
null
,
accounttypeId
:
item
.
accounttypeId
,
};
});
this
.
tabName
=
this
.
tabMenu
[
0
].
accounttypeId
;
...
...
@@ -153,9 +196,21 @@ export default {
font-size
:
14px
;
line-height
:
14px
;
font-weight
:
400
;
color
:
#3
22ad9
;
color
:
#3
7383a
;
text-align
:
center
;
padding
:
12px
0px
;
cursor
:
pointer
;
&.select-checked
{
color
:
#322ad9
;
font-weight
:
700
;
border-bottom
:
none
;
}
}
.menu-box-tab
{
display
:
flex
;
}
.menu-box-tree
{
background
:
#ffffff
;
}
}
}
...
...
src/views/
home
/editAccount.vue
→
src/views/
account
/editAccount.vue
View file @
664711f
<
template
>
<div
class=
"scrm-main"
>
<el-tabs
v-model=
"step"
@
tab-click=
"handleClick"
class=
"tab-edit-status"
>
<el-tab-pane
label=
"修改功能权限"
name=
"first"
></el-tab-pane>
<el-tab-pane
label=
"修改基本信息"
name=
"second"
></el-tab-pane>
</el-tabs>
<div
v-show=
"step == 'second'"
>
<div
class=
"account-body scrm-box-f"
>
<div
class=
"form-title"
>
修改账户信息
</div>
<el-form
...
...
@@ -32,10 +37,19 @@
>
<el-input
type=
"password"
:readonly=
"pwdStatus ? 'readonly' : false"
v-model=
"accountInfoForm.merchantLoginPassword"
placeholder=
"请输入登录密码"
></el-input>
<el-button
type=
"primary"
class=
"form-btn"
>
重置密码
</el-button>
<el-button
type=
"primary"
class=
"form-btn"
@
click=
"
pwdStatus = false;
accountInfoForm.merchantLoginPassword = '';
"
>
重置密码
</el-button
>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -47,7 +61,11 @@
:key=
"index"
:btnLabel=
"item.accounttypeName"
:btnValue=
"item.accounttypeId"
typeStatus=
"true"
:typeStatus=
"
accountAddForm.accountTypeNames.search(item.accounttypeName) == -1
? false
: true
"
stopClick=
"true"
></auto-button>
</el-form-item>
...
...
@@ -122,12 +140,11 @@
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"商户地址"
>
<el-input
size=
"small"
v-model=
"accountAddForm.merchantAddress"
>
<el-button
slot=
"append"
@
click=
"dialogMapVisible = true"
>
选择地址
</el-button
>
</el-input>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"form-row"
>
<el-input
readonly
size=
"small"
v-model=
"accountAddForm.merchantAddress"
>
</el-input>
<el-button
type=
"primary"
class=
"form-btn"
@
click=
"dialogMapVisible = true"
>
选择地址
</el-button
>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -251,13 +268,13 @@
<div
class=
"store-upload-list"
>
<template
v-if=
"
accountAddForm.merchantFile
Response
s &&
accountAddForm.merchantFile
Response
s.length > 0
accountAddForm.merchantFiles &&
accountAddForm.merchantFiles.length > 0
"
>
<div
:key=
"index"
v-for=
"(item, index) in accountAddForm.merchantFile
Response
s"
v-for=
"(item, index) in accountAddForm.merchantFiles"
class=
"store-border"
>
<img
:src=
"item.fileUrl"
/>
...
...
@@ -284,6 +301,10 @@
</el-row>
</el-form>
</div>
</div>
<div
v-show=
"step == 'first'"
>
<select-product></select-product>
</div>
<div
class=
"footer-panel"
>
<el-button
type=
"primary"
@
click=
"handleNext"
>
确定
</el-button>
<el-button
type=
"primary"
>
取消
</el-button>
...
...
@@ -301,15 +322,18 @@
<
script
>
import
mapView
from
"@/components/mapView/index"
;
import
autoButton
from
"@/components/auto-button/index"
;
import
selectProduct
from
"./components/selectProduct"
;
export
default
{
name
:
"index"
,
components
:
{
mapView
,
autoButton
,
selectProduct
},
data
()
{
return
{
activeName
:
"first"
,
pwdStatus
:
true
,
step
:
"first"
,
filterText
:
""
,
brandData
:
[],
defaultProps
:
{
...
...
@@ -378,7 +402,7 @@ export default {
}
},
delImg
(
index
)
{
this
.
accountAddForm
.
merchantFile
Response
s
.
splice
(
index
,
1
);
this
.
accountAddForm
.
merchantFiles
.
splice
(
index
,
1
);
},
upLoadImg
(
file
)
{
let
fileName
=
file
.
name
;
...
...
@@ -408,7 +432,9 @@ export default {
})
.
then
((
res
)
=>
{
if
(
res
)
{
console
.
log
(
res
);
self
.
accountAddForm
.
merchantFiles
.
push
({
fileUrl
:
res
,
});
}
});
};
...
...
@@ -436,7 +462,6 @@ export default {
}
params
.
merchantBrand
=
this
.
$refs
.
brandTree
.
getCheckedKeys
().
join
(
","
);
params
.
isloginName
?
(
params
.
isloginName
=
1
)
:
(
params
.
isloginName
=
0
);
params
.
merchantAccountLevel
=
this
.
accountDetail
.
merchantAccountLevel
;
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
((
item
)
=>
item
.
name
);
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
","
);
params
.
accounttypeId
=
this
.
accounttypeId
.
join
(
","
);
...
...
@@ -466,32 +491,51 @@ export default {
this
.
businessScopeCustomize
.
splice
(
index
,
1
);
},
async
findMerchantDetail
()
{
this
.
accountAddForm
=
await
this
.
$apis
.
store
.
findMerchantDetail
({
id
:
this
.
accountAddForm
.
parentId
,
});
this
.
accountInfoForm
.
merchantLoginAccount
=
this
.
accountAddForm
.
merchantLoginAccount
;
this
.
accountInfoForm
.
merchantLoginPassword
=
this
.
accountAddForm
.
merchantLoginPassword
;
this
.
accountTypes
=
this
.
accountAddForm
.
accountTypes
;
this
.
accountAddForm
.
businessScope
=
this
.
accountAddForm
.
businessScope
?
this
.
accountAddForm
.
businessScope
.
split
(
","
)
:
[];
for
(
let
i
in
this
.
accountAddForm
.
businessScope
)
{
this
.
accountAddForm
.
businessScope
[
i
]
=
parseInt
(
this
.
accountAddForm
.
businessScope
[
i
]
);
}
this
.
accountAddForm
.
bussinessTime
=
[
this
.
accountAddForm
.
bussinessBegintime
,
this
.
accountAddForm
.
bussinessEndtime
,
];
let
businessScopeCustomize
=
this
.
accountAddForm
.
businessScopeCustomize
?
this
.
accountAddForm
.
businessScopeCustomize
.
split
(
","
)
:
[];
this
.
businessScopeCustomize
=
businessScopeCustomize
.
map
((
item
)
=>
{
return
{
name
:
item
,
};
});
this
.
$apis
.
store
.
findMerchantDetail
({
id
:
this
.
accountAddForm
.
parentId
,
})
.
then
((
res
)
=>
{
this
.
accountAddForm
=
res
;
this
.
accountInfoForm
.
merchantLoginAccount
=
this
.
accountAddForm
.
merchantLoginAccount
;
this
.
accountInfoForm
.
merchantLoginPassword
=
this
.
accountAddForm
.
merchantLoginPassword
;
this
.
accountTypes
=
this
.
accountAddForm
.
accountTypes
;
this
.
accountAddForm
.
businessScope
=
this
.
accountAddForm
.
businessScope
?
this
.
accountAddForm
.
businessScope
.
split
(
","
)
:
[];
for
(
let
i
in
this
.
accountAddForm
.
businessScope
)
{
this
.
accountAddForm
.
businessScope
[
i
]
=
parseInt
(
this
.
accountAddForm
.
businessScope
[
i
]
);
}
this
.
accountAddForm
.
bussinessTime
=
[
this
.
accountAddForm
.
bussinessBegintime
,
this
.
accountAddForm
.
bussinessEndtime
,
];
let
businessScopeCustomize
=
this
.
accountAddForm
.
businessScopeCustomize
?
this
.
accountAddForm
.
businessScopeCustomize
.
split
(
","
)
:
[
""
];
this
.
businessScopeCustomize
=
businessScopeCustomize
.
map
((
item
)
=>
{
return
{
name
:
item
,
};
});
this
.
accountAddForm
.
merchantFiles
=
this
.
accountAddForm
.
merchantFileResponses
.
map
(
(
item
)
=>
{
return
{
fileUrl
:
item
.
fileUrl
,
};
}
);
let
merchantBrand
=
this
.
accountAddForm
.
merchantBrand
?
this
.
accountAddForm
.
merchantBrand
.
split
(
","
)
:
[];
for
(
let
i
in
merchantBrand
)
{
merchantBrand
[
i
]
=
parseInt
(
merchantBrand
[
i
]);
}
this
.
$refs
.
brandTree
.
setCheckedKeys
(
merchantBrand
);
});
},
getCarbrandTree
()
{
this
.
$apis
.
store
.
getCarbrandTree
({}).
then
((
res
)
=>
{
...
...
@@ -509,6 +553,11 @@ export default {
</
script
>
<
style
scoped
lang=
"scss"
>
.tab-edit-status
{
/deep/
.
el-tabs__nav-wrap
::
after
{
display
:
none
;
}
}
.account-header
{
height
:
78px
;
box-sizing
:
border-box
;
...
...
@@ -531,8 +580,8 @@ export default {
}
}
.account-body
{
margin-top
:
20px
;
&:nth-of-type(2)
{
&:nth-of-type(3)
{
margin-top
:
20px
;
margin-bottom
:
70px
;
}
.form-title
{
...
...
src/views/
home
/index.vue
→
src/views/
account
/index.vue
View file @
664711f
...
...
@@ -141,9 +141,11 @@ export default {
},
methods
:
{
handleLook
()
{},
handleEdit
()
{},
handleEdit
(
scope
)
{
this
.
$router
.
push
({
path
:
'/account/editAccount'
,
query
:{
id
:
scope
.
id
}})
},
handleAdd
(
scope
)
{
this
.
$router
.
push
({
path
:
'/acount/addAccount'
,
query
:{
id
:
scope
.
id
}})
this
.
$router
.
push
({
path
:
'/ac
c
ount/addAccount'
,
query
:{
id
:
scope
.
id
}})
},
findAllDictData
(
dictType
)
{
var
params
=
{
...
...
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