فهرست منبع

添加订单状态

YY 2 سال پیش
والد
کامیت
cb23c07586

+ 17 - 1
src/views/platmanag/order/index.vue

@@ -21,6 +21,18 @@
               <el-tab-pane label="已收货" name="4">
                 <card-4 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-4>
               </el-tab-pane>
+              <el-tab-pane label="取消订单" name="6">
+                <card-6 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-6>
+              </el-tab-pane>
+              <el-tab-pane label="申请售后" name="7">
+                <card-7 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-7>
+              </el-tab-pane>
+              <el-tab-pane label="正在处理售后" name="8">
+                <card-8 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-8>
+              </el-tab-pane>
+              <el-tab-pane label="售后结束" name="9">
+                <card-9 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-9>
+              </el-tab-pane>
             </el-tabs>
           </el-col>
         </span>
@@ -46,7 +58,11 @@ export default {
     card2: () => import('./parts/card-2.vue'),
     card3: () => import('./parts/card-3.vue'),
     card4: () => import('./parts/card-4.vue'),
-    card5: () => import('./parts/card-5.vue'),
+    card5: () => import('./parts/card-6.vue'),
+    card6: () => import('./parts/card-5.vue'),
+    card7: () => import('./parts/card-7.vue'),
+    card8: () => import('./parts/card-8.vue'),
+    card9: () => import('./parts/card-9.vue'),
     detail_order: () => import('./parts/detail/detail_order.vue'),
     detail_orderDetail: () => import('./parts/detail/detail_orderDetail.vue'),
     detail_sales_order: () => import('./parts/detail/detail_sales_order.vue'),

+ 98 - 0
src/views/platmanag/order/parts/card-6.vue

@@ -0,0 +1,98 @@
+<template>
+  <div id="card-1">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <search-1 :form="searchForm" @onSubmit="search" @toReset="toClose"></search-1>
+        </el-col>
+        <data-table :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @detail="toDetail" @sales="toSales"> </data-table>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('orderDetail');
+
+export default {
+  name: 'card-1',
+  props: { statusList: { type: Array } },
+  components: { search1: () => import('./search-1.vue') },
+  data: function () {
+    return {
+      searchForm: {},
+      list: [],
+      total: 0,
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
+      fields: [
+        { label: '订单号', model: 'no', showTip: false },
+        { label: '下单时间', model: 'buy_time' },
+        { label: '顾客', model: 'customer.name' },
+        { label: '收货人', model: 'address', showTip: false, format: (i) => this.getAddress(i) },
+        { label: '支付金额', model: 'real_pay' },
+        { label: '商品数量', model: 'buy_num_total' },
+        { label: '是否售后', model: 'is_afterSale', format: (i) => (i === true ? '该订单有商品申请售后' : '未申请售后') },
+      ],
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
+    // 查询
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
+      let condition = _.cloneDeep(this.searchForm);
+      if (condition.buy_time) {
+        condition[`buy_time@start`] = _.head(condition.buy_time);
+        condition[`buy_time@end`] = _.last(condition.buy_time);
+        delete condition.buy_time;
+      }
+      info.status = '-1';
+      let res = await this.query({ skip, limit, ...condition, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, 'list', res.data);
+        this.$set(this, 'total', res.total);
+      }
+    },
+    getAddress(i) {
+      let name = i.name + ',' + i.phone;
+      return name;
+    },
+    toDetail({ data }) {
+      this.$emit('toDetails', data._id);
+    },
+    toSales({ data }) {
+      this.$emit('toSaless', { id: data._id, status: '2-' });
+    },
+    toClose() {
+      this.searchForm = {};
+      this.search();
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.one {
+  margin: 0 0 10px 0;
+}
+</style>

+ 98 - 0
src/views/platmanag/order/parts/card-7.vue

@@ -0,0 +1,98 @@
+<template>
+  <div id="card-1">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <search-1 :form="searchForm" @onSubmit="search" @toReset="toClose"></search-1>
+        </el-col>
+        <data-table :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @detail="toDetail" @sales="toSales"> </data-table>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('orderDetail');
+
+export default {
+  name: 'card-1',
+  props: { statusList: { type: Array } },
+  components: { search1: () => import('./search-1.vue') },
+  data: function () {
+    return {
+      searchForm: {},
+      list: [],
+      total: 0,
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
+      fields: [
+        { label: '订单号', model: 'no', showTip: false },
+        { label: '下单时间', model: 'buy_time' },
+        { label: '顾客', model: 'customer.name' },
+        { label: '收货人', model: 'address', showTip: false, format: (i) => this.getAddress(i) },
+        { label: '支付金额', model: 'real_pay' },
+        { label: '商品数量', model: 'buy_num_total' },
+        { label: '是否售后', model: 'is_afterSale', format: (i) => (i === true ? '该订单有商品申请售后' : '未申请售后') },
+      ],
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
+    // 查询
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
+      let condition = _.cloneDeep(this.searchForm);
+      if (condition.buy_time) {
+        condition[`buy_time@start`] = _.head(condition.buy_time);
+        condition[`buy_time@end`] = _.last(condition.buy_time);
+        delete condition.buy_time;
+      }
+      info.status = '-2';
+      let res = await this.query({ skip, limit, ...condition, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, 'list', res.data);
+        this.$set(this, 'total', res.total);
+      }
+    },
+    getAddress(i) {
+      let name = i.name + ',' + i.phone;
+      return name;
+    },
+    toDetail({ data }) {
+      this.$emit('toDetails', data._id);
+    },
+    toSales({ data }) {
+      this.$emit('toSaless', { id: data._id, status: '2-' });
+    },
+    toClose() {
+      this.searchForm = {};
+      this.search();
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.one {
+  margin: 0 0 10px 0;
+}
+</style>

+ 98 - 0
src/views/platmanag/order/parts/card-8.vue

@@ -0,0 +1,98 @@
+<template>
+  <div id="card-1">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <search-1 :form="searchForm" @onSubmit="search" @toReset="toClose"></search-1>
+        </el-col>
+        <data-table :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @detail="toDetail" @sales="toSales"> </data-table>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('orderDetail');
+
+export default {
+  name: 'card-1',
+  props: { statusList: { type: Array } },
+  components: { search1: () => import('./search-1.vue') },
+  data: function () {
+    return {
+      searchForm: {},
+      list: [],
+      total: 0,
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
+      fields: [
+        { label: '订单号', model: 'no', showTip: false },
+        { label: '下单时间', model: 'buy_time' },
+        { label: '顾客', model: 'customer.name' },
+        { label: '收货人', model: 'address', showTip: false, format: (i) => this.getAddress(i) },
+        { label: '支付金额', model: 'real_pay' },
+        { label: '商品数量', model: 'buy_num_total' },
+        { label: '是否售后', model: 'is_afterSale', format: (i) => (i === true ? '该订单有商品申请售后' : '未申请售后') },
+      ],
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
+    // 查询
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
+      let condition = _.cloneDeep(this.searchForm);
+      if (condition.buy_time) {
+        condition[`buy_time@start`] = _.head(condition.buy_time);
+        condition[`buy_time@end`] = _.last(condition.buy_time);
+        delete condition.buy_time;
+      }
+      info.status = '-3';
+      let res = await this.query({ skip, limit, ...condition, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, 'list', res.data);
+        this.$set(this, 'total', res.total);
+      }
+    },
+    getAddress(i) {
+      let name = i.name + ',' + i.phone;
+      return name;
+    },
+    toDetail({ data }) {
+      this.$emit('toDetails', data._id);
+    },
+    toSales({ data }) {
+      this.$emit('toSaless', { id: data._id, status: '2-' });
+    },
+    toClose() {
+      this.searchForm = {};
+      this.search();
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.one {
+  margin: 0 0 10px 0;
+}
+</style>

+ 98 - 0
src/views/platmanag/order/parts/card-9.vue

@@ -0,0 +1,98 @@
+<template>
+  <div id="card-1">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <search-1 :form="searchForm" @onSubmit="search" @toReset="toClose"></search-1>
+        </el-col>
+        <data-table :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @detail="toDetail" @sales="toSales"> </data-table>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('orderDetail');
+
+export default {
+  name: 'card-1',
+  props: { statusList: { type: Array } },
+  components: { search1: () => import('./search-1.vue') },
+  data: function () {
+    return {
+      searchForm: {},
+      list: [],
+      total: 0,
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
+      fields: [
+        { label: '订单号', model: 'no', showTip: false },
+        { label: '下单时间', model: 'buy_time' },
+        { label: '顾客', model: 'customer.name' },
+        { label: '收货人', model: 'address', showTip: false, format: (i) => this.getAddress(i) },
+        { label: '支付金额', model: 'real_pay' },
+        { label: '商品数量', model: 'buy_num_total' },
+        { label: '是否售后', model: 'is_afterSale', format: (i) => (i === true ? '该订单有商品申请售后' : '未申请售后') },
+      ],
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
+    // 查询
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
+      let condition = _.cloneDeep(this.searchForm);
+      if (condition.buy_time) {
+        condition[`buy_time@start`] = _.head(condition.buy_time);
+        condition[`buy_time@end`] = _.last(condition.buy_time);
+        delete condition.buy_time;
+      }
+      info.status = '-4';
+      let res = await this.query({ skip, limit, ...condition, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, 'list', res.data);
+        this.$set(this, 'total', res.total);
+      }
+    },
+    getAddress(i) {
+      let name = i.name + ',' + i.phone;
+      return name;
+    },
+    toDetail({ data }) {
+      this.$emit('toDetails', data._id);
+    },
+    toSales({ data }) {
+      this.$emit('toSaless', { id: data._id, status: '2-' });
+    },
+    toClose() {
+      this.searchForm = {};
+      this.search();
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.one {
+  margin: 0 0 10px 0;
+}
+</style>

+ 16 - 0
src/views/selfShop/order/index.vue

@@ -21,6 +21,18 @@
               <el-tab-pane label="已收货" name="4">
                 <card-4 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-4>
               </el-tab-pane>
+              <el-tab-pane label="取消订单" name="6">
+                <card-6 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-6>
+              </el-tab-pane>
+              <el-tab-pane label="申请售后" name="7">
+                <card-7 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-7>
+              </el-tab-pane>
+              <el-tab-pane label="正在处理售后" name="8">
+                <card-8 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-8>
+              </el-tab-pane>
+              <el-tab-pane label="售后结束" name="9">
+                <card-9 :statusList="statusList" @toDetails="toDetails" @toSaless="toSaless"></card-9>
+              </el-tab-pane>
             </el-tabs>
           </el-col>
         </span>
@@ -47,6 +59,10 @@ export default {
     card3: () => import('./parts/card-3.vue'),
     card4: () => import('./parts/card-4.vue'),
     card5: () => import('./parts/card-5.vue'),
+    card6: () => import('./parts/card-5.vue'),
+    card7: () => import('./parts/card-7.vue'),
+    card8: () => import('./parts/card-8.vue'),
+    card9: () => import('./parts/card-9.vue'),
     detail_order: () => import('./parts/detail/detail_order.vue'),
     detail_orderDetail: () => import('./parts/detail/detail_orderDetail.vue'),
     detail_sales_order: () => import('./parts/detail/detail_sales_order.vue'),

+ 98 - 0
src/views/selfShop/order/parts/card-6.vue

@@ -0,0 +1,98 @@
+<template>
+  <div id="card-1">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <search-1 :form="searchForm" @onSubmit="search" @toReset="toClose"></search-1>
+        </el-col>
+        <data-table :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @detail="toDetail" @sales="toSales"> </data-table>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('orderDetail');
+
+export default {
+  name: 'card-1',
+  props: { statusList: { type: Array } },
+  components: { search1: () => import('./search-1.vue') },
+  data: function () {
+    return {
+      searchForm: {},
+      list: [],
+      total: 0,
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
+      fields: [
+        { label: '订单号', model: 'no', showTip: false },
+        { label: '下单时间', model: 'buy_time' },
+        { label: '顾客', model: 'customer.name' },
+        { label: '收货人', model: 'address', showTip: false, format: (i) => this.getAddress(i) },
+        { label: '支付金额', model: 'real_pay' },
+        { label: '商品数量', model: 'buy_num_total' },
+        { label: '是否售后', model: 'is_afterSale', format: (i) => (i === true ? '该订单有商品申请售后' : '未申请售后') },
+      ],
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
+    // 查询
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
+      let condition = _.cloneDeep(this.searchForm);
+      if (condition.buy_time) {
+        condition[`buy_time@start`] = _.head(condition.buy_time);
+        condition[`buy_time@end`] = _.last(condition.buy_time);
+        delete condition.buy_time;
+      }
+      info.status = '-1';
+      let res = await this.query({ skip, limit, ...condition, ...info, shop: this.user.shop.id });
+      if (this.$checkRes(res)) {
+        this.$set(this, 'list', res.data);
+        this.$set(this, 'total', res.total);
+      }
+    },
+    getAddress(i) {
+      let name = i.name + ',' + i.phone;
+      return name;
+    },
+    toDetail({ data }) {
+      this.$emit('toDetails', data._id);
+    },
+    toSales({ data }) {
+      this.$emit('toSaless', { id: data._id, status: '2-' });
+    },
+    toClose() {
+      this.searchForm = {};
+      this.search();
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.one {
+  margin: 0 0 10px 0;
+}
+</style>

+ 98 - 0
src/views/selfShop/order/parts/card-7.vue

@@ -0,0 +1,98 @@
+<template>
+  <div id="card-1">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <search-1 :form="searchForm" @onSubmit="search" @toReset="toClose"></search-1>
+        </el-col>
+        <data-table :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @detail="toDetail" @sales="toSales"> </data-table>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('orderDetail');
+
+export default {
+  name: 'card-1',
+  props: { statusList: { type: Array } },
+  components: { search1: () => import('./search-1.vue') },
+  data: function () {
+    return {
+      searchForm: {},
+      list: [],
+      total: 0,
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
+      fields: [
+        { label: '订单号', model: 'no', showTip: false },
+        { label: '下单时间', model: 'buy_time' },
+        { label: '顾客', model: 'customer.name' },
+        { label: '收货人', model: 'address', showTip: false, format: (i) => this.getAddress(i) },
+        { label: '支付金额', model: 'real_pay' },
+        { label: '商品数量', model: 'buy_num_total' },
+        { label: '是否售后', model: 'is_afterSale', format: (i) => (i === true ? '该订单有商品申请售后' : '未申请售后') },
+      ],
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
+    // 查询
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
+      let condition = _.cloneDeep(this.searchForm);
+      if (condition.buy_time) {
+        condition[`buy_time@start`] = _.head(condition.buy_time);
+        condition[`buy_time@end`] = _.last(condition.buy_time);
+        delete condition.buy_time;
+      }
+      info.status = '-2';
+      let res = await this.query({ skip, limit, ...condition, ...info, shop: this.user.shop.id });
+      if (this.$checkRes(res)) {
+        this.$set(this, 'list', res.data);
+        this.$set(this, 'total', res.total);
+      }
+    },
+    getAddress(i) {
+      let name = i.name + ',' + i.phone;
+      return name;
+    },
+    toDetail({ data }) {
+      this.$emit('toDetails', data._id);
+    },
+    toSales({ data }) {
+      this.$emit('toSaless', { id: data._id, status: '2-' });
+    },
+    toClose() {
+      this.searchForm = {};
+      this.search();
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.one {
+  margin: 0 0 10px 0;
+}
+</style>

+ 98 - 0
src/views/selfShop/order/parts/card-8.vue

@@ -0,0 +1,98 @@
+<template>
+  <div id="card-1">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <search-1 :form="searchForm" @onSubmit="search" @toReset="toClose"></search-1>
+        </el-col>
+        <data-table :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @detail="toDetail" @sales="toSales"> </data-table>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('orderDetail');
+
+export default {
+  name: 'card-1',
+  props: { statusList: { type: Array } },
+  components: { search1: () => import('./search-1.vue') },
+  data: function () {
+    return {
+      searchForm: {},
+      list: [],
+      total: 0,
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
+      fields: [
+        { label: '订单号', model: 'no', showTip: false },
+        { label: '下单时间', model: 'buy_time' },
+        { label: '顾客', model: 'customer.name' },
+        { label: '收货人', model: 'address', showTip: false, format: (i) => this.getAddress(i) },
+        { label: '支付金额', model: 'real_pay' },
+        { label: '商品数量', model: 'buy_num_total' },
+        { label: '是否售后', model: 'is_afterSale', format: (i) => (i === true ? '该订单有商品申请售后' : '未申请售后') },
+      ],
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
+    // 查询
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
+      let condition = _.cloneDeep(this.searchForm);
+      if (condition.buy_time) {
+        condition[`buy_time@start`] = _.head(condition.buy_time);
+        condition[`buy_time@end`] = _.last(condition.buy_time);
+        delete condition.buy_time;
+      }
+      info.status = '-3';
+      let res = await this.query({ skip, limit, ...condition, ...info, shop: this.user.shop.id });
+      if (this.$checkRes(res)) {
+        this.$set(this, 'list', res.data);
+        this.$set(this, 'total', res.total);
+      }
+    },
+    getAddress(i) {
+      let name = i.name + ',' + i.phone;
+      return name;
+    },
+    toDetail({ data }) {
+      this.$emit('toDetails', data._id);
+    },
+    toSales({ data }) {
+      this.$emit('toSaless', { id: data._id, status: '2-' });
+    },
+    toClose() {
+      this.searchForm = {};
+      this.search();
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.one {
+  margin: 0 0 10px 0;
+}
+</style>

+ 98 - 0
src/views/selfShop/order/parts/card-9.vue

@@ -0,0 +1,98 @@
+<template>
+  <div id="card-1">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <search-1 :form="searchForm" @onSubmit="search" @toReset="toClose"></search-1>
+        </el-col>
+        <data-table :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @detail="toDetail" @sales="toSales"> </data-table>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('orderDetail');
+
+export default {
+  name: 'card-1',
+  props: { statusList: { type: Array } },
+  components: { search1: () => import('./search-1.vue') },
+  data: function () {
+    return {
+      searchForm: {},
+      list: [],
+      total: 0,
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
+      fields: [
+        { label: '订单号', model: 'no', showTip: false },
+        { label: '下单时间', model: 'buy_time' },
+        { label: '顾客', model: 'customer.name' },
+        { label: '收货人', model: 'address', showTip: false, format: (i) => this.getAddress(i) },
+        { label: '支付金额', model: 'real_pay' },
+        { label: '商品数量', model: 'buy_num_total' },
+        { label: '是否售后', model: 'is_afterSale', format: (i) => (i === true ? '该订单有商品申请售后' : '未申请售后') },
+      ],
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
+    // 查询
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
+      let condition = _.cloneDeep(this.searchForm);
+      if (condition.buy_time) {
+        condition[`buy_time@start`] = _.head(condition.buy_time);
+        condition[`buy_time@end`] = _.last(condition.buy_time);
+        delete condition.buy_time;
+      }
+      info.status = '-4';
+      let res = await this.query({ skip, limit, ...condition, ...info, shop: this.user.shop.id });
+      if (this.$checkRes(res)) {
+        this.$set(this, 'list', res.data);
+        this.$set(this, 'total', res.total);
+      }
+    },
+    getAddress(i) {
+      let name = i.name + ',' + i.phone;
+      return name;
+    },
+    toDetail({ data }) {
+      this.$emit('toDetails', data._id);
+    },
+    toSales({ data }) {
+      this.$emit('toSaless', { id: data._id, status: '2-' });
+    },
+    toClose() {
+      this.searchForm = {};
+      this.search();
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.one {
+  margin: 0 0 10px 0;
+}
+</style>