<template>
|
<view :data-theme='theme()' :class="theme() || ''">
|
<view class="top-tabbar">
|
<view class="d-b-c" id="searchBox">
|
<view class="index-search t-c flex-1" style="height: 70rpx; line-height: 70rpx; margin: 10rpx;">
|
<span class="icon iconfont icon-sousuo"></span>
|
<input type="text" v-model="search" class="flex-1 ml10 f30 gray3" value="" placeholder-class="f24 gray6"
|
placeholder="核销员姓名" confirm-type="search" @confirm="gotoSearch()"/>
|
</view>
|
<view class="index-search t-c flex-1" style="height: 70rpx; line-height: 70rpx; margin: 10rpx;">
|
<picker mode="date" @change="onChangeStartTime">
|
<view class="label-right">
|
{{start_time}}
|
</view>
|
</picker>
|
</view>
|
<view class="index-search t-c flex-1" style="height: 70rpx; line-height: 70rpx; margin: 10rpx;">
|
<picker mode="date" @change="onChangeEndTime">
|
<view class="label-right">
|
{{end_time}}
|
</view>
|
</picker>
|
</view>
|
|
</view>
|
</view>
|
<view class="p20 gray6">共{{total_num}}条核销记录</view>
|
<!--列表-->
|
<scroll-view scroll-y="true" class="scroll-Y" :style="'height:' + scrollviewHigh + 'px;'" lower-threshold="50"
|
@scrolltolower="scrolltolowerFunc">
|
<view :class="topRefresh ? 'top-refresh open' : 'top-refresh'">
|
<view class="circle" v-for="(circle, n) in 3" :key="n"></view>
|
</view>
|
<view class="order-list">
|
<view class="item" v-for="(item, index) in listData" :key="index">
|
<view class="d-b-c pb20">
|
<view class="item-dianpu">
|
<view class="item-d-l mr10">
|
<i class="icon iconfont icon-dianpu1"></i>
|
<text class="fb gray3 f32" v-if="item.store">{{item.store.store_name}}</text>
|
</view>
|
|
</view>
|
</view>
|
<!--显示-->
|
<view class="d-s-s">
|
<view class="pl30">
|
<view class="p-20-0">
|
<text>核销员:</text>
|
<text>{{ item.clerk.real_name }}</text>
|
</view>
|
<view class="p-20-0">
|
<text>核销时间:</text>
|
<text>{{ item.create_time }}</text>
|
</view>
|
<view class="p-20-0">
|
<text>订单号:</text>
|
<text>{{ item.order.order_no }}</text>
|
</view>
|
</view>
|
|
</view>
|
</view>
|
<view class="d-c-c p30" v-if="listData.length == 0 && !loading">
|
<text class="iconfont icon-wushuju"></text>
|
<text class="cont">亲,暂无相关记录哦</text>
|
</view>
|
<uni-load-more v-else :loadingType="loadingType"></uni-load-more>
|
</view>
|
</scroll-view>
|
</view>
|
</template>
|
|
<script>
|
import Popup from '@/components/uni-popup.vue';
|
import uniLoadMore from '@/components/uni-load-more.vue';
|
import {
|
pay
|
} from '@/common/pay.js';
|
export default {
|
components: {
|
Popup,
|
uniLoadMore
|
},
|
data() {
|
return {
|
/*手机高度*/
|
phoneHeight: 0,
|
/*可滚动视图区域高度*/
|
scrollviewHigh: 0,
|
/*顶部刷新*/
|
topRefresh: false,
|
/*数据*/
|
listData: [],
|
/*最后一页码数*/
|
last_page: 0,
|
/*当前页面*/
|
page: 1,
|
/*每页条数*/
|
list_rows: 10,
|
total_num:0,
|
/*有没有等多*/
|
no_more: false,
|
/*是否正在加载*/
|
loading: true,
|
isfirst:false,
|
start_time:'开始时间',
|
end_time:'结束时间',
|
search:''
|
};
|
},
|
computed: {
|
/*加载中状态*/
|
loadingType() {
|
if (this.loading) {
|
return 1;
|
} else {
|
if (this.listData.length != 0 && this.no_more) {
|
return 2;
|
} else {
|
return 0;
|
}
|
}
|
}
|
},
|
onLoad(e) {
|
},
|
mounted() {
|
this.init();
|
this.initData();
|
/*获取订单列表*/
|
this.getData();
|
},
|
onShow() {
|
if(this.isfirst){
|
this.initData();
|
this.getData();
|
}
|
},
|
methods: {
|
initData(){
|
let self=this;
|
self.page = 1;
|
self.listData = [];
|
self.no_more=false;
|
},
|
|
/*初始化*/
|
init() {
|
let self = this;
|
uni.getSystemInfo({
|
success(res) {
|
self.phoneHeight = res.windowHeight;
|
// 计算组件的高度
|
let view = uni.createSelectorQuery().in(self).select('.top-tabbar');
|
view.boundingClientRect(data => {
|
let h = self.phoneHeight - data.height;
|
self.scrollviewHigh = h;
|
}).exec();
|
}
|
});
|
},
|
|
|
/*可滚动视图区域到底触发*/
|
scrolltolowerFunc() {
|
let self = this;
|
if (self.no_more) {
|
return;
|
}
|
self.page++;
|
if (self.page <= self.last_page) {
|
self.getData();
|
} else {
|
self.no_more = true;
|
}
|
},
|
|
//选择时间
|
onChangeStartTime(e) {
|
let self = this;
|
let val = e.detail.value;
|
self.start_time = val;
|
self.initData();
|
self.getData();
|
},
|
onChangeEndTime(e) {
|
let self = this;
|
let val = e.detail.value;
|
self.end_time = val;
|
self.initData();
|
self.getData();
|
},
|
gotoSearch() {
|
let self=this;
|
self.initData();
|
self.getData();
|
},
|
|
/*获取数据*/
|
getData() {
|
let self = this;
|
self.loading = true;
|
let start_time = '';
|
let end_time = '';
|
if(self.start_time && self.start_time != "开始时间"){
|
start_time=self.start_time;
|
}
|
if(self.end_time && self.end_time != "结束时间"){
|
end_time=self.end_time;
|
}
|
self._get(
|
'store.Order/index', {
|
page: self.page,
|
list_rows: self.list_rows,
|
search: self.search,
|
start_time: start_time,
|
end_time: end_time
|
},
|
function(res) {
|
self.loading = false;
|
self.listData = self.listData.concat(res.data.list.data);
|
self.last_page = res.data.list.last_page;
|
self.total_num = res.data.list.total;
|
if (res.data.list.last_page <= 1) {
|
self.no_more = true;
|
} else {
|
self.no_more = false;
|
}
|
self.isfirst=true;
|
}
|
);
|
},
|
}
|
};
|
</script>
|
|
<style lang="scss">
|
page {
|
background-color: #f2f2f2;
|
}
|
|
.top-tabbar {
|
height: 96rpx;
|
}
|
|
.order-list .order-head .state-text {
|
padding: 10rpx 12rpx;
|
margin-right: 21rpx;
|
border-radius: 4rpx;
|
background: #FFE7E4;
|
font-size: 22rpx;
|
color: #F6220C;
|
}
|
|
.shop-name {
|
font-size: 26rpx;
|
font-family: PingFang SC;
|
font-weight: 500;
|
color: #333333;
|
}
|
|
.order-list .item {
|
margin-bottom: 30rpx;
|
padding: 30rpx;
|
background: #ffffff;
|
}
|
|
.order-list .product-list,
|
.order-list .one-product {
|
padding: 30rpx 0 27rpx 0;
|
height: 150rpx;
|
}
|
|
.one-product .pro-info {
|
padding: 0 21rpx 0 37rpx;
|
display: -webkit-box;
|
width: 361rpx;
|
overflow: hidden;
|
-webkit-line-clamp: 2;
|
-webkit-box-orient: vertical;
|
font-size: 26rpx;
|
color: #333333;
|
}
|
|
.order-list .cover,
|
.order-list .cover image {
|
width: 150rpx;
|
height: 150rpx;
|
border-radius: 8rpx;
|
}
|
|
.order-list .total-count {
|
padding-left: 20rpx;
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
align-items: flex-end;
|
}
|
|
.total-count .count {
|
padding-top: 16rpx;
|
color: #999999;
|
font-size: 22rpx;
|
}
|
|
.product-list .total-count {
|
position: absolute;
|
top: 0;
|
right: 0;
|
bottom: 0;
|
background: rgba(255, 255, 255, 0.9);
|
}
|
|
.product-list .total-count .left-shadow {
|
position: absolute;
|
top: 0;
|
bottom: 0;
|
left: -24rpx;
|
width: 24rpx;
|
overflow: hidden;
|
}
|
|
.product-list .total-count .left-shadow::after {
|
position: absolute;
|
top: 0;
|
bottom: 0;
|
width: 24rpx;
|
right: -12rpx;
|
display: block;
|
content: '';
|
background-image: radial-gradient(rgba(0, 0, 0, 0.2) 10%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0) 80%);
|
}
|
|
.order-list .order-bts {
|
display: flex;
|
justify-content: flex-end;
|
align-items: center;
|
}
|
|
.order-list .order-bts.presale {
|
display: block;
|
padding-top: 12rpx;
|
}
|
|
.order-list .order-bts button {
|
margin: 0;
|
padding: 0 30rpx;
|
height: 60rpx;
|
line-height: 60rpx;
|
margin-left: 20rpx;
|
font-size: 32rpx;
|
border: 1px solid #F6220C;
|
border-radius: 30px;
|
background: #ffffff;
|
white-space: nowrap;
|
color: #F6220C;
|
font-family: PingFang SC;
|
}
|
|
.order-list .order-bts button::after {
|
display: none;
|
}
|
|
.order-list .order-bts button.btn-border-red {
|
border: 1px solid $dominant-color;
|
font-size: 24rpx;
|
color: $dominant-color;
|
}
|
|
.order-list .order-bts button.btn-red {
|
background: linear-gradient(90deg, #FF6B6B 4%, #F6220C 100%);
|
border-radius: 30rpx;
|
font-size: 32rpx;
|
font-family: PingFang SC;
|
color: #ffffff;
|
border: none;
|
}
|
|
.buy-checkout {
|
width: 100%;
|
}
|
|
.buy-checkout .item {
|
min-height: 50rpx;
|
line-height: 50rpx;
|
padding: 20rpx;
|
display: flex;
|
justify-content: space-between;
|
font-size: 28rpx;
|
}
|
|
.buy-checkout .iconfont.icon-weixin {
|
color: #04be01;
|
font-size: 50rpx;
|
}
|
|
.buy-checkout .iconfont.icon-yue {
|
color: #f0de7c;
|
font-size: 50rpx;
|
}
|
|
.buy-checkout .item.active .iconfont.icon-xuanze {
|
color: #04be01;
|
}
|
|
.item-dianpu {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
font-size: 24rpx;
|
line-height: 30rpx;
|
}
|
|
.item-dianpu .icon-jiantou {
|
font-size: 24rpx;
|
color: #333333;
|
}
|
|
.item-d-l {
|
display: flex;
|
}
|
|
.icon-dianpu1 {
|
margin-right: 20rpx;
|
color: #333333;
|
font-size: 32rpx;
|
}
|
</style>
|