Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d0120cd2
authored
Oct 21, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 增加节流
1 parent
94027e79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
13 deletions
components/HomeFrame/components/CustomerInfo.vue
components/HomeFrame/components/CustomerInfo.vue
View file @
d0120cd
...
@@ -239,7 +239,8 @@ export default {
...
@@ -239,7 +239,8 @@ export default {
startDate
:
''
,
startDate
:
''
,
endDate
:
''
,
endDate
:
''
,
customerTag
:
''
,
customerTag
:
''
,
backClass
:
''
backClass
:
''
,
clickFlag
:
false
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -291,7 +292,7 @@ export default {
...
@@ -291,7 +292,7 @@ export default {
this
.
customerInfo
.
arrivalDate
=
e
.
detail
.
value
this
.
customerInfo
.
arrivalDate
=
e
.
detail
.
value
},
},
async
submit
()
{
async
submit
()
{
if
(
this
.
check
)
return
if
(
this
.
check
||
this
.
clickFlag
)
return
try
{
try
{
this
.
customerForm
.
map
(
e
=>
{
this
.
customerForm
.
map
(
e
=>
{
e
.
error
=
false
e
.
error
=
false
...
@@ -310,6 +311,10 @@ export default {
...
@@ -310,6 +311,10 @@ export default {
})
})
if
(
customerInfo
.
id
)
params
.
id
=
customerInfo
.
id
if
(
customerInfo
.
id
)
params
.
id
=
customerInfo
.
id
params
.
customerTagName
=
params
.
customerTagName
.
replace
(
/|/g
,
','
)
params
.
customerTagName
=
params
.
customerTagName
.
replace
(
/|/g
,
','
)
this
.
clickFlag
=
true
uni
.
showLoading
({
mask
:
true
})
const
res
=
await
uni
.
$api
.
customerApi
[
targetApi
](
params
),
const
res
=
await
uni
.
$api
.
customerApi
[
targetApi
](
params
),
_this
=
this
_this
=
this
if
(
res
)
{
if
(
res
)
{
...
@@ -317,26 +322,37 @@ export default {
...
@@ -317,26 +322,37 @@ export default {
if
(
res
==
'1'
)
{
if
(
res
==
'1'
)
{
this
.
$refs
.
successRef
.
open
()
this
.
$refs
.
successRef
.
open
()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
clickFlag
=
false
uni
.
hideLoading
()
this
.
back
()
this
.
back
()
this
.
$emit
(
'refresh'
)
this
.
$emit
(
'refresh'
)
},
1
e3
)
},
1
e3
)
}
else
uni
.
showModal
({
}
else
{
content
:
'存在与该手机号相同的接待记录,系统将自动归类到已接待'
,
uni
.
showModal
({
showCancel
:
false
,
content
:
'存在与该手机号相同的接待记录,系统将自动归类到已接待'
,
confirmText
:
'确认'
,
showCancel
:
false
,
confirmColor
:
'#347BFF'
,
confirmText
:
'确认'
,
success
(
res
)
{
confirmColor
:
'#347BFF'
,
if
(
res
.
confirm
)
{
success
(
res
)
{
_this
.
back
()
if
(
res
.
confirm
)
{
_this
.
$emit
(
'refresh'
)
_this
.
back
()
_this
.
$emit
(
'refresh'
)
}
}
}
}
})
})
this
.
clickFlag
=
false
uni
.
hideLoading
()
}
}
else
{
this
.
clickFlag
=
false
uni
.
hideLoading
()
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
let
index
=
this
.
customerForm
.
findIndex
(
e
=>
e
.
key
==
error
)
let
index
=
this
.
customerForm
.
findIndex
(
e
=>
e
.
key
==
error
)
this
.
customerForm
[
index
].
error
=
true
this
.
customerForm
[
index
].
error
=
true
this
.
clickFlag
=
false
uni
.
hideLoading
()
}
}
}
}
}
}
...
...
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