This commit is contained in:
cun-nan 2024-02-22 17:53:41 +08:00
parent 76e1a578ba
commit 08d2140ca7
29 changed files with 660 additions and 187 deletions

View File

@ -54,4 +54,12 @@ export function getCardFavorableList(query) {
params: query params: query
}) })
} }
// 卡券列表
export function getCardFavorableLists(query) {
return request({
url: 'business/marketingActivity/cardFavorable/PC',
method: 'get',
params: query
})
}
// 成长值记录 // 成长值记录

View File

@ -53,21 +53,21 @@
<el-option label="无储值余额" value="noHaveBalance"/> <el-option label="无储值余额" value="noHaveBalance"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="status"> <!-- <el-form-item label="" prop="status">-->
<el-select <!-- <el-select-->
v-model="queryParams.official" <!-- v-model="queryParams.official"-->
placeholder="全部" <!-- placeholder="全部"-->
clearable <!-- clearable-->
style="width: 240px" <!-- style="width: 240px"-->
> <!-- >-->
<el-option <!-- <el-option-->
v-for="dict in dict.type.official" <!-- v-for="dict in dict.type.official"-->
:key="dict.value" <!-- :key="dict.value"-->
:label="dict.label" <!-- :label="dict.label"-->
:value="dict.value" <!-- :value="dict.value"-->
/> <!-- />-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="注册时间"> <el-form-item label="注册时间">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
@ -75,7 +75,7 @@
size="medium" size="medium"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
type="daterange" type="daterange"
range-separator="-" range-separator=""
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
></el-date-picker> ></el-date-picker>
@ -202,11 +202,7 @@
<div>{{ scope.row.consumeNum ? scope.row.consumeNum : '0' }}</div> <div>{{ scope.row.consumeNum ? scope.row.consumeNum : '0' }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="注册时间" align="center" width="160" prop="balCreateTime"> <el-table-column label="注册时间" align="center" width="160" prop="balCreateTime"/>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.balCreateTime) }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.zhzt" :value="scope.row.status"/> <dict-tag :options="dict.type.zhzt" :value="scope.row.status"/>
@ -359,16 +355,16 @@
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>--> <!-- </el-row>-->
<el-row> <!-- <el-row>-->
<el-col :span="24"> <!-- <el-col :span="24">-->
<el-form-item label="是否关注公众号"> <!-- <el-form-item label="是否关注公众号">-->
<el-radio-group v-model="form.official"> <!-- <el-radio-group v-model="form.official">-->
<el-radio label="ygz" value="ygz">已关注</el-radio> <!-- <el-radio label="ygz" value="ygz">已关注</el-radio>-->
<el-radio label="wgz" value="wgz">未关注</el-radio> <!-- <el-radio label="wgz" value="wgz">未关注</el-radio>-->
</el-radio-group> <!-- </el-radio-group>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="会员状态" prop="status"> <el-form-item label="会员状态" prop="status">

View File

@ -201,7 +201,7 @@
disabled> disabled>
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
<span class="bom">赠送金额 仅自定义金额模式下可手动输入赠送活动充值赠送金额不可手动更改</span> <span class="bom">赠送金额 自定义金额模式下将按照距离自定义金额最近的充值活动信息进行赠送</span>
</div> </div>
</div> </div>
@ -214,29 +214,29 @@
<template slot="append">积分</template> <template slot="append">积分</template>
</el-input> </el-input>
<span <span
class="bom">赠送积分 仅自定义金额模式下可手动输入,活动充值赠送积分不可手动更改[需开启积分活动有效]</span> class="bom">赠送积分 自定义金额模式下将按照距离自定义金额最近的充值活动信息进行赠送</span>
</div> </div>
</div> </div>
<div class="jine"> <div class="jine">
<div class="zeng" style="width: 100px;">赠成长值</div> <div class="zeng">赠成长值</div>
<div> <div>
<el-input placeholder="0" <el-input placeholder="0"
v-model="cardValueForm.growthValue" v-model="cardValueForm.growthValue"
disabled> disabled>
<template slot="append">成长值</template> <template slot="append">成长值</template>
</el-input> </el-input>
<!-- <span class="bom">赠送加油金金额 仅自定义金额模式下可手动输入赠送活动充值赠送金额不可手动更改</span> --> <span class="bom">赠送成长值 自定义金额模式下将按照距离自定义金额最近的充值活动信息进行赠送</span>
</div> </div>
</div> </div>
<div class="jine"> <div class="jine">
<div class="zeng">提成员工</div> <div class="zeng" style="width: 30%">提成员工</div>
<div> <div>
<el-input :readonly="true" placeholder="请选择提成员工" v-model="cardValueForm.realName"> <el-input :readonly="true" placeholder="请选择提成员工" v-model="cardValueForm.realName">
<el-button slot="append" @click="chooseStaff">选择员工</el-button> <el-button slot="append" @click="chooseStaff">选择员工</el-button>
</el-input> </el-input>
<span class="bom">仅系统储值档次支持提成员工选择自定义充值金额匹配低一档次</span> <!-- <span class="bom">仅系统储值档次支持提成员工选择自定义充值金额匹配低一档次</span>-->
</div> </div>
</div> </div>
</div> </div>
@ -318,7 +318,7 @@
<template slot="append">积分</template> <template slot="append">积分</template>
</el-input> </el-input>
<span <span
class="bom">升数卡充值不支持自定义积分,选择对应充值活动获得对应积分[需开启积分活动有效]</span> class="bom">升数卡充值不支持自定义积分,选择对应充值活动获得对应积分</span>
</div> </div>
</div> </div>
<div style="display:flex;margin-left: 20px"> <div style="display:flex;margin-left: 20px">

View File

@ -8,40 +8,48 @@
</el-radio-group> </el-radio-group>
<div> <div>
<el-table ref="tables" v-loading="loading" :data="list"> <el-table ref="tables" v-loading="loading" :data="list">
<el-table-column align="center" prop="storeName" label="所属油站"/> <el-table-column align="center" prop="storeName" label="所属油站">
<el-table-column align="center" prop="cardFavorableName" label="优惠券名称"/>
<el-table-column align="center" prop="type" label="卡券类型">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.type == 0">油品券</el-tag> <span>{{store.name}}</span>
<el-tag v-if="scope.row.type == 1" type="success">商品券</el-tag>
<el-tag v-if="scope.row.type == 2" type="warning">通用券</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="fullDeduction" label="满减金额"/> <el-table-column align="center" prop="couponName" label="优惠券名称"/>
<el-table-column align="center" prop="discountAmount" label="券面额"/> <el-table-column align="center" prop="couponType" label="卡券类型">
<el-table-column align="center" prop="oilType" label="适用油品"> <!-- <template slot-scope="scope">-->
<!-- <el-tag v-if="scope.row.type == 0">油品券</el-tag>-->
<!-- <el-tag v-if="scope.row.type == 1" type="success">商品券</el-tag>-->
<!-- <el-tag v-if="scope.row.type == 2" type="warning">通用券</el-tag>-->
<!-- </template>-->
</el-table-column>
<el-table-column align="center" prop="couponAmount" label="优惠金额/参与次数">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getOilNames(oilNameList,scope.row.oilType) }}</span> <span>{{scope.row.couponAmount || 0}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="status" label="状态"> <el-table-column align="center" prop="couponContent" label="券面额/使用说明"/>
<!-- <el-table-column align="center" prop="oilType" label="适用油品">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ getOilNames(oilNameList,scope.row.oilType) }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" prop="useStatus" label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.status == 0">未使用</el-tag> <el-tag v-if="scope.row.useStatus == 0">未使用</el-tag>
<el-tag v-if="scope.row.status == 1" type="success">已使用</el-tag> <el-tag v-if="scope.row.useStatus == 1" type="success">已使用</el-tag>
<el-tag v-if="scope.row.status == 2" type="warning">已过期</el-tag> <el-tag v-if="scope.row.useStatus == 2" type="warning">已过期</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="卡券可用规则"> <!-- <el-table-column align="center" label="卡券可用规则">-->
<el-table-column align="center" prop="name" label="有效期"> <el-table-column align="center" prop="name" label="到期时间">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.startTime }}{{ scope.row.endTime }} {{ scope.row.endTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="availablePeriod" label="周期与时段"/> <!-- <el-table-column align="center" prop="availablePeriod" label="周期与时段"/>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column align="center" prop="createTime" label="领取时间"/> <!-- <el-table-column align="center" prop="createTime" label="领取时间"/>-->
<el-table-column align="center" prop="exchangeFrom" label="描述"/> <!-- <el-table-column align="center" prop="exchangeFrom" label="描述"/>-->
</el-table> </el-table>
<pagination <pagination
@ -55,8 +63,9 @@
</template> </template>
<script> <script>
import { getCardFavorableList } from "@/api/userInfoOrder.js"; import {getCardFavorableList, getCardFavorableLists} from "@/api/userInfoOrder.js";
import {oilNumbers} from "@/api/oilConfig/oilGuns"; import {oilNumbers} from "@/api/oilConfig/oilGuns";
import {ljStoreInfo} from "@/api/staff/store";
export default { export default {
props:["pUserId"], props:["pUserId"],
@ -68,11 +77,12 @@ export default {
list:[], list:[],
total:0, total:0,
queryParams:{ queryParams:{
status: 0, useStatus: 0,
page:1, page:1,
pageSize:10, pageSize:10,
}, },
oilNameList:[], oilNameList:[],
store:{},
} }
}, },
created() { created() {
@ -111,25 +121,30 @@ export default {
getList(){ getList(){
this.loading = true this.loading = true
this.queryParams.mtUserId = this.userId this.queryParams.id = this.userId
getCardFavorableList(this.queryParams).then(res=>{ getCardFavorableLists(this.queryParams).then(res=>{
if (res.code == 200) { if (res.code == 200) {
this.list = res.data.records this.list = res.data.records
this.total = res.data.total this.total = res.data.total
this.loading = false this.loading = false
this.getStore()
} }
}) })
}, },
getStore(){
ljStoreInfo().then(res => {
this.store = res.data
})
},
changeStatus() { changeStatus() {
if (this.cardList == 'notUse') { if (this.cardList == 'notUse') {
this.queryParams.status = 0 this.queryParams.useStatus = 0
} else if (this.cardList == 'used') { } else if (this.cardList == 'used') {
this.queryParams.status = 1 this.queryParams.useStatus = 1
} else if (this.cardList == 'expired') { } else if (this.cardList == 'expired') {
this.queryParams.status = 2 this.queryParams.useStatus = 2
} else { } else {
this.queryParams.status = '' this.queryParams.useStatus = ''
} }
this.getList() this.getList()
} }

View File

@ -149,7 +149,7 @@
<el-table-column type="index" width="50" align="center" label="序号"/> <el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="name" label="会员名称" align="center"> </el-table-column> <el-table-column prop="name" label="会员名称" align="center"> </el-table-column>
<el-table-column prop="mobile" label="会员手机号" align="center"> </el-table-column> <el-table-column prop="mobile" label="会员手机号" align="center"> </el-table-column>
<el-table-column prop="bidBalance" label="储值卡面值" align="center"> </el-table-column> <el-table-column prop="bidBalance" label="到账金额" align="center"> </el-table-column>
<el-table-column prop="rechargeBalance" label="储值卡实售金额" align="center"> </el-table-column> <el-table-column prop="rechargeBalance" label="储值卡实售金额" align="center"> </el-table-column>
<el-table-column prop="giftBalance" label="储值卡赠送金额" align="center"></el-table-column> <el-table-column prop="giftBalance" label="储值卡赠送金额" align="center"></el-table-column>
<el-table-column prop="paymentType" label="支付方式" align="center"> <el-table-column prop="paymentType" label="支付方式" align="center">
@ -351,13 +351,23 @@ export default {
return name; return name;
}, },
exportExcelVip() { exportExcelVip() {
exportExcelVipApi(this.queryParams).then(res=>{ let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
exportExcelVipApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
this.$download.saveAs(blob,'会员充值订单统计.xLsx') this.$download.saveAs(blob,'会员充值订单统计.xLsx')
}) })
}, },
getOrderStatistics () { getOrderStatistics () {
orderStatisticsApi().then(res=>{ let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
orderStatisticsApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
this.orderStatistics = res.data this.orderStatistics = res.data
}) })

View File

@ -222,6 +222,7 @@
<el-select v-model="form.notice"> <el-select v-model="form.notice">
<el-option <el-option
v-for="dict in dict.type.notice" v-for="dict in dict.type.notice"
v-if="dict.value!='zdyx'"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"

View File

@ -219,7 +219,7 @@
</el-card> </el-card>
<!-- 添加或修改对话框 --> <!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="60%" append-to-body> <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -311,11 +311,11 @@
</el-row> </el-row>
</div> </div>
<!-- 选择优惠券--> <!-- 选择优惠券-->
<div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('1')>-1 " > <div class="xh-box" v-if="form.ifRechargeCoupon == '1' && 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 class="box-bt"> <div >赠送卡券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()" >新增</el-button> </div>
<div style="margin: 10px 0px"> <div style="margin: 10px 0px">
<el-table <el-table
:data="form.tableDatas" :data="tableDatas1"
border border
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
@ -376,7 +376,7 @@
</div> </div>
</div> </div>
<!-- 选择兑换券--> <!-- 选择兑换券-->
<div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('2')>-1 " > <div class="xh-box" v-if="form.ifRechargeCoupon == '1' && form.activeGift && form.activeGift.indexOf('2')>-1 " >
<div class="box-bt"> <div >选择兑换券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistExchange()" >新增</el-button> </div> <div class="box-bt"> <div >选择兑换券</div> <el-button type="primary" icon="el-icon-plus" @click="getlistExchange()" >新增</el-button> </div>
<div style="margin: 10px 0px"> <div style="margin: 10px 0px">
@ -757,6 +757,7 @@ export default {
data() { data() {
return { return {
tableDatas:[],// tableDatas:[],//
tableDatas1:[],//
tableDatadh:[],// tableDatadh:[],//
// //
youhuiquan:{ youhuiquan:{
@ -844,7 +845,8 @@ export default {
form: { id: '', grade: "", name: '',gasoline:1,dieselOil:1,naturalGas:1,preferential:'自定义优惠', form: { id: '', grade: "", name: '',gasoline:1,dieselOil:1,naturalGas:1,preferential:'自定义优惠',
gasolineDiscount:'无优惠',dieselDiscount:'无优惠',naturalGasDiscount:'无优惠',promotionGroup:'', gasolineDiscount:'无优惠',dieselDiscount:'无优惠',naturalGasDiscount:'无优惠',promotionGroup:'',
// catchCondition: '', userPrivilege: '', catchType: '', catchValue: '', validDay: '',discount: '', speedPoint: '', // catchCondition: '', userPrivilege: '', catchType: '', catchValue: '', validDay: '',discount: '', speedPoint: '',
status: 'qy',tableDatas:[] }, status: 'qy',
tableDatas:[], },
// //
queryParams: { queryParams: {
page: 1, page: 1,
@ -940,10 +942,7 @@ export default {
this.pddhidlist.push(row.id) this.pddhidlist.push(row.id)
console.log(row) console.log(row)
let data ={ let data ={
activeGift: 2, // 01 2. 3 4. activeGift: 2, //1 2
goodsIds: "", //id
goodsName:"" , //
goodsTotal: "", //
vouchersId:row.id, //id vouchersId:row.id, //id
giftCardName:row.name, // giftCardName:row.name, //
giftCardType: row.type, // giftCardType: row.type, //
@ -970,10 +969,7 @@ export default {
this.pdidlist.push(row.id) this.pdidlist.push(row.id)
let data ={ let data ={
activeGift: 1, // 01 2. 3 4. activeGift: 1, //1 2
goodsIds: "", //id
goodsName:"" , //
goodsTotal: "", //
vouchersId:row.id, //id vouchersId:row.id, //id
giftCardName:row.name, // giftCardName:row.name, //
giftCardType: row.type, // giftCardType: row.type, //
@ -986,23 +982,23 @@ export default {
giftCardTotal: 1// giftCardTotal: 1//
} }
// this.form.tableDatas.push(data) this.tableDatas1.push(data)
this.$message.success("新增成功") this.$message.success("新增成功")
}, },
// //
deletedata(row){ deletedata(row){
if(this.form.tableDatas&&this.form.tableDatas.length>0){ if(this.tableDatas1&&this.tableDatas1.length>0){
let delIdx=-1; let delIdx=-1;
for ( let item of this.form.tableDatas) { for ( let item of this.tableDatas1) {
delIdx++; delIdx++;
if (item.id===row.id){ if (item.id===row.id){
break break
} }
} }
this.pdidlist.splice(delIdx,1); this.pdidlist.splice(delIdx,1);
this.form.tableDatas.splice(delIdx,1); this.tableDatas1.splice(delIdx,1);
} }
@ -1224,6 +1220,11 @@ export default {
this.form.dieselRule = JSON.stringify(this.dieselPreferential) this.form.dieselRule = JSON.stringify(this.dieselPreferential)
this.form.naturalGasRule = JSON.stringify(this.naturalGasPreferential) this.form.naturalGasRule = JSON.stringify(this.naturalGasPreferential)
this.form.activeGift = this.form.activeGift.toString() this.form.activeGift = this.form.activeGift.toString()
if (this.form.ifRechargeCoupon == 1){
this.form.mtUserGradeChildList = this.tableDatas.concat(this.tableDatas1);
}else {
this.form.mtUserGradeChildList = []
}
if (this.form.id) { if (this.form.id) {
updateUserGrade(this.form).then(response => { updateUserGrade(this.form).then(response => {
if (response.data==1) { if (response.data==1) {
@ -1265,6 +1266,8 @@ export default {
let _this = this; let _this = this;
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
this.tableDatas1 = []
this.tableDatas = []
getUserGrade(id).then(response => { getUserGrade(id).then(response => {
_this.form = response.data; _this.form = response.data;
this.gasolinePreferential = JSON.parse(this.form.gasolineRule) this.gasolinePreferential = JSON.parse(this.form.gasolineRule)
@ -1275,6 +1278,16 @@ export default {
}else { }else {
_this.form.activeGift = [] _this.form.activeGift = []
} }
if (response.data.mtUserGradeChildList.length>0){
response.data.mtUserGradeChildList.forEach(item => {
if (item.activeGift == '1'){
this.tableDatas1.push(item)
}
if (item.activeGift == '2'){
this.tableDatas.push(item)
}
})
}
this.open = true; this.open = true;
this.title = "编辑会员等级"; this.title = "编辑会员等级";
}); });
@ -1304,4 +1317,11 @@ export default {
.card{ .card{
margin-top: 15px; margin-top: 15px;
} }
.box-bt{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 18px;
}
</style> </style>

View File

@ -134,5 +134,20 @@ public class CardFavorableController extends BaseController {
Page page = new Page(pageNo, pageSize); Page page = new Page(pageNo, pageSize);
return getSuccessResult(this.cardFavorableService.selectAllByCondition(page,cardFavorableDTOS)); return getSuccessResult(this.cardFavorableService.selectAllByCondition(page,cardFavorableDTOS));
} }
/**
*查询我的卡券接口(小程序端)
* @param pageNo
* @param pageSize
* @param cardFavorableDTOS
* @return
*/
@GetMapping("PC")
public ResponseObject selectAllByConditionPC(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("cardFuelDiesel") CardFavorableDTOS cardFavorableDTOS) {
Page page = new Page(pageNo, pageSize);
return getSuccessResult(this.cardFavorableService.selectAllByConditionPC(page,cardFavorableDTOS));
}
} }

View File

@ -91,51 +91,64 @@
card_favorables.couponContent, card_favorables.couponContent,
card_favorables.cardRecordId, card_favorables.cardRecordId,
card_favorables.endTime, card_favorables.endTime,
card_favorables.useStatus,
card_favorables.exclusiveFunction card_favorables.exclusiveFunction
from from
(SELECT (SELECT
'优惠券' AS couponType, '优惠券' AS couponType,
cf.NAME couponName ,cf.id id,cf.discount_amount couponAmount,cf.satisfied_amount couponContent,cfr.id cardRecordId, cfr.end_time endTime, cf.exclusive_function exclusiveFunction cf.NAME couponName ,cf.id id,cf.discount_amount couponAmount,cf.satisfied_amount couponContent,
cfr.id cardRecordId, cfr.end_time endTime, cf.exclusive_function exclusiveFunction,cfr.status useStatus
FROM FROM
card_favorable cf card_favorable cf
LEFT JOIN card_favorable_record cfr ON cf.id = cfr.card_favorable_id LEFT JOIN card_favorable_record cfr ON cf.id = cfr.card_favorable_id
WHERE WHERE
cfr.mt_user_id = #{cardFavorableDTOS.id} cfr.mt_user_id = #{cardFavorableDTOS.id}
<if test="cardFavorableDTOS.useStatus!=null and cardFavorableDTOS.useStatus != ''">
and cfr.status = #{cardFavorableDTOS.useStatus} and cfr.status = #{cardFavorableDTOS.useStatus}
</if>
and cfr.store_id = #{cardFavorableDTOS.storeId} and cfr.store_id = #{cardFavorableDTOS.storeId}
and cf.type != 1 UNION ALL and cf.type != 1 UNION ALL
SELECT SELECT
'兑换券' AS couponType, '兑换券' AS couponType,
ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent,cer.id cardRecordId, cer.out_time endTime, ce.qr_code_link exclusiveFunction ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent,cer.id cardRecordId,
cer.out_time endTime, ce.qr_code_link exclusiveFunction,cer.status useStatus
FROM FROM
card_exchange_record cer card_exchange_record cer
LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id
WHERE WHERE
cer.mt_user_id = #{cardFavorableDTOS.id} cer.mt_user_id = #{cardFavorableDTOS.id}
and ce.type = 0 and ce.type = 0
<if test="cardFavorableDTOS.useStatus!=null and cardFavorableDTOS.useStatus != ''">
and cer.status = #{cardFavorableDTOS.useStatus} and cer.status = #{cardFavorableDTOS.useStatus}
</if>
and cer.store_id = #{cardFavorableDTOS.storeId} UNION ALL and cer.store_id = #{cardFavorableDTOS.storeId} UNION ALL
SELECT SELECT
'洗车券' AS couponType, '洗车券' AS couponType,
ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent,cer.id cardRecordId, cer.out_time endTime, ce.qr_code_link exclusiveFunction ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent,
cer.id cardRecordId, cer.out_time endTime, ce.qr_code_link exclusiveFunction,cer.status useStatus
FROM FROM
card_exchange_record cer card_exchange_record cer
LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id
WHERE WHERE
cer.mt_user_id = #{cardFavorableDTOS.id} cer.mt_user_id = #{cardFavorableDTOS.id}
and ce.type = 1 and ce.type = 1
<if test="cardFavorableDTOS.useStatus!=null and cardFavorableDTOS.useStatus != ''">
and cer.status = #{cardFavorableDTOS.useStatus} and cer.status = #{cardFavorableDTOS.useStatus}
</if>
and cer.store_id = #{cardFavorableDTOS.storeId} UNION ALL and cer.store_id = #{cardFavorableDTOS.storeId} UNION ALL
SELECT SELECT
'洗车卡' AS couponType, '洗车卡' AS couponType,
ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent,cer.id cardRecordId, cer.out_time endTime, ce.qr_code_link exclusiveFunction ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent,cer.id cardRecordId,
cer.out_time endTime, ce.qr_code_link exclusiveFunction,cer.status useStatus
FROM FROM
card_exchange_record cer card_exchange_record cer
LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id
WHERE WHERE
cer.mt_user_id = #{cardFavorableDTOS.id} cer.mt_user_id = #{cardFavorableDTOS.id}
and ce.type = 2 and ce.type = 2
<if test="cardFavorableDTOS.useStatus!=null and cardFavorableDTOS.useStatus != ''">
and cer.status = #{cardFavorableDTOS.useStatus} and cer.status = #{cardFavorableDTOS.useStatus}
</if>
and cer.store_id = #{cardFavorableDTOS.storeId}) AS card_favorables and cer.store_id = #{cardFavorableDTOS.storeId}) AS card_favorables
<where> <where>
<if test="cardFavorableDTOS.couponType != null"> <if test="cardFavorableDTOS.couponType != null">

View File

@ -62,5 +62,13 @@ public interface CardFavorableService extends IService<CardFavorable> {
* @return * @return
*/ */
IPage selectAllByCondition(Page page, CardFavorableDTOS cardFavorableDTOS); IPage selectAllByCondition(Page page, CardFavorableDTOS cardFavorableDTOS);
/**
* 查询优惠券接口(PC)
* @param page
* @param cardFavorableDTOS
* @return
*/
IPage selectAllByConditionPC(Page page, CardFavorableDTOS cardFavorableDTOS);
} }

View File

@ -233,5 +233,26 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
//couponVOS.setRecords(collect); //couponVOS.setRecords(collect);
return couponVOS; return couponVOS;
} }
@Override
public IPage selectAllByConditionPC(Page page, CardFavorableDTOS cardFavorableDTOS) {
//获取登录用户id
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
cardFavorableDTOS.setStoreId(nowAccountInfo.getStoreId());
IPage<CouponVO> couponVOS = cardFavorableRecordMapper.selectAllByCondition(page,cardFavorableDTOS);
List<CouponVO> records = couponVOS.getRecords();
//有效期
List<CouponVO> collect = records.stream().filter(s -> s.getEndTime().getTime() < System.currentTimeMillis()).collect(Collectors.toList());
if (ObjectUtils.isNotEmpty(collect)){
for (CouponVO couponVO : collect) {
CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
cardFavorableRecord.setId(couponVO.getCardRecordId());
cardFavorableRecord.setStatus("2");
cardFavorableRecordMapper.updateById(cardFavorableRecord);
}
}
//couponVOS.setRecords(collect);
return couponVOS;
}
} }

View File

@ -262,7 +262,24 @@
COUNT(CASE WHEN payment_type = 'ALIPAY' THEN 0 END) AS alipay, -- 支付宝 COUNT(CASE WHEN payment_type = 'ALIPAY' THEN 0 END) AS alipay, -- 支付宝
COUNT(CASE WHEN payment_type = 'CASH' THEN 0 END) AS cash -- 现金 COUNT(CASE WHEN payment_type = 'CASH' THEN 0 END) AS cash -- 现金
from card_value_record from card_value_record
where store_id = #{cardValueRecord.storeId} <where>
store_id = #{cardValueRecord.storeId}
<if test="cardValueRecord.mtStaffId != null and cardValueRecord.mtStaffId != ''">
and mt_staff_id = #{cardValueRecord.mtStaffId}
</if>
<if test="cardValueRecord.paymentType != null and cardValueRecord.paymentType != ''">
and payment_type = #{cardValueRecord.paymentType}
</if>
<if test="cardValueRecord.mobile != null and cardValueRecord.mobile != ''">
and mobile like concat('%', #{cardValueRecord.mobile}, '%')
</if>
<if test="cardValueRecord.params.beginTime != null and cardValueRecord.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d') &gt;= date_format(#{cardValueRecord.params.beginTime},'%y%m%d')
</if>
<if test="cardValueRecord.params.endTime != null and cardValueRecord.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(create_time,'%y%m%d') &lt;= date_format(#{cardValueRecord.params.endTime},'%y%m%d')
</if>
</where>
</select> </select>
<select id="selectCardValueRecordList" <select id="selectCardValueRecordList"
resultType="com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord"> resultType="com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord">

View File

@ -7,8 +7,10 @@ import com.fuint.api.fuyou.entity.ReturnParameter;
import com.fuint.business.integral.entity.IntegralDetail; import com.fuint.business.integral.entity.IntegralDetail;
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO; import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord; import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
import com.fuint.business.member.entity.LJStaff;
import com.fuint.business.order.entity.CashierOrder; import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.petrolStationManagement.entity.OilGun; import com.fuint.business.petrolStationManagement.entity.OilGun;
import com.fuint.business.userManager.vo.LJUserVo;
import io.lettuce.core.dynamic.annotation.Param; import io.lettuce.core.dynamic.annotation.Param;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -60,6 +62,12 @@ public interface CardValueRecordService extends IService<CardValueRecord> {
void export(HttpServletResponse response, CardValueRecord cardValueRecord); void export(HttpServletResponse response, CardValueRecord cardValueRecord);
void rechargeFinallDeal(String orderNo); void rechargeFinallDeal(String orderNo);
/**
* 会员等级优惠送券
* @param userId
*/
void giveCoupon(Integer userId, Integer storeId, LJUserVo ljUserVos, LJStaff ljStaff);
/** /**
* 根据用户id查询当前的储值卡信息 * 根据用户id查询当前的储值卡信息
* @return * @return

View File

@ -27,6 +27,7 @@ import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableVO;
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO; import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild;
import com.fuint.business.marketingActivity.cardValue.mapper.CardValueChildMapper; import com.fuint.business.marketingActivity.cardValue.mapper.CardValueChildMapper;
@ -50,8 +51,10 @@ import com.fuint.business.order.service.CardBalanceChangeService;
import com.fuint.business.order.service.GrowthValueChangeService; import com.fuint.business.order.service.GrowthValueChangeService;
import com.fuint.business.storeInformation.entity.LJStore; import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService; import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.business.userManager.entity.MtUserGradeChild;
import com.fuint.business.userManager.entity.UserBalance; import com.fuint.business.userManager.entity.UserBalance;
import com.fuint.business.userManager.mapper.LJUserMapper; import com.fuint.business.userManager.mapper.LJUserMapper;
import com.fuint.business.userManager.service.MtUserGradeChildService;
import com.fuint.business.userManager.service.UserBalanceService; import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.business.userManager.vo.LJUserVo; import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.common.dto.AccountInfo; import com.fuint.common.dto.AccountInfo;
@ -126,6 +129,9 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
private ILJStoreService storeService; private ILJStoreService storeService;
@Resource @Resource
private CommissionRecordMapper commissionRecordMapper; private CommissionRecordMapper commissionRecordMapper;
@Resource
private MtUserGradeChildService userGradeChildService;
/** /**
* 储值卡充值新增 * 储值卡充值新增
* @param cardValueRecordDTO * @param cardValueRecordDTO
@ -545,6 +551,11 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
} }
//会员等级充值送券
giveCoupon(cardValueRecord.getMtUserId(),cardValueRecord.getStoreId(),ljUserVos,ljStaff);
// 修改订单的处理状态 (避免二次执行) // 修改订单的处理状态 (避免二次执行)
CardValueRecord updateCardValueRecord = new CardValueRecord(); CardValueRecord updateCardValueRecord = new CardValueRecord();
updateCardValueRecord.setId(id); updateCardValueRecord.setId(id);
@ -900,6 +911,11 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
} }
} }
} }
//会员等级充值送券
giveCoupon(cardValueOrders.getMtUserId(),cardValueOrders.getStoreId(),ljUserVo,ljStaff);
//生成充值记录 //生成充值记录
cardValueRecord.setMtUserId(cardValueOrders.getMtUserId()); cardValueRecord.setMtUserId(cardValueOrders.getMtUserId());
cardValueRecord.setName(cardValueOrders.getName()); cardValueRecord.setName(cardValueOrders.getName());
@ -929,6 +945,47 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
save(cardValueRecord); save(cardValueRecord);
} }
@Override
public void giveCoupon(Integer userId,Integer storeId,LJUserVo ljUserVos,LJStaff ljStaff) {
List<MtUserGradeChild> mtUserGradeChildren = userGradeChildService.selectListByUserId(userId,storeId);
if (CollectionUtils.isNotEmpty(mtUserGradeChildren)) {
for (MtUserGradeChild mtUserGradeChild : mtUserGradeChildren) {
if ("1".equals(mtUserGradeChild.getActiveGift())){
//优惠券
CardFavorableRecord cardFavorableRecord = new CardFavorableRecord();
cardFavorableRecord.setCardFavorableId(mtUserGradeChild.getVouchersId());
cardFavorableRecord.setStoreId(storeId);
cardFavorableRecord.setMtUserId(userId);
cardFavorableRecord.setName(ljUserVos.getName());
cardFavorableRecord.setMobile(ljUserVos.getMobile());
cardFavorableRecord.setStatus("0");
cardFavorableRecord.setExchangeFrom("储值卡赠送");
cardFavorableRecordService.addCardFavorableRecord(cardFavorableRecord);
}else if("2".equals(mtUserGradeChild.getActiveGift())) {
//兑换券
CardExchangeRecord cardExchangeRecord = new CardExchangeRecord();
cardExchangeRecord.setCardExchangeId(mtUserGradeChild.getVouchersId());
cardExchangeRecord.setStoreId(storeId);
cardExchangeRecord.setMtUserId(userId);
cardExchangeRecord.setName(ljUserVos.getName());
cardExchangeRecord.setMobile(ljUserVos.getMobile());
cardExchangeRecord.setPhoto(ljUserVos.getAvatar());
if (ObjectUtil.isNotEmpty(ljStaff)) {
cardExchangeRecord.setMtStaffId(ljStaff.getId());
cardExchangeRecord.setRealName(ljStaff.getRealName());
cardExchangeRecord.setStaffMobile(ljStaff.getMobile());
}
cardExchangeRecord.setStatus("0");
cardExchangeRecord.setExchangeFrom("储值卡赠送");
cardExchangeRecordService.addCardExchangeRecord(cardExchangeRecord);
}
}
}
}
@Override @Override
public CardValueRecord selectCardValueRecordByUserId(Integer storeId,Integer userId) { public CardValueRecord selectCardValueRecordByUserId(Integer storeId,Integer userId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();

View File

@ -90,6 +90,7 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
queryWrapper.eq("status","qy"); queryWrapper.eq("status","qy");
queryWrapper.eq("role_id","15"); queryWrapper.eq("role_id","15");
queryWrapper.eq("if_delete","0"); queryWrapper.eq("if_delete","0");
queryWrapper.eq("is_refuel","xs");
List list = baseMapper.selectList(queryWrapper); List list = baseMapper.selectList(queryWrapper);
return list; return list;
} }
@ -101,6 +102,7 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
queryWrapper.eq("status","qy"); queryWrapper.eq("status","qy");
queryWrapper.eq("role_id","15"); queryWrapper.eq("role_id","15");
queryWrapper.eq("if_delete","0"); queryWrapper.eq("if_delete","0");
queryWrapper.eq("is_refuel","xs");
List list = baseMapper.selectList(queryWrapper); List list = baseMapper.selectList(queryWrapper);
return list; return list;
} }

View File

@ -0,0 +1,27 @@
package com.fuint.business.userManager.controller;
import com.fuint.business.userManager.service.MtUserGradeChildService;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/business/userManager/userGradeChild")
public class MtUserGradeChildController extends BaseController {
@Autowired
private MtUserGradeChildService userGradeChildService;
/**
* 根据会员id查询子表列表信息
* @param userId
* @return
*/
// @GetMapping("/{userId}")
// public ResponseObject getUserGradeChildList(@PathVariable Integer userId){
// return getSuccessResult(userGradeChildService.selectListByUserId(userId));
// }
}

View File

@ -99,4 +99,7 @@ public class LJUserGrade extends BaseEntity implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private List<JSONObject> naturalGasRuleList; private List<JSONObject> naturalGasRuleList;
@TableField(exist = false)
private List<MtUserGradeChild> MtUserGradeChildList;
} }

View File

@ -0,0 +1,83 @@
package com.fuint.business.userManager.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
/**
* 会员等级充值送券信息的子表(MtUserGradeChild)实体类
*
* @author makejava
* @since 2024-02-22 09:58:35
*/
@Data
@TableName("mt_user_grade_child")
@ApiModel(value = "MtUserGradeChild对象", description = "会员等级充值送券信息的子表")
public class MtUserGradeChild extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("自增ID")
@TableId(value = "ID", type = IdType.AUTO)
/**
* 主键
*/
private Integer id;
/**
* 会员等级id
*/
private Integer userGradeId;
/**
* 充值赠送类型1赠送优惠券 2赠送兑换券
*/
private String activeGift;
/**
* 券id
*/
private Integer vouchersId;
/**
* 赠送卡券名称
*/
private String giftCardName;
/**
* 券类型
*/
private String giftCardType;
/**
* 券详情
*/
private String giftCardDetail;
/**
* 券有效期
*/
private Integer giftCardTime;
/**
* 券数量
*/
private Integer giftCardTotal;
/**
* 有效期0
*/
private Integer validityZero;
/**
* 有效期1
*/
private Integer validityOne;
/**
* 有效期2
*/
private Integer validityTwo;
/**
* 生效日期类型 0 12
*/
private String timeType;
}

View File

@ -0,0 +1,7 @@
package com.fuint.business.userManager.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.userManager.entity.MtUserGradeChild;
public interface MtUserGradeChildMapper extends BaseMapper<MtUserGradeChild> {
}

View File

@ -156,10 +156,10 @@
and mub.card_balance != 0 and mub.card_balance != 0
</if> </if>
<if test="user.params.beginTime != null and user.params.beginTime != ''"><!-- 开始时间检索 --> <if test="user.params.beginTime != null and user.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(mu.create_time,'%y%m%d') &gt;= date_format(#{user.params.beginTime},'%y%m%d') and date_format(mub.create_time,'%y%m%d') &gt;= date_format(#{user.params.beginTime},'%y%m%d')
</if> </if>
<if test="user.params.endTime != null and user.params.endTime != ''"><!-- 结束时间检索 --> <if test="user.params.endTime != null and user.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(mu.create_time,'%y%m%d') &lt;= date_format(#{user.params.endTime},'%y%m%d') and date_format(mub.create_time,'%y%m%d') &lt;= date_format(#{user.params.endTime},'%y%m%d')
</if> </if>
</where> </where>
</select> </select>
@ -168,7 +168,7 @@
<select id="selectSumByStore" resultType="java.lang.Double" parameterType="int"> <select id="selectSumByStore" resultType="java.lang.Double" parameterType="int">
select sum(${sumValue}) from select sum(${sumValue}) from
(select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money, (select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money,
mub.second_card,mub.fixing_level,mub.chain_store_id mub.second_card,mub.fixing_level,mub.chain_store_id,mub.create_time balCreateTime
FROM mt_user mu FROM mt_user mu
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id) t LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id) t
<where> <where>
@ -200,10 +200,10 @@
and t.card_balance != 0 and t.card_balance != 0
</if> </if>
<if test="user.params.beginTime != null and user.params.beginTime != ''"><!-- 开始时间检索 --> <if test="user.params.beginTime != null and user.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(t.create_time,'%y%m%d') &gt;= date_format(#{user.params.beginTime},'%y%m%d') and date_format(t.balCreateTime,'%y%m%d') &gt;= date_format(#{user.params.beginTime},'%y%m%d')
</if> </if>
<if test="user.params.endTime != null and user.params.endTime != ''"><!-- 结束时间检索 --> <if test="user.params.endTime != null and user.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(t.create_time,'%y%m%d') &lt;= date_format(#{user.params.endTime},'%y%m%d') and date_format(t.balCreateTime,'%y%m%d') &lt;= date_format(#{user.params.endTime},'%y%m%d')
</if> </if>
</where> </where>
</select> </select>

View File

@ -0,0 +1,35 @@
package com.fuint.business.userManager.service;
import com.fuint.business.userManager.entity.MtUserGradeChild;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Transactional
public interface MtUserGradeChildService {
/**
* 根据会员等级id查询子表信息
* @param gradeId
* @return
*/
List<MtUserGradeChild> selectListByGradeId(Integer gradeId);
/**
* 根据会员id查询子表信息
* @param userId
* @return
*/
List<MtUserGradeChild> selectListByUserId(Integer userId,Integer storeId);
/**
* 根据会员等级id删除子表信息
* @param gradeId
*/
void deleteMtUserGradeChildByGradeId(Integer gradeId);
/**
* 添加子表信息
* @param mtUserGradeChild
*/
void insertMtUserGradeChild(MtUserGradeChild mtUserGradeChild);
}

View File

@ -1,5 +1,6 @@
package com.fuint.business.userManager.service.impl; package com.fuint.business.userManager.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
@ -10,15 +11,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.storeInformation.entity.LJStore; import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService; import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.business.userManager.entity.CertifiedMember; import com.fuint.business.userManager.entity.*;
import com.fuint.business.userManager.entity.ChainStoreConfig;
import com.fuint.business.userManager.entity.FixingLevel;
import com.fuint.business.userManager.entity.LJUserGrade;
import com.fuint.business.userManager.mapper.LJUserGradeMapper; import com.fuint.business.userManager.mapper.LJUserGradeMapper;
import com.fuint.business.userManager.service.CertifiedMemberService; import com.fuint.business.userManager.service.*;
import com.fuint.business.userManager.service.ChainStoreConfigService;
import com.fuint.business.userManager.service.FixingLevelService;
import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.common.dto.AccountInfo; import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.StringUtils; import com.fuint.common.util.StringUtils;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
@ -36,6 +31,8 @@ import java.util.Map;
public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUserGrade> implements LJUserGradeService { public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUserGrade> implements LJUserGradeService {
@Autowired @Autowired
private ILJStoreService storeService; private ILJStoreService storeService;
@Autowired
private MtUserGradeChildService userGradeChildService;
@Override @Override
public IPage<LJUserGrade> selectUserGradeList(Page page, LJUserGrade userGrade) { public IPage<LJUserGrade> selectUserGradeList(Page page, LJUserGrade userGrade) {
@ -54,6 +51,8 @@ public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUse
if (StringUtils.isNotEmpty(record.getNaturalGasRule())){ if (StringUtils.isNotEmpty(record.getNaturalGasRule())){
record.setNaturalGasRuleList(JSONArray.parseArray(record.getNaturalGasRule(), JSONObject.class)); record.setNaturalGasRuleList(JSONArray.parseArray(record.getNaturalGasRule(), JSONObject.class));
} }
List<MtUserGradeChild> mtUserGradeChildren = userGradeChildService.selectListByGradeId(record.getId());
record.setMtUserGradeChildList(mtUserGradeChildren);
} }
return ljUserGradeIPage; return ljUserGradeIPage;
} }
@ -86,7 +85,10 @@ public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUse
@Override @Override
public LJUserGrade selectUserGradeById(int id) { public LJUserGrade selectUserGradeById(int id) {
return baseMapper.selectById(id); LJUserGrade ljUserGrade = baseMapper.selectById(id);
List<MtUserGradeChild> mtUserGradeChildren = userGradeChildService.selectListByGradeId(ljUserGrade.getId());
ljUserGrade.setMtUserGradeChildList(mtUserGradeChildren);
return ljUserGrade;
} }
@Override @Override
@ -266,6 +268,17 @@ public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUse
if (flag) { if (flag) {
return row; return row;
} }
List<MtUserGradeChild> mtUserGradeChildList = userGrade.getMtUserGradeChildList();
// 更新子表数据
userGradeChildService.deleteMtUserGradeChildByGradeId(userGrade.getId());
if (CollectionUtil.isNotEmpty(mtUserGradeChildList)){
for (MtUserGradeChild mtUserGradeChild : mtUserGradeChildList) {
mtUserGradeChild.setUserGradeId(userGrade.getId());
userGradeChildService.insertMtUserGradeChild(mtUserGradeChild);
}
}
row = baseMapper.updateById(userGrade); row = baseMapper.updateById(userGrade);
return row; return row;
} }

View File

@ -0,0 +1,49 @@
package com.fuint.business.userManager.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.userManager.entity.MtUserGradeChild;
import com.fuint.business.userManager.mapper.MtUserGradeChildMapper;
import com.fuint.business.userManager.service.LJUserService;
import com.fuint.business.userManager.service.MtUserGradeChildService;
import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.common.util.TokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class MtUserGradeChildServiceImpl extends ServiceImpl<MtUserGradeChildMapper,MtUserGradeChild> implements MtUserGradeChildService {
@Autowired
@Lazy
private LJUserService userService;
@Override
public List<MtUserGradeChild> selectListByGradeId(Integer gradeId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_grade_id",gradeId);
return baseMapper.selectList(queryWrapper);
}
@Override
public List<MtUserGradeChild> selectListByUserId(Integer userId,Integer storeId) {
LJUserVo userVo = userService.queryUserById(userId, storeId);
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_grade_id",userVo.getGradeId());
return baseMapper.selectList(queryWrapper);
}
@Override
public void deleteMtUserGradeChildByGradeId(Integer gradeId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_grade_id",gradeId);
baseMapper.delete(queryWrapper);
}
@Override
public void insertMtUserGradeChild(MtUserGradeChild mtUserGradeChild) {
baseMapper.insert(mtUserGradeChild);
}
}

View File

@ -54,4 +54,12 @@ export function getCardFavorableList(query) {
params: query params: query
}) })
} }
// 卡券列表
export function getCardFavorableLists(query) {
return request({
url: 'business/marketingActivity/cardFavorable/PC',
method: 'get',
params: query
})
}
// 成长值记录 // 成长值记录

View File

@ -186,8 +186,8 @@
<div class="bule">{{ seekZero.toFixed(2) }}</div> <div class="bule">{{ seekZero.toFixed(2) }}</div>
</div> </div>
<div class="th-box"> <div class="th-box">
<div @click="dialogVisible = true">加油员</div> <div @click="getStaffList">加油员</div>
<div style="cursor: pointer;color: crimson" @click="dialogVisible = true" >{{ staff.realName }}</div> <div style="cursor: pointer;color: crimson" @click="getStaffList" >{{ staff.realName }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -590,11 +590,7 @@
<el-tabs v-model="activeRecharge" type="card" @tab-click="handleClick"> <el-tabs v-model="activeRecharge" type="card" @tab-click="handleClick">
<el-tab-pane label="储值卡" name="balance"> <el-tab-pane label="储值卡" name="balance">
<div style="font-size: 14px"> <div style="font-size: 14px">
<el-row>
<el-col :span="1.5">
<div style="font-size: 14px;height: 50px;line-height: 50px">充值金额</div> <div style="font-size: 14px;height: 50px;line-height: 50px">充值金额</div>
</el-col>
<el-col :span="22">
<div v-if="cardValueList.length>0" <div v-if="cardValueList.length>0"
style="display: flex;margin: 13px 5px;box-sizing: border-box;flex-wrap: wrap; "> style="display: flex;margin: 13px 5px;box-sizing: border-box;flex-wrap: wrap; ">
<div class="mon" <div class="mon"
@ -602,7 +598,7 @@
:class="activeKey === index ? 'select2' : ''" :class="activeKey === index ? 'select2' : ''"
@click="rechargeCard(index)"> @click="rechargeCard(index)">
<div class="top1"><span class="amount1">{{ item.rechargeBalance }}</span></div> <div class="top1"><span class="amount1">{{ item.rechargeBalance }}</span></div>
<div>赠送<span class="amount">{{ item.giftBalance }}</span></div> <div>赠送<span style="color: #00afff">{{ item.giftBalance }}</span></div>
</div> </div>
</div> </div>
@ -619,11 +615,9 @@
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
</div> </div>
</el-col> <!-- <el-row>-->
</el-row> <!-- <el-col :span="24">-->
<el-row> <div style="display: flex;justify-content: space-between;margin: 20px 0;">
<el-col :span="24">
<div style="display: flex;justify-content: space-between;margin: 20px 0;height: 200px">
<div class="jine"> <div class="jine">
<div class="zeng">赠送金额</div> <div class="zeng">赠送金额</div>
<div> <div>
@ -632,7 +626,7 @@
disabled> disabled>
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
<span class="bom">赠送金额 仅自定义金额模式下可手动输入赠送活动充值赠送金额不可手动更改</span> <span class="bom">赠送金额 自定义金额模式下将按照距离自定义金额最近的充值活动信息进行赠送</span>
</div> </div>
</div> </div>
@ -645,34 +639,34 @@
<template slot="append">积分</template> <template slot="append">积分</template>
</el-input> </el-input>
<span <span
class="bom">赠送积分 仅自定义金额模式下可手动输入,活动充值赠送积分不可手动更改[需开启积分活动有效]</span> class="bom">赠送积分 自定义金额模式下将按照距离自定义金额最近的充值活动信息进行赠送</span>
</div> </div>
</div> </div>
<div class="jine"> <div class="jine">
<div class="zeng" style="width: 100px;">赠成长值</div> <div class="zeng">赠成长值</div>
<div> <div>
<el-input placeholder="0" <el-input placeholder="0"
v-model="cardValueForm.growthValue" v-model="cardValueForm.growthValue"
disabled> disabled>
<template slot="append">成长值</template> <template slot="append">成长值</template>
</el-input> </el-input>
<!-- <span class="bom">赠送加油金金额 仅自定义金额模式下可手动输入赠送活动充值赠送金额不可手动更改</span> --> <span class="bom">赠送成长值 自定义金额模式下将按照距离自定义金额最近的充值活动信息进行赠送</span>
</div> </div>
</div> </div>
<div class="jine"> <div class="jine">
<div class="zeng">提成员工</div> <div class="zeng" style="width: 30%">提成员工</div>
<div> <div>
<el-input :readonly="true" placeholder="请选择提成员工" v-model="cardValueForm.realName"> <el-input :readonly="true" placeholder="请选择提成员工" v-model="cardValueForm.realName">
<el-button slot="append" @click="openStaff = true">选择员工</el-button> <el-button slot="append" @click="openStaff = true">选择员工</el-button>
</el-input> </el-input>
<span class="bom">仅系统储值档次支持提成员工选择自定义充值金额匹配低一档次</span> <!-- <span class="bom">仅系统储值档次支持提成员工选择自定义充值金额匹配低一档次</span>-->
</div> </div>
</div> </div>
</div> </div>
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div style="display: flex;margin-top: 20px"> <div style="display: flex;margin-top: 20px">
@ -733,15 +727,15 @@
:class="activeKey === index ? 'select2' : ''" :class="activeKey === index ? 'select2' : ''"
@click="recharge(index)"> @click="recharge(index)">
<div class="top1"><span class="amount1">{{ item.incomeLitres }}</span>L</div> <div class="top1"><span class="amount1">{{ item.incomeLitres }}</span>L</div>
<div>售价<span class="amount">{{ item.rechargeBalance }}</span></div> <div style="font-size: 14px">售价<span style="color: #00afff;">{{ item.rechargeBalance }}</span></div>
<div>锁价<span class="amount">{{ item.lockupPrice }}</span>/</div> <div style="font-size: 14px">锁价<span style="color: #00afff;">{{ item.lockupPrice }}</span>/</div>
</div> </div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <!-- <el-row>-->
<el-col :span="24"> <!-- <el-col :span="24">-->
<div style="display: flex;margin: 20px 0"> <div style="display: flex;margin-top: 60px">
<div class="jine"> <div class="jine">
<div class="zeng">赠送积分</div> <div class="zeng">赠送积分</div>
<div> <div>
@ -749,7 +743,7 @@
<template slot="append">积分</template> <template slot="append">积分</template>
</el-input> </el-input>
<span <span
class="bom">升数卡充值不支持自定义积分,选择对应充值活动获得对应积分[需开启积分活动有效]</span> class="bom">升数卡充值不支持自定义积分,选择对应充值活动获得对应积分</span>
</div> </div>
</div> </div>
<div style="display:flex;margin-left: 20px"> <div style="display:flex;margin-left: 20px">
@ -761,8 +755,8 @@
</div> </div>
</div> </div>
</div> </div>
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div style="display: flex"> <div style="display: flex">
@ -1122,6 +1116,10 @@
<div v-if="isMember == false">{{ item.retailPrice }}</div> <div v-if="isMember == false">{{ item.retailPrice }}</div>
<div v-else>{{ item.memberPrice }}</div> <div v-else>{{ item.memberPrice }}</div>
</div> </div>
<div class="input-box" v-if="rechargeBalCard">
<div>充值金额</div>
<div>{{ rechargeBalCard.amount ? rechargeBalCard.amount : rechargeBalCard.rechargeBalance }}</div>
</div>
<div class="input-box"> <div class="input-box">
<div>支付方式</div> <div>支付方式</div>
<div v-if="payType == 'CASH'">现金</div> <div v-if="payType == 'CASH'">现金</div>
@ -1131,8 +1129,25 @@
<div v-else-if="payType == 'credit'">挂账</div> <div v-else-if="payType == 'credit'">挂账</div>
<div v-else>小程序码</div> <div v-else>小程序码</div>
</div> </div>
<div class="input-box"> <div class="input-box" v-if="rechargeBalCard">
<div>合计</div> <div>赠送金额</div>
<div>{{ rechargeBalCard.giftBalance }}</div>
</div>
<div class="input-box" v-if="rechargeBalCard">
<div>到账金额</div>
<div>{{ rechargeBalCard.amount ? rechargeBalCard.giftBalance + rechargeBalCard.amount : rechargeBalCard.giftBalance + rechargeBalCard.rechargeBalance }}</div>
</div>
<div class="input-box" v-if="rechargeBalCard">
<div>实付款</div>
<div>{{ rechargeBalCard.amount ? rechargeBalCard.amount : rechargeBalCard.rechargeBalance }}</div>
</div>
<div class="input-box1">
<div v-if="payType == 'credit'">挂账单位</div>
<div>{{ form1.unitName }}</div>
</div>
<div class="input-box" v-if="!rechargeBalCard && rechargeOilCard">
<div v-if="payType != 'credit'">合计</div>
<div v-else>挂账金额</div>
<div>{{ (oilAmount+(+goodsAmount)).toFixed(2) }}</div> <div>{{ (oilAmount+(+goodsAmount)).toFixed(2) }}</div>
</div> </div>
<div class="input-box" v-if="(oilDiscount + goodsDiscount + fullReduction + couponAmount)>0"> <div class="input-box" v-if="(oilDiscount + goodsDiscount + fullReduction + couponAmount)>0">
@ -1147,7 +1162,7 @@
<div>囤油卡付款</div> <div>囤油卡付款</div>
<div>{{ consumeRefuelMoney.toFixed(2) }}</div> <div>{{ consumeRefuelMoney.toFixed(2) }}</div>
</div> </div>
<div class="input-box"> <div class="input-box" v-if="!rechargeBalCard && rechargeOilCard">
<div>实付款</div> <div>实付款</div>
<div v-if="payType == 'credit'">0.00</div> <div v-if="payType == 'credit'">0.00</div>
<div v-else>{{ ((+oilActualPay)+(+goodsActualPay)).toFixed(2) }}</div> <div v-else>{{ ((+oilActualPay)+(+goodsActualPay)).toFixed(2) }}</div>
@ -1194,6 +1209,8 @@
components: {SelectStaff}, components: {SelectStaff},
data(){ data(){
return{ return{
rechargeBalCard:{},
rechargeOilCard:{},
openStaff:false, openStaff:false,
cardFuelDieselForm: { cardFuelDieselForm: {
mtStaffId: '', mtStaffId: '',
@ -1548,7 +1565,7 @@
this.getPayList(); this.getPayList();
this.getOilName(); this.getOilName();
this.getGoods(); this.getGoods();
this.getStaffList(); // this.getStaffList();
this.getStaff(); this.getStaff();
this.getList(); this.getList();
this.getCouponList(); this.getCouponList();
@ -1821,6 +1838,8 @@
// //
this_.isPaySuccess = true; this_.isPaySuccess = true;
this_.isQuery = false; this_.isQuery = false;
// this_.rechargeBalCard = response.data
// this_.printLocally()
this_.getMemberAfter(); this_.getMemberAfter();
}else if (payStatus === "payFail") { }else if (payStatus === "payFail") {
this_.isPaySuccess = false; this_.isPaySuccess = false;
@ -1895,6 +1914,8 @@
if (response.data.payStatus == "paid") { if (response.data.payStatus == "paid") {
this_.isPaySuccess = true; this_.isPaySuccess = true;
this_.isQuery = false; this_.isQuery = false;
this_.rechargeOilCard = response.data
this_.printLocally()
this_.getMemberAfter(); this_.getMemberAfter();
} }
if (response.data.payStatus == "payFail") { if (response.data.payStatus == "payFail") {
@ -2110,6 +2131,11 @@
font-size: 14px; font-size: 14px;
margin: 5px 0px; margin: 5px 0px;
} }
.input-box1{
width: 100%;
font-size: 14px;
margin: 5px 0px;
}
.box-ge{ .box-ge{
border-bottom: 1px solid #000000 ; border-bottom: 1px solid #000000 ;
box-sizing: border-box; box-sizing: border-box;
@ -2254,8 +2280,8 @@
}else { }else {
this.$modal.msgSuccess("挂账记录添加成功"); this.$modal.msgSuccess("挂账记录添加成功");
this.dialogVisibleCredit = false; this.dialogVisibleCredit = false;
this.form1.unitName = ""
this.printLocally() this.printLocally()
this.form1.unitName = ""
this.resetMember(); this.resetMember();
this.resetting(); this.resetting();
this.empty(); this.empty();
@ -3265,6 +3291,7 @@
// //
getStaffList(){ getStaffList(){
queryStaffList({storeId:""}).then( response => { queryStaffList({storeId:""}).then( response => {
this.dialogVisible = true
this.staffList = response.data this.staffList = response.data
}) })
}, },

View File

@ -320,9 +320,13 @@
<div>优惠合计</div> <div>优惠合计</div>
<div>{{ oilOrder.discountAmount }}</div> <div>{{ oilOrder.discountAmount }}</div>
</div> </div>
<div class="input-box" v-if="oilOrder.userId && oilOrder.orderStatus=='paid' &&(oilOrder.orderAmount - oilOrder.discountAmount - oilOrder.payAmount)>0"> <div class="input-box" v-if="oilOrder.balanceAmount>0">
<div>储值卡或囤油卡付款</div> <div>储值卡付款金额</div>
<div>{{ (oilOrder.orderAmount - oilOrder.discountAmount - oilOrder.payAmount).toFixed(2) }}</div> <div>{{ oilOrder.balanceAmount }}</div>
</div>
<div class="input-box" v-if="oilOrder.oilCardAmount>0">
<div>囤油卡付款升数</div>
<div>{{ oilOrder.oilCardAmount }}</div>
</div> </div>
<div class="input-box"> <div class="input-box">
<div>实付款</div> <div>实付款</div>

View File

@ -149,7 +149,7 @@
<el-table-column type="index" width="50" align="center" label="序号"/> <el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="name" label="会员名称" align="center"> </el-table-column> <el-table-column prop="name" label="会员名称" align="center"> </el-table-column>
<el-table-column prop="mobile" label="会员手机号" align="center"> </el-table-column> <el-table-column prop="mobile" label="会员手机号" align="center"> </el-table-column>
<el-table-column prop="bidBalance" label="储值卡面值" align="center"> </el-table-column> <el-table-column prop="bidBalance" label="到账金额" align="center"> </el-table-column>
<el-table-column prop="amount" label="自定义充值金额" align="center"> </el-table-column> <el-table-column prop="amount" label="自定义充值金额" align="center"> </el-table-column>
<el-table-column prop="rechargeBalance" label="储值卡实售金额" align="center"> </el-table-column> <el-table-column prop="rechargeBalance" label="储值卡实售金额" align="center"> </el-table-column>
<el-table-column prop="giftBalance" label="储值卡赠送金额" align="center"></el-table-column> <el-table-column prop="giftBalance" label="储值卡赠送金额" align="center"></el-table-column>
@ -356,13 +356,23 @@ export default {
return name; return name;
}, },
exportExcelVip() { exportExcelVip() {
exportExcelVipApi(this.queryParams).then(res=>{ let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
exportExcelVipApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
this.$download.saveAs(blob,'会员充值订单统计.xLsx') this.$download.saveAs(blob,'会员充值订单统计.xLsx')
}) })
}, },
getOrderStatistics () { getOrderStatistics () {
orderStatisticsApi().then(res=>{ let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
orderStatisticsApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
this.orderStatistics = res.data this.orderStatistics = res.data
}) })

View File

@ -202,7 +202,7 @@
disabled> disabled>
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
<span class="bom">赠送金额 仅自定义金额模式下可手动输入赠送活动充值赠送金额不可手动更改</span> <span class="bom">赠送金额 自定义金额模式下将按照距离自定义金额最近的充值活动信息进行赠送</span>
</div> </div>
</div> </div>
@ -215,29 +215,29 @@
<template slot="append">积分</template> <template slot="append">积分</template>
</el-input> </el-input>
<span <span
class="bom">赠送积分 仅自定义金额模式下可手动输入,活动充值赠送积分不可手动更改[需开启积分活动有效]</span> class="bom">赠送积分 自定义金额模式下将按照距离自定义金额最近的充值活动信息进行赠送</span>
</div> </div>
</div> </div>
<div class="jine"> <div class="jine">
<div class="zeng" style="width: 100px;">赠成长值</div> <div class="zeng">赠成长值</div>
<div> <div>
<el-input placeholder="0" <el-input placeholder="0"
v-model="cardValueForm.growthValue" v-model="cardValueForm.growthValue"
disabled> disabled>
<template slot="append">成长值</template> <template slot="append">成长值</template>
</el-input> </el-input>
<!-- <span class="bom">赠送加油金金额 仅自定义金额模式下可手动输入赠送活动充值赠送金额不可手动更改</span> --> <span class="bom">赠送成长值 自定义金额模式下将按照距离自定义金额最近的充值活动信息进行赠送</span>
</div> </div>
</div> </div>
<div class="jine"> <div class="jine">
<div class="zeng">提成员工</div> <div class="zeng" style="width: 30%">提成员工</div>
<div> <div>
<el-input :readonly="true" placeholder="请选择提成员工" v-model="cardValueForm.realName"> <el-input :readonly="true" placeholder="请选择提成员工" v-model="cardValueForm.realName">
<el-button slot="append" @click="chooseStaff">选择员工</el-button> <el-button slot="append" @click="chooseStaff">选择员工</el-button>
</el-input> </el-input>
<span class="bom">仅系统储值档次支持提成员工选择自定义充值金额匹配低一档次</span> <!-- <span class="bom">仅系统储值档次支持提成员工选择自定义充值金额匹配低一档次</span>-->
</div> </div>
</div> </div>
</div> </div>
@ -319,7 +319,7 @@
<template slot="append">积分</template> <template slot="append">积分</template>
</el-input> </el-input>
<span <span
class="bom">升数卡充值不支持自定义积分,选择对应充值活动获得对应积分[需开启积分活动有效]</span> class="bom">升数卡充值不支持自定义积分,选择对应充值活动获得对应积分</span>
</div> </div>
</div> </div>
<div style="display:flex;margin-left: 20px"> <div style="display:flex;margin-left: 20px">

View File

@ -8,40 +8,48 @@
</el-radio-group> </el-radio-group>
<div> <div>
<el-table ref="tables" v-loading="loading" :data="list"> <el-table ref="tables" v-loading="loading" :data="list">
<el-table-column align="center" prop="storeName" label="所属油站"/> <el-table-column align="center" prop="storeName" label="所属油站">
<el-table-column align="center" prop="cardFavorableName" label="优惠券名称"/>
<el-table-column align="center" prop="type" label="卡券类型">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.type == 0">油品券</el-tag> <span>{{store.name}}</span>
<el-tag v-if="scope.row.type == 1" type="success">商品券</el-tag>
<el-tag v-if="scope.row.type == 2" type="warning">通用券</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="fullDeduction" label="满减金额"/> <el-table-column align="center" prop="couponName" label="优惠券名称"/>
<el-table-column align="center" prop="discountAmount" label="券面额"/> <el-table-column align="center" prop="couponType" label="卡券类型">
<el-table-column align="center" prop="oilType" label="适用油品"> <!-- <template slot-scope="scope">-->
<!-- <el-tag v-if="scope.row.type == 0">油品券</el-tag>-->
<!-- <el-tag v-if="scope.row.type == 1" type="success">商品券</el-tag>-->
<!-- <el-tag v-if="scope.row.type == 2" type="warning">通用券</el-tag>-->
<!-- </template>-->
</el-table-column>
<el-table-column align="center" prop="couponAmount" label="优惠金额/参与次数">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getOilNames(oilNameList,scope.row.oilType) }}</span> <span>{{scope.row.couponAmount || 0}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="status" label="状态"> <el-table-column align="center" prop="couponContent" label="券面额/使用说明"/>
<!-- <el-table-column align="center" prop="oilType" label="适用油品">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ getOilNames(oilNameList,scope.row.oilType) }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" prop="useStatus" label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.status == 0">未使用</el-tag> <el-tag v-if="scope.row.useStatus == 0">未使用</el-tag>
<el-tag v-if="scope.row.status == 1" type="success">已使用</el-tag> <el-tag v-if="scope.row.useStatus == 1" type="success">已使用</el-tag>
<el-tag v-if="scope.row.status == 2" type="warning">已过期</el-tag> <el-tag v-if="scope.row.useStatus == 2" type="warning">已过期</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="卡券可用规则"> <!-- <el-table-column align="center" label="卡券可用规则">-->
<el-table-column align="center" prop="name" label="有效期"> <el-table-column align="center" prop="name" label="到期时间">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.startTime }}{{ scope.row.endTime }} {{ scope.row.endTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="availablePeriod" label="周期与时段"/> <!-- <el-table-column align="center" prop="availablePeriod" label="周期与时段"/>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column align="center" prop="createTime" label="领取时间"/> <!-- <el-table-column align="center" prop="createTime" label="领取时间"/>-->
<el-table-column align="center" prop="exchangeFrom" label="描述"/> <!-- <el-table-column align="center" prop="exchangeFrom" label="描述"/>-->
</el-table> </el-table>
<pagination <pagination
@ -55,8 +63,9 @@
</template> </template>
<script> <script>
import { getCardFavorableList } from "@/api/cashier/userInfoOrder"; import {getCardFavorableList, getCardFavorableLists} from "@/api/cashier/userInfoOrder";
import {oilNumbers} from "@/api/cashier/oilnumber"; import {oilNumbers} from "@/api/cashier/oilnumber";
import {ljStoreInfo} from "@/api/staff/store";
export default { export default {
props:["pUserId"], props:["pUserId"],
@ -72,7 +81,8 @@ export default {
page:1, page:1,
pageSize:10, pageSize:10,
}, },
oilNameList:[] oilNameList:[],
store:{},
} }
}, },
created() { created() {
@ -115,27 +125,33 @@ export default {
getList(){ getList(){
this.loading = true this.loading = true
this.queryParams.mtUserId = this.userId this.queryParams.id = this.userId
getCardFavorableList(this.queryParams).then(res=>{ getCardFavorableLists(this.queryParams).then(res=>{
if (res.code == 200) { if (res.code == 200) {
this.list = res.data.records this.list = res.data.records
this.total = res.data.total this.total = res.data.total
this.loading = false this.loading = false
this.getStore()
} }
}) })
}, },
getStore(){
ljStoreInfo().then(res => {
this.store = res.data
})
},
changeStatus() { changeStatus() {
if (this.cardList == 'notUse') { if (this.cardList == 'notUse') {
this.queryParams.status = 0 this.queryParams.useStatus = 0
} else if (this.cardList == 'used') { } else if (this.cardList == 'used') {
this.queryParams.status = 1 this.queryParams.useStatus = 1
} else if (this.cardList == 'expired') { } else if (this.cardList == 'expired') {
this.queryParams.status = 2 this.queryParams.useStatus = 2
} else { } else {
this.queryParams.status = '' this.queryParams.useStatus = ''
} }
this.getList() this.getList()
} }