10.17 16:57
This commit is contained in:
parent
590bad37d3
commit
5f7bfc1652
35
fuintAdmin/src/api/EventMarketing/SaveBlock.js
Normal file
35
fuintAdmin/src/api/EventMarketing/SaveBlock.js
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 分页查询列表
|
||||||
|
export function getList(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardValue',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 新增列表
|
||||||
|
export function addList(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardValue',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改列表
|
||||||
|
export function eitList(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardValue',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//删除列表
|
||||||
|
export function deleteList(id) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardValue?idList='+id,
|
||||||
|
method: 'delete',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
42
fuintAdmin/src/api/EventMarketing/giftBlock.js
Normal file
42
fuintAdmin/src/api/EventMarketing/giftBlock.js
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 分页查询列表
|
||||||
|
export function getList(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardGift',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getListtj(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardGift/list/11',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 新增列表
|
||||||
|
export function addList(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardGift',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改列表
|
||||||
|
export function eitList(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardGift',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//删除列表
|
||||||
|
export function deleteList(id) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardValue?idList='+id,
|
||||||
|
method: 'delete',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
43
fuintAdmin/src/api/EventMarketing/oilBlock.js
Normal file
43
fuintAdmin/src/api/EventMarketing/oilBlock.js
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 分页查询列表
|
||||||
|
export function getList(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardFuelDiesel',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询油号
|
||||||
|
export function oilName(oilType) {
|
||||||
|
return request({
|
||||||
|
url: 'business/petrolStationManagement/oilName/getList?oilType='+oilType,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 新增列表
|
||||||
|
export function addList(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardFuelDiesel',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改列表
|
||||||
|
export function eitList(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardFuelDiesel',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//删除列表
|
||||||
|
export function deleteList(id) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/cardValue?idList='+id,
|
||||||
|
method: 'delete',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -2,9 +2,9 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 储值卡-->
|
<!-- 储值卡-->
|
||||||
<el-card style="margin-bottom: 20px">
|
<el-card style="margin-bottom: 20px">
|
||||||
<el-radio-group v-model="radio1">
|
<el-radio-group v-model="isonline" @input="getlist()">
|
||||||
<el-radio-button label="可用"></el-radio-button>
|
<el-radio-button label="0">可用</el-radio-button>
|
||||||
<el-radio-button label="已下线"></el-radio-button>
|
<el-radio-button label="1">已下线</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-bottom: 20px">
|
<el-card style="margin-bottom: 20px">
|
||||||
@ -15,81 +15,116 @@
|
|||||||
type="info">
|
type="info">
|
||||||
</el-alert>
|
</el-alert>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin: 10px 0px">
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="addblock()">新增储值活动</el-button>
|
||||||
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
|
align="center"
|
||||||
|
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="date"
|
prop="groupOriented"
|
||||||
label="油卡类型"
|
|
||||||
width="100">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="date"
|
|
||||||
label="面向群体"
|
label="面向群体"
|
||||||
width="100">
|
width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.groupOriented == 1">普通群体</span>
|
||||||
|
<span v-if="scope.row.groupOriented == 2">等级会员</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="活动信息">
|
<el-table-column label="活动信息">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="rechargeBalance"
|
||||||
label="充值金额"
|
label="充值金额"
|
||||||
width="120">
|
width="120">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="giftBalance"
|
||||||
label="赠送金额"
|
label="赠送金额"
|
||||||
width="120">
|
width="120">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="points"
|
||||||
label="赠送积分"
|
label="赠送积分"
|
||||||
width="120">
|
width="120">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="growthValue"
|
||||||
label="赠送成长值"
|
label="赠送成长值"
|
||||||
width="120">
|
width="120">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="refuelMoney"
|
||||||
label="赠送加油金"
|
label="赠送加油金"
|
||||||
width="120">
|
width="120">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="date"
|
prop="activeTime"
|
||||||
label="活动时间"
|
label="活动时间"
|
||||||
width="120">
|
width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.activeTime == 1">不限时间</span>
|
||||||
|
<span v-if="scope.row.activeTime == 2">自定义时间</span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="province"
|
prop="activeStatus"
|
||||||
label="活动进度"
|
label="活动进度"
|
||||||
width="80">
|
width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.activeStatus == 1"> <el-tag>启用</el-tag></span>
|
||||||
|
<span v-if="scope.row.activeStatus == 2"> <el-tag type="danger">禁用</el-tag></span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="province"
|
prop="paymentValue"
|
||||||
label="支付即充值"
|
label="支付即充值"
|
||||||
width="100">
|
width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.paymentValue == 1"><el-tag>启用</el-tag></span>
|
||||||
|
<span v-if="scope.row.paymentValue == 2"><el-tag type="danger">禁用</el-tag></span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="province"
|
prop="activeStatus"
|
||||||
label="状态"
|
label="状态"
|
||||||
width="80">
|
width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!-- <span v-if="scope.row.activeStatus == 1"> <el-tag>在用</el-tag> </span>-->
|
||||||
|
<!-- <span v-if="scope.row.activeStatus == 2"> <el-tag type="success">挂失</el-tag> </span>-->
|
||||||
|
<!-- <span v-if="scope.row.activeStatus == 3"> <el-tag type="danger">停用</el-tag> </span>-->
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.status"
|
||||||
|
:active-value="'1'"
|
||||||
|
:inactive-value="'3'"
|
||||||
|
active-color="#409EFF"
|
||||||
|
inactive-color="#909399"
|
||||||
|
@change="posteid(scope.row)"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="date"
|
prop="participationNo"
|
||||||
label="参与次数"
|
label="参与次数"
|
||||||
width="100">
|
width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.participationNo == 0">不限制次数</span>
|
||||||
|
<span v-if="scope.row.participationNo != 0">{{scope.row.participationNo}} 次</span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="date"
|
prop="sort"
|
||||||
label="排序"
|
label="排序"
|
||||||
width="100">
|
width="100">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="date"
|
prop="updateTime"
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
width="120">
|
width="120">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -97,11 +132,190 @@
|
|||||||
prop="date"
|
prop="date"
|
||||||
label="操作"
|
label="操作"
|
||||||
width="120">
|
width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row.id)"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="pageNo"
|
||||||
|
:limit.sync="pageSize"
|
||||||
|
@pagination="getlist"
|
||||||
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-drawer
|
||||||
|
title="添加-汽油卡"
|
||||||
|
:visible.sync="dialog"
|
||||||
|
size="50%"
|
||||||
|
ref="drawer"
|
||||||
|
>
|
||||||
|
<div class="demo-drawer__content">
|
||||||
|
<el-form :model="form" :rules="rules" :inline="true" >
|
||||||
|
<el-form-item label="面向群体" :label-width="formLabelWidth">
|
||||||
|
<el-radio-group v-model="form.groupOriented">
|
||||||
|
<el-radio :label="1">不限群体</el-radio>
|
||||||
|
<el-radio :label="2">会员等级</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="充值金额" :label-width="formLabelWidth" prop="rechargeBalance">
|
||||||
|
<el-input v-model="form.rechargeBalance" autocomplete="off">
|
||||||
|
<template slot="append">元</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赠送金额" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-input v-model="form.giftBalance" autocomplete="off">
|
||||||
|
<template slot="append">元</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赠送积分" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-input v-model="form.points" autocomplete="off">
|
||||||
|
<template slot="append">分</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赠送成长值" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-input v-model="form.growthValue" autocomplete="off">
|
||||||
|
<template slot="append">成长值</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赠送加油金" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-input v-model="form.refuelMoney" autocomplete="off">
|
||||||
|
<template slot="append">元</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="赠送特权" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-radio-group v-model="form.resource">
|
||||||
|
<el-radio label="1">显示</el-radio>
|
||||||
|
<el-radio label="2">隐藏</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="参与次数" :label-width="formLabelWidth">
|
||||||
|
<el-input-number v-model="form.participationNo" controls-position="right" :min="1" :max="10"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="员工提成" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-radio-group v-model="form.employeeCommission">
|
||||||
|
<el-radio label="1">仅会员首次充值提成</el-radio>
|
||||||
|
<el-radio label="2">会员每次充值提成</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="提成类型" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-radio-group v-model="form.royaltyType">
|
||||||
|
<el-radio label="1">无</el-radio>
|
||||||
|
<el-radio label="2">按提成金额</el-radio>
|
||||||
|
<el-radio label="3">按充值金额*提成比例</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="提成金额" v-if="form.royaltyType == 2" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-input v-model="form.amountCommission" autocomplete="off">
|
||||||
|
<template slot="append">元</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="提成比例" v-if="form.royaltyType == 3" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-input v-model="form.percentageCommissions" autocomplete="off">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="活动时间" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-radio-group v-model="form.activeTime">
|
||||||
|
<el-radio label="1">不限时间</el-radio>
|
||||||
|
<el-radio label="2">自定义时间</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="时间范围" v-if="form.activeTime == 2" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.startTime"
|
||||||
|
type="date"
|
||||||
|
placeholder="开始日期">
|
||||||
|
</el-date-picker>
|
||||||
|
-
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.endTime"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="活动状态" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-radio-group v-model="form.activeStatus">
|
||||||
|
<el-radio label="1">启用</el-radio>
|
||||||
|
<el-radio label="2">禁用</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="支付储值" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-radio-group v-model="form.paymentValue">
|
||||||
|
<el-radio label="1">启用</el-radio>
|
||||||
|
<el-radio label="2">禁用</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" :label-width="formLabelWidth" prop="name">
|
||||||
|
<el-input-number v-model="form.sort" controls-position="right" :min="1" :max="10"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<!-- 赠送卡券-->
|
||||||
|
<div class="box-popup">
|
||||||
|
<div class="dis-bit"><div>赠送卡券(选填)</div> <el-button type="primary" icon="el-icon-plus" round>添加卡券</el-button> </div>
|
||||||
|
<el-table
|
||||||
|
:data="tableDatas"
|
||||||
|
border
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
prop="date"
|
||||||
|
label="卡券名称"
|
||||||
|
width="180">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="券类型"
|
||||||
|
width="180">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="address"
|
||||||
|
label="券详情">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="address"
|
||||||
|
label="有效期">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="address"
|
||||||
|
label="赠送数量">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="address"
|
||||||
|
label="操作">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<!-- 附加特权-->
|
||||||
|
<div class="box-popup">
|
||||||
|
<div class="dis-bit">附加特权</div>
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
maxlength="225"
|
||||||
|
show-word-limit
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="demo-drawer__footer">
|
||||||
|
<el-button @click="cancelForm">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="saveblockabb()" >确定</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -109,12 +323,66 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getList,addList,eitList,deleteList } from "@/api/EventMarketing/SaveBlock";
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
radio1: '可用',
|
isonline: '0',
|
||||||
tableData: [{
|
dialog: false,
|
||||||
|
rules: {
|
||||||
|
rechargeBalance: [
|
||||||
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
sort:1,
|
||||||
|
groupOriented:1,
|
||||||
|
rechargeBalance:'',
|
||||||
|
giftBalance:'',
|
||||||
|
points:'',
|
||||||
|
growthValue:'',
|
||||||
|
refuelMoney:'',
|
||||||
|
participationNo:0,
|
||||||
|
employeeCommission:'1',
|
||||||
|
royaltyType:'1',
|
||||||
|
resource:'1',
|
||||||
|
activeTime:'1',
|
||||||
|
activeStatus:'1',
|
||||||
|
paymentValue:'1',
|
||||||
|
amountCommission:'',
|
||||||
|
percentageCommissions:'',
|
||||||
|
},
|
||||||
|
tableDatas: [],
|
||||||
|
formLabelWidth: '160px',
|
||||||
|
timer: null,
|
||||||
|
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
value: '选项1',
|
||||||
|
label: '黄金糕'
|
||||||
|
}, {
|
||||||
|
value: '选项2',
|
||||||
|
label: '双皮奶'
|
||||||
|
}, {
|
||||||
|
value: '选项3',
|
||||||
|
label: '蚵仔煎'
|
||||||
|
}, {
|
||||||
|
value: '选项4',
|
||||||
|
label: '龙须面'
|
||||||
|
}, {
|
||||||
|
value: '选项5',
|
||||||
|
label: '北京烤鸭'
|
||||||
|
}],
|
||||||
|
total:0,
|
||||||
|
pageNo:1,
|
||||||
|
pageSize:10,
|
||||||
|
value: '',
|
||||||
|
tableData: [
|
||||||
|
{
|
||||||
date: '2016-05-03',
|
date: '2016-05-03',
|
||||||
name: '王小虎',
|
name: '王小虎',
|
||||||
province: '上海',
|
province: '上海',
|
||||||
@ -164,14 +432,138 @@
|
|||||||
address: '上海市普陀区金沙江路 1518 弄',
|
address: '上海市普陀区金沙江路 1518 弄',
|
||||||
zip: 200333
|
zip: 200333
|
||||||
}]
|
}]
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getlist()
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
|
||||||
|
getlist(){
|
||||||
|
let data = {
|
||||||
|
isonline:this.isonline,
|
||||||
|
pageNo:this.pageNo,
|
||||||
|
pageSize:this.pageSize,
|
||||||
|
}
|
||||||
|
getList(data).then(res=>{
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleUpdate(data){
|
||||||
|
console.log(data)
|
||||||
|
this.form = data
|
||||||
|
this.dialog = true
|
||||||
|
},
|
||||||
|
chongzhi(){
|
||||||
|
this.form = {
|
||||||
|
sort:1,
|
||||||
|
groupOriented:1,
|
||||||
|
rechargeBalance:'',
|
||||||
|
giftBalance:'',
|
||||||
|
points:'',
|
||||||
|
growthValue:'',
|
||||||
|
refuelMoney:'',
|
||||||
|
participationNo:0,
|
||||||
|
employeeCommission:'1',
|
||||||
|
royaltyType:'1',
|
||||||
|
resource:'1',
|
||||||
|
activeTime:'1',
|
||||||
|
activeStatus:'1',
|
||||||
|
paymentValue:'1',
|
||||||
|
}
|
||||||
|
console.log('归零')
|
||||||
|
},
|
||||||
|
addblock(){
|
||||||
|
this.chongzhi()
|
||||||
|
console.log(this.from)
|
||||||
|
this.dialog = true
|
||||||
|
},
|
||||||
|
posteid(data){
|
||||||
|
eitList(data).then(res=>{
|
||||||
|
if (res.code == 200){
|
||||||
|
this.$message({
|
||||||
|
message: '修改成功',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
this.getlist()
|
||||||
|
}else {
|
||||||
|
this.$message.error('修改失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleDelete(id){
|
||||||
|
deleteList(id).then(res=>{
|
||||||
|
|
||||||
|
if (res.code == 200){
|
||||||
|
this.$message({
|
||||||
|
message: '删除成功',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
this.getlist()
|
||||||
|
}else {
|
||||||
|
this.$message.error('删除失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
saveblockabb(){
|
||||||
|
if(this.form.id){
|
||||||
|
eitList(this.form).then(res=>{
|
||||||
|
if (res.code == 200){
|
||||||
|
this.$message({
|
||||||
|
message: '修改成功',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
this.getlist()
|
||||||
|
}else {
|
||||||
|
this.$message.error('修改失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
addList(this.form).then(res=>{
|
||||||
|
if (res.code == 200){
|
||||||
|
this.$message({
|
||||||
|
message: '新增成功',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
this.getlist()
|
||||||
|
}else {
|
||||||
|
this.$message.error('新增失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
this.dialog = false
|
||||||
|
this.chongzhi()
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
cancelForm() {
|
||||||
|
this.loading = false;
|
||||||
|
this.dialog = false;
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.demo-drawer__footer{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.box-popup{
|
||||||
|
width: 90%;
|
||||||
|
margin: 10px auto;
|
||||||
|
}
|
||||||
|
.dis-bit{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,15 +1,334 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="app-container">
|
||||||
<!-- 礼品卡-->
|
<!-- 礼品卡-->
|
||||||
|
<el-card style="margin-bottom: 20px">
|
||||||
|
<div class="top-hang">
|
||||||
|
|
||||||
|
|
||||||
|
<el-input v-model="queryParams.number" style="width: 20%;margin-right: 10px" placeholder="礼品卡号 "></el-input>
|
||||||
|
<el-input v-model="queryParams.remark" style="width: 20%;margin-right: 10px" placeholder="备注信息"></el-input>
|
||||||
|
<el-select v-model="queryParams.status" style="margin-right: 10px" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in option"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select v-model="queryParams.activateStatus" style="margin-right: 10px" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="getlist">查询</el-button>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<div class="tj">
|
||||||
|
|
||||||
|
<el-card class="kar" >
|
||||||
|
<div class="tj-num">{{tjdata.tatol || 0}}</div>
|
||||||
|
<div class="tj-siez">礼品卡总数</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="kar" >
|
||||||
|
<div class="tj-num">{{tjdata.alreadyTatal || 0}}</div>
|
||||||
|
<div class="tj-siez">已激活</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="kar" >
|
||||||
|
<div class="tj-num">{{tjdata.total_amount || 0}}</div>
|
||||||
|
<div class="tj-siez">总额度</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="kar" >
|
||||||
|
<div class="tj-num">{{tjdata.remaining_amount || 0}}</div>
|
||||||
|
<div class="tj-siez">剩余额度</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="kar" >
|
||||||
|
<div class="tj-num"> <el-tag>启用</el-tag> </div>
|
||||||
|
<div class="tj-siez">兑换功能状态</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-card style="margin-bottom: 20px">
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="daking()" >新增礼品卡</el-button>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
prop="id"
|
||||||
|
label="ID"
|
||||||
|
width="80">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="batchNumber"
|
||||||
|
label="批次号"
|
||||||
|
width="220">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="cardAmount"
|
||||||
|
label="面值金额"
|
||||||
|
width="180">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="number"
|
||||||
|
label="礼品卡卡号"
|
||||||
|
width="210">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="cardPassword"
|
||||||
|
label="兑换卡密"
|
||||||
|
width="180">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="activateStatus"
|
||||||
|
label="激活状态"
|
||||||
|
width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.activateStatus == 1"> <el-tag type="success">已使用</el-tag> </span>
|
||||||
|
<span v-if="scope.row.activateStatus != 1"> <el-tag type="info">未激活</el-tag> </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="status"
|
||||||
|
label="礼品卡状态"
|
||||||
|
width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.status"
|
||||||
|
:active-value="'1'"
|
||||||
|
:inactive-value="'3'"
|
||||||
|
active-color="#409EFF"
|
||||||
|
inactive-color="#909399"
|
||||||
|
@change="posteid(scope.row)"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
label="创建时间"
|
||||||
|
width="220"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="remark"
|
||||||
|
label="备注信息"
|
||||||
|
width="280">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="pageNo"
|
||||||
|
:limit.sync="pageSize"
|
||||||
|
@pagination="getlist"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
<el-dialog
|
||||||
|
title="生产礼品卡"
|
||||||
|
:visible.sync="centerDialogVisible"
|
||||||
|
width="30%"
|
||||||
|
>
|
||||||
|
<!-- 表-->
|
||||||
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||||
|
<el-form-item label="生成数量" prop="quantity">
|
||||||
|
<el-input-number v-model="ruleForm.quantity" controls-position="right" :min="1" :max="10"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="礼品卡金额" prop="cardAmount">
|
||||||
|
<el-input v-model="ruleForm.cardAmount">
|
||||||
|
<template slot="append">元</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="礼品卡状态" prop="activateStatus">
|
||||||
|
<el-radio-group v-model="ruleForm.activateStatus">
|
||||||
|
<el-radio label="1">启用</el-radio>
|
||||||
|
<el-radio label="2">禁用</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="卡描述" >
|
||||||
|
<el-input type="textarea" v-model="ruleForm.remark"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="addBlock()">创建</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getList,getListtj,addList,eitList,deleteList } from "@/api/EventMarketing/giftBlock";
|
||||||
export default {
|
export default {
|
||||||
name: 'index'
|
name: 'index',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
queryParams: {
|
||||||
|
number:'',
|
||||||
|
remark:'',
|
||||||
|
activateStatus:'',
|
||||||
|
status:'',
|
||||||
|
pageNo:1,
|
||||||
|
pageSize:10
|
||||||
|
},
|
||||||
|
centerDialogVisible:false,
|
||||||
|
input:'',
|
||||||
|
total:0,
|
||||||
|
pageNo:1,
|
||||||
|
pageSize:10,
|
||||||
|
option: [
|
||||||
|
{
|
||||||
|
value: '',
|
||||||
|
label: '全部'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: '已使用'
|
||||||
|
}, {
|
||||||
|
value: '0',
|
||||||
|
label: '未激活'
|
||||||
|
},],
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
value: '',
|
||||||
|
label: '全部'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: '正常'
|
||||||
|
}, {
|
||||||
|
value: '2',
|
||||||
|
label: '禁用'
|
||||||
|
},],
|
||||||
|
value: '',
|
||||||
|
tjdata:{},
|
||||||
|
tableData: [
|
||||||
|
{
|
||||||
|
date: '2016-05-02',
|
||||||
|
name: '王小虎',
|
||||||
|
address: '上海市普陀区金沙江路 1518 弄'
|
||||||
|
}, {
|
||||||
|
date: '2016-05-04',
|
||||||
|
name: '王小虎',
|
||||||
|
address: '上海市普陀区金沙江路 1517 弄'
|
||||||
|
}, {
|
||||||
|
date: '2016-05-01',
|
||||||
|
name: '王小虎',
|
||||||
|
address: '上海市普陀区金沙江路 1519 弄'
|
||||||
|
}, {
|
||||||
|
date: '2016-05-03',
|
||||||
|
name: '王小虎',
|
||||||
|
address: '上海市普陀区金沙江路 1516 弄'
|
||||||
|
}],
|
||||||
|
ruleForm: {
|
||||||
|
activateStatus:'1',
|
||||||
|
quantity:'1',
|
||||||
|
cardAmount:'1',
|
||||||
|
remark:''
|
||||||
|
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
activateStatus: [
|
||||||
|
{ required: true, message: '此为必填项', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
quantity: [
|
||||||
|
{ required: true, message: '此为必填项', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
cardAmount: [
|
||||||
|
{ required: true, message: '此为必填项', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getlist()
|
||||||
|
this.gettj()
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
|
||||||
|
getlist(){
|
||||||
|
this.tableData = []
|
||||||
|
getList(this.queryParams).then(res=>{
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
posteid(data){
|
||||||
|
eitList(data).then(res=>{
|
||||||
|
if(res.code == 200){
|
||||||
|
this.$message.success('修改成功');
|
||||||
|
}else {
|
||||||
|
this.$message.error('修改失败请稍后再试');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
gettj(){
|
||||||
|
getListtj().then(res=>{
|
||||||
|
this.tjdata = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
daking(){
|
||||||
|
this.centerDialogVisible = true
|
||||||
|
this.ruleForm = {
|
||||||
|
activateStatus:'1',
|
||||||
|
quantity:'1',
|
||||||
|
cardAmount:'1',
|
||||||
|
remark:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addBlock(){
|
||||||
|
let data = this.ruleForm
|
||||||
|
addList(data).then(res=>{
|
||||||
|
if(res.code == 200){
|
||||||
|
this.$message.success('添加成功');
|
||||||
|
}else {
|
||||||
|
this.$message.error('操作失败请稍后再试');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.centerDialogVisible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.tj{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.kar{
|
||||||
|
width: 20%;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.tj-num{
|
||||||
|
margin: 5px auto;
|
||||||
|
font-size: 28px;
|
||||||
|
color: #666;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.tj-siez{
|
||||||
|
margin: 5px auto;
|
||||||
|
color: #909399;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.top-hang{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,15 +1,351 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="app-container">
|
||||||
<!-- 存油卡-->
|
<!-- 存油卡-->
|
||||||
|
<el-card style="margin-bottom: 20px">
|
||||||
|
<el-radio-group v-model="queryParams.type">
|
||||||
|
<el-radio-button v-for="dict in dict.type.oil_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
<div class="top-sousuo">
|
||||||
|
<el-select v-model="queryParams.oilType" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in oilList"
|
||||||
|
:key="dict.oilName"
|
||||||
|
:label="dict.oilName"
|
||||||
|
:value="dict.oilName">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择" style="margin:0px 20px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in option"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-button type="primary" style="margin-left: 20px" icon="el-icon-search" @click="getlist">搜索</el-button>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="margin-bottom: 20px">
|
||||||
|
<el-button type="primary" icon="el-icon-plus" style="margin-bottom: 10px " @click="addoilBlock()">新增锁价活动</el-button>
|
||||||
|
<el-alert
|
||||||
|
title="当前配置为锁价活动、锁价活动为充值后所得升数进行锁定,卡类型下每个油品最多可创建6个锁价充值活动"
|
||||||
|
type="info"
|
||||||
|
:closable="false">
|
||||||
|
</el-alert>
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
prop="id"
|
||||||
|
label="活动ID"
|
||||||
|
width="110">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="type"
|
||||||
|
label="油卡类型"
|
||||||
|
width="140">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag>{{scope.row.type}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="oilType"
|
||||||
|
label="油品"
|
||||||
|
width="110">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="rechargeBalance"
|
||||||
|
label="充值金额"
|
||||||
|
width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag>{{scope.row.rechargeBalance}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="lockupPrice"
|
||||||
|
label="锁价单价"
|
||||||
|
width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag>{{scope.row.lockupPrice}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="incomeLitres"
|
||||||
|
label="升数"
|
||||||
|
width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag>{{scope.row.incomeLitres}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="points"
|
||||||
|
label="赠送积分"
|
||||||
|
width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag>{{scope.row.points}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="activeTime"
|
||||||
|
label="活动时间"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.activeTime == 1">不限时间</span>
|
||||||
|
<span v-if="scope.row.activeTime == 2">自定义时间</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="activityProgress"
|
||||||
|
label="活动进度"
|
||||||
|
width="110">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag type="info"v-if="scope.row.activityProgress == 2">已结束</el-tag>
|
||||||
|
<el-tag type="success" v-if="scope.row.activityProgress == 1">进行中</el-tag>
|
||||||
|
<el-tag type="danger" v-if="scope.row.activityProgress == 0">待开始</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="status"
|
||||||
|
label="状态"
|
||||||
|
width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.status"
|
||||||
|
active-value="true"
|
||||||
|
inactive-value="false"
|
||||||
|
active-color="#409EFF"
|
||||||
|
inactive-color="#909399"
|
||||||
|
@change="posteid(scope.row)"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
width="240"
|
||||||
|
label="更新时间">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="编辑"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>修改</el-button>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="pageNo"
|
||||||
|
:limit.sync="pageSize"
|
||||||
|
@pagination="getlist"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="添加囤油卡"
|
||||||
|
:visible.sync="centerDialogVisible"
|
||||||
|
width="30%"
|
||||||
|
center>
|
||||||
|
|
||||||
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||||
|
|
||||||
|
<el-form-item label="油品类型" prop="oilType">
|
||||||
|
<el-select v-model="ruleForm.oilType" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in oilList"
|
||||||
|
:key="dict.oilName"
|
||||||
|
:label="dict.oilName"
|
||||||
|
:value="dict.oilName">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <el-radio-group v-model="ruleForm.oilType" >-->
|
||||||
|
<!-- <el-radio-->
|
||||||
|
<!-- v-for="dict in oilList"-->
|
||||||
|
<!-- :key="dict.id"-->
|
||||||
|
<!-- :label="dict.oilName"-->
|
||||||
|
<!-- :value="dict.id"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-radio-group>-->
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="锁价单价" prop="name">
|
||||||
|
<el-input v-model="ruleForm.lockupPrice">
|
||||||
|
<template slot="append">元/升</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="充值金额" prop="name">
|
||||||
|
<el-input v-model="ruleForm.rechargeBalance">
|
||||||
|
<template slot="append">元</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所得升数" prop="name">
|
||||||
|
<el-input v-model="ruleForm.incomeLitres">
|
||||||
|
<template slot="append">升</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="赠送积分" prop="name">
|
||||||
|
<el-input v-model="ruleForm.points">
|
||||||
|
<template slot="append">分</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="活动时间" prop="resource">
|
||||||
|
<el-radio-group v-model="ruleForm.activeTime">
|
||||||
|
<el-radio label="1">不限时间</el-radio>
|
||||||
|
<el-radio label="2">自定义时间</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="活动状态" prop="resource">
|
||||||
|
<el-radio-group v-model="ruleForm.activeStatus">
|
||||||
|
<el-radio label="1">启用</el-radio>
|
||||||
|
<el-radio label="2">禁用</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="postadd()">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getList,oilName,addList,eitList} from "@/api/EventMarketing/oilBlock";
|
||||||
export default {
|
export default {
|
||||||
name: 'index'
|
dicts: ['oil_type'],
|
||||||
|
name: 'index',
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
value:'',
|
||||||
|
type:0,
|
||||||
|
centerDialogVisible:false,
|
||||||
|
value1:'',
|
||||||
|
total:0,
|
||||||
|
pageNo:1,
|
||||||
|
pageSize:10,
|
||||||
|
option: [
|
||||||
|
{
|
||||||
|
value: '',
|
||||||
|
label: '全部'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'true',
|
||||||
|
label: '正常'
|
||||||
|
}, {
|
||||||
|
value: 'false',
|
||||||
|
label: '禁用'
|
||||||
|
},],
|
||||||
|
tableData: [],
|
||||||
|
oilList:[],
|
||||||
|
ruleForm:{
|
||||||
|
oilType:2,
|
||||||
|
lockupPrice: '' ,
|
||||||
|
rechargeBalance:'',
|
||||||
|
incomeLitres:'',
|
||||||
|
points:'',
|
||||||
|
status:'1',
|
||||||
|
activeTime:'1',
|
||||||
|
activeStatus:'1'
|
||||||
|
},
|
||||||
|
queryParams:{
|
||||||
|
type:'柴油',
|
||||||
|
oilType:'',
|
||||||
|
status:'',
|
||||||
|
pageNo:1,
|
||||||
|
pageSize:10,
|
||||||
|
},
|
||||||
|
rules:{}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getlist()
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
getlist(){
|
||||||
|
this.tableData = []
|
||||||
|
getList(this.queryParams).then(res=>{
|
||||||
|
if(res.code == 200){
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
oilName(this.queryParams.type).then(res=>{
|
||||||
|
this.oilList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addoilBlock(){
|
||||||
|
this.ruleForm = {
|
||||||
|
type:this.queryParams.type,
|
||||||
|
lockupPrice: '' ,
|
||||||
|
rechargeBalance:'',
|
||||||
|
incomeLitres:'',
|
||||||
|
points:'',
|
||||||
|
activeTime:'1',
|
||||||
|
activeStatus:'1'
|
||||||
|
},
|
||||||
|
this.centerDialogVisible = true
|
||||||
|
},
|
||||||
|
posteid(data){
|
||||||
|
// data.status =! data.status
|
||||||
|
eitList(data).then(res=>{
|
||||||
|
if (res.code == 200){
|
||||||
|
this.$message.success('修改成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
postadd(){
|
||||||
|
this.ruleForm.type = this.queryParams.type
|
||||||
|
this.ruleForm.status = '1'
|
||||||
|
if( this.ruleForm.id ){
|
||||||
|
console.log("修改")
|
||||||
|
eitList(this.ruleForm).then(res=>{
|
||||||
|
if (res.code == 200){
|
||||||
|
this.$message.success('修改成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}else{
|
||||||
|
addList(this.ruleForm).then(res=>{
|
||||||
|
if (res.code == 200){
|
||||||
|
this.$message.success('新增成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.getlist()
|
||||||
|
this.centerDialogVisible = false
|
||||||
|
},
|
||||||
|
handleUpdate(data){
|
||||||
|
console.log(data)
|
||||||
|
this.ruleForm = data
|
||||||
|
this.centerDialogVisible = true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.top-sousuo{
|
||||||
|
margin-top: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -146,9 +146,7 @@ import {cleanTankApi} from "@/api/oilConfig/oilTank";
|
|||||||
gunName: [
|
gunName: [
|
||||||
{ required: true, message: '请输入油罐名称', trigger: 'blur' },
|
{ required: true, message: '请输入油罐名称', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
// status: [
|
|
||||||
// { required: true, message: '请选择状态', trigger: 'change' }
|
|
||||||
// ],
|
|
||||||
tankId: [
|
tankId: [
|
||||||
{ required: true, message: '请选择所属油罐', trigger: 'change' }
|
{ required: true, message: '请选择所属油罐', trigger: 'change' }
|
||||||
],
|
],
|
||||||
|
@ -213,9 +213,6 @@
|
|||||||
<el-form ref="form" :model="oilNumber" :rules="rules">
|
<el-form ref="form" :model="oilNumber" :rules="rules">
|
||||||
<el-form-item label="油品类型" prop="oilType">
|
<el-form-item label="油品类型" prop="oilType">
|
||||||
<el-radio-group v-model="oilNumber.oilType" @change="oilTypeClick(oilNumber.oilType)">
|
<el-radio-group v-model="oilNumber.oilType" @change="oilTypeClick(oilNumber.oilType)">
|
||||||
<!-- <el-radio v-for="option in oilTypeList" :key="option.dictValue" :label="option.dictValue">-->
|
|
||||||
<!-- {{ option.dictLabel }}-->
|
|
||||||
<!-- </el-radio>-->
|
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="dict in dict.type.oil_type"
|
v-for="dict in dict.type.oil_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@ -481,7 +478,6 @@ import {
|
|||||||
ifDelete:'',
|
ifDelete:'',
|
||||||
numberId:'',
|
numberId:'',
|
||||||
},
|
},
|
||||||
|
|
||||||
form: {
|
form: {
|
||||||
name: '',
|
name: '',
|
||||||
region: '',
|
region: '',
|
||||||
|
Loading…
Reference in New Issue
Block a user