|
@@ -2,23 +2,39 @@
|
|
|
<div id="index">
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="main animate__animated animate__backInRight">
|
|
|
- <el-col :span="24" class="one"> <span>订单管理</span> </el-col>
|
|
|
- <el-col :span="24" class="four">
|
|
|
- <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
|
|
- <el-tab-pane label="待付款" name="1">
|
|
|
- <card-1 :statusList="statusList"></card-1>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="待发货" name="2">
|
|
|
- <card-2 :statusList="statusList"></card-2>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="待收货" name="3">
|
|
|
- <card-3 :statusList="statusList"></card-3>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="已收货" name="4">
|
|
|
- <card-4 :statusList="statusList"></card-4>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </el-col>
|
|
|
+ <template v-if="view === 'list'">
|
|
|
+ <el-col :span="24" class="one"> <span>订单管理</span> </el-col>
|
|
|
+ <el-col :span="24" class="four">
|
|
|
+ <el-tabs v-model="activeName" type="border-card">
|
|
|
+ <el-tab-pane label="待付款" name="1">
|
|
|
+ <card-1 :statusList="statusList" @toDetail="toDetail" @toSales="toSales"></card-1>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="待发货" name="2">
|
|
|
+ <card-2 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-2>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="待收货" name="3">
|
|
|
+ <card-3 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-3>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="已收货" name="4">
|
|
|
+ <card-4 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-4>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </el-col>
|
|
|
+ </template>
|
|
|
+ <!-- -->
|
|
|
+ <template v-else-if="view === 'card1_detail'">
|
|
|
+ <detail_order :id="order_id" @toBack="toBack"></detail_order>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="view === 'card1_sales'">
|
|
|
+ <detail_sales_order :id="sales_id" @toBack="toBack"></detail_sales_order>
|
|
|
+ </template>
|
|
|
+ <!-- -->
|
|
|
+ <template v-else-if="view === 'card_detail'">
|
|
|
+ <detail_orderDetail :id="order_id" @toBack="toBack"></detail_orderDetail>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="view === 'card_sales'">
|
|
|
+ <detail_sales_orderDetail :id="sales_id" :status="status" @toBack="toBack"></detail_sales_orderDetail>
|
|
|
+ </template>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -28,6 +44,7 @@
|
|
|
const _ = require('lodash');
|
|
|
import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: dictData } = createNamespacedHelpers('dictData');
|
|
|
+const { mapActions: shop } = createNamespacedHelpers('shop');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -36,13 +53,23 @@ export default {
|
|
|
card2: () => import('./parts/card-2.vue'),
|
|
|
card3: () => import('./parts/card-3.vue'),
|
|
|
card4: () => import('./parts/card-4.vue'),
|
|
|
+ detail_order: () => import('./detail_order.vue'),
|
|
|
+ detail_orderDetail: () => import('./detail_orderDetail.vue'),
|
|
|
+ detail_sales_order: () => import('./detail_sales_order.vue'),
|
|
|
+ detail_sales_orderDetail: () => import('./detail_sales_orderDetail.vue'),
|
|
|
},
|
|
|
data: function () {
|
|
|
const that = this;
|
|
|
return {
|
|
|
+ view: 'list',
|
|
|
activeName: '2',
|
|
|
// 类型列表
|
|
|
statusList: [],
|
|
|
+ // 店铺列表
|
|
|
+ shopList: [],
|
|
|
+ order_id: '',
|
|
|
+ sales_id: '',
|
|
|
+ status: '',
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
@@ -50,7 +77,29 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...dictData({ dictQuery: 'query' }),
|
|
|
- handleClick(tab, event) {},
|
|
|
+ ...shop({ shopQuery: 'query' }),
|
|
|
+ // 未付款
|
|
|
+ toDetail(val) {
|
|
|
+ this.$set(this, `order_id`, val);
|
|
|
+ this.$set(this, `view`, 'card1_detail');
|
|
|
+ },
|
|
|
+ toSales(val) {
|
|
|
+ this.$set(this, `sales_id`, val);
|
|
|
+ this.$set(this, `view`, 'card1_sales');
|
|
|
+ },
|
|
|
+ // 待发货,待收货,已收货
|
|
|
+ toDetails(val) {
|
|
|
+ this.$set(this, `order_id`, val);
|
|
|
+ this.$set(this, `view`, 'card_detail');
|
|
|
+ },
|
|
|
+ toSaless(val) {
|
|
|
+ this.$set(this, `sales_id`, val.id);
|
|
|
+ this.$set(this, `status`, val.status);
|
|
|
+ this.$set(this, `view`, 'card_sales');
|
|
|
+ },
|
|
|
+ toBack() {
|
|
|
+ this.view = 'list';
|
|
|
+ },
|
|
|
// 查询其他信息
|
|
|
async searchOther() {
|
|
|
let res;
|
|
@@ -59,6 +108,8 @@ export default {
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `statusList`, res.data);
|
|
|
}
|
|
|
+ res = await this.shopQuery();
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `shopList`, res.data);
|
|
|
},
|
|
|
},
|
|
|
computed: {
|