Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
sso-equity
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 41316fd6
authored
Feb 14, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优惠券开发
1 parent
45e2ae63
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
9 deletions
src/api/modules/goodsConponApi.js
src/views/goodsConpon/index.vue
src/views/goodsConpon/receivedDetail.vue
src/api/modules/goodsConponApi.js
View file @
41316fd
import
{
http
,
other_http
}
from
'@/main'
import
{
other_http
}
from
'@/main'
const
url
=
'rop-scrm-coupon/router'
const
defaultPath
=
'scrm.api.coupon.'
/**商品分页查询*/
const
getCouponsList
=
params
=>
{
params
.
method
=
'scrm.api.coupon.equity.list.merchant'
params
.
method
=
`
${
defaultPath
}
equity.list.merchant`
return
other_http
({
url
,
data
:
params
...
...
@@ -11,7 +12,7 @@ const getCouponsList = params => {
}
const
createCoupons
=
params
=>
{
params
.
method
=
'scrm.api.coupon.equity.batch.create'
params
.
method
=
`
${
defaultPath
}
equity.batch.create`
return
other_http
({
url
,
data
:
params
...
...
@@ -19,7 +20,7 @@ const createCoupons = params => {
}
const
getExportApi
=
params
=>
{
params
.
method
=
`
scrm.api.coupon.
equity.list.merchant.export`
params
.
method
=
`
${
defaultPath
}
equity.list.merchant.export`
return
other_http
({
url
,
data
:
params
,
...
...
@@ -29,7 +30,7 @@ const getExportApi = params => {
//领取记录列表
const
getListReceiveRecordApi
=
params
=>
{
params
.
method
=
`
scrm.api.coupon.
listReceiveRecordByCouponId`
params
.
method
=
`
${
defaultPath
}
listReceiveRecordByCouponId`
return
other_http
({
url
,
method
:
'GET'
,
...
...
@@ -38,9 +39,47 @@ const getListReceiveRecordApi = params => {
})
}
//查看优惠券
const
getCouponDetailApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
detail`
return
other_http
({
url
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
//删除
const
deleteCouponApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
delete`
return
other_http
({
url
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
// 优惠券-作废
const
couponUserCancelApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
user.cancel`
return
other_http
({
url
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
export
default
{
getCouponsList
,
createCoupons
,
getExportApi
,
getListReceiveRecordApi
getListReceiveRecordApi
,
getCouponDetailApi
,
deleteCouponApi
,
couponUserCancelApi
}
src/views/goodsConpon/index.vue
View file @
41316fd
...
...
@@ -28,7 +28,6 @@
</
template
>
<
script
>
import
utils
from
'../../utils/util'
export
default
{
name
:
'index'
,
data
()
{
...
...
@@ -76,6 +75,20 @@ export default {
},
{
type
:
'GLButton'
,
name
:
'删除'
,
attrs
:
{
type
:
'text'
,
fn
:
'删除'
},
condition
:
row
=>
{
return
row
.
status
==
'1'
||
row
.
status
==
'3'
},
listeners
:
{
click
:
this
.
del
}
},
{
type
:
'GLButton'
,
name
:
row
=>
{
return
'领取详情'
},
...
...
@@ -217,6 +230,35 @@ export default {
item
.
optionList
=
[...
res
.
data
]
})
},
//删除
del
(
row
)
{
var
params
=
{}
params
.
couponId
=
row
.
id
this
.
secondConfirm
(
'删除'
,
'确定删除此优惠券?'
,
'goodsConponApi'
,
'deleteCouponApi'
,
params
)
},
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
this
.
$confirm
(
txt
,
title
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
this
.
$apis
[
apiModule
][
apiName
](
apiParams
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
fn
&&
fn
()
this
.
handleSearch
()
}
})
}
}
})
},
handleRest
()
{
this
.
searchForm
=
{
brandName
:
''
,
...
...
@@ -230,7 +272,7 @@ export default {
handleExport
()
{
var
params
=
{
...
this
.
searchForm
}
this
.
$apis
.
goodsConponApi
.
getExportApi
(
params
).
then
(
res
=>
{
let
tempaa
=
util
s
.
getExplorer
()
let
tempaa
=
thi
s
.
getExplorer
()
if
(
tempaa
==
'QQ'
)
{
window
.
open
(
res
)
}
else
{
...
...
@@ -242,7 +284,7 @@ export default {
})
},
goDetailPage
(
row
)
{
this
.
$router
.
push
(
'/goodsConpon/receivedDetail'
,
{
id
:
row
.
scope
.
id
})
this
.
$router
.
push
(
{
path
:
'/goodsConpon/receivedDetail'
,
query
:
{
id
:
row
.
scope
.
id
}
})
},
changeStatus
()
{},
addConpon
()
{
...
...
src/views/goodsConpon/receivedDetail.vue
View file @
41316fd
This diff is collapsed.
Click to expand it.
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