|
@@ -29,7 +29,7 @@
|
|
<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
|
|
<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
|
|
|
|
|
|
<!-- 订单列表 -->
|
|
<!-- 订单列表 -->
|
|
- <view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
|
|
|
|
|
|
+ <view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item" @click="goToOrderDetail(item)">
|
|
<view class="i-top b-b">
|
|
<view class="i-top b-b">
|
|
<text class="time">{{ item.order_id }}</text>
|
|
<text class="time">{{ item.order_id }}</text>
|
|
<text class="state" :style="{ color: item.stateTipColor }">{{ item.stateTip }}</text>
|
|
<text class="state" :style="{ color: item.stateTipColor }">{{ item.stateTip }}</text>
|
|
@@ -53,7 +53,7 @@
|
|
<text class="price">{{ moneyNum(item.price) }}</text>
|
|
<text class="price">{{ moneyNum(item.price) }}</text>
|
|
</view>
|
|
</view>
|
|
<view class="action-box b-t" v-if="item.stateTip == '待支付'"><button @click.stop="pay(item)" class="action-btn recom">立即支付</button></view>
|
|
<view class="action-box b-t" v-if="item.stateTip == '待支付'"><button @click.stop="pay(item)" class="action-btn recom">立即支付</button></view>
|
|
- <view class="action-box b-t" v-if="item.stateTip == '待挂售'"><button @click.stop="gsell(item)" class="action-btn recom">立即挂售</button></view>
|
|
|
|
|
|
+ <view class="action-box b-t" v-if="item.stateTip == '待挂售'"><button @click.stop="gsell(item)" class="action-btn recom">{{item.frozen == 0? "立即挂售" : "冻结中"}}</button></view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<uni-load-more :status="tabItem.loadingType"></uni-load-more>
|
|
<uni-load-more :status="tabItem.loadingType"></uni-load-more>
|
|
@@ -88,7 +88,7 @@
|
|
<view class="buy-name">{{ item.nickname }}</view>
|
|
<view class="buy-name">{{ item.nickname }}</view>
|
|
<view class="phone">{{ item.phone }}</view>
|
|
<view class="phone">{{ item.phone }}</view>
|
|
</view>
|
|
</view>
|
|
- <view v-if="!item.status">
|
|
|
|
|
|
+ <view v-if="!item.status && item.status != 0">
|
|
<view class="buy-info">
|
|
<view class="buy-info">
|
|
<view class="font">挂售价格:{{ item.hanging_price }}</view>
|
|
<view class="font">挂售价格:{{ item.hanging_price }}</view>
|
|
</view>
|
|
</view>
|
|
@@ -107,10 +107,13 @@
|
|
<!-- <button @click.stop="orderPay(item)" class="refuse recom">拒绝</button> -->
|
|
<!-- <button @click.stop="orderPay(item)" class="refuse recom">拒绝</button> -->
|
|
<button @click.stop="orderPay(item)" class="action-btn recom">通过</button>
|
|
<button @click.stop="orderPay(item)" class="action-btn recom">通过</button>
|
|
</view>
|
|
</view>
|
|
- <view class="action-box b-t" v-if="!item.status">
|
|
|
|
|
|
+ <view class="action-box b-t" v-if="!item.status && item.status !=0">
|
|
<!-- <button @click.stop="orderPay(item)" class="refuse recom">拒绝</button> -->
|
|
<!-- <button @click.stop="orderPay(item)" class="refuse recom">拒绝</button> -->
|
|
<button @click.stop="cancel(item)" class="action-btn recom">取消挂售</button>
|
|
<button @click.stop="cancel(item)" class="action-btn recom">取消挂售</button>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="action-box b-t" v-if="item.status == 3">
|
|
|
|
+ <button @click.stop="appeal(item)" class="action-btn recom">{{ item.appeal == 0 ? '申诉' : '取消申诉'}}</button>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<uni-load-more :status="tabItem.loadingType"></uni-load-more>
|
|
<uni-load-more :status="tabItem.loadingType"></uni-load-more>
|
|
@@ -124,7 +127,7 @@
|
|
<script>
|
|
<script>
|
|
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
|
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
|
import empty from '@/components/empty';
|
|
import empty from '@/components/empty';
|
|
-import { orderList, orderCancel, orderDel, orderTake, adopt, user_auction_order, seller, cancel, untreated } from '@/api/order.js';
|
|
|
|
|
|
+import { orderList, orderCancel, orderDel, orderTake, adopt, user_auction_order, seller, cancel, untreated, plead, revoke } from '@/api/order.js';
|
|
import { tabbar } from '@/utils/tabbar.js';
|
|
import { tabbar } from '@/utils/tabbar.js';
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -133,6 +136,7 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ loading: false,//判断是否在点击
|
|
height: '', //第一层swiper高度
|
|
height: '', //第一层swiper高度
|
|
tabbar: tabbar,
|
|
tabbar: tabbar,
|
|
current: 1, //底部tabar选中的icon对象
|
|
current: 1, //底部tabar选中的icon对象
|
|
@@ -153,7 +157,7 @@ export default {
|
|
text: '已过期',
|
|
text: '已过期',
|
|
loadingType: 'more',
|
|
loadingType: 'more',
|
|
orderList: [],
|
|
orderList: [],
|
|
- isnew:1,//判断是否有新的订单
|
|
|
|
|
|
+ isnew: 1, //判断是否有新的订单
|
|
page: 1, //当前页数
|
|
page: 1, //当前页数
|
|
limit: 10 //每次信息条数
|
|
limit: 10 //每次信息条数
|
|
},
|
|
},
|
|
@@ -162,7 +166,7 @@ export default {
|
|
text: '待支付',
|
|
text: '待支付',
|
|
loadingType: 'more',
|
|
loadingType: 'more',
|
|
orderList: [],
|
|
orderList: [],
|
|
- isnew:1,//判断是否有新的订单
|
|
|
|
|
|
+ isnew: 1, //判断是否有新的订单
|
|
page: 1, //当前页数
|
|
page: 1, //当前页数
|
|
limit: 10 //每次信息条数
|
|
limit: 10 //每次信息条数
|
|
},
|
|
},
|
|
@@ -171,7 +175,7 @@ export default {
|
|
text: '待审核',
|
|
text: '待审核',
|
|
loadingType: 'more',
|
|
loadingType: 'more',
|
|
orderList: [],
|
|
orderList: [],
|
|
- isnew:1,//判断是否有新的订单
|
|
|
|
|
|
+ isnew: 1, //判断是否有新的订单
|
|
page: 1, //当前页数
|
|
page: 1, //当前页数
|
|
limit: 10 //每次信息条数
|
|
limit: 10 //每次信息条数
|
|
},
|
|
},
|
|
@@ -180,7 +184,7 @@ export default {
|
|
text: '待挂售',
|
|
text: '待挂售',
|
|
loadingType: 'more',
|
|
loadingType: 'more',
|
|
orderList: [],
|
|
orderList: [],
|
|
- isnew:1,//判断是否有新的订单
|
|
|
|
|
|
+ isnew: 1, //判断是否有新的订单
|
|
page: 1, //当前页数
|
|
page: 1, //当前页数
|
|
limit: 10 //每次信息条数
|
|
limit: 10 //每次信息条数
|
|
},
|
|
},
|
|
@@ -189,7 +193,7 @@ export default {
|
|
text: '已完成',
|
|
text: '已完成',
|
|
loadingType: 'more',
|
|
loadingType: 'more',
|
|
orderList: [],
|
|
orderList: [],
|
|
- isnew:1,//判断是否有新的订单
|
|
|
|
|
|
+ isnew: 1, //判断是否有新的订单
|
|
page: 1, //当前页数
|
|
page: 1, //当前页数
|
|
limit: 10 //每次信息条数
|
|
limit: 10 //每次信息条数
|
|
}
|
|
}
|
|
@@ -200,7 +204,7 @@ export default {
|
|
text: '已过期',
|
|
text: '已过期',
|
|
loadingType: 'more',
|
|
loadingType: 'more',
|
|
orderList: [],
|
|
orderList: [],
|
|
- isnew:1,//判断是否有新的订单
|
|
|
|
|
|
+ isnew: 1, //判断是否有新的订单
|
|
page: 1, //当前页数
|
|
page: 1, //当前页数
|
|
limit: 10 //每次信息条数
|
|
limit: 10 //每次信息条数
|
|
},
|
|
},
|
|
@@ -209,7 +213,7 @@ export default {
|
|
text: '售卖中',
|
|
text: '售卖中',
|
|
loadingType: 'more',
|
|
loadingType: 'more',
|
|
orderList: [],
|
|
orderList: [],
|
|
- isnew:1,//判断是否有新的订单
|
|
|
|
|
|
+ isnew: 1, //判断是否有新的订单
|
|
page: 1, //当前页数
|
|
page: 1, //当前页数
|
|
limit: 10 //每次信息条数
|
|
limit: 10 //每次信息条数
|
|
},
|
|
},
|
|
@@ -218,7 +222,7 @@ export default {
|
|
text: '待支付',
|
|
text: '待支付',
|
|
loadingType: 'more',
|
|
loadingType: 'more',
|
|
orderList: [],
|
|
orderList: [],
|
|
- isnew:1,//判断是否有新的订单
|
|
|
|
|
|
+ isnew: 1, //判断是否有新的订单
|
|
page: 1, //当前页数
|
|
page: 1, //当前页数
|
|
limit: 10 //每次信息条数
|
|
limit: 10 //每次信息条数
|
|
},
|
|
},
|
|
@@ -227,7 +231,7 @@ export default {
|
|
text: '待审核',
|
|
text: '待审核',
|
|
loadingType: 'more',
|
|
loadingType: 'more',
|
|
orderList: [],
|
|
orderList: [],
|
|
- isnew:1,//判断是否有新的订单
|
|
|
|
|
|
+ isnew: 1, //判断是否有新的订单
|
|
page: 1, //当前页数
|
|
page: 1, //当前页数
|
|
limit: 10 //每次信息条数
|
|
limit: 10 //每次信息条数
|
|
},
|
|
},
|
|
@@ -236,7 +240,7 @@ export default {
|
|
text: '已完成',
|
|
text: '已完成',
|
|
loadingType: 'more',
|
|
loadingType: 'more',
|
|
orderList: [],
|
|
orderList: [],
|
|
- isnew:1,//判断是否有新的订单
|
|
|
|
|
|
+ isnew: 1, //判断是否有新的订单
|
|
page: 1, //当前页数
|
|
page: 1, //当前页数
|
|
limit: 10 //每次信息条数
|
|
limit: 10 //每次信息条数
|
|
}
|
|
}
|
|
@@ -311,33 +315,41 @@ export default {
|
|
navGo(index) {
|
|
navGo(index) {
|
|
this.currentIndex = index;
|
|
this.currentIndex = index;
|
|
console.log(this.currentIndex, '点击');
|
|
console.log(this.currentIndex, '点击');
|
|
- this.loadData();
|
|
|
|
|
|
+ this.upData()
|
|
|
|
+ this.loadData('reload');
|
|
},
|
|
},
|
|
// 转换金额为数字
|
|
// 转换金额为数字
|
|
moneyNum(value) {
|
|
moneyNum(value) {
|
|
return +value;
|
|
return +value;
|
|
},
|
|
},
|
|
|
|
+ // 订单支付
|
|
|
|
+ pay(item) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/hall/hallpay?ordid=' + item.order_id
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 更新
|
|
upData() {
|
|
upData() {
|
|
untreated().then(({ data }) => {
|
|
untreated().then(({ data }) => {
|
|
console.log(data);
|
|
console.log(data);
|
|
- if(data.user.hanging != 0){
|
|
|
|
- this.navList[3].isnew = 2
|
|
|
|
|
|
+ if (data.user.hanging != 0) {
|
|
|
|
+ this.navList[3].isnew = 2;
|
|
|
|
+ }
|
|
|
|
+ if (data.user.hanging == 0) {
|
|
|
|
+ this.navList[3].isnew = 1;
|
|
}
|
|
}
|
|
- if(data.user.hanging == 0){
|
|
|
|
- this.navList[3].isnew = 1
|
|
|
|
|
|
+ if (data.user.paid != 0) {
|
|
|
|
+ this.navList[1].isnew = 2;
|
|
}
|
|
}
|
|
- if(data.user.paid != 0){
|
|
|
|
- this.navList[1].isnew = 2
|
|
|
|
|
|
+ if (data.user.paid == 0) {
|
|
|
|
+ this.navList[1].isnew = 1;
|
|
}
|
|
}
|
|
- if(data.user.paid == 0){
|
|
|
|
- this.navList[1].isnew = 1
|
|
|
|
|
|
+ if (data.seller.reviewed != 0) {
|
|
|
|
+ this.navList1[3].isnew = 2;
|
|
}
|
|
}
|
|
- if(data.seller.reviewed != 0) {
|
|
|
|
- this.navList1[3].isnew = 2
|
|
|
|
|
|
+ if (data.seller.reviewed == 0) {
|
|
|
|
+ this.navList1[3].isnew = 1;
|
|
}
|
|
}
|
|
- if(data.seller.reviewed == 0) {
|
|
|
|
- this.navList1[3].isnew = 1
|
|
|
|
- }
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 查看大图
|
|
// 查看大图
|
|
@@ -349,60 +361,85 @@ export default {
|
|
urls: arr
|
|
urls: arr
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- // 确认收货
|
|
|
|
- orderTake(item, index) {
|
|
|
|
- let obj = this;
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '是否确认收货?',
|
|
|
|
- success: () => {
|
|
|
|
- orderTake({
|
|
|
|
- uni: item.order_id
|
|
|
|
- })
|
|
|
|
- .then(e => {
|
|
|
|
- obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
|
|
|
|
- uni.showToast({
|
|
|
|
- title: '收货成功'
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- .catch(e => {
|
|
|
|
- console.log(e);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ //申诉和取消申诉
|
|
|
|
+ appeal(item) {
|
|
|
|
+ if(this.loading) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.loading = true
|
|
|
|
+ if(item.appeal == 0) {
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '申诉中'
|
|
|
|
+ });
|
|
|
|
+ plead({order_id:item.order_id }).then(e =>{
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ this.$api.msg('申诉成功')
|
|
|
|
+ this.loadData('reload');
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '取消申诉中'
|
|
|
|
+ });
|
|
|
|
+ revoke({order_id:item.order_id }).then(e =>{
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ this.$api.msg('取消申诉成功')
|
|
|
|
+ this.loadData('reload');
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
//跳转到订单详情
|
|
//跳转到订单详情
|
|
goToOrderDetail(e) {
|
|
goToOrderDetail(e) {
|
|
|
|
+ if (e.stateTip != '已完成') {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ console.log(11);
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: '/pages/order/orderDetail?id=' + e.order_id
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- // 申请退款
|
|
|
|
- orderRefund(e) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/order/orderRefund?id=' + e.order_id
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- // 订单支付
|
|
|
|
- pay(item) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/hall/hallpay?ordid=' + item.order_id
|
|
|
|
|
|
+ url: '/pages/order/hallorderDetail?id=' + e.order_id
|
|
});
|
|
});
|
|
},
|
|
},
|
|
gsell(item) {
|
|
gsell(item) {
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/hall/gsell?id=' + item.product_id
|
|
|
|
- });
|
|
|
|
|
|
+ if(item.frozen){
|
|
|
|
+ return this.$api.msg('已冻结,请联系客服或与卖家协商')
|
|
|
|
+ }else {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/hall/gsell?id=' + item.product_id
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
+ //卖家确认订单
|
|
orderPay(e) {
|
|
orderPay(e) {
|
|
|
|
+ if(this.loading) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '确认订单中'
|
|
|
|
+ });
|
|
|
|
+ this.loading = true
|
|
adopt({ order_id: e.order_id }).then(({ data }) => {
|
|
adopt({ order_id: e.order_id }).then(({ data }) => {
|
|
console.log('1111');
|
|
console.log('1111');
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ this.loading = false
|
|
this.loadData('reload');
|
|
this.loadData('reload');
|
|
|
|
+ this.upData();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ //取消挂售
|
|
cancel(e) {
|
|
cancel(e) {
|
|
|
|
+ if(this.loading) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.loading = true
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '取消挂售中'
|
|
|
|
+ });
|
|
cancel({ id: e.id }).then(({ data }) => {
|
|
cancel({ id: e.id }).then(({ data }) => {
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ this.loading = false
|
|
this.loadData('reload');
|
|
this.loadData('reload');
|
|
- this.upData()
|
|
|
|
|
|
+ this.upData();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//获取订单列表
|
|
//获取订单列表
|
|
@@ -425,10 +462,10 @@ export default {
|
|
navItem.limit = 10;
|
|
navItem.limit = 10;
|
|
navItem.loadingType = 'more';
|
|
navItem.loadingType = 'more';
|
|
}
|
|
}
|
|
- if (source === 'tabChange' && navItem.loaded === true) {
|
|
|
|
- //tab切换只有第一次需要加载数据
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
+ // if ( navItem.loaded === true) {
|
|
|
|
+ // //tab切换只有第一次需要加载数据
|
|
|
|
+ // return;
|
|
|
|
+ // }
|
|
if (navItem.loadingType === 'loading') {
|
|
if (navItem.loadingType === 'loading') {
|
|
//防止重复加载
|
|
//防止重复加载
|
|
return;
|
|
return;
|