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 7b1c06a8
authored
Dec 29, 2021
by
yangming
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
password
1 parent
2db571b1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
9 deletions
src/views/account/addAccount.vue
src/views/account/editAccount.vue
src/views/account/index.vue
src/views/account/addAccount.vue
View file @
7b1c06a
...
@@ -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 @
7b1c06a
...
@@ -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 @
7b1c06a
...
@@ -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
{
...
...
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