This commit is contained in:
齐天大圣 2024-01-19 14:28:32 +08:00
parent bd213aa77b
commit f467023ba0
9 changed files with 63 additions and 29 deletions

View File

@ -278,6 +278,9 @@ export default {
isonline:[ isonline:[
{ required: true, message: '不能为空', trigger: 'change' } { required: true, message: '不能为空', trigger: 'change' }
], ],
activeDiscountChildList:[
{ required: true, message: '不能为空', trigger: 'change' }
],
} }
}; };
}, },

View File

@ -281,6 +281,9 @@ export default {
isonline:[ isonline:[
{ required: true, message: '不能为空', trigger: 'change' } { required: true, message: '不能为空', trigger: 'change' }
], ],
activeDiscountChildList:[
{ required: true, message: '不能为空', trigger: 'change' }
],
} }
}; };
}, },

View File

@ -144,8 +144,10 @@
<!-- 添加或修改优惠券对话框 --> <!-- 添加或修改优惠券对话框 -->
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="100px">
<el-form-item label="优惠券名称" prop="name"> <el-form-item label="优惠券名称" prop="name">
<el-input v-model="form.name" placeholder="请输入优惠券名称" /> <el-input v-model="form.name" placeholder="请输入优惠券名称" />
</el-form-item> </el-form-item>
<el-form-item label="卡券类型" prop="type"> <el-form-item label="卡券类型" prop="type">
<el-radio-group v-model="form.type"> <el-radio-group v-model="form.type">
@ -165,15 +167,28 @@
<el-checkbox v-for="(item,index) in oillist" :label=" item.id " :key="index">{{item.oilType}}{{item.oilName}}</el-checkbox> <el-checkbox v-for="(item,index) in oillist" :label=" item.id " :key="index">{{item.oilType}}{{item.oilName}}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item label="满足金额" prop="satisfiedAmount" v-if="form.discountType == 0"> <div class="_k">
<el-input v-model="form.satisfiedAmount" placeholder="请输入满足金额" /> <el-form-item label="满足金额" prop="satisfiedAmount" v-if="form.discountType == 0">
</el-form-item> <el-input v-model="form.satisfiedAmount" placeholder="请输入满足金额" >
<el-form-item label="优惠金额" prop="discountAmount" v-if="form.discountType == 0"> <template slot="append"></template>
<el-input v-model="form.discountAmount" placeholder="请输入优惠金额" /> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="满足金额" prop="satisfiedAmount" v-if="form.discountType == 1"> </div>
<el-input v-model="form.satisfiedAmount" placeholder="请输入满足金额" /> <div class="_k">
</el-form-item> <el-form-item label="优惠金额" prop="discountAmount" v-if="form.discountType == 0">
<el-input v-model="form.discountAmount" placeholder="请输入优惠金额" >
<template slot="append"></template>
</el-input>
</el-form-item>
</div>
<div class="_k">
<el-form-item label="满足金额" prop="satisfiedAmount" v-if="form.discountType == 1">
<el-input v-model="form.satisfiedAmount" placeholder="请输入满足金额" >
<template slot="append"></template>
</el-input>
</el-form-item>
</div>
<el-form-item label="优惠折扣" prop="specialDiscount" v-if="form.discountType == 1"> <el-form-item label="优惠折扣" prop="specialDiscount" v-if="form.discountType == 1">
<el-input-number v-model="form.specialDiscount" :min="0" :max="9.9" placeholder="1 ~ 9.9"/> <el-input-number v-model="form.specialDiscount" :min="0" :max="9.9" placeholder="1 ~ 9.9"/>
</el-form-item> </el-form-item>
@ -711,5 +726,9 @@ export default {
align-items: center; align-items: center;
} }
._k{
box-sizing: border-box;
width: 300px;
}
</style> </style>

View File

@ -485,7 +485,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
} }
//折扣+优惠券 //折扣+优惠券
for (ActiveDiscountPayVO activeDiscountPayVO : activeDiscountVOList) { for (ActiveDiscountPayVO activeDiscountPayVO : activeDiscountVOList) {
if (activeDiscountPayVO.getParticipationCondition().equals("1")){ if (!activeDiscountPayVO.getParticipationCondition().equals("1")){
for (CardFavorableRecordVO cardFavorableRecordVO : canUserCardFavorableList) { for (CardFavorableRecordVO cardFavorableRecordVO : canUserCardFavorableList) {
if(cardFavorableRecordVO.getExclusiveFunction().equals("2") && !cardFavorableRecordVO.getExclusiveFunction().equals("0")){ if(cardFavorableRecordVO.getExclusiveFunction().equals("2") && !cardFavorableRecordVO.getExclusiveFunction().equals("0")){
ActiveDiscountPayVO activeDiscountPayVO1 = new ActiveDiscountPayVO(); ActiveDiscountPayVO activeDiscountPayVO1 = new ActiveDiscountPayVO();
@ -525,7 +525,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
} }
//满减+优惠券 //满减+优惠券
for (ActiveDiscountPayVO activeDiscountPayVO : activeFuletVOList) { for (ActiveDiscountPayVO activeDiscountPayVO : activeFuletVOList) {
if (activeDiscountPayVO.getParticipationCondition().equals("1")){ if (!activeDiscountPayVO.getParticipationCondition().equals("1")){
for (CardFavorableRecordVO cardFavorableRecordVO : canUserCardFavorableList) { for (CardFavorableRecordVO cardFavorableRecordVO : canUserCardFavorableList) {
if(cardFavorableRecordVO.getType().equals("2") && !cardFavorableRecordVO.getExclusiveFunction().equals("0")){ if(cardFavorableRecordVO.getType().equals("2") && !cardFavorableRecordVO.getExclusiveFunction().equals("0")){
ActiveDiscountPayVO activeDiscountPayVO1 = new ActiveDiscountPayVO(); ActiveDiscountPayVO activeDiscountPayVO1 = new ActiveDiscountPayVO();

View File

@ -57,7 +57,7 @@ public class CardFavorableRecordController extends BaseController {
@GetMapping("getCardFavorableList") @GetMapping("getCardFavorableList")
public ResponseObject getCardFavorableList(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, public ResponseObject getCardFavorableList(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("cardFuelDiesel") CardFavorableRecord cardFavorableRecord) { @Param("cardFavorableRecord") CardFavorableRecord cardFavorableRecord) {
Page page = new Page(pageNo, pageSize); Page page = new Page(pageNo, pageSize);
return getSuccessResult(this.cardFavorableRecordService.getCardFavorableList(page,cardFavorableRecord)); return getSuccessResult(this.cardFavorableRecordService.getCardFavorableList(page,cardFavorableRecord));
} }

View File

@ -43,7 +43,7 @@
left join mt_store ms on ms.id = cfr.store_id left join mt_store ms on ms.id = cfr.store_id
<where> <where>
<if test="cardFavorableRecord.storeId != null"> <if test="cardFavorableRecord.storeId != null">
and cfr.store_id = #{cardFavorableRecord.storeId} and cf.store_id = #{cardFavorableRecord.storeId}
</if> </if>
<if test="cardFavorableRecord.mtUserId != null"> <if test="cardFavorableRecord.mtUserId != null">
and cfr.mt_user_id = #{cardFavorableRecord.mtUserId} and cfr.mt_user_id = #{cardFavorableRecord.mtUserId}

View File

@ -119,8 +119,8 @@
</div> </div>
</el-card> </el-card>
<el-card :key="childComponentKey"> <el-card :key="childComponentKey" class="_l">
<template>
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="加油订单" name="refuelOrder"> <el-tab-pane label="加油订单" name="refuelOrder">
<oilOrder :key="childComponentKey" :pUserId="form.id"></oilOrder> <oilOrder :key="childComponentKey" :pUserId="form.id"></oilOrder>
@ -135,7 +135,7 @@
<pointsRecord :key="childComponentKey" :pUserId="form.id"></pointsRecord> <pointsRecord :key="childComponentKey" :pUserId="form.id"></pointsRecord>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="卡券列表" name="cardList"> <el-tab-pane label="卡券列表" name="cardList">
<couponList :key="childComponentKey" :pUserId="form.id"></couponList> <couponList :key="childComponentKey" :pUserId="id"></couponList>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="成长值记录" name="growthValue"> <el-tab-pane label="成长值记录" name="growthValue">
<growthValueRecord :key="childComponentKey" :pUserId="form.id"></growthValueRecord> <growthValueRecord :key="childComponentKey" :pUserId="form.id"></growthValueRecord>
@ -144,7 +144,7 @@
<!-- <refuelMoneyRecord :pUserId="form.id"></refuelMoneyRecord> --> <!-- <refuelMoneyRecord :pUserId="form.id"></refuelMoneyRecord> -->
<!-- </el-tab-pane> --> <!-- </el-tab-pane> -->
</el-tabs> </el-tabs>
</template>
</el-card> </el-card>
<!-- 会员充值--> <!-- 会员充值-->
@ -1690,7 +1690,10 @@ export default {
height: 100%; height: 100%;
background: #f6f8f9; background: #f6f8f9;
} }
._l{
}
.left { .left {
width: 20%; width: 20%;
display: table-cell; display: table-cell;

View File

@ -76,9 +76,9 @@ export default {
} }
}, },
created() { created() {
// this.userId = this.pUserId; this.userId = this.pUserId;
this.userId = this.$route.query.id; // this.userId = this.$route.query.id;
console.log( "111111",this.userId)
this.getList() this.getList()
this.getOilName() this.getOilName()
}, },
@ -86,14 +86,18 @@ export default {
getOilNames(list,oilIds){ getOilNames(list,oilIds){
let name = ""; let name = "";
let oilNames = [] let oilNames = []
let oilId = oilIds.split(",") if(oilIds){
list.forEach(item => { let oilId = oilIds.split(",")
oilId.forEach(i => { list.forEach(item => {
if (item.oilName == i){ oilId.forEach(i => {
oilNames.push(item.oilNames) if (item.oilName == i){
} oilNames.push(item.oilNames)
}
})
}) })
}) }
let arr = [] let arr = []
for (let i = 0;i<oilNames.length;i++){ for (let i = 0;i<oilNames.length;i++){
if (arr.indexOf(oilNames[i])==-1){ if (arr.indexOf(oilNames[i])==-1){
@ -112,13 +116,15 @@ export default {
getList(){ getList(){
this.loading = true this.loading = true
this.queryParams.userId = this.userId // this.queryParams.mtUserId = this.userId
getCardFavorableList(this.queryParams).then(res=>{ getCardFavorableList(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
} }
}) })
}, },

View File

@ -45,7 +45,7 @@ export default {
created() { created() {
// this.userId = this.pUserId; // this.userId = this.pUserId;
this.userId = this.$route.query.id; this.userId = this.$route.query.id;
console.log('1212',this.userId)
this.getList() this.getList()
}, },
methods:{ methods:{