Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a389ac5d43
@ -192,13 +192,17 @@
|
|||||||
<el-form-item label="活动名称" prop="name">
|
<el-form-item label="活动名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="满减规则" prop="activeDiscountChildList">
|
<el-form-item label="折扣规则" prop="activeDiscountChildList">
|
||||||
<div style="width: 100%; display: flex;align-items: center; margin-bottom: 10px " v-for="(item,index) in activeDiscountChildList" :key="index">
|
<div style="width: 100%; display: flex;align-items: center; margin-bottom: 10px " v-for="(item,index) in activeDiscountChildList" :key="index">
|
||||||
<div style="width: 25%;display: flex; align-items: center;margin-right: 20px " >
|
<div style="width: 25%;display: flex; align-items: center;margin-right: 20px " >
|
||||||
<span>满</span> <el-input-number v-model="item.amount" :min="0" :max="99999" label="0"></el-input-number> <span>元</span>
|
<span style="margin: 0 5px">满</span>
|
||||||
|
<el-input-number v-model="item.amount" :min="0" :max="99999" label="0"></el-input-number>
|
||||||
|
<span style="margin: 0 5px">元</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 25%;display: flex; align-items: center;">
|
<div style="width: 25%;display: flex; align-items: center;">
|
||||||
<span>打</span> <el-input-number v-model="item.discount" :min="0" :max="9.9" placeholder="1 ~ 9.9" label=""></el-input-number> <span>折</span>
|
<span style="margin: 0 5px">打</span>
|
||||||
|
<el-input-number v-model="item.discount" :min="0" :max="9.9" placeholder="1 ~ 9.9" label=""></el-input-number>
|
||||||
|
<span style="margin: 0 5px">折</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div @click="deleteactiveDiscountChildList(index)">
|
<div @click="deleteactiveDiscountChildList(index)">
|
||||||
@ -233,7 +237,29 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-form-item label="是否有会员日" prop="memberDayType">
|
||||||
|
<el-radio-group v-model="form.memberDayType">
|
||||||
|
<el-radio label="0">无会员日</el-radio>
|
||||||
|
<el-radio label="1">指定日</el-radio>
|
||||||
|
<el-radio label="2">指定星期</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.memberDayType=='1'" prop="monthDay">
|
||||||
|
<el-checkbox-group v-model="monthDay" @change="changeMonth">
|
||||||
|
<el-checkbox v-for="item in 31" :key="item" :label="item+''">{{item}}日</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.memberDayType=='2'" prop="weekDay">
|
||||||
|
<el-checkbox-group v-model="weekDay">
|
||||||
|
<el-checkbox label="星期一">星期一</el-checkbox>
|
||||||
|
<el-checkbox label="星期二">星期二</el-checkbox>
|
||||||
|
<el-checkbox label="星期三">星期三</el-checkbox>
|
||||||
|
<el-checkbox label="星期四">星期四</el-checkbox>
|
||||||
|
<el-checkbox label="星期五">星期五</el-checkbox>
|
||||||
|
<el-checkbox label="星期六">星期六</el-checkbox>
|
||||||
|
<el-checkbox label="星期日">星期日</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -357,11 +383,12 @@ export default {
|
|||||||
status: null,
|
status: null,
|
||||||
isonline: null,
|
isonline: null,
|
||||||
},
|
},
|
||||||
|
weekDay:[],
|
||||||
|
monthDay:[],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
@ -398,6 +425,9 @@ export default {
|
|||||||
activeDiscountChildList:[
|
activeDiscountChildList:[
|
||||||
{ required: true, message: '不能为空', trigger: 'change' }
|
{ required: true, message: '不能为空', trigger: 'change' }
|
||||||
],
|
],
|
||||||
|
memberDayType:[
|
||||||
|
{ required: true, message: '不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -509,9 +539,14 @@ export default {
|
|||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.activeDiscountChildList = [ {amount:'',discount:''}, ]
|
this.activeDiscountChildList = [ {amount:'',discount:''}, ]
|
||||||
|
this.monthDay = []
|
||||||
|
this.weekDay = []
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加折扣营销";
|
this.title = "添加折扣营销";
|
||||||
},
|
},
|
||||||
|
changeMonth(val){
|
||||||
|
console.log(val,this.monthDay,111)
|
||||||
|
},
|
||||||
// 获取油号名称
|
// 获取油号名称
|
||||||
getName(oilNameList,ids){
|
getName(oilNameList,ids){
|
||||||
let name = ""
|
let name = ""
|
||||||
@ -537,6 +572,16 @@ export default {
|
|||||||
}else {
|
}else {
|
||||||
this.activeDiscountChildList = [ {amount:'',discount:''}, ]
|
this.activeDiscountChildList = [ {amount:'',discount:''}, ]
|
||||||
}
|
}
|
||||||
|
if (this.form.monthDay){
|
||||||
|
this.monthDay = this.form.monthDay.split(",")
|
||||||
|
}else {
|
||||||
|
this.monthDay = []
|
||||||
|
}
|
||||||
|
if (this.form.weekDay){
|
||||||
|
this.weekDay = this.form.weekDay.split(",")
|
||||||
|
}else {
|
||||||
|
this.weekDay = []
|
||||||
|
}
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改折扣营销";
|
this.title = "修改折扣营销";
|
||||||
});
|
});
|
||||||
@ -602,6 +647,8 @@ export default {
|
|||||||
this.form.activeDiscountChildList = this.activeDiscountChildList
|
this.form.activeDiscountChildList = this.activeDiscountChildList
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.form.monthDay = this.monthDay.toString()
|
||||||
|
this.form.weekDay = this.weekDay.toString()
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateActiveDiscount(this.form).then(response => {
|
updateActiveDiscount(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
@ -183,10 +183,14 @@
|
|||||||
<el-form-item label="满减规则" prop="activeDiscountChildList">
|
<el-form-item label="满减规则" prop="activeDiscountChildList">
|
||||||
<div style="width: 100%; display: flex;align-items: center; margin-bottom: 10px " v-for="(item,index) in activeDiscountChildList" :key="index">
|
<div style="width: 100%; display: flex;align-items: center; margin-bottom: 10px " v-for="(item,index) in activeDiscountChildList" :key="index">
|
||||||
<div style="width: 25%;display: flex; align-items: center;margin-right: 20px " >
|
<div style="width: 25%;display: flex; align-items: center;margin-right: 20px " >
|
||||||
<span>满</span> <el-input-number v-model="item.amount" :min="0" :max="99999" label="0"></el-input-number> <span>元</span>
|
<span style="margin: 0 5px">满</span>
|
||||||
|
<el-input-number v-model="item.amount" :min="0" :max="99999" label="0"></el-input-number>
|
||||||
|
<span style="margin: 0 5px">元</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 25%;display: flex; align-items: center;">
|
<div style="width: 25%;display: flex; align-items: center;">
|
||||||
<span>减</span> <el-input-number v-model="item.deductionAmount" :min="0" :max="item.amount||0" label=""></el-input-number> <span>元</span>
|
<span style="margin: 0 5px">减</span>
|
||||||
|
<el-input-number v-model="item.deductionAmount" :min="0" :max="item.amount||0" label=""></el-input-number>
|
||||||
|
<span style="margin: 0 5px">元</span>
|
||||||
</div>
|
</div>
|
||||||
<div @click="deleteactiveDiscountChildList(index)">
|
<div @click="deleteactiveDiscountChildList(index)">
|
||||||
<el-button type="danger" icon="el-icon-delete" circle style="margin-left: 8px" ></el-button>
|
<el-button type="danger" icon="el-icon-delete" circle style="margin-left: 8px" ></el-button>
|
||||||
@ -220,6 +224,31 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-form-item label="是否有会员日" prop="memberDayType">
|
||||||
|
<el-radio-group v-model="form.memberDayType">
|
||||||
|
<el-radio label="0">无会员日</el-radio>
|
||||||
|
<el-radio label="1">指定日</el-radio>
|
||||||
|
<el-radio label="2">指定星期</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.memberDayType=='1'" prop="monthDay">
|
||||||
|
<el-checkbox-group v-model="monthDay">
|
||||||
|
<el-checkbox v-for="item in 31" :key="item" :label="item+''">{{item}}日</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.memberDayType=='2'" prop="weekDay">
|
||||||
|
<el-checkbox-group v-model="weekDay">
|
||||||
|
<el-checkbox label="星期一">星期一</el-checkbox>
|
||||||
|
<el-checkbox label="星期二">星期二</el-checkbox>
|
||||||
|
<el-checkbox label="星期三">星期三</el-checkbox>
|
||||||
|
<el-checkbox label="星期四">星期四</el-checkbox>
|
||||||
|
<el-checkbox label="星期五">星期五</el-checkbox>
|
||||||
|
<el-checkbox label="星期六">星期六</el-checkbox>
|
||||||
|
<el-checkbox label="星期日">星期日</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="可用油品" prop="adaptOil" >
|
<el-form-item label="可用油品" prop="adaptOil" >
|
||||||
<el-checkbox-group v-model="form.adaptOil">
|
<el-checkbox-group v-model="form.adaptOil">
|
||||||
<el-checkbox v-for="(item,index) in oillist" :label="item.id" :key="index">{{item.oilType}}{{item.oilName}}</el-checkbox>
|
<el-checkbox v-for="(item,index) in oillist" :label="item.id" :key="index">{{item.oilType}}{{item.oilName}}</el-checkbox>
|
||||||
@ -336,6 +365,8 @@ export default {
|
|||||||
status: null,
|
status: null,
|
||||||
isonline: null,
|
isonline: null,
|
||||||
},
|
},
|
||||||
|
weekDay:[],
|
||||||
|
monthDay:[],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
@ -361,6 +392,9 @@ export default {
|
|||||||
naturalUserLevel:[
|
naturalUserLevel:[
|
||||||
{ required: true, message: '不能为空', trigger: 'change' }
|
{ required: true, message: '不能为空', trigger: 'change' }
|
||||||
],
|
],
|
||||||
|
memberDayType:[
|
||||||
|
{ required: true, message: '不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
participationCondition:[
|
participationCondition:[
|
||||||
{ required: true, message: '不能为空', trigger: 'change' }
|
{ required: true, message: '不能为空', trigger: 'change' }
|
||||||
],
|
],
|
||||||
@ -393,7 +427,6 @@ export default {
|
|||||||
},
|
},
|
||||||
getoilName(){
|
getoilName(){
|
||||||
getoilName().then(res=>{
|
getoilName().then(res=>{
|
||||||
console.log(res)
|
|
||||||
this.oillist = res.data
|
this.oillist = res.data
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -478,6 +511,8 @@ export default {
|
|||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
this.monthDay = []
|
||||||
|
this.weekDay = []
|
||||||
this.activeDiscountChildList = [ {amount:'',deductionAmount:''}, ]
|
this.activeDiscountChildList = [ {amount:'',deductionAmount:''}, ]
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加满减营销";
|
this.title = "添加满减营销";
|
||||||
@ -500,13 +535,22 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids
|
||||||
getActiveFullminus(id).then(response => {
|
getActiveFullminus(id).then(response => {
|
||||||
console.log(response)
|
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
if (response.data.activeDiscountChildList && response.data.activeDiscountChildList.length>0){
|
if (response.data.activeDiscountChildList && response.data.activeDiscountChildList.length>0){
|
||||||
this.activeDiscountChildList = response.data.activeDiscountChildList
|
this.activeDiscountChildList = response.data.activeDiscountChildList
|
||||||
}else {
|
}else {
|
||||||
this.activeDiscountChildList = [ {amount:'',deductionAmount:''}, ]
|
this.activeDiscountChildList = [ {amount:'',deductionAmount:''}, ]
|
||||||
}
|
}
|
||||||
|
if (response.data.monthDay){
|
||||||
|
this.monthDay = response.data.monthDay.split(",")
|
||||||
|
}else {
|
||||||
|
this.monthDay = []
|
||||||
|
}
|
||||||
|
if (response.data.weekDay){
|
||||||
|
this.weekDay = response.data.weekDay.split(",")
|
||||||
|
}else {
|
||||||
|
this.weekDay = []
|
||||||
|
}
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改满减营销";
|
this.title = "修改满减营销";
|
||||||
});
|
});
|
||||||
@ -570,6 +614,8 @@ export default {
|
|||||||
this.form.activeDiscountChildList = this.activeDiscountChildList
|
this.form.activeDiscountChildList = this.activeDiscountChildList
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.form.monthDay = this.monthDay.toString()
|
||||||
|
this.form.weekDay = this.weekDay.toString()
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateActiveFullminus(this.form).then(response => {
|
updateActiveFullminus(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
@ -279,6 +279,13 @@
|
|||||||
<el-radio label="2">会员等级</el-radio>
|
<el-radio label="2">会员等级</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="会员等级" prop="region" v-if="form.exclusiveFunction == '2' " >
|
||||||
|
<el-select v-model="form.membershipLevel" multiple placeholder="会员等级" >
|
||||||
|
<el-option v-for="(item,index) in vipname" :key="index" :label="item.name" :value="item.id.toString()"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="领取规则 " prop="claimRule">
|
<el-form-item label="领取规则 " prop="claimRule">
|
||||||
<el-radio-group v-model="form.claimRule">
|
<el-radio-group v-model="form.claimRule">
|
||||||
<el-radio label="0">每人限领一张</el-radio>
|
<el-radio label="0">每人限领一张</el-radio>
|
||||||
@ -386,6 +393,7 @@
|
|||||||
import { listFavorable, getFavorable,getcardFavorable,getcount,getcountList, delFavorable, addFavorable, updateFavorable } from "@/api/EventMarketing/cardFavorable";
|
import { listFavorable, getFavorable,getcardFavorable,getcount,getcountList, delFavorable, addFavorable, updateFavorable } from "@/api/EventMarketing/cardFavorable";
|
||||||
import { getoilName, } from "@/api/EventMarketing/activeConsumption";
|
import { getoilName, } from "@/api/EventMarketing/activeConsumption";
|
||||||
import {deleteById} from "@/api/EventMarketing/oilBlock";
|
import {deleteById} from "@/api/EventMarketing/oilBlock";
|
||||||
|
import {listUserGrade} from "@/api/EventMarketing/SaveBlock";
|
||||||
export default {
|
export default {
|
||||||
name: "Favorable",
|
name: "Favorable",
|
||||||
data() {
|
data() {
|
||||||
@ -476,6 +484,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
vipname:[],
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
timeType: [
|
timeType: [
|
||||||
@ -665,12 +674,18 @@ export default {
|
|||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
listUserGrade().then(res=>{
|
||||||
|
this.vipname = res.data.records
|
||||||
|
})
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加优惠券";
|
this.title = "添加优惠券";
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
listUserGrade().then(res=>{
|
||||||
|
this.vipname = res.data.records
|
||||||
|
})
|
||||||
getcardFavorable(row.id).then(res=>{
|
getcardFavorable(row.id).then(res=>{
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
Loading…
Reference in New Issue
Block a user