11.15
This commit is contained in:
parent
793e5c9e39
commit
6a8849aea4
@ -8,6 +8,7 @@ export function listActiveConsumption(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//优惠券
|
||||
export function listFavorable(query) {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardFavorable',
|
||||
@ -15,11 +16,27 @@ export function listFavorable(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 兑换券
|
||||
export function listExchange(query) {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardExchange',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 实物
|
||||
export function listLJGoods(query) {
|
||||
return request({
|
||||
url: 'business/convenience/goods/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询消费有礼活动详细
|
||||
export function getActiveConsumption(id) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/activeConsumption/' + id,
|
||||
url: 'business/marketingActivity/activeConsumption/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@ -36,7 +53,7 @@ export function addActiveConsumption(data) {
|
||||
// 修改消费有礼活动
|
||||
export function updateActiveConsumption(data) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/activeConsumption',
|
||||
url: 'business/marketingActivity/activeConsumption',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
|
@ -34,6 +34,14 @@ export function updateRecord(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 核销
|
||||
export function cardExchangeRecord(data) {
|
||||
return request({
|
||||
url: 'business/marketingActivity/cardExchangeRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除兑换券领取记录
|
||||
export function delRecord(id) {
|
||||
|
@ -398,7 +398,7 @@
|
||||
},
|
||||
form: {
|
||||
sort:1,
|
||||
groupOriented:1,
|
||||
groupOriented:'1',
|
||||
rechargeBalance:'',
|
||||
giftBalance:'',
|
||||
points:'',
|
||||
@ -454,7 +454,7 @@
|
||||
this.form = {
|
||||
sort:1,
|
||||
membershipLevel:'',
|
||||
groupOriented:1,
|
||||
groupOriented: '1',
|
||||
rechargeBalance:'',
|
||||
giftBalance:'',
|
||||
points:'',
|
||||
|
@ -52,7 +52,11 @@
|
||||
<el-table-column label="活动id" align="center" prop="id" />
|
||||
|
||||
<el-table-column label="活动名称" align="center" prop="name" />
|
||||
<el-table-column label="满足金额" align="center" prop="participationConditionMoney" />
|
||||
<el-table-column label="满足金额" align="center" prop="participationConditionMoney" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.participationConditionMoney }} 元</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="活动开始时间" align="center" prop="activeStartTime" width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.activeStartTime, '{y}-{m}-{d}') }}</span>-->
|
||||
@ -60,16 +64,48 @@
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
|
||||
<el-table-column label="适用会员类型 0:全部用户 1:全部会员 2:等级会员" align="center" prop="adaptUserType" />
|
||||
<el-table-column label="适用会员类型" align="center" prop="adaptUserType" >
|
||||
<template slot-scope="scope">
|
||||
|
||||
<span v-if="scope.row.adaptUserType == 0">全部用户</span>
|
||||
<span v-if="scope.row.adaptUserType == 1">全部会员</span>
|
||||
<span v-if="scope.row.adaptUserType == 2">等级会员</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="柴油会员等级 1:一级会员 2:二级会员。。。。。。。" align="center" prop="dieselUserLevel" />
|
||||
<el-table-column label="汽油会员等级 1:一级会员 2:二级会员。。。。。。。" align="center" prop="gasolineUserLevel" />
|
||||
<el-table-column label="天然气会员等级 1:一级会员 2:二级会员。。。。。。。" align="center" prop="naturalUserLevel" />
|
||||
<el-table-column label="柴油会员等级" align="center" prop="dieselUserLevel" >
|
||||
<template slot-scope="scope">
|
||||
<span v-for="(item,index) in scope.row.dieselUserLevel "> V{{item}}会员 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="汽油会员等级" align="center" prop="gasolineUserLevel" >
|
||||
<template slot-scope="scope">
|
||||
<span v-for="(item,index) in scope.row.gasolineUserLevel "> V{{item}}会员 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="天然气会员等级 " align="center" prop="naturalUserLevel" >
|
||||
<template slot-scope="scope">
|
||||
<span v-for="(item,index) in scope.row.naturalUserLevel "> V{{item}}会员 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物" align="center" prop="activeGift" />
|
||||
<!-- <el-table-column label="活动奖品 " align="center" prop="activeGift" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
|
||||
<el-table-column label="活动状态 0:启用 1:禁用" align="center" prop="status" />
|
||||
<!-- <span v-if="scope.row.activeGift == 1">赠送优惠券</span>-->
|
||||
<!-- <span v-if="scope.row.activeGift == 2">赠送兑换券</span>-->
|
||||
<!-- <span v-if="scope.row.activeGift == 4">赠送实物</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column label="活动状态" align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
|
||||
<span v-if="scope.row.status == 0">启用</span>
|
||||
<span v-if="scope.row.status == 1">禁用</span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
@ -78,15 +114,15 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['business/marketingActivity:activeConsumption:edit']"
|
||||
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['business/marketingActivity:activeConsumption:remove']"
|
||||
>删除</el-button>
|
||||
@click="handleDeletexia(scope.row)"
|
||||
v-if="scope.row.isonline == 0"
|
||||
>下线</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -107,7 +143,7 @@
|
||||
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="满足金额" prop="participationConditionMoney">
|
||||
<el-input v-model="form.participationConditionMoney" placeholder="请输入满足金额" />
|
||||
<el-input-number :min="0" v-model="form.participationConditionMoney" placeholder="请输入满足金额" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="可用油品" prop="adaptOil" >
|
||||
@ -140,18 +176,18 @@
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="giftCardName"
|
||||
label="卡券名称"
|
||||
width="0">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
prop="giftCardType"
|
||||
label="券类型"
|
||||
width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type == 0" >油品券</span>
|
||||
<span v-if="scope.row.type == 1" >商品券</span>
|
||||
<span v-if="scope.row.type == 2" >通用券</span>
|
||||
<span v-if="scope.row.giftCardType == 0" >油品券</span>
|
||||
<span v-if="scope.row.giftCardType == 1" >商品券</span>
|
||||
<span v-if="scope.row.giftCardType == 2" >通用券</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@ -159,7 +195,7 @@
|
||||
label="券详情"
|
||||
width="80">
|
||||
<template slot-scope="scope">
|
||||
<span>满{{scope.row.fullDeduction}}减 {{scope.row.discountAmount}}元 </span>
|
||||
<span>{{scope.row.giftCardDetail}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@ -198,7 +234,7 @@
|
||||
</div>
|
||||
<!-- 选择兑换券-->
|
||||
<div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('2')>-1 " >
|
||||
<div class="box-bt"> <div >选择兑换券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()" >新增</el-button> </div>
|
||||
<div class="box-bt"> <div >选择兑换券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistExchange()" >新增</el-button> </div>
|
||||
<div style="margin: 10px 0px">
|
||||
|
||||
<el-table
|
||||
@ -206,36 +242,36 @@
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="giftCardName"
|
||||
label="卡券名称"
|
||||
width="100">
|
||||
width="80">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券类型"
|
||||
width="100">
|
||||
width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type == 0" >油品券</span>
|
||||
<span v-if="scope.row.type == 1" >商品券</span>
|
||||
<span v-if="scope.row.type == 2" >通用券</span>
|
||||
<span v-if="scope.row.giftCardType == 0" >油品券</span>
|
||||
<span v-if="scope.row.giftCardType == 1" >商品券</span>
|
||||
<span v-if="scope.row.giftCardType == 2" >通用券</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券详情"
|
||||
width="100">
|
||||
width="80">
|
||||
<template slot-scope="scope">
|
||||
<span>满{{scope.row.fullDeduction}}减 {{scope.row.discountAmount}}元 </span>
|
||||
<span>{{scope.row.giftCardDetail}}</span>
|
||||
<!-- <span>满{{scope.row.fullDeduction}}减 {{scope.row.discountAmount}}元 </span>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="有效期(天)"
|
||||
width="120">
|
||||
width="240">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.timeType == 0" > <el-input-number v-model="scope.row.validityZero" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 1" > <el-input-number v-model="scope.row.validityOne" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 2" > <el-input-number v-model="scope.row.validityTwo" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>
|
||||
<span > <el-input-number v-model="scope.row.giftCardTime" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@ -246,15 +282,16 @@
|
||||
<el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1" :max="9999"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="操作">
|
||||
label="操作"
|
||||
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="deletedata(scope.row)"
|
||||
@click="deletedhdata(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -264,28 +301,66 @@
|
||||
</div>
|
||||
<!-- 选择实物-->
|
||||
<div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('4')>-1 " >
|
||||
<div class="box-bt"> <div>赠送实物</div> </div>
|
||||
<div></div>
|
||||
<div class="box-bt"> <div >选择实物</div> <el-button type="primary" icon="el-icon-plus" @click="getlistLJGoods()" >新增</el-button> </div>
|
||||
<div style="margin: 10px 0px">
|
||||
|
||||
<el-table
|
||||
:data="form.shiwudata"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="goodsId"
|
||||
label="实物名称"
|
||||
width="240">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.goodsName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="count"
|
||||
label="数量"
|
||||
width="240">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.goodsTotal" controls-position="right" :min="1" :max="9999"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="操作"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="deleteswdata(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-form-item label="活动开始时间" prop="activeStartTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.activeStartTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择活动开始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动结束时间" prop="activeEndTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.activeEndTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择活动结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="柴油会员等级">
|
||||
<el-select v-model="form.dieselUserLevel" clearable placeholder="请选择柴油会员等级">
|
||||
<el-form-item label="柴油会员等级" prop="dieselUserLevel">
|
||||
<el-select v-model="form.dieselUserLevel" multiple clearable placeholder="请选择柴油会员等级">
|
||||
<el-option label="V1会员" value="1"></el-option>
|
||||
<el-option label="V2会员" value="2"></el-option>
|
||||
<el-option label="V3会员" value="3"></el-option>
|
||||
@ -297,8 +372,8 @@
|
||||
<el-option label="V9会员" value="9"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="汽油会员等级">
|
||||
<el-select v-model="form.gasolineUserLevel" clearable placeholder="请选择汽油会员等级">
|
||||
<el-form-item label="汽油会员等级" prop="gasolineUserLevel">
|
||||
<el-select v-model="form.gasolineUserLevel" multiple clearable placeholder="请选择汽油会员等级">
|
||||
<el-option label="V1会员" value="1"></el-option>
|
||||
<el-option label="V2会员" value="2"></el-option>
|
||||
<el-option label="V3会员" value="3"></el-option>
|
||||
@ -310,8 +385,8 @@
|
||||
<el-option label="V9会员" value="9"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="天然气会员等级">
|
||||
<el-select v-model="form.naturalUserLevel" clearable placeholder="请选择天然气会员等级">
|
||||
<el-form-item label="天然气会员等级" prop="naturalUserLevel">
|
||||
<el-select v-model="form.naturalUserLevel" multiple clearable placeholder="请选择天然气会员等级">
|
||||
<el-option label="V1会员" value="1"></el-option>
|
||||
<el-option label="V2会员" value="2"></el-option>
|
||||
<el-option label="V3会员" value="3"></el-option>
|
||||
@ -323,14 +398,14 @@
|
||||
<el-option label="V9会员" value="9"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="参与条件">
|
||||
<el-form-item label="参与条件" prop="participationCondition">
|
||||
<el-select v-model="form.participationCondition" clearable placeholder="请选择天参与条件">
|
||||
<el-option label="不限制" value="0"></el-option>
|
||||
<el-option label="优惠订单不参与" value="1"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="参与次数类别">
|
||||
<el-form-item label="参与次数类别" prop="participationAcount">
|
||||
<el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别">
|
||||
<el-option label="不限制" value="0"></el-option>
|
||||
<el-option label="限制" value="1"></el-option>
|
||||
@ -350,21 +425,22 @@
|
||||
|
||||
<el-input-number v-model="form.points" controls-position="right" :min="1" :max="999999"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否在线" prop="isonline">
|
||||
<el-form-item label="是否上线" prop="isonline">
|
||||
|
||||
<el-select v-model="form.isonline" clearable placeholder="请选择参与次数类别">
|
||||
<el-option label="在线" value="0"></el-option>
|
||||
<el-option label="上线" value="0"></el-option>
|
||||
<el-option label="下线" value="1"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<!-- 最终提交-->
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="券列表" :visible.sync="dialogTableVisible">
|
||||
<el-dialog title="优惠券列表" :visible.sync="dialogTableVisible">
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
@ -416,20 +492,103 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<!-- 兑换券列表-->
|
||||
<el-dialog title="兑换券列表" :visible.sync="dialogTableVisibledh">
|
||||
|
||||
<el-table
|
||||
:data="tableDatadh"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="卡券名称"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券类型"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type == 0" >油品券</span>
|
||||
<span v-if="scope.row.type == 1" >商品券</span>
|
||||
<span v-if="scope.row.type == 2" >通用券</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="使用说明"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.useInstructions}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="有效期(天)"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span >{{scope.row.validity}}天 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="Favorabledata(scope.row)"
|
||||
>选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<!-- 实物列表-->
|
||||
<el-dialog title="实物列表" :visible.sync="dialogTableVisiblesw">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-form-item label="选择商品">
|
||||
<el-select v-model="shopdata.goodsId" placeholder="请选择商品" @change="swchange">
|
||||
<el-option :label="item.name" :value="item" v-for="(item,index) in tableDatasw" :key="item.id"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品数量" prop="nmb" >
|
||||
<el-input-number v-model="shopdata.count" controls-position="right" :min="1" :max="9999"></el-input-number>
|
||||
|
||||
</el-form-item>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="shwdata()"
|
||||
>选择</el-button>
|
||||
</el-form>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listActiveConsumption, getActiveConsumption, delActiveConsumption, addActiveConsumption, updateActiveConsumption,listFavorable } from "@/api/EventMarketing/activeConsumption";
|
||||
import { listActiveConsumption,listExchange,listLJGoods, getActiveConsumption, delActiveConsumption, addActiveConsumption, updateActiveConsumption,listFavorable } from "@/api/EventMarketing/activeConsumption";
|
||||
|
||||
export default {
|
||||
name: "ActiveConsumption",
|
||||
data() {
|
||||
return {
|
||||
pdidlist:[],
|
||||
dialogTableVisible:false,
|
||||
tableData: [ ],
|
||||
|
||||
pdidlist:[],//判断优惠券id
|
||||
pddhidlist:[],//判断兑换券id
|
||||
pdswidlist:[],//判断实物id
|
||||
dialogTableVisible:false,//优惠券
|
||||
dialogTableVisibledh:false,//兑换券
|
||||
dialogTableVisiblesw:false,//实物
|
||||
tableData: [],//优惠券
|
||||
tableDatadh:[],//兑换券
|
||||
tableDatasw:[],//实物
|
||||
tableDatas:[],//公共选择区域
|
||||
shopdata:{
|
||||
goodsId:'',
|
||||
count:0,
|
||||
},
|
||||
oillist:['92#','95#','98#','0#','-10#','LNG','CNG','京92#','京95#','京0#',],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -454,6 +613,12 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
listFavorablesw:{
|
||||
isRecovery:0,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@ -481,9 +646,58 @@ export default {
|
||||
// 表单参数
|
||||
form: {
|
||||
tableDatas:[],
|
||||
shiwudata:[],
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
adaptOil: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
participationConditionMoney: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
activeStartTime: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
activeEndTime00: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
|
||||
adaptUserType: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], dieselUserLevel: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], gasolineUserLevel: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], naturalUserLevel: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], participationCondition: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], participationAcount: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], limitAcount: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
], activeGift: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
isonline: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
points: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
activeConsumptionChildList: [
|
||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||
],
|
||||
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -500,6 +714,34 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
swchange(e){
|
||||
|
||||
console.log(this.shopdata)
|
||||
},
|
||||
// 请求实物
|
||||
getlistLJGoods(){
|
||||
listLJGoods(this.listFavorablesw).then(res=>{
|
||||
if(res.code==200){
|
||||
console.log( res)
|
||||
this.dialogTableVisiblesw = true
|
||||
this.tableDatasw = res.data.records
|
||||
return
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
// 请求兑换券
|
||||
getlistExchange(){
|
||||
listExchange().then(res=>{
|
||||
if(res.code==200){
|
||||
this.dialogTableVisibledh = true
|
||||
this.tableDatadh = res.data.records
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
// 请求优惠券
|
||||
getlistFavorable(){
|
||||
|
||||
@ -511,20 +753,88 @@ export default {
|
||||
|
||||
})
|
||||
},
|
||||
// 弹窗列表选择
|
||||
chosedata(row){
|
||||
// 实物选择处理
|
||||
shwdata(){
|
||||
this.dialogTableVisiblesw = false
|
||||
if(this.pdswidlist.indexOf( this.shopdata.goodsId.id)>-1 ){
|
||||
this.$message.error("该商品已存在")
|
||||
return
|
||||
}
|
||||
this.pdswidlist.push( this.shopdata.goodsId.id)
|
||||
let data = {
|
||||
activeGift: 4,
|
||||
goodsIds : this.shopdata.goodsId.id,
|
||||
goodsName: this.shopdata.goodsId.name,
|
||||
goodsTotal:1
|
||||
}
|
||||
this.form.shiwudata.push(data)
|
||||
|
||||
console.log( this.form.shiwudata)
|
||||
this.shopdata = []
|
||||
},
|
||||
// 兑换券券列表选择
|
||||
Favorabledata(row){
|
||||
this.dialogTableVisibledh = false
|
||||
if(this.pddhidlist.indexOf(row.id)>-1 ){
|
||||
this.$message.error("该兑换卡券已存在")
|
||||
return
|
||||
}
|
||||
|
||||
this.pddhidlist.push(row.id)
|
||||
console.log(row)
|
||||
let data ={
|
||||
activeGift: 2, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物
|
||||
goodsIds: "", //商品id
|
||||
goodsName:"" , //商品名称
|
||||
goodsTotal: "", //商品数量
|
||||
vouchersId:row.id, //券id
|
||||
giftCardName:row.name, //赠送卡券名称
|
||||
giftCardType: row.type, //券类型
|
||||
validityZero: null,
|
||||
validityOne: null,
|
||||
validityTwo:null,
|
||||
validity:row.validity,
|
||||
giftCardDetail: row.useInstructions , //券详情
|
||||
giftCardTime: row.validity, //券有效期
|
||||
giftCardTotal: 1 //券数量
|
||||
}
|
||||
|
||||
this.tableDatas.push(data)
|
||||
this.$message.success("新增成功")
|
||||
},
|
||||
// 优惠券列表选择
|
||||
chosedata(row){
|
||||
this.dialogTableVisible = false
|
||||
if(this.pdidlist.indexOf(row.id)>-1 ){
|
||||
this.$message.error("该卡券已存在")
|
||||
this.$message.error("该优惠卡券已存在")
|
||||
return
|
||||
}
|
||||
|
||||
this.pdidlist.push(row.id)
|
||||
|
||||
this.form.tableDatas.push(row)
|
||||
let data ={
|
||||
activeGift: 1, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物
|
||||
goodsIds: "", //商品id
|
||||
goodsName:"" , //商品名称
|
||||
goodsTotal: "", //商品数量
|
||||
vouchersId:row.id, //券id
|
||||
giftCardName:row.name, //赠送卡券名称
|
||||
giftCardType: row.type, //券类型
|
||||
timeType: row.timeType,
|
||||
validityZero: row.validityZero,
|
||||
validityOne: row.validityOne,
|
||||
validityTwo:row.validityTwo,
|
||||
giftCardDetail: "满"+ row.fullDeduction+"减 "+row.discountAmount+"元" , //券详情
|
||||
giftCardTime: "", //券有效期
|
||||
giftCardTotal: 1//券数量
|
||||
}
|
||||
|
||||
this.form.tableDatas.push(data)
|
||||
|
||||
this.$message.success("新增成功")
|
||||
|
||||
},
|
||||
// 优惠券删除
|
||||
deletedata(row){
|
||||
if(this.form.tableDatas&&this.form.tableDatas.length>0){
|
||||
let delIdx=-1;
|
||||
@ -538,6 +848,39 @@ export default {
|
||||
this.form.tableDatas.splice(delIdx,1);
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 兑换券删除
|
||||
deletedhdata(row){
|
||||
if(this.tableDatas&&this.tableDatas.length>0){
|
||||
let delIdx=-1;
|
||||
for ( let item of this.tableDatas) {
|
||||
delIdx++;
|
||||
if (item.id===row.id){
|
||||
break
|
||||
}
|
||||
}
|
||||
this.pddhidlist.splice(delIdx,1);
|
||||
this.tableDatas.splice(delIdx,1);
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 实物删除
|
||||
deleteswdata(row){
|
||||
|
||||
if( this.form.shiwudata&& this.form.shiwudata.length>0){
|
||||
let delIdx=-1;
|
||||
for ( let item of this.form.shiwudata) {
|
||||
delIdx++;
|
||||
if (item.id===row.id){
|
||||
break
|
||||
}
|
||||
}
|
||||
this.pdswidlist.splice(delIdx,1);
|
||||
this.form.shiwudata.splice(delIdx,1);
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 取消按钮
|
||||
@ -556,24 +899,26 @@ export default {
|
||||
activeStartTime: null,
|
||||
activeEndTime: null,
|
||||
adaptOil: [],
|
||||
adaptUserType: null,
|
||||
adaptUserType: '0',
|
||||
memberType: null,
|
||||
dieselUserLevel: null,
|
||||
gasolineUserLevel: null,
|
||||
naturalUserLevel: null,
|
||||
dieselUserLevel: [],
|
||||
gasolineUserLevel: [],
|
||||
naturalUserLevel: [],
|
||||
paymentType: null,
|
||||
participationCondition: null,
|
||||
participationAcount: null,
|
||||
limitAcount: null,
|
||||
activeGift: [],
|
||||
points: null,
|
||||
status: null,
|
||||
isonline: null,
|
||||
status: 0,
|
||||
isonline: 0,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
tableDatas:[],
|
||||
updateTime: null
|
||||
shiwudata:[],
|
||||
updateTime: null,
|
||||
activeConsumptionChildList:[]
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -605,12 +950,34 @@ export default {
|
||||
const id = row.id || this.ids
|
||||
getActiveConsumption(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1')
|
||||
this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
|
||||
this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4')
|
||||
|
||||
|
||||
this.open = true;
|
||||
this.title = "修改消费有礼活动";
|
||||
});
|
||||
},
|
||||
handleDeletexia(row){
|
||||
getActiveConsumption(row.id).then(response => {
|
||||
// this.form = response.data;
|
||||
let data = response.data
|
||||
data.isonline = 1
|
||||
updateActiveConsumption(data).then(response => {
|
||||
this.$modal.msgSuccess("下线成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
|
||||
this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata);
|
||||
console.log(this.form.activeConsumptionChildList)
|
||||
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
|
@ -11,7 +11,10 @@
|
||||
</el-radio-group>
|
||||
</el-card>
|
||||
<activeConsumption v-if="value == 1"></activeConsumption>
|
||||
<activeDiscount v-if="value == 2"></activeDiscount>
|
||||
<activeFullminus v-if="value == 3"></activeFullminus>
|
||||
<activeNewlyweds v-if="value == 4" ></activeNewlyweds>
|
||||
<activeRecommend v-if="value == 5"></activeRecommend>
|
||||
|
||||
<!-- 添加或修改兑换券对话框 -->
|
||||
|
||||
@ -21,8 +24,11 @@
|
||||
|
||||
<script>
|
||||
|
||||
import activeDiscount from '../activeDiscount/index'
|
||||
import activeNewlyweds from '../activeNewlyweds/index'
|
||||
import activeConsumption from '../activeConsumption/index'
|
||||
import activeFullminus from '../activeFullminus/index'
|
||||
import activeRecommend from '../activeRecommend/index'
|
||||
export default {
|
||||
name: 'Exchange',
|
||||
data() {
|
||||
@ -35,7 +41,7 @@ export default {
|
||||
|
||||
},
|
||||
components:{
|
||||
activeNewlyweds,activeConsumption
|
||||
activeNewlyweds,activeConsumption,activeDiscount,activeFullminus,activeRecommend
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
@ -21,7 +21,7 @@
|
||||
<div class="box-hui"><span style="width: 35%">券码:</span> <span>{{item.ticketCode}}</span> </div>
|
||||
<div class="box-hui"><span style="width: 35%">有效期:</span> <span>{{item.outTime}}</span> </div>
|
||||
<div class="box-hui"><span style="width: 35%">获得方式:</span> <span>{{item.exchangeFrom}}</span> </div>
|
||||
<div class="anniu" >
|
||||
<div class="anniu" @click="getcardExchangeRecord(item.id)" >
|
||||
<span>立即核销</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -34,7 +34,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRecord, getRecord, delRecord, addRecord, updateRecord } from "@/api/EventMarketing/cardExchangeRecord";
|
||||
import { listRecord, getRecord, delRecord, addRecord, updateRecord,cardExchangeRecord } from "@/api/EventMarketing/cardExchangeRecord";
|
||||
export default {
|
||||
name: 'index',
|
||||
data(){
|
||||
@ -53,7 +53,7 @@
|
||||
exchangeName: null,
|
||||
ticketCode: null,
|
||||
exchangeFrom: null,
|
||||
status: null,
|
||||
status: 0,
|
||||
outTime: null,
|
||||
cancelTime: null,
|
||||
startTime: null,
|
||||
@ -82,6 +82,18 @@
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getcardExchangeRecord(id){
|
||||
let data = {
|
||||
id:id,
|
||||
status:1
|
||||
}
|
||||
cardExchangeRecord(data).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.$message.success("核销成功")
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user