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 d85c7ded
authored
Jan 10, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加loading
1 parent
8ca5f117
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
src/views/account/addAccount.vue
src/views/account/addAccount.vue
View file @
d85c7de
<
template
>
<div
class=
"scrm-main"
>
<div
class=
"scrm-main"
v-loading=
"loading"
>
<div
v-show=
"step == 1"
>
<div
class=
"account-header scrm-flex-between scrm-box-f"
>
<span>
创建子商户/门店
</span>
...
...
@@ -110,6 +110,7 @@ export default {
}
}
return
{
loading
:
false
,
editStatus
:
false
,
nextStatus
:
false
,
accountTypesRule
:
false
,
...
...
@@ -232,10 +233,12 @@ export default {
},
//下一步
handleNext
()
{
this
.
loading
=
true
const
pm1
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
baseInfoForm
.
$refs
.
baseForm
.
validate
(
valid
=>
{
if
(
valid
)
resolve
()
else
{
this
.
loading
=
false
setTimeout
(()
=>
{
var
isError
=
document
.
getElementsByClassName
(
'is-error'
)
isError
[
0
].
querySelector
(
'input'
).
focus
()
...
...
@@ -248,6 +251,7 @@ export default {
this
.
$refs
.
accountInfoForm
.
validate
(
valid
=>
{
if
(
valid
)
resolve
()
else
{
this
.
loading
=
false
pm1
.
then
(()
=>
{
document
.
querySelector
(
'#app'
).
scrollTop
=
1000
})
...
...
@@ -259,10 +263,12 @@ export default {
})
})
if
(
this
.
accounttypeId
.
length
==
0
)
{
this
.
loading
=
false
this
.
accountTypesRule
=
true
return
}
if
(
this
.
accountAddForm
.
merchantType
==
1
&&
this
.
accountAddForm
.
merchantOrgcode
&&
!
util
.
checkIdCard
(
this
.
accountAddForm
.
merchantOrgcode
))
{
this
.
loading
=
false
this
.
$message
.
error
(
'请输入正确的身份证号码'
)
document
.
querySelector
(
'#app'
).
scrollTop
=
0
setTimeout
(()
=>
{
...
...
@@ -284,6 +290,7 @@ export default {
if
(
this
.
accountAddForm
.
residentPhone
)
{
const
result
=
reg
.
test
(
this
.
accountAddForm
.
residentPhone
)
if
(
!
result
)
{
this
.
loading
=
false
this
.
$message
({
message
:
'请输入正确的驻店信息'
,
type
:
'warning'
...
...
@@ -322,6 +329,7 @@ export default {
Promise
.
all
([
pm1
,
pm2
]).
then
(()
=>
{
this
.
$apis
.
store
[
merchant
](
params
).
then
(
res
=>
{
if
(
res
)
{
this
.
loading
=
false
this
.
step
=
2
this
.
nextStatus
=
true
if
(
typeof
res
==
'number'
)
{
...
...
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