Browse Source

feat: 订单列表页面;

pull/1/head
fox 2 months ago
parent
commit
c94d9517fc
3 changed files with 98 additions and 74 deletions
  1. +98
    -61
      pages/index/order.vue
  2. +0
    -4
      pages_order/order/createOrder.vue
  3. +0
    -9
      pages_order/product/productDetail.vue

+ 98
- 61
pages/index/order.vue View File

@ -1,85 +1,110 @@
<template>
<view class="page">
<!-- 导航栏 -->
<navbar title="订单中心" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<navbar title="订单" leftClick @leftClick="$utils.navigateBack" color="#fff" />
<!-- 订单筛选 -->
<view class="tabs">
<uv-tabs :list="tabs"
:activeStyle="{color : '#fff', fontWeight : 600}"
lineColor="#fff"
:inactiveStyle="{color: 'rgba(255,255,255,.8)'}"
:customStyle="{
backgroundColor: '#FFFFFF',
}"
:activeStyle="{
color: '#84A73F',
fontSize: '28rpx',
whiteSpace: 'nowrap',
paddingTop: '29rpx',
paddingBottom: '21rpx',
}"
:inactiveStyle="{
color: '#000000',
fontSize: '28rpx',
whiteSpace: 'nowrap',
paddingTop: '29rpx',
paddingBottom: '21rpx',
}"
lineHeight="8rpx"
lineWidth="50rpx"
lineWidth="92rpx"
lineColor="linear-gradient(to right, #84A73F, #D8FF8F)"
:scrollable="false"
:current="current"
@click="clickTabs"></uv-tabs>
</view>
<view class="list">
<view class="item" v-for="(item, index) in list" @click="toOrderDetail(item.id)" :key="index">
<view class="content" :key="index" v-for="(good, index) in item.commonOrderSkuList">
<view class="top">
<view class="service">
{{ good.title }}
</view>
<view class="status">
<text> {{ tabs[Number(item.state) + 1].name }}</text>
</view>
</view>
<orderCard v-for="item in list" :data="item" :key="item.id"></orderCard>
<!-- todo: delete -->
<orderCard></orderCard>
</view>
<view class="main">
<view class="left">
<image mode="aspectFill" :src="good.image && good.image.split(',')[0]"></image>
</view>
<template v-if="false">
<view class="right">
<view class="text-hidden-1">
客户姓名{{item.name}}
<view class="list">
<view class="item" v-for="(item, index) in list" @click="toOrderDetail(item.id)" :key="index">
<view class="content" :key="index" v-for="(good, index) in item.commonOrderSkuList">
<view class="top">
<view class="service">
{{ good.title }}
</view>
<view class="text-hidden-1">
下单时间{{item.createTime}}
<view class="status">
<text> {{ tabs[Number(item.state) + 1].name }}</text>
</view>
<view class="text-hidden-1">
联系电话{{item.phone}}
</view>
<view class="main">
<view class="left">
<image mode="aspectFill" :src="good.image && good.image.split(',')[0]"></image>
</view>
<view class="right">
<view class="text-hidden-1">
客户姓名{{item.name}}
</view>
<view class="text-hidden-1">
下单时间{{item.createTime}}
</view>
<view class="text-hidden-1">
联系电话{{item.phone}}
</view>
</view>
</view>
</view>
</view>
<view class="bottom">
<view class="price">
<text class="total-title">总价格</text>
<text class="unit"></text>
<text class="num">{{item.price}}</text>
<text class="c-unit"></text>
</view>
<view class="bottom">
<view class="price">
<text class="total-title">总价格</text>
<text class="unit"></text>
<text class="num">{{item.price}}</text>
<text class="c-unit"></text>
</view>
<view @click.stop="toPayOrder(item)" class="btn" v-if="item.state == 0">
立即付款
</view>
<view @click.stop="toPayOrder(item)" class="btn" v-if="item.state == 0">
立即付款
</view>
<view @click.stop="cancelOrder(item)" class="btn" v-if="item.state == 0">
取消订单
</view>
<view @click.stop="cancelOrder(item)" class="btn" v-if="item.state == 0">
取消订单
</view>
<view class="btn" @click.stop="confirmOrder(item)" v-if="item.state == 2">
确认收货
</view>
<view class="btn" @click.stop="confirmOrder(item)" v-if="item.state == 2">
确认收货
<view @click.stop="$refs.customerServicePopup.open()" class="btn" v-if="item.state > 0">
联系客服
</view>
</view>
<view @click.stop="$refs.customerServicePopup.open()" class="btn" v-if="item.state > 0">
联系客服
</view>
</view>
</view>
<view style="
margin-top: 20rpx;
min-width: 700rpx;">
<uv-empty mode="list" v-if="list.length == 0"></uv-empty>
<view style="
margin-top: 20rpx;
min-width: 700rpx;">
<uv-empty mode="list" v-if="list.length == 0"></uv-empty>
</view>
</view>
</view>
</template>
<customerServicePopup ref="customerServicePopup" />
@ -88,6 +113,8 @@
</template>
<script>
import orderCard from '@/components/order/orderCard.vue'
import {
mapGetters
} from 'vuex'
@ -99,6 +126,7 @@
export default {
mixins: [mixinsList, mixinsOrder],
components: {
orderCard,
tabber,
customerServicePopup,
},
@ -106,23 +134,20 @@
data() {
return {
tabs: [{
name: '全部'
name: '全部订单'
},
{
name: '待付款'
},
{
name: '待发货'
},
{
name: '待收货'
name: '待核销'
},
{
name: '已完成'
},
{
name: '已取消'
}
},
],
current: 0,
mixinsListApi: 'getOrderPageList',
@ -157,10 +182,22 @@
</script>
<style scoped lang="scss">
.page {}
.page {
background-color: #F5F5F5;
/deep/ .nav-bar__view {
background-image: linear-gradient(#84A73F, #D8FF8F);
}
}
.tabs {
background: $uni-color;
/deep/ .uv-tabs__wrapper__nav__line {
bottom: 0;
}
}
.list {
padding: 16rpx 17rpx;
}
.list {


+ 0
- 4
pages_order/order/createOrder.vue View File

@ -67,8 +67,6 @@
<script>
import productCard from '@/components/product/productCard.vue'
import addressList from '../components/address/addressList.vue'
import couponList from '@/components/couponList/couponList.vue'
import {
@ -78,8 +76,6 @@
export default {
components: {
productCard,
addressList,
couponList
},
data() {


+ 0
- 9
pages_order/product/productDetail.vue View File

@ -70,16 +70,7 @@
</template>
<script>
import submit from '../components/product/submit.vue'
import submitUnitSelect from '../components/product/submitUnitSelect.vue'
import customerServicePopup from '@/components/config/customerServicePopup.vue'
export default {
components: {
submit,
submitUnitSelect,
customerServicePopup
},
data() {
return {
productDetail: {


Loading…
Cancel
Save