|
@@ -1,24 +1,40 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="app-main app-content">
|
|
<div class="app-main app-content">
|
|
|
<app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" :height="100" @change="change" itemWidth="20%" />
|
|
<app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" :height="100" @change="change" itemWidth="20%" />
|
|
|
- <div class="list-wrap" v-for="(item, index) in 4" :key="index" @click="$util.pageTo('/pages/order/admin/detail')">
|
|
|
|
|
- <div class="list-top flex-center-between">
|
|
|
|
|
- <div class="app-color-3">订单编号:3261515151</div>
|
|
|
|
|
- <div class="app-price">等待支付</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="list-blo">
|
|
|
|
|
- <list-module v-for="(item, subIndex) in 2" :key="subIndex" />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="list-bottom">
|
|
|
|
|
- <div>
|
|
|
|
|
- <span class="freight-text">运费:¥50</span>
|
|
|
|
|
- <span>应付金额:</span>
|
|
|
|
|
- <span class="app-size-30 app-bold">¥580.00</span>
|
|
|
|
|
|
|
+ <div class="list-wrap">
|
|
|
|
|
+ <block v-if="!$util.isEmpty(list.data)">
|
|
|
|
|
+ <div class="list" v-for="(item, index) in list.data" :key="index" @click="$util.pageTo({
|
|
|
|
|
+ url: '/pages/order/admin/detail',
|
|
|
|
|
+ id: item.id
|
|
|
|
|
+ })">
|
|
|
|
|
+ <div class="list-top flex-center-between">
|
|
|
|
|
+ <div class="app-color-3">订单编号:{{ item.sendNum }}</div>
|
|
|
|
|
+ <div class="app-price">{{ item.status | constantfilter('ORDER_STATUS') }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="list-blo">
|
|
|
|
|
+ <list-module v-for="(item, subIndex) in 2" :key="subIndex" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="list-bottom">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <span class="freight-text">运费:¥{{ item.sendCost }}</span>
|
|
|
|
|
+ <span>应付金额:</span>
|
|
|
|
|
+ <span class="app-size-30 app-bold">¥{{ item.actPrice }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="list-button">
|
|
|
|
|
+ <!-- 待配送 -->
|
|
|
|
|
+ <div v-if="item.status == 2" class="admin-button-com">免发货</div>
|
|
|
|
|
+ <div v-if="item.status == 2" class="admin-button-com">发货</div>
|
|
|
|
|
+ <!-- 配送中 -->
|
|
|
|
|
+ <div v-if="item.status == 2" class="admin-button-com">继续</div>
|
|
|
|
|
+ <!-- 已完成 -->
|
|
|
|
|
+ <div v-if="item.status == 5" class="admin-button-com default">查看快递</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="list-button">
|
|
|
|
|
- <div class="admin-button-com default">发货管理</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </block>
|
|
|
|
|
+ <block v-else>
|
|
|
|
|
+ <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
|
|
|
+ </block>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -26,35 +42,41 @@
|
|
|
<script>
|
|
<script>
|
|
|
import AppTabs from '@/components/plugin/tabs'
|
|
import AppTabs from '@/components/plugin/tabs'
|
|
|
import ListModule from '@/components/module/app-order-list'
|
|
import ListModule from '@/components/module/app-order-list'
|
|
|
|
|
+import AppWrapperEmpty from '@/components/app-wrapper-empty'
|
|
|
|
|
+import { list } from '@/mixins'
|
|
|
|
|
+// api
|
|
|
|
|
+import { getListB } from '@/api/order'
|
|
|
export default {
|
|
export default {
|
|
|
name: 'order-list',
|
|
name: 'order-list',
|
|
|
components: {
|
|
components: {
|
|
|
ListModule,
|
|
ListModule,
|
|
|
- AppTabs
|
|
|
|
|
|
|
+ AppTabs,
|
|
|
|
|
+ AppWrapperEmpty
|
|
|
},
|
|
},
|
|
|
|
|
+ mixins: [list],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
tabIndex: 0,
|
|
tabIndex: 0,
|
|
|
tabs: [
|
|
tabs: [
|
|
|
{
|
|
{
|
|
|
name: '全部',
|
|
name: '全部',
|
|
|
- value: 212
|
|
|
|
|
|
|
+ value: 0
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: '待付款',
|
|
name: '待付款',
|
|
|
- value: 213
|
|
|
|
|
|
|
+ value: 0
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: '待配送',
|
|
name: '待配送',
|
|
|
- value: 214
|
|
|
|
|
|
|
+ value: 0
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: '配送中',
|
|
name: '配送中',
|
|
|
- value: 215
|
|
|
|
|
|
|
+ value: 0
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: '已完结',
|
|
name: '已完结',
|
|
|
- value: 216
|
|
|
|
|
|
|
+ value: 0
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
@@ -66,9 +88,38 @@ export default {
|
|
|
onReachBottom() {
|
|
onReachBottom() {
|
|
|
console.log('5151')
|
|
console.log('5151')
|
|
|
},
|
|
},
|
|
|
|
|
+ onLoad: function() {
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ async init() {
|
|
|
|
|
+ this._list()
|
|
|
|
|
+ },
|
|
|
|
|
+ _list() {
|
|
|
|
|
+ let status = JSON.parse(JSON.stringify(this.tabIndex))
|
|
|
|
|
+ status = status == 4 ? 5 : status - 1
|
|
|
|
|
+ return getListB({
|
|
|
|
|
+ status: status,
|
|
|
|
|
+ search: '',
|
|
|
|
|
+ page: this.list.page
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ this.completes(res)
|
|
|
|
|
+ if (this.$util.isEmpty(res.data)) return false
|
|
|
|
|
+ this.tabs[0].value = res.data.asset.totalOrder
|
|
|
|
|
+ this.tabs[1].value = res.data.asset.unPayOrder
|
|
|
|
|
+ this.tabs[2].value = res.data.asset.unSendOrder
|
|
|
|
|
+ this.tabs[3].value = res.data.asset.sendingOrder
|
|
|
|
|
+ this.tabs[4].value = res.data.asset.finishOrder
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
change(e) {
|
|
change(e) {
|
|
|
- this.tabIndex = e.index
|
|
|
|
|
|
|
+ if (this.tabIndex == e.index) {
|
|
|
|
|
+ return false
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.tabIndex = e.index
|
|
|
|
|
+ this.resetList()
|
|
|
|
|
+ this._list()
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -82,27 +133,32 @@ export default {
|
|
|
padding-top: 120px;
|
|
padding-top: 120px;
|
|
|
padding-bottom: 1px;
|
|
padding-bottom: 1px;
|
|
|
.list-wrap {
|
|
.list-wrap {
|
|
|
- padding: 0 30px;
|
|
|
|
|
- background-color: #fff;
|
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
|
- .list-top,
|
|
|
|
|
- .list-bottom {
|
|
|
|
|
- padding: 26px 0;
|
|
|
|
|
- border-bottom: 1px solid $borderColor;
|
|
|
|
|
- color: $fontColor3;
|
|
|
|
|
- .app-bold {
|
|
|
|
|
- color: #333;
|
|
|
|
|
- }
|
|
|
|
|
- .freight-text {
|
|
|
|
|
- margin-right: 60px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .list-bottom {
|
|
|
|
|
- & > div {
|
|
|
|
|
- @include disFlex(center, flex-end);
|
|
|
|
|
|
|
+ .list {
|
|
|
|
|
+ padding: 0 30px;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
|
+ .list-top,
|
|
|
|
|
+ .list-bottom {
|
|
|
|
|
+ padding: 26px 0;
|
|
|
|
|
+ border-bottom: 1px solid $borderColor;
|
|
|
|
|
+ color: $fontColor3;
|
|
|
|
|
+ .app-bold {
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ }
|
|
|
|
|
+ .freight-text {
|
|
|
|
|
+ margin-right: 60px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- .list-button {
|
|
|
|
|
- margin-top: 26px;
|
|
|
|
|
|
|
+ .list-bottom {
|
|
|
|
|
+ & > div {
|
|
|
|
|
+ @include disFlex(center, flex-end);
|
|
|
|
|
+ }
|
|
|
|
|
+ .list-button {
|
|
|
|
|
+ margin-top: 26px;
|
|
|
|
|
+ .admin-button-com {
|
|
|
|
|
+ margin-left: 20px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|