ymwl
liudan 1 year ago
parent 25b9307e88
commit d2b53131b2
  1. 9
      common/api.js
  2. 36
      pages.json
  3. 23
      pages/ConfirmOrder/ConfirmOrder.scss
  4. 41
      pages/ConfirmOrder/ConfirmOrder.vue
  5. 91
      pages/MyOrderList/MyOrderList.scss
  6. 14
      pages/MyOrderList/MyOrderList.vue
  7. 1
      pages/fenxiao/fans.vue
  8. 287
      pages/fenxiao/fansOrder.vue
  9. 13
      pages/fenxiao/fenxiao.vue
  10. 51
      pages/my/my.vue
  11. 18
      pages/qianggou/productDetails.vue
  12. 328
      pages/warehouse/buy.vue
  13. 316
      pages/warehouse/sell.vue

@ -44,6 +44,10 @@ export const getUserCommissionList = (params, config = {custom: { auth: true }})
export const getUserFansStatistic = (params, config = {custom: { auth: true }}) => http.post('/api/user/getUserFansStatistic', params, config);
//粉丝列表
export const getUserFansList = (params, config = {custom: { auth: true }}) => http.post('/api/user/getUserFansList', params, config);
//粉丝订单统计
export const getUserFansOrderStatistic = (params, config = {custom: { auth: true }}) => http.post('/api/user/getUserFansOrderStatistic', params, config);
//粉丝订单列表
export const getUserFansOrderList = (params, config = {custom: { auth: true }}) => http.post('/api/user/getUserFansOrderList', params, config);
//收益统计
export const getUserProfitStatistic = (params, config = {custom: { auth: true }}) => http.post('/api/user/getUserProfitStatistic', params, config);
//收益列表
@ -54,4 +58,9 @@ export const getWarehouseList = (params, config = {custom: { auth: true }}) => h
export const getGoodsList = (params, config = {custom: { auth: true }}) => http.post('/api/order/getGoodsList', params, config);
//商品详情
export const getgoodsDetail = (params, config = {custom: { auth: true }}) => http.post('/api/order/goodsDetail', params, config);
//买方订单
export const getBuyerOrderList = (params, config = {custom: { auth: true }}) => http.get('/api/order/getBuyerOrderList', {params}, config);
//卖方订单
export const getSellerOrderList = (params, config = {custom: { auth: true }}) => http.get('/api/order/getSellerOrderList', {params}, config);

