593 lines
15 KiB
Vue
593 lines
15 KiB
Vue
<template>
|
|
<view class="content">
|
|
<view class="header">
|
|
<view class="header-top">
|
|
<view class="flex">
|
|
<image style="width:100rpx; height:100rpx; margin-right: 10rpx;" src="../../static/purse5.png"></image>
|
|
<view class="header-bottom">
|
|
<view class="header-text">{{titleData}}</view>
|
|
<view class="header-bottom-money">
|
|
{{earnings}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="header-top-left">
|
|
<view>
|
|
<span class="header-text"></image>当前周期</span>
|
|
</view>
|
|
<view>
|
|
<span class="header-text1">{{startTime}}</span><span style="color: #029d88; margin-right: 5rpx;">~</span><span class="header-text1">{{endTime}}</span>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
<view class="flex justify-end">
|
|
<view class="header-top-btn" @click="wangqi">往期{{orderType=='2'?'加钟率':'充值率'}}</view>
|
|
</view>
|
|
|
|
</view>
|
|
<!-- 往期时间选择 -->
|
|
<u-action-sheet :list="wqlistData" v-model="wqsyshow" @click="wqlistCallback"></u-action-sheet>
|
|
|
|
<view class="tapNav-list">
|
|
<view class="tapNav-view" v-for="(item,index) in tapNav" :key="index" @click="tabClick(item.isSfwc,index)">
|
|
<view class="tapNav-name">{{item.name}}</view>
|
|
<view class="tapNav-bor" v-if="tapNum==index"></view>
|
|
</view>
|
|
</view>
|
|
<t-refresh class="mian" ref="refresh" v-if="listData.length>0" @refresh="refresh" @loadMore="loadMore" :loadingType="loadingType" :tPadding="0">
|
|
<template slot="content">
|
|
<view class="view-title tap-padding">
|
|
<view class="view-title-left">
|
|
<span class="view-title-left-shuxian"></span>
|
|
<span class="view-title-left-text" v-if="orderType==2">本期{{isSfwc=='1'?'已加钟':'未加钟'}}订单</span>
|
|
<span class="view-title-left-text" v-if="orderType==3">本期{{isSfwc=='1'?'已充值':'未充值'}}订单</span>
|
|
</view>
|
|
<view class="view-title-right" v-if="isSfwc=='1'&&orderType == 2">加钟总金额: ¥{{totalMoney}}</view>
|
|
<view class="view-title-right" v-if="isSfwc=='1'&&orderType == 3">充值总金额: ¥{{totalMoney}}</view>
|
|
<view class="view-title-right">订单数量: {{totalCount}}</view>
|
|
</view>
|
|
<!--本期加钟 充值 订单-->
|
|
<view class="mina-view tap-padding" v-if="isSfwc=='1'" v-for="item in listData" :key="item.id" @click="goOder(item)">
|
|
<view class="mian-list">
|
|
<view class="mian-list-top">
|
|
<view class="mian-list-top-biao">{{item.status=='3'?'待评价':'已完成'}}</view>
|
|
<view class="mian-list-top-time">
|
|
<span>预约时间: </span>
|
|
<span>{{item.serveTime}}</span>
|
|
</view>
|
|
</view>
|
|
<view class="mian-foot">
|
|
<view class="mian-foot-img">
|
|
<image :src="item.massageImg?item.massageImg: '../../../static/logo.png'" mode=""></image>
|
|
</view>
|
|
<view class="mian-foot-list">
|
|
<view class="mian-foot-view">
|
|
<view class="mian-title">{{item.entryName}}</view>
|
|
<!-- <view class="mian-dingwei">
|
|
<image src="../../static/index/dangqian2.png" mode=""></image>
|
|
<span class="shouyi-text">0.8km</span>
|
|
</view> -->
|
|
</view>
|
|
<view class="mian-foot-dan od-number">
|
|
订单编号 : {{item.ordersNo}}
|
|
</view>
|
|
<view class="mian-foot-adder add-text">
|
|
服务地址 : {{item.address}}
|
|
</view>
|
|
<view class="mian-bottom">
|
|
<view class="mian-bottom-xiang shouyi-text">
|
|
<view class="view-title-right" v-if="orderType == 2">加钟金额:¥{{item.addArtificerMoney}}</view>
|
|
<view class="view-title-right" v-if="orderType == 3">充值金额:¥{{item.addArtificerMoney}}</view>
|
|
</view>
|
|
<view class="mian-bottom-shou">
|
|
<span class="shouyi-text">本单收益: </span>
|
|
<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">¥{{item.artificerMoneyTotal}}</span>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!--本期未加钟 未充值 订单-->
|
|
<view class="mina-view tap-padding" v-if="isSfwc=='0'" v-for="item in listData" :key="item.id" @click="goOder(item)">
|
|
<view class="mian-list">
|
|
<view class="mian-list-top">
|
|
<view class="mian-list-top-biao">{{item.status=='3'?'待评价':'已完成'}}</view>
|
|
<view class="mian-list-top-time">
|
|
<span>预约时间: </span>
|
|
<span>{{item.serveTime}}</span>
|
|
</view>
|
|
</view>
|
|
<view class="mian-foot">
|
|
<view class="mian-foot-img">
|
|
<image :src="item.massageImg?item.massageImg: '../../../static/logo.png'" mode=""></image>
|
|
</view>
|
|
<view class="mian-foot-list">
|
|
<view class="mian-foot-view">
|
|
<view class="mian-title">{{item.entryName}}</view>
|
|
<view class="mian-dingwei">
|
|
<image src="../../static/index/dangqian2.png" mode=""></image>
|
|
<span class="shouyi-text">{{item.km}}km</span>
|
|
</view>
|
|
</view>
|
|
<view class="mian-foot-dan shouyi-text od-number">
|
|
订单编号 : {{item.ordersNo}}
|
|
</view>
|
|
<view class="mian-foot-adder shouyi-text add-text">
|
|
服务地址 : {{item.address}}
|
|
</view>
|
|
<view class="mian-bottom">
|
|
<view class="shouyi-text">
|
|
<!-- 项目金额 : ¥{{item.priceTotal}} -->
|
|
</view>
|
|
<view class="mian-bottom-shou">
|
|
<span class="shouyi-text">本单收益: </span>
|
|
<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">¥{{item.artificerMoneyTotal}}</span>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
</template>
|
|
</t-refresh>
|
|
<empty v-if="listData.length==0"></empty>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import empty from '@/components/empty.vue'
|
|
import tRefresh from "@/components/t-refresh/t-refresh.vue"
|
|
export default {
|
|
components:{tRefresh,empty},
|
|
data(){
|
|
return{
|
|
orderType:'',
|
|
userId:'',
|
|
startTime:'',
|
|
endTime:'',
|
|
listData:[],
|
|
titleData:'',
|
|
loadingType:0,
|
|
page:1,
|
|
limit:10,
|
|
tapNum:0,
|
|
tapNav:[
|
|
{name:'本期已加钟订单',isSfwc:'1'},
|
|
{name:'本期未加钟订单',isSfwc:'0'}
|
|
],
|
|
isSfwc:'1',
|
|
homePageCountData:'',
|
|
wqsyshow:true,
|
|
wqlistData:[],
|
|
earnings:'0%',
|
|
totalCount:'',
|
|
totalMoney:''
|
|
}
|
|
},
|
|
onLoad(e) {
|
|
this.orderType=e.type;
|
|
this.homePageCountData=this.$queue.getData("homePageCountNumOne");
|
|
this.titleData=this.orderType=='2'?'往期加钟率':'往期充值率';
|
|
if(this.orderType=='2'){
|
|
this.tapNav=[
|
|
{name:'本期已加钟订单',isSfwc:'1'},
|
|
{name:'本期未加钟订单',isSfwc:'0'}
|
|
]
|
|
}else{
|
|
this.tapNav=[
|
|
{name:'本期已充值订单',isSfwc:'1'},
|
|
{name:'本期未充值订单',isSfwc:'0'}
|
|
]
|
|
}
|
|
this.userId = uni.getStorageSync("artificerId");
|
|
this.getTime()
|
|
// this.getData();
|
|
uni.setNavigationBarTitle({
|
|
title: this.titleData
|
|
});
|
|
},
|
|
onPullDownRefresh: function() {
|
|
this.page = 1;
|
|
this.getData();
|
|
},
|
|
methods:{
|
|
goOder(item){
|
|
uni.navigateTo({
|
|
url:'/my/order/revenueDetails?ordersId='+item.ordersId
|
|
})
|
|
},
|
|
tabClick(isSfwc,index){
|
|
this.tapNum=index;
|
|
this.isSfwc=isSfwc;
|
|
this.page=0;
|
|
this.listData = [];
|
|
uni.showLoading({
|
|
title: '加载中'
|
|
});
|
|
this.getData();
|
|
},
|
|
// 加载更多
|
|
loadMore: async function() {
|
|
//loadingType: 0.数据未加载完 1.数据全部加载完了 2.数据加载中
|
|
if(this.loadingType==0){
|
|
this.loadingType=2
|
|
//模拟数据请求
|
|
setTimeout(()=>{
|
|
this.page++;
|
|
this.loadingType=0;
|
|
this.getData()
|
|
},1000)
|
|
}
|
|
},
|
|
getTime(){
|
|
var that=this;
|
|
let data = {
|
|
userId:that.userId,
|
|
}
|
|
that.$Request.getT('/app/artificer/getZqhzList', data).then(res => {
|
|
console.log('------>',res)
|
|
if (res.code == 0) {
|
|
that.wqlistData = res.data;
|
|
} else {
|
|
that.$queue.showToast(res.msg);
|
|
}
|
|
});
|
|
},
|
|
wqlistCallback(index){
|
|
this.wqsyshow = false;
|
|
var startAndEnd = this.wqlistData[index].label.split(" 至 ");
|
|
this.startTime = startAndEnd[0];
|
|
this.endTime = startAndEnd[1];
|
|
this.getData();
|
|
},
|
|
getData(){
|
|
var that=this;
|
|
let data = {
|
|
userId:that.userId,
|
|
orderType:that.orderType,
|
|
startTime:that.startTime,
|
|
endTime:that.endTime,
|
|
page: that.page,
|
|
limit: that.limit,
|
|
isSfwc:that.isSfwc
|
|
}
|
|
that.$Request.getT('/app/artificer/getOrderTypeList', data).then(res => {
|
|
uni.hideLoading()
|
|
if (res.code == 0) {
|
|
if (that.page == 1) that.listData = []; //如果是第一页需手动制空列表
|
|
that.listData = [...that.listData, ...res.data.list]; //追加新数据
|
|
that.earnings = res.earnings;
|
|
that.totalCount=res.data.totalCount;
|
|
that.totalMoney=res.totalMoney;
|
|
} else {
|
|
that.$queue.showToast(res.msg);
|
|
}
|
|
});
|
|
},
|
|
details(){
|
|
uni.navigateTo({
|
|
url:'/pages/index/revenueDetails'
|
|
})
|
|
},
|
|
wangqi(){//往期 跳页
|
|
this.wqsyshow = true;
|
|
this.listData = [];
|
|
// uni.navigateTo({
|
|
// url:'/pages/index/previousAdditions?type=2'
|
|
// })
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.view-title{
|
|
width: 100%;
|
|
padding: 0 5px;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
/deep/.page-box{
|
|
width: 100%;
|
|
background: #f7f7f7;
|
|
}
|
|
/deep/.t-loading-box{
|
|
text-align: center;
|
|
}
|
|
/deep/.refresh-body .content{
|
|
/* background-color: #f7f7f7; */
|
|
}
|
|
/deep/.refresh-body{
|
|
height:480px !important;
|
|
border-top: 2px solid #f7f7f7;
|
|
}
|
|
.tapNav-name{
|
|
font-weight: bold;
|
|
font-size: 28rpx;
|
|
color: #333333;
|
|
}
|
|
.tap-padding{
|
|
padding: 0 22rpx;
|
|
}
|
|
.tapNav-bor{
|
|
width: 100px;
|
|
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{
|
|
background: #fff;
|
|
width:100%;
|
|
display: flex;
|
|
flex-direction:row;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
.tapNav-view{
|
|
height: 40px;
|
|
width: 50%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
position: relative;
|
|
}
|
|
.table-view span{
|
|
font-weight: 400;
|
|
font-size: 19rpx;
|
|
color: #666666;
|
|
}
|
|
.table-view span:nth-child(1){
|
|
font-weight: bold;
|
|
}
|
|
.table-view span{
|
|
margin-bottom: 15px;
|
|
}
|
|
.table-view{
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.mian-table{
|
|
width: 100%;
|
|
padding: 10px;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
background: #FFFFFF;
|
|
border-radius: 24rpx;
|
|
margin-bottom: 10px;
|
|
}
|
|
.view-num{
|
|
color: #029D88 !important;
|
|
}
|
|
.mian-bottom{
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-top: 4px;
|
|
}
|
|
.mian-foot-adder{
|
|
margin: 2px 0px;
|
|
}
|
|
.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{
|
|
width: 73%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.mian-foot-img image{
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 20rpx;
|
|
}
|
|
.mian-foot-img{
|
|
width: 160rpx;
|
|
height: 160rpx;
|
|
background: #E6E6E6;
|
|
border-radius: 30rpx;
|
|
}
|
|
|
|
.mian-foot{
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
}
|
|
.shouyi-text{
|
|
color: #7D7D7D;
|
|
font-size: 26rpx;
|
|
}
|
|
.mian-list-top-time span{
|
|
font-size:26rpx;
|
|
}
|
|
.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: 26rpx;
|
|
color: #666666;
|
|
}
|
|
.view-title-left-text{
|
|
font-weight: 400;
|
|
font-size: 26rpx;
|
|
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{
|
|
width: 95%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.header-bottom-money{
|
|
font-weight: bold;
|
|
font-size: 49rpx;
|
|
color: #00b198;
|
|
margin-bottom: 3px;
|
|
}
|
|
.header-bottom{
|
|
align-items: end;
|
|
}
|
|
.header-top-btn{
|
|
width: 174rpx;
|
|
height: 49rpx;
|
|
line-height: 46rpx;
|
|
text-align: center;
|
|
font-size: 26rpx;
|
|
background: linear-gradient(90deg, #019C88, #0FA78B, #35C495);
|
|
border-radius: 24rpx;
|
|
color: #fff;
|
|
}
|
|
.header-text{
|
|
font-weight: 400;
|
|
font-size: 26rpx;
|
|
color: #00b198;
|
|
margin-right: 8rpx;
|
|
}
|
|
.header-text1{
|
|
font-weight: 400;
|
|
font-size: 24rpx;
|
|
color: #00b198;
|
|
margin-right: 8rpx;
|
|
border-radius: 30rpx;
|
|
}
|
|
|
|
.header-top-left{
|
|
margin-top:10rpx;
|
|
text-align: right;
|
|
}
|
|
.header-top{
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
}
|
|
.header{
|
|
width: 100%;
|
|
height: 280rpx;
|
|
padding: 15px;
|
|
background:#f7f7f7 url('../../static/index/technician15.png');
|
|
background-repeat: no-repeat;
|
|
background-size: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-around;
|
|
/*border-radius: 24rpx;*/
|
|
}
|
|
.content{
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
/*height: 100vh;*/
|
|
background-color: #f7f7f7;
|
|
overflow: scroll;
|
|
}
|
|
.clock-padding{
|
|
font-family: Helvetica Neue, Helvetica, sans-serif;
|
|
}
|
|
.od-number{
|
|
font-size: 24rpx;
|
|
color: #7ea866;
|
|
}
|
|
.add-text{
|
|
font-size: 26rpx;
|
|
color: #999;
|
|
}
|
|
</style> |