This commit is contained in:
tx 2024-10-23 18:03:25 +08:00
parent d0e44848d4
commit 4eb311a9fa
8 changed files with 593 additions and 667 deletions

81
App.vue
View File

@ -7,86 +7,7 @@
// #endif
},
// onLaunch: function() {
// uni.removeStorageSync('userInfo');
// const updateManager = uni.getUpdateManager(); //API updateManager
// console.log('---------------------');
// console.log(updateManager);
// updateManager.onCheckForUpdate((res) => { //
// if (res.hasUpdate) {
// updateManager.onUpdateReady((res) => { //
// uni.showModal({
// title: '',
// content: '',
// success(res) {
// if (res.confirm) {
// // applyUpdate
// updateManager.applyUpdate();
// }
// }
// });
// });
// updateManager.onUpdateFailed((res) => {
// //
// uni.showModal({
// title: '',
// content: '',
// success(res) {
// if (res.confirm) {
// // applyUpdate
// updateManager.applyUpdate();
// }
// }
// });
// });
// }
// })
// // #ifdef APP-PLUS
// let userInfo = uni.getStorageSync('userInfo') || '';
// console.log("",uni.getStorageInfoSync())
// console.log("token",uni.getStorageSync('token'))
// console.log("userInfo",uni.getStorageSync('userInfo'))
// if(userInfo.id){
// uni.getStorage({
// key:"token",
// success: (res) => {
// this.globalData.token = res.token
// },
// fail: (res) => {
// console.log("token",res)
// }
// })
// uni.getStorage({
// key: 'userInfo',
// success: (res) => {
// // this.login(res.data)
// this.globalData.userInfo = res.userInfo
// uni.redirectTo({
// url:"/pages/speakingPage/speakingPage",
// fail: (res) => {
// console.log("",res)
// }
// })
// },
// fail: (res) => {
// console.log("userInfo",res)
// }
// })
// }else{
// uni.redirectTo({
// url:"/pages/login/login",
// fail:function(mes){
// console.log(mes)
// },
// success:function(mes){
// console.log(mes)
// }
// })
// }
// // #endif
// },
onLaunch(options) {
uni.setInnerAudioOption({
obeyMuteSwitch: false

View File

@ -21,16 +21,9 @@
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/my",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
],
@ -415,30 +408,7 @@
"navigationStyle": "custom"
}
},
// {
// "path": "cktcd",
// "style": {
// "navigationBarTitleText": "上传",
// "enablePullDownRefresh": false,
// "navigationStyle": "custom"
// }
// },
// {
// "path": "qrks",
// "style": {
// "navigationBarTitleText": "上传",
// "enablePullDownRefresh": false,
// "navigationStyle": "custom"
// }
// },
// {
// "path": "ks",
// "style": {
// "navigationBarTitleText": "上传",
// "enablePullDownRefresh": false,
// "navigationStyle": "custom"
// }
// },
{
"path": "xcjs",
"style": {
@ -549,6 +519,14 @@
"enablePullDownRefresh" : false,
"navigationStyle": "custom"
}
},
{
"path": "my",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
// userpages ...

View File

@ -2383,11 +2383,7 @@
setTimeout(() => {
// uni.hideLoading()
if (this.devicesList.length == 0) {
// uni.showToast({
// title: ',',
// icon: 'none',
// duration: 1500
// });
this.maskepage = 5
} else {
let uniqueDevicesList = Array.from(new Set(this.devicesList));
@ -2573,44 +2569,7 @@
}
} else {
that.maskepage = 2
// if(that.OrderdeviceInfos.onlineStatus == 1){
// // 线
// that.maskepage=2
// }else{
// // if (that.carstause) {
// // that.$u.post('/appVerify/device/return?returnType=1&orderNo=' + that.orderinfo
// // .orderNo + '&isBluetooth=true' + '&lon=' + that.backgps.longitude + '&lat=' + that.backgps
// // .latitude).then((
// // res) => {
// // if (res.code === 200) {
// // that.reboot()
// // that.isbackdevice = false
// // that.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/ukD735zCS1yQXw2aGun8';
// // that.toploadtxt = '';
// // setTimeout(() => {
// // that.maskloading = false;
// // that.getisInOrder();
// // }, 1000);
// // // that.close()
// // // that.getisInOrder()
// // } else {
// // uni.showToast({
// // title: res.msg,
// // icon: 'none',
// // duration: 2000
// // });
// // }
// // })
// // } else {
// // that.maskepage=3
// // // that.isbackdevice = false
// // // that.isnoline = true
// // }
// // }
}
}
@ -2783,15 +2742,7 @@
this.backfalse = this.backfalse + 1
this.cheackgps()
// this.toploadtxt = '';
// setTimeout(() => {
// this.maskloading = false;
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
// }, 1000);
}
})
@ -3077,17 +3028,7 @@
// this.setMapScale()
// if(!hasShownPopup){
// console.log(typeof(hasShownPopup),'hasShownPopuphasShownPopup');
// this.showTips=uni.getStorageSync('hasShownPopup')
// }else{
// this.showTips=true
// uni.setStorageSync('hasShownPopup', true);
// }
// this.$store.commit('SET_SHOWTIPS', true);
// console.log(this.polyline);
} else {
uni.showToast({
title: res.msg,
@ -3259,25 +3200,7 @@
} else {
this.backfalse = this.backfalse + 1
this.unloackdevices()
// this.toploadtxt = '';
// setTimeout(() => {
// this.maskloading = false;
// }, 1000);
// if (res.msg == '10500-----') {
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// });
// } else {
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
// }
}
})
@ -3390,29 +3313,7 @@
} else {
this.backfalse = this.backfalse + 1
this.loackdevice()
// this.toploadtxt = '';
// setTimeout(() => {
// this.maskloading = false;
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
// }, 1000);
// if (res.msg == '10500-----') {
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// });
// } else {
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
// }
}
})
@ -3465,32 +3366,14 @@
}, 1000);
// if (res.msg == '10500-----') {
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// });
// } else {
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
// }
}
})
},
fail: function(error) {
// uni.showToast({
// title: '使',
// icon: 'none',
// duration: 2000
// });
// that.getmarks()
//
}
})
@ -3545,25 +3428,13 @@
deviceId: options.data.deviceId
});
// xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvents);
// this.deviceIds = options.data.deviceId
// this.name = options.data.name
//
// let params = {
// mac: this.Bluetoothmac,
// userId: this.$store.state.user.userId
// }
let systemInfo = uni.getSystemInfoSync();
if (systemInfo.platform === 'android') {
// Android
} else if (systemInfo.platform === 'ios') {
// iOS
// uni.navigateTo({
// url: '/pages/wifilist/index?deviceId=' + options
// .data.deviceId + '&name=' + options.data.name
// })
}
}
if (options.result == false) {
@ -3578,18 +3449,7 @@
}, 800)
}
// uni.showModal({
// title: '',
// content: '',
// showCancel: false,
// success: function(res) {
// // uni.navigateBack({
// // url: '../search/search'
// // });
// }
// });
// this.statusflag = false
// uni.hideLoading();
}
break;
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
@ -3663,22 +3523,7 @@
this.maskepage = 5
}, 800)
}
// uni.showToast({
// title: '',
// icon: 'none'
// });
// uni.showModal({
// title: '',
// content: '',
// showCancel: false,
// success: function(res) {
// // uni.navigateBack({
// // url: '../search/search'
// // });
// }
// });
// this.statusflag = false
// uni.hideLoading();
}
}
break;
@ -3711,12 +3556,7 @@
//4
createBLEConnection(e) {
// this.loadingmask = true
// uni.showLoading({
// title: '..'
// })
// console.log('');
xBlufi.notifyStartDiscoverBle({
'isStart': false
});
@ -3731,17 +3571,7 @@
deviceId: e.deviceId,
name
});
// setTimeout(() => {
// uni.hideLoading()
// }, 3000)
// for (var i = 0; i < this.devicesList.length; i++) {
// if (e.deviceId === this.devicesList[i].deviceId) {
// uni.showLoading({
// title: '...'
// });
// }
// }
},
@ -3953,24 +3783,6 @@
})
},
// lockDevice() {
// if (this.orderinfo.status) {
// this.showtcs = true
// } else {
// if (this.deviceInfos.status != 1) {
// uni.showToast({
// title: '使,使',
// icon: 'none',
// duration: 2000
// });
// } else {
// this.showdevice = true;
// this.type = 1;
// this.deviceIndex = 1;
// }
// }
// },
changetips() {
if (this.countdown <= 0) {
if (this.showTips) {
@ -4310,11 +4122,7 @@
if (res.code == 200) {
} else {
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
}
});
},
@ -4706,12 +4514,7 @@
this.freeInfo = this.freList[0]
this.freeListIndex = 1
console.log(this.freList, this.freeInfo, ' this.freList this.freList');
// setTimeout(()=>{
// console.log(this.freeListIndex,'this.freeListIndexthis.freeListIndexthis.freeListIndex');
// },300)
} else {
uni.showToast({
title: '未登录,请登录后尝试',
@ -4729,13 +4532,7 @@
this.showtcs = true
} else {
if (this.$store.getters.userId == undefined) {
// this.$u.get("/getAppInfo").then((res) => {
// console.log('');
// if(res.code==200){
// this.$store.commit('SET_USERID', res.user.userId);
// }
// });
this.$store.dispatch('userInfo', this.$u).then(() => {
this.deviceIndex = 1
this.type = 2
@ -4785,11 +4582,7 @@
uni.showLoading({
})
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// });
this.$u.post('/app/device/ring?sn=' + this.sn).then((res) => {
if (res.code === 200) {
uni.hideLoading()
@ -5008,109 +4801,7 @@
uni.navigateTo({
url: '/pages/login/login?isindex=true'
});
// wx.login({
// success(res) {
// if (res.code) {
// console.log('', res);
// let areaId = uni.getStorageSync('areaId');
// uni.showLoading({
// title: '...'
// });
// that.$u.post('/loginByopenid?jsCode=' + res.code + '&areaId=' +
// areaId)
// .then(res => {
// uni.hideLoading();
// if (res.code == 200) {
// uni.setStorageSync('token', res.token);
// if (that.areaInfo.authentication == 1) {
// that.$u.get("/getAppInfo").then(res => {
// if (res.code == 200) {
// that.userinfo = res.user;
// that.$store.commit(
// 'SET_USERID', res
// .user.userId);
// if (res.user
// .isAuthentication == 0) {
// uni.hideLoading()
// that.seeDetail = true;
// that.tozf = true
// uni.navigateTo({
// url: "/page_user/idcard_test"
// });
// } else {
// that.seeDetail = true;
// that.tozf = true
// uni.hideLoading()
// console.log('3');
// uni.navigateTo({
// url: '/page_user/yj?isback=' +
// that
// .showYjTip
// });
// that.showYjTip = false
// }
// } else {
// uni.hideLoading()
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// });
// }
// });
// } else {
// that.tozf = true
// that.seeDetail = true;
// uni.hideLoading()
// console.log('4');
// uni.navigateTo({
// url: '/page_user/yj?isback=' + that
// .showYjTip
// });
// that.showYjTip = false
// }
// } else if (res.code == 501) {
// uni.hideLoading()
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
// } else {
// uni.hideLoading()
// uni.redirectTo({
// url: '/pages/login/login'
// });
// }
// }).catch(err => {
// uni.hideLoading();
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// });
// console.error('', err);
// });
// } else {
// uni.hideLoading()
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// });
// console.error('', res);
// }
// },
// fail(err) {
// uni.hideLoading()
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// });
// console.error('', err);
// }
// });
this.showYjTip = false
@ -5150,7 +4841,7 @@
// console.log('');
this.sn = ''
uni.navigateTo({
url: '/pages/my'
url: '/page_user/my'
})
} else if (num == 7) {

View File

@ -45,11 +45,12 @@
<view class="tap_cont" :class="curtitidx==2?'act1':''" @click="changeidx(2)">
待支付
</view>
<view class="tap_cont" :class="curtitidx==3?'act1':''" @click="changeidx(3)">
已完成
</view>
<view class="tap_cont" :class="curtitidx==4?'act1':''" @click="changeidx(4)" v-if="areainfo.returnVerify==01">
<view class="tap_cont" :class="curtitidx==4?'act1':''" @click="changeidx(4)"
v-if="areainfo.returnVerify==01">
待审核
</view>
</view>
@ -60,8 +61,8 @@
<u-picker mode="time" v-model="time2" :params="params" @confirm="confirm2"
:default-time='pickertime'></u-picker>
<view class="warp_box">
<swiper class="swiper" :style="{ height: swiperHeight + 'rpx' }" :current='curtitidx' @change="swiperchange" style="padding-bottom: 50rpx;"
next-margin='-20rpx'>
<swiper class="swiper" :style="{ height: swiperHeight + 'rpx' }" :current='curtitidx' @change="swiperchange"
style="padding-bottom: 50rpx;" next-margin='-20rpx'>
<swiper-item>
<view class="swiper-item ">
<view class="card" v-for="(item,index) in allList" :key="index">
@ -159,10 +160,12 @@
<view class="btn" v-if="item.status==4" @click="showtks(item)">
退款
</view>
<view class="btn_line" v-if="item.status==0||item.status==1||item.status==2||item.status==3||item.status==4">
<view class="btn_line"
v-if="item.status==0||item.status==1||item.status==2||item.status==3||item.status==4">
</view>
<view class="btn" v-if="item.status==5||item.status==6||item.status==7" style="width: 100%;" @click="toOrderDetail(item.orderNo)">
<view class="btn" v-if="item.status==5||item.status==6||item.status==7"
style="width: 100%;" @click="toOrderDetail(item.orderNo)">
查看详情
</view>
<view class="btn" v-else @click="toOrderDetail(item.orderNo)">
@ -221,12 +224,12 @@
<view class="half_info_li">
订单费用{{item.totalFee}}
</view>
<view class="half_info_li" >
<view class="half_info_li">
有无退款<span v-if="item.etRefund==null"></span>
<span v-else style="color: red;"></span>
</view>
</view>
<view class="info_li">
<view class="half_info_li">
@ -254,10 +257,12 @@
<view class="btn" v-if="item.status==4" @click="showtks(item)">
退款
</view>
<view class="btn_line" v-if="item.status==0||item.status==1||item.status==2||item.status==3||item.status==4">
<view class="btn_line"
v-if="item.status==0||item.status==1||item.status==2||item.status==3||item.status==4">
</view>
<view class="btn" v-if="item.status==5||item.status==6||item.status==7" style="width: 100%;" @click="toOrderDetail(item.orderNo)">
<view class="btn" v-if="item.status==5||item.status==6||item.status==7"
style="width: 100%;" @click="toOrderDetail(item.orderNo)">
查看详情
</view>
<view class="btn" v-else @click="toOrderDetail(item.orderNo)">
@ -292,17 +297,17 @@
<view class="lines"></view>
<view class="order_info">
<view class="info_li">
<view class="half_info_li">
租赁用户{{item.phonenumber}}
<view class="info_li">
<view class="half_info_li">
租赁用户{{item.phonenumber}}
</view>
<view class="half_info_li" v-if="item.realName">
用户姓名{{item.realName}}
</view>
<view class="half_info_li" v-else>
用户姓名--
</view>
</view>
<view class="half_info_li" v-if="item.realName">
用户姓名{{item.realName}}
</view>
<view class="half_info_li" v-else>
用户姓名--
</view>
</view>
<view class="info_li">
<view class="half_info_li">
车辆编号{{item.sn}}
@ -315,12 +320,12 @@
<view class="half_info_li">
订单费用{{item.totalFee}}
</view>
<view class="half_info_li" >
<view class="half_info_li">
有无退款<span v-if="item.etRefund==null"></span>
<span v-else style="color: red;"></span>
</view>
</view>
<view class="info_li">
<view class="half_info_li">
@ -348,10 +353,12 @@
<view class="btn" v-if="item.status==4" @click="showtks(item)">
退款
</view>
<view class="btn_line" v-if="item.status==0||item.status==1||item.status==2||item.status==3||item.status==4">
<view class="btn_line"
v-if="item.status==0||item.status==1||item.status==2||item.status==3||item.status==4">
</view>
<view class="btn" v-if="item.status==5||item.status==6||item.status==7" style="width: 100%;" @click="toOrderDetail(item.orderNo)">
<view class="btn" v-if="item.status==5||item.status==6||item.status==7"
style="width: 100%;" @click="toOrderDetail(item.orderNo)">
查看详情
</view>
<view class="btn" v-else @click="toOrderDetail(item.orderNo)">
@ -410,12 +417,12 @@
<view class="half_info_li">
订单费用{{item.totalFee}}
</view>
<view class="half_info_li" >
<view class="half_info_li">
有无退款<span v-if="item.etRefund==null"></span>
<span v-else style="color: red;"></span>
</view>
</view>
<view class="info_li">
<view class="half_info_li">
@ -440,10 +447,12 @@
<view class="btn" v-if="item.status==4" @click="showtks(item)">
退款
</view>
<view class="btn_line" v-if="item.status==0||item.status==1||item.status==2||item.status==3||item.status==4">
<view class="btn_line"
v-if="item.status==0||item.status==1||item.status==2||item.status==3||item.status==4">
</view>
<view class="btn" v-if="item.status==5||item.status==6||item.status==7" style="width: 100%;" @click="toOrderDetail(item.orderNo)">
<view class="btn" v-if="item.status==5||item.status==6||item.status==7"
style="width: 100%;" @click="toOrderDetail(item.orderNo)">
查看详情
</view>
<view class="btn" v-else @click="toOrderDetail(item.orderNo)">
@ -487,7 +496,7 @@
待官方审核
</view>
</view>
<view class="lines"></view>
<view class="order_info">
<!-- <view class="info_li">
@ -511,18 +520,18 @@
<view class="half_info_li">
租赁时长{{computedList(item)}}
</view>
</view>
<view class="info_li">
<view class="half_info_li">
订单费用{{item.totalFee}}
</view>
<view class="half_info_li">
有无退款<span v-if="item.etRefund==null"></span>
<span v-else style="color: red;"></span>
</view>
</view>
<view class="info_li">
<view class="half_info_li">
@ -550,15 +559,17 @@
<view class="btn" v-if="item.status==4" @click="showtks(item)">
退款
</view>
<view class="btn_line" v-if="item.status==0||item.status==1||item.status==2||item.status==3||item.status==4">
</view>
<view class="btn" v-if="item.status==5||item.status==6||item.status==7" style="width: 100%;" @click="toOrderDetail(item.orderNo)">
查看详情
</view>
<view class="btn" v-else @click="toOrderDetail(item.orderNo)">
查看详情
</view>
<view class="btn_line"
v-if="item.status==0||item.status==1||item.status==2||item.status==3||item.status==4">
</view>
<view class="btn" v-if="item.status==5||item.status==6||item.status==7"
style="width: 100%;" @click="toOrderDetail(item.orderNo)">
查看详情
</view>
<view class="btn" v-else @click="toOrderDetail(item.orderNo)">
查看详情
</view>
</view>
</view>
</view>
@ -658,12 +669,12 @@
</view>
<view class="ipt_box" style="width:100%;margin-top: 6rpx;">
<view class="width:10% ;">
</view>
<view style="color: #ccc;margin-left: auto; font-size: 24rpx;">
<view style="color: #ccc;margin-left: auto; font-size: 24rpx;">
最大可退款金额:{{orderInfo.dispatchFee}}
</view>
</view>
<view class="ipt_box">
<view class="text">
@ -677,12 +688,12 @@
</view>
<view class="ipt_box" style="width:100%;margin-top: 6rpx;">
<view class="width:10% ;">
</view>
<view style="color: #ccc;margin-left: auto; font-size: 24rpx;">
<view style="color: #ccc;margin-left: auto; font-size: 24rpx;">
最大可退款金额:{{orderInfo.manageFee}}
</view>
</view>
<view class="ipt_box">
<view class="text">
@ -696,12 +707,12 @@
</view>
<view class="ipt_box" style="width:100%;margin-top: 6rpx;">
<view class="width:10% ;">
</view>
<view style="color: #ccc;margin-left: auto; font-size: 24rpx;">
<view style="color: #ccc;margin-left: auto; font-size: 24rpx;">
最大可退款金额:{{orderInfo.ridingFee}}
</view>
</view>
<view class="ipt_box">
<view class="text">
@ -715,12 +726,12 @@
</view>
<view class="ipt_box" style="width:100%;margin-top: 6rpx;">
<view class="width:10% ;">
</view>
<view style="color: #ccc;margin-left: auto; font-size: 24rpx;">
<view style="color: #ccc;margin-left: auto; font-size: 24rpx;">
最大可退款金额:{{orderInfo.appointmentFee}}
</view>
</view>
<view class="ipt_box">
<view class="text">
@ -731,7 +742,7 @@
placeholder-style="color:#C7CDD3" @input="checkAndUpdate('reason')">
</view>
</view>
</view>
<view class="bot">
<view class="bot_left" @click="closetk()">
@ -748,11 +759,13 @@
</template>
<script>
import TabBar from '@/pages_admin/components/tab-bar/tab-bar.vue';
import TabBar from '@/pages_admin/components/tab-bar/tab-bar.vue';
let timerId;
let timerId1;
export default {
components: { TabBar },
components: {
TabBar
},
data() {
return {
bgc: {
@ -802,17 +815,17 @@
],
typeidx: '2',
areainfo:{},
passList:[],
dispatchFee:0,
manageFee:0,
ridingFee:0,
appointmentFee:0,
reason:'',
pageNum:1,
isback:false
areainfo: {},
passList: [],
dispatchFee: 0,
manageFee: 0,
ridingFee: 0,
appointmentFee: 0,
reason: '',
pageNum: 1,
isback: false
}
},
onShow() {
@ -823,7 +836,23 @@
if (uni.getStorageSync('adminAreaid')) {
this.areaId = uni.getStorageSync('adminAreaid')
this.orderList()
// this.orderList()
if (this.curtitidx == 0) {
this.orderList()
} else if (this.curtitidx == 1) {
this.orderList1()
} else if (this.curtitidx == 2) {
this.orderList2()
} else if (this.curtitidx == 3) {
this.orderList3()
} else if (this.curtitidx == 4) {
this.orderList4()
}
this.getArea()
}
@ -856,31 +885,31 @@
this.pageNum++;
if (this.curtitidx == 0) {
this.orderList()
} else if (this.curtitidx == 1) {
this.orderList1()
} else if (this.curtitidx == 2) {
this.orderList2()
} else if (this.curtitidx == 3) {
this.orderList3()
}else if (this.curtitidx ==4 ) {
} else if (this.curtitidx == 4) {
this.orderList4()
}
},
methods: {
getArea() {
let id = this.areaId
this.$u.get("/app/area/" + id).then((res) => {
if (res.code == 200) {
this.areainfo=res.data
this.areainfo = res.data
} else {
uni.showToast({
title: res.msg,
@ -890,22 +919,22 @@
}
});
},
formatDate(value) {
if (!value) return '';
let date = new Date(value);
let month = date.getMonth() + 1; // 01
let day = date.getDate();
let hours = date.getHours();
let minutes = date.getMinutes();
//
month = month < 10 ? '0' + month : month;
day = day < 10 ? '0' + day : day;
hours = hours < 10 ? '0' + hours : hours;
minutes = minutes < 10 ? '0' + minutes : minutes;
return `${month}-${day} ${hours}:${minutes}`;
},
formatDate(value) {
if (!value) return '';
let date = new Date(value);
let month = date.getMonth() + 1; // 01
let day = date.getDate();
let hours = date.getHours();
let minutes = date.getMinutes();
//
month = month < 10 ? '0' + month : month;
day = day < 10 ? '0' + day : day;
hours = hours < 10 ? '0' + hours : hours;
minutes = minutes < 10 ? '0' + minutes : minutes;
return `${month}-${day} ${hours}:${minutes}`;
},
searchconfirm(e) {
// console.log(e,'eeeeeeeeee');
this.typeidx = e[0].value
@ -978,11 +1007,11 @@
},
// 退
backMoney() {
if(this.isback==false){
this.isback=true
if (this.isback == false) {
this.isback = true
uni.showLoading({
title:'加载中'
title: '加载中'
})
let data = {
orderNo: this.orderInfo.orderNo,
@ -992,21 +1021,21 @@
appointmentFee: this.appointmentFee,
// reason: this.reason
}
if (
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; //
}
if (
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
this.isback = false
if (res.code === 200) {
// 线
this.show = false
@ -1018,7 +1047,7 @@
} else if (this.curtitidx == 3) {
this.orderList3()
}
this.showtk=false
this.showtk = false
uni.showToast({
title: '退款成功',
icon: 'none',
@ -1035,7 +1064,7 @@
console.error("Error fetching area data:", error);
});
}
},
showtks(item) {
this.orderInfo = item
@ -1054,7 +1083,7 @@
//
changeMoney() {
uni.showLoading({
title:'加载中'
title: '加载中'
})
let data = {
orderNo: this.orderInfo.orderNo,
@ -1104,7 +1133,7 @@
//
backDevice() {
uni.showLoading({
title:'加载中'
title: '加载中'
})
this.$u.post('/appVerify/device/return?orderNo=' + this.orderInfo.orderNo + '&returnType=2').then((
res) => {
@ -1115,10 +1144,10 @@
this.orderInfo = {}
if (this.curtitidx == 0) {
this.orderList()
this.pageNum=1
this.pageNum = 1
} else if (this.curtitidx == 1) {
this.orderList1()
this.pageNum=1
this.pageNum = 1
}
uni.showToast({
title: '还车成功',
@ -1156,8 +1185,8 @@
startTime: this.firsTime,
endTime: this.lasTime,
areaId: this.areaId,
pageSize:20,
pageNum:this.pageNum
pageSize: 20,
pageNum: this.pageNum
};
} else if (this.typeidx == 2) { // this.typeidx == 2
data = {
@ -1167,8 +1196,8 @@
startTime: this.firsTime,
endTime: this.lasTime,
areaId: this.areaId,
pageSize:20,
pageNum:this.pageNum
pageSize: 20,
pageNum: this.pageNum
};
}
this.loading = false
@ -1176,10 +1205,25 @@
if (res.code === 200) {
// 线
// this.allList = res.rows
this.allList = this.allList.concat(res.rows);
res.rows.forEach((newItem) => {
// id
const existingIndex = this.allList.findIndex(item => item.orderId == newItem
.orderId);
if (existingIndex !== -1) {
// id
this.$set(this.allList, existingIndex, newItem);
} else {
//
this.allList.push(newItem);
}
});
// this.allList = this.allList.concat(res.rows);
this.loading = true
this.swiperHeight = (this.allList.length * 440)
this.curtitidx = 0
this.$forceUpdate()
// console.log(this.polyline);
}
}).catch(error => {
@ -1196,9 +1240,9 @@
startTime: this.firsTime,
endTime: this.lasTime,
areaId: this.areaId,
pageSize:20,
pageNum:this.pageNum,
pageSize: 20,
pageNum: this.pageNum,
};
} else if (this.typeidx == 2) { // this.typeidx == 2
data = {
@ -1208,8 +1252,8 @@
startTime: this.firsTime,
endTime: this.lasTime,
areaId: this.areaId,
pageSize:20,
pageNum:this.pageNum
pageSize: 20,
pageNum: this.pageNum
};
}
this.loading = false
@ -1217,10 +1261,31 @@
if (res.code === 200) {
// 线
// this.ingList = res.rows
this.ingList = this.ingList.concat(res.rows);
this.loading = true
this.swiperHeight = this.ingList.length * 440
this.curtitidx = 1
res.rows.forEach((newItem) => {
// id
const existingIndex = this.ingList.findIndex(item => item.orderId == newItem
.orderId);
if (existingIndex !== -1) {
// id
this.$set(this.ingList, existingIndex, newItem);
} else {
//
this.ingList.push(newItem);
}
});
this.loading = true;
this.swiperHeight = this.ingList.length * 440;
this.curtitidx = 1;
this.$forceUpdate();
// this.ingList = this.ingList.concat(res.rows);
// this.loading = true
// this.swiperHeight = this.ingList.length * 440
// this.curtitidx = 1
// this.$forceUpdate()
// console.log(this.polyline);
}
}).catch(error => {
@ -1237,8 +1302,8 @@
startTime: this.firsTime,
endTime: this.lasTime,
areaId: this.areaId,
pageSize:20,
pageNum:this.pageNum
pageSize: 20,
pageNum: this.pageNum
};
} else if (this.typeidx == 2) { // this.typeidx == 2
data = {
@ -1248,8 +1313,8 @@
startTime: this.firsTime,
endTime: this.lasTime,
areaId: this.areaId,
pageSize:20,
pageNum:this.pageNum
pageSize: 20,
pageNum: this.pageNum
};
}
this.loading = false
@ -1257,16 +1322,31 @@
if (res.code === 200) {
// 线
// this.reprement = res.rows
this.reprement = this.reprement.concat(res.rows);
res.rows.forEach((newItem) => {
// id
const existingIndex = this.reprement.findIndex(item => item.orderId == newItem
.orderId);
if (existingIndex !== -1) {
// id
this.$set(this.reprement, existingIndex, newItem);
} else {
//
this.reprement.push(newItem);
}
});
// this.reprement = this.reprement.concat(res.rows);
this.swiperHeight = this.reprement.length * 440
this.loading = true
this.curtitidx = 2
this.$forceUpdate()
// console.log(this.polyline);
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
orderList4() {
let data = {};
@ -1278,8 +1358,8 @@
startTime: this.firsTime,
endTime: this.lasTime,
areaId: this.areaId,
pageSize:20,
pageNum:this.pageNum
pageSize: 20,
pageNum: this.pageNum
};
} else if (this.typeidx == 2) { // this.typeidx == 2
data = {
@ -1289,20 +1369,31 @@
startTime: this.firsTime,
endTime: this.lasTime,
areaId: this.areaId,
pageSize:20,
pageNum:this.pageNum
pageSize: 20,
pageNum: this.pageNum
};
}
this.loading = false
this.$u.get('/appVerify/order/list?', data).then((res) => {
if (res.code === 200) {
// 线
// this.passList = res.rows
this.passList = this.passList.concat(res.rows);
this.loading = true
this.curtitidx = 4
this.swiperHeight = this.passList.length * 440
// console.log(this.polyline);
res.rows.forEach((newItem) => {
// id
const existingIndex = this.passList.findIndex(item => item.orderId == newItem
.orderId);
if (existingIndex !== -1) {
// id
this.$set(this.passList, existingIndex, newItem);
} else {
//
this.passList.push(newItem);
}
});
this.loading = true;
this.curtitidx = 4;
this.swiperHeight = this.passList.length * 440;
this.$forceUpdate();
}
}).catch(error => {
console.error("Error fetching area data:", error);
@ -1318,8 +1409,8 @@
startTime: this.firsTime,
endTime: this.lasTime,
areaId: this.areaId,
pageSize:20,
pageNum:this.pageNum
pageSize: 20,
pageNum: this.pageNum
};
} else if (this.typeidx == 2) { // this.typeidx == 2
data = {
@ -1329,8 +1420,8 @@
startTime: this.firsTime,
endTime: this.lasTime,
areaId: this.areaId,
pageSize:20,
pageNum:this.pageNum
pageSize: 20,
pageNum: this.pageNum
};
}
this.loading = false
@ -1338,28 +1429,43 @@
if (res.code === 200) {
// 线
// this.alreadyList = res.rows
// console.log(this.alreadyList);
console.log('调用了');
this.alreadyList = this.alreadyList.concat(res.rows);
// console.log('');
res.rows.forEach((newItem) => {
// id
const existingIndex = this.alreadyList.findIndex(item => item.orderId == newItem
.orderId);
if (existingIndex !== -1) {
// id
this.$set(this.alreadyList, existingIndex, newItem);
} else {
//
this.alreadyList.push(newItem);
}
});
// this.alreadyList = this.alreadyList.concat(res.rows);
this.swiperHeight = this.alreadyList.length * 440
this.loading = true
this.curtitidx = 3
this.$forceUpdate()
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
async changeidx(idx) {
this.pageNum=1
this.allList=[]
this.ingList=[]
this.reprement=[]
this.alreadyList=[]
this.pageNum = 1
this.allList = []
this.ingList = []
this.reprement = []
this.alreadyList = []
if (idx == 0) {
this.orderList()
} else if (idx == 1) {
this.orderList1()
} else if (idx == 2) {
@ -1369,7 +1475,7 @@
} else if (idx == 4) {
this.orderList4()
}
},
async swiperchange(e) {
// this.curtitidx = e.detail.current
@ -1394,56 +1500,56 @@
confirm1(e) {
console.log(e, 'eeeeeeee');
this.firsTime = e.year + '-' + e.month + '-' + e.day
this.pageNum=1
this.pageNum = 1
if (this.curtitidx == 0) {
this.orderList()
} else if (this.curtitidx == 1) {
this.orderList1()
} else if (this.curtitidx == 2) {
this.orderList2()
} else if (this.curtitidx == 3) {
this.orderList3()
}else if (this.curtitidx ==4 ) {
} else if (this.curtitidx == 4) {
this.orderList4()
}
},
confirm2(e) {
this.lasTime = e.year + '-' + e.month + '-' + e.day
this.pageNum=1
this.pageNum = 1
if (this.curtitidx == 0) {
this.orderList()
} else if (this.curtitidx == 1) {
this.orderList1()
} else if (this.curtitidx == 2) {
this.orderList2()
} else if (this.curtitidx == 3) {
this.orderList3()
}else if (this.curtitidx ==4 ) {
} else if (this.curtitidx == 4) {
this.orderList4()
}
},
search() {
this.pageNum=1
this.allList=[]
this.ingList=[]
this.reprement=[]
this.alreadyList=[]
this.pageNum = 1
this.allList = []
this.ingList = []
this.reprement = []
this.alreadyList = []
clearTimeout(timerId1);
timerId1 = setTimeout(() => {
this.pageNum=1
this.pageNum = 1
if (this.curtitidx == 0) {
this.orderList()
} else if (this.curtitidx == 1) {
@ -1452,7 +1558,7 @@
this.orderList2()
} else if (this.curtitidx == 3) {
this.orderList3()
}else if (this.curtitidx ==4 ) {
} else if (this.curtitidx == 4) {
this.orderList4()
}
@ -1621,9 +1727,11 @@
font-weight: 400;
font-size: 28rpx;
color: #808080;
.half_info_li:first-child{
.half_info_li:first-child {
width: 60%;
}
.half_info_li {
width: 40%;
font-weight: 400;

View File

@ -41,7 +41,7 @@
</view>
<view class="tips">
可以免费骑行的时间
可以免费骑行的时间(分钟)
</view>
</view>
@ -57,7 +57,7 @@
</view>
<view class="tips">
多少小时后自动退押金
多少小时后自动退押金(小时)
</view>
</view>
<view class="card_li">
@ -85,7 +85,7 @@
placeholder-style="color:#C7CDD3"> {{timevalue}}
</view>
<view class="tips">
可以免费骑行的时间
<!-- 可以免费骑行的时间 -->
</view>
</view>
<view class="card_li">
@ -181,7 +181,7 @@
timeoutPrice: '',
timeoutTime: '',
data: {
name: '111',
name: '',
instructions: '按小时计费',
status: "0",
autoRefundDeposit: '0',
@ -294,6 +294,87 @@
}
},
sub() {
if (!this.data.name) {
uni.showToast({
title: '请填写套餐名称',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.data.instructions) {
uni.showToast({
title: '请填写套餐说明',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.data.freeRideTime) {
uni.showToast({
title: '请填写免费骑行时间',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.data.autoRefundDeposit) {
uni.showToast({
title: '请填写换车结算时间',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.startingPrice) {
uni.showToast({
title: '请填写起步价',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.startingTime) {
uni.showToast({
title: '请填写起步价包含的时间',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.timeoutPrice) {
uni.showToast({
title: '请填写超出价',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.timeoutTime) {
uni.showToast({
title: '请填写超出价的时间',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.data.chargingCycleValue) {
uni.showToast({
title: '请填写计费周期',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.data.cappedAmount) {
uni.showToast({
title: '请填写封顶金额',
icon: 'none',
duration: 2000
});
return; //
}
if (!/^\d+$/.test(this.startingTime)) {
uni.showToast({
title: '起步时间必须为正整数',

View File

@ -106,34 +106,51 @@
</view> -->
<view class="card">
<view class="card_li" @click="showpart=true">
<view class="card_left">
收费模版
</view>
<view class="card_right">
<span v-if="data.ruleIds">{{getAccessoryNames()}}</span>
<view class="iconfont icon-xiangyou1 " style="color: #CBCBCB;">
<view class="card_li1">
<view class="card_top" @click="showpart=true">
<view class="card_left">
收费模版
</view>
<view class="card_right">
<view class="iconfont icon-xiangyou1 " style="color: #CBCBCB;">
</view>
</view>
</view>
<!-- <view class="taocan" v-if="data.ruleIds">
{{getAccessoryNames()}}
</view> -->
<view class="taocan" v-if="data.ruleIds">
<view v-for="(name, index) in getAccessoryNames()" :key="index" style="width: 100%; display: flex;margin-top: 10rpx;">
<view class="tc_li">
{{ name }}
</view>
</view>
</view>
<!-- <span v-if="data.ruleIds">{{getAccessoryNames()}}</span> -->
</view>
</view>
<u-mask :show="showpart" :z-index='100' />
<u-mask :show="showpart" :z-index='100' @click="closepart()"/>
<view class="choose_part" v-if="showpart">
<view class="tit">
选择收费方式
</view>
<view class="part_box">
<view class="part" v-for="(item, index) in Accessorylist" :key="index" @click="chooseAcc(item.ruleId)"
:class="data.ruleIds.includes(item.ruleId) ? 'act' : ''">
{{item.name}}
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJNlGEGmN0F4AuPJmOZn" mode=""
v-if="data.ruleIds.includes(item.ruleId)">
</image>
</view>
<view class="" v-for="(item, index) in Accessorylist" :key="index" @click="chooseAcc(item.ruleId)" style="width: 100%; display: flex;margin-top: 10rpx;">
<view class="part"
:class="data.ruleIds.includes(item.ruleId) ? 'act' : ''">
{{item.name}}
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJNlGEGmN0F4AuPJmOZn" mode=""
v-if="data.ruleIds.includes(item.ruleId)">
</image>
</view>
</view>
</view>
<view class="btn" @click="subacc()">
确定
@ -199,6 +216,9 @@
},
methods: {
closepart(){
this.showpart=false
},
getmodelInfo() {
@ -213,10 +233,12 @@
},
backpage(){
uni.redirectTo({
url:'/pages_admin/worke/CarModel'
url:'/pages_adminSet/CarModel'
})
},
sub() {
if (!this.data.model) {
uni.showToast({
title: '请填写车型名称',
@ -243,7 +265,15 @@
}
if (!this.data.fullEndurance) {
uni.showToast({
title: '请填写亏电电压',
title: '请填写续航公里数',
icon: 'none',
duration: 2000
});
return;
}
if (this.data.ruleIds.length<1) {
uni.showToast({
title: '请选择收费模版',
icon: 'none',
duration: 2000
});
@ -302,14 +332,23 @@
getAccessoryNames(accessoryIds) {
// accessoryIds Accessorylist name
// accessoryIds id Accessorylist name
const accessoryNames = this.data.ruleIds.map(id => {
console.log(id);
const item = this.Accessorylist.find(accessory => accessory.ruleId === id);
return item ? item.name : '';
});
// const accessoryNames = this.data.ruleIds.map(id => {
// console.log(id);
// const item = this.Accessorylist.find(accessory => accessory.ruleId === id);
// return item ? item.name : '';
// });
// name
return accessoryNames.filter(name => name).join(', ');
// // name
// return accessoryNames.filter(name => name).join(', ');
// accessoryIds Accessorylist name
const accessoryNames = this.data.ruleIds.map(id => {
const item = this.Accessorylist.find(accessory => accessory.ruleId === id);
return item ? item.name : '';
});
//
return accessoryNames.filter(name => name);
},
getAccessorylist() {
let data ={
@ -374,7 +413,7 @@
justify-content: center;
// width: 160rpx;
// height: 60rpx;
padding: 4rpx 8rpx;
padding: 10rpx 20rpx;
background: #F0F0F0;
border-radius: 6rpx 6rpx 6rpx 6rpx;
border: 1rpx solid #F0F0F0;
@ -472,7 +511,58 @@
.card_li:last-child {
border-bottom: 1rpx solid #fff;
}
.card_li1{
padding-top: 24rpx;
display: flex;
flex-wrap: wrap;
.taocan{
margin-top: 10rpx;
padding-bottom: 20rpx;
display: flex;
flex-wrap: wrap;
.tc_li{
padding: 8rpx 14rpx;
margin-right: 20rpx;
background: #DCEDFF;
border-radius: 6rpx 6rpx 6rpx 6rpx;
font-weight: 400;
font-size: 26rpx;
color: #4297F3;
}
}
.card_top{
display: flex;
flex-wrap: nowrap;
align-content: center;
justify-content: space-between;
width: 100%;
border-bottom: 1rpx solid #D8D8D8;
padding-bottom: 18rpx;
.card_left {
font-weight: 400;
font-size: 30rpx;
color: #3D3D3D;
}
.card_right {
display: flex;
flex-wrap: nowrap;
align-items: center;
span {
font-weight: 400;
font-size: 30rpx;
color: #3D3D3D;
}
.input {
text-align: right;
/* 输入框内容靠右显示 */
}
}
}
}
.card_li {
padding-top: 24rpx;
display: flex;

View File

@ -463,6 +463,63 @@
}
},
sub() {
if (!this.form.areaName) {
uni.showToast({
title: '请填写运营期名称',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.form.dispatchFee) {
uni.showToast({
title: '请填写运营区外调度费',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.form.vehicleManagementFee) {
uni.showToast({
title: '请填写停车点外调度费',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.form.error) {
uni.showToast({
title: '请填写还车误差',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.form.deposit) {
uni.showToast({
title: '请填写骑行押金',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.form.undercharge) {
uni.showToast({
title: '请填写骑行最低电量',
icon: 'none',
duration: 2000
});
return; //
}
if (!this.form.autoReplacementOrder) {
uni.showToast({
title: '请填写自动生成换电工单电量',
icon: 'none',
duration: 2000
});
return; //
}
let data = {
...this.form
};