This commit is contained in:
吴鹏 2024-05-29 18:02:01 +08:00
parent d0fae46441
commit d7837ce2d7
10 changed files with 539 additions and 260 deletions

View File

@ -16,8 +16,11 @@
<view class="inp"> <view class="inp">
计费金额 <input type="text" v-model="jfmoney" placeholder="请输入计费金额" /> /小时 计费金额 <input type="text" v-model="jfmoney" placeholder="请输入计费金额" /> /小时
</view> </view>
<!-- <view class="inp">
封顶金额 <input type="text" v-model="rmoney" placeholder="请输入总封顶金额" /> /
</view> -->
<view class="inp"> <view class="inp">
封顶金额 <input type="text" v-model="fdmoney" placeholder="请输入封顶金额" /> / <text style="margin-right: 28rpx;">总封顶</text> <input type="text" v-model="fdmoney" placeholder="请输入封顶金额" />
</view> </view>
<view class="inp"> <view class="inp">
免费时长 <input type="text" v-model="time" placeholder="请输入免费时长" /> 分钟 免费时长 <input type="text" v-model="time" placeholder="请输入免费时长" /> 分钟
@ -50,7 +53,8 @@
storeId: '', storeId: '',
jfmoney: '', jfmoney: '',
fdmoney: '', fdmoney: '',
time: '' time: '',
rmoney:''
} }
}, },
onLoad(option) { onLoad(option) {
@ -96,7 +100,7 @@
feeMode: this.value, feeMode: this.value,
feePrice: this.jfmoney, feePrice: this.jfmoney,
feeMaxPrice: this.fdmoney, feeMaxPrice: this.fdmoney,
feeFreeTime: this.time feeFreeTime: this.time,
} }
this.$u.put('/agent/store', data).then(res => { this.$u.put('/agent/store', data).then(res => {
if (res.code == 200) { if (res.code == 200) {
@ -235,7 +239,7 @@
.listobj { .listobj {
width: 680rpx; width: 680rpx;
height: 362rpx; height: 450rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
margin: auto; margin: auto;

View File

@ -7,7 +7,7 @@
<view class="zhanghu"> <view class="zhanghu">
<view class="zhtitle"> <view class="zhtitle">
<text>账户余额</text> <text class="tx" @click="btnnav(9)">提现明细</text> <text>账户余额</text> <text class="tx" style="margin-right: 10rpx;" @click="btnnav(9)">提现明细</text>
</view> </view>
<view class="zhje"> <view class="zhje">
<text>1163.916</text> <text class="btntx" @click="btnnav(10)">立即提现</text> <text>1163.916</text> <text class="btntx" @click="btnnav(10)">立即提现</text>

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="page"> <view class="page">
<u-navbar title="提现明细详情" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='38'></u-navbar> <u-navbar title="提现明细详情" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='58'></u-navbar>
<view class="list"> <view class="list">
<view class="listbox"> <view class="listbox">
<view class="title"> <view class="title">
@ -11,7 +11,7 @@
提现人: 提现人:
</view> </view>
<view class="right"> <view class="right">
哈哈 {{xqobj.userName}}
</view> </view>
</view> </view>
<view class="listli"> <view class="listli">
@ -19,7 +19,7 @@
提现ID: 提现ID:
</view> </view>
<view class="right"> <view class="right">
20921 {{xqobj.orderId}}
</view> </view>
</view> </view>
<view class="listli"> <view class="listli">
@ -27,7 +27,7 @@
手机号: 手机号:
</view> </view>
<view class="right"> <view class="right">
12312345578 {{xqobj.mobile}}
</view> </view>
</view> </view>
<view class="listli"> <view class="listli">
@ -35,7 +35,7 @@
提现金额: 提现金额:
</view> </view>
<view class="right"> <view class="right">
1378.0 {{xqobj.amount}}
</view> </view>
</view> </view>
<view class="listli"> <view class="listli">
@ -43,7 +43,7 @@
到账金额: 到账金额:
</view> </view>
<view class="right"> <view class="right">
<text>1336.66</text> <text style="color: #FF4444;">{{xqobj.arrivalAmount}}</text>
</view> </view>
</view> </view>
<view class="listli"> <view class="listli">
@ -51,7 +51,7 @@
提现总额: 提现总额:
</view> </view>
<view class="right"> <view class="right">
6370.00 {{xqobj.totalAmount}}
</view> </view>
</view> </view>
<view class="listli"> <view class="listli">
@ -59,7 +59,7 @@
账户余额: 账户余额:
</view> </view>
<view class="right"> <view class="right">
1182.15 {{xqobj.balance}}
</view> </view>
</view> </view>
<view class="listli"> <view class="listli">
@ -67,7 +67,7 @@
提现时间: 提现时间:
</view> </view>
<view class="right"> <view class="right">
2024-03-07 14:39:36 {{xqobj.createTime}}
</view> </view>
</view> </view>
<view class="listli"> <view class="listli">
@ -75,32 +75,44 @@
订单编号: 订单编号:
</view> </view>
<view class="right"> <view class="right">
20210912211223562 {{xqobj.orderNo}}
</view> </view>
</view> </view>
<view class="listli"> <view class="listli">
<view class="left"> <view class="left">
审核状态: 审核状态:
</view> </view>
<view class="right"> <view class="right" v-if="xqobj.status == 1">
待审核 待审核
</view> </view>
<view class="right" v-if="xqobj.status == 2">
审核通过
</view>
<view class="right" v-if="xqobj.status == 3">
驳回
</view>
<view class="right" v-if="xqobj.status == 4">
已打款
</view>
</view> </view>
<view class="listli"> <view class="listli">
<view class="left"> <view class="left">
提现类型: 提现类型:
</view> </view>
<view class="right"> <view class="right" v-if="xqobj.type == 1">
<u-icon name="red-packet" size="30" style="margin-right: 5rpx;"></u-icon> 线
</view>
<view class="right" v-if="xqobj.type == 2">
<u-icon name="red-packet" size="30" style="margin-right: 5rpx;"></u-icon> 线 <u-icon name="red-packet" size="30" style="margin-right: 5rpx;"></u-icon> 线
</view> </view>
</view> </view>
</view> </view>
<view class="pic"> <view class="pic">
<view class=""> <view class="" style="font-weight: 600;">
图片: 图片:
</view> </view>
<image src="https://api.ccttiot.com/smartmeter/img/static/uH9hJJuhEDQw4JBGy9kS" mode=""></image> <image :src="xqobj.picture" mode=""></image>
</view> </view>
</view> </view>
@ -111,16 +123,31 @@
export default { export default {
data() { data() {
return { return {
orderId:'',
xqobj:{}
} }
}, },
onLoad(option) {
this.orderId = option.orderId
this.getxq()
},
methods: { methods: {
getxq(){
this.$u.get(`/agent/withdraw/${this.orderId}`).then(res=>{
if(res.code == 200){
this.xqobj = res.data
}
})
}
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
/deep/ .u-title,
/deep/ .uicon-nav-back {
padding-bottom: 40rpx;
}
page { page {
background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%); background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
@ -145,7 +172,7 @@
padding: 28rpx 30rpx; padding: 28rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
.title{ .title{
font-weight: 500; font-weight: 600;
font-size: 28rpx; font-size: 28rpx;
color: #3D3D3D; color: #3D3D3D;
border-bottom: 1px solid #D8D8D8; border-bottom: 1px solid #D8D8D8;

View File

@ -1,6 +1,7 @@
<template> <template>
<view class="page"> <view class="page">
<u-navbar title="申请提现" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='38'></u-navbar> <u-navbar title="申请提现" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='38'></u-navbar>
<view class="box"> <view class="box">
<view class="scpic"> <view class="scpic">
<view class=""> <view class="">
@ -19,22 +20,24 @@
</view> </view>
<view class="tx"> <view class="tx">
<view class="qian"> <view class="qian">
<text style="font-weight: 500;font-size: 40rpx;color: #3D3D3D;vertical-align: bottom;"></text> <input type="text" placeholder="请输入提现金额(请输入整数)"/> <text
</view> <text class="qb">全部提现</text> style="font-weight: 500;font-size: 44rpx;color: #3D3D3D;vertical-align: bottom;margin-right:10rpx;"></text>
<input type="text" v-model="xutx" placeholder="请输入提现金额(请输入整数)" />
</view> <text class="qb" @click="btnqbtx">全部提现</text>
</view> </view>
<view class="ketx"> <view class="ketx">
<view class=""> <view class="">
可提现金额<text>937.19</text> 可提现金额<text>{{txobj.balance}}</text>
</view> </view>
<view class="mx" @click="btnmx"> <view class="mx" @click="btnmx">
提现明细 提现明细
</view> </view>
</view> </view>
<view class="zje"> <view class="zje">
总金额<text>1184.12</text> 总金额<text>{{txobj.totalAmount}}</text>
</view> </view>
<view class="sxf"> <view class="sxf">
提现手续费<text>3%</text> 提现手续费<text>{{txobj.serviceRate}}%</text>
</view> </view>
</view> </view>
@ -43,19 +46,19 @@
提现说明: 提现说明:
</view> </view>
<view class="hong"> <view class="hong">
-提现时间每月6-31提取可提现金额上月及之前费用),提现率3% -提现时间每月提取可提现金额上月及之前费用),提现率{{txobj.serviceRate}}%
</view> </view>
<view class="hui"> <view class="hui">
-提现额度单笔提现金额最低1 -提现额度单笔提现金额最低{{txobj.minAmount}}
</view> </view>
<view class="hui"> <view class="hui">
-到账时间3个工作日 -到账时间3个工作日
</view> </view>
<view class="hui"> <view class="hui">
-每笔提现不能超过500请保存收款码上传不要上传截图收款码 -每笔提现不能超过{{txobj.maxAmount}}请保存收款码上传不要上传截图收款码
</view> </view>
</view> </view>
<view class="btnanniu"> <view class="btnanniu" @click="btnljtx">
立即提现 立即提现
</view> </view>
@ -67,24 +70,66 @@
export default { export default {
data() { data() {
return { return {
userImgs:'' userImgs: '',
ketx: 500,
zongtx: 600,
xutx: '',
txobj: {}
} }
}, },
onLoad() { onLoad() {
this.getQiniuToken() this.getQiniuToken()
}, },
onShow() {
this.getguize()
},
methods: { methods: {
btnqbtx() {
this.xutx = this.txobj.balance
},
btnmx() { btnmx() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/detail/index' url: '/pages/detail/index'
}) })
}, },
btnljtx() {
let data = {
picture:this.userImgs,
amount:this.xutx,
serviceRate:this.txobj.serviceRate,
type:1
}
this.$u.post('/agent/withdraw',data).then(res => {
if(res.code == 200){
uni.showToast({
title: '提现成功',
icon: 'none',
duration: 2000
})
this.xutx = ''
this.getguize()
}else if(res.code == 500){
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
},
getguize() {
this.$u.get('/agent/withdraw/rule').then(res => {
if (res.code == 200) {
this.txobj = res.data
}
})
},
getQiniuToken() { getQiniuToken() {
this.$u.get("/common/qiniu/uploadInfo").then((res) => { this.$u.get("/common/qiniu/uploadInfo").then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.token = res.token this.token = res.token
} }
}); })
}, },
picbtn() { picbtn() {
let _this = this let _this = this
@ -103,11 +148,11 @@
key: 'smartmeter/img/' + math key: 'smartmeter/img/' + math
}, },
success: function(res) { success: function(res) {
console.log(res,'resres');
let str = JSON.parse(res.data) let str = JSON.parse(res.data)
_this.userImgs = 'https://api.ccttiot.com/' + str.key _this.userImgs = 'https://api.ccttiot.com/' + str.key
console.log(_this.userImgs);
} }
}); })
} }
}) })
}, },
@ -127,6 +172,7 @@
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
.box { .box {
.btnanniu { .btnanniu {
width: 680rpx; width: 680rpx;
@ -144,33 +190,39 @@
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} }
.txsm { .txsm {
margin-top: 36rpx; margin-top: 36rpx;
padding-left: 58rpx; padding-left: 58rpx;
padding-right: 58rpx; padding-right: 58rpx;
box-sizing: border-box; box-sizing: border-box;
.title { .title {
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
color: #808080; color: #808080;
} }
.hong { .hong {
font-size: 24rpx; font-size: 24rpx;
color: #FF4444; color: #FF4444;
margin-top: 10rpx; margin-top: 10rpx;
} }
.hui { .hui {
font-size: 24rpx; font-size: 24rpx;
color: #808080; color: #808080;
margin-top: 16rpx; margin-top: 16rpx;
} }
} }
margin-top: 32rpx; margin-top: 32rpx;
width: 750rpx; width: 750rpx;
height: 1440rpx; height: 1440rpx;
background: #F4F5F7; background: #F4F5F7;
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
padding-top: 22rpx; padding-top: 22rpx;
.txje { .txje {
width: 680rpx; width: 680rpx;
height: 352rpx; height: 352rpx;
@ -182,53 +234,65 @@
padding-right: 30rpx; padding-right: 30rpx;
padding-left: 30rpx; padding-left: 30rpx;
box-sizing: border-box; box-sizing: border-box;
.title { .title {
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.zje { .zje {
margin-top: 16rpx; margin-top: 16rpx;
font-size: 24rpx; font-size: 24rpx;
color: #3D3D3D; color: #3D3D3D;
text { text {
color: #FF8157; color: #FF8157;
} }
} }
.sxf { .sxf {
margin-top: 16rpx; margin-top: 16rpx;
font-size: 20rpx; font-size: 20rpx;
color: #3D3D3D; color: #3D3D3D;
text { text {
color: #FF4444; color: #FF4444;
} }
} }
.ketx { .ketx {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 38rpx; margin-top: 38rpx;
font-size: 24rpx; font-size: 24rpx;
color: #3D3D3D; color: #3D3D3D;
text { text {
color: #FF4444; color: #FF4444;
} }
.mx { .mx {
color: #808080; color: #808080;
} }
} }
.tx { .tx {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 16rpx; margin-top: 16rpx;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
padding-bottom: 12rpx; padding-bottom: 8rpx;
.qb { .qb {
font-size: 24rpx; font-size: 24rpx;
color: #1DBE7B; color: #1DBE7B;
margin-top: 15rpx; margin-top: 15rpx;
} }
.qian { .qian {
display: flex; display: flex;
input { input {
margin-top: 10rpx; margin-top: 10rpx;
width: 440rpx; width: 440rpx;
@ -236,6 +300,7 @@
} }
} }
} }
.scpic { .scpic {
width: 680rpx; width: 680rpx;
height: 300rpx; height: 300rpx;
@ -246,6 +311,7 @@
padding-left: 48rpx; padding-left: 48rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
.tp { .tp {
width: 166rpx; width: 166rpx;
height: 166rpx; height: 166rpx;

View File

@ -3,33 +3,52 @@
<u-navbar title="提现明细" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' <u-navbar title="提现明细" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='58'></u-navbar> height='58'></u-navbar>
<view class="title"> <view class="title">
总提现金额<text>6370</text> 总提现金额<text>{{totalWithdraw}}</text>
</view> </view>
<view class="bdlist"> <view class="bdlist">
<view class="list" v-for="(item,index) in 3" :key="index" @click="btnnav"> <view class="list" @scrolltolower="onReachBottom" v-for="(item,index) in wateringList" :key="index">
<view class="left"> <view class="left">
<view class="bh"> <view class="bh">
fadgfryt16874234 <u-icon name="file-text" size="30" style="margin-left: 5rpx;"></u-icon> {{item.orderNo}}<u-icon name="file-text" size="40" style="margin-left: 5rpx;"
@click="btnfz(item.orderNo)"></u-icon>
</view> </view>
<view class="sh"> <view class="sh" v-if="item.status == 1">
待审核 待审核
</view> </view>
<view class="sh" v-if="item.status == 2">
审核通过
</view>
<view class="sh" v-if="item.status == 3">
驳回
</view>
<view class="sh" v-if="item.status == 4">
已打款
</view>
<view class="sj"> <view class="sj">
2024-03-07 14:39:20 {{item.createTime}}
</view> </view>
</view> </view>
<view class="right"> <view class="right" @click="btnnav(item.orderId)">
<view class="xia"> <view><u-icon name="arrow-right"></u-icon></view>
<view class="xia" v-if="item.type == 1">
<u-icon name="red-packet" size="30" style="margin-right: 5rpx;"></u-icon> 线
</view>
<view class="xia" v-if="item.type == 2">
<u-icon name="red-packet" size="30" style="margin-right: 5rpx;"></u-icon> 线 <u-icon name="red-packet" size="30" style="margin-right: 5rpx;"></u-icon> 线
</view> </view>
<view class="je"> <view class="je">
1378.00 {{item.totalAmount}}
</view> </view>
</view> </view>
</view> </view>
<view class="noshuju">
没有更多数据了 <view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;"
v-if="showflag">
<image style="width: 448rpx;height: 448rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/ufLi6IZd5kh1MIEZFYTo" mode=""></image>
<view class="" style="font-size: 30rpx;color: #ccc;margin-top: 30rpx;">暂无更多记录...</view>
</view> </view>
</view> </view>
</view> </view>
@ -39,13 +58,69 @@
export default { export default {
data() { data() {
return { return {
pagenum: 1,
wateringList: [],
pagesize: 10, //
isLoading: false, //
noMoreData: false, //
total: 0,
bgc: {
background: '#25CE88'
},
totalWithdraw:'',
showflag: false
} }
}, },
onShow() {
this.wateringList = []
this.getlist()
},
methods: { methods: {
btnnav(){ getlist() {
this.$u.get('/agent/withdraw/list?pageNum=' + this.pagenum + '&pageSize=' + this.pagesize).then(res => {
if (res.code == 200) {
this.total = res.total;
if (this.total > 0) {
this.showflag = false
} else {
this.showflag = true
}
this.totalWithdraw = res.totalWithdraw
this.wateringList = this.wateringList.concat(res.rows);
this.pagenum++;
} else {
//
this.noMoreData = true;
}
this.isLoading = false
})
},
onReachBottom() {
let sum = this.total / this.pagesize
if (this.pagenum - 1 < sum) {
this.getlist();
} else {
uni.showToast({
title: '没有更多数据了',
icon: 'none',
duration: 1000
});
}
},
btnfz(text) {
uni.setClipboardData({
data: text,
success: function(res) {
// console.log('', text);
uni.showToast({
title: '复制成功',
});
}
});
},
btnnav(orderId) {
uni.navigateTo({ uni.navigateTo({
url:'/pages/detail/detailed/index' url: '/pages/detail/detailed/index?orderId=' + orderId
}) })
} }
} }
@ -59,14 +134,13 @@
} }
page { page {
background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%); // background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
border-radius: 0rpx 0rpx 0rpx 0rpx; // border-radius: 0rpx 0rpx 0rpx 0rpx;
background-color: #F4F5F7;
} }
.page { .page {
width: 750rpx; width: 750rpx;
position: fixed;
top: 0;
left: 0;
.title { .title {
width: 750rpx; width: 750rpx;
height: 98rpx; height: 98rpx;
@ -77,18 +151,23 @@
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #3D3D3D; color: #3D3D3D;
position: fixed;
z-index: 99;
text { text {
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #FF8157; color: #FF8157;
} }
} }
.bdlist { .bdlist {
width: 750rpx; width: 750rpx;
height: 1624rpx; height:100%;
margin-top: 105rpx;
background: #F4F5F7; background: #F4F5F7;
padding: 24rpx 34rpx; padding: 24rpx 34rpx;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 200rpx !important;
.noshuju { .noshuju {
width: 100%; width: 100%;
text-align: center; text-align: center;
@ -96,6 +175,7 @@
color: #979797; color: #979797;
margin-top: 38rpx; margin-top: 38rpx;
} }
.list { .list {
width: 680rpx; width: 680rpx;
height: 208rpx; height: 208rpx;
@ -106,17 +186,20 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 24rpx; margin-bottom: 24rpx;
.left { .left {
.bh { .bh {
font-size: 28rpx; font-size: 28rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.sh { .sh {
font-weight: 700; font-weight: 600;
font-size: 32rpx; font-size: 30rpx;
color: #3D3D3D; color: #3D3D3D;
margin-top: 16rpx; margin-top: 16rpx;
} }
.sj { .sj {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
@ -124,18 +207,21 @@
margin-top: 16rpx; margin-top: 16rpx;
} }
} }
.right { .right {
text-align: right; text-align: right;
.xia { .xia {
font-size: 28rpx; font-size: 28rpx;
color: #3D3D3D; color: #3D3D3D;
margin-top: 26rpx; margin-top: 15rpx;
} }
.je { .je {
font-weight: 500; font-weight: 500;
font-size: 40rpx; font-size: 40rpx;
color: #FF8157; color: #FF8157;
margin-top: 16rpx; margin-top: 15rpx;
} }
} }
} }

View File

@ -9,7 +9,7 @@
</view> </view>
<view class="ditu"> <view class="ditu">
<view class="dtxs"> <view class="dtxs">
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" <map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMapClick"
:show-location="true" :markers="covers" :scale="mapScale" /> :show-location="true" :markers="covers" :scale="mapScale" />
</view> </view>
<view class="tubiao"> <view class="tubiao">
@ -71,7 +71,10 @@
<!-- 计价规则{{zujieobj.priceStandard.feePrice}}/小时 --> <!-- 计价规则{{zujieobj.priceStandard.feePrice}}/小时 -->
<text v-if="zujieobj.priceStandard.feeMode == 2">{{zujieobj.priceStandard.feePrice}}/小时</text> <text v-if="zujieobj.priceStandard.feeMode == 2">{{zujieobj.priceStandard.feePrice}}/小时</text>
<text v-if="zujieobj.priceStandard.feeMode == 1">{{zujieobj.priceStandard.feePrice}}/半小时</text> <text v-if="zujieobj.priceStandard.feeMode == 1">{{zujieobj.priceStandard.feePrice}}/半小时</text>
{{zujieobj.priceStandard.feeFreeTime}}分钟免费不足一小时按一小时计费日封顶{{zujieobj.priceStandard.feePrice * 24}}总封顶{{zujieobj.priceStandard.feeMaxPrice}} {{zujieobj.priceStandard.feeFreeTime}}分钟免费
<text v-if="zujieobj.priceStandard.feeMode == 2">不足一小时按一小时计费</text>
<text v-if="zujieobj.priceStandard.feeMode == 1">不足半小时按半小时计费</text>
总封顶{{zujieobj.priceStandard.feeMaxPrice}}
</view> </view>
<view class="tits"> <view class="tits">
租借信息 租借信息
@ -100,7 +103,7 @@
<text>订单编号</text> <text>{{zujieobj.orderNo}} <text class="fz" <text>订单编号</text> <text>{{zujieobj.orderNo}} <text class="fz"
@click="copyText('S1269876456368798741201')">复制</text> </text> @click="copyText('S1269876456368798741201')">复制</text> </text>
</view> </view>
<view class="huan"> <view class="huan" @click="btnsale(zujieobj.orderId)">
不想还了留下充电宝 不想还了留下充电宝
</view> </view>
</view> </view>
@ -122,7 +125,6 @@
second: false second: false
}, },
dateindex: 1, dateindex: 1,
latitude: '', // latitude: '', //
longitude: '', // longitude: '', //
covers: [], // covers: [], //
@ -152,7 +154,9 @@
onShow() { onShow() {
this.jmlogin() this.jmlogin()
this.getuser() this.getuser()
setTimeout(()=>{
this.getorder() this.getorder()
},1000)
this.startTimer() this.startTimer()
}, },
onHide() { onHide() {
@ -163,6 +167,59 @@
this.clearTimer() this.clearTimer()
}, },
methods: { methods: {
btnsale(orderId){
this.$u.put(`/app/order/rent/${orderId}/toSale`).then(res => {
if(res.code == 200){
let orderNo = res.data
let data = {
orderNo:orderNo,
channelId:1
}
this.$u.put('/app/order/sale/prePay',data).then(res => {
if(res.code == 200){
uni.requestPayment({
provider: 'wxpay',
timeStamp: res.data.timeStamp,
nonceStr: res.data.nonceStr,
package: res.data.packageVal,
signType: res.data.signType,
paySign: res.data.paySign,
success: (res) => {
// console.log(res, '');
this.$u.put(`/app/order/sale/${orderNo}/refreshPayResult`).then(res =>{
if(res.code == 200){
this.zujieflag = false
}
})
},
fail(err) {
//
uni.showToast({
title: '支付失败',
icon: 'none',
duration: 2000
});
}
})
}else if(res.code == 500){
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
}else if(res.code == 500){
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
},
startTimer() { startTimer() {
// //
this.clearTimer(); this.clearTimer();
@ -235,6 +292,8 @@
} }
} }
} }
}else{
this.zujieflag = false
} }
} }
}) })
@ -243,7 +302,7 @@
updateMarkers() { updateMarkers() {
this.mapContext.getScale({ this.mapContext.getScale({
success: (res) => { success: (res) => {
this.covers = []; // this.covers = []
if (res.scale <= 14) { if (res.scale <= 14) {
this.addMarkersWithoutLabels(); this.addMarkersWithoutLabels();
} else { } else {

View File

@ -26,17 +26,30 @@
<text v-if="item.status == 5">免费取消</text> <text v-if="item.status == 5">免费取消</text>
<text v-if="item.status == 6">租转卖</text> <text v-if="item.status == 6">租转卖</text>
</view> </view>
<view class="bh"> <view class="bh" v-if="item.sale.money">
<text>订单金额</text> <text>{{item.money == null ? (zujiemoney > item.priceStandard.feeMaxPrice ? item.priceStandard.feeMaxPrice : zujiemoney) : item.money}}</text> <text>销售金额</text> <text>{{item.sale.money / 100}}</text>
</view>
<view class="bh" v-else>
<text>订单金额</text>
<text>{{item.money > item.priceStandard.feeMaxPrice ? item.priceStandard.feeMaxPrice : item.money}}</text>
</view> </view>
<view class="bh"> <view class="bh">
<text>租借时间</text> <text>{{item.startRentTime}}</text> <text>租借时间</text> <text>{{item.startRentTime}}</text>
</view> </view>
<view class="bh"> <view class="bh" v-if="item.sale.payTime">
<text>租转卖时间</text> <text>{{item.sale.payTime}}</text>
</view>
<view class="bh" v-else>
<text>租借时长</text> <text>{{item.remainingTime}}</text> <text>租借时长</text> <text>{{item.remainingTime}}</text>
</view> </view>
</view> </view>
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;"
v-if="showflag">
<image style="width: 448rpx;height: 448rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/ufLi6IZd5kh1MIEZFYTo" mode=""></image>
<view class="" style="font-size: 30rpx;color: #ccc;margin-top: 30rpx;">暂无更多记录...</view>
</view>
</view> </view>
</template> </template>
@ -56,10 +69,15 @@
bgc: { bgc: {
background: '#25CE88' background: '#25CE88'
}, },
zujiemoney:'' zujiemoney: 0,
showflag: false
} }
}, },
onLoad() { onLoad() {
},
onShow() {
this.wateringList = []
this.getlist() this.getlist()
}, },
methods: { methods: {
@ -72,33 +90,38 @@
this.$u.get('/app/order/rent/list?pageNum=' + this.pagenum + '&pageSize=' + this.pagesize).then(res => { this.$u.get('/app/order/rent/list?pageNum=' + this.pagenum + '&pageSize=' + this.pagesize).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.total = res.total; this.total = res.total;
if (this.total > 0) {
this.showflag = false
} else {
this.showflag = true
}
if (res.rows.length > 0) { if (res.rows.length > 0) {
res.rows.forEach(order => { res.rows.forEach(order => {
if (order.endRentTime == null) { if (order.endRentTime == null) {
var targetDate = new Date(order.startRentTime); var targetDate = new Date(order.startRentTime);
var currentDate = new Date(); var currentDate = new Date();
var diff = targetDate - currentDate; var diff = targetDate - currentDate;
// diff 便
var absDiff = Math.abs(diff); var absDiff = Math.abs(diff);
var hours = Math.floor(absDiff / (1000 * 60 * 60)); var hours = Math.floor(absDiff / (1000 * 60 * 60));
var minutes = Math.floor((absDiff % (1000 * 60 * 60)) / (1000 * 60)); var minutes = Math.floor((absDiff % (1000 * 60 * 60)) / (1000 * 60));
let formattedMinutes = minutes < 10 ? '0' + minutes : minutes; let formattedMinutes = minutes < 10 ? '0' + minutes : minutes;
// '-'
order.remainingTime = hours + '时' + formattedMinutes + '分钟'; order.remainingTime = hours + '时' + formattedMinutes + '分钟';
if (order.priceStandard.feeMode == 2) { if (order.priceStandard.feeMode == 2) {
if (minutes >= order.priceStandard.feeFreeTime) { if (minutes >= order.priceStandard.feeFreeTime) {
this.zujiemoney = (hours + 1) * order.priceStandard.feePrice order.money = (hours + 1) * order.priceStandard.feePrice
} else { } else {
this.zujiemoney = hours * order.priceStandard.feePrice order.money = hours * order.priceStandard.feePrice
} }
} else if (order.priceStandard.feeMode == 1) { } else if (order.priceStandard.feeMode == 1) {
if (minutes >= order.priceStandard.feeFreeTime) { if (minutes >= order.priceStandard.feeFreeTime) {
this.zujiemoney = (hours * 2 + 1) * order.priceStandard.feePrice order.money = (hours * 2 + 1) * order.priceStandard.feePrice
if (minutes >= 30) { if (minutes >= 30) {
this.zujiemoney = (hours * 2 + 2) * order.priceStandard.feePrice order.money = (hours * 2 + 2) * order.priceStandard
.feePrice
} }
} else { } else {
this.zujiemoney = hours * 2 * order.priceStandard.feePrice order.money = hours * 2 * order.priceStandard.feePrice
} }
} }
} else { } else {
@ -112,31 +135,35 @@
order.remainingTime = hours + '时' + formattedMinutes + '分钟'; order.remainingTime = hours + '时' + formattedMinutes + '分钟';
if (order.priceStandard.feeMode == 2) { if (order.priceStandard.feeMode == 2) {
if (minutes >= order.priceStandard.feeFreeTime) { if (minutes >= order.priceStandard.feeFreeTime) {
this.zujiemoney = (hours + 1) * order.priceStandard.feePrice order.money = (hours + 1) * order.priceStandard.feePrice
} else { } else {
this.zujiemoney = hours * order.priceStandard.feePrice order.money = hours * order.priceStandard.feePrice
} }
} else if (order.priceStandard.feeMode == 1) { } else if (order.priceStandard.feeMode == 1) {
if (minutes >= order.priceStandard.feeFreeTime) { if (minutes >= order.priceStandard.feeFreeTime) {
this.zujiemoney = (hours * 2 + 1) * order.priceStandard.feePrice order.money = (hours * 2 + 1) * order.priceStandard.feePrice
if (minutes >= 30) { if (minutes >= 30) {
this.zujiemoney = (hours * 2 + 2) * order.priceStandard.feePrice order.money = (hours * 2 + 2) * order.priceStandard
.feePrice
} }
} else { } else {
this.zujiemoney = hours * 2 * order.priceStandard.feePrice order.money = hours * 2 * order.priceStandard.feePrice
} }
} }
} }
}); })
this.wateringList = this.wateringList.concat(res.rows); this.wateringList = this.wateringList.concat(res.rows);
// console.log(this.wateringList);
this.pagenum++; this.pagenum++;
} else { } else {
// //
this.noMoreData = true; this.noMoreData = true;
} }
this.isLoading = false; this.isLoading = false;
} else {
uni.navigateTo({
url: '/pages/login/login'
})
} }
}).catch(error => { }).catch(error => {
// //
@ -177,8 +204,6 @@
} }
page { page {
// background-color: ;
background: linear-gradient(180deg, #F4F5F7 0%, rgba(255, 255, 255, 0) 100%);
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
padding-bottom: 200rpx; padding-bottom: 200rpx;
} }
@ -189,9 +214,6 @@
padding-right: 34rpx; padding-right: 34rpx;
box-sizing: border-box; box-sizing: border-box;
// position: fixed;
// top: 0;
// left: 0;
.listorder { .listorder {
margin-top: 32rpx; margin-top: 32rpx;
width: 100%; width: 100%;

View File

@ -4,10 +4,13 @@
<view class="listorder"> <view class="listorder">
<view class="title"> <view class="title">
<view class="date"> <view class="date">
<text>{{listobj.remainingTime}}</text> <text>{{listobj.money == null ? (zujiemoney > fee.feeMaxPrice ? fee.feeMaxPrice : zujiemoney) : listobj.money}}</text> <text v-if="listobj.sale.payTime">{{zuzhuan}}</text>
<text v-else>{{listobj.remainingTime}}</text>
<text v-if="listobj.sale.money">{{listobj.sale.money / 100}}</text>
<text v-else>{{listobj.money == null ? (zujiemoney > fee.feeMaxPrice ? fee.feeMaxPrice : zujiemoney) : listobj.money}}</text>
</view> </view>
<view class="jine"> <view class="jine">
<text>使用时长</text> <text>订单金额</text> <text>使用时长</text> <text v-if="listobj.sale.money">销售金额</text><text v-else>订单金额</text>
</view> </view>
</view> </view>
<view class="gjmx"> <view class="gjmx">
@ -15,24 +18,33 @@
价格明细 价格明细
</view> </view>
<view class="mx"> <view class="mx">
<text style="width: 100rpx;">收费标准</text> <text style="width: 240rpx;">收费标准</text>
<text> <text>
<text v-if="fee.feeMode == 2">{{fee.feePrice}}/小时</text> <text v-if="fee.feeMode == 2">{{fee.feePrice}}/小时</text>
<text v-if="fee.feeMode == 1">{{fee.feePrice}}/半小时</text> <text v-if="fee.feeMode == 1">{{fee.feePrice}}/半小时</text>
,{{fee.feeFreeTime}}分钟免费,日封顶{{fee.feePrice * 24}},总封顶{{fee.feeMaxPrice}}</text> ,{{fee.feeFreeTime}}分钟免费,总封顶{{fee.feeMaxPrice}}</text>
</view> </view>
<view class="mx"> <view class="mx">
<text>租借方式</text> <text>租借方式</text>
<text v-if="listobj.rentType == 1">普通租赁</text> <text v-if="listobj.rentType == 1">普通租赁</text>
<text v-if="listobj.rentType == 2">免押金租赁</text> <text v-if="listobj.rentType == 2">免押金租赁</text>
</view> </view>
<view class="mx"> <view class="mx" v-if="listobj.sale.payTime">
<text>租转卖时间</text> <text>{{listobj.sale.payTime}}</text>
</view>
<view class="mx" v-else>
<text>使用时长</text> <text>{{listobj.remainingTime}}</text> <text>使用时长</text> <text>{{listobj.remainingTime}}</text>
</view> </view>
<view class="mx"> <view class="mx" v-if="listobj.sale.money">
<text>付款金额</text> <text>{{ listobj.sale.money / 100}}</text>
</view>
<view class="mx" v-else>
<text>付款金额</text> <text>{{ listobj.payMoney == null ? (zujiemoney > fee.feeMaxPrice ? fee.feeMaxPrice : zujiemoney) : listobj.payMoney}}</text> <text>付款金额</text> <text>{{ listobj.payMoney == null ? (zujiemoney > fee.feeMaxPrice ? fee.feeMaxPrice : zujiemoney) : listobj.payMoney}}</text>
</view> </view>
<view class="mx"> <view class="mx" v-if="listobj.sale.money">
<text>销售金额</text> <text>{{ listobj.sale.money / 100}}</text>
</view>
<view class="mx" v-else>
<text>订单金额</text> <text>{{listobj.money == null ? (zujiemoney > fee.feeMaxPrice ? fee.feeMaxPrice : zujiemoney) : listobj.money}}</text> <text>订单金额</text> <text>{{listobj.money == null ? (zujiemoney > fee.feeMaxPrice ? fee.feeMaxPrice : zujiemoney) : listobj.money}}</text>
</view> </view>
</view> </view>
@ -56,9 +68,6 @@
<view class="zj"> <view class="zj">
<text style="width: 160rpx;">租借地点</text> <text>{{listobj.startStoreAddress}} </text> <text style="width: 160rpx;">租借地点</text> <text>{{listobj.startStoreAddress}} </text>
</view> </view>
<!-- <view class="" style="font-size: 24rpx;color: #808080;line-height: 32rpx;margin-bottom: 18rpx;text-align: right;">
朝阳路店
</view> -->
<view class="zj"> <view class="zj">
<text>归还时间</text> <text>{{listobj.endRentTime == null ? '-' : listobj.endRentTime}}</text> <text>归还时间</text> <text>{{listobj.endRentTime == null ? '-' : listobj.endRentTime}}</text>
</view> </view>
@ -71,9 +80,6 @@
<view class="zj"> <view class="zj">
<text style="width: 160rpx;">归还地点</text> <text>{{listobj.endStoreAddress == null ? '-' : listobj.endStoreAddress}}</text> <text style="width: 160rpx;">归还地点</text> <text>{{listobj.endStoreAddress == null ? '-' : listobj.endStoreAddress}}</text>
</view> </view>
<!-- <view class="" style="font-size: 24rpx;color: #808080;line-height: 32rpx;margin-bottom: 18rpx;text-align: right;">
朝阳路店
</view> -->
<view class="zj"> <view class="zj">
<text>订单编号</text> <text>{{listobj.orderNo}} <text class="fz" @click="fuzhi(listobj.orderNo)">复制</text> </text> <text>订单编号</text> <text>{{listobj.orderNo}} <text class="fz" @click="fuzhi(listobj.orderNo)">复制</text> </text>
</view> </view>
@ -91,7 +97,8 @@
orderId:'', orderId:'',
listobj:{}, listobj:{},
fee:{}, fee:{},
zujiemoney:'' zujiemoney:'',
zuzhuan:''
} }
}, },
onLoad(option) { onLoad(option) {
@ -106,16 +113,14 @@
this.fee = res.data.priceStandard this.fee = res.data.priceStandard
if(this.listobj.endRentTime == null){ if(this.listobj.endRentTime == null){
var targetDate = new Date(this.listobj.startRentTime); var targetDate = new Date(this.listobj.startRentTime)
var currentDate = new Date(); var currentDate = new Date()
var diff = targetDate - currentDate; var diff = targetDate - currentDate
// diff 便 var absDiff = Math.abs(diff)
var absDiff = Math.abs(diff); var hours = Math.floor(absDiff / (1000 * 60 * 60))
var hours = Math.floor(absDiff / (1000 * 60 * 60)); var minutes = Math.floor((absDiff % (1000 * 60 * 60)) / (1000 * 60))
var minutes = Math.floor((absDiff % (1000 * 60 * 60)) / (1000 * 60));
let formattedMinutes = minutes < 10 ? '0' + minutes : minutes; let formattedMinutes = minutes < 10 ? '0' + minutes : minutes;
// '-' this.listobj.remainingTime = hours + '时' + formattedMinutes + '分钟'
this.listobj.remainingTime = hours + '时' + formattedMinutes + '分钟';
if (this.listobj.priceStandard.feeMode == 2) { if (this.listobj.priceStandard.feeMode == 2) {
if (minutes >= this.listobj.priceStandard.feeFreeTime) { if (minutes >= this.listobj.priceStandard.feeFreeTime) {
this.zujiemoney = (hours + 1) * this.listobj.priceStandard.feePrice this.zujiemoney = (hours + 1) * this.listobj.priceStandard.feePrice
@ -134,13 +139,13 @@
} }
}else{ }else{
var targetDate = new Date(this.listobj.endRentTime) var targetDate = new Date(this.listobj.endRentTime)
var currentDate = new Date(); var currentDate = new Date()
var diff = targetDate - currentDate; var diff = targetDate - currentDate
var absDiff = Math.abs(diff); var absDiff = Math.abs(diff)
var hours = Math.floor(absDiff / (1000 * 60 * 60)); var hours = Math.floor(absDiff / (1000 * 60 * 60));
var minutes = Math.floor((absDiff % (1000 * 60 * 60)) / (1000 * 60)); var minutes = Math.floor((absDiff % (1000 * 60 * 60)) / (1000 * 60))
let formattedMinutes = minutes < 10 ? '0' + minutes : minutes; let formattedMinutes = minutes < 10 ? '0' + minutes : minutes;
this.listobj.remainingTime = hours + '时' + formattedMinutes + '分钟'; this.listobj.remainingTime = hours + '时' + formattedMinutes + '分钟'
if (this.listobj.priceStandard.feeMode == 2) { if (this.listobj.priceStandard.feeMode == 2) {
if (minutes >= this.listobj.priceStandard.feeFreeTime) { if (minutes >= this.listobj.priceStandard.feeFreeTime) {
this.zujiemoney = (hours + 1) * this.listobj.priceStandard.feePrice this.zujiemoney = (hours + 1) * this.listobj.priceStandard.feePrice
@ -158,7 +163,16 @@
} }
} }
} }
if(this.listobj.sale){
var targetDate = new Date(this.listobj.startRentTime)
var currentDate = new Date(this.listobj.sale.payTime)
var diff = targetDate - currentDate
var absDiff = Math.abs(diff)
var hours = Math.floor(absDiff / (1000 * 60 * 60))
var minutes = Math.floor((absDiff % (1000 * 60 * 60)) / (1000 * 60))
let formattedMinutes = minutes < 10 ? '0' + minutes : minutes
this.zuzhuan = hours + '时' + formattedMinutes + '分钟'
}
} }
}) })
}, },
@ -180,7 +194,6 @@
<style lang="scss"> <style lang="scss">
page { page {
// background-color: ;
background: linear-gradient( 180deg, #25CE88 0%, rgba(255,255,255,0) 100%); background: linear-gradient( 180deg, #25CE88 0%, rgba(255,255,255,0) 100%);
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
} }

View File

@ -85,7 +85,6 @@
}, },
fail: (error) => { fail: (error) => {
console.error('获取地图缩放级别失败:', error); console.error('获取地图缩放级别失败:', error);
// ...
}, },
}); });
}, },
@ -134,7 +133,6 @@
chineseLength++; chineseLength++;
} else if (/[a-zA-Z]/.test(name[i])) { } else if (/[a-zA-Z]/.test(name[i])) {
englishLength = englishLength+0.3; englishLength = englishLength+0.3;
// console.log(englishLength);
} }
} }
const totalLength = chineseLength + englishLength * 2; const totalLength = chineseLength + englishLength * 2;
@ -224,10 +222,10 @@
} }
}); });
}, },
//
getDistance(lat1, lon1, lat2, lon2) { getDistance(lat1, lon1, lat2, lon2) {
const R = 6371000; // const R = 6371000; //
const phi1 = lat1 * Math.PI / 180; // φ, const phi1 = lat1 * Math.PI / 180;
const phi2 = lat2 * Math.PI / 180; const phi2 = lat2 * Math.PI / 180;
const deltaPhi = (lat2 - lat1) * Math.PI / 180; const deltaPhi = (lat2 - lat1) * Math.PI / 180;
const deltaLambda = (lon2 - lon1) * Math.PI / 180; const deltaLambda = (lon2 - lon1) * Math.PI / 180;
@ -289,7 +287,6 @@
background: #FFFFFF; background: #FFFFFF;
border-radius: 64rpx 64rpx 0 0; border-radius: 64rpx 64rpx 0 0;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08); box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
// padding-top: 40rpx;
padding-left: 32rpx; padding-left: 32rpx;
padding-right: 32rpx; padding-right: 32rpx;
box-sizing: border-box; box-sizing: border-box;

View File

@ -9,10 +9,10 @@
</view> --> </view> -->
<view class="leftpic"> <view class="leftpic">
<view class="name"> <view class="name">
微信用户 {{nickName}}
</view> </view>
<view class="phone"> <view class="phone">
138****1123 {{tel}}
</view> </view>
</view> </view>
@ -97,11 +97,16 @@
export default { export default {
data() { data() {
return { return {
nickName:'',
tel:''
} }
}, },
onLoad() { onLoad() {
},
onShow() {
this.nickName = uni.getStorageSync('userdata').nickName
this.tel = uni.getStorageSync('userdata').mobile
}, },
methods: { methods: {
btnpage(num) { btnpage(num) {