Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hooloo
web
soss
Commits
c453398a
Commit
c453398a
authored
Aug 06, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改优惠券
parent
4df4f5b6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
135 additions
and
106 deletions
+135
-106
src/api/coupon/coupon.js
+13
-4
src/api/coupon/couponType.js
+2
-2
src/components/order/orderDetial.vue
+14
-4
src/views/coupon/coupon/giveCoupon.vue
+1
-1
src/views/coupon/coupon/index.vue
+96
-90
src/views/coupon/couponCategory/index.vue
+2
-2
src/views/coupon/couponInfo/index.vue
+7
-3
No files found.
src/api/coupon/coupon.js
View file @
c453398a
import
request
from
"@/utils/request"
;
// 查询列表
export
function
listCoupon
(
data
)
{
export
function
listCoupon
(
pageNum
,
pageSize
,
data
)
{
return
request
({
url
:
"/coupon/list
"
,
url
:
"/coupon/list
?pageNum="
+
pageNum
+
"&pageSize="
+
pageSize
,
method
:
"post"
,
data
:
data
,
});
...
...
@@ -53,9 +53,9 @@ export function onlineCoupon(id) {
}
// 用户领取优惠券列表
export
function
getCouponInfoList
(
data
)
{
export
function
getCouponInfoList
(
pageNum
,
pageSize
,
data
)
{
return
request
({
url
:
"/coupon-user/list
"
,
url
:
"/coupon-user/list
?pageNum="
+
pageNum
+
"&pageSize="
+
pageSize
,
method
:
"post"
,
data
:
data
,
});
...
...
@@ -94,4 +94,13 @@ export function giveCoupon(data) {
});
}
// 优惠券修改前校验
export
function
updateCheck
(
id
)
{
return
request
({
url
:
"/coupon/update/check/"
+
id
,
method
:
"post"
,
});
}
src/api/coupon/couponType.js
View file @
c453398a
import
request
from
"@/utils/request"
;
// 查询列表
export
function
getCouCategoryList
(
data
)
{
export
function
getCouCategoryList
(
pageNum
,
pageSize
,
data
)
{
return
request
({
url
:
"/coupon-category
"
,
url
:
"/coupon-category
?pageNum="
+
pageNum
+
"&pageSize="
+
pageSize
,
method
:
"post"
,
data
:
data
,
});
...
...
src/components/order/orderDetial.vue
View file @
c453398a
...
...
@@ -73,7 +73,7 @@
</el-form-item>
</el-col>
</el-row>
<el-table
:data=
"goodsList"
>
<el-table
:data=
"goodsList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"商品名称"
align=
"center"
prop=
"goodsName"
/>
<el-table-column
label=
"缩略图"
align=
"center"
>
<template
slot-scope=
"scope"
>
...
...
@@ -88,13 +88,14 @@
<el-table-column
label=
"原售价"
align=
"center"
prop=
"amount"
/>
<el-table-column
label=
"折扣价"
align=
"center"
prop=
"realAmount"
/>
<el-table-column
label=
"实付"
align=
"center"
prop=
"realAmount"
/>
<el-table-column
label=
"数量"
align=
"center"
prop=
"num"
/>
<el-table-column
label=
"数量"
align=
"center"
prop=
"num"
/>
<el-table-column
type=
"selection"
width=
"55"
/>
</el-table>
</el-form>
<div
v-show=
"refundTag"
style=
"margin-top: 20px;"
>
<el-form
ref=
"refundForm"
:rules=
"rules"
:model=
"refundForm"
label-width=
"80px"
>
<el-form-item
label=
"退款金额"
prop=
"refundAmount"
>
<el-input
v-model=
"refundForm.refundAmount"
style=
"width:200px;"
placeholder=
"请输入退款金额"
/>
<el-input
v-model=
"refundForm.refundAmount"
style=
"width:200px;"
placeholder=
"请输入退款金额"
disabled
/>
</el-form-item>
<el-form-item
label=
"处理备注"
prop=
"desc"
>
<el-input
v-model=
"refundForm.desc"
type=
"textarea"
placeholder=
"请输入处理备注"
/>
...
...
@@ -321,7 +322,16 @@ export default {
let
picObj
=
JSON
.
parse
(
str
);
list
.
push
(
picObj
.
thumbnail
)
return
list
;
},
},
handleSelectionChange
(
selectList
){
let
sum
=
null
;
if
(
selectList
.
length
>
0
){
for
(
let
i
=
0
;
i
<
selectList
.
length
;
i
++
){
sum
+=
selectList
[
i
].
realAmount
;
}
}
this
.
refundForm
.
refundAmount
=
sum
;
}
}
};
</
script
>
src/views/coupon/coupon/giveCoupon.vue
View file @
c453398a
...
...
@@ -94,7 +94,7 @@ export default {
},
/** 查询优惠券列表 */
getCouponList
()
{
listCoupon
(
{
pageNum
:
1
,
pageSize
:
100000
,
state
:
1
}).
then
((
response
)
=>
{
listCoupon
(
1
,
10000
,{
state
:
1
}).
then
((
response
)
=>
{
if
(
response
.
code
==
200
){
this
.
couponList
=
response
.
rows
;
}
...
...
src/views/coupon/coupon/index.vue
View file @
c453398a
This diff is collapsed.
Click to expand it.
src/views/coupon/couponCategory/index.vue
View file @
c453398a
...
...
@@ -15,7 +15,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
v-hasPermi=
"['coupon:category:
query
']"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
v-hasPermi=
"['coupon:category:
list
']"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
...
...
@@ -142,7 +142,7 @@ export default {
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
getCouCategoryList
(
this
.
queryParams
).
then
((
response
)
=>
{
getCouCategoryList
(
this
.
queryParams
.
pageNum
,
this
.
queryParams
.
pageSize
,{
name
:
this
.
queryParams
.
name
,
state
:
this
.
queryParams
.
state
}
).
then
((
response
)
=>
{
this
.
couponTypeList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
...
...
src/views/coupon/couponInfo/index.vue
View file @
c453398a
...
...
@@ -25,7 +25,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
v-hasPermi=
"['coupon:
category:query
']"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
v-hasPermi=
"['coupon:
user:list
']"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
...
...
@@ -113,6 +113,9 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
source
:
""
,
state
:
null
,
couponId
:
null
},
options
:
[{
value
:
null
,
...
...
@@ -155,7 +158,8 @@ export default {
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
getCouponInfoList
(
this
.
queryParams
).
then
((
response
)
=>
{
getCouponInfoList
(
this
.
queryParams
.
pageNum
,
this
.
queryParams
.
pageSize
,
{
source
:
this
.
queryParams
.
source
,
state
:
this
.
queryParams
.
state
,
couponId
:
this
.
queryParams
.
couponId
}).
then
((
response
)
=>
{
this
.
couponInfoList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
...
...
@@ -213,7 +217,7 @@ export default {
},
/** 查询优惠券列表 */
getCouponList
()
{
listCoupon
(
{
pageNum
:
1
,
pageSize
:
1000
,
state
:
1
}).
then
((
response
)
=>
{
listCoupon
(
1
,
10000
,{
state
:
1
}).
then
((
response
)
=>
{
if
(
response
.
code
==
200
){
this
.
couponList
=
response
.
rows
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment