sadjv3_jishi/pages/index/currentPoints.vue

704 lines
18 KiB
Vue
Raw Normal View History

2024-06-26 16:58:53 +08:00
<template>
<view class="content">
<view class="header">
<view class="header-top">
<view class="header-top-left">
<image src="../../static/index/dangqian1.png" mode=""></image>
<span class="header-text" style="margin-right: 5px;">
当前周期
</span>
2024-06-27 08:48:39 +08:00
<span class="header-text">{{startTime}}~{{endTime}}</span>
2024-06-26 16:58:53 +08:00
</view>
<view class="header-top-btn" @click="wangqi">往期积分</view>
</view>
2024-07-01 21:17:17 +08:00
<view class="header-bottom" style="margin-bottom: 50rpx;">
2024-06-27 08:48:39 +08:00
<view class="header-bottom-money">{{sumJf}}<text style="font-size: 23rpx;font-weight: 400;"></text> </view>
2024-06-26 16:58:53 +08:00
<view class="header-text">当前积分</view>
</view>
</view>
<view class="tapNav-list">
<view class="tapNav-view" v-for="(item,index) in tapNav" :key="index" @click="tabClick(index)">
<view class="tapNav-name">{{item.name}}</view>
<view class="tapNav-bor" v-if="tapNum==index"></view>
</view>
</view>
2024-06-26 16:58:53 +08:00
<view class="mina">
<!--业绩积分-->
<view class="mina-view" v-if="tapNum==0">
2024-06-26 16:58:53 +08:00
<view class="view-title">
<view class="view-title-left">
<span class="view-title-left-shuxian"></span>
2024-06-27 08:48:39 +08:00
<span class="view-title-left-text">业绩积分:<text class="view-num">{{yjjf}}</text>(项目金额累计积分兑换比例为1:1)</span>
2024-06-26 16:58:53 +08:00
</view>
2024-06-27 08:48:39 +08:00
<!-- <view class="view-title-right" @click="jieshi">更多</view> -->
2024-06-26 16:58:53 +08:00
</view>
<view class="mian-list" @click="goOder(item)" v-for="(item,index) in yjjfList" :key="index">
2024-06-26 16:58:53 +08:00
<view class="mian-list-top">
2024-07-01 13:46:59 +08:00
<view class="mian-list-top-biao">{{item.status=='3'?'待评价':'已完成'}}</view>
2024-06-26 16:58:53 +08:00
<view class="mian-list-top-time">
<span>预约时间: </span>
2024-06-27 08:48:39 +08:00
<span>{{item.serveTime}}</span>
2024-06-26 16:58:53 +08:00
</view>
</view>
<view class="mian-foot">
<view class="mian-foot-img">
2024-07-01 13:46:59 +08:00
<image :src="item.massageImg?item.massageImg: '../../../static/logo.png'" mode=""></image>
2024-06-26 16:58:53 +08:00
</view>
<view class="mian-foot-list">
<view class="mian-foot-view">
2024-06-27 08:48:39 +08:00
<view class="mian-title">{{item.entryName}}</view>
2024-06-26 16:58:53 +08:00
<view class="mian-dingwei">
<image src="../../static/index/dangqian2.png" mode=""></image>
2024-06-27 08:48:39 +08:00
<span class="shouyi-text">{{item.km}}km</span>
2024-06-26 16:58:53 +08:00
</view>
</view>
2024-07-01 21:17:17 +08:00
<view class="mian-foot-dan od-number">
2024-06-27 08:48:39 +08:00
订单编号 : {{item.ordersNo}}
2024-06-26 16:58:53 +08:00
</view>
2024-07-01 21:17:17 +08:00
<view class="mian-foot-adder shouyi-text add-text">
2024-06-27 08:48:39 +08:00
服务地址 : {{item.accomplishAddress}}
2024-06-26 16:58:53 +08:00
</view>
<view class="mian-bottom">
2024-06-27 08:48:39 +08:00
<view class="mian-bottom-xiang shouyi-text">项目金额 : {{item.price}}</view>
2024-06-26 16:58:53 +08:00
<view class="mian-bottom-shou">
<span class="shouyi-text">本单收益: </span>
2024-07-12 15:19:33 +08:00
<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">{{item.artificerMoneyTotal}}</span>
2024-06-26 16:58:53 +08:00
</view>
</view>
</view>
</view>
</view>
<view v-if="ddczList.yjjfList == 0" style="line-height: 80px;width:100%;text-align: center;">
<span >暂无数据</span>
</view>
2024-06-26 16:58:53 +08:00
</view>
<!--时长积分-->
<view class="mina-view" v-if="tapNum==1">
2024-06-26 16:58:53 +08:00
<view class="view-title">
<view class="view-title-left">
<span class="view-title-left-shuxian"></span>
2024-06-28 10:45:52 +08:00
<span class="view-title-left-text ">时长积分: <text class="view-num">{{zxscjf}}</text>(在线时长10分钟可获取1积分)</span>
2024-06-26 16:58:53 +08:00
</view>
2024-06-27 08:48:39 +08:00
<!-- <view class="view-title-right" @click.stop="toggle('时长积分')">更多</view> -->
2024-06-26 16:58:53 +08:00
</view>
<view class="mian-table">
<view class="table-view">
2024-06-28 10:45:52 +08:00
<span style="font-weight: bold;">序号</span>
<span class="table-view-child" v-for="(item , index) in zxscList">{{index+1}}</span>
2024-06-26 16:58:53 +08:00
</view>
<view class="table-view">
2024-06-28 10:45:52 +08:00
<span style="font-weight: bold;">获取时间</span>
<span class="table-view-child" v-for="(item , index) in zxscList">{{item.jftime}}</span>
2024-06-26 16:58:53 +08:00
</view>
<view class="table-view">
2024-06-28 10:45:52 +08:00
<span style="font-weight: bold;">获取积分</span>
<span class="table-view-child" v-for="(item , index) in zxscList">{{item.jifen}}</span>
</view>
</view>
</view>
<!--储值积分-->
<view class="mina-view" v-if="tapNum==2">
<view class="view-title">
<view class="view-title-left">
<span class="view-title-left-shuxian"></span>
<span class="view-title-left-text">储值积分: <text class="view-num">{{czjf}}</text>(为您充值累计积分兑换比例为1:1)</span>
</view>
<!-- <view class="view-title-right" @click.stop="toggle('时长积分')">更多</view> -->
</view>
<view class="mian-table">
<view class="table-view">
2024-06-28 10:45:52 +08:00
<span style="font-weight: bold;">序号</span>
<span class="table-view-child" v-for="(item , index) in czjfList">{{index+1}}</span>
</view>
<view class="table-view">
2024-06-28 10:45:52 +08:00
<span style="font-weight: bold;">获取时间</span>
<span class="table-view-child" v-for="(item , index) in czjfList">{{item.jftime}}</span>
2024-06-26 16:58:53 +08:00
</view>
<view class="table-view">
2024-06-28 10:45:52 +08:00
<span style="font-weight: bold;">获取积分</span>
<span class="table-view-child" v-for="(item , index) in czjfList">{{item.jifen}}</span>
2024-06-26 16:58:53 +08:00
</view>
</view>
</view>
<!--充值积分-->
<view class="mina-view" v-if="tapNum==3">
2024-06-26 16:58:53 +08:00
<view class="view-title">
<view class="view-title-left">
<span class="view-title-left-shuxian"></span>
2024-06-27 08:48:39 +08:00
<span class="view-title-left-text">充值积分: <text class="view-num">{{ddczjf}}</text>(充值积分比例为1:1)</span>
2024-06-26 16:58:53 +08:00
</view>
2024-06-27 08:48:39 +08:00
<!-- <view class="view-title-right" @click.stop="toggle('充值积分')">更多</view> -->
2024-06-26 16:58:53 +08:00
</view>
<view class="mian-list" @click="goOder(item)" v-for="(item,index) in ddczList" :key="index">
2024-06-26 16:58:53 +08:00
<view class="mian-list-top">
2024-06-29 19:47:30 +08:00
<view class="mian-list-top-biao">{{item.status=='3'?'已完成':'待评价'}}</view>
2024-06-26 16:58:53 +08:00
<view class="mian-list-top-time">
<span>预约时间: </span>
<span>{{item.serveTime}}</span>
2024-06-26 16:58:53 +08:00
</view>
</view>
<view class="mian-foot">
<view class="mian-foot-img">
<image src="../../my/static/bg6.png" mode=""></image>
</view>
<view class="mian-foot-list">
<view class="mian-foot-view">
<view class="mian-title">{{item.entryName}}</view>
2024-06-26 16:58:53 +08:00
<view class="mian-dingwei">
<image src="../../static/index/dangqian2.png" mode=""></image>
<span class="shouyi-text">{{item.km}}km</span>
2024-06-26 16:58:53 +08:00
</view>
</view>
<view class="mian-foot-dan shouyi-text">
订单编号 : {{item.ordersNo}}
2024-06-26 16:58:53 +08:00
</view>
<view class="mian-foot-adder shouyi-text">
服务地址 : {{item.accomplishAddress}}
2024-06-26 16:58:53 +08:00
</view>
<view class="mian-bottom">
<view class="mian-bottom-xiang shouyi-text">项目金额 : {{item.price}}</view>
2024-06-26 16:58:53 +08:00
<view class="mian-bottom-shou">
<span class="shouyi-text">本单收益: </span>
2024-07-12 15:19:33 +08:00
<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">{{item.artificerMoneyTotal}}</span>
2024-06-26 16:58:53 +08:00
</view>
</view>
</view>
</view>
</view>
<view v-if="ddczList.length == 0" style="line-height: 80px;width:100%;text-align: center;">
<span >暂无数据</span>
2024-06-26 16:58:53 +08:00
</view>
</view>
</view>
<view>
<!-- 普通弹窗 -->
<uni-popup ref="popup" background-color="#fff" @change="change">
<view class="popup-content">
<view class="popup-head">
<span>{{titleList}}</span>
<span @click="closePopup(type)">x</span>
</view>
<view class="popup-mian">
<view class="popup-mian-textarea">
<view class="popup-mian-view">
<span>原服务项目价格:</span>
<span>198</span>
</view>
<view class="popup-mian-view">
<span>现服务项目价格:</span>
<span>298</span>
</view>
<view class="popup-mian-view">
<span>改价需支付差价:</span>
<span>100</span>
</view>
</view>
<view class="popup-mian-btn">
<span @click="closePopup(type)">
取消
</span>
<span>
确定
</span>
</view>
</view>
</view>
</uni-popup>
</view>
</view>
</template>
<script>
export default{
data(){
return{
type:'center',
2024-06-27 08:48:39 +08:00
titleList:'',
startTime:'',
endTime:'',
userId:'',
czjf:'0',
czjfList:[],
ddczjf:'0',
ddczList:[],
yjjf:'0',
yjjfList:[],
zxscjf:'0',
zxscList:[],
sumJf:'0',
tapNav:[
{name:'业绩积分',id:'0'},
{name:'时长积分',id:'1'},
{name:'储值积分',id:'2'},
2024-06-29 19:47:30 +08:00
{name:'充值积分',id:'3'},
],
tapNum:0,
2024-06-26 16:58:53 +08:00
}
},
2024-06-27 08:48:39 +08:00
onLoad(e) {
this.userId = uni.getStorageSync("artificerId");
this.getTime()
this.getData();
},
2024-06-26 16:58:53 +08:00
methods:{
goOder(item){
uni.navigateTo({
url:'/my/order/revenueDetails?ordersId='+item.ordersId
})
},
tabClick(index){
this.tapNum=index;
this.page=0;
this.listData = [];
// uni.showLoading({
// title: '加载中'
// });
this.getData();
},
2024-06-27 08:48:39 +08:00
getTime(){
let now = new Date();
let year = now.getFullYear();
let month = now.getMonth() + 1; // JavaScript中月份是从0开始计数需加1
let monthJia=month<10?'0'+month:month;
let day = now.getDate();
let currentDate = year + '-' + monthJia + '-' + day;
let dayEnd = new Date(now.getFullYear(), monthJia, 0).getDate();
if(day>=1&&day<=10){
this.startTime=year + '-' + monthJia + '-01';
this.endTime=year + '-' + monthJia + '-' + 10;
}else if(day>=11&&day<=20){
this.startTime=year + '-' + monthJia + '-' + 11;
this.endTime=year + '-' + monthJia + '-' + 20;
}else if(day>=21&&day<=dayEnd){
this.startTime=year + '-' + monthJia + '-' + 21
this.endTime=year + '-' + monthJia + '-' + dayEnd;
}
if(!this.orderType){
this.orderType = 1;
}
},
getData(){
var that=this;
let data = {
userId:that.userId,
startTime:that.startTime,
endTime:that.endTime,
}
that.$Request.getT('/app/artificer/getJifenList', data).then(res => {
console.log(res);
if (res.code == 0) {
that.czjf = res.czjf;
that.czjfList = res.czjfList;
that.ddczjf = res.ddczjf;
that.ddczList = res.ddczList;
that.yjjf = res.yjjf;
that.yjjfList = res.yjjfList;
that.zxscjf = res.zxscjf;
that.zxscList = res.zxscList;
that.sumJf = res.sumJf;
// that.listData = [...that.listData, ...res.data.list]; //追加新数据
// that.shouyiMoeny = res.earnings;//收益信息
} else {
that.$queue.showToast(res.msg);
}
});
},
2024-06-26 16:58:53 +08:00
jieshi(){
uni.navigateTo({
url:'/pages/index/currentPointsDetail'
})
},
change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show);
},
closePopup(type){//改价 关闭弹出框
this.type = type
this.$refs.popup.close(type);
},
toggle(type) {//改价 弹出框
this.titleList=type
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
this.$refs.popup.open(this.type)
},
wangqi(){//往期收益 跳页
uni.navigateTo({
url:'/pages/index/previousPoints'
})
},
}
}
</script>
<style scoped>
.tapNav-name{
font-weight: bold;
2024-07-01 21:17:17 +08:00
font-size: 30rpx;
color: #333333;
}
.tapNav-bor{
width: 62px;
height: 14rpx;
background: linear-gradient(-48deg, rgba(1, 156, 136, 0.35), rgba(45, 196, 142, 0.35));
border-radius: 7rpx;
position: absolute;
bottom: 0;
margin-bottom: 10px;
}
.tapNav-list{
2024-06-28 11:08:20 +08:00
width: 96%;
margin: 0 auto;
display: flex;
flex-direction:row;
align-items: center;
justify-content: space-between;
background-color: #fff;
2024-06-28 11:08:20 +08:00
border-radius: 15rpx;
margin-top: -30px;
2024-07-01 21:17:17 +08:00
padding: 10rpx 0;
}
.tapNav-view{
height: 40px;
width: 50%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
}
2024-06-26 16:58:53 +08:00
.popup-mian-view span:nth-child(1){
color: #666666;
}
.popup-mian-view span:nth-child(2){
color: #333;
font-weight: bold;
}
.popup-mian-view span{
font-size: 29rpx;
}
.popup-mian-view{
width: 100%;
height: 35px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #DCDCDC;
}
.popup-mian-textarea{
width: 100%;
display: flex;
flex-direction: column;
}
.popup-mian-btn span:nth-child(1){
background: linear-gradient(90deg, #FE912E, #FF9970);
}
.popup-mian-btn span:nth-child(2){
background: linear-gradient(90deg, #019C88, #28BA92, #35C495);
}
.popup-mian-btn span{
width: 247rpx;
height: 77rpx;
line-height: 77rpx;
text-align: center;
font-weight: 400;
font-size: 32rpx;
color: #FFFEFE;
border-radius: 39rpx;
}
.popup-mian-btn{
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-top: 10px;
}
.popup-mian{
width: 88%;
display: flex;
flex-direction: column;
margin: 5px auto 0px auto;
}
.popup-head span:nth-child(2){
width: 50rpx;
height: 50rpx;
line-height: 19px;
text-align: center;
font-size: 24px;
color: #15AB8D;
border-radius: 50%;
border: 3px solid #15AB8D;
}
.popup-head span:nth-child(1){
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.popup-head{
width: 100%;
height: 99.38rpx;
background-color: rgba(21, 171, 141, 0.09);
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 0 15px;
}
.popup-content{
width: 613rpx;
height: 479rpx;
background: #FFFFFF;
border-radius: 56rpx;
display: flex;
flex-direction: column;
}
.table-view span{
2024-06-28 10:45:52 +08:00
font-size: 27rpx;
}
.table-view-bold{
2024-06-26 16:58:53 +08:00
font-weight: bold;
}
2024-06-28 10:45:52 +08:00
.table-view-child{
color: #888;
}
2024-06-26 16:58:53 +08:00
.table-view span{
2024-06-28 10:45:52 +08:00
margin-bottom: 20px;
2024-06-26 16:58:53 +08:00
}
.table-view{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.mian-table{
width: 100%;
2024-06-28 10:45:52 +08:00
padding: 15px;
2024-06-26 16:58:53 +08:00
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
background: #FFFFFF;
2024-06-28 10:45:52 +08:00
border-radius: 21rpx;
2024-06-26 16:58:53 +08:00
margin-bottom: 10px;
}
.view-num{
2024-07-01 21:17:17 +08:00
color: #fb672b !important;
font-weight: bold;
font-size: 30rpx;
2024-06-26 16:58:53 +08:00
}
.mian-bottom{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
2024-07-01 21:17:17 +08:00
margin-top: 8rpx;
2024-06-26 16:58:53 +08:00
}
.mian-foot-adder{
2024-07-01 21:17:17 +08:00
margin: 3px 0px;
2024-06-26 16:58:53 +08:00
}
.mian-dingwei image{
width: 18.75rpx;
height:21.53rpx;
margin-right: 5px;
}
.mian-dingwei,.mian-bottom-shou{
display: flex;
flex-direction: row;
align-items: center;
}
.mian-title{
font-weight: bold;
font-size: 31rpx;
color: #333333;
}
.mian-foot-view{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-bottom: 5px;
}
.mian-foot-list{
2024-07-01 21:17:17 +08:00
width: 73%;
2024-06-26 16:58:53 +08:00
display: flex;
flex-direction: column;
}
.mian-foot-img image{
width: 100%;
height: 100%;
2024-07-01 21:17:17 +08:00
border-radius: 20rpx;
2024-06-26 16:58:53 +08:00
}
.mian-foot-img{
2024-07-01 21:17:17 +08:00
width: 160rpx;
height: 160rpx;
2024-06-26 16:58:53 +08:00
background: #E6E6E6;
2024-07-01 21:17:17 +08:00
border-radius: 30rpx;
2024-06-26 16:58:53 +08:00
}
2024-07-01 21:17:17 +08:00
2024-06-26 16:58:53 +08:00
.mian-foot{
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.mian-list-top-time span{
font-size:25rpx;
}
.mian-list-top-time span:nth-child(1){
color: #7D7D7D;
}
.mian-list-top-time span:nth-child(2){
color: #11957C;
}
.mian-list-top-time{
display: flex;
flex-direction: row;
align-items: center;
}
.mian-list-top-biao{
width: 130rpx;
height: 47rpx;
line-height: 47rpx;
color: #fff;
font-size: 25rpx;
text-align: center;
background: linear-gradient(90deg, #019C88, #28BA92, #35C495);
border-top-left-radius: 21rpx;
border-bottom-right-radius: 21rpx;
}
.mian-list-top{
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding-bottom: 10px;
border-bottom: 1px solid #E5E5E5;
margin-bottom: 10px;
}
.mian-list{
width: 100%;
padding: 10px;
display: flex;
flex-direction: column;
background: #FFFFFF;
border-radius: 24rpx;
margin-bottom: 10px;
}
.view-title-right{
font-weight: 400;
font-size: 21rpx;
color: #666666;
}
.view-title-left-text{
font-weight: 400;
2024-07-01 21:17:17 +08:00
font-size: 28rpx;
color: #019c88;
2024-06-26 16:58:53 +08:00
margin-left: 5px;
}
.view-title-left-shuxian{
width: 10rpx;
height: 29rpx;
background: #029D88;
border-radius: 5rpx;
}
.view-title-left{
display: flex;
flex-direction: row;
align-items: center;
margin: 15px 0px;
}
.view-title{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.mina-view{
width: 100%;
display: flex;
flex-direction: column;
}
.mina{
2024-06-28 10:45:52 +08:00
width: 94%;
margin: 0 auto;
height: 300px;
2024-06-26 16:58:53 +08:00
display: flex;
flex-direction: column;
}
.header-bottom-money{
font-weight: bold;
font-size: 49rpx;
color: #FFFFFF;
}
.header-top-btn{
width: 174rpx;
height: 49rpx;
line-height: 49rpx;
text-align: center;
2024-06-28 10:45:52 +08:00
font-size: 26rpx;
2024-06-26 16:58:53 +08:00
color: #333333;
background: #FFFFFF;
border-radius: 24rpx;
}
.header-text{
font-weight: 400;
2024-06-28 11:08:20 +08:00
font-size: 26rpx;
2024-06-26 16:58:53 +08:00
color: #FFFFFF;
}
.header-top-left image{
width: 24.31rpx;
height:22.92rpx;
margin-right: 2px;
margin-top: 3px;
}
.header-top-left{
display: flex;
flex-direction: row;
align-items: center;
}
.header-top{
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
margin-bottom: 10px;
}
.header{
width: 100%;
2024-06-28 10:45:52 +08:00
height: 300rpx;
padding: 5px 20px;
2024-06-28 11:08:20 +08:00
background:#f7f7f7 url('../../static/index/fun_banner4.png');
2024-06-26 16:58:53 +08:00
background-repeat: no-repeat;
background-size: 100% 100%;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.content{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
background-color: #f7f7f7;
overflow: scroll;
}
2024-07-01 21:17:17 +08:00
.od-number{
font-size: 24rpx;
color: #7ea866;
}
.add-text{
font-size: 26rpx;
color: #999;
}
.mian-bottom-xiang{
color: #7D7D7D;
}
2024-06-26 16:58:53 +08:00
</style>