This commit is contained in:
wangh 2024-01-10 15:44:04 +08:00
commit 301be80121
12 changed files with 216 additions and 20 deletions

View File

@ -11,7 +11,7 @@ export function getList(query) {
// 查询油号 // 查询油号
export function oilName(oilType) { export function oilName(oilType) {
return request({ return request({
url: 'business/petrolStationManagement/oilName/getList?oilType='+oilType, url: '/business/petrolStationManagement/oilNumber/getList2?oilType='+oilType,
method: 'get', method: 'get',
}) })

View File

@ -465,7 +465,7 @@
label="券详情" label="券详情"
width="100"> width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.fullDeduction}} {{scope.row.discountAmount}} </span> <span>{{scope.row.satisfiedAmount}} {{scope.row.discountAmount}} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -767,7 +767,7 @@
validityZero: row.validityZero, validityZero: row.validityZero,
validityOne: row.validityOne, validityOne: row.validityOne,
validityTwo:row.validityTwo, validityTwo:row.validityTwo,
giftCardDetail: "满"+ row.fullDeduction+"减 "+row.discountAmount+"元" , // giftCardDetail: "满"+ row.satisfiedAmount+"减 "+row.discountAmount+"元" , //
giftCardTime: "", // giftCardTime: "", //
giftCardTotal: 1// giftCardTotal: 1//
} }

View File

@ -828,7 +828,7 @@ export default {
validityZero: row.validityZero, validityZero: row.validityZero,
validityOne: row.validityOne, validityOne: row.validityOne,
validityTwo:row.validityTwo, validityTwo:row.validityTwo,
giftCardDetail: "满"+ row.fullDeduction+"减 "+row.discountAmount+"元" , // giftCardDetail: "满"+ row.satisfiedAmount+"减 "+row.discountAmount+"元" , //
giftCardTime: "", // giftCardTime: "", //
giftCardTotal: 1// giftCardTotal: 1//
} }

View File

@ -42,11 +42,11 @@
<div class="tj-num">{{tjdata.remaining_amount || 0}}</div> <div class="tj-num">{{tjdata.remaining_amount || 0}}</div>
<div class="tj-siez">剩余额度</div> <div class="tj-siez">剩余额度</div>
</el-card> </el-card>
<el-card class="kar" style="cursor: pointer;height: 106px " > <!-- <el-card class="kar" style="cursor: pointer;height: 106px " >
<div class="tj-num"> <el-tag v-if="tjdata.exchangeStatus == 0" @click="putStatus(1)">启用</el-tag> <el-tag type="info" v-if="tjdata.exchangeStatus == 1 " @click="putStatus(0)">禁用</el-tag> </div> <div class="tj-num"> <el-tag v-if="tjdata.exchangeStatus == 0" @click="putStatus(1)">启用</el-tag> <el-tag type="info" v-if="tjdata.exchangeStatus == 1 " @click="putStatus(0)">禁用</el-tag> </div>
<div class="tj-siez">兑换功能状态</div> <div class="tj-siez">兑换功能状态</div>
</el-card> </el-card>-->
</div> </div>
<el-card style="margin-bottom: 20px"> <el-card style="margin-bottom: 20px">
@ -328,7 +328,7 @@
margin-bottom: 20px; margin-bottom: 20px;
} }
.kar{ .kar{
width: 20%; width: 25%;
margin-right: 10px; margin-right: 10px;
} }
.tj-num{ .tj-num{

View File

@ -75,7 +75,7 @@
this.couponList = response.data.records; this.couponList = response.data.records;
this.total = response.data.total this.total = response.data.total
if( response.data.total == 0){ if( response.data.total == 0){
this.$message.error("未找到兑换券") /* this.$message.error("未找到兑换券")*/
}else{ }else{
} }

View File

@ -167,9 +167,9 @@
<el-select v-model="ruleForm.oilType" placeholder="请选择" > <el-select v-model="ruleForm.oilType" placeholder="请选择" >
<el-option <el-option
v-for="dict in oilList" v-for="dict in oilList"
:key="dict.id.toString()" :key="dict.id"
:label="dict.oilName" :label="dict.oilName"
:value="dict.id.toString()"> :value="dict.id">
</el-option> </el-option>
</el-select> </el-select>
@ -365,8 +365,8 @@
this.oilList = [] this.oilList = []
oilName(this.queryParams.type).then(res=>{ oilName(this.queryParams.type).then(res=>{
this.oilList = res.data this.oilList = res.data.records
console.log( this.oilList) console.log('我的油站' ,res)
}) })
}, },
getlist(){ getlist(){

View File

@ -69,7 +69,10 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
//新增消费有礼活动模板 //新增消费有礼活动模板
ActiveConsumption activeConsumption = new ActiveConsumption(); ActiveConsumption activeConsumption = new ActiveConsumption();
if (ObjectUtils.isNotEmpty(activeConsumptionDTO)){ if (ObjectUtils.isNotEmpty(activeConsumptionDTO)){
String participationConditionMoney = activeConsumptionDTO.getParticipationConditionMoney();
double v = Double.parseDouble(participationConditionMoney);
BeanUtils.copyProperties(activeConsumptionDTO,activeConsumption); BeanUtils.copyProperties(activeConsumptionDTO,activeConsumption);
activeConsumption.setParticipationConditionMoney(v);
//适用油号 //适用油号
activeConsumption.setAdaptOil(arrayToString(activeConsumptionDTO.getAdaptOil())); activeConsumption.setAdaptOil(arrayToString(activeConsumptionDTO.getAdaptOil()));
//活动奖品 //活动奖品
@ -155,6 +158,7 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
if (CollectionUtils.isNotEmpty(activeConsumptionChildList)){ if (CollectionUtils.isNotEmpty(activeConsumptionChildList)){
//封装VO返回 //封装VO返回
BeanUtils.copyProperties(consumption,activeConsumptionVO); BeanUtils.copyProperties(consumption,activeConsumptionVO);
activeConsumptionVO.setParticipationConditionMoney(consumption.getParticipationConditionMoney().toString());
activeConsumptionVO.setDieselUserLevel(consumption.getDieselUserLevel().split(",")); activeConsumptionVO.setDieselUserLevel(consumption.getDieselUserLevel().split(","));
activeConsumptionVO.setGasolineUserLevel(consumption.getGasolineUserLevel().split(",")); activeConsumptionVO.setGasolineUserLevel(consumption.getGasolineUserLevel().split(","));
activeConsumptionVO.setNaturalUserLevel(consumption.getNaturalUserLevel().split(",")); activeConsumptionVO.setNaturalUserLevel(consumption.getNaturalUserLevel().split(","));
@ -179,7 +183,10 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
boolean update = false; boolean update = false;
//更新消费有礼 //更新消费有礼
ActiveConsumption activeConsumption = new ActiveConsumption(); ActiveConsumption activeConsumption = new ActiveConsumption();
String participationConditionMoney = activeConsumptionDTO.getParticipationConditionMoney();
double participationConditionMoneys = Double.parseDouble(participationConditionMoney);
BeanUtils.copyProperties(activeConsumptionDTO,activeConsumption); BeanUtils.copyProperties(activeConsumptionDTO,activeConsumption);
activeConsumption.setParticipationConditionMoney(participationConditionMoneys);
activeConsumption.setAdaptOil(arrayToString(activeConsumptionDTO.getAdaptOil())); activeConsumption.setAdaptOil(arrayToString(activeConsumptionDTO.getAdaptOil()));
activeConsumption.setActiveGift(arrayToString(activeConsumptionDTO.getActiveGift())); activeConsumption.setActiveGift(arrayToString(activeConsumptionDTO.getActiveGift()));
//柴油会员等级 //柴油会员等级

View File

@ -113,7 +113,9 @@ public class CardFuelDieselServiceImpl extends ServiceImpl<CardFuelDieselMapper,
Date startTime = record.getStartTime(); Date startTime = record.getStartTime();
Date endTime = record.getEndTime(); Date endTime = record.getEndTime();
Date date = new Date(); Date date = new Date();
if(startTime.before(date) && endTime.after(date)){ if (record.getActiveTime().equals("1")){
cardFuelDiesels.add(record);
}else if (startTime.before(date) && endTime.after(date)){
cardFuelDiesels.add(record); cardFuelDiesels.add(record);
} }
} }

View File

@ -110,7 +110,7 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
} }
queryWrapper.orderByDesc(CardValue::getCreateTime); queryWrapper.orderByDesc(CardValue::getCreateTime);
IPage page1 = page(page, queryWrapper); IPage page1 = page(page, queryWrapper);
/*List<CardValue> records = page1.getRecords(); List<CardValue> records = page1.getRecords();
CardValueVOs cardValueVO = new CardValueVOs(); CardValueVOs cardValueVO = new CardValueVOs();
ArrayList<CardValueVOs> cardValueVOs = new ArrayList<>(); ArrayList<CardValueVOs> cardValueVOs = new ArrayList<>();
//返回储值卡活动进度状态 //返回储值卡活动进度状态
@ -135,9 +135,16 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
} }
} }
BeanUtils.copyProperties(record,cardValueVO); BeanUtils.copyProperties(record,cardValueVO);
cardValueVOs.add(cardValueVO); Date startTime = cardValueVO.getStartTime();
Date endTime = cardValueVO.getEndTime();
Date date = new Date();
if(cardValueVO.getActiveTime().equals("1")){
cardValueVOs.add(cardValueVO);
}else if (cardValueVO.getActiveTime().equals("2") && startTime.before(date) && endTime.after(date)){
cardValueVOs.add(cardValueVO);
}
} }
page1.setRecords(cardValueVOs);*/ page1.setRecords(cardValueVOs);
return page1; return page1;
} }

View File

@ -31,17 +31,23 @@
where store_id = #{oilNumber.storeId} where store_id = #{oilNumber.storeId}
</select> </select>
<select id="selectOilNumberList2" resultMap="OilNumberResult"> <select id="selectOilNumberList2" resultMap="OilNumberResult">
select select
omm.number_id , omm.number_id ,
onn.oil_type, onn.oil_type,
onn.oil_name, onn.oil_name,
onn.id,
omm.oil_price, omm.oil_price,
omm.gb_price omm.gb_price
from oil_number omm from oil_number omm
left join oil_name onn on omm.oil_name = onn.id left join oil_name onn on omm.oil_name = onn.id
<where>
where omm.store_id = #{oilNumber.storeId} omm.store_id = #{oilNumber.storeId}
<if test="oilNumber.oilType != null and oilNumber.oilType != ''">
and onn.oil_type = #{oilNumber.oilType}
</if>
</where>
</select> </select>
<!-- select--> <!-- select-->
@ -139,4 +145,4 @@
onu.store_id = #{storeId} and onu.state = '启用' onu.store_id = #{storeId} and onu.state = '启用'
</where> </where>
</select> </select>
</mapper> </mapper>

View File

@ -0,0 +1,159 @@
<template>
<view>
<view>
<view style="text-align: center;height: 50px;font-size: 20px;line-height: 50px;">{{value}}</view>
<view class="key-bom">
<view class="wrap">
<view class="key-line">
<view class="key-num" @click="valChange(1)">1</view>
<view class="key-num" @click="valChange(2)">2</view>
<view class="key-num" @click="valChange(3)">3</view>
</view>
<view class="key-line">
<view class="key-num" @click="valChange(4)">4</view>
<view class="key-num" @click="valChange(5)">5</view>
<view class="key-num" @click="valChange(6)">6</view>
</view>
<view class="key-line">
<view class="key-num" @click="valChange(7)">7</view>
<view class="key-num" @click="valChange(8)">8</view>
<view class="key-num" @click="valChange(9)">9</view>
</view>
<view class="key-line">
<view class="key-zero" @click="valChange(0)">0</view>
<view class="key-num" @click="valChange('.')">.</view>
</view>
</view>
<view class="wrap2">
<view class="key-back" @click="backspace"><u-icon name="backspace" size="28"></u-icon></view>
<view v-if="pApplt=='WECHAT'" class="key-pay" @click="choosePayMethod">支付</view>
<view v-else class="key-pay1" @click="choosePayMethod">支付</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props:['pApplt'],
data() {
return {
value:"",
// WECHAT ALIPAY
appltType:"WECHAT",
}
},
onLoad() {
this.appltType = this.pApplt
},
methods: {
valChange(val) {
// value+=
uni.vibrateShort({
success: function () {}
});
let index = this.value.indexOf(".")
if(index!=-1){
if ((this.value.length-index)>=3){
return;
}
}else{
if (this.value.length>=7 && val!="."){
return;
}
}
this.value += val;
// console.log(this.value.indexOf("."),this.value.length-index)
this.$emit('amount', this.value);
// console.log(this.value);
},
// 退
backspace() {
// value
if (this.value.length) this.value = this.value.substr(0, this.value.length - 1);
this.$emit('backVal', this.value);
uni.vibrateShort({
success: function () {}
});
// console.log(this.value);
},
//
choosePayMethod(){
uni.vibrateShort({
success: function () {}
});
this.$emit('isPay', true);
},
}
}
</script>
<style scoped lang="scss">
.key-bom{
display: flex;
justify-content: space-around;
background-color: gainsboro;
margin-bottom: 20px;
}
.wrap{
width: 73%;
}
.key-line{
width: 100%;
height: 45px;
line-height: 45px;
display: flex;
justify-content: space-around;
margin: 5px 0;
}
.key-num{
width: 31%;
text-align: center;
background-color: white;
border-radius: 5px;
}
.key-zero{
width: 64%;
text-align: center;
background-color: white;
border-radius: 5px;
}
.wrap2{
width: 24%;
}
.key-back{
width: 96%;
height: 45px;
line-height: 45px;
background-color: white;
border-radius: 5px;
margin: 5px 0;
padding-top: 10%;
padding-left: 30%;
box-sizing: border-box;
}
.key-pay{
width: 96%;
height: 145px;
line-height: 145px;
text-align: center;
background-color: #1fbe1d;
//background-color: #2773fc;
color: white;
border-radius: 5px;
margin: 5px 0;
}
.key-pay1{
width: 96%;
height: 145px;
line-height: 145px;
text-align: center;
// background-color: #1fbe1d;
background-color: #2773fc;
color: white;
border-radius: 5px;
margin: 5px 0;
}
</style>

View File

@ -272,7 +272,22 @@
url: '/pagesRefuel/orderSuccess/index' url: '/pagesRefuel/orderSuccess/index'
}) })
}, },
fail: function(err) {} fail: function(err) {
request({
url: "/business/marketingActivity/activeExchange/cardValueOrders",
method: 'put',
data: {
"orderNo": res.data.data.orderNo,
"status": "payFail"
},
}).then((res) => {
uni.showToast({
title: "支付失败!",
icon: "error"
})
})
console.log('fail:', err);
}
}); });
} }