Merge pull request '쿠폰생성 - 쿠폰타입(포인트, 캔) 선택 추가' (#73) from test into main
Reviewed-on: #73
This commit is contained in:
		| @@ -22,8 +22,8 @@ async function getCouponList(page) { | ||||
|     return Vue.axios.get('/can/coupon?page=' + (page - 1) + "&size=20"); | ||||
| } | ||||
|  | ||||
| async function generateCoupon(couponName, can, validity, isMultipleUse, couponNumberCount) { | ||||
|     const request = {couponName, can, validity: validity + ' 23:59:59', isMultipleUse, couponNumberCount}; | ||||
| async function generateCoupon(couponName, couponType, can, validity, isMultipleUse, couponNumberCount) { | ||||
|     const request = {couponName, couponType, can, validity: validity + ' 23:59:59', isMultipleUse, couponNumberCount}; | ||||
|     return Vue.axios.post('/can/coupon', request); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
|         <v-col> | ||||
|           <v-btn | ||||
|             block | ||||
|             color="#9970ff" | ||||
|             color="#3bb9f1" | ||||
|             dark | ||||
|             depressed | ||||
|             @click="showWriteDialog" | ||||
| @@ -42,6 +42,10 @@ | ||||
|               <span @click="getCouponNumberList(item)">{{ item.couponName }}</span> | ||||
|             </template> | ||||
|  | ||||
|             <template v-slot:item.couponType="{ item }"> | ||||
|               {{ item.couponType }} | ||||
|             </template> | ||||
|  | ||||
|             <template v-slot:item.can="{ item }"> | ||||
|               {{ item.can.toLocaleString('en-US') }} | ||||
|             </template> | ||||
| @@ -132,6 +136,38 @@ | ||||
|               label="발행수량" | ||||
|             /> | ||||
|           </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-row align="center"> | ||||
|               <v-col cols="4"> | ||||
| @@ -373,6 +409,7 @@ export default { | ||||
|       is_active: null, | ||||
|       is_multiple_use: false, | ||||
|       coupon_number_count: null, | ||||
|       coupon_type: 'CAN', | ||||
|  | ||||
|       page: 1, | ||||
|       total_page: 0, | ||||
| @@ -414,6 +451,12 @@ export default { | ||||
|           sortable: false, | ||||
|           value: 'couponName', | ||||
|         }, | ||||
|         { | ||||
|           text: '쿠폰종류', | ||||
|           align: 'center', | ||||
|           sortable: false, | ||||
|           value: 'couponType', | ||||
|         }, | ||||
|         { | ||||
|           text: '쿠폰금액', | ||||
|           align: 'center', | ||||
| @@ -542,6 +585,7 @@ export default { | ||||
|       this.is_active = null | ||||
|       this.is_multiple_use = false | ||||
|       this.coupon_number_count = null | ||||
|       this.coupon_type = 'CAN' | ||||
|     }, | ||||
|  | ||||
|     showModifyDialog(value) { | ||||
| @@ -628,6 +672,7 @@ export default { | ||||
|       try { | ||||
|         const res = await api.generateCoupon( | ||||
|           this.coupon_name, | ||||
|           this.coupon_type, | ||||
|           this.can, | ||||
|           this.validity, | ||||
|           this.is_multiple_use, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user