|
@@ -4,9 +4,6 @@
|
|
|
<text>我的订单</text>
|
|
|
<view class="roder-content">
|
|
|
<view class="left" :class="{ current: currentIndex === index }" :key="index" v-for="(item, index) in maiList" @click="navGo(index)">{{ item.title }}</view>
|
|
|
- <!-- <view class="left">
|
|
|
- 我的卖单
|
|
|
- </view> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="navbar" v-show="currentIndex == 0">
|
|
@@ -25,7 +22,7 @@
|
|
|
<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
|
|
|
|
|
|
<!-- 订单列表 -->
|
|
|
- <view @click="goToOrderDetail(item)" 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">
|
|
|
<view class="i-top b-b">
|
|
|
<text class="time">{{ item.order_id }}</text>
|
|
|
<text class="state" :style="{ color: item.stateTipColor }">{{ item.stateTip }}</text>
|
|
@@ -61,51 +58,39 @@
|
|
|
<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
|
|
|
|
|
|
<!-- 订单列表 -->
|
|
|
- <view @click="goToOrderDetail(item)" 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">
|
|
|
<view class="i-top b-b">
|
|
|
- <text class="time">{{ item._add_time }}</text>
|
|
|
- <text class="state" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
|
|
|
- <text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
|
|
|
+ <text class="time">{{ item.order_id }}</text>
|
|
|
+ <text class="state" :style="{ color: item.stateTipColor }">{{ item.stateTip }}</text>
|
|
|
</view>
|
|
|
-
|
|
|
- <scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
|
|
|
- <view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
|
|
|
- <image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
|
|
|
- </view>
|
|
|
- </scroll-view>
|
|
|
- <!-- <view v-if="item.cartInfo.length === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
|
|
|
- <image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
|
|
|
- <view class="right">
|
|
|
- <text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
|
|
|
- <text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
|
|
|
- <text class="price">{{ moneyNum(goodsItem.productInfo.price)}}</text>
|
|
|
- </view>
|
|
|
- </view> -->
|
|
|
- <view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
|
|
|
- <image class="goods-img" :src="goodsItem.productInfo.image" mode="scaleToFill"></image>
|
|
|
+ <view class="goods-box-single">
|
|
|
+ <image class="goods-img" :src="item.image" mode="scaleToFill"></image>
|
|
|
<view class="right">
|
|
|
<view class="flex-start">
|
|
|
- <text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
|
|
|
- <text class="price">{{ goodsItem.productInfo.price | moneyNum }}</text>
|
|
|
- </view>
|
|
|
- <view class="row flex">
|
|
|
- <text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
|
|
|
- <text class="attr-box">x {{ goodsItem.cart_num }}</text>
|
|
|
+ <text class="title clamp">{{ item.name }}</text>
|
|
|
+ <text class="price">{{ item.price | moneyNum }}</text>
|
|
|
</view>
|
|
|
+ <view class="row flex"><text class="attr-box">x1</text></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="price-box">
|
|
|
- 共
|
|
|
- <text class="num">{{ item.cartInfo.length }}</text>
|
|
|
- 件商品 邮费
|
|
|
- <text class="price">{{ moneyNum(item.pay_postage) }}</text>
|
|
|
- 实付款
|
|
|
- <text class="price">{{ moneyNum(item.pay_price) }}</text>
|
|
|
+ <view class="buy-box">
|
|
|
+ <view class="buy-info" v-if="item.status != 0">
|
|
|
+ <view class="font">买家:</view>
|
|
|
+ <image class="avter" :src="item.avatar" mode=""></image>
|
|
|
+ <view class="buy-name">{{ item.nickname }}</view>
|
|
|
+ <view class="phone">13245678911</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="action-box b-t">
|
|
|
- <button v-if="item.stateTip == '待支付'" @click.stop="orderPay(item)" class="action-btn recom">立即支付</button>
|
|
|
- <!-- <button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button> -->
|
|
|
+ <view class="upimg" v-if="item.status == 2 || item.status == 3">
|
|
|
+ <view class="up-tit">打款凭证:</view>
|
|
|
+ <view class="img-wrap" v-if="item.upload_image" @click="lookimg(item.upload_image)"><image :src="item.upload_image" mode=""></image></view>
|
|
|
+ <view class="" style="color: #0F253A;font-weight: bold;font-size: 26rpx;" v-else>买家未上传支付凭证</view>
|
|
|
+ </view>
|
|
|
+ <view class="action-box b-t" v-if="item.status == 1"><button @click.stop="orderPay(item)" class="action-btn recom">联系买家</button></view>
|
|
|
+ <view class="action-box b-t" v-if="item.status == 2">
|
|
|
+ <!-- <button @click.stop="orderPay(item)" class="refuse recom">拒绝</button> -->
|
|
|
+ <button @click.stop="orderPay(item)" class="action-btn recom">通过</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -120,7 +105,7 @@
|
|
|
<script>
|
|
|
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
|
|
import empty from '@/components/empty';
|
|
|
-import { orderList, orderCancel, orderDel, orderTake, adopt, user_auction_order } from '@/api/order.js';
|
|
|
+import { orderList, orderCancel, orderDel, orderTake, adopt, user_auction_order, seller } from '@/api/order.js';
|
|
|
import { tabbar } from '@/utils/tabbar.js';
|
|
|
export default {
|
|
|
components: {
|
|
@@ -180,7 +165,7 @@ export default {
|
|
|
navList1: [
|
|
|
{
|
|
|
state: 0,
|
|
|
- text: '全部',
|
|
|
+ text: '已过期',
|
|
|
loadingType: 'more',
|
|
|
orderList: [],
|
|
|
page: 1, //当前页数
|
|
@@ -188,7 +173,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
state: 1,
|
|
|
- text: '售卖中',
|
|
|
+ text: '待支付',
|
|
|
loadingType: 'more',
|
|
|
orderList: [],
|
|
|
page: 1, //当前页数
|
|
@@ -196,7 +181,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
state: 2,
|
|
|
- text: '待支付',
|
|
|
+ text: '待审核',
|
|
|
loadingType: 'more',
|
|
|
orderList: [],
|
|
|
page: 1, //当前页数
|
|
@@ -204,14 +189,6 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
state: 3,
|
|
|
- text: '待放货',
|
|
|
- loadingType: 'more',
|
|
|
- orderList: [],
|
|
|
- page: 1, //当前页数
|
|
|
- limit: 10 //每次信息条数
|
|
|
- },
|
|
|
- {
|
|
|
- state: 4,
|
|
|
text: '已完成',
|
|
|
loadingType: 'more',
|
|
|
orderList: [],
|
|
@@ -288,11 +265,21 @@ export default {
|
|
|
navGo(index) {
|
|
|
this.currentIndex = index;
|
|
|
console.log(this.currentIndex, '点击');
|
|
|
+ this.loadData();
|
|
|
},
|
|
|
// 转换金额为数字
|
|
|
moneyNum(value) {
|
|
|
return +value;
|
|
|
},
|
|
|
+ // 查看大图
|
|
|
+ lookimg(src) {
|
|
|
+ console.log(src);
|
|
|
+ let arr = [src]
|
|
|
+ uni.previewImage({
|
|
|
+ current: src,
|
|
|
+ urls: arr
|
|
|
+ });
|
|
|
+ },
|
|
|
// 确认收货
|
|
|
orderTake(item, index) {
|
|
|
let obj = this;
|
|
@@ -328,9 +315,10 @@ export default {
|
|
|
},
|
|
|
// 订单支付
|
|
|
orderPay(e) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/hall/hallpay?ordid=' + e.order_id
|
|
|
- });
|
|
|
+ console.log(e);
|
|
|
+ adopt({order_id: e.order_id}).then(({data}) =>{
|
|
|
+ this.loadData()
|
|
|
+ })
|
|
|
},
|
|
|
//获取订单列表
|
|
|
loadData(source) {
|
|
@@ -360,40 +348,73 @@ export default {
|
|
|
}
|
|
|
// 修改当前对象状态为加载中
|
|
|
navItem.loadingType = 'loading';
|
|
|
-
|
|
|
- user_auction_order({
|
|
|
- type: state,
|
|
|
- page: navItem.page,
|
|
|
- limit: navItem.limit
|
|
|
- })
|
|
|
- .then(({ data }) => {
|
|
|
- console.log(data);
|
|
|
- let arr = data.map(e => {
|
|
|
- let b = this.orderStateExp(e.status);
|
|
|
- e.stateTip = b.stateTip;
|
|
|
- e.stateTipColor = b.stateTipColor;
|
|
|
- return e;
|
|
|
+ if (this.currentIndex == 0) {
|
|
|
+ user_auction_order({
|
|
|
+ type: state,
|
|
|
+ page: navItem.page,
|
|
|
+ limit: navItem.limit
|
|
|
+ })
|
|
|
+ .then(({ data }) => {
|
|
|
+ console.log(data);
|
|
|
+ let arr = data.map(e => {
|
|
|
+ let b = this.orderStateExp(e.status);
|
|
|
+ e.stateTip = b.stateTip;
|
|
|
+ e.stateTipColor = b.stateTipColor;
|
|
|
+ return e;
|
|
|
+ });
|
|
|
+ navItem.orderList = navItem.orderList.concat(arr);
|
|
|
+
|
|
|
+ // console.log(navItem.orderList);
|
|
|
+ navItem.page++;
|
|
|
+ if (navItem.limit == data.length) {
|
|
|
+ //判断是否还有数据, 有改为 more, 没有改为noMore
|
|
|
+ navItem.loadingType = 'more';
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ //判断是否还有数据, 有改为 more, 没有改为noMore
|
|
|
+ navItem.loadingType = 'noMore';
|
|
|
+ }
|
|
|
+ uni.hideLoading();
|
|
|
+ this.$set(navItem, 'loaded', true);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
});
|
|
|
- navItem.orderList = navItem.orderList.concat(arr);
|
|
|
-
|
|
|
- // console.log(navItem.orderList);
|
|
|
- navItem.page++;
|
|
|
- if (navItem.limit == data.length) {
|
|
|
- //判断是否还有数据, 有改为 more, 没有改为noMore
|
|
|
- navItem.loadingType = 'more';
|
|
|
- return;
|
|
|
- } else {
|
|
|
- //判断是否还有数据, 有改为 more, 没有改为noMore
|
|
|
- navItem.loadingType = 'noMore';
|
|
|
- }
|
|
|
- uni.hideLoading();
|
|
|
- this.$set(navItem, 'loaded', true);
|
|
|
+ }
|
|
|
+ if (this.currentIndex == 1) {
|
|
|
+ seller({
|
|
|
+ type: state,
|
|
|
+ page: navItem.page,
|
|
|
+ limit: navItem.limit
|
|
|
})
|
|
|
- .catch(e => {
|
|
|
- console.log(e);
|
|
|
- });
|
|
|
+ .then(({ data }) => {
|
|
|
+ console.log(data);
|
|
|
+ let arr = data.map(e => {
|
|
|
+ let b = this.orderStateExp(e.status);
|
|
|
+ e.stateTip = b.stateTip;
|
|
|
+ e.stateTipColor = b.stateTipColor;
|
|
|
+ return e;
|
|
|
+ });
|
|
|
+ navItem.orderList = navItem.orderList.concat(arr);
|
|
|
+
|
|
|
+ // console.log(navItem.orderList);
|
|
|
+ navItem.page++;
|
|
|
+ if (navItem.limit == data.length) {
|
|
|
+ //判断是否还有数据, 有改为 more, 没有改为noMore
|
|
|
+ navItem.loadingType = 'more';
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ //判断是否还有数据, 有改为 more, 没有改为noMore
|
|
|
+ navItem.loadingType = 'noMore';
|
|
|
+ }
|
|
|
+ uni.hideLoading();
|
|
|
+ this.$set(navItem, 'loaded', true);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
-
|
|
|
//swiper 切换
|
|
|
changeTab(e) {
|
|
|
if (this.currentIndex == 0) {
|
|
@@ -593,7 +614,7 @@ page,
|
|
|
color: $font-color-dark;
|
|
|
position: relative;
|
|
|
padding: 0 30rpx;
|
|
|
-
|
|
|
+
|
|
|
.time {
|
|
|
flex: 1;
|
|
|
}
|
|
@@ -697,12 +718,75 @@ page,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .buy-box {
|
|
|
+ height: 84rpx;
|
|
|
+ padding: 0 22rpx;
|
|
|
+ background-color: #ffffff;
|
|
|
+ .buy-info {
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .font {
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+ .avter {
|
|
|
+ margin-left: 10rpx;
|
|
|
+ width: 46rpx;
|
|
|
+ height: 46rpx;
|
|
|
+ border-radius: 50%;
|
|
|
+ }
|
|
|
+ .buy-name {
|
|
|
+ margin-left: 10rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+ .phone {
|
|
|
+ margin-left: 12rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #999999;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .upimg {
|
|
|
+ padding-left: 20rpx;
|
|
|
+ padding-top: 10rpx;
|
|
|
+ padding-bottom: 10rpx;
|
|
|
+ display: flex;
|
|
|
|
|
|
+ .up-tit {
|
|
|
+ display: inline-block;
|
|
|
+ font-size: 26rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #6d7c88;
|
|
|
+ }
|
|
|
+
|
|
|
+ .img-wrap {
|
|
|
+ width: 153rpx;
|
|
|
+ height: 152rpx;
|
|
|
+
|
|
|
+ border-radius: 20rpx;
|
|
|
+
|
|
|
+ image {
|
|
|
+ border-radius: 20rpx;
|
|
|
+ width: 153rpx;
|
|
|
+ height: 152rpx;
|
|
|
+ background-color: #ccc;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
.price-box {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
align-items: baseline;
|
|
|
- padding: 20rpx 30rpx ;
|
|
|
+ padding: 20rpx 30rpx;
|
|
|
font-size: $font-sm + 2rpx;
|
|
|
color: $font-color-light;
|
|
|
|
|
@@ -732,6 +816,32 @@ page,
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
+ .refuse {
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
+ width: 160rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ border: 2rpx solid #ebebeb;
|
|
|
+ border-radius: 28rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 60rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #999999;
|
|
|
+ &:after {
|
|
|
+ border-radius: 100px;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.recom {
|
|
|
+ color: #999999;
|
|
|
+
|
|
|
+ &:after {
|
|
|
+ border-color: #999999;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.action-btn {
|
|
|
width: 160rpx;
|
|
|
height: 60rpx;
|
|
@@ -744,7 +854,7 @@ page,
|
|
|
color: $font-color-dark;
|
|
|
background: #fff;
|
|
|
border-radius: 100px;
|
|
|
- border: 2rpx solid #FD3B39;
|
|
|
+ border: 2rpx solid #fd3b39;
|
|
|
border-radius: 28px;
|
|
|
&:after {
|
|
|
border-radius: 100px;
|