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 cd0bfb68
authored
Dec 24, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
导出
1 parent
f7c597c1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
105 additions
and
27 deletions
src/api/modules/couponManage.js
src/api/modules/record.js
src/views/couponManage/index.vue
src/views/couponManage/receiveDetail.vue
src/views/couponManage/writeOffDetail.vue
src/views/memberCenter/record.vue
src/api/modules/couponManage.js
View file @
cd0bfb6
...
...
@@ -13,6 +13,17 @@ const getMerchantListApi = params => {
})
}
//优惠券列表-导出
const
couponExportApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
list.export`
return
http
({
url
:
'rop-scrm-coupon/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
//生效/失效
const
effectiveCouponApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
effective`
...
...
@@ -48,6 +59,17 @@ const getVerificationListApi = params => {
})
}
// 核销详情-导出
const
verificationExportApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
verification.code.export.list`
return
http
({
url
:
'rop-scrm-coupon/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
//领取记录列表
const
getListReceiveRecordApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
listReceiveRecordByCouponId`
...
...
@@ -129,4 +151,4 @@ const getAllGoodsApi = params => {
}
export
default
{
getMerchantListApi
,
getVerificationLis
tApi
,
effectiveCouponApi
,
codeVerificationApi
,
getCouponDetailApi
,
deleteCouponApi
,
createCouponApi
,
updateCouponApi
,
getAllGoodsApi
,
getListReceiveRecordApi
,
exportReceiveRecordApi
}
export
default
{
getMerchantListApi
,
couponExportApi
,
getVerificationListApi
,
verificationExpor
tApi
,
effectiveCouponApi
,
codeVerificationApi
,
getCouponDetailApi
,
deleteCouponApi
,
createCouponApi
,
updateCouponApi
,
getAllGoodsApi
,
getListReceiveRecordApi
,
exportReceiveRecordApi
}
\ No newline at end of file
src/api/modules/record.js
View file @
cd0bfb6
...
...
@@ -3,37 +3,47 @@ import { http } from '@/main'
// const defaultPath = 'scrm.api.live.'
const
getRecordListApi
=
params
=>
{
// params.method = `${defaultPath}goods.list`
// params.method = `${defaultPath}goods.list`
params
.
method
=
`scrm.api.coupon.verification.code.verification.list`
return
http
({
url
:
'rop-scrm-coupon/router'
,
url
:
'rop-scrm-coupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
getVerificationCode
=
params
=>
{
const
getVerificationCode
=
params
=>
{
params
.
method
=
`scrm.api.coupon.verification.code.verification`
return
http
({
url
:
'rop-scrm-coupon/router'
,
url
:
'rop-scrm-coupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// const auditGoodApi = params => {
// params.method = `${defaultPath}audit.goods`
// return http({
// url: 'rop-scrm-live/router',
// method: 'POST',
// data: params,
// sign: true,
// returnAll: true
// })
// }
// 核销详情-导出
const
verificationExportApi
=
params
=>
{
params
.
method
=
'scrm.api.coupon.verification.code.export.list'
return
http
({
url
:
'rop-scrm-coupon/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
// const auditGoodApi = params => {
// params.method = `${defaultPath}audit.goods`
// return http({
// url: 'rop-scrm-live/router',
// method: 'POST',
// data: params,
// sign: true,
// returnAll: true
// })
// }
// const getGoodInfoApi = params => {
// params.method = `${defaultPath}get.good.by.id`
...
...
@@ -88,4 +98,4 @@ const getVerificationCode=params=>{
// })
// }
export
{
getRecordListApi
,
getVerificationCode
}
export
{
getRecordListApi
,
getVerificationCode
,
verificationExportApi
}
\ No newline at end of file
src/views/couponManage/index.vue
View file @
cd0bfb6
...
...
@@ -16,6 +16,7 @@
<span
slot=
"footer"
class=
"footer-btns"
>
<el-button
:size=
"size"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button>
</span>
</glsx-combi-form>
</div>
...
...
@@ -345,6 +346,17 @@ export default {
}
},
handleExport
(
row
)
{
var
params
=
this
.
getParams
()
this
.
$apis
.
couponManage
.
couponExportApi
(
params
).
then
(
res
=>
{
var
a
=
document
.
createElement
(
'a'
)
a
.
setAttribute
(
'href'
,
res
)
a
.
setAttribute
(
'target'
,
'_blank'
)
document
.
body
.
appendChild
(
a
)
a
.
click
()
})
},
handleSearch
()
{
this
.
$refs
.
coupon
.
refreshTable
()
},
...
...
src/views/couponManage/receiveDetail.vue
View file @
cd0bfb6
...
...
@@ -40,6 +40,10 @@
<span
class=
"red-txt"
>
{{
effective
}}
</span>
</span>
<span
style=
"margin-left:10px"
>
已过期:
<span
class=
"red-txt"
>
{{
}}
</span>
</span>
<span
style=
"margin-left:10px"
>
使用限制:
<span
class=
"red-txt"
>
{{
useB
}}
</span>
</span>
...
...
src/views/couponManage/writeOffDetail.vue
View file @
cd0bfb6
...
...
@@ -8,6 +8,7 @@
<el-button
:size=
"size"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"writeOff"
>
优惠券核销
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
:size=
"size"
@
click=
"goback"
>
返回
</el-button>
</span>
</glsx-combi-form>
...
...
@@ -105,9 +106,9 @@ export default {
},
{
label
:
'领取时间'
,
prop
:
'
createdDat
e'
,
prop
:
'
receiveTim
e'
,
formatter
:
cellValue
=>
{
return
dayjs
(
cellValue
.
createdDat
e
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
return
dayjs
(
cellValue
.
receiveTim
e
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
},
{
...
...
@@ -254,6 +255,17 @@ export default {
}
},
handleExport
(
row
)
{
var
params
=
this
.
getParams
()
this
.
$apis
.
couponManage
.
verificationExportApi
(
params
).
then
(
res
=>
{
var
a
=
document
.
createElement
(
'a'
)
a
.
setAttribute
(
'href'
,
res
)
a
.
setAttribute
(
'target'
,
'_blank'
)
document
.
body
.
appendChild
(
a
)
a
.
click
()
})
},
handleSearch
()
{
this
.
$refs
.
writeOffList
.
refreshTable
()
},
...
...
src/views/memberCenter/record.vue
View file @
cd0bfb6
...
...
@@ -33,6 +33,7 @@
<el-form-item
size=
"small"
style=
"float: right"
>
<el-button
:size=
"size"
type=
"primary"
@
click=
"openDialog"
>
核销
</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-form-item>
</el-row>
...
...
@@ -59,7 +60,7 @@
<
script
>
import
glsxDialog
from
'@/components/glsx-dialog'
import
{
getRecordListApi
,
getVerificationCode
}
from
'@/api/modules/record'
import
{
getRecordListApi
,
getVerificationCode
,
verificationExportApi
}
from
'@/api/modules/record'
import
url
from
"@/assets/empty.png"
import
{
dateFormat
}
from
'@/utils/index.js'
export
default
{
...
...
@@ -158,16 +159,21 @@ export default {
return
dateFormat
(
date
)
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
verificationTimeStart
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
verificationTimeEnd
=
this
.
searchForm
.
daterange
[
1
]
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
params
.
daterange
)
{
params
.
verificationTimeStart
=
this
.
searchForm
.
daterange
[
0
]
params
.
verificationTimeEnd
=
this
.
searchForm
.
daterange
[
1
]
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
if
(
params
.
beginTime
)
delete
params
.
beginTime
&&
delete
params
.
endTime
}
delete
this
.
searchFormTable
.
daterange
delete
params
.
daterange
return
params
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
searchFormTable
=
this
.
getParams
()
resolve
()
})
},
...
...
@@ -231,6 +237,18 @@ export default {
// path: '/liveRoom/editLiveRoom'
})
},
handleExport
(
row
)
{
var
params
=
this
.
getParams
()
verificationExportApi
(
params
).
then
(
res
=>
{
var
a
=
document
.
createElement
(
'a'
)
a
.
setAttribute
(
'href'
,
res
)
a
.
setAttribute
(
'target'
,
'_blank'
)
document
.
body
.
appendChild
(
a
)
a
.
click
()
})
},
handleSearch
()
{
this
.
$refs
.
memberRecordRef
.
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