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
Show 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
>
<
template
>
<div
class=
"search-box flex"
>
<div
class=
"search-box flex"
>
<van-search
<van-search
v-model=
"
keyword
"
v-model=
"
searchValue
"
placeholder=
"输入客户姓名搜索"
placeholder=
"输入客户姓名搜索"
@
search=
"onSearch"
@
search=
"onEmit($event,'search')"
@
clear=
"onEmit('','search')"
/>
/>
<van-dropdown-menu
active-color=
"#3975C6"
>
<van-dropdown-menu
active-color=
"#3975C6"
>
<van-dropdown-item
<van-dropdown-item
v-model=
"value"
v-model=
"value"
:options=
"option"
:options=
"option"
@
change=
"
change
"
@
change=
"
onEmit($event,'change')
"
/>
/>
<div
class=
"arrow y-center"
>
<div
class=
"arrow y-center"
>
<div
class=
"sprite-icon icon-down"
></div>
<div
class=
"sprite-icon icon-down"
></div>
...
@@ -40,22 +41,21 @@ export default {
...
@@ -40,22 +41,21 @@ export default {
{
text
:
'精品礼券'
,
value
:
1
},
{
text
:
'精品礼券'
,
value
:
1
},
{
text
:
'商品订单'
,
value
:
2
},
{
text
:
'商品订单'
,
value
:
2
},
{
text
:
'会员服务'
,
value
:
3
}
{
text
:
'会员服务'
,
value
:
3
}
]
],
searchValue
:
''
}
}
},
},
watch
:
{
watch
:
{
'updata'
(
n
)
{
'updata'
(
n
)
{
this
.
value
=
this
.
index
this
.
value
=
this
.
index
}
},
},
mounted
()
{
'keyword'
(
n
){
this
.
searchValue
=
n
}
},
},
methods
:
{
methods
:
{
change
(
e
)
{
onEmit
(
e
,
name
)
{
this
.
$emit
(
'change'
,
e
)
this
.
$emit
(
name
,
e
)
},
onSearch
(
e
)
{
this
.
$emit
(
'search'
,
e
)
}
}
}
}
}
}
...
...
src/views/coupon/verificationList.vue
View file @
aeca364
...
@@ -260,14 +260,13 @@ export default {
...
@@ -260,14 +260,13 @@ export default {
}
}
})
})
},
},
activated
()
{
},
mounted
()
{
mounted
()
{
this
.
getTabNum
()
this
.
getTabNum
()
window
.
$wx
=
wxConfig
window
.
$wx
=
wxConfig
window
.
$wx
.
init
([
'scanQRCode'
])
window
.
$wx
.
init
([
'scanQRCode'
])
},
},
methods
:
{
methods
:
{
/**获取列表数量 */
getTabNum
()
{
getTabNum
()
{
this
.
showLoading
()
this
.
showLoading
()
this
.
getVerificationList
(
0
,
true
)
this
.
getVerificationList
(
0
,
true
)
...
@@ -326,69 +325,74 @@ export default {
...
@@ -326,69 +325,74 @@ export default {
this
.
getGoodsVerficationList
(
tabIndex
==
0
?
2
:
1
,
true
)
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
)
{
getVerificationList
(
type
=
0
,
setData
)
{
let
{
list
,
userName
,
pageNum
}
=
this
let
{
userName
,
pageNum
}
=
this
let
discountTypes
=
[
2
,
3
,
4
]
let
discountTypes
=
[
2
,
3
,
4
]
if
(
type
==
3
)
discountTypes
=
[
7
]
if
(
type
==
3
)
discountTypes
=
[
7
]
couponApi
.
getVerificationList
({
pageNum
,
userName
,
discountTypes
}).
then
(
res
=>
{
couponApi
.
getVerificationList
({
pageNum
,
userName
,
discountTypes
}).
then
(
res
=>
{
if
(
setData
)
{
if
(
setData
)
{
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
flag
=
true
this
.
itemObj
=
this
.
tools
.
deepClone
(
itemObj
)
this
.
itemObj
=
this
.
tools
.
deepClone
(
itemObj
)
this
.
total
=
res
.
total
this
.
setData
(
res
)
}
}
this
.
tab
[
type
==
0
?
0
:
3
][
0
]
=
`已核销(
${
res
.
total
}
)`
this
.
tab
[
type
==
0
?
0
:
3
][
0
]
=
`已核销(
${
res
.
total
}
)`
this
.
updata
=
new
Date
().
getTime
()
this
.
requestEnd
()
this
.
hideLoading
()
})
})
},
},
/**优惠券待核销 已领取 */
/**优惠券待核销 已领取 */
getUserCouponList
({
userStatus
,
type
},
setData
)
{
getUserCouponList
({
userStatus
,
type
},
setData
)
{
let
{
list
,
userName
,
pageNum
}
=
this
let
{
userName
,
pageNum
}
=
this
let
discountTypes
=
[
2
,
3
,
4
]
let
discountTypes
=
[
2
,
3
,
4
]
if
(
type
==
3
)
discountTypes
=
[
7
]
if
(
type
==
3
)
discountTypes
=
[
7
]
couponApi
.
getUserCouponList
({
pageNum
,
userName
,
userStatus
,
discountTypes
}).
then
(
res
=>
{
couponApi
.
getUserCouponList
({
pageNum
,
userName
,
userStatus
,
discountTypes
}).
then
(
res
=>
{
if
(
setData
)
{
if
(
setData
)
{
this
.
list
=
list
.
concat
(
res
.
list
)
this
.
itemObj
=
this
.
tools
.
deepClone
(
itemObj
).
splice
(
0
,
2
)
this
.
itemObj
=
this
.
tools
.
deepClone
(
itemObj
).
splice
(
0
,
2
)
this
.
flag
=
true
this
.
setData
(
res
)
this
.
total
=
res
.
total
}
}
if
(
type
==
0
)
{
if
(
type
==
0
)
{
if
(
userStatus
==
0
)
{
if
(
userStatus
==
0
)
this
.
tab
[
0
][
2
]
=
`未领取(
${
res
.
total
}
)`
this
.
tab
[
0
][
2
]
=
`未领取(
${
res
.
total
}
)`
else
this
.
tab
[
0
][
1
]
=
`待核销(
${
res
.
total
}
)`
}
else
{
this
.
tab
[
0
][
1
]
=
`待核销(
${
res
.
total
}
)`
}
}
else
{
this
.
tab
[
3
][
1
]
=
`待核销(
${
res
.
total
}
)`
}
}
this
.
updata
=
new
Date
().
getTime
()
else
this
.
tab
[
3
][
1
]
=
`待核销(
${
res
.
total
}
)`
this
.
hideLoading
()
this
.
requestEnd
()
})
})
},
},
/**精品礼券 */
/**精品礼券 */
getCustomerCouponList
(
usedFlag
,
setData
)
{
getCustomerCouponList
(
usedFlag
,
setData
)
{
let
{
list
,
pageNum
,
userName
}
=
this
let
{
pageNum
,
userName
}
=
this
boutiquecouponApi
.
getCustomerCouponList
({
currentPage
:
pageNum
,
customerName
:
userName
,
usedFlag
}).
then
(
res
=>
{
boutiquecouponApi
.
getCustomerCouponList
({
if
(
setData
)
{
currentPage
:
pageNum
,
this
.
list
=
list
.
concat
(
res
.
list
)
customerName
:
userName
,
this
.
flag
=
true
usedFlag
this
.
total
=
res
.
total
}).
then
(
res
=>
{
}
if
(
setData
)
this
.
setData
(
res
)
if
(
usedFlag
==
'Y'
)
{
if
(
usedFlag
==
'Y'
)
this
.
tab
[
1
][
0
]
=
`已核销(
${
res
.
total
}
)`
this
.
tab
[
1
][
0
]
=
`已核销(
${
res
.
total
}
)`
else
this
.
tab
[
1
][
1
]
=
`待核销(
${
res
.
total
}
)`
}
else
{
this
.
requestEnd
()
this
.
tab
[
1
][
1
]
=
`待核销(
${
res
.
total
}
)`
}
this
.
updata
=
new
Date
().
getTime
()
this
.
hideLoading
()
})
})
},
},
/**商品订单 */
/**商品订单 */
getGoodsVerficationList
(
verificationStatus
,
setData
)
{
getGoodsVerficationList
(
verificationStatus
,
setData
)
{
let
{
list
,
pageNum
,
userName
}
=
this
let
{
pageNum
,
userName
}
=
this
shopmallApi
shopmallApi
.
getGoodsVerficationList
({
.
getGoodsVerficationList
({
currentPage
:
pageNum
,
currentPage
:
pageNum
,
...
@@ -396,18 +400,10 @@ export default {
...
@@ -396,18 +400,10 @@ export default {
verificationStatus
verificationStatus
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
setData
)
{
if
(
setData
)
this
.
setData
(
res
)
this
.
list
=
list
.
concat
(
res
.
list
)
if
(
verificationStatus
==
2
)
this
.
tab
[
2
][
0
]
=
`已核销(
${
res
.
total
}
)`
this
.
flag
=
true
else
this
.
tab
[
2
][
1
]
=
`待核销(
${
res
.
total
}
)`
this
.
total
=
res
.
total
this
.
requestEnd
()
}
if
(
verificationStatus
==
2
)
{
this
.
tab
[
2
][
0
]
=
`已核销(
${
res
.
total
}
)`
}
else
{
this
.
tab
[
2
][
1
]
=
`待核销(
${
res
.
total
}
)`
}
this
.
updata
=
new
Date
().
getTime
()
this
.
hideLoading
()
})
})
},
},
onReachBottom
()
{
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