Compare commits
2 Commits
aca3767a24
...
1e149f7e41
Author | SHA1 | Date |
---|---|---|
|
1e149f7e41 | |
![]() |
09c6605aed |
|
@ -22,8 +22,8 @@ async function getCouponList(page) {
|
||||||
return Vue.axios.get('/can/coupon?page=' + (page - 1) + "&size=20");
|
return Vue.axios.get('/can/coupon?page=' + (page - 1) + "&size=20");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function generateCoupon(couponName, can, validity, isMultipleUse, couponNumberCount) {
|
async function generateCoupon(couponName, couponType, can, validity, isMultipleUse, couponNumberCount) {
|
||||||
const request = {couponName, can, validity: validity + ' 23:59:59', isMultipleUse, couponNumberCount};
|
const request = {couponName, couponType, can, validity: validity + ' 23:59:59', isMultipleUse, couponNumberCount};
|
||||||
return Vue.axios.post('/can/coupon', request);
|
return Vue.axios.post('/can/coupon', request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-btn
|
<v-btn
|
||||||
block
|
block
|
||||||
color="#9970ff"
|
color="#3bb9f1"
|
||||||
dark
|
dark
|
||||||
depressed
|
depressed
|
||||||
@click="showWriteDialog"
|
@click="showWriteDialog"
|
||||||
|
@ -42,6 +42,10 @@
|
||||||
<span @click="getCouponNumberList(item)">{{ item.couponName }}</span>
|
<span @click="getCouponNumberList(item)">{{ item.couponName }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:item.couponType="{ item }">
|
||||||
|
{{ item.couponType }}
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-slot:item.can="{ item }">
|
<template v-slot:item.can="{ item }">
|
||||||
{{ item.can.toLocaleString('en-US') }}
|
{{ item.can.toLocaleString('en-US') }}
|
||||||
</template>
|
</template>
|
||||||
|
@ -132,6 +136,38 @@
|
||||||
label="발행수량"
|
label="발행수량"
|
||||||
/>
|
/>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
<v-card-text>
|
||||||
|
<v-row align="center">
|
||||||
|
<v-col cols="4">
|
||||||
|
쿠폰종류
|
||||||
|
</v-col>
|
||||||
|
<v-col
|
||||||
|
cols="8"
|
||||||
|
class="datepicker-wrapper"
|
||||||
|
>
|
||||||
|
<v-row>
|
||||||
|
<v-col>
|
||||||
|
<input
|
||||||
|
id="can_coupon"
|
||||||
|
v-model="coupon_type"
|
||||||
|
type="radio"
|
||||||
|
value="CAN"
|
||||||
|
>
|
||||||
|
<label for="can_coupon"> 캔 쿠폰</label>
|
||||||
|
</v-col>
|
||||||
|
<v-col>
|
||||||
|
<input
|
||||||
|
id="point_coupon"
|
||||||
|
v-model="coupon_type"
|
||||||
|
type="radio"
|
||||||
|
value="POINT"
|
||||||
|
>
|
||||||
|
<label for="point_coupon"> 포인트 쿠폰</label>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card-text>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-row align="center">
|
<v-row align="center">
|
||||||
<v-col cols="4">
|
<v-col cols="4">
|
||||||
|
@ -373,6 +409,7 @@ export default {
|
||||||
is_active: null,
|
is_active: null,
|
||||||
is_multiple_use: false,
|
is_multiple_use: false,
|
||||||
coupon_number_count: null,
|
coupon_number_count: null,
|
||||||
|
coupon_type: 'CAN',
|
||||||
|
|
||||||
page: 1,
|
page: 1,
|
||||||
total_page: 0,
|
total_page: 0,
|
||||||
|
@ -414,6 +451,12 @@ export default {
|
||||||
sortable: false,
|
sortable: false,
|
||||||
value: 'couponName',
|
value: 'couponName',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: '쿠폰종류',
|
||||||
|
align: 'center',
|
||||||
|
sortable: false,
|
||||||
|
value: 'couponType',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: '쿠폰금액',
|
text: '쿠폰금액',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -542,6 +585,7 @@ export default {
|
||||||
this.is_active = null
|
this.is_active = null
|
||||||
this.is_multiple_use = false
|
this.is_multiple_use = false
|
||||||
this.coupon_number_count = null
|
this.coupon_number_count = null
|
||||||
|
this.coupon_type = 'CAN'
|
||||||
},
|
},
|
||||||
|
|
||||||
showModifyDialog(value) {
|
showModifyDialog(value) {
|
||||||
|
@ -628,6 +672,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
const res = await api.generateCoupon(
|
const res = await api.generateCoupon(
|
||||||
this.coupon_name,
|
this.coupon_name,
|
||||||
|
this.coupon_type,
|
||||||
this.can,
|
this.can,
|
||||||
this.validity,
|
this.validity,
|
||||||
this.is_multiple_use,
|
this.is_multiple_use,
|
||||||
|
|
Loading…
Reference in New Issue