提交 40a3cdcf authored 作者: zhengfg's avatar zhengfg

添加购物返券类型

上级 115a6d09
...@@ -36,10 +36,20 @@ ...@@ -36,10 +36,20 @@
<Card v-show="!showList"> <Card v-show="!showList">
<p slot="title">{{title}}</p> <p slot="title">{{title}}</p>
<i-form ref="formValidate" :model="tbCfCoupon" :rules="ruleValidate" :label-width="80"> <i-form ref="formValidate" :model="tbCfCoupon" :rules="ruleValidate" :label-width="80">
<!-- <Form-item label="优惠券类型" prop="couponCategory"> <Form-item label="优惠券类型" prop="couponCategory">
<i-input v-model="tbCfCoupon.couponCategory" placeholder="优惠券类型"/> <!-- <i-input v-model="tbCfCoupon.couponCategory" placeholder="优惠券类型"/>-->
<template>
<el-select v-model="tbCfCoupon.couponCategory" placeholder="请选择优惠券类型">
<el-option
v-for="item in couponCategoryOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
</Form-item> </Form-item>
<Form-item label="可用于类目" prop="couponUse"> <!--<Form-item label="可用于类目" prop="couponUse">
<i-input v-model="tbCfCoupon.couponUse" placeholder="可用于类目"/> <i-input v-model="tbCfCoupon.couponUse" placeholder="可用于类目"/>
</Form-item>--> </Form-item>-->
<Form-item label="优惠券标题" prop="couponTitle"> <Form-item label="优惠券标题" prop="couponTitle">
......
...@@ -614,3 +614,20 @@ contentFormat = function (cellvalue, options, rowObject) { ...@@ -614,3 +614,20 @@ contentFormat = function (cellvalue, options, rowObject) {
var returnStr = "<span class='btn btn-primary' onclick=showContent('" + rowObject.problemId + "')>查看</span>"; var returnStr = "<span class='btn btn-primary' onclick=showContent('" + rowObject.problemId + "')>查看</span>";
return returnStr; return returnStr;
}; };
/**
* 优惠券类型
* @param cellvalue
*/
couponFormat = function (cellvalue, options, rowObject) {
var returnStr = "未知";
if (!!cellvalue||cellvalue == '0') {
if (cellvalue == '10') {
returnStr = "购物返券";
} else if (cellvalue == '20') {
returnStr = "注册返券";
} else if (cellvalue == '30') {
returnStr = "邀请返券";
}
}
return returnStr;
};
\ No newline at end of file
...@@ -3,7 +3,7 @@ $(function () { ...@@ -3,7 +3,7 @@ $(function () {
url: '../tbcfcoupon/list', url: '../tbcfcoupon/list',
colModel: [ colModel: [
{label: 'couponId', name: 'couponId', index: 'coupon_id', key: true, hidden: true}, {label: 'couponId', name: 'couponId', index: 'coupon_id', key: true, hidden: true},
{label: '优惠券类型', name: 'couponCategory', index: 'coupon_category', width: 80, hidden: true}, {label: '优惠券类型', name: 'couponCategory', index: 'coupon_category', width: 80,formatter:couponFormat},
{label: '可用于类目', name: 'couponUse', index: 'coupon_use', width: 80, hidden: true}, {label: '可用于类目', name: 'couponUse', index: 'coupon_use', width: 80, hidden: true},
{label: '优惠券标题', name: 'couponTitle', index: 'coupon_title', width: 80}, {label: '优惠券标题', name: 'couponTitle', index: 'coupon_title', width: 80},
{label: '优惠券图片地址', name: 'couponIcon', index: 'coupon_icon', width: 80}, {label: '优惠券图片地址', name: 'couponIcon', index: 'coupon_icon', width: 80},
...@@ -28,6 +28,17 @@ $(function () { ...@@ -28,6 +28,17 @@ $(function () {
let vm = new Vue({ let vm = new Vue({
el: '#rrapp', el: '#rrapp',
data: { data: {
//优惠券类型
couponCategoryOptions: [{
value: '10',
label: '购物返券'
}, {
value: '20',
label: '注册返券'
}, {
value: '30',
label: '邀请返券'
}],
showList: true, showList: true,
title: null, title: null,
tbCfCoupon: {}, tbCfCoupon: {},
......
...@@ -9,8 +9,8 @@ package com.platform.enums; ...@@ -9,8 +9,8 @@ package com.platform.enums;
public enum CouponCategoryEnum implements EnumItemable<CouponCategoryEnum> { public enum CouponCategoryEnum implements EnumItemable<CouponCategoryEnum> {
SHOP("购物返券", 10), SHOP("购物返券", 10),
REGISTER("注册", 20), REGISTER("注册返券", 20),
INVITE("邀请", 30); INVITE("邀请返券", 30);
private String label; private String label;
private Integer value; private Integer value;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论