9.9
This commit is contained in:
parent
c92f9d546f
commit
5f054e7ac2
@ -80,7 +80,7 @@
|
|||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<el-button type="text" @click="grounding">修改</el-button>
|
<el-button type="text" @click="updetenCardCoupon(scope.row.id)">修改</el-button>
|
||||||
<el-button type="text" @click="">下架</el-button>
|
<el-button type="text" @click="">下架</el-button>
|
||||||
<el-button type="text" @click="remindOpen(scope.row)">删除</el-button>
|
<el-button type="text" @click="remindOpen(scope.row)">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -177,9 +177,9 @@
|
|||||||
<!-- 适用油品油号 oilNumber -->
|
<!-- 适用油品油号 oilNumber -->
|
||||||
<el-form-item label="适用油品油号" prop="oilLimit" style="width: 45%;">
|
<el-form-item label="适用油品油号" prop="oilLimit" style="width: 45%;">
|
||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<el-radio-group v-model="ruleForm.oilLimit">
|
<el-radio-group v-model="ruleForm.oilLimit.toString()">
|
||||||
<el-radio :label="1">不限</el-radio>
|
<el-radio :label="'1'">不限</el-radio>
|
||||||
<el-radio :label="2">自定义</el-radio>
|
<el-radio :label="'2'">自定义</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<el-select v-model="ruleForm.oilNumber" multiple placeholder="请选择" style="margin-left: 5px">
|
<el-select v-model="ruleForm.oilNumber" multiple placeholder="请选择" style="margin-left: 5px">
|
||||||
<!-- <el-option v-for="dict in dict.type.oilNumber_type" :key="dict.value" :label="dict.label"-->
|
<!-- <el-option v-for="dict in dict.type.oilNumber_type" :key="dict.value" :label="dict.label"-->
|
||||||
@ -193,7 +193,7 @@
|
|||||||
<div class="d-s" style="justify-content: space-between">
|
<div class="d-s" style="justify-content: space-between">
|
||||||
<el-form-item label="适用会员等级" prop="membershipLevel" style="width: 30%;">
|
<el-form-item label="适用会员等级" prop="membershipLevel" style="width: 30%;">
|
||||||
<el-select v-model="ruleForm.membershipLevel" multiple placeholder="请选择">
|
<el-select v-model="ruleForm.membershipLevel" multiple placeholder="请选择">
|
||||||
<el-option v-for="item in membership" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item,index) in membership"
|
v-for="(item,index) in membership"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
@ -203,9 +203,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否允许收银台送券" label-width="160px" prop="sySend" style="width: 45%;">
|
<el-form-item label="是否允许收银台送券" label-width="160px" prop="sySend" style="width: 45%;">
|
||||||
|
|
||||||
<el-radio-group v-model="ruleForm.sySend">
|
<el-radio-group v-model="ruleForm.sySend.toString()">
|
||||||
<el-radio :label="0">否</el-radio>
|
<el-radio :label="'0'">否</el-radio>
|
||||||
<el-radio :label="1">是</el-radio>
|
<el-radio :label="'1'">是</el-radio>
|
||||||
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
|
||||||
@ -216,12 +216,12 @@
|
|||||||
<!-- 生效日期设置 timeType 字段 -->
|
<!-- 生效日期设置 timeType 字段 -->
|
||||||
<el-form-item label="生效日期设置" prop="timeType" style="width: 45%;">
|
<el-form-item label="生效日期设置" prop="timeType" style="width: 45%;">
|
||||||
<div class="d-s">
|
<div class="d-s">
|
||||||
<el-radio-group v-model="ruleForm.timeType">
|
<el-radio-group v-model="ruleForm.timeType.toString()">
|
||||||
<el-radio :label="1">领取
|
<el-radio :label="'1'">领取
|
||||||
<el-input v-model="ruleForm.validityDay" placeholder=""
|
<el-input v-model="ruleForm.validityDay" placeholder=""
|
||||||
style="width: 80px;margin: 0px 10px"></el-input>
|
style="width: 80px;margin: 0px 10px"></el-input>
|
||||||
<span>天内有效</span></el-radio>
|
<span>天内有效</span></el-radio>
|
||||||
<el-radio :label="2">指定使用日期</el-radio>
|
<el-radio :label="'2'">指定使用日期</el-radio>
|
||||||
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
|
||||||
@ -229,8 +229,20 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 生效日期 effectiveDateStart 字段 -->
|
<!-- 生效日期 effectiveDateStart 字段 -->
|
||||||
<el-form-item label="生效日期" prop="effectiveDateStart" style="width: 45%;">
|
<el-form-item label="生效日期" prop="effectiveDateStart" style="width: 45%;">
|
||||||
<el-date-picker v-model="ruleForm.effectiveDateStart" type="daterange" range-separator="至"
|
<el-date-picker
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期">
|
v-model="ruleForm.effectiveDateStart"
|
||||||
|
style="width: 160px"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="开始日期">
|
||||||
|
</el-date-picker>
|
||||||
|
<span style="margin: 0 5px">至</span>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="ruleForm.effectiveDateEnd"
|
||||||
|
style="width: 160px"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="结束日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
@ -238,9 +250,9 @@
|
|||||||
<div class="d-s" style="justify-content: space-between">
|
<div class="d-s" style="justify-content: space-between">
|
||||||
<el-form-item label="是否与其他优惠同时使用" label-width="180px" prop="useWithOther" style="width: 45%;">
|
<el-form-item label="是否与其他优惠同时使用" label-width="180px" prop="useWithOther" style="width: 45%;">
|
||||||
|
|
||||||
<el-radio-group v-model="ruleForm.useWithOther">
|
<el-radio-group v-model="ruleForm.useWithOther.toString()">
|
||||||
<el-radio :label="0">不可以</el-radio>
|
<el-radio :label="'0'">不可以</el-radio>
|
||||||
<el-radio :label="1">可以</el-radio>
|
<el-radio :label="'1'">可以</el-radio>
|
||||||
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
|
||||||
@ -262,14 +274,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="d-s" style="justify-content: space-between">
|
<div class="d-s" style="justify-content: space-between">
|
||||||
<el-form-item label="适用时间段" style="width: 45%;">
|
<el-form-item label="适用时间段" style="width: 45%;">
|
||||||
<el-radio-group v-model="ruleForm.availableType">
|
<el-radio-group v-model="ruleForm.availableType.toString()">
|
||||||
<el-radio :label="1" style="margin-bottom: 15px">每周
|
<el-radio :label="'1'" style="margin-bottom: 15px">每周
|
||||||
<el-select v-model="ruleForm.availableWeek" multiple placeholder="请选择周日期">
|
<el-select v-model="ruleForm.availableWeek" multiple placeholder="请选择周日期">
|
||||||
<el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
|
<el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
<el-radio :label="2" style="margin-bottom: 15px">每月
|
<el-radio :label="'2'" style="margin-bottom: 15px">每月
|
||||||
<el-select v-model="ruleForm.availableDay" multiple placeholder="请选择每月固定日期">
|
<el-select v-model="ruleForm.availableDay" multiple placeholder="请选择每月固定日期">
|
||||||
<el-option v-for="item in monthList" :key="item.value" :label="item.label" :value="item.value">
|
<el-option v-for="item in monthList" :key="item.value" :label="item.label" :value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
@ -304,14 +316,14 @@
|
|||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="不适用时间段" style="width: 45%;">
|
<el-form-item label="不适用时间段" style="width: 45%;">
|
||||||
<el-radio-group v-model="ruleForm.unAvailableType">
|
<el-radio-group v-model="ruleForm.unAvailableType.toString()">
|
||||||
<el-radio :label="1" style="margin-bottom: 15px">每周
|
<el-radio :label="'1'" style="margin-bottom: 15px">每周
|
||||||
<el-select v-model="ruleForm.unAvailableWeek" multiple placeholder="请选择周日期">
|
<el-select v-model="ruleForm.unAvailableWeek" multiple placeholder="请选择周日期">
|
||||||
<el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
|
<el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
<el-radio :label="2" style="margin-bottom: 15px">每月
|
<el-radio :label="'2'" style="margin-bottom: 15px">每月
|
||||||
<el-select v-model="ruleForm.unAvailableDay" multiple placeholder="请选择每月固定日期">
|
<el-select v-model="ruleForm.unAvailableDay" multiple placeholder="请选择每月固定日期">
|
||||||
<el-option v-for="item in monthList" :key="item.value" :label="item.label" :value="item.value">
|
<el-option v-for="item in monthList" :key="item.value" :label="item.label" :value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
@ -405,7 +417,7 @@ import imgUpload from "@/components/ImageUpload/index.vue"
|
|||||||
import {getToken} from "@/utils/auth";
|
import {getToken} from "@/utils/auth";
|
||||||
import imgUpload1 from "@/components/map/imgUpload.vue";
|
import imgUpload1 from "@/components/map/imgUpload.vue";
|
||||||
import {Row} from "element-ui";
|
import {Row} from "element-ui";
|
||||||
import {addCardCoupon, listCardCoupon} from "@/api/EventMarketing/cardCoupon";
|
import {addCardCoupon, listCardCoupon,getCardCoupon} from "@/api/EventMarketing/cardCoupon";
|
||||||
import {getOilNameList, oilNumberList} from "@/api/order/oilnumgun";
|
import {getOilNameList, oilNumberList} from "@/api/order/oilnumgun";
|
||||||
import {listUserGrade} from "@/api/staff/user/usergrade";
|
import {listUserGrade} from "@/api/staff/user/usergrade";
|
||||||
|
|
||||||
@ -638,6 +650,12 @@ export default {
|
|||||||
oilNumberList:[],
|
oilNumberList:[],
|
||||||
oilNameList:[],
|
oilNameList:[],
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
|
oilLimit:'1',
|
||||||
|
sySend:'0',
|
||||||
|
timeType:'1',
|
||||||
|
useWithOther:'0',
|
||||||
|
availableType:'1',
|
||||||
|
unAvailableType:'1',
|
||||||
name: '',
|
name: '',
|
||||||
number: '',
|
number: '',
|
||||||
status: '',
|
status: '',
|
||||||
@ -660,22 +678,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
membership: [
|
membership: [
|
||||||
{
|
|
||||||
label: "普通会员",
|
|
||||||
value: '0'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "白金会员",
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "黄金会员",
|
|
||||||
value: '2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "钻石会员",
|
|
||||||
value: '3'
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
@ -693,7 +696,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getOilList()
|
this.getOilList()
|
||||||
this.listUserGrade()
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
imgUpload1,
|
imgUpload1,
|
||||||
@ -742,9 +745,61 @@ export default {
|
|||||||
TypeindexOther(index) {
|
TypeindexOther(index) {
|
||||||
this.useWithOther = index;
|
this.useWithOther = index;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updetenCardCoupon(id) {
|
||||||
|
this.centerDialogVisible = !this.centerDialogVisible
|
||||||
|
getCardCoupon(id).then(res => {
|
||||||
|
this.ruleForm = res.data
|
||||||
|
if( res.data.unAvailableWeek){
|
||||||
|
this.ruleForm.unAvailableWeek = res.data.unAvailableWeek.split(",")
|
||||||
|
}
|
||||||
|
if(res.data.unAvailableDay){
|
||||||
|
this.ruleForm.unAvailableDay = res.data.unAvailableDay.split(",")
|
||||||
|
}
|
||||||
|
if( res.data.availableWeek){
|
||||||
|
this.ruleForm.availableWeek = res.data.availableWeek.split(",")
|
||||||
|
}
|
||||||
|
if(res.data.availableDay){
|
||||||
|
this.ruleForm.availableDay = res.data.availableDay.split(",")
|
||||||
|
}
|
||||||
|
if(res.data.membershipLevel){
|
||||||
|
this.ruleForm.membershipLevel = res.data.membershipLevel.split(",")
|
||||||
|
}
|
||||||
|
if(res.data.oilNumber){
|
||||||
|
this.ruleForm.oilNumber = res.data.oilNumber.split(",")
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
addCertificate() {
|
addCertificate() {
|
||||||
|
this.ruleForm = {
|
||||||
|
oilLimit:1,
|
||||||
|
sySend:0,
|
||||||
|
timeType:1,
|
||||||
|
useWithOther:0,
|
||||||
|
availableType:1,
|
||||||
|
unAvailableType:1,
|
||||||
|
name: '',
|
||||||
|
number: '',
|
||||||
|
quantity: '',
|
||||||
|
cardAmount: '',
|
||||||
|
remark: '',
|
||||||
|
putType: '',
|
||||||
|
oilNumber: '',
|
||||||
|
region: '',
|
||||||
|
membershipLevel: '',
|
||||||
|
limitTotalDay: '',
|
||||||
|
ruleForm: '',
|
||||||
|
tfTotal: 0,
|
||||||
|
dayGetLimit: 0,
|
||||||
|
getNumLimit: 0,
|
||||||
|
useCondition: "",
|
||||||
|
validityDay: 30
|
||||||
|
|
||||||
|
},
|
||||||
this.centerDialogVisible = !this.centerDialogVisible
|
this.centerDialogVisible = !this.centerDialogVisible
|
||||||
// 新增优惠券
|
// 新增优惠券
|
||||||
|
this.listUserGrade()
|
||||||
},
|
},
|
||||||
getwysk(row) {
|
getwysk(row) {
|
||||||
if (row.sailStatus == 1) {
|
if (row.sailStatus == 1) {
|
||||||
@ -927,15 +982,30 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
addBlock() {
|
addBlock() {
|
||||||
if (this.ruleForm.quantity == '' || this.ruleForm.cardAmount == '' || this.ruleForm.status == '') {
|
if( this.ruleForm.unAvailableWeek){
|
||||||
this.$message.error('必填项不能有空')
|
this.ruleForm.unAvailableWeek = this.ruleForm.unAvailableWeek.toString()
|
||||||
return
|
|
||||||
}
|
}
|
||||||
let data = this.ruleForm
|
if(this.ruleForm.unAvailableDay){
|
||||||
console.log(data);
|
this.ruleForm.unAvailableDay = this.ruleForm.unAvailableDay.toString()
|
||||||
|
}
|
||||||
|
if( this.ruleForm.availableWeek){
|
||||||
|
this.ruleForm.availableWeek = this.ruleForm.availableWeek.toString()
|
||||||
|
}
|
||||||
|
if(this.ruleForm.availableDay){
|
||||||
|
this.ruleForm.availableDay = this.ruleForm.availableDay.toString()
|
||||||
|
}
|
||||||
|
if(this.ruleForm.membershipLevel){
|
||||||
|
this.ruleForm.membershipLevel = this.ruleForm.membershipLevel.toString()
|
||||||
|
}
|
||||||
|
if(this.ruleForm.oilNumber){
|
||||||
|
this.ruleForm.oilNumber = this.ruleForm.oilNumber.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// addList(data).then(res => {
|
// addList(data).then(res => {
|
||||||
addCardCoupon(data).then(res => {
|
addCardCoupon(this.ruleForm).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message.success('添加成功');
|
this.$message.success('添加成功');
|
||||||
this.gettj()
|
this.gettj()
|
||||||
|
@ -79,6 +79,8 @@ public class CardCouponController extends BaseController {
|
|||||||
if (count>0){
|
if (count>0){
|
||||||
return getFailureResult("编号已存在");
|
return getFailureResult("编号已存在");
|
||||||
}
|
}
|
||||||
|
cardCoupon.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
cardCoupon.setChainStorId(nowAccountInfo.getChainStoreId());
|
||||||
return getSuccessResult(this.cardCouponService.save(cardCoupon));
|
return getSuccessResult(this.cardCouponService.save(cardCoupon));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,8 +2,12 @@ package com.fuint.business.marketingActivity.cardCoupon.entity;
|
|||||||
|
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
@ -18,6 +22,8 @@ import java.io.Serializable;
|
|||||||
@Data
|
@Data
|
||||||
public class CardCoupon extends Model<CardCoupon> {
|
public class CardCoupon extends Model<CardCoupon> {
|
||||||
//主键id
|
//主键id
|
||||||
|
@ApiModelProperty("自增ID")
|
||||||
|
@TableId(value = "ID", type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
//所属连锁店id
|
//所属连锁店id
|
||||||
private Integer chainStorId;
|
private Integer chainStorId;
|
||||||
|
Loading…
Reference in New Issue
Block a user