Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-pay
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 ea943f32
authored
Dec 24, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优惠券
1 parent
b584d0b3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
19 deletions
src/api/modules/order.js
src/api/modules/record.js
src/views/couponManage/receiveDetail.vue
src/views/memberCenter/order.vue
src/api/modules/order.js
View file @
ea943f3
...
@@ -3,24 +3,35 @@ import { http } from '@/main'
...
@@ -3,24 +3,35 @@ import { http } from '@/main'
// const defaultPath = 'scrm.api.live.'
// const defaultPath = 'scrm.api.live.'
const
getOrderListApi
=
params
=>
{
const
getOrderListApi
=
params
=>
{
// params.method = `${defaultPath}goods.list`
// params.method = `${defaultPath}goods.list`
params
.
method
=
`scrm.api.equity.merchant.order.list.with.page`
params
.
method
=
`scrm.api.equity.merchant.order.list.with.page`
return
http
({
return
http
({
url
:
'rop-scrm-equity/router'
,
url
:
'rop-scrm-equity/router'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
params
,
data
:
params
,
sign
:
true
sign
:
true
})
})
}
}
const
getOrderPageDetail
=
params
=>
{
const
getOrderPageDetail
=
params
=>
{
params
.
method
=
`scrm.api.equity.merchant.order.select`
params
.
method
=
`scrm.api.equity.merchant.order.select`
return
http
({
return
http
({
url
:
'rop-scrm-equity/router'
,
url
:
'rop-scrm-equity/router'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
params
,
data
:
params
,
sign
:
true
,
sign
:
true
,
returnAll
:
true
returnAll
:
true
})
})
}
}
export
{
getOrderListApi
,
getOrderPageDetail
}
\ No newline at end of file
\ No newline at end of file
// 订单列表-导出
const
orderExportApi
=
params
=>
{
params
.
method
=
'scrm.api.equity.merchant.order.list.with.page.export'
return
http
({
url
:
'rop-scrm-coupon/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
export
{
getOrderListApi
,
getOrderPageDetail
,
orderExportApi
}
\ No newline at end of file
\ No newline at end of file
src/api/modules/record.js
View file @
ea943f3
...
@@ -26,7 +26,7 @@ const getVerificationCode = params => {
...
@@ -26,7 +26,7 @@ const getVerificationCode = params => {
// 核销详情-导出
// 核销详情-导出
const
verificationExportApi
=
params
=>
{
const
verificationExportApi
=
params
=>
{
params
.
method
=
'scrm.api.coupon.verification.
code
.export.list'
params
.
method
=
'scrm.api.coupon.verification.
member
.export.list'
return
http
({
return
http
({
url
:
'rop-scrm-coupon/router'
,
url
:
'rop-scrm-coupon/router'
,
method
:
'GET'
,
method
:
'GET'
,
...
...
src/views/couponManage/receiveDetail.vue
View file @
ea943f3
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
</span>
</span>
<span
style=
"margin-left:10px"
>
<span
style=
"margin-left:10px"
>
已过期:
已过期:
<span
class=
"red-txt"
>
{{
}}
</span>
<span
class=
"red-txt"
>
{{
coupon
.
overdueAmount
||
0
}}
</span>
</span>
</span>
<span
style=
"margin-left:10px"
>
<span
style=
"margin-left:10px"
>
使用限制:
使用限制:
...
@@ -67,7 +67,8 @@ export default {
...
@@ -67,7 +67,8 @@ export default {
coupon
:
{
coupon
:
{
couponName
:
''
,
couponName
:
''
,
stock
:
''
,
stock
:
''
,
getAmount
:
''
getAmount
:
''
,
overdueAmount
:
''
},
},
effective
:
''
,
effective
:
''
,
useB
:
''
,
useB
:
''
,
...
@@ -96,6 +97,17 @@ export default {
...
@@ -96,6 +97,17 @@ export default {
prop
:
'phone'
prop
:
'phone'
},
},
{
{
label
:
'用户昵称'
,
prop
:
'userName'
},
{
label
:
'优惠券状态'
,
prop
:
'userStatus'
,
formatter
:
cellValue
=>
{
return
this
.
baseData
.
userStatusList
.
find
(
item
=>
+
item
.
confId
==
cellValue
.
userStatus
).
confName
}
},
{
label
:
'领取时间'
,
label
:
'领取时间'
,
prop
:
'createdDate'
,
prop
:
'createdDate'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -105,7 +117,26 @@ export default {
...
@@ -105,7 +117,26 @@ export default {
]
]
},
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
baseData
:
{},
baseData
:
{
userStatusList
:
[
{
confId
:
'0'
,
confName
:
'未领取'
},
{
confId
:
'1'
,
confName
:
'已领取'
},
{
confId
:
'2'
,
confName
:
'已使用'
},
{
confId
:
'3'
,
confName
:
'已过期'
}
]
},
exportLoading
:
false
exportLoading
:
false
}
}
},
},
...
...
src/views/memberCenter/order.vue
View file @
ea943f3
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
<el-form-item
size=
"small"
style=
"float: right"
>
<el-form-item
size=
"small"
style=
"float: right"
>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
:size=
"size"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
:size=
"size"
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-row>
</el-row>
...
@@ -54,7 +55,7 @@
...
@@ -54,7 +55,7 @@
<
script
>
<
script
>
import
{
orderTypesList
,
orderStatusList
}
from
'@/common/constant'
import
{
orderTypesList
,
orderStatusList
}
from
'@/common/constant'
import
url
from
'@/assets/empty.png'
import
url
from
'@/assets/empty.png'
import
{
getOrderListApi
}
from
'@/api/modules/order'
import
{
getOrderListApi
,
orderExportApi
}
from
'@/api/modules/order'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -181,16 +182,22 @@ export default {
...
@@ -181,16 +182,22 @@ export default {
}
}
this
.
handleSearch
()
this
.
handleSearch
()
},
},
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
params
.
daterange
)
{
params
.
startTime
=
this
.
searchForm
.
daterange
[
0
]
+
' 00:00:00'
params
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
+
' 23:59:59'
}
else
{
if
(
params
.
beginTime
)
delete
params
.
beginTime
&&
delete
params
.
endTime
}
delete
params
.
daterange
return
params
},
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
this
.
searchFormTable
=
this
.
getParams
()
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
startTime
=
this
.
searchForm
.
daterange
[
0
]
+
' 00:00:00'
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
+
' 23:59:59'
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
delete
this
.
searchFormTable
.
daterange
resolve
()
resolve
()
})
})
},
},
...
@@ -205,6 +212,17 @@ export default {
...
@@ -205,6 +212,17 @@ export default {
})
})
},
},
handleExport
(
row
)
{
var
params
=
this
.
getParams
()
orderExportApi
(
params
).
then
(
res
=>
{
var
a
=
document
.
createElement
(
'a'
)
a
.
setAttribute
(
'href'
,
res
)
a
.
setAttribute
(
'target'
,
'_blank'
)
document
.
body
.
appendChild
(
a
)
a
.
click
()
})
},
handleSearch
()
{
handleSearch
()
{
this
.
$refs
.
memberOrderRef
.
refreshTable
()
this
.
$refs
.
memberOrderRef
.
refreshTable
()
},
},
...
...
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