@ -155,6 +155,14 @@
"onReachBottomDistance":100
}
},
{
"path" : "pages/fenxiao/fansOrder",
"style" : {
"navigationBarTitleText": "粉丝订单",
"navigationBarBackgroundColor": "#FFFFFF",
"onReachBottomDistance":100
}
},
{
"path" : "pages/shouyi/shouyi",
"style" : {
@ -195,16 +203,33 @@
{
"path" : "pages/MyOrderList/MyOrderList",
"style" : {
"navigationStyle":"custom"
"navigationBarTitleText": "我的订单",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path" : "pages/warehouse/buy",
"style" : {
"navigationBarTitleText": "买方仓库",
"navigationBarBackgroundColor": "#FFFFFF"
"navigationBarBackgroundColor": "#FFFFFF",
"onReachBottomDistance":100
}
},
{
"path" : "pages/warehouse/sell",
"style" : {
"navigationBarTitleText": "卖方仓库",
"navigationBarBackgroundColor": "#FFFFFF",
"onReachBottomDistance":100
}
},
{
"path" : "pages/ConfirmOrder/ConfirmOrder",
"style" : {
"navigationBarTitleText": "确认订单",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
@ -247,13 +272,6 @@
"navigationBarTitleText": "发现"
}
}
,{
"path" : "pages/ConfirmOrder/ConfirmOrder",
"style" : {
"navigationBarTitleText": "填写订单",
"navigationBarBackgroundColor": "#FFFFFF"
}
}
,{
"path" : "pages/CashierDesk/CashierDesk",
"style" : {

@ -1,29 +1,16 @@
.page{
position: absolute;
left: 0;
top: 0;
width: 100%;
// height: 100%;
background-color: #f6f6f6;
padding-bottom: 180rpx;
}
/* 地址 */
.address-data{
position: relative;
padding: 10rpx 4%;
background-color: #FFFFFF;
border-radius: 0 0 20rpx 20rpx;
margin:0 24rpx;
overflow: hidden;
.bar{
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 10rpx;
background-color: #CCCCCC;
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-size: 72rpx 72rpx;
}
border:1px solid red;
margin-top:24rpx;
border-radius: 8rpx;
.address-list{
width: 100%;
.list{

@ -4,22 +4,21 @@
<view class="address-data">
<view class="address-list" @click="onSkip('address')">
<view class="list">
<text>黑龙江哈尔滨市道里区城区</text>
<text>张三</text>
<text>178****8888</text>
</view>
<view class="list">
<text class="address">爱建路1333号</text>
<text>黑龙江哈尔滨市道里区城区</text>
</view>
<view class="list">
<text>张三</text>
<text>178****8888</text>
<text class="address">爱建路1333号</text>
</view>
<view class="list">
<text class="tips">(如果快递不方便接收您可以选择暂时寄存服务)</text>
</view>
</view>
<view class="bar">
</view>
</view>
<!-- 商品 -->
<view class="goods-data">
@ -187,20 +186,20 @@
url: '/pages/CashierDesk/CashierDesk',
})
},
/**
* 跳转点击
* @param {String} type 跳转类型
*/
onSkip(type){
switch (type){
case 'address':
uni.navigateTo({
url: '/pages/AddressList/AddressList',
})
break;
}
}
}
onSkip(type){
switch (type){
case 'address':
uni.navigateTo({
url: '/pages/AddressList/AddressList',
})
break;
}
}
},
onLoad(){
console.log(uni.getStorageSync('qgPro'),"lldd")
},
}
</script>

@ -6,85 +6,6 @@
height: 100%;
background-color: #f6f6f6;
}
/* 顶部返回 */
.head-back{
position: fixed;
left: 0;
top: 0;
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100rpx;
background-color: #FFFFFF;
/* #ifdef APP-PLUS */
height: calc(50rpx + var(--status-bar-height));
padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef MP */
height: 150rpx;
padding-top: 20rpx;
/* #endif */
.back{
position: absolute;
left: 0;
top: 0;
/* #ifdef APP-PLUS */
padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef MP */
padding-top: 20rpx;
/* #endif */
display: flex;
align-items: center;
justify-content: center;
width: 100rpx;
height: 100%;
text{
width: 20rpx;
height: 20rpx;
border-left: 2rpx solid #555555;
border-bottom: 2rpx solid #555555;
transform: rotate(45deg);
}
}
.title{
display: flex;
align-items: center;
text{
font-size: 28rpx;
color: #222222;
}
}
.more-icon{
position: absolute;
right: 0;
top: 0;
/* #ifdef APP-PLUS */
right: 0rpx;
padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef MP */
right: 220rpx;
padding-top: 20rpx;
/* #endif */
display: flex;
align-items: center;
height: 100%;
.icon-list{
display: flex;
align-items: center;
justify-content: center;
width: 80rpx;
height: 100%;
text{
font-size: 34rpx;
color: #222222;
}
}
}
}
/* 订单tab */
.order-tab{
@ -98,8 +19,8 @@
display: flex;
align-items: center;
width: 100%;
height: 100rpx;
background-color: #FFFFFF;
height: 90rpx;
background: rgb(35, 96, 48);
.tab{
position: relative;
display: flex;
@ -109,12 +30,13 @@
height: 80%;
text{
font-size: 26rpx;
color: #959595;
color: #4D9A5E;
}
}
.action{
text{
color: #222222;
color: #fff;
font-weight: bold;
}
.line{
position: absolute;
@ -122,7 +44,8 @@
bottom: 0;
width: 60rpx;
height: 6rpx;
background: linear-gradient(to right,$base,#f6f6f6);
background: #fff;
border-radius:3px;
transform: translate(-50%,0);
}
}

@ -1,18 +1,6 @@
<template>
<view class="page">
<view class="head-back">
<view class="back" @click="onBack">
<text></text>
</view>
<view class="title">
<text>我的订单</text>
</view>
<view class="more-icon">
<view class="icon-list">
<text class="iconfont icon-fadajing"></text>
</view>
</view>
</view>
<!-- 订单tab -->
<view class="order-tab">
<view class="tab" :class="{'action':OrderType==5}" @click="onOrderTab(0)">

@ -85,7 +85,6 @@
limit:this.limit,
}
getUserFansList(params).then(res=>{
console.log(res)
if(val){
this.tableData.push(...res.data.data)
}else{

@ -0,0 +1,287 @@
<template>
<view class="page">
<view class="totalContent">
<view class="totalitem">
<view class="price">
<text></text>
<text class="num">{{info.total_fans_order_amount}}</text>
</view>
<view class="descText">
订单总金额
</view>
</view>
<view class="totalitem" style="border-left:1px solid #fff;">
<view class="price">
<text class="num">{{info.today_fans_order_num}}</text>
</view>
<view class="descText">
订单数
</view>
</view>
</view>
<!-- -->
<view class="order-list">
<view class="list" v-for="(item,index) in tableData" :key="index">
<view class="title-status">
<view class="title">
<text>订单号{{item.order_sn}}</text>
</view>
<view class="status">
<text>{{item.status==0?'付款确认':item.status==1?'收款确认':item.status==3?'投诉':''}}</text>
</view>
</view>
<view class="goods-list">
<view class="goods">
<view class="thumb">
<image :src="item.order_goods[0]?item.order_goods[0].goods_image:''" mode=""></image>
</view>
<view class="item">
<view class="goods-name">
<text class="two-omit">{{item.order_goods[0]?item.order_goods[0].goods_name:''}}</text>
</view>
<view class="priceBox">
<view class="goods-price">
<text class="min">{{item.order_goods[0]?item.order_goods[0].goods_price:''}}</text>
</view>
<view class="yongjin">
佣金{{item.commission_amount}}
</view>
</view>
</view>
</view>
</view>
<view class="status-btn">
<view class="btn">
<text>归属人{{item.seller.nickname}}</text>
</view>
<view class="btn">
<text>购买人{{item.seller.nickname}}</text>
</view>
</view>
</view>
</view>
<view class="empty" v-show="tableData.length==0">
<image src="../../static/image/mescroll-empty.png" mode="widthFix"></image>
<view class="emptyText">
暂无数据
</view>
</view>
</view>
</template>
<script>
import {getUserFansOrderStatistic,getUserFansOrderList} from '@/common/api.js'
export default {
data() {
return {
info:{
today_fans_order_num:0,
total_fans_order_amount:0
},
page:1,
limit:10,
tableData:[],
total:0,
};
},
methods:{
getInfo(){
getUserFansOrderStatistic().then(res=>{
this.info = Object.assign({},this.info,res.data)
})
},
getList(val){
let params={
page:this.page,
limit:this.limit,
}
getUserFansOrderList(params).then(res=>{
if(val){
this.tableData.push(...res.data.data)
}else{
this.tableData = res.data.data;
this.total = res.data.total
}
})
},
},
onReachBottom() {
if(this.tableData.length<this.total){
this.page++;
this.getList('over')
}
},
mounted(){
this.getInfo()
this.getList()
}
}
</script>
<style scoped lang="scss">
.page{
padding-bottom:30rpx;
}
.totalContent{
height: 160rpx;
background: url('../../static/image/total-bg.png');
background-size: cover;
background-repeat: no-repeat;
border-radius: 6px;
overflow: hidden;
position: relative;
// width:94%;
// margin:20rpx auto 0 auto;
display: flex;
padding:40rpx 0;
margin:20rpx 24rpx;
.totalitem{
flex:1;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
.price{
display: flex;
align-items: center;
justify-content: center;
text{
font-size: 30rpx;
color:#fff;
}
.num{
font-size: 48rpx;
}
}
.descText{
text-align: center;
font-size: 28rpx;
color:#fff;
}
}
}
.empty{
text-align: center;
image{
width:50%;
height:auto
}
.emptyText{
text-align: center;
margin-top:20rpx;
color:#aaa;
}
}
/* 订单列表 */
.order-list{
margin: 10px 12px;
.list{
padding: 0 24rpx;
background-color: #FFFFFF;
border-radius: 20rpx;
margin-bottom: 20rpx;
.title-status{
display: flex;
align-items: center;
justify-content: space-between;
padding:20rpx 0;
.title{
display: flex;
align-items: center;
// padding:10rpx 0;
text{
font-size: 26rpx;
color: gray;
}
}
.status{
display: flex;
align-items: center;
text{
font-size: 26rpx;
color: $base;
}
}
}
.goods-list{
.goods{
display: flex;
align-items: center;
width: 100%;
height: 170rpx;
.thumb{
display: flex;
align-items: center;
width: 30%;
height: 100%;
image{
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
}
}
.item{
display: flex;
justify-content: space-between;
flex-direction: column;
padding: 10rpx 0;
height: 100%;
margin-left:20rpx;
width: 100%;
.goods-name{
text{
font-size: 26rpx;
color: #9f751f;
}
}
.priceBox{
display: flex;
align-items: center;
justify-content: space-between;
}
.goods-price{
display: flex;
align-items: center;
justify-content: space-between;
text{
color: #222222;
}
.min{
font-size: 26rpx;
}
}
.yongjin{
color:$base
}
}
}
}
.status-btn{
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
// height: 80rpx;
border-top:1px solid #eaeaea;
.btn{
padding: 15rpx 0rpx;
text{
font-size: 26rpx;
color: gray;
}
}
}
}
}
</style>

@ -8,10 +8,10 @@
<u-icon size="15" color="#c4b39b" name="more-circle"></u-icon>
</view>
</view>
<!-- <view class="fxMiddle">
<view class="fxMiddle">
<text></text>
<text class="num">22</text>
</view> -->
<text class="num">{{totalObj.available_commission_amount}}</text>
</view>
<view class="fxBottom">
<view class="fxItem">
<text class="num">{{totalObj.total_commission_amount}}</text>
@ -33,7 +33,7 @@
<u-cell icon="rmb-circle" :iconStyle="{'color':'#9f751f'}" @click="jump(1)" :titleStyle="{'color':'#9f751f'}" title="我的佣金" :isLink="true" :rightIconStyle="{'color':'#9f751f'}"></u-cell>
<!-- <u-cell icon="file-text" :iconStyle="{'color':'#9f751f'}" :titleStyle="{'color':'#9f751f'}" title="提现记录" :isLink="true" :rightIconStyle="{'color':'#9f751f'}"></u-cell> -->
<u-cell icon="heart" :iconStyle="{'color':'#9f751f'}" @click="jump(2)" :titleStyle="{'color':'#9f751f'}" title="我的粉丝" :isLink="true" :rightIconStyle="{'color':'#9f751f'}"></u-cell>
<u-cell icon="order" :iconStyle="{'color':'#9f751f'}" :titleStyle="{'color':'#9f751f'}" title="粉丝订单" :isLink="true" :rightIconStyle="{'color':'#9f751f'}"></u-cell>
<u-cell icon="order" :iconStyle="{'color':'#9f751f'}" @click="jump(3)" :titleStyle="{'color':'#9f751f'}" title="粉丝订单" :isLink="true" :rightIconStyle="{'color':'#9f751f'}"></u-cell>
</u-cell-group>
</view>
<u-popup :show="show" mode="bottom" @close="close" round="10">
@ -51,6 +51,7 @@ export default{
data(){
return{
totalObj:{
"available_commission_amount":"",
"total_commission_amount": "",
"today_commission_amount": "",
"seven_day_commission_amount": ""
@ -88,7 +89,7 @@ export default{
break;
case 3:
uni.navigateTo({
url: '/pages/BrowsingHistory/BrowsingHistory'
url: '/pages/fenxiao/fansOrder'
})
break;
}
@ -149,7 +150,7 @@ export default{
}
.fxBottom{
display: flex;
margin-top:50rpx;
margin-top:20rpx;
align-items: center;
justify-content: space-between;
.fxItem{

@ -113,7 +113,7 @@
买方
</view>
<view class="infoContainer">
<view class="list" @click="goBuyWareHouse()">
<view class="list" @click="goBuyWareHouse(-1)">
<view class="icon">
<image src="../../static/image/c1.png" mode="heightFix"></image>
</view>
@ -148,12 +148,12 @@
</view>
</view>
<!-- 卖方 -->
<!-- <view class="wallet-info">
<view class="wallet-info">
<view class="fangmian">
卖方
</view>
<view class="infoContainer">
<view class="list" @click="onWallet('integral')">
<view class="list" @click="goSellWareHouse(-1)">
<view class="icon">
<image src="../../static/image/c1.png" mode="heightFix"></image>
</view>
@ -161,7 +161,7 @@
<text>我的仓库</text>
</view>
</view>
<view class="list" @click="onWallet('coupon')">
<view class="list" @click="goSellWareHouse(0)">
<view class="icon">
<image src="../../static/image/c2.png" mode="heightFix"></image>
</view>
@ -169,7 +169,7 @@
<text>确认付款</text>
</view>
</view>
<view class="list" @click="onWallet('wallet')">
<view class="list" @click="goSellWareHouse(1)">
<view class="icon">
<image src="../../static/image/c3.png" mode="heightFix"></image>
</view>
@ -177,7 +177,7 @@
<text>确认收货</text>
</view>
</view>
<view class="list">
<view class="list" @click="goSellWareHouse(3)">
<view class="icon">
<image src="../../static/image/c4.png" mode="heightFix"></image>
</view>
@ -186,7 +186,7 @@
</view>
</view>
</view>
</view> -->
</view>
<view class="card">
<u-cell-group :border="false">
<u-cell icon="map" :iconStyle="{'color':'#236030'}" @click="onAddress" :titleStyle="{'color':'#236030'}" title="我的地址" :isLink="true" :rightIconStyle="{'color':'#236030'}"></u-cell>
@ -312,38 +312,6 @@
url: '/pages/MyOrderList/MyOrderList?type=' + type,
})
},
/**
* 钱包跳转点击
*/
onWallet(type){
switch (type){
case 'integral':
uni.navigateTo({
url: '/pages/IntegralDetails/IntegralDetails',
})
break;
case 'coupon':
uni.navigateTo({
url: '/pages/MyCoupon/MyCoupon',
})
break;
case 'wallet':
uni.navigateTo({
url: '/pages/MyWallet/MyWallet',
})
break;
case 'SignIn':
uni.navigateTo({
url: '/pages/SignIn/SignIn',
})
break;
case 'payment':
uni.navigateTo({
url: '/pages/PaymentCode/PaymentCode',
})
break;
}
},
/**
* 设置点击
@ -375,6 +343,11 @@
url:"/pages/warehouse/buy?type="+val
})
},
goSellWareHouse(val){
uni.navigateTo({
url:"/pages/warehouse/sell?type="+val
})
},
}
}

@ -20,7 +20,7 @@
<text class="max">{{detailsObj.price}}</text>
</view>
<view class="person">
藏品归属人{{detailsObj.owner.nickname}}
藏品归属人{{detailsObj.owner?detailsObj.owner.nickname:'-'}}
</view>
</view>
@ -43,10 +43,10 @@
</view>
</view>
<!-- 底部 -->
<view class="page-footer">
<view class="page-footer" @click="buyHandle">
立即抢购
</view>
</view>
</template>
@ -71,7 +71,7 @@ export default {
status:null,
updatetime:null,
warehouse_id:null,
}
},
};
},
onLoad(params) {
@ -81,13 +81,19 @@ export default {
methods: {
getDetailsHandle(id){
getgoodsDetail({id:id}).then(res=>{
console.log(res,"99")
this.swiperList.push({
url: res.data.image
})
this.detailsObj = Object.assign({},this.detailsObj,res.data)
})
}
},
buyHandle(){
uni.setStorageSync('qgPro',this.detailsObj)
uni.navigateTo({
url:'/pages/ConfirmOrder/ConfirmOrder'
})
},
}
};
</script>

@ -1,111 +1,117 @@
<template>
<view class="page">
<view class="head-back">
<view class="back" @click="onBack">
<text></text>
</view>
<view class="title">
<text>我的订单</text>
</view>
<view class="more-icon">
<view class="icon-list">
<text class="iconfont icon-fadajing"></text>
</view>
</view>
</view>
<!-- 订单tab -->
<view class="order-tab">
<view class="tab" :class="{'action':OrderType==0}" @click="onOrderTab(0)">
<text>全部</text>
<view class="tab" :class="{'action':status==-1}" @click="onOrderTab(-1)">
<text>我的仓库</text>
<text class="line"></text>
</view>
<view class="tab" :class="{'action':OrderType==1}" @click="onOrderTab(1)">
<text>付款</text>
<view class="tab" :class="{'action':status==0}" @click="onOrderTab(0)">
<text>付款确认</text>
<text class="line"></text>
</view>
<view class="tab" :class="{'action':OrderType==2}" @click="onOrderTab(2)">
<text>待发货</text>
<view class="tab" :class="{'action':status==1}" @click="onOrderTab(1)">
<text>收款确认</text>
<text class="line"></text>
</view>
<view class="tab" :class="{'action':OrderType==3}" @click="onOrderTab(3)">
<text>待收货</text>
<view class="tab" :class="{'action':status==3}" @click="onOrderTab(3)">
<text>投诉订单</text>
<text class="line"></text>
</view>
<view class="tab" :class="{'action':OrderType==4}" @click="onOrderTab(4)">
<text>待评价</text>
<view class="tab" :class="{'action':status==4}" @click="onOrderTab(4)">
<text>发货状态</text>
<text class="line"></text>
</view>
</view>
<!-- 订单列表 -->
<view class="order-list">
<view class="list" v-for="(item,index) in 10" @click="onOrderList" :key="index">
<view class="title-status">
<view class="title">
<text>下单时间2020-12-12 18:56</text>
</view>
<view class="status">
<text>待付款</text>
<text class="iconfont icon-laji del"></text>
<view v-if="tableData.length>0">
<view class="list" v-for="(item,index) in tableData" @click="onOrderList" :key="index">
<view class="title-status">
<view class="title">
<text>订单号{{item.order_sn}}</text>
</view>
<view class="status">
<text>{{item.status==0?'待支付':item.status==1?'待确认':item.status==2?'待委托':item.status==3?'已投诉':item.status==4?'待发货':item.status==5?'待收货':item.status==-1?'已取消':''}}</text>
</view>
</view>
</view>
<view class="goods-list">
<view class="goods">
<view class="thumb">
<image :src="'/static/img/goods_thumb_0'+(index+1)+'.png'" mode=""></image>
<view class="goods-list">
<view class="cangku">
所属仓库{{item.warehouse?item.warehouse.title:'-'}}
</view>
<view class="item">
<view class="goods-name">
<text class="two-omit">薇妮(Viney)时尚包包女包牛皮单肩包女休闲百搭斜挎包韩版小方包潮(枪色)</text>
<view class="goods">
<view class="thumb">
<image :src="item.order_goods[0]?item.order_goods[0].goods_image:''" mode=""></image>
</view>
<view class="goods-price">
<text class="min"></text>
<text class="max">299</text>
<text class="min">.00</text>
<view class="item">
<view class="goods-name">
<text class="two-omit">{{item.order_goods[0]?item.order_goods[0].goods_name:''}}</text>
</view>
<view class="goods-price">
<text class="min">{{item.order_goods[0]?item.order_goods[0].goods_price:''}}</text>
</view>
</view>
</view>
</view>
</view>
<view class="status-btn">
<view class="btn">
<text>取消订单</text>
</view>
<view class="btn action" @click.stop="onEvaluate">
<text>评价</text>
<view class="status-btn" v-if="item.status==0">
<view class="btn" style="margin:0;">取消订单</view>
<view class="btnGroup">
<view class="btn">上传凭证</view>
<view class="btn">去支付</view>
<view class="btn">支付确认</view>
</view>
</view>
</view>
</view>
<view class="empty" v-else>
<image src="../../static/image/empty.png" mode="widthFix"></image>
<view class="emptyText">
暂无数据
</view>
</view>
</view>
</view>
</template>
<script>
import {getBuyerOrderList} from '@/common/api.js'
export default {
data() {
return {
OrderType: 0,
page:1,
limit:10,
status:null,
tableData:[],
total:0,
};
},
onLoad(params) {
console.log(params,"000")
this.OrderType = params.type;
this.status = params.type;
this.getList()
},
methods:{
/**
* 返回点击
*/
onBack(){
uni.navigateBack();
getList(val){
let params={
page:this.page,
limit:this.limit,
status:this.status==-1?'':this.status
}
getBuyerOrderList({...params,custom: { auth: true }}).then(res=>{
if(val){
this.tableData.push(...res.data.data)
}else{
this.tableData = res.data.data;
this.total = res.data.total
}
})
},
/**
* 订单tab点击
*/
onOrderTab(type){
this.OrderType = type;
// #ifdef H5
uni.redirectTo({
url: '/pages/MyOrderList/MyOrderList?type=' + type,
})
//#endif
this.status = type
this.getList()
},
/**
* 订单列表点击
@ -115,15 +121,14 @@
url: '/pages/OrderDetails/OrderDetails',
})
},
/**
* 评价点击
*/
onEvaluate(){
uni.navigateTo({
url: '/pages/MyEvaluatePush/MyEvaluatePush'
})
}
}
},
onReachBottom() {
if(this.tableData.length<this.total){
this.page++;
this.getList('over')
}
},
}
</script>
@ -136,91 +141,12 @@
height: 100%;
background-color: #f6f6f6;
}
/* 顶部返回 */
.head-back{
position: fixed;
left: 0;
top: 0;
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100rpx;
background-color: #FFFFFF;
/* #ifdef APP-PLUS */
height: calc(50rpx + var(--status-bar-height));
padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef MP */
height: 150rpx;
padding-top: 20rpx;
/* #endif */
.back{
position: absolute;
left: 0;
top: 0;
/* #ifdef APP-PLUS */
padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef MP */
padding-top: 20rpx;
/* #endif */
display: flex;
align-items: center;
justify-content: center;
width: 100rpx;
height: 100%;
text{
width: 20rpx;
height: 20rpx;
border-left: 2rpx solid #555555;
border-bottom: 2rpx solid #555555;
transform: rotate(45deg);
}
}
.title{
display: flex;
align-items: center;
text{
font-size: 28rpx;
color: #222222;
}
}
.more-icon{
position: absolute;
right: 0;
top: 0;
/* #ifdef APP-PLUS */
right: 0rpx;
padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef MP */
right: 220rpx;
padding-top: 20rpx;
/* #endif */
display: flex;
align-items: center;
height: 100%;
.icon-list{
display: flex;
align-items: center;
justify-content: center;
width: 80rpx;
height: 100%;
text{
font-size: 34rpx;
color: #222222;
}
}
}
}
/* 订单tab */
.order-tab{
position: fixed;
left: 0;
top: 100rpx;
top: 88rpx;
/* #ifdef APP-PLUS */
top: calc(50rpx + var(--status-bar-height));
/* #endif */
@ -228,8 +154,8 @@
display: flex;
align-items: center;
width: 100%;
height: 100rpx;
background-color: #FFFFFF;
height: 90rpx;
background: rgb(35, 96, 48);
.tab{
position: relative;
display: flex;
@ -239,12 +165,13 @@
height: 80%;
text{
font-size: 26rpx;
color: #959595;
color: #4D9A5E;
}
}
.action{
text{
color: #222222;
color: #fff;
font-weight: bold;
}
.line{
position: absolute;
@ -252,7 +179,8 @@
bottom: 0;
width: 60rpx;
height: 6rpx;
background: linear-gradient(to right,$base,#f6f6f6);
background: #fff;
border-radius:3px;
transform: translate(-50%,0);
}
}
@ -260,15 +188,14 @@
/* 订单列表 */
.order-list{
width: 100%;
margin-top: 250rpx;
text-align: center;
margin:0 24rpx;
margin-top:110rpx;
/* #ifdef APP-PLUS */
margin-top: calc(170rpx + var(--status-bar-height));
/* #endif */
.list{
padding: 0 4%;
min-height: 400rpx;
min-height: 390rpx;
background-color: #FFFFFF;
border-radius: 20rpx;
margin-bottom: 20rpx;
@ -277,14 +204,14 @@
align-items: center;
justify-content: space-between;
width: 100%;
height: 100rpx;
height: 80rpx;
border-bottom: 1px solid #eaeaee;
.title{
display: flex;
align-items: center;
text{
font-size: 26rpx;
font-weight: bold;
color: #222222;
color: gray;
}
}
.status{
@ -294,23 +221,21 @@
font-size: 26rpx;
color: $base;
}
.del{
padding: 10rpx;
font-size: 34rpx;
color: #222222;
background-color: #f6f6f6;
border-radius: 100%;
margin-left: 20rpx;
}
}
}
.goods-list{
width: 100%;
.cangku{
text-align: left;
color:gray;
padding:10rpx 0 0 0;
}
.goods{
display: flex;
align-items: center;
width: 100%;
height: 200rpx;
height: 180rpx;
.thumb{
display: flex;
align-items: center;
@ -324,11 +249,12 @@
}
.item{
display: flex;
align-items: center;
width: 70%;
flex-direction: column;
justify-content: space-around;
margin-left:20rpx;
width: 100%;
height: 100%;
.goods-name{
width: 70%;
text{
font-size: 26rpx;
color: #555555;
@ -337,10 +263,8 @@
.goods-price{
display: flex;
align-items: center;
justify-content: flex-end;
width: 30%;
text{
color: #222222;
color: $base;
}
.min{
font-size: 26rpx;
@ -355,26 +279,38 @@
.status-btn{
display: flex;
align-items: center;
justify-content: flex-end;
justify-content: space-between;
width: 100%;
height: 100rpx;
.btn{
padding: 10rpx 30rpx;
border: 2rpx solid #EEEEEE;
border-radius: 100rpx;
margin-left: 20rpx;
text{
font-size: 26rpx;
color: #555555;
}
.btnGroup{
display: flex;
align-items: center;
justify-content: space-between;
}
.action{
border: 2rpx solid $base;
text{
color: $base;
}
.btn{
background-color: $base;
padding: 10rpx 10rpx;
border-radius: 10rpx;
font-size: 24rpx;
color: #ffffff;
text-align: center;
margin-left:10rpx;
}
}
}
}
.empty{
text-align: center;
margin-top:30%;
image{
width:40%;
height:auto;
}
.emptyText{
text-align: center;
font-size: 26rpx;
color:gray;
}
}
</style>

@ -0,0 +1,316 @@
<template>
<view class="page">
<!-- 订单tab -->
<view class="order-tab">
<view class="tab" :class="{'action':status==-1}" @click="onOrderTab(-1)">
<text>我的仓库</text>
<text class="line"></text>
</view>
<view class="tab" :class="{'action':status==0}" @click="onOrderTab(0)">
<text>付款确认</text>
<text class="line"></text>
</view>
<view class="tab" :class="{'action':status==1}" @click="onOrderTab(1)">
<text>收款确认</text>
<text class="line"></text>
</view>
<view class="tab" :class="{'action':status==3}" @click="onOrderTab(3)">
<text>投诉订单</text>
<text class="line"></text>
</view>
<view class="tab" :class="{'action':status==4}" @click="onOrderTab(4)">
<text>发货状态</text>
<text class="line"></text>
</view>
</view>
<!-- 订单列表 -->
<view class="order-list">
<view v-if="tableData.length>0">
<view class="list" v-for="(item,index) in tableData" @click="onOrderList" :key="index">
<view class="title-status">
<view class="title">
<text>订单号{{item.order_sn}}</text>
</view>
<view class="status">
<text>{{item.status==0?'待支付':item.status==1?'待确认':item.status==2?'已完成':item.status==3?'已投诉':item.status==4?'待发货':item.status==5?'待收货':item.status==-1?'已取消':''}}</text>
</view>
</view>
<view class="goods-list">
<view class="cangku">
所属仓库{{item.warehouse?item.warehouse.title:'-'}}
</view>
<view class="goods">
<view class="thumb">
<image :src="item.order_goods[0]?item.order_goods[0].goods_image:''" mode=""></image>
</view>
<view class="item">
<view class="goods-name">
<text class="two-omit">{{item.order_goods[0]?item.order_goods[0].goods_name:''}}</text>
</view>
<view class="goods-price">
<text class="min">{{item.order_goods[0]?item.order_goods[0].goods_price:''}}</text>
</view>
</view>
</view>
</view>
<view class="status-btn" v-show="item.status==0">
<view class="btnGroup">
<view class="btn">投诉</view>
<view class="btn">确认收款</view>
</view>
</view>
</view>
</view>
<view class="empty" v-else>
<image src="../../static/image/empty.png" mode="widthFix"></image>
<view class="emptyText">
暂无数据
</view>
</view>
</view>
</view>
</template>
<script>
import {getSellerOrderList} from '@/common/api.js'
export default {
data() {
return {
page:1,
limit:10,
status:null,
tableData:[],
total:0,
};
},
onLoad(params) {
this.status = params.type;
this.getList()
},
methods:{
getList(val){
let params={
page:this.page,
limit:this.limit,
status:this.status==-1?'':this.status
}
getSellerOrderList({...params,custom: { auth: true }}).then(res=>{
if(val){
this.tableData.push(...res.data.data)
}else{
this.tableData = res.data.data;
this.total = res.data.total
}
})
},
/**
* 订单tab点击
*/
onOrderTab(type){
this.status = type;
this.getList()
},
/**
* 订单列表点击
*/
onOrderList(){
uni.navigateTo({
url: '/pages/OrderDetails/OrderDetails',
})
},
},
onReachBottom() {
if(this.tableData.length<this.total){
this.page++;
this.getList('over')
}
},
}
</script>
<style scoped lang="scss">
.page{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: #f6f6f6;
}
/* 订单tab */
.order-tab{
position: fixed;
left: 0;
top: 88rpx;
/* #ifdef APP-PLUS */
top: calc(50rpx + var(--status-bar-height));
/* #endif */
z-index: 10;
display: flex;
align-items: center;
width: 100%;
height: 90rpx;
background: rgb(35, 96, 48);
.tab{
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 20%;
height: 80%;
text{
font-size: 26rpx;
color: #4D9A5E;
}
}
.action{
text{
color: #fff;
font-weight: bold;
}
.line{
position: absolute;
left: 50%;
bottom: 0;
width: 60rpx;
height: 6rpx;
background: #fff;
border-radius:3px;
transform: translate(-50%,0);
}
}
}
/* 订单列表 */
.order-list{
margin:0 24rpx;
margin-top:110rpx;
/* #ifdef APP-PLUS */
margin-top: calc(170rpx + var(--status-bar-height));
/* #endif */
.list{
padding: 0 4%;
min-height: 390rpx;
background-color: #FFFFFF;
border-radius: 20rpx;
margin-bottom: 20rpx;
.title-status{
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 80rpx;
border-bottom: 1px solid #eaeaee;
.title{
display: flex;
align-items: center;
text{
font-size: 26rpx;
color: gray;
}
}
.status{
display: flex;
align-items: center;
text{
font-size: 26rpx;
color: $base;
}
}
}
.goods-list{
width: 100%;
.cangku{
text-align: left;
color:gray;
padding:10rpx 0 0 0;
}
.goods{
display: flex;
align-items: center;
width: 100%;
height: 180rpx;
.thumb{
display: flex;
align-items: center;
width: 30%;
height: 100%;
image{
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
}
}
.item{
display: flex;
flex-direction: column;
justify-content: space-around;
margin-left:20rpx;
width: 100%;
height: 100%;
.goods-name{
text{
font-size: 26rpx;
color: #555555;
}
}
.goods-price{
display: flex;
align-items: center;
text{
color: $base;
}
.min{
font-size: 26rpx;
}
.max{
font-size: 34rpx;
}
}
}
}
}
}
}
.status-btn{
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
.btnGroup{
display: flex;
align-items: center;
justify-content: space-between;
}
.btn{
background-color: $base;
padding: 10rpx 10rpx;
border-radius: 10rpx;
font-size: 24rpx;
color: #ffffff;
text-align: center;
margin-left:10rpx;
}
}
.empty{
text-align: center;
margin-top:30%;
image{
width:40%;
height:auto;
}
.emptyText{
text-align: center;
font-size: 26rpx;
color:gray;
}
}
</style>
Loading…
Cancel
Save