sadjv3_user/pages/my/orderDetailsList.vue

497 lines
13 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- 自定义下拉刷新与上拉加载演示(vue) -->
<template>
<view class="content-view">
<view class="service-head-top">
<view class="service-head-top-left">
<image @click="backImg" src="../../static/fanhui.png" mode="widthFix"></image>
<span>{{previousPage.name}}</span>
</view>
<view>
<uni-search-bar @service="serviceTrue" @confirm="search" :cancelext="'取消'" v-model="searchValue" @input="input"
@clear="clear">
</uni-search-bar>
<view class="search-btn" @click="searchBtn">
搜索
</view>
</view>
</view>
<t-refresh ref="refresh" v-if="dataList.length>0" @refresh="refresh" @loadMore="loadMore" :loadingType="loadingType" :tPadding="0">
<template slot="content">
<!-- 升级订单 -->
<view class="item" v-for="(item,index) in dataList" :key="index" @click="itemClick(item)">
<view class="flex justify-between">
<view class="flex align-center profile-img">
<image src="../../static/logo.png" style="width: 55rpx;height: 55rpx;border: 1px solid#d7f2ee;border-radius: 50%;">
</image>
<view class="margin-left-xs ">{{item.artificerName}}</view>
</view>
<view class="text-green"><span>{{item.ordersNo}}</span></view>
<!-- <view class="text-green" v-if="item.status ==2"><span>{{item.ordersNo}}</span><span>待服务</span></view>
<view class="text-green" v-if="item.status ==3"><span>{{item.ordersNo}}</span><span>待评价</span></view>
<view class="text-green" v-if="item.status ==4"><span>{{item.ordersNo}}</span><span>已取消</span></view>
<view class="text-green" v-if="item.status ==5"><span>{{item.ordersNo}}</span><span>已完成</span></view>
<view class="text-green" v-if="item.status ==6"><span>{{item.ordersNo}}</span><span>服务中</span></view>
<view class="text-green" v-if="item.status ==7"><span>{{item.ordersNo}}</span><span>技师出发</span></view>
<view class="text-green" v-if="item.status ==8"><span>{{item.ordersNo}}</span><span>技师到达</span></view>
<view class="text-green" v-if="item.status ==9"><span>{{item.ordersNo}}</span><span>待确认</span></view>
<view class="text-green" v-if="item.status ==10"><span>{{item.ordersNo}}</span><span>待补单</span></view> -->
<!-- <view class="u-tips-color">{{item.createTime}}</view> -->
</view>
<view class="margin-top-sm" style="width: 100%;height: 1rpx;background: #f7f7f7;"></view>
<view class=" u-flex u-p-t-30" v-if="item.ordersMassageList[0].userPackageDetail==null">
<view class="u-m-r-10">
<image :src="item.ordersMassageList[0].massageType.massageImg" mode="" style="height: 155rpx;width: 155rpx;flex: 0 0 155rpx;"></image>
</view>
<view class="u-flex-1" style="margin-left: 20rpx;">
<view class="text-bold u-line-1" style="width: 560rpx;">
<view class=" text-lg "
style="font-size: 32rpx;margin-top: 0rpx;display: inline-block;width: 470rpx; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
{{item.entryName}}
</view>
</view>
<view class="u-font-12 u-tips-color flex justify-between" style="margin-top: 6rpx;">
预约时间:{{item.serveTime}}
</view>
<view class="flex-sub u-font-12 margin-top-xs" style="color: #999999;">
实付:<text class="text-df" style="color: #FF1200;">¥</text><text class="text-xl text-bold" style="color: #FF1200;">{{item.payMoneyTotal}}</text>
</view>
</view>
</view>
<view class=" u-flex u-p-t-30" v-else>
<view class="u-m-r-10">
<image :src="item.ordersMassageList[0].userPackageDetail.massageImg" mode="" style="height: 155rpx;width: 155rpx;flex: 0 0 155rpx;"></image>
</view>
<view class="u-flex-1" style="margin-left: 20rpx;">
<view class="text-bold u-line-1" style="width: 560rpx;">
<view class=" text-lg "
style="font-size: 32rpx;margin-top: 0rpx;display: inline-block;width: 470rpx; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
{{item.entryName}}
</view>
</view>
<view class="u-font-12 u-tips-color flex justify-between" style="margin-top: 6rpx;">
预约时间:{{item.serveTime}}
</view>
<view class="flex-sub u-font-12 margin-top-xs" style="color: #999999;">
实付:<text class="text-df" style="color: #FF1200;">¥</text><text class="text-xl text-bold" style="color: #FF1200;">{{item.payMoneyTotal}}</text>
</view>
</view>
</view>
</view>
</template>
</t-refresh>
<empty v-if="dataList.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 {
loadingType:0,
myId: '',
// v-model绑定的这个变量不要在分页请求结束中自己赋值
dataList: [],
tabList: [],
typeData:'105',
tabIndex: 0,
searchValue:'',
serviceTrue:true,
page:1,
limit:10,
titleNmae:'',
classifyId:'',
previousPage:{}
}
},
onLoad(e){
var that=this;
that.previousPage=e;
that.isVIP=this.$queue.getData('isVIP');
that.myId = uni.getStorageSync('userId');
that.getData()
},
onPullDownRefresh: function() {
this.page = 1;
this.getData();
},
methods: {
// 加载更多
loadMore: async function() {
//loadingType: 0.数据未加载完 1.数据全部加载完了 2.数据加载中
if(this.loadingType==0){
this.loadingType=2
//模拟数据请求
setTimeout(()=>{
this.page++;
this.loadingType=0;
this.getData()
},1000)
}
},
input(res) {//搜索 输入框
this.searchValue=res;
},
searchBtn(){//搜索按钮
if(this.searchValue!=""){
this.getData()
}
},
getData(){
this.$Request.get("/app/artificer/selectAppOrdersList", {
page:this.page,
limit:this.limit,
title:this.searchValue,
userPackageId:this.previousPage.id
}).then(res => {
if (res.code == 0) {
if (res.data) {
if (this.page == 1) this.dataList = []; //如果是第一页需手动制空列表
this.dataList = [...this.dataList, ...res.data.list]; //追加新数据
uni.stopPullDownRefresh()
}
}
});
},
backImg(){//返回上一页
if(this.previousPage.name=='次卡'){
uni.reLaunch({
url:'/pages/my/cikarDrtail?id='+this.previousPage.id+'&limit='+10+'&page='+1+'&name='+'my'
})
}else{
uni.reLaunch({
url:'/pages/my/fuwuliaochengDetail?id='+this.previousPage.id+'&limit='+10+'&page='+1+'&name='+'my'
})
}
},
clear(res) {
this.getData()
},
itemClick(item) {
// uni.navigateTo({
// url:'/my/order/payCLDetail?ordersId='+item.ordersId
// })
}
}
}
</script>
<style scoped>
.dingdan-cont{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
/deep/.justify-between{
align-items: center;
}
.ding-view{
position: relative;
}
.text-green span:nth-child(1){
font-weight: 400;
font-size: 25rpx;
color: #7D7D7D;
margin-right: 10px;
}
.text-green span:nth-child(2){
font-weight: 400;
font-size: 25rpx;
color: #7D7D7D;
margin-right: 10px;
}
.header-bottom-title-liao{
display: inline-block;
padding: 0 7px;
height: 16px;
line-height: 16px;
text-align: center;
background: linear-gradient(-90deg, #FF6F48, #FF9E69);
border-radius: 7px;
margin-left: 5px;
font-weight: bold;
font-size: 8px;
border-top-left-radius: 20px;
border-bottom-right-radius: 20px;
color: #fff;
}
/deep/.refresh-body .content{
background-color: #f7f7f7;
}
/deep/.refresh-body{
height: 100% !important;
border-top: 2px solid #f7f7f7;
}
.content-view{
width: 100%;
height: 100vh;
overflow: auto;
background-color: #f7f7f7;
}
.item-view-bottom-btn{
text-align: center;
width: 131rpx;
height: 50rpx;
line-height: 50rpx;
background: linear-gradient(90deg, #019C88, #0FA78B, #35C495);
border-radius: 10rpx;
font-weight: bold;
font-size: 24rpx;
color: #FFFFFF;
}
.item-view-bottom-qian span:nth-child(4){
font-weight: bold;
font-size: 31rpx;
color: #848484;
text-decoration-line: line-through;
margin-left: 5px;
}
.item-view-bottom-qian span:nth-child(1){
font-weight: 400;
font-size: 25rpx;
color: #F95900;
}
.item-view-bottom-qian span:nth-child(2){
font-weight: bold;
font-size: 36.81rpx;
color: #F95900;
}
.item-view-bottom-qian span:nth-child(3){
font-weight: 400;
font-size: 25rpx;
color: #F95900;
}
.item-view-bottom{
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.item-view-jianjie{
font-weight: 400;
font-size: 22rpx;
color: #848484;
margin:5px 0px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 显示的行数,可以根据需要修改 */
overflow: hidden;
text-overflow: ellipsis;
}
.item-view-biao{
padding: 1px 2px;
border-radius: 6rpx;
}
.tuina{
background-color:#d1f2df;
color: #17984d;
}
.xiaoer{
background-color:#f1f8d7;
color: #58b314;
}
.taishi{
background-color:#e5d5c6;
color: #805d39;
}
.kangfu{
background-color:#fcf3da;
color: #ff8600;
}
.item-view-xiangmu span:nth-child(2){
font-weight: normal;
color: #666666;
margin-left: 5px;
}
.item-view-xiangmu{
width: 100%;
display: flex;
flex-direction: row;
font-weight: 400;
font-size: 21rpx;
margin-top: 5px;
}
.item-view-title-text{
display: inline-block;
width: 100px;
font-weight: bold;
font-size: 33rpx;
color: #333333;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.item-view-title{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.item-view{
width: 55%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
.item-img{
width: 285rpx;
height: 120px;
border-radius: 14rpx;
position: relative;
}
.img-span{
padding: 2px 5px;
font-weight: 400;
font-size: 8px;
color: #FFFFFF;
background: linear-gradient(-90deg, #FF6F48, #FF9E69);
border-radius: 7px 0px 7px 0px;
position: absolute;
bottom: 0px;
right: 0;
margin-bottom: 5px;
margin-right: 5px;
}
.item-img image{
width: 100%;
height: 100%;
}
.item {
width: 95%;
display: flex;
flex-direction: column;
height: 140px;
background: #FFFFFF;
border-radius: 21rpx;
padding: 0px 5px;
margin: 20px auto 0px auto;
}
.item-detail {
padding: 5rpx 15rpx;
border-radius: 10rpx;
font-size: 28rpx;
color: white;
background-color: #007AFF;
}
.item-line {
position: absolute;
bottom: 0rpx;
left: 0rpx;
height: 1px;
width: 100%;
background-color: #eeeeee;
}
/deep/.zp-paging-container{
background-color: #f7f7f7;
width:100%;
}
/deep/.zp-paging-container-content{
width: 95%;
margin: 0 auto;
}
.fenlei{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.index-fenl-title{
width: 81rpx;
text-align: center;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
font-weight: bold;
font-size: 34rpx;
color:#019C88;
}
.index-fenl-title-bottom{
position: absolute;
bottom: 0;
margin-bottom: 0px;
width: 81rpx;
height: 14rpx;
border-radius: 7rpx;
background: linear-gradient(-48deg,rgba(1, 156, 136, 0.35),rgba(45, 196, 142, 0.35));
}
/deep/.uni-searchbar__cancel{
display: none;
}
.search-btn{
text-align: center;
line-height: 31px;
color: #fff;
position: absolute;
right: 0;
top: 0;
margin-top:9.4px;
margin-right: 11px;
height: 32px !important;
}
/deep/.uni-searchbar__box-icon-search,.search-btn{
width: 101rpx;
height: 60rpx;
background: #18A689;
border-radius: 31rpx;
}
/deep/.uni-searchbar__box{
height: 31px;
border-radius: 15px !important;
background-color: #fff !important;
border: 2px solid #E5E5E5;
padding: 0px;
display: flex;
flex-direction: row;
flex-flow: row-reverse;
position: relative;
}
/deep/.uni-searchbar{
width: 240px;
border-radius: 31rpx;
}
.service-head-top-left image{
width: 25px;
height: 30rpx;
margin-right: 10px;
}
.service-head-top-left span{
font-weight: bold;
font-size: 44rpx;
color: #171717;
}
.service-head-top-left{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.service-head-top{
width: 100%;
height: 51px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background-color: #fff;
}
</style>