11
This commit is contained in:
parent
8bafad399c
commit
ffb623b829
@ -124,5 +124,14 @@ public class CardCouponUserController extends BaseController {
|
||||
return getSuccessResult(maps);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询已核销记录列表
|
||||
*/
|
||||
@GetMapping("/selectVerifiedList")
|
||||
public ResponseObject selectVerifiedList(Page<CardCouponUser> page,CardCouponUser cardCouponUser) {
|
||||
return getSuccessResult(this.cardCouponUserService.selectVerifiedList(page, cardCouponUser));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ -59,6 +60,23 @@ public class CardCouponUser extends Model<CardCouponUser> {
|
||||
//核销码
|
||||
private String verificationCode;
|
||||
|
||||
/**
|
||||
* 优惠券名称
|
||||
*/
|
||||
@Transient
|
||||
private String name;
|
||||
/**
|
||||
* 优惠券类型
|
||||
*/
|
||||
@Transient
|
||||
private String type;
|
||||
|
||||
@Transient
|
||||
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
|
||||
private String begin;
|
||||
@Transient
|
||||
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
|
||||
private String end;
|
||||
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,6 @@ public interface CardCouponUserMapper extends BaseMapper<CardCouponUser> {
|
||||
CardCouponUserVo selectOneCardName(Integer id);
|
||||
|
||||
|
||||
|
||||
IPage<CardCouponUserVo> selectVerifiedList(Page<CardCouponUser> page, @Param("obj")CardCouponUser cardCouponUser);
|
||||
}
|
||||
|
||||
|
@ -57,12 +57,13 @@
|
||||
SELECT userCard.id as id,
|
||||
mtUser.NAME as mobile,
|
||||
userCard.verification_code as ticketCode,
|
||||
CONCAT(userCard.start_time, '-', userCard.end_time) as exchangeFrom,
|
||||
card.name as exchangeName,
|
||||
card.exchange_content as exchangeContent
|
||||
FROM (SELECT * FROM card_coupon_user WHERE mobile = #{str} OR verification_code = #{str}) userCard
|
||||
INNER JOIN card_coupon card ON userCard.card_coupon_id = card.id
|
||||
LEFT JOIN mt_user mtUser ON mtUser.id = userCard.mt_user_id
|
||||
WHERE card.type IN (2, 5)
|
||||
WHERE card.type = '2'
|
||||
AND userCard.STATUS = 0
|
||||
AND userCard.start_time <= NOW()
|
||||
AND userCard.end_time >= NOW()
|
||||
@ -80,6 +81,49 @@
|
||||
JOIN card_coupon cc on cu.card_coupon_id = cc.id
|
||||
where cu.id = #{id}
|
||||
</select>
|
||||
<select id="selectVerifiedList"
|
||||
resultType="com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUserVo">
|
||||
SELECT
|
||||
ccu.mobile mobile,
|
||||
cc.name couponName,
|
||||
ccu.update_time verificationTime,
|
||||
CASE
|
||||
WHEN cc.type = '1' THEN '代金券'
|
||||
WHEN cc.type = '2' THEN '兑换券'
|
||||
WHEN cc.type = '3' THEN '折扣券'
|
||||
WHEN cc.type = '4' THEN '油品立减券'
|
||||
WHEN cc.type = '5' THEN '单品代金券'
|
||||
END as type,
|
||||
CONCAT(ccu.start_time, '-', ccu.end_time) effectiveTime,
|
||||
CONCAT(cc.available_period_start, '-', cc.available_period_end) availableTime,
|
||||
cc.exchange_content exchangeContent,
|
||||
cc.use_condition userCondition,
|
||||
ta.real_name createBy
|
||||
from card_coupon_user ccu
|
||||
left join card_coupon cc on ccu.card_coupon_id = cc.id
|
||||
left join t_account ta on ccu.create_by = ta.acct_id
|
||||
<where>
|
||||
ccu.STATUS = 1 and cc.type = 2
|
||||
<if test="obj.name != null and obj.name != ''">
|
||||
and cc.name = #{obj.name}
|
||||
</if>
|
||||
<if test="obj.type != null and obj.type != ''">
|
||||
and cc.type = #{obj.type}
|
||||
</if>
|
||||
<if test="obj.mobile != null and obj.mobile != ''">
|
||||
and ccu.mobile = #{obj.mobile}
|
||||
</if>
|
||||
<if test="obj.createBy != null and obj.createBy != ''">
|
||||
and ccu.create_by = #{obj.createBy}
|
||||
</if>
|
||||
<if test="obj.begin != null and obj.begin != ''">
|
||||
<![CDATA[and ccu.update_time >= concat(#{obj.begin},' 00:00:00') ]]>
|
||||
</if>
|
||||
<if test="obj.end != null and obj.end != ''">
|
||||
<![CDATA[ and ccu.update_time <= concat(#{obj.end},' 23:59:59') ]]>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.cardCoupon.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUserVo;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO;
|
||||
@ -69,5 +70,6 @@ public interface CardCouponUserService extends IService<CardCouponUser> {
|
||||
|
||||
List<Map<String, Object>> selectUserCardVerification(String str);
|
||||
|
||||
IPage<CardCouponUserVo> selectVerifiedList(Page<CardCouponUser> page, CardCouponUser cardCouponUser);
|
||||
}
|
||||
|
||||
|
@ -193,5 +193,10 @@ public class CardCouponUserServiceImpl extends ServiceImpl<CardCouponUserMapper,
|
||||
List<Map<String, Object>> maps = cardCouponUserMapper.selectUserCardVerification(str);
|
||||
return maps;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<CardCouponUserVo> selectVerifiedList(Page<CardCouponUser> page, CardCouponUser cardCouponUser) {
|
||||
return cardCouponUserMapper.selectVerifiedList(page, cardCouponUser);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,25 @@ public class CardCouponUserVo extends CardCouponUser {
|
||||
* 卡券类型 1代金券、2兑换券、3折扣券、4油品立减券、5单品代金券
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 有效期
|
||||
*/
|
||||
private String effectiveTime;
|
||||
|
||||
/**
|
||||
* 可用时间
|
||||
*/
|
||||
private String availableTime;
|
||||
|
||||
/**
|
||||
* 兑换内容
|
||||
*/
|
||||
private String exchangeContent;
|
||||
/**
|
||||
* 核销时间
|
||||
*/
|
||||
private String verificationTime;
|
||||
/**
|
||||
* 使用条件
|
||||
*/
|
||||
|
@ -60,3 +60,12 @@ export function delRecord(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 已核销记录列表
|
||||
export function selectVerifiedList(query) {
|
||||
return request({
|
||||
url: '/cardCouponUser/selectVerifiedList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
@ -12,16 +12,22 @@
|
||||
<div style="font-weight: bold;margin-bottom: 2px">{{ chooseVipUser.name || '匿名' }}</div>
|
||||
<div class="d-s">
|
||||
<span>{{ chooseVipUser.mobile }}</span>
|
||||
<span style="margin: 0px 5px">普通会员</span>
|
||||
<span style="margin: 0px 5px">{{ chooseVipUser.gradeName }}</span>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
trigger="hover"
|
||||
>
|
||||
<div> 储值卡:¥1000.00</div>
|
||||
<div> 储值卡:¥1000.00</div>
|
||||
<div> 储值卡:¥1000.00</div>
|
||||
<div> 储值卡:¥1000.00</div>
|
||||
<div> 储值卡:¥1000.00</div>
|
||||
<div> 储值卡:¥{{ chooseVipUser.cardBalance || 0 }}</div>
|
||||
<div v-if="chooseVipUser.userFuels">
|
||||
<div v-for="(item,index) in chooseVipUser.userFuels" :key="index">
|
||||
囤油卡:{{item.oilNumberName}} {{item.fuelAmount}}升
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="chooseVipUser.fleetMember">
|
||||
<div>
|
||||
车队卡:¥{{ chooseVipUser.fleetMember.remainingCreditLimit }}
|
||||
</div>
|
||||
</div>
|
||||
<img slot="reference" src="./imgs/kbao.png" style="width: 24px;height: 24px;margin-right: 10px">
|
||||
|
||||
</el-popover>
|
||||
|
@ -5,42 +5,59 @@
|
||||
<div class="top_new">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" style="width: 100%" :inline="true" >
|
||||
|
||||
<el-form-item label="" prop="payUser">
|
||||
<el-form-item label="" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.payUser"
|
||||
v-model="queryParams.name"
|
||||
placeholder="请选择优惠券名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="payUser">
|
||||
|
||||
<el-form-item label="" prop="type">
|
||||
<el-select v-model="queryParams.type" clearable placeholder="请选择优惠券类型">
|
||||
<el-option label="代金券" value="1"/>
|
||||
<el-option label="兑换券" value="2"/>
|
||||
<el-option label="折扣券" value="3"/>
|
||||
<el-option label="油品立减券" value="4"/>
|
||||
<el-option label="单品代金券" value="5"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="createBy">
|
||||
<el-select v-model="queryParams.createBy" clearable placeholder="请选择操作人">
|
||||
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.payUser"
|
||||
v-model="queryParams.mobile"
|
||||
placeholder="请输入用户手机号"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="">
|
||||
<el-form-item prop="begin">
|
||||
<el-date-picker
|
||||
v-model="beginTime"
|
||||
v-model="queryParams.begin"
|
||||
style="width: 160px"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="交易开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="交易结束日期">
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item >
|
||||
|
||||
至
|
||||
<el-form-item prop="end">
|
||||
<el-date-picker
|
||||
v-model="queryParams.end"
|
||||
style="width: 160px"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="height: 32px;width: 20%;display: flex;justify-content: flex-end">
|
||||
<el-button type="primary" icon="el-icon-search" @click="">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery()">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery()">重置</el-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -50,16 +67,16 @@
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column label="优惠券名称" align="center" prop="orderNo" width="220"/>
|
||||
<el-table-column label="优惠券类型" align="center" prop="terminal"/>
|
||||
<el-table-column label="用户手机号" align="center" prop="terminal"/>
|
||||
<el-table-column label="有效日期" align="center" prop="terminal"/>
|
||||
<el-table-column label="可用时间" align="center" prop="terminal"/>
|
||||
<el-table-column label="兑换内容" align="center" prop="terminal"/>
|
||||
<el-table-column label="使用条件" align="center" prop="terminal"/>
|
||||
<el-table-column label="核销人" align="center" prop="terminal"/>
|
||||
<el-table-column label="核销时间" align="center" prop="terminal"/>
|
||||
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
||||
<el-table-column label="优惠券名称" align="center" prop="couponName"/>
|
||||
<el-table-column label="优惠券类型" align="center" prop="type"/>
|
||||
<el-table-column label="用户手机号" align="center" prop="mobile"/>
|
||||
<el-table-column label="有效日期" align="center" prop="effectiveTime" width="290"/>
|
||||
<el-table-column label="可用时间" align="center" prop="availableTime" width="160"/>
|
||||
<el-table-column label="兑换内容" align="center" prop="exchangeContent"/>
|
||||
<el-table-column label="使用条件" align="center" prop="useCondition"/>
|
||||
<el-table-column label="核销人" align="center" prop="createBy"/>
|
||||
<el-table-column label="核销时间" align="center" prop="verificationTime" width="180"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button style="color: #fe8c4a"
|
||||
@click="patchwork(scope.row)"
|
||||
@ -74,41 +91,72 @@
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<div class="pagination-box">
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@current-change="getList">
|
||||
</el-pagination>
|
||||
</div>
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { selectVerifiedList } from "@/api/online";
|
||||
import { queryStaffs } from '@/api/cashier/staff'
|
||||
export default {
|
||||
name: "order_Goods",
|
||||
data() {
|
||||
return {
|
||||
list:[],
|
||||
beginTime:'',
|
||||
endTime:'',
|
||||
// 员工列表
|
||||
staffList: [],
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
begin: '',
|
||||
end: '',
|
||||
name: '',
|
||||
type: '',
|
||||
mobile: '',
|
||||
createBy: '',
|
||||
},
|
||||
total:0
|
||||
}
|
||||
|
||||
},
|
||||
created(){
|
||||
this.getList()
|
||||
this.getStaffList()
|
||||
},
|
||||
methods:{
|
||||
getList(){
|
||||
|
||||
}
|
||||
selectVerifiedList(this.queryParams).then(res => {
|
||||
this.list = res.data.records;
|
||||
this.total = res.data.total
|
||||
this.queryParams.page = res.data.current
|
||||
});
|
||||
},
|
||||
handleQuery(){
|
||||
this.queryParams.current = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetQuery(){
|
||||
this.queryParams.current = 1;
|
||||
this.queryParams.name = '',
|
||||
this.queryParams.mobile= '',
|
||||
this.queryParams.type='',
|
||||
this.queryParams.begin='',
|
||||
this.queryParams.end=''
|
||||
this.queryParams.createBy=''
|
||||
this.getList();
|
||||
},
|
||||
getStaffList() {
|
||||
queryStaffs().then(response => {
|
||||
this.staffList = response.data
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -166,9 +166,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" align="center" label="订单状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status === 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.status === 'paid'">已支付</el-tag>
|
||||
<el-tag type="danger" v-else-if="scope.row.status === 'refund'">已退款</el-tag>
|
||||
<el-tag v-if="scope.row.status === 'unpaid'">支付失败</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.status === 'paid'">支付成功</el-tag>
|
||||
<el-tag type="danger" v-else-if="scope.row.status === 'refund'">退款成功</el-tag>
|
||||
<el-tag type="danger" v-else>支付失败</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -252,7 +252,7 @@
|
||||
<!-- @click="handleRefund(scope.row.id)" -->
|
||||
|
||||
<el-button style="color: #fe8c4a" type="text" @click="refHandleRefund(scope.row.id)"
|
||||
v-if="scope.row.orderStatus === 'paid' && scope.row.terminal=='applet'" >退款
|
||||
v-if="scope.row.orderStatus === 'paid' || scope.row.terminal=='applet'" >退款
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
Loading…
Reference in New Issue
Block a user