123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289 |
- <template>
- <view class="content">
- <view class="topView">
- <!-- 切换tab -->
- <view class="tabBox">
- <scroll-view scroll-x="true" class="scroll">
- <view class="tabCotn">
- <view class="tabLine" :class="{tabactive:tabIndex==0}" @click="tabClick(0)">待点评</view>
- <view class="tabLine" :class="{tabactive:tabIndex==1}" @click="tabClick(1)">历史点评</view>
-
- </view>
- </scroll-view>
- </view>
-
- </view>
- <!-- 列表 -->
- <view class="shopList">
- <view v-for="(item,index) in shopData" :key="index">
- <!-- shopBox -->
- <view class="shopBox" @click="goAppraise(item)" >
- <view class=" shopTop">
- <view class="shopName">{{item.ShopName}}</view>
- <!-- 订单状态 1 待提交 2 待作业 3 待点评 4 待回复 5 已完成 -->
- <view class="type" v-if="item.State == 1">待提交</view>
- <view class="type" v-if="item.State == 2">待作业</view>
- <view class="type" v-if="item.State == 3">待点评</view>
- <view class="type" v-if="item.State == 4">待回复</view>
- <view class="type" v-if="item.State == 5">已完成</view>
- </view>
- <!-- 第2行 -->
- <view class="bottomView">
- <!-- 运营经理 -->
- <view class="manager">{{item.ManagerName}} · {{item.CheckTime}}</view>
- <!-- 评分 -->
- <view class="score" v-if="item.ShopScore">{{item.ShopScore}}分</view>
- </view>
-
- <!-- 点评 -->
- <view class="reviews" @click="goReviews(item)">点评</view>
-
- </view>
- </view>
- </view>
- <!-- 上拉 加载更多 -->
- <view class="noMore" v-if="noMoreShow">没有更多数据</view>
- <!-- 无数据空白页 -->
- <view class="nodataBox" v-if="shopData.length == 0">
- <image src="../../../static/img/pic_empty_def.png" mode="widthFix" class="nodataImg"></image>
- <view class="noTxt">暂无数据</view>
- </view>
-
- </view>
- </template>
- <script>
-
- export default {
-
- data() {
- return {
- tabIndex: 0,
- status: '',
- shopData: [],
- page: 1,
- noMoreShow: false,
-
- }
- },
- onShow() {
-
- this.page = 1
- this.getShopData()
- },
- methods: {
-
- goAppraise(item){
- uni.navigateTo({
- url:'reportDetail?id='+item.ID
- })
- },
-
- tabClick(num) {
- this.tabIndex = num;
-
- this.status = num;
-
- this.page = 1;
- this.getShopData()
- },
-
- getShopData() {
- uni.showLoading({
- title: '加载中'
- })
- let url = 'accompany/SuperCheckSheet/listMyStayCheckPage',
- params = {
- page: this.page,
- limit: 20,
- userEvaState: this.status,
- }
- this.$http(url, params, 'GET').then(res => {
- var list = res.data.Items
- // 处理 undefined和null转为空白字符串
- list.forEach((item, index) => {
- for (const key in item) {
- item[key] = this.$praseStrEmpty(item[key])
- }
- })
- if (this.page == 1 && list.length == 0) {
- this.noMoreShow = false
- } else if (list.length < 20) {
- this.noMoreShow = true
- }
- if (this.page == 1) {
- this.shopData = list
- } else {
- this.shopData = this.shopData.concat(list)
- }
- })
- },
-
- },
- // 下拉刷新 上拉加载更多
- onPullDownRefresh() {
- this.page = 1
- this.getShopData()
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- onReachBottom() {
- this.page++;
- this.getShopData()
- },
- }
- </script>
- <style>
- .content {
- background-color: #F4F5F7;
- min-height: 100vh;
- }
- .topView {
- width: 100%;
- height: 105rpx;
- background-color: #FFFFFF;
- left: 0rpx;
- top: 0rpx;
- position: fixed;
- z-index: 99;
- }
- /* #ifdef H5 */
- .topView {
- top: 44px;
- }
- /* #endif */
-
- .tabBox {
- width: 100%;
- }
- .tabCotn {
- display: flex;
- justify-content: space-around;
- }
- .tabLine {
-
- text-align: center;
- color: #3C3C3C;
- font-size: 30rpx;
- line-height: 104rpx;
- }
- .tabactive {
- color: #FF4F00;
- border-bottom: 4rpx solid #FF4F00;
- }
- .shopList {
- background-color: #F4F5F7;
- padding: 0rpx 24rpx;
- padding-top: 105rpx;
- }
- .shopBox {
- background-color: #FFFFFF;
- border-radius: 10rpx;
- margin: 20rpx 0rpx;
- }
- .shopTop {
- display: flex;
- padding: 30rpx 20rpx 10rpx 20rpx;
- justify-content: space-between;
- }
- .shopName {
- font-size: 28rpx;
- color: #3C3C3C;
- font-weight: bold;
- width: 500rpx;
- }
- .type {
- font-size: 28rpx;
- color: #FF4F00;
- margin-left: 10rpx;
- }
- .bottomView {
- padding: 28rpx 20rpx;
- display: flex;
- justify-content: space-between;
- border-bottom: 1rpx #EEEEEE solid;
- }
- .manager {
- font-size: 24rpx;
- color: #666666;
- }
- .score {
- font-size: 28rpx;
- color: #B98B5D;
- }
- .reviews{
- width: 150rpx;
- height: 56rpx;
- color: #FF4F00;
- font-size: 28rpx;
- line-height: 56rpx;
- text-align: center;
- border-radius: 28rpx;
- border: 2rpx #FF4F00 solid;
- position: relative;
- right: 20rpx;
- top: 20rpx;
- }
- /* 空白页css */
- .nodataBox {
- text-align: center;
- }
- .nodataImg {
- width: 400rpx;
- padding-top: 290rpx;
- }
- .noTxt {
- font-size: 30rpx;
- color: #999999;
- padding-top: 50rpx;
- }
- .noMore {
- text-align: center;
- line-height: 50rpx;
- color: #999999;
- font-size: 28rpx;
- }
- </style>
|