bug修改

This commit is contained in:
tx 2024-09-09 18:02:17 +08:00
parent 7d9176b8fa
commit 13dbe41a76
6 changed files with 298 additions and 111 deletions

View File

@ -355,7 +355,7 @@
<view class="time"> <view class="time">
使用时间{{timeString}} 使用时间{{timeString}}
</view> </view>
<view class="price_li"> <!-- <view class="price_li">
<view class="price_left"> <view class="price_left">
合计费用 <view class="iconfont icon-xiangxia"></view> <view class="iconfont icon-xiangshang"></view> 合计费用 <view class="iconfont icon-xiangxia"></view> <view class="iconfont icon-xiangshang"></view>
</view> </view>
@ -386,9 +386,9 @@
<view class="price_right" @click="tocard()"> <view class="price_right" @click="tocard()">
去使用> 去使用>
</view> </view>
</view> </view> -->
<view class="price"> <view class="price">
{{orderinfo.totalFee}}<span></span> {{orderinfo.payFee}}<span></span>
</view> </view>
<view class="toinfo" @click="tofeeDetail()"> <view class="toinfo" @click="tofeeDetail()">
@ -1474,7 +1474,7 @@
uni.setStorageSync('areaId', res.data.areaId); uni.setStorageSync('areaId', res.data.areaId);
this.getinfo() this.getinfo()
this.getmarks() this.getmarks()
this.getlist() // this.getlist()
this.getParking() this.getParking()
if (uni.getStorageSync('token')) { if (uni.getStorageSync('token')) {
this.getisInOrder() this.getisInOrder()
@ -1559,6 +1559,7 @@
if (res.code === 200) { if (res.code === 200) {
this.isqrcode = true this.isqrcode = true
this.deviceInfos = res.data; this.deviceInfos = res.data;
this.getlist(res.data.getlist)
if (!this.orderinfo.sn) { if (!this.orderinfo.sn) {
this.mac = res.data.mac this.mac = res.data.mac
} }
@ -1684,7 +1685,7 @@
if (res.code === 200) { if (res.code === 200) {
this.isqrcode = true this.isqrcode = true
this.deviceInfos = res.data; this.deviceInfos = res.data;
this.getlist(res.data.getlist)
if (num == 0) { if (num == 0) {
// this.routePlanning(res.data.latitude, // this.routePlanning(res.data.latitude,
// res.data.longitude) // res.data.longitude)
@ -1818,8 +1819,6 @@
}); });
} }
}, },
mapFun() { mapFun() {
console.log('点击了'); console.log('点击了');
uni.openLocation({ uni.openLocation({
@ -2896,10 +2895,9 @@
}, },
backDevice() { backDevice() {
// that.backgps.latitude
this.$u.post('/appVerify/device/return?returnType=1&orderNo=' + this.orderinfo.orderNo + // that.backgps.longitude
'&isInParkingArea=' + this.isInParkingArea).then(( this.$u.post('/appVerify/device/return?returnType=1&orderNo=' + this.orderinfo.orderNo +'&isInParkingArea=' + this.isInParkingArea+ '&lon=' + this.backgps.longitude +'&lat=' + this.backgps.latitude ).then((res) => {
res) => {
if (res.code === 200) { if (res.code === 200) {
this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/ukD735zCS1yQXw2aGun8'; this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/ukD735zCS1yQXw2aGun8';
@ -4813,10 +4811,10 @@
this.freeListIndex = index this.freeListIndex = index
}, },
getlist() { getlist(modelId) {
this.freList = [] this.freList = []
let data = { let data = {
areaId: this.areaInfo.areaId modelId: modelId
} }
this.$u.get('/app/fee/list?', data).then((res) => { this.$u.get('/app/fee/list?', data).then((res) => {
if (res.code === 200) { if (res.code === 200) {

View File

@ -230,19 +230,19 @@
</view> </view>
</view> </view>
</view> </view>
<view class="vip_box" v-if="info.vipType==0"> <view class="vip_box" v-if="info.vipType==0&&false">
<view class="txt1">月卡会员</view> <view class="txt1">月卡会员</view>
<view class="txt2" v-if="CarkTypeList[0].retailPrice"> 仅需{{CarkTypeList[0].retailPrice }}可享30天免费骑行权益 <view class="txt2" v-if="CarkTypeList[0].retailPrice"> 仅需{{CarkTypeList[0].retailPrice }}可享30天免费骑行权益
</view> </view>
</view> </view>
<view class="vip_box1" v-if="info.vipType==1"> <view class="vip_box1" v-if="info.vipType==1&&false">
<view class="txt1">月卡会员</view> <view class="txt1">月卡会员</view>
<view class="txt2"> 月卡会员{{ daysUntilExpiration }}天后到期</view> <view class="txt2"> 月卡会员{{ daysUntilExpiration }}天后到期</view>
<view class="btn"> <view class="btn">
立即续费 立即续费
</view> </view>
</view> </view>
<view class="fee_box"> <view class="fee_box" v-if="false">
<view class="auto_box"> <view class="auto_box">
<view class="auto_li" v-for="(item,index) in CouponList" :key="index" @click="tobuy()"> <view class="auto_li" v-for="(item,index) in CouponList" :key="index" @click="tobuy()">
<view class="txt1"> <view class="txt1">
@ -576,7 +576,7 @@
this.getCarkType() this.getCarkType()
this.$store.commit('SET_USERID', res.user.userId); this.$store.commit('SET_USERID', res.user.userId);
this.info = res.user this.info = res.user
this.calculateDaysUntilExpiration() // this.calculateDaysUntilExpiration()
if (info.role != 1) { if (info.role != 1) {
this.getareaList() this.getareaList()
} }

View File

@ -810,6 +810,7 @@
appointmentFee:0, appointmentFee:0,
reason:'', reason:'',
pageNum:1, pageNum:1,
isback:false
} }
@ -977,57 +978,64 @@
}, },
// 退 // 退
backMoney() { backMoney() {
uni.showLoading({
title:'加载中' if(this.isback==false){
}) this.isback=true
let data = { uni.showLoading({
orderNo: this.orderInfo.orderNo, title:'加载中'
dispatchFee: this.dispatchFee, })
manageFee: this.manageFee, let data = {
ridingFee: this.ridingFee, orderNo: this.orderInfo.orderNo,
appointmentFee: this.appointmentFee, dispatchFee: this.dispatchFee,
// reason: this.reason manageFee: this.manageFee,
} ridingFee: this.ridingFee,
if ( appointmentFee: this.appointmentFee,
data.dispatchFee > this.orderInfo.dispatchFee || // reason: this.reason
data.manageFee > this.orderInfo.manageFee ||
data.ridingFee > this.orderInfo.ridingFee ||
data.appointmentFee > this.orderInfo.appointmentFee
) {
uni.showToast({
title: '退款金额不能大于实际支付金额',
icon: 'none',
duration: 2000
});
return; //
}
this.$u.put('/appVerify/order/refund', data).then((res) => {
if (res.code === 200) {
// 线
this.show = false
this.showgj = false
this.showtk = false
this.orderInfo = {}
if (this.curtitidx == 0) {
this.orderList()
} else if (this.curtitidx == 3) {
this.orderList3()
}
uni.showToast({
title: '退款成功',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
} }
}).catch(error => { if (
console.error("Error fetching area data:", error); data.dispatchFee > this.orderInfo.dispatchFee ||
}); data.manageFee > this.orderInfo.manageFee ||
data.ridingFee > this.orderInfo.ridingFee ||
data.appointmentFee > this.orderInfo.appointmentFee
) {
uni.showToast({
title: '退款金额不能大于实际支付金额',
icon: 'none',
duration: 2000
});
return; //
}
this.$u.put('/appVerify/order/refund', data).then((res) => {
this.isback=false
if (res.code === 200) {
// 线
this.show = false
this.showgj = false
this.showtk = false
this.orderInfo = {}
if (this.curtitidx == 0) {
this.orderList()
} else if (this.curtitidx == 3) {
this.orderList3()
}
this.showtk=false
uni.showToast({
title: '退款成功',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
}
}, },
showtks(item) { showtks(item) {
this.orderInfo = item this.orderInfo = item

View File

@ -30,7 +30,7 @@
财务报表 财务报表
</view> </view>
</view> </view>
<view class="cont" @click="topage(2)" v-if="userinfo.sysUserId==1"> <view class="cont" @click="topage(2)">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uNfRjhtxYmMPKaX4DqTS" mode=""></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/uNfRjhtxYmMPKaX4DqTS" mode=""></image>
<view class="text"> <view class="text">
设备管理 设备管理
@ -48,7 +48,7 @@
用户页面 用户页面
</view> </view>
</view> </view>
<view class="cont" @click="topage(5)"> <view class="cont" @click="topage(5)" v-if="userinfo.sysUserId==1">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uM4rBBaXc7b3TmsqQTvz" mode=""></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/uM4rBBaXc7b3TmsqQTvz" mode=""></image>
<view class="text"> <view class="text">
车辆绑定 车辆绑定

View File

@ -559,6 +559,7 @@
manageFee: 0, manageFee: 0,
ridingFee: 0, ridingFee: 0,
appointmentFee: 0, appointmentFee: 0,
isback:false
} }
}, },
@ -1228,44 +1229,56 @@
}, },
backMoney() { backMoney() {
let data = { if(this.isback==false){
orderNo: this.orderInfo.orderNo, uni.showLoading({
dispatchFee: this.dispatchFee, title:'加载中'
manageFee: this.manageFee, })
ridingFee: this.ridingFee, this.isback=true
appointmentFee: this.appointmentFee, let data = {
// reason: this.reason orderNo: this.orderInfo.orderNo,
} dispatchFee: this.dispatchFee,
if ( manageFee: this.manageFee,
data.dispatchFee > this.orderInfo.dispatchFee || ridingFee: this.ridingFee,
data.manageFee > this.orderInfo.manageFee || appointmentFee: this.appointmentFee,
data.ridingFee > this.orderInfo.ridingFee || // reason: this.reason
data.appointmentFee > this.orderInfo.appointmentFee }
) { if (
uni.showToast({ data.dispatchFee > this.orderInfo.dispatchFee ||
title: '退款金额不能大于实际支付金额', data.manageFee > this.orderInfo.manageFee ||
icon: 'none', data.ridingFee > this.orderInfo.ridingFee ||
duration: 2000 data.appointmentFee > this.orderInfo.appointmentFee
}); ) {
return; //
}
this.$u.put('/appVerify/order/refund', data).then((res) => {
if (res.code === 200) {
// 线
this.show = false
this.showtk = false
this.getOrderDetail()
} else {
uni.showToast({ uni.showToast({
title: res.msg, title: '退款金额不能大于实际支付金额',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
return; //
} }
}).catch(error => { this.$u.put('/appVerify/order/refund', data).then((res) => {
console.error("Error fetching area data:", error); if (res.code === 200) {
}); // 线
this.show = false
this.isback=false
this.showtk = false
this.getOrderDetail()
uni.showToast({
title: '退款成功',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
}
}, },
getOrderDetail() { getOrderDetail() {
this.$u.get('/appVerify/order/' + this.orderId).then((res) => { this.$u.get('/appVerify/order/' + this.orderId).then((res) => {

View File

@ -34,6 +34,9 @@
<view class="btn" @click="bind()"> <view class="btn" @click="bind()">
确认添加 确认添加
</view> </view>
<view class="imgs">
<image src="https://lxnapi.ccttiot.com/bike/img/static/u9wFJhLZGm7rboSDySV4" mode="" @click="qrcode()"></image>
</view>
<view class="bot_btn"> <view class="bot_btn">
<view class="btn1" @click="Binddevice()"> <view class="btn1" @click="Binddevice()">
@ -56,7 +59,30 @@
接口响铃 接口响铃
</view> </view>
</view> </view>
<u-mask :show="showbind" :z-index='100' />
<view class="tip_box" v-if="showbind">
<view class="top" v-if="showbind">
<view class="tip">
操作提示
</view>
<view class="ipt_box" style="justify-content: center;">
<view class="text" style="width: 80%;text-align: center;">
该mac号已有绑定sn码是否修改为当前sn码
</view>
</view>
</view>
<view class="bots">
<view class="bot_left" @click="showbind=false ">
取消
</view>
<view class="bot_right" @click="changeBind()">
确定
</view>
</view>
</view>
<!-- <view class="bot"> <!-- <view class="bot">
<view class="btn"> <view class="btn">
退款 退款
@ -106,7 +132,8 @@
isbands: false, isbands: false,
show: false, show: false,
list: [], list: [],
hardwareInfo: {} hardwareInfo: {},
showbind:false
@ -201,6 +228,28 @@
} }
}) })
}, },
changeBind(){
this.$u.post(`/appVerify/updateSn?sn=` + this.sn + '&mac=' + this.mac+'&hardwareVersionId='+this.hardwareVersionId).then((res) => {
if (res.code === 200) {
uni.showToast({
title: '绑定成功',
icon: 'none',
duration: 2000
});
setTimeout(() => {
uni.navigateBack({
delta: 1 // delta1
});
}, 2000)
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
},
backpage() { backpage() {
uni.navigateBack({ uni.navigateBack({
delta: 1 // delta1 delta: 1 // delta1
@ -223,12 +272,17 @@
}, 2000) }, 2000)
} else { } else {
uni.showToast({ if(res.msg=='该MAC号已经存在'){
title: res.msg, this.showbind=true
icon: 'none', }else{
duration: 2000 uni.showToast({
}); title: res.msg,
icon: 'none',
duration: 2000
});
}
} }
}) })
}, },
@ -682,7 +736,121 @@
.page { .page {
padding-bottom: 250rpx; padding-bottom: 250rpx;
width: 750rpx; width: 750rpx;
.tip_box {
position: fixed;
left: 72rpx;
top: 628rpx;
width: 610rpx;
// height: 282rpx;
background: #FFFFFF;
border-radius: 30rpx 30rpx 30rpx 30rpx;
z-index: 110;
padding-bottom: 100rpx;
.top {
padding: 52rpx 38rpx 42rpx 36rpx;
.ipt_box {
margin-top: 22rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
.text {
width: 350rpx;
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
}
.ipt {
padding: 10rpx 18rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-left: 26rpx;
width: 420rpx;
height: 64rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
border: 2rpx solid #979797;
.input {
width: 80%;
}
}
}
.tip {
width: 100%;
text-align: center;
font-weight: 700;
font-size: 32rpx;
color: #3D3D3D;
}
.txt {
margin-top: 32rpx;
width: 100%;
text-align: center;
font-weight: 500;
font-size: 32rpx;
color: #3D3D3D;
}
}
.bots {
position: absolute;
width: 610rpx;
// border-top: 2rpx solid #D8D8D8;
display: flex;
flex-wrap: nowrap;
// height: 100%;
bottom: -20rpx;
.bot_left {
border-radius: 0rpx 0rpx 0rpx 30rpx;
width: 50%;
height: 86rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
font-size: 32rpx;
color: #3D3D3D;
background: #EEEEEE;
}
.bot_right {
border-radius: 0rpx 0rpx 30rpx 0rpx;
width: 50%;
height: 86rpx;
background: #4C97E7;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
// border-left: 2rpx solid #D8D8D8;
font-weight: 500;
font-size: 32rpx;
// color: #4C97E7;
}
}
}
.imgs{
margin-top: 50rpx;
width: 100%;
display: flex;
justify-content: center;
image{
width: 400rpx;
height: 400rpx;
}
}
.btn { .btn {
margin: 160rpx auto; margin: 160rpx auto;
// position: fixed; // position: fixed;