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 // #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) { onLaunch(options) {
uni.setInnerAudioOption({ uni.setInnerAudioOption({
obeyMuteSwitch: false obeyMuteSwitch: false

View File

@ -21,16 +21,9 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/my",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
} }
], ],
@ -415,30 +408,7 @@
"navigationStyle": "custom" "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", "path": "xcjs",
"style": { "style": {
@ -549,6 +519,14 @@
"enablePullDownRefresh" : false, "enablePullDownRefresh" : false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "my",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
} }
// userpages ... // userpages ...

View File

@ -2383,11 +2383,7 @@
setTimeout(() => { setTimeout(() => {
// uni.hideLoading() // uni.hideLoading()
if (this.devicesList.length == 0) { if (this.devicesList.length == 0) {
// uni.showToast({
// title: ',',
// icon: 'none',
// duration: 1500
// });
this.maskepage = 5 this.maskepage = 5
} else { } else {
let uniqueDevicesList = Array.from(new Set(this.devicesList)); let uniqueDevicesList = Array.from(new Set(this.devicesList));
@ -2573,44 +2569,7 @@
} }
} else { } else {
that.maskepage = 2 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.backfalse = this.backfalse + 1
this.cheackgps() 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 { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -3259,25 +3200,7 @@
} else { } else {
this.backfalse = this.backfalse + 1 this.backfalse = this.backfalse + 1
this.unloackdevices() 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 { } else {
this.backfalse = this.backfalse + 1 this.backfalse = this.backfalse + 1
this.loackdevice() 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); }, 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) { fail: function(error) {
// uni.showToast({
// title: '使',
// icon: 'none',
// duration: 2000
// });
// that.getmarks()
//
} }
}) })
@ -3545,25 +3428,13 @@
deviceId: options.data.deviceId 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(); let systemInfo = uni.getSystemInfoSync();
if (systemInfo.platform === 'android') { if (systemInfo.platform === 'android') {
// Android // Android
} else if (systemInfo.platform === 'ios') { } else if (systemInfo.platform === 'ios') {
// iOS
// uni.navigateTo({
// url: '/pages/wifilist/index?deviceId=' + options
// .data.deviceId + '&name=' + options.data.name
// })
} }
} }
if (options.result == false) { if (options.result == false) {
@ -3578,18 +3449,7 @@
}, 800) }, 800)
} }
// uni.showModal({
// title: '',
// content: '',
// showCancel: false,
// success: function(res) {
// // uni.navigateBack({
// // url: '../search/search'
// // });
// }
// });
// this.statusflag = false
// uni.hideLoading();
} }
break; break;
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA: case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
@ -3663,22 +3523,7 @@
this.maskepage = 5 this.maskepage = 5
}, 800) }, 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; break;
@ -3711,12 +3556,7 @@
//4 //4
createBLEConnection(e) { createBLEConnection(e) {
// this.loadingmask = true
// uni.showLoading({
// title: '..'
// })
// console.log('');
xBlufi.notifyStartDiscoverBle({ xBlufi.notifyStartDiscoverBle({
'isStart': false 'isStart': false
}); });
@ -3731,17 +3571,7 @@
deviceId: e.deviceId, deviceId: e.deviceId,
name 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() { changetips() {
if (this.countdown <= 0) { if (this.countdown <= 0) {
if (this.showTips) { if (this.showTips) {
@ -4310,11 +4122,7 @@
if (res.code == 200) { if (res.code == 200) {
} else { } else {
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
} }
}); });
}, },
@ -4706,12 +4514,7 @@
this.freeInfo = this.freList[0] this.freeInfo = this.freList[0]
this.freeListIndex = 1 this.freeListIndex = 1
console.log(this.freList, this.freeInfo, ' this.freList this.freList'); console.log(this.freList, this.freeInfo, ' this.freList this.freList');
// setTimeout(()=>{
// console.log(this.freeListIndex,'this.freeListIndexthis.freeListIndexthis.freeListIndex');
// },300)
} else { } else {
uni.showToast({ uni.showToast({
title: '未登录,请登录后尝试', title: '未登录,请登录后尝试',
@ -4729,13 +4532,7 @@
this.showtcs = true this.showtcs = true
} else { } else {
if (this.$store.getters.userId == undefined) { 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.$store.dispatch('userInfo', this.$u).then(() => {
this.deviceIndex = 1 this.deviceIndex = 1
this.type = 2 this.type = 2
@ -4785,11 +4582,7 @@
uni.showLoading({ uni.showLoading({
}) })
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// });
this.$u.post('/app/device/ring?sn=' + this.sn).then((res) => { this.$u.post('/app/device/ring?sn=' + this.sn).then((res) => {
if (res.code === 200) { if (res.code === 200) {
uni.hideLoading() uni.hideLoading()
@ -5008,109 +4801,7 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/login/login?isindex=true' 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 this.showYjTip = false
@ -5150,7 +4841,7 @@
// console.log(''); // console.log('');
this.sn = '' this.sn = ''
uni.navigateTo({ uni.navigateTo({
url: '/pages/my' url: '/page_user/my'
}) })
} else if (num == 7) { } else if (num == 7) {

View File

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

View File

@ -41,7 +41,7 @@
</view> </view>
<view class="tips"> <view class="tips">
可以免费骑行的时间 可以免费骑行的时间(分钟)
</view> </view>
</view> </view>
@ -57,7 +57,7 @@
</view> </view>
<view class="tips"> <view class="tips">
多少小时后自动退押金 多少小时后自动退押金(小时)
</view> </view>
</view> </view>
<view class="card_li"> <view class="card_li">
@ -85,7 +85,7 @@
placeholder-style="color:#C7CDD3"> {{timevalue}} placeholder-style="color:#C7CDD3"> {{timevalue}}
</view> </view>
<view class="tips"> <view class="tips">
可以免费骑行的时间 <!-- 可以免费骑行的时间 -->
</view> </view>
</view> </view>
<view class="card_li"> <view class="card_li">
@ -181,7 +181,7 @@
timeoutPrice: '', timeoutPrice: '',
timeoutTime: '', timeoutTime: '',
data: { data: {
name: '111', name: '',
instructions: '按小时计费', instructions: '按小时计费',
status: "0", status: "0",
autoRefundDeposit: '0', autoRefundDeposit: '0',
@ -294,6 +294,87 @@
} }
}, },
sub() { 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)) { if (!/^\d+$/.test(this.startingTime)) {
uni.showToast({ uni.showToast({
title: '起步时间必须为正整数', title: '起步时间必须为正整数',

View File

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

View File

@ -463,6 +463,63 @@
} }
}, },
sub() { 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 = { let data = {
...this.form ...this.form
}; };