|
|
|
@ -27,7 +27,7 @@ |
|
|
|
<text class="text_7">按收货确认时间</text> |
|
|
|
<view class="flex-col group_8"> |
|
|
|
<view class="lf-flex lf-flex-wrap"> |
|
|
|
<view class="filter-date-item" :class="{active: filterGather.date == item.value}" @click="filterGather.date = item.value" v-for="(item, index) in receivingTimeList" :key="index">{{ item.label }}</view> |
|
|
|
<view class="filter-date-item" :class="{active: filterGather.date == item.value}" @click="selectReceivingTime(item)" v-for="(item, index) in receivingTimeList" :key="index">{{ item.label }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -45,7 +45,7 @@ |
|
|
|
<view class="flex-col group_13"> |
|
|
|
<text class="text_18">按送评信息</text> |
|
|
|
<view class="flex-col items-start text-wrapper_4"> |
|
|
|
<u-input v-model="filterGather.number" placeholder="输入评级编号" class="text-wrapper_4-input" ></u-input> |
|
|
|
<u-input v-model="filterGather.order_num" placeholder="输入评级编号" class="text-wrapper_4-input" ></u-input> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flex-row group_14"> |
|
|
|
@ -57,7 +57,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flex-col items-center group_15"> |
|
|
|
<view class="flex-col items-center group_15" @click="showFilter = false"> |
|
|
|
<view class="section_7"> </view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -67,7 +67,7 @@ |
|
|
|
|
|
|
|
<!-- 页面主体滚动区域 --> |
|
|
|
<swiper :current="tabIndex" :style="{height: swiperContentHeight}" @change="swiperChange"> |
|
|
|
<swiper-item v-for="(tabItem, idx) in tabList" :key="idx" :item-id="tabItem.ident" @touchmove="stopTouchMove"> |
|
|
|
<swiper-item v-for="(tabItem, idx) in tabList" :key="idx" :item-id="tabItem.ident"> |
|
|
|
<scroll-view |
|
|
|
:style="{height: swiperContentHeight, 'padding-top': '30rpx'}" |
|
|
|
:scroll-y="true" |
|
|
|
@ -76,7 +76,7 @@ |
|
|
|
@scrolltolower="scrolltolower" |
|
|
|
@refresherrefresh="refresherrefresh" |
|
|
|
> |
|
|
|
<view class="item-box" v-for="(item, index) in tabItem.data" :key="index"> |
|
|
|
<view class="item-box" v-for="(item, index) in tabItem.data" :key="index" @click="$url('/packages/sonpingDetail/sonpingDetail?id='+ item.id)"> |
|
|
|
<view class="flex-col section_5"> |
|
|
|
<view class="justify-between"> |
|
|
|
<view class="flex-row group_8"> |
|
|
|
@ -84,27 +84,43 @@ |
|
|
|
src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/62677e395a7e3f03107ffc5f/62677e4a35a7e10011e93a80/16509497798740970822.png" |
|
|
|
class="image_7" |
|
|
|
/> |
|
|
|
<text class="text_7">在线送评</text> |
|
|
|
<text class="text_7">在线送评 todo</text> |
|
|
|
</view> |
|
|
|
<text class="text_8">待确认</text> |
|
|
|
<text class="text_8">{{ ['','待确认','评级中','待付款','待收货'][item.status] }}</text> |
|
|
|
</view> |
|
|
|
<view class="justify-between group_9"> |
|
|
|
<view class="flex-row"> |
|
|
|
<text>李丽丽</text> |
|
|
|
<text class="text_10">15273936409</text> |
|
|
|
<text>{{ item.owner }}</text> |
|
|
|
<text class="text_10">{{ item.tel }}</text> |
|
|
|
</view> |
|
|
|
<text>共5件</text> |
|
|
|
<text>共{{ item.num }}件</text> |
|
|
|
</view> |
|
|
|
<view class="justify-between group_11"> |
|
|
|
<text class="text_12">更多</text> |
|
|
|
<view class="flex-row"> |
|
|
|
<view class="flex-col items-center text-wrapper"> |
|
|
|
<!-- <text class="text_12">更多</text> --> |
|
|
|
<text class="text_12"></text> |
|
|
|
<view class="flex-row" v-if="item.status == 1"> |
|
|
|
<view class="flex-col items-center text-wrapper" @click.stop="orderCancel"> |
|
|
|
<text>取消</text> |
|
|
|
</view> |
|
|
|
<view class="flex-col items-center text-wrapper_1"> |
|
|
|
<view class="flex-col items-center text-wrapper_1" @click.stop="orderSend"> |
|
|
|
<text>寄送藏品</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flex-row" v-else-if="item.status == 2"> |
|
|
|
<view class="flex-col items-center text-wrapper" @click.stop="orderAddressChange"> |
|
|
|
<text>更改地址</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flex-row" v-else-if="item.status == 3"> |
|
|
|
<view class="flex-col items-center text-wrapper_1" style="border-color: #EA2B2B; color: #EA2B2B;" @click.stop="orderPay"> |
|
|
|
<text>付款</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="flex-row" v-else-if="item.status == 4"> |
|
|
|
<view class="flex-col items-center text-wrapper_1" @click.stop="orderConfirm"> |
|
|
|
<text>确认收货</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -128,12 +144,13 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { orderList } from '@/service/order.js'; |
|
|
|
|
|
|
|
export default { |
|
|
|
data(){ |
|
|
|
let publicKey = { |
|
|
|
page: 1, |
|
|
|
pageSize: 5, |
|
|
|
pageSize: 10, |
|
|
|
isPage: true, |
|
|
|
status: 'loading', // loading加载,nomore没有更多了 |
|
|
|
isRefresher: false, // 下拉刷新状态,默认没有开启下拉 |
|
|
|
@ -143,34 +160,39 @@ |
|
|
|
tabList: [{ |
|
|
|
name: '全部', |
|
|
|
ident: 'all', |
|
|
|
type: 0, |
|
|
|
data: [], |
|
|
|
badge: {isDot: false}, |
|
|
|
requestFunction: 'getList', |
|
|
|
...publicKey |
|
|
|
},{ |
|
|
|
name: '待确认', |
|
|
|
ident: 'video', |
|
|
|
ident: 'waitconfirm', |
|
|
|
type: 1, |
|
|
|
data: [], |
|
|
|
badge: {isDot: false}, |
|
|
|
requestFunction: 'getList', |
|
|
|
...publicKey |
|
|
|
},{ |
|
|
|
name: '评级中', |
|
|
|
ident: 'image', |
|
|
|
ident: 'gradeing', |
|
|
|
type: 2, |
|
|
|
data: [], |
|
|
|
badge: {isDot: false}, |
|
|
|
requestFunction: 'getList', |
|
|
|
...publicKey |
|
|
|
},{ |
|
|
|
name: '待付款', |
|
|
|
ident: 'share', |
|
|
|
ident: 'waitpay', |
|
|
|
type: 3, |
|
|
|
data: [], |
|
|
|
badge: {isDot: false}, |
|
|
|
requestFunction: 'getList', |
|
|
|
...publicKey |
|
|
|
},{ |
|
|
|
name: '待收货', |
|
|
|
ident: 'short', |
|
|
|
ident: 'waitreceiv', |
|
|
|
type: 4, |
|
|
|
data: [], |
|
|
|
badge: {isDot: false}, |
|
|
|
requestFunction: 'getList', |
|
|
|
@ -200,10 +222,10 @@ |
|
|
|
value: '7' |
|
|
|
}], |
|
|
|
filterGather: { |
|
|
|
date: '1', |
|
|
|
date: '', |
|
|
|
name: '', |
|
|
|
label: '', |
|
|
|
number: '' |
|
|
|
order_num: '' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -227,37 +249,95 @@ |
|
|
|
this[ this.tabList[this.tabIndex].requestFunction ](); // 获取当前tab下的数据列表 |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
confirm(){ |
|
|
|
this.$msg('确认'); |
|
|
|
this.showFilter = false; |
|
|
|
}, |
|
|
|
reset(){ |
|
|
|
this.filterGather = this.$options.data().filterGather; |
|
|
|
}, |
|
|
|
// 获取数据 |
|
|
|
getList(options = {}){ |
|
|
|
let tabItem = this.tabList[this.tabIndex]; |
|
|
|
let filterGather = this.filterGather; |
|
|
|
let data = { |
|
|
|
type: tabItem.type, |
|
|
|
page: tabItem.page, |
|
|
|
pageSize: tabItem.pageSize |
|
|
|
}; |
|
|
|
if(filterGather.date){ |
|
|
|
data.confirm_type = filterGather.date; |
|
|
|
} |
|
|
|
if(filterGather.name){ |
|
|
|
data.name_phone = filterGather.name; |
|
|
|
} |
|
|
|
if(filterGather.label){ |
|
|
|
data.label = filterGather.label; |
|
|
|
} |
|
|
|
if(filterGather.order_num){ |
|
|
|
data.order_num = filterGather.order_num; |
|
|
|
} |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
if(tabItem.page === 1){ |
|
|
|
tabItem.data = [1,2,3,4,5] |
|
|
|
orderList(data).then(res => { |
|
|
|
let datas = res.data.datas; |
|
|
|
let isPage = this.$isRight(datas.next_page_url); |
|
|
|
if(!isPage){ |
|
|
|
tabItem.isPage = isPage; |
|
|
|
tabItem.status = 'nomore'; |
|
|
|
} |
|
|
|
if(tabItem.page == 1){ |
|
|
|
tabItem.data = datas.data; |
|
|
|
}else{ |
|
|
|
let arr = [Math.random(), Math.random(), Math.random(), Math.random(), Math.random()]; |
|
|
|
tabItem.data.push(...arr); |
|
|
|
if(tabItem.page === 4){ |
|
|
|
tabItem.isPage = false; |
|
|
|
tabItem.status = "nomore"; |
|
|
|
} |
|
|
|
tabItem.data.push(...datas.data); |
|
|
|
} |
|
|
|
|
|
|
|
if(options.refresher){ |
|
|
|
this.$refs.uToast.show({ |
|
|
|
title: '刷新成功', |
|
|
|
message: '刷新成功', |
|
|
|
type: 'success' |
|
|
|
}); |
|
|
|
tabItem.isRefresher = false; |
|
|
|
} |
|
|
|
}, 800); |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 筛选 |
|
|
|
confirm(){ |
|
|
|
let tabItem = this.tabList[this.tabIndex]; |
|
|
|
tabItem.page = 1; |
|
|
|
tabItem.isPage = true; |
|
|
|
tabItem.status = 'loading'; |
|
|
|
tabItem.data = []; |
|
|
|
this[tabItem.requestFunction](); |
|
|
|
this.showFilter = false; |
|
|
|
}, |
|
|
|
// 重置筛选条件 |
|
|
|
reset(){ |
|
|
|
this.filterGather = this.$options.data().filterGather; |
|
|
|
this.$refs.uToast.show({ |
|
|
|
message: '内容已重置', |
|
|
|
type: 'success' |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 选择确认收货时间 |
|
|
|
selectReceivingTime(item){ |
|
|
|
if(this.filterGather.date == item.value){ |
|
|
|
this.filterGather.date = ""; |
|
|
|
}else{ |
|
|
|
this.filterGather.date = item.value; |
|
|
|
} |
|
|
|
}, |
|
|
|
// 取消订单 todo |
|
|
|
orderCancel(){ |
|
|
|
console.log("++++++++++") |
|
|
|
}, |
|
|
|
// 寄送藏品 todo |
|
|
|
orderSend(){ |
|
|
|
|
|
|
|
}, |
|
|
|
// 更改地址 todo |
|
|
|
orderAddressChange(){ |
|
|
|
|
|
|
|
}, |
|
|
|
// 订单付款 todo |
|
|
|
orderPay(){ |
|
|
|
|
|
|
|
}, |
|
|
|
// 确认收货 todo |
|
|
|
orderConfirm(){ |
|
|
|
|
|
|
|
}, |
|
|
|
// 切换tab |
|
|
|
switchTab(item){ |
|
|
|
@ -279,10 +359,6 @@ |
|
|
|
this[ tabItem.requestFunction ](); |
|
|
|
} |
|
|
|
} |
|
|
|
console.log("swiperChange", event); |
|
|
|
}, |
|
|
|
stopTouchMove(){ |
|
|
|
return false; |
|
|
|
}, |
|
|
|
// 下拉刷新,重新获取页面数据,将状态置回初始值再请求 |
|
|
|
refresherrefresh(){ |
|
|
|
|