Merge branch 'master' of https://gitee.com/nny_1/oilSystem
This commit is contained in:
commit
301be80121
@ -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',
|
||||
|
||||
})
|
||||
|
@ -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//券数量
|
||||
}
|
||||
|
@ -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//券数量
|
||||
}
|
||||
|
@ -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{
|
||||
|
@ -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{
|
||||
|
||||
}
|
||||
|
@ -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(){
|
||||
|
@ -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()));
|
||||
//柴油会员等级
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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-->
|
||||
|
159
gasStation-uni/components/keyboard/keyboard.vue
Normal file
159
gasStation-uni/components/keyboard/keyboard.vue
Normal 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>
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user