1
This commit is contained in:
parent
207ecefc50
commit
c08ad40842
@ -116,6 +116,20 @@ public class CardValueController extends BaseController {
|
||||
public ResponseObject selectById(@PathVariable Serializable id) {
|
||||
return getSuccessResult(this.cardValueService.getOneById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 查询储值卡活动 以及优惠券子表
|
||||
*/
|
||||
@GetMapping("/cardValueAndRecordList")
|
||||
public ResponseObject cardValueAndRecordList(CardValue cardValue) {
|
||||
//获取当前登录用户
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
cardValue.setStoreId(nowAccountInfo.getStoreId());
|
||||
return getSuccessResult(this.cardValueService.cardValueAndRecordList(cardValue));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取使用时的详细信息
|
||||
*
|
||||
|
@ -2,6 +2,11 @@ package com.fuint.business.marketingActivity.cardValue.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValue;
|
||||
import com.fuint.business.marketingActivity.cardValue.vo.CardValueVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 储值卡表(CardValue)表数据库访问层
|
||||
@ -9,7 +14,11 @@ import com.fuint.business.marketingActivity.cardValue.entity.CardValue;
|
||||
* @author makejava
|
||||
* @since 2023-10-31 09:41:57
|
||||
*/
|
||||
@Mapper
|
||||
public interface CardValueMapper extends BaseMapper<CardValue> {
|
||||
|
||||
|
||||
List<CardValueVO> cardValueList(@Param("obj") CardValue cardValue);
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.marketingActivity.cardValue.mapper.CardValueMapper">
|
||||
|
||||
|
||||
<!-- 嵌套结果映射 -->
|
||||
<resultMap id="CardValueResultMap" type="com.fuint.business.marketingActivity.cardValue.vo.CardValueVO">
|
||||
<id property="id" column="cv_id"/>
|
||||
<result property="chainStoreId" column="cv_chain_store_id"/>
|
||||
<result property="storeId" column="cv_store_id"/>
|
||||
<result property="status" column="cv_status"/>
|
||||
<result property="isonline" column="cv_isonline"/>
|
||||
<result property="bidBalance" column="cv_bid_balance"/>
|
||||
<result property="rechargeBalance" column="cv_recharge_balance"/>
|
||||
<result property="giftBalance" column="cv_gift_balance"/>
|
||||
<result property="points" column="cv_points"/>
|
||||
<result property="growthValue" column="cv_growth_value"/>
|
||||
<result property="refuelMoney" column="cv_refuel_money"/>
|
||||
<result property="fringeBenefit" column="cv_fringe_benefit"/>
|
||||
<result property="participationNo" column="cv_participation_no"/>
|
||||
<result property="employeeCommission" column="cv_employee_commission"/>
|
||||
<result property="royaltyType" column="cv_royalty_type"/>
|
||||
<result property="amountCommission" column="cv_amount_commission"/>
|
||||
<result property="percentageCommissions" column="cv_percentage_commissions"/>
|
||||
<result property="activeTime" column="cv_active_time"/>
|
||||
<result property="activityProgress" column="cv_activity_progress"/>
|
||||
<result property="startTime" column="cv_start_time"/>
|
||||
<result property="endTime" column="cv_end_time"/>
|
||||
<result property="activeStatus" column="cv_active_status"/>
|
||||
<result property="paymentValue" column="cv_payment_value"/>
|
||||
<result property="groupOriented" column="cv_group_oriented"/>
|
||||
<!-- <result property="membershipLevel" column="cv_membership_level"/>-->
|
||||
<result property="sort" column="cv_sort"/>
|
||||
<result property="createBy" column="cv_create_by"/>
|
||||
<result property="createTime" column="cv_create_time"/>
|
||||
<result property="updateBy" column="cv_update_by"/>
|
||||
<result property="updateTime" column="cv_update_time"/>
|
||||
<result property="activeName" column="cv_active_name"/>
|
||||
<collection property="cardValueChildList" ofType="com.fuint.business.marketingActivity.cardValue.entity.CardValueChild">
|
||||
<id property="id" column="cc_id"/>
|
||||
<result property="cardValueId" column="cc_card_value_id"/>
|
||||
<result property="vouchersId" column="cc_vouchers_id"/>
|
||||
<result property="activeGift" column="cc_active_gift"/>
|
||||
<result property="giftCardName" column="cc_gift_card_name"/>
|
||||
<result property="giftCardType" column="cc_gift_card_type"/>
|
||||
<result property="giftCardDetail" column="cc_gift_card_detail"/>
|
||||
<result property="giftCardTime" column="cc_gift_card_time"/>
|
||||
<result property="giftCardTotal" column="cc_gift_card_total"/>
|
||||
<result property="validityZero" column="cc_validity_zero"/>
|
||||
<result property="validityOne" column="cc_validity_one"/>
|
||||
<result property="validityTwo" column="cc_validity_two"/>
|
||||
<result property="createBy" column="cc_create_by"/>
|
||||
<result property="instruction" column="cc_instruction"/>
|
||||
<result property="createTime" column="cc_create_time"/>
|
||||
<result property="updateBy" column="cc_update_by"/>
|
||||
<result property="updateTime" column="cc_update_time"/>
|
||||
<result property="timeType" column="cc_time_type"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="cardValueList" resultMap="CardValueResultMap">
|
||||
SELECT
|
||||
cv.id AS cv_id,
|
||||
cv.chain_store_id AS cv_chain_store_id,
|
||||
cv.store_id AS cv_store_id,
|
||||
cv.status AS cv_status,
|
||||
cv.isonline AS cv_isonline,
|
||||
cv.bid_balance AS cv_bid_balance,
|
||||
cv.recharge_balance AS cv_recharge_balance,
|
||||
cv.gift_balance AS cv_gift_balance,
|
||||
cv.points AS cv_points,
|
||||
cv.growth_value AS cv_growth_value,
|
||||
cv.refuel_money AS cv_refuel_money,
|
||||
cv.fringe_benefit AS cv_fringe_benefit,
|
||||
cv.participation_no AS cv_participation_no,
|
||||
cv.employee_commission AS cv_employee_commission,
|
||||
cv.royalty_type AS cv_royalty_type,
|
||||
cv.amount_commission AS cv_amount_commission,
|
||||
cv.percentage_commissions AS cv_percentage_commissions,
|
||||
cv.active_time AS cv_active_time,
|
||||
cv.activity_progress AS cv_activity_progress,
|
||||
cv.start_time AS cv_start_time,
|
||||
cv.end_time AS cv_end_time,
|
||||
cv.active_status AS cv_active_status,
|
||||
cv.payment_value AS cv_payment_value,
|
||||
cv.group_oriented AS cv_group_oriented,
|
||||
cv.membership_level AS cv_membership_level,
|
||||
cv.sort AS cv_sort,
|
||||
cv.create_by AS cv_create_by,
|
||||
cv.create_time AS cv_create_time,
|
||||
cv.update_by AS cv_update_by,
|
||||
cv.update_time AS cv_update_time,
|
||||
cv.active_name AS cv_active_name,
|
||||
cc.id AS cc_id,
|
||||
cc.card_value_id AS cc_card_value_id,
|
||||
cc.vouchers_id AS cc_vouchers_id,
|
||||
cc.active_gift AS cc_active_gift,
|
||||
cc.gift_card_name AS cc_gift_card_name,
|
||||
cc.gift_card_type AS cc_gift_card_type,
|
||||
cc.gift_card_detail AS cc_gift_card_detail,
|
||||
cc.gift_card_time AS cc_gift_card_time,
|
||||
cc.gift_card_total AS cc_gift_card_total,
|
||||
cc.validity_zero AS cc_validity_zero,
|
||||
cc.validity_one AS cc_validity_one,
|
||||
cc.validity_two AS cc_validity_two,
|
||||
cc.create_by AS cc_create_by,
|
||||
cc.instruction AS cc_instruction,
|
||||
cc.create_time AS cc_create_time,
|
||||
cc.update_by AS cc_update_by,
|
||||
cc.update_time AS cc_update_time,
|
||||
cc.time_type AS cc_time_type
|
||||
FROM
|
||||
card_value cv
|
||||
LEFT JOIN
|
||||
card_value_child cc ON cv.id = cc.card_value_id
|
||||
where
|
||||
(cv.active_time = '1' and cv.store_id = #{obj.storeId} and cv.active_status = '1')
|
||||
or
|
||||
(cv.active_time = '2' and cv.store_id = #{obj.storeId} and cv.active_status = '1' and CURRENT_TIMESTAMP BETWEEN cv.start_time AND cv.end_time )
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
@ -46,6 +46,9 @@ public interface CardValueService extends IService<CardValue> {
|
||||
CardValueVO getOneById(Serializable id);
|
||||
List<CardCoupon> getCoupons(Integer userId,Integer cardValueId);
|
||||
|
||||
|
||||
List<CardValueVO> cardValueAndRecordList(CardValue cardValue);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
* @param cardValueDTO
|
||||
|
@ -331,6 +331,13 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CardValueVO> cardValueAndRecordList(CardValue cardValue) {
|
||||
|
||||
List<CardValueVO> cardValues = super.baseMapper.cardValueList(cardValue);
|
||||
return cardValues;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
* @param cardValueDTO
|
||||
|
@ -29,10 +29,10 @@ export function cashRegisterGoodsList() {
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询储值卡活动 以及优惠券子表
|
||||
export function cardValueList() {
|
||||
return request({
|
||||
url: '/business/marketingActivity/cardValue/cardValueList',
|
||||
url: '/business/marketingActivity/cardValue/cardValueAndRecordList',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
@ -119,14 +119,16 @@ export default {
|
||||
oilNumberId:null
|
||||
},
|
||||
this.selectCard.cardType = index
|
||||
this.getCardValueList()
|
||||
//切换 电子储值卡 囤油卡 礼品卡 初始化
|
||||
this.getCardValueList()
|
||||
|
||||
},
|
||||
chooseActive(data){
|
||||
data.cardType = this.selectCard.cardType
|
||||
this.selectCard = data
|
||||
this.selectCard.cardCouponList = []
|
||||
this.selectCard.cardCouponList = data.cardCouponList
|
||||
},
|
||||
//切换初始化
|
||||
getCardValueList(){
|
||||
let that = this
|
||||
cardValueList().then(res=>{
|
||||
@ -154,7 +156,7 @@ export default {
|
||||
<template>
|
||||
<div>
|
||||
<div class="top-dd">
|
||||
<div class="tab-dv" v-for="(item,index) in tabList" :key="index" :class="{ 'active':selectCard.cardType==item.num}" @click="selectTab(item.num)" >
|
||||
<div class="tab-dv" v-for="(item,index) in tabList" :key="index" :class="{ 'active':selectCard.cardType==item.num}" @click="selectTab(item.num)" >
|
||||
{{item.name}}
|
||||
</div>
|
||||
</div>
|
||||
@ -163,37 +165,12 @@ export default {
|
||||
<el-form-item label="充值金额" prop="price" style="margin-bottom: 10px" >
|
||||
</el-form-item>
|
||||
<div class="d-s">
|
||||
|
||||
<div class="k_kang" v-for="(item,index) in cardList" :key="index" @click="chooseActive(item)" >
|
||||
{{item.activeName}}
|
||||
<img src="../imgs/r-j.png" class="p-img" v-if="selectCard.id == item.id" >
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="充值本金" prop="region" >
|
||||
<el-input v-model="selectCard.rechargeBalance" style="width: 330px">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<div style="display: flex">
|
||||
<el-form-item label="赠送金额" prop="text">
|
||||
<el-input v-model="selectCard.giftBalance" style="width: 150px">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="赠送积分" prop="text">
|
||||
<el-input v-model="selectCard.points" style="width: 150px">
|
||||
<template slot="append">积分</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="赠送成长值" prop="text">
|
||||
<el-input v-model="selectCard.growthValue" style="width: 150px">
|
||||
<template slot="append">成长值</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
<!-- 选择优惠券-->
|
||||
<div class="xh-box" v-if="selectCard.cardCouponList.length>0">
|
||||
<div class="xh-box" >
|
||||
<div style="margin: 10px 0px;width: 800px;margin-left: 25px">
|
||||
<el-table
|
||||
:data="selectCard.cardCouponList"
|
||||
@ -235,9 +212,32 @@ export default {
|
||||
width="240">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="充值本金" prop="region" >
|
||||
<el-input v-model="selectCard.rechargeBalance" style="width: 330px">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<div style="display: flex">
|
||||
<el-form-item label="赠送金额" prop="text">
|
||||
<el-input v-model="selectCard.giftBalance" style="width: 150px">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="赠送积分" prop="text">
|
||||
<el-input v-model="selectCard.points" style="width: 150px">
|
||||
<template slot="append">积分</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="赠送成长值" prop="text">
|
||||
<el-input v-model="selectCard.growthValue" style="width: 150px">
|
||||
<template slot="append">成长值</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
|
||||
<el-form-item label="提成员工" prop="region" >
|
||||
<el-select filterable v-model="selectCard.chooseStaff" placeholder="请选择提成员工" style="width: 330px">
|
||||
<el-option v-for="data in staffList" :label="data.realName" :value="data.id"></el-option>
|
||||
|
@ -599,7 +599,7 @@
|
||||
<el-checkbox v-model="isOilChecked" :disabled="true">¥{{ cashierOrder.oilPayAmount || 0}}</el-checkbox>
|
||||
<br>
|
||||
<span>优惠券:</span>
|
||||
<el-checkbox v-model="isCouponChecked" :disabled="true">{{ cardName || '无' }}</el-checkbox>
|
||||
<el-checkbox v-model="isCouponChecked" :disabled="true">{{ cardCouponUser.couponName || '无' }}</el-checkbox>
|
||||
<br>
|
||||
<div style="margin: 10px 0">
|
||||
退款原因<br/>
|
||||
@ -771,7 +771,9 @@ export default {
|
||||
isGoodsChecked: true, // 商品默认勾选
|
||||
isOilChecked: true, // 油品默认勾选
|
||||
isCouponChecked: true, // 优惠券默认勾选
|
||||
cardName:null, // 优惠券名称
|
||||
cardCouponUser:{
|
||||
cardName:''
|
||||
}, // 优惠券名称
|
||||
cashierOrder:{}, // 当前退款的订单对象
|
||||
tableData: [{
|
||||
date: '2016-05-03',
|
||||
@ -1220,7 +1222,12 @@ export default {
|
||||
if (couponId) {
|
||||
let resCoupon = await selectOneCardName({ id: couponId })
|
||||
console.log('优惠券', resCoupon)
|
||||
this.cardName = resCoupon.data.couponName
|
||||
this.cardCouponUser = resCoupon.data
|
||||
}
|
||||
else {
|
||||
this.cardCouponUser = {
|
||||
couponName: '无'
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
@ -1230,6 +1237,7 @@ export default {
|
||||
|
||||
let map ={
|
||||
orderNo: this.cashierOrder.orderNo,
|
||||
cardCouponUserId: this.cardCouponUser.id,
|
||||
}
|
||||
let res = await cashierRefund(map)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user