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 5400f919
authored
Dec 29, 2021
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.0.1' of
http://192.168.3.233:8090/saas/scrm-micro-settings
into v1.0.1
2 parents
dce0b16a
953ad1f9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
29 deletions
src/views/account/addAccount.vue
src/views/account/editAccount.vue
src/views/account/index.vue
src/views/employee/editEmployee.vue
src/views/role/create.vue
src/views/account/addAccount.vue
View file @
5400f91
...
@@ -110,13 +110,14 @@ export default {
...
@@ -110,13 +110,14 @@ export default {
}
}
}
}
const
validatePwd
=
(
rule
,
value
,
callback
)
=>
{
const
validatePwd
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
(
/^
(?![
0-9
]
+$
)(?![
a-zA-Z
]
+$
)[
0-9A-Za-z
]{6,20}
$/
.
test
(
value
)
))
{
if
(
!
/^
(?=
.*
\d)(?=
.*
[
a-zA-Z
])[\s\S]{6,20}
$/
.
test
(
value
))
{
callback
(
new
Error
(
'请输入正确的6-20个
字母+数字密码
'
))
callback
(
new
Error
(
'请输入正确的6-20个
密码,必须同时包含字母、数字。
'
))
}
else
{
}
else
{
callback
()
callback
()
}
}
}
}
return
{
return
{
editStatus
:
false
,
nextStatus
:
false
,
nextStatus
:
false
,
accountTypesRule
:
false
,
accountTypesRule
:
false
,
filterText
:
''
,
filterText
:
''
,
...
@@ -166,12 +167,33 @@ export default {
...
@@ -166,12 +167,33 @@ export default {
}
}
}
}
},
},
watch
:
{
accountInfoForm
:
{
handler
()
{
this
.
editStatus
=
true
},
deep
:
true
},
accountDetail
:
{
handler
()
{
this
.
editStatus
=
true
},
deep
:
true
},
accountAddForm
:
{
handler
()
{
this
.
editStatus
=
true
},
deep
:
true
}
},
methods
:
{
methods
:
{
getAddress
()
{
getAddress
()
{
this
.
dialogMapVisible
=
false
this
.
dialogMapVisible
=
false
this
.
accountAddForm
.
merchantAddress
=
this
.
$refs
.
mapForm
.
address
this
.
accountAddForm
.
merchantAddress
=
this
.
$refs
.
mapForm
.
address
},
},
getBtnStatus
(
status
,
value
)
{
getBtnStatus
(
status
,
value
)
{
this
.
editStatus
=
true
this
.
accountTypesRule
=
false
this
.
accountTypesRule
=
false
if
(
status
)
{
if
(
status
)
{
this
.
accounttypeId
.
push
(
value
)
this
.
accounttypeId
.
push
(
value
)
...
@@ -199,7 +221,21 @@ export default {
...
@@ -199,7 +221,21 @@ export default {
})
})
},
},
handleCancel
()
{
handleCancel
()
{
this
.
$router
.
push
(
'/account/index'
)
if
(
this
.
editStatus
)
{
this
.
$confirm
(
'当前有内容信息未保存,是否继续返回?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/account/index'
})
})
}
else
{
this
.
$router
.
push
({
path
:
'/account/index'
})
}
},
},
handlePrev
()
{
handlePrev
()
{
document
.
querySelector
(
'#app'
).
scrollTop
=
0
document
.
querySelector
(
'#app'
).
scrollTop
=
0
...
@@ -339,6 +375,9 @@ export default {
...
@@ -339,6 +375,9 @@ export default {
})
})
this
.
accountDetail
.
merchantAccountLevel
=
4
this
.
accountDetail
.
merchantAccountLevel
=
4
}
}
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
})
})
})
},
},
twoMerchantDetail
(
pid
)
{
twoMerchantDetail
(
pid
)
{
...
...
src/views/account/editAccount.vue
View file @
5400f91
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
size=
"small"
label=
"登录密码"
prop=
"merchantLoginPassword"
class=
"form-row"
>
<el-form-item
size=
"small"
label=
"登录密码"
prop=
"merchantLoginPassword"
class=
"form-row"
>
<el-input
type=
"password"
:readonly=
"pwdStatus ? 'readonly' : false"
v-model=
"accountInfoForm.merchantLoginPassword"
placeholder=
"请输入登录密码(必须包含6-20个字母+数字)"
show-password
></el-input>
<el-input
type=
"password"
maxlength=
"20"
:readonly=
"pwdStatus ? 'readonly' : false"
v-model=
"accountInfoForm.merchantLoginPassword"
placeholder=
"请输入登录密码(必须包含6-20个字母+数字)"
show-password
></el-input>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"form-btn"
class=
"form-btn"
...
@@ -99,8 +99,8 @@ export default {
...
@@ -99,8 +99,8 @@ export default {
},
},
data
()
{
data
()
{
const
validatePwd
=
(
rule
,
value
,
callback
)
=>
{
const
validatePwd
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
/^
(?
![
0-9
]
+$
)(?![
a-zA-Z
]
+$
)[
0-9A-Za-z
]{6,20}
$/
.
test
(
value
))
{
if
(
!
/^
(?
=
.*
\d)(?=
.*
[
a-zA-Z
])[\s\S
]{6,20}
$/
.
test
(
value
))
{
callback
(
new
Error
(
'请输入正确的6-20个
字母+数字密码
'
))
callback
(
new
Error
(
'请输入正确的6-20个
密码,必须同时包含字母、数字。
'
))
}
else
{
}
else
{
callback
()
callback
()
}
}
...
@@ -225,7 +225,21 @@ export default {
...
@@ -225,7 +225,21 @@ export default {
}
}
},
},
handleCancel
()
{
handleCancel
()
{
this
.
$router
.
push
(
'/account/index'
)
if
(
this
.
editStatus
)
{
this
.
$confirm
(
'当前有内容信息未保存,是否继续返回?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$router
.
push
({
path
:
'/account/index'
})
})
}
else
{
this
.
$router
.
push
({
path
:
'/account/index'
})
}
},
},
//保存
//保存
handleSave
(
status
)
{
handleSave
(
status
)
{
...
...
src/views/account/index.vue
View file @
5400f91
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
<el-form-item
size=
"small"
label=
"商户号"
>
<el-form-item
size=
"small"
label=
"商户号"
>
<el-input
size=
"small"
v-model=
"searchForm.merchantNo"
onkeyup=
"value=value.replace(/[^\d]/g,'')"
placeholder=
"请输入商户号,仅限11位"
maxlength=
"11"
></el-input>
<el-input
size=
"small"
v-model=
"searchForm.merchantNo"
onkeyup=
"value=value.replace(/[^\d]/g,'')"
placeholder=
"请输入商户号,仅限11位"
maxlength=
"11"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
size=
"small"
style=
"float: right"
v-if=
"$globalState.session.accountLevel == 4"
>
<el-form-item
size=
"small"
style=
"float: right
; margin-right: 0px
"
v-if=
"$globalState.session.accountLevel == 4"
>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</el-form-item>
</el-form-item>
</el-row>
</el-row>
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
<el-form-item
size=
"small"
label=
"上级商户号"
>
<el-form-item
size=
"small"
label=
"上级商户号"
>
<el-input
size=
"small"
v-model=
"searchForm.parentMerchantNo"
onkeyup=
"value=value.replace(/[^\d]/g,'')"
placeholder=
"请输入上级商户号,仅限11位"
maxlength=
"11"
></el-input>
<el-input
size=
"small"
v-model=
"searchForm.parentMerchantNo"
onkeyup=
"value=value.replace(/[^\d]/g,'')"
placeholder=
"请输入上级商户号,仅限11位"
maxlength=
"11"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
size=
"small"
style=
"float: right"
>
<el-form-item
size=
"small"
style=
"float: right
; margin-right: 0px
"
>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</el-form-item>
</el-form-item>
</el-row>
</el-row>
...
@@ -270,12 +270,16 @@ export default {
...
@@ -270,12 +270,16 @@ export default {
.el-input--small
.el-input__inner
{
.el-input--small
.el-input__inner
{
width
:
215px
;
width
:
215px
;
}
}
.el-form--inline
.el-form-item
{
margin-right
:
10px
;
}
}
}
}
}
.accountType-row
{
.accountType-row
{
text-align
:
left
;
text-align
:
left
;
position
:
relative
;
position
:
relative
;
padding-left
:
15px
;
padding-left
:
15px
;
margin-bottom
:
2px
;
&::before
{
&::before
{
content
:
''
;
content
:
''
;
position
:
absolute
;
position
:
absolute
;
...
@@ -284,7 +288,7 @@ export default {
...
@@ -284,7 +288,7 @@ export default {
background
:
#5850ff
;
background
:
#5850ff
;
border-radius
:
8px
;
border-radius
:
8px
;
left
:
0px
;
left
:
0px
;
top
:
7
px
;
top
:
5
px
;
}
}
}
}
.merchant-row
{
.merchant-row
{
...
...
src/views/employee/editEmployee.vue
View file @
5400f91
...
@@ -99,7 +99,7 @@ export default {
...
@@ -99,7 +99,7 @@ export default {
{
{
required
:
true
,
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
;
/^
[\S]{6,15}
$/
.
test
(
value
)
?
callback
()
:
callback
(
new
Error
(
'密码必须6-15位
'
))
;
/^
(?=
.*
\d)(?=
.*
[
a-zA-Z
])[\s\S]{6,20}
$/
.
test
(
value
)
?
callback
()
:
callback
(
new
Error
(
'请输入正确的6-20个密码,必须同时包含字母、数字。
'
))
},
},
trigger
:
'change'
trigger
:
'change'
}
}
...
@@ -141,7 +141,7 @@ export default {
...
@@ -141,7 +141,7 @@ export default {
name
:
'password'
,
name
:
'password'
,
showPass
:
true
,
showPass
:
true
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
15
,
maxlength
:
20
,
suffixSlot
:
'passwordSlot'
suffixSlot
:
'passwordSlot'
},
},
{
{
...
...
src/views/role/create.vue
View file @
5400f91
...
@@ -18,10 +18,10 @@
...
@@ -18,10 +18,10 @@
<el-input
size=
"small"
disabled
style=
"width: 40%"
v-model=
"ruleForm.merchantName"
></el-input>
<el-input
size=
"small"
disabled
style=
"width: 40%"
v-model=
"ruleForm.merchantName"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"角色名称"
prop=
"roleName"
>
<el-form-item
label=
"角色名称"
prop=
"roleName"
>
<el-input
size=
"small"
maxlength=
"20"
style=
"width: 40%; padding-right: 50px"
v-model=
"ruleForm.roleName"
placeholder=
"请输入角色名称"
></el-input>
<el-input
size=
"small"
maxlength=
"20"
style=
"width: 40%; padding-right: 50px"
@
input=
"changeInput"
v-model=
"ruleForm.roleName"
placeholder=
"请输入角色名称"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"角色说明"
prop=
"roleDesc"
>
<el-form-item
label=
"角色说明"
prop=
"roleDesc"
>
<el-input
size=
"small"
maxlength=
"50"
style=
"width: 40%; padding-right: 50px"
v-model=
"ruleForm.roleDesc"
placeholder=
"请输入角色说明"
></el-input>
<el-input
size=
"small"
maxlength=
"50"
style=
"width: 40%; padding-right: 50px"
@
input=
"changeInput"
v-model=
"ruleForm.roleDesc"
placeholder=
"请输入角色说明"
></el-input>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"角色权限"
prop=
"roleRoot"
>
<!--
<el-form-item
label=
"角色权限"
prop=
"roleRoot"
>
<div
class=
"custom_element"
>
<div
class=
"custom_element"
>
...
@@ -107,7 +107,8 @@ export default {
...
@@ -107,7 +107,8 @@ export default {
// tree数据
// tree数据
treeDataList
:
[],
treeDataList
:
[],
accountLevel
:
1
,
accountLevel
:
1
,
isHaveEdit
:
false
isHaveEdit
:
false
,
isChangeEdit
:
false
}
}
},
},
watch
:
{
watch
:
{
...
@@ -119,6 +120,10 @@ export default {
...
@@ -119,6 +120,10 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
// 输入有变就触发提醒
changeInput
(){
this
.
isChangeEdit
=
true
},
// 获取角色信息
// 获取角色信息
getRoleData
(
id
)
{
getRoleData
(
id
)
{
this
.
$apis
.
role
.
roleInfoData
({
id
}).
then
(
res
=>
{
this
.
$apis
.
role
.
roleInfoData
({
id
}).
then
(
res
=>
{
...
@@ -195,6 +200,7 @@ export default {
...
@@ -195,6 +200,7 @@ export default {
},
},
// 选择商户权限
// 选择商户权限
selectCurAccount
(
item
,
index
)
{
selectCurAccount
(
item
,
index
)
{
this
.
isChangeEdit
=
true
this
.
roleRootRules
=
false
this
.
roleRootRules
=
false
this
.
accountListSelect
[
index
].
select
=
!
item
.
select
this
.
accountListSelect
[
index
].
select
=
!
item
.
select
this
.
curRootIndex
=
0
this
.
curRootIndex
=
0
...
@@ -292,34 +298,22 @@ export default {
...
@@ -292,34 +298,22 @@ export default {
}
}
},
},
insertRole
(
para
)
{
insertRole
(
para
)
{
this
.
$confirm
(
'是否保存当前信息?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$apis
.
role
.
createRole
(
para
).
then
(
res
=>
{
this
.
$apis
.
role
.
createRole
(
para
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
$router
.
push
(
'/role/index'
)
this
.
$router
.
push
(
'/role/index'
)
}
}
})
})
})
},
},
updateRole
(
para
)
{
updateRole
(
para
)
{
this
.
$confirm
(
'是否保存当前信息?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$apis
.
role
.
updateRole
(
para
).
then
(
res
=>
{
this
.
$apis
.
role
.
updateRole
(
para
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
$router
.
push
(
'/role/index'
)
this
.
$router
.
push
(
'/role/index'
)
}
}
})
})
})
},
},
toBack
()
{
toBack
()
{
if
(
this
.
isHaveEdit
&&
this
.
pageType
==
'create'
)
{
if
(
(
this
.
isHaveEdit
&&
this
.
pageType
==
'create'
)
||
(
this
.
isChangeEdit
&&
this
.
pageType
==
'edit'
)
)
{
this
.
$confirm
(
'
离开当前页面内容将不会保存,是否继续
?'
,
'提示'
,
{
this
.
$confirm
(
'
当前有内容信息未保存,是否继续返回
?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
...
...
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