2023-11-14 11:27:58 +08:00
|
|
|
|
<template>
|
2023-11-20 17:52:14 +08:00
|
|
|
|
<div class="app-container">
|
2023-11-14 16:08:33 +08:00
|
|
|
|
<el-card style="margin-bottom: 20px">
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
<el-form-item label="活动名称" prop="name">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.name"
|
|
|
|
|
placeholder="请输入活动名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
2023-11-14 16:08:33 +08:00
|
|
|
|
<el-form-item label="状态">
|
|
|
|
|
<el-select v-model="queryParams.status" clearable placeholder="请选择活动状态">
|
|
|
|
|
<el-option label="启用" value="0"></el-option>
|
|
|
|
|
<el-option label="禁用" value="1"></el-option>
|
|
|
|
|
</el-select>
|
2023-11-14 11:27:58 +08:00
|
|
|
|
</el-form-item>
|
2023-11-14 16:08:33 +08:00
|
|
|
|
<el-form-item label="上线/下线">
|
|
|
|
|
<el-select v-model="queryParams.isonline" clearable placeholder="请选择是否上线">
|
|
|
|
|
<el-option label="上线" value="0"></el-option>
|
|
|
|
|
<el-option label="已下线" value="1"></el-option>
|
|
|
|
|
</el-select>
|
2023-11-14 11:27:58 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
2023-11-14 16:08:33 +08:00
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
2023-11-14 16:08:33 +08:00
|
|
|
|
</el-card>
|
|
|
|
|
<el-card style="margin-bottom: 20px">
|
2023-11-14 11:27:58 +08:00
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
>新增</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
2023-11-25 18:07:50 +08:00
|
|
|
|
<el-table v-loading="loading" :data="activeConsumptionList" :label-position="labelPosition" @selection-change="handleSelectionChange">
|
2023-11-16 10:55:35 +08:00
|
|
|
|
|
2023-11-20 11:23:38 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
type="index"
|
|
|
|
|
align="center"
|
2024-02-23 17:37:20 +08:00
|
|
|
|
label="序号"
|
2023-11-20 11:23:38 +08:00
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
<el-table-column label="活动名称" align="center" prop="name" />
|
2024-03-01 09:35:23 +08:00
|
|
|
|
<el-table-column label="适用油品" align="center" prop="adaptOil" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-for="item in scope.row.adaptOil">{{ item }}, </span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<el-table-column label="满足金额" align="center" prop="participationConditionMoney" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ scope.row.participationConditionMoney }} 元</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-03-01 09:35:23 +08:00
|
|
|
|
<el-table-column label="适用用户" align="center" prop="adaptUserType" >
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<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>
|
2024-03-01 09:35:23 +08:00
|
|
|
|
<el-table-column label="赠券数量" align="center" prop="adaptUserType" >
|
|
|
|
|
<template slot-scope="scope">
|
2024-03-01 11:01:36 +08:00
|
|
|
|
<div>优惠券:{{scope.row.youhuiTotal || 0}}</div>
|
|
|
|
|
<div>兑换券:{{scope.row.duihuanTotal || 0}}</div>
|
|
|
|
|
|
2024-03-01 09:35:23 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="核销统计" align="center" prop="adaptUserType" >
|
|
|
|
|
<template slot-scope="scope">
|
2024-03-01 11:01:36 +08:00
|
|
|
|
<div>优惠券:{{scope.row.youhuiTotaled || 0}}</div>
|
|
|
|
|
<div>兑换券:{{scope.row.duihuanTotaled || 0}}</div>
|
|
|
|
|
|
2024-03-01 09:35:23 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="活动时间" align="center" prop="adaptUserType" >
|
|
|
|
|
<template slot-scope="scope">
|
2024-03-01 11:01:36 +08:00
|
|
|
|
<div>{{scope.row.activeStartTime || 0}}</div>
|
|
|
|
|
<div>{{scope.row.activeEndTime || 0}}</div>
|
|
|
|
|
|
2024-03-01 09:35:23 +08:00
|
|
|
|
</template>
|
2023-11-15 14:33:51 +08:00
|
|
|
|
</el-table-column>
|
2024-03-01 09:35:23 +08:00
|
|
|
|
<!-- <el-table-column label="会员等级" align="center" prop="dieselUserLevel" >-->
|
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
|
<!-- <span v-for="(item,index) in scope.row.dieselUserLevel "> {{item}} </span>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<el-table-column label="活动状态" align="center" prop="status" >
|
|
|
|
|
<template slot-scope="scope">
|
2023-11-15 09:09:34 +08:00
|
|
|
|
|
2023-11-16 17:50:02 +08:00
|
|
|
|
<span style="cursor: pointer;" @click="qiyong(scope.row)" v-if="scope.row.status == 0"> <el-tag>启用</el-tag > </span>
|
|
|
|
|
<span style="cursor: pointer;" @click="jinyong(scope.row)" v-if="scope.row.status == 1"> <el-tag type="danger">禁用</el-tag> </span>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
|
2023-11-15 14:33:51 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-03-01 11:01:36 +08:00
|
|
|
|
<!-- <el-table-column label="活动时间" align="center" prop="adaptUserType" >-->
|
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
|
<!-- <span >{{scope.row.activeStartTime || 0}}-{{scope.row.activeEndTime || 0}}</span>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
2024-03-01 09:35:23 +08:00
|
|
|
|
<el-table-column label="活动更新时间" align="center" prop="updateTime" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span >{{scope.row.updateTime || '暂无更新'}}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作员" align="center" prop="updateTime" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span >{{scope.row.createBy || ''}}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<template slot-scope="scope">
|
2024-03-01 14:56:38 +08:00
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
>修改</el-button>
|
2024-03-01 14:56:38 +08:00
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-view"
|
|
|
|
|
@click="lookDetail(scope.row)"
|
|
|
|
|
>详情</el-button>
|
2023-11-14 11:27:58 +08:00
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-delete"
|
2023-11-15 14:33:51 +08:00
|
|
|
|
@click="handleDeletexia(scope.row)"
|
|
|
|
|
v-if="scope.row.isonline == 0"
|
|
|
|
|
>下线</el-button>
|
2024-03-01 11:01:36 +08:00
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click="Deleteshan(scope.row)"
|
|
|
|
|
v-if="scope.row.isonline == 1"
|
|
|
|
|
>删除</el-button>
|
2023-11-14 11:27:58 +08:00
|
|
|
|
</template>
|
2024-03-01 11:01:36 +08:00
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="total>0"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
2023-11-14 16:08:33 +08:00
|
|
|
|
</el-card>
|
2023-11-14 11:27:58 +08:00
|
|
|
|
<!-- 添加或修改消费有礼活动对话框 -->
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="45%" append-to-body>
|
2023-11-25 18:07:50 +08:00
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="110px">
|
2023-11-15 09:09:34 +08:00
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
<el-form-item label="活动名称" prop="name">
|
|
|
|
|
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
|
|
|
|
</el-form-item>
|
2024-03-01 09:35:23 +08:00
|
|
|
|
<el-form-item label="满足金额" prop="moneyType">
|
|
|
|
|
|
2024-03-01 11:01:36 +08:00
|
|
|
|
<el-select v-model="form.moneyType" placeholder="请选择满足金额" >
|
2024-03-01 09:35:23 +08:00
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in moneyList"
|
|
|
|
|
:key="dict.id.toString()"
|
|
|
|
|
:label="dict.name"
|
|
|
|
|
:value="dict.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
<el-form-item label="满足金额" prop="participationConditionMoney">
|
2024-01-12 14:41:47 +08:00
|
|
|
|
<el-input-number :min="0.01" v-model="form.participationConditionMoney" placeholder="请输入满足金额" />
|
2023-11-14 11:27:58 +08:00
|
|
|
|
</el-form-item>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
|
|
|
|
|
<el-form-item label="可用油品" prop="adaptOil" >
|
|
|
|
|
<el-checkbox-group v-model="form.adaptOil">
|
2023-11-17 13:09:47 +08:00
|
|
|
|
<el-checkbox v-for="(item,index) in oillist" :label="item.id" :key="index">{{item.oilType}}{{item.oilName}}</el-checkbox>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</el-checkbox-group>
|
2023-11-17 13:09:47 +08:00
|
|
|
|
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="适用用户" prop="adaptUserType">
|
|
|
|
|
<el-radio-group v-model="form.adaptUserType">
|
2024-02-23 17:37:20 +08:00
|
|
|
|
<!-- <el-radio label="0">全部用户</el-radio>-->
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<el-radio label="1">全部会员</el-radio>
|
|
|
|
|
<el-radio label="2">等级会员</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
2023-11-21 13:40:12 +08:00
|
|
|
|
|
|
|
|
|
<el-form-item label="会员等级" prop="dieselUserLevel" v-if="form.adaptUserType == 2" >
|
|
|
|
|
<el-select v-model="form.dieselUserLevel" multiple clearable placeholder="会员等级">
|
|
|
|
|
<el-option :label="item.name" :value="item.id.toString()" v-for="(item,index) in userGradeList" :key="index" > </el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<el-form-item label="赠送类型" prop="activeGift" >
|
|
|
|
|
<el-checkbox-group v-model="form.activeGift">
|
|
|
|
|
|
|
|
|
|
<el-checkbox label="1" >赠送优惠券</el-checkbox>
|
|
|
|
|
<el-checkbox label="2" >赠送兑换券</el-checkbox>
|
2024-03-05 13:55:09 +08:00
|
|
|
|
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</el-checkbox-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- 选择优惠券-->
|
|
|
|
|
<div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('1')>-1 " >
|
|
|
|
|
<div class="box-bt"> <div >赠送卡券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()" >新增</el-button> </div>
|
|
|
|
|
<div style="margin: 10px 0px">
|
|
|
|
|
<el-table
|
|
|
|
|
:data="form.tableDatas"
|
|
|
|
|
border
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column
|
2023-11-15 14:33:51 +08:00
|
|
|
|
prop="giftCardName"
|
2023-11-15 09:09:34 +08:00
|
|
|
|
label="卡券名称"
|
|
|
|
|
width="0">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
2023-11-15 14:33:51 +08:00
|
|
|
|
prop="giftCardType"
|
2023-11-15 09:09:34 +08:00
|
|
|
|
label="券类型"
|
|
|
|
|
width="80">
|
|
|
|
|
<template slot-scope="scope">
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<span v-if="scope.row.giftCardType == 0" >油品券</span>
|
|
|
|
|
<span v-if="scope.row.giftCardType == 1" >商品券</span>
|
|
|
|
|
<span v-if="scope.row.giftCardType == 2" >通用券</span>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="date"
|
|
|
|
|
label="券详情"
|
|
|
|
|
width="80">
|
|
|
|
|
<template slot-scope="scope">
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<span>{{scope.row.giftCardDetail}}</span>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="date"
|
|
|
|
|
label="有效期(天)"
|
|
|
|
|
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>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="date"
|
|
|
|
|
label="数量"
|
|
|
|
|
width="240">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<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="操作">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="deletedata(scope.row)"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 选择兑换券-->
|
|
|
|
|
<div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('2')>-1 " >
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<div class="box-bt"> <div >选择兑换券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistExchange()" >新增</el-button> </div>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<div style="margin: 10px 0px">
|
|
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
:data="tableDatas"
|
|
|
|
|
border
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column
|
2023-11-15 14:33:51 +08:00
|
|
|
|
prop="giftCardName"
|
2023-11-15 09:09:34 +08:00
|
|
|
|
label="卡券名称"
|
2023-11-15 14:33:51 +08:00
|
|
|
|
width="80">
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="date"
|
|
|
|
|
label="券类型"
|
2023-11-15 14:33:51 +08:00
|
|
|
|
width="80">
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<template slot-scope="scope">
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<span v-if="scope.row.giftCardType == 0" >油品券</span>
|
|
|
|
|
<span v-if="scope.row.giftCardType == 1" >商品券</span>
|
|
|
|
|
<span v-if="scope.row.giftCardType == 2" >通用券</span>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="date"
|
|
|
|
|
label="券详情"
|
2023-11-15 14:33:51 +08:00
|
|
|
|
width="80">
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<template slot-scope="scope">
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<span>{{scope.row.giftCardDetail}}</span>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="date"
|
|
|
|
|
label="有效期(天)"
|
2023-11-15 14:33:51 +08:00
|
|
|
|
width="240">
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<template slot-scope="scope">
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<span > <el-input-number v-model="scope.row.giftCardTime" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>
|
|
|
|
|
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="date"
|
|
|
|
|
label="数量"
|
|
|
|
|
width="240">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<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"
|
2023-11-15 14:33:51 +08:00
|
|
|
|
label="操作"
|
|
|
|
|
|
|
|
|
|
>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
2023-11-15 14:33:51 +08:00
|
|
|
|
@click="deletedhdata(scope.row)"
|
2023-11-15 09:09:34 +08:00
|
|
|
|
>删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 选择实物-->
|
|
|
|
|
<div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('4')>-1 " >
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<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>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</div>
|
2023-11-20 11:23:38 +08:00
|
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="活动开始时间" prop="activeStartTime">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.activeStartTime"
|
|
|
|
|
type="datetime"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
placeholder="请选择活动开始时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="活动结束时间" prop="activeEndTime">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.activeEndTime"
|
|
|
|
|
type="datetime"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
placeholder="请选择活动结束时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
2024-03-01 14:56:38 +08:00
|
|
|
|
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<el-form-item label="参与次数类别" prop="participationAcount">
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别">
|
|
|
|
|
<el-option label="不限制" value="0"></el-option>
|
|
|
|
|
<el-option label="限制" value="1"></el-option>
|
|
|
|
|
</el-select>
|
2023-11-14 11:27:58 +08:00
|
|
|
|
</el-form-item>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<el-form-item label="限制次数" prop="limitAcount" v-if="form.participationAcount == 1">
|
2023-11-14 11:27:58 +08:00
|
|
|
|
<el-input v-model="form.limitAcount" placeholder="请输入限制次数" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="赠送积分" prop="points">
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<el-input-number v-model="form.points" controls-position="right" :min="1" :max="999999"></el-input-number>
|
2023-11-14 11:27:58 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<!-- 最终提交-->
|
2023-11-14 11:27:58 +08:00
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
2024-03-01 14:56:38 +08:00
|
|
|
|
<el-dialog title="详情统计" :visible.sync="opendetails" width="45%" append-to-body>
|
|
|
|
|
<div style="display: flex;justify-content: space-between;width: 100%;">
|
|
|
|
|
<div class="x-box">
|
|
|
|
|
<div>优惠券数量统计</div>
|
|
|
|
|
<div>总数量: {{statisticsyou.count ||0}}</div>
|
|
|
|
|
<div>已使用数量: {{statisticsyou.countEd ||0}}</div>
|
|
|
|
|
<div>未使用数量: {{statisticsyou.countLd ||0}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="x-box">
|
|
|
|
|
<div>兑换券数量统计</div>
|
|
|
|
|
<div>总数量: {{statisticsyou.counts ||0}}</div>
|
|
|
|
|
<div>已使用数量: {{statisticsyou.countEds ||0}}</div>
|
|
|
|
|
<div>未使用数量: {{statisticsyou.countLds ||0}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table
|
|
|
|
|
:data="looklist"
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="name"
|
|
|
|
|
label="昵称"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="mobile"
|
|
|
|
|
label="联系方式"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="createTime"
|
|
|
|
|
label="领取日期"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="exchangeFrom"
|
|
|
|
|
label="获取方式"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!-- 详情列表-->
|
|
|
|
|
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<el-dialog title="优惠券列表" :visible.sync="dialogTableVisible">
|
2023-11-16 17:50:02 +08:00
|
|
|
|
<div style="display: flex;align-items: center; margin-bottom: 20px ">
|
|
|
|
|
<el-input v-model="youhuiquan.name" placeholder="优惠券名称"></el-input>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="getlistFavorable" >搜索</el-button>
|
|
|
|
|
</div>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<el-table
|
|
|
|
|
:data="tableData"
|
|
|
|
|
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">
|
2024-01-04 12:04:59 +08:00
|
|
|
|
<span>满{{scope.row.satisfiedAmount}}减 {{scope.row.discountAmount}}元 </span>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="date"
|
|
|
|
|
label="有效期(天)"
|
|
|
|
|
width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.timeType == 0" >{{scope.row.validityZero}}天 </span>
|
|
|
|
|
<span v-if="scope.row.timeType == 1" >{{scope.row.validityOne}}天 </span>
|
|
|
|
|
<span v-if="scope.row.timeType == 2" >{{scope.row.validityTwo}}天 </span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="address"
|
|
|
|
|
label="操作">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="chosedata(scope.row)"
|
|
|
|
|
>选择</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
2023-11-16 17:50:02 +08:00
|
|
|
|
<div><pagination
|
|
|
|
|
v-show="ytotal>0"
|
|
|
|
|
:total="ytotal"
|
|
|
|
|
:page.sync="youhuiquan.pageNum"
|
|
|
|
|
:limit.sync="youhuiquan.pageSize"
|
|
|
|
|
@pagination="getlistFavorable"
|
|
|
|
|
/></div>
|
|
|
|
|
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</el-dialog>
|
2023-11-15 14:33:51 +08:00
|
|
|
|
<!-- 兑换券列表-->
|
|
|
|
|
<el-dialog title="兑换券列表" :visible.sync="dialogTableVisibledh">
|
2023-11-16 17:50:02 +08:00
|
|
|
|
<div style="display: flex;align-items: center; margin-bottom: 20px ">
|
|
|
|
|
<el-input v-model="duihuanquan.name" placeholder="兑换券名称"></el-input>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="getlistExchange" >搜索</el-button>
|
|
|
|
|
</div>
|
2023-11-15 14:33:51 +08:00
|
|
|
|
|
|
|
|
|
<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>
|
2023-11-16 17:50:02 +08:00
|
|
|
|
<div><pagination
|
|
|
|
|
v-show="dtotal>0"
|
|
|
|
|
:total="dtotal"
|
|
|
|
|
:page.sync="duihuanquan.pageNum"
|
|
|
|
|
:limit.sync="duihuanquan.pageSize"
|
|
|
|
|
@pagination="getlistExchange"
|
|
|
|
|
/></div>
|
2023-11-15 14:33:51 +08:00
|
|
|
|
</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
|
2023-11-16 17:50:02 +08:00
|
|
|
|
type="primary"
|
2023-11-15 14:33:51 +08:00
|
|
|
|
@click="shwdata()"
|
2023-11-16 17:50:02 +08:00
|
|
|
|
>确定</el-button>
|
|
|
|
|
|
2023-11-15 14:33:51 +08:00
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
2023-11-14 11:27:58 +08:00
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-03-01 14:56:38 +08:00
|
|
|
|
import { getoiltype,getoilName, listActiveConsumption,listExchange,listLJGoods, getActiveConsumption, delActiveConsumption, addActiveConsumption, updateActiveConsumption,listFavorable,looklook,looklooklook } from "@/api/EventMarketing/activeConsumption";
|
2023-11-17 15:38:56 +08:00
|
|
|
|
import {listUserGrade} from "@/api/staff/user/usergrade";
|
2023-11-14 11:27:58 +08:00
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "ActiveConsumption",
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2024-03-01 14:56:38 +08:00
|
|
|
|
opendetails:false,
|
|
|
|
|
looklist:[],
|
|
|
|
|
statisticsyou:{},
|
2024-03-01 09:35:23 +08:00
|
|
|
|
moneyList:[
|
|
|
|
|
{name:'订单金额',id:'1'},
|
|
|
|
|
{name:'实付金额',id:'2'}
|
|
|
|
|
],
|
2023-11-25 18:07:50 +08:00
|
|
|
|
labelPosition:'left',
|
2023-11-17 15:38:56 +08:00
|
|
|
|
userGradeList:[],
|
2023-11-15 14:33:51 +08:00
|
|
|
|
pdidlist:[],//判断优惠券id
|
|
|
|
|
pddhidlist:[],//判断兑换券id
|
|
|
|
|
pdswidlist:[],//判断实物id
|
|
|
|
|
dialogTableVisible:false,//优惠券
|
|
|
|
|
dialogTableVisibledh:false,//兑换券
|
|
|
|
|
dialogTableVisiblesw:false,//实物
|
|
|
|
|
tableData: [],//优惠券
|
|
|
|
|
tableDatadh:[],//兑换券
|
|
|
|
|
tableDatasw:[],//实物
|
|
|
|
|
tableDatas:[],//公共选择区域
|
2023-11-16 17:50:02 +08:00
|
|
|
|
//请求优惠券列表时的参数
|
|
|
|
|
youhuiquan:{
|
|
|
|
|
name:'',
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
},
|
|
|
|
|
ytotal:0,
|
|
|
|
|
//请求兑换券列表时的参数
|
|
|
|
|
duihuanquan:{
|
|
|
|
|
name:'',
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
total:0
|
|
|
|
|
},
|
|
|
|
|
dtotal:0,
|
|
|
|
|
//请求实物列表时的参数
|
|
|
|
|
shiwu:{
|
|
|
|
|
isRecovery:0,
|
|
|
|
|
page: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
},
|
|
|
|
|
stotal:0,
|
2023-11-15 14:33:51 +08:00
|
|
|
|
shopdata:{
|
|
|
|
|
goodsId:'',
|
|
|
|
|
count:0,
|
|
|
|
|
},
|
2023-11-15 09:09:34 +08:00
|
|
|
|
oillist:['92#','95#','98#','0#','-10#','LNG','CNG','京92#','京95#','京0#',],
|
2023-11-14 11:27:58 +08:00
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
// 选中数组
|
|
|
|
|
ids: [],
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
single: true,
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
multiple: true,
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
showSearch: true,
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
// 消费有礼活动表格数据
|
|
|
|
|
activeConsumptionList: [],
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
// 查询参数
|
2023-11-15 09:09:34 +08:00
|
|
|
|
listFavorable:{
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
},
|
2023-11-15 14:33:51 +08:00
|
|
|
|
listFavorablesw:{
|
|
|
|
|
isRecovery:0,
|
|
|
|
|
page: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
},
|
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
chainStorId: null,
|
|
|
|
|
storeId: null,
|
|
|
|
|
name: null,
|
|
|
|
|
participationConditionMoney: null,
|
|
|
|
|
activeStartTime: null,
|
|
|
|
|
activeEndTime: null,
|
2023-11-15 09:09:34 +08:00
|
|
|
|
adaptOil: [],
|
2023-11-14 11:27:58 +08:00
|
|
|
|
adaptUserType: null,
|
|
|
|
|
memberType: null,
|
|
|
|
|
dieselUserLevel: null,
|
|
|
|
|
gasolineUserLevel: null,
|
|
|
|
|
naturalUserLevel: null,
|
|
|
|
|
paymentType: null,
|
|
|
|
|
participationCondition: null,
|
|
|
|
|
participationAcount: null,
|
|
|
|
|
limitAcount: null,
|
2023-11-15 09:09:34 +08:00
|
|
|
|
activeGift: [],
|
2023-11-14 11:27:58 +08:00
|
|
|
|
points: null,
|
|
|
|
|
status: null,
|
|
|
|
|
isonline: null,
|
|
|
|
|
},
|
|
|
|
|
// 表单参数
|
2023-11-15 09:09:34 +08:00
|
|
|
|
form: {
|
|
|
|
|
tableDatas:[],
|
2023-11-15 14:33:51 +08:00
|
|
|
|
shiwudata:[],
|
2023-11-15 09:09:34 +08:00
|
|
|
|
},
|
2023-11-14 11:27:58 +08:00
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
2023-11-15 14:33:51 +08:00
|
|
|
|
adaptOil: [
|
|
|
|
|
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
|
|
|
|
],
|
2024-03-01 09:35:23 +08:00
|
|
|
|
moneyType:[
|
|
|
|
|
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
|
|
|
|
],
|
2023-11-15 14:33:51 +08:00
|
|
|
|
name: [
|
|
|
|
|
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
|
|
|
|
],
|
|
|
|
|
participationConditionMoney: [
|
|
|
|
|
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
|
|
|
|
],
|
|
|
|
|
activeStartTime: [
|
|
|
|
|
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
|
|
|
|
],
|
2023-11-20 11:23:38 +08:00
|
|
|
|
activeEndTime: [
|
2023-11-15 14:33:51 +08:00
|
|
|
|
{ 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' },
|
|
|
|
|
],
|
2023-11-14 11:27:58 +08:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
2023-11-17 13:09:47 +08:00
|
|
|
|
// this.getoiltypeliet()
|
|
|
|
|
this.getoilName()
|
2023-11-17 15:38:56 +08:00
|
|
|
|
this.listUserGrade()
|
2023-11-14 11:27:58 +08:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
2023-11-20 11:23:38 +08:00
|
|
|
|
indexMethod(index) {
|
|
|
|
|
return index * 2;
|
|
|
|
|
},
|
2023-11-14 11:27:58 +08:00
|
|
|
|
/** 查询消费有礼活动列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
listActiveConsumption(this.queryParams).then(response => {
|
2023-11-14 16:08:33 +08:00
|
|
|
|
this.activeConsumptionList = response.data.records;
|
|
|
|
|
this.total = response.data.total;
|
2023-11-14 11:27:58 +08:00
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-03-01 14:56:38 +08:00
|
|
|
|
//
|
|
|
|
|
lookDetail(row){
|
|
|
|
|
this.opendetails = true
|
|
|
|
|
let data = {
|
|
|
|
|
id:row.id
|
|
|
|
|
}
|
|
|
|
|
looklook(data).then(res=>{
|
2024-03-01 17:57:08 +08:00
|
|
|
|
if(res.data){
|
|
|
|
|
this.looklist = res.data
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-01 14:56:38 +08:00
|
|
|
|
|
|
|
|
|
console.log('详情',res)
|
|
|
|
|
})
|
|
|
|
|
looklooklook(row.id).then(resp=>{
|
2024-03-01 17:57:08 +08:00
|
|
|
|
if( resp.data){
|
|
|
|
|
this.statisticsyou = resp.data
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-01 14:56:38 +08:00
|
|
|
|
console.log('优惠券详情统计',resp)
|
|
|
|
|
})
|
|
|
|
|
},
|
2023-11-17 15:38:56 +08:00
|
|
|
|
listUserGrade(){
|
|
|
|
|
listUserGrade().then(res=>{
|
|
|
|
|
if(res.code == 200){
|
|
|
|
|
this.userGradeList = res.data.records
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
},
|
2023-11-17 13:09:47 +08:00
|
|
|
|
// 查询油类
|
|
|
|
|
getoiltypeliet(){
|
|
|
|
|
getoiltype().then(res=>{
|
|
|
|
|
console.log(res)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//
|
|
|
|
|
getoilName(){
|
|
|
|
|
getoilName().then(res=>{
|
|
|
|
|
console.log(res)
|
|
|
|
|
this.oillist = res.data
|
2023-11-15 14:33:51 +08:00
|
|
|
|
|
2023-11-17 13:09:47 +08:00
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
swchange(e){
|
2023-11-15 14:33:51 +08:00
|
|
|
|
console.log(this.shopdata)
|
|
|
|
|
},
|
|
|
|
|
// 请求实物
|
|
|
|
|
getlistLJGoods(){
|
2023-11-16 17:50:02 +08:00
|
|
|
|
this.tableDatasw = []
|
|
|
|
|
listLJGoods(this.shiwu).then(res=>{
|
2023-11-15 14:33:51 +08:00
|
|
|
|
if(res.code==200){
|
|
|
|
|
console.log( res)
|
|
|
|
|
this.dialogTableVisiblesw = true
|
|
|
|
|
this.tableDatasw = res.data.records
|
2023-11-16 17:50:02 +08:00
|
|
|
|
this.stotal = res.data.total
|
2023-11-15 14:33:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 请求兑换券
|
|
|
|
|
getlistExchange(){
|
2023-11-16 17:50:02 +08:00
|
|
|
|
this.tableDatadh = []
|
|
|
|
|
listExchange(this.duihuanquan).then(res=>{
|
2023-11-15 14:33:51 +08:00
|
|
|
|
if(res.code==200){
|
|
|
|
|
this.dialogTableVisibledh = true
|
|
|
|
|
this.tableDatadh = res.data.records
|
2023-11-16 17:50:02 +08:00
|
|
|
|
this.dtotal = res.data.total
|
2023-11-15 14:33:51 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
2023-11-15 09:09:34 +08:00
|
|
|
|
// 请求优惠券
|
|
|
|
|
getlistFavorable(){
|
2023-11-16 17:50:02 +08:00
|
|
|
|
this.tableData = []
|
|
|
|
|
listFavorable(this.youhuiquan).then(res=>{
|
2023-11-15 09:09:34 +08:00
|
|
|
|
if(res.code == 200){
|
|
|
|
|
this.dialogTableVisible = true
|
|
|
|
|
this.tableData = res.data.records
|
2023-11-16 17:50:02 +08:00
|
|
|
|
this.ytotal = res.data.total
|
2023-11-15 09:09:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
},
|
2023-11-15 14:33:51 +08:00
|
|
|
|
// 实物选择处理
|
|
|
|
|
shwdata(){
|
|
|
|
|
this.dialogTableVisiblesw = false
|
|
|
|
|
if(this.pdswidlist.indexOf( this.shopdata.goodsId.id)>-1 ){
|
|
|
|
|
this.$message.error("该商品已存在")
|
|
|
|
|
return
|
|
|
|
|
}
|
2023-11-21 15:57:47 +08:00
|
|
|
|
this.pdswidlist.push( this.shopdata.goodsId.id,)
|
2023-11-15 14:33:51 +08:00
|
|
|
|
let data = {
|
|
|
|
|
activeGift: 4,
|
|
|
|
|
goodsIds : this.shopdata.goodsId.id,
|
|
|
|
|
goodsName: this.shopdata.goodsId.name,
|
2023-11-21 15:57:47 +08:00
|
|
|
|
|
|
|
|
|
goodsTotal:this.shopdata.count
|
2023-11-15 14:33:51 +08:00
|
|
|
|
}
|
|
|
|
|
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 //券数量
|
|
|
|
|
}
|
2023-11-15 09:09:34 +08:00
|
|
|
|
|
2023-11-15 14:33:51 +08:00
|
|
|
|
this.tableDatas.push(data)
|
|
|
|
|
this.$message.success("新增成功")
|
|
|
|
|
},
|
|
|
|
|
// 优惠券列表选择
|
|
|
|
|
chosedata(row){
|
2023-11-15 09:09:34 +08:00
|
|
|
|
this.dialogTableVisible = false
|
|
|
|
|
if(this.pdidlist.indexOf(row.id)>-1 ){
|
2023-11-15 14:33:51 +08:00
|
|
|
|
this.$message.error("该优惠卡券已存在")
|
2023-11-15 09:09:34 +08:00
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.pdidlist.push(row.id)
|
|
|
|
|
|
2023-11-15 14:33:51 +08:00
|
|
|
|
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,
|
2024-01-10 14:34:55 +08:00
|
|
|
|
giftCardDetail: "满"+ row.satisfiedAmount+"减 "+row.discountAmount+"元" , //券详情
|
2023-11-15 14:33:51 +08:00
|
|
|
|
giftCardTime: "", //券有效期
|
|
|
|
|
giftCardTotal: 1//券数量
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.form.tableDatas.push(data)
|
|
|
|
|
|
2023-11-15 09:09:34 +08:00
|
|
|
|
this.$message.success("新增成功")
|
2023-11-15 14:33:51 +08:00
|
|
|
|
|
2023-11-15 09:09:34 +08:00
|
|
|
|
},
|
2023-11-15 14:33:51 +08:00
|
|
|
|
// 优惠券删除
|
2023-11-15 09:09:34 +08:00
|
|
|
|
deletedata(row){
|
|
|
|
|
if(this.form.tableDatas&&this.form.tableDatas.length>0){
|
|
|
|
|
let delIdx=-1;
|
|
|
|
|
for ( let item of this.form.tableDatas) {
|
|
|
|
|
delIdx++;
|
|
|
|
|
if (item.id===row.id){
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.pdidlist.splice(delIdx,1);
|
|
|
|
|
this.form.tableDatas.splice(delIdx,1);
|
|
|
|
|
|
|
|
|
|
|
2023-11-15 14:33:51 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 兑换券删除
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
2023-11-15 09:09:34 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
2023-11-14 11:27:58 +08:00
|
|
|
|
// 取消按钮
|
|
|
|
|
cancel() {
|
2023-11-16 17:50:02 +08:00
|
|
|
|
this.pdswidlist = []
|
|
|
|
|
this.form.shiwudata= []
|
|
|
|
|
this.pddhidlist= []
|
|
|
|
|
this.tableDatas= []
|
|
|
|
|
this.pdidlist= []
|
|
|
|
|
this.form.tableDatas= []
|
2023-11-14 11:27:58 +08:00
|
|
|
|
this.open = false;
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
|
id: null,
|
|
|
|
|
chainStorId: null,
|
|
|
|
|
storeId: null,
|
|
|
|
|
name: null,
|
|
|
|
|
participationConditionMoney: null,
|
|
|
|
|
activeStartTime: null,
|
|
|
|
|
activeEndTime: null,
|
2023-11-15 09:09:34 +08:00
|
|
|
|
adaptOil: [],
|
2023-11-15 14:33:51 +08:00
|
|
|
|
adaptUserType: '0',
|
2023-11-14 11:27:58 +08:00
|
|
|
|
memberType: null,
|
2023-11-15 14:33:51 +08:00
|
|
|
|
dieselUserLevel: [],
|
|
|
|
|
gasolineUserLevel: [],
|
|
|
|
|
naturalUserLevel: [],
|
2023-11-14 11:27:58 +08:00
|
|
|
|
paymentType: null,
|
|
|
|
|
participationCondition: null,
|
|
|
|
|
participationAcount: null,
|
|
|
|
|
limitAcount: null,
|
2023-11-15 09:09:34 +08:00
|
|
|
|
activeGift: [],
|
2023-11-14 11:27:58 +08:00
|
|
|
|
points: null,
|
2023-11-15 14:33:51 +08:00
|
|
|
|
status: 0,
|
|
|
|
|
isonline: 0,
|
2023-11-14 11:27:58 +08:00
|
|
|
|
createBy: null,
|
|
|
|
|
createTime: null,
|
|
|
|
|
updateBy: null,
|
2023-11-15 09:09:34 +08:00
|
|
|
|
tableDatas:[],
|
2023-11-15 14:33:51 +08:00
|
|
|
|
shiwudata:[],
|
|
|
|
|
updateTime: null,
|
|
|
|
|
activeConsumptionChildList:[]
|
2023-11-14 11:27:58 +08:00
|
|
|
|
};
|
2023-11-16 17:50:02 +08:00
|
|
|
|
this.pdswidlist = []
|
|
|
|
|
this.form.shiwudata= []
|
|
|
|
|
this.pddhidlist= []
|
|
|
|
|
this.tableDatas= []
|
|
|
|
|
this.pdidlist= []
|
|
|
|
|
this.form.tableDatas= []
|
2023-11-14 11:27:58 +08:00
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
handleQuery() {
|
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
resetQuery() {
|
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
},
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
|
|
this.single = selection.length!==1
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
},
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加消费有礼活动";
|
|
|
|
|
},
|
2023-11-16 17:50:02 +08:00
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const id = row.id || this.ids
|
|
|
|
|
getActiveConsumption(id).then(response => {
|
|
|
|
|
this.form = response.data;
|
2024-03-01 11:01:36 +08:00
|
|
|
|
if(response.data.activeConsumptionChildList&&response.data.activeConsumptionChildList.length >1){
|
|
|
|
|
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')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改消费有礼活动";
|
|
|
|
|
});
|
|
|
|
|
},
|
2023-11-15 14:33:51 +08:00
|
|
|
|
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();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
},
|
2023-11-16 17:50:02 +08:00
|
|
|
|
qiyong(row){
|
2023-11-21 13:40:12 +08:00
|
|
|
|
if(row.isonline == 1){
|
|
|
|
|
this.$message.error("下线不可进行操作")
|
|
|
|
|
return
|
|
|
|
|
}
|
2023-11-16 17:50:02 +08:00
|
|
|
|
getActiveConsumption(row.id).then(response => {
|
|
|
|
|
// this.form = response.data;
|
|
|
|
|
let data = response.data
|
|
|
|
|
data.status = 1
|
|
|
|
|
updateActiveConsumption(data).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("操作成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
jinyong(row){
|
2023-11-21 13:40:12 +08:00
|
|
|
|
if(row.isonline == 1){
|
|
|
|
|
this.$message.error("下线不可进行操作")
|
|
|
|
|
return
|
|
|
|
|
}
|
2023-11-16 17:50:02 +08:00
|
|
|
|
getActiveConsumption(row.id).then(response => {
|
|
|
|
|
// this.form = response.data;
|
|
|
|
|
let data = response.data
|
|
|
|
|
data.status = 0
|
|
|
|
|
updateActiveConsumption(data).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("操作成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
},
|
2023-11-14 11:27:58 +08:00
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
2023-11-15 14:33:51 +08:00
|
|
|
|
|
|
|
|
|
this.form.activeConsumptionChildList = this.form.tableDatas.concat(this.tableDatas, this.form.shiwudata);
|
|
|
|
|
console.log(this.form.activeConsumptionChildList)
|
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.id != null) {
|
|
|
|
|
updateActiveConsumption(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
addActiveConsumption(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-03-01 11:01:36 +08:00
|
|
|
|
Deleteshan(row){
|
|
|
|
|
|
|
|
|
|
const ids = row.id || this.ids;
|
|
|
|
|
this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() {
|
|
|
|
|
return delActiveConsumption(ids);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
},
|
2024-03-01 11:01:36 +08:00
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
|
2023-11-14 11:27:58 +08:00
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
handleExport() {
|
|
|
|
|
this.download('business/marketingActivity/activeConsumption/export', {
|
|
|
|
|
...this.queryParams
|
|
|
|
|
}, `activeConsumption_${new Date().getTime()}.xlsx`)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
2023-11-15 09:09:34 +08:00
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.box-bt{
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
2023-11-20 11:23:38 +08:00
|
|
|
|
font-size: 18px;
|
2023-11-15 09:09:34 +08:00
|
|
|
|
}
|
2024-03-01 14:56:38 +08:00
|
|
|
|
.x-box{
|
|
|
|
|
background: #f9f9f9;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 15px;
|
|
|
|
|
width: 45%;
|
|
|
|
|
}
|
2023-11-15 09:09:34 +08:00
|
|
|
|
</style>
|