Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-h5-ailipay
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 aeca3644
authored
Jan 18, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
13a74ab4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
61 deletions
src/components/SearchBox.vue
src/views/coupon/verificationList.vue
src/components/SearchBox.vue
View file @
aeca364
<
template
>
<div
class=
"search-box flex"
>
<van-search
v-model=
"
keyword
"
v-model=
"
searchValue
"
placeholder=
"输入客户姓名搜索"
@
search=
"onSearch"
@
search=
"onEmit($event,'search')"
@
clear=
"onEmit('','search')"
/>
<van-dropdown-menu
active-color=
"#3975C6"
>
<van-dropdown-item
v-model=
"value"
:options=
"option"
@
change=
"
change
"
@
change=
"
onEmit($event,'change')
"
/>
<div
class=
"arrow y-center"
>
<div
class=
"sprite-icon icon-down"
></div>
...
...
@@ -40,22 +41,21 @@ export default {
{
text
:
'精品礼券'
,
value
:
1
},
{
text
:
'商品订单'
,
value
:
2
},
{
text
:
'会员服务'
,
value
:
3
}
]
],
searchValue
:
''
}
},
watch
:
{
'updata'
(
n
)
{
this
.
value
=
this
.
index
},
'keyword'
(
n
){
this
.
searchValue
=
n
}
},
mounted
()
{
},
methods
:
{
change
(
e
)
{
this
.
$emit
(
'change'
,
e
)
},
onSearch
(
e
)
{
this
.
$emit
(
'search'
,
e
)
onEmit
(
e
,
name
)
{
this
.
$emit
(
name
,
e
)
}
}
}
...
...
src/views/coupon/verificationList.vue
View file @
aeca364
...
...
@@ -260,14 +260,13 @@ export default {
}
})
},
activated
()
{
},
mounted
()
{
this
.
getTabNum
()
window
.
$wx
=
wxConfig
window
.
$wx
.
init
([
'scanQRCode'
])
},
methods
:
{
/**获取列表数量 */
getTabNum
()
{
this
.
showLoading
()
this
.
getVerificationList
(
0
,
true
)
...
...
@@ -326,69 +325,74 @@ export default {
this
.
getGoodsVerficationList
(
tabIndex
==
0
?
2
:
1
,
true
)
}
},
setData
(
res
)
{
let
{
list
}
=
this
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
flag
=
true
this
.
total
=
res
.
total
},
requestEnd
()
{
this
.
updata
=
new
Date
().
getTime
()
this
.
hideLoading
()
},
/**优惠券已核销 */
getVerificationList
(
type
=
0
,
setData
)
{
let
{
list
,
userName
,
pageNum
}
=
this
let
{
userName
,
pageNum
}
=
this
let
discountTypes
=
[
2
,
3
,
4
]
if
(
type
==
3
)
discountTypes
=
[
7
]
couponApi
.
getVerificationList
({
pageNum
,
userName
,
discountTypes
}).
then
(
res
=>
{
couponApi
.
getVerificationList
({
pageNum
,
userName
,
discountTypes
}).
then
(
res
=>
{
if
(
setData
)
{
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
flag
=
true
this
.
itemObj
=
this
.
tools
.
deepClone
(
itemObj
)
this
.
total
=
res
.
total
this
.
setData
(
res
)
}
this
.
tab
[
type
==
0
?
0
:
3
][
0
]
=
`已核销(
${
res
.
total
}
)`
this
.
updata
=
new
Date
().
getTime
()
this
.
hideLoading
()
this
.
requestEnd
()
})
},
/**优惠券待核销 已领取 */
getUserCouponList
({
userStatus
,
type
},
setData
)
{
let
{
list
,
userName
,
pageNum
}
=
this
let
{
userName
,
pageNum
}
=
this
let
discountTypes
=
[
2
,
3
,
4
]
if
(
type
==
3
)
discountTypes
=
[
7
]
couponApi
.
getUserCouponList
({
pageNum
,
userName
,
userStatus
,
discountTypes
}).
then
(
res
=>
{
couponApi
.
getUserCouponList
({
pageNum
,
userName
,
userStatus
,
discountTypes
}).
then
(
res
=>
{
if
(
setData
)
{
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
itemObj
=
this
.
tools
.
deepClone
(
itemObj
).
splice
(
0
,
2
)
this
.
flag
=
true
this
.
total
=
res
.
total
this
.
setData
(
res
)
}
if
(
type
==
0
)
{
if
(
userStatus
==
0
)
{
this
.
tab
[
0
][
2
]
=
`未领取(
${
res
.
total
}
)`
}
else
{
this
.
tab
[
0
][
1
]
=
`待核销(
${
res
.
total
}
)`
}
}
else
{
this
.
tab
[
3
][
1
]
=
`待核销(
${
res
.
total
}
)`
if
(
userStatus
==
0
)
this
.
tab
[
0
][
2
]
=
`未领取(
${
res
.
total
}
)`
else
this
.
tab
[
0
][
1
]
=
`待核销(
${
res
.
total
}
)`
}
this
.
updata
=
new
Date
().
getTime
()
this
.
hideLoading
()
else
this
.
tab
[
3
][
1
]
=
`待核销(
${
res
.
total
}
)`
this
.
requestEnd
()
})
},
/**精品礼券 */
getCustomerCouponList
(
usedFlag
,
setData
)
{
let
{
list
,
pageNum
,
userName
}
=
this
boutiquecouponApi
.
getCustomerCouponList
({
currentPage
:
pageNum
,
customerName
:
userName
,
usedFlag
}).
then
(
res
=>
{
if
(
setData
)
{
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
flag
=
true
this
.
total
=
res
.
total
}
if
(
usedFlag
==
'Y'
)
{
this
.
tab
[
1
][
0
]
=
`已核销(
${
res
.
total
}
)`
}
else
{
this
.
tab
[
1
][
1
]
=
`待核销(
${
res
.
total
}
)`
}
this
.
updata
=
new
Date
().
getTime
()
this
.
hideLoading
()
let
{
pageNum
,
userName
}
=
this
boutiquecouponApi
.
getCustomerCouponList
({
currentPage
:
pageNum
,
customerName
:
userName
,
usedFlag
}).
then
(
res
=>
{
if
(
setData
)
this
.
setData
(
res
)
if
(
usedFlag
==
'Y'
)
this
.
tab
[
1
][
0
]
=
`已核销(
${
res
.
total
}
)`
else
this
.
tab
[
1
][
1
]
=
`待核销(
${
res
.
total
}
)`
this
.
requestEnd
()
})
},
/**商品订单 */
getGoodsVerficationList
(
verificationStatus
,
setData
)
{
let
{
list
,
pageNum
,
userName
}
=
this
let
{
pageNum
,
userName
}
=
this
shopmallApi
.
getGoodsVerficationList
({
currentPage
:
pageNum
,
...
...
@@ -396,18 +400,10 @@ export default {
verificationStatus
})
.
then
(
res
=>
{
if
(
setData
)
{
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
flag
=
true
this
.
total
=
res
.
total
}
if
(
verificationStatus
==
2
)
{
this
.
tab
[
2
][
0
]
=
`已核销(
${
res
.
total
}
)`
}
else
{
this
.
tab
[
2
][
1
]
=
`待核销(
${
res
.
total
}
)`
}
this
.
updata
=
new
Date
().
getTime
()
this
.
hideLoading
()
if
(
setData
)
this
.
setData
(
res
)
if
(
verificationStatus
==
2
)
this
.
tab
[
2
][
0
]
=
`已核销(
${
res
.
total
}
)`
else
this
.
tab
[
2
][
1
]
=
`待核销(
${
res
.
total
}
)`
this
.
requestEnd
()
})
},
onReachBottom
()
{
...
...
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