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) {
return request({
url: 'business/petrolStationManagement/oilName/getList?oilType='+oilType,
url: '/business/petrolStationManagement/oilNumber/getList2?oilType='+oilType,
method: 'get',
})

View File

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

View File

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

View File

@ -42,11 +42,11 @@
<div class="tj-num">{{tjdata.remaining_amount || 0}}</div>
<div class="tj-siez">剩余额度</div>
</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-siez">兑换功能状态</div>
</el-card>
</el-card>-->
</div>
<el-card style="margin-bottom: 20px">
@ -328,7 +328,7 @@
margin-bottom: 20px;
}
.kar{
width: 20%;
width: 25%;
margin-right: 10px;
}
.tj-num{

View File

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

View File

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

View File

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

View File

@ -113,7 +113,9 @@ public class CardFuelDieselServiceImpl extends ServiceImpl<CardFuelDieselMapper,
Date startTime = record.getStartTime();
Date endTime = record.getEndTime();
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);
}
}

View File

@ -110,7 +110,7 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
}
queryWrapper.orderByDesc(CardValue::getCreateTime);
IPage page1 = page(page, queryWrapper);
/*List<CardValue> records = page1.getRecords();
List<CardValue> records = page1.getRecords();
CardValueVOs cardValueVO = new CardValueVOs();
ArrayList<CardValueVOs> cardValueVOs = new ArrayList<>();
//返回储值卡活动进度状态
@ -135,9 +135,16 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
}
}
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;
}

View File

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

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'
})
},
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);
}
});
}