YY 2 anni fa
parent
commit
5a1323b73d

+ 2 - 0
src/store/index.js

@@ -38,6 +38,7 @@ import coupon from './module/trade/coupon';
 
 import zrGoods from './module/zr/zrGoods';
 import zrOrder from './module/zr/zrOrder';
+import zrSot from './module/zr/zrSot';
 
 Vue.use(Vuex);
 
@@ -76,5 +77,6 @@ export default new Vuex.Store({
     admins,
     zrGoods,
     zrOrder,
+    zrSot,
   },
 });

+ 44 - 0
src/store/module/zr/zrSot.js

@@ -0,0 +1,44 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+const _ = require('lodash');
+Vue.use(Vuex);
+const api = {
+  url: '/point/zr/v1/api/zrOrder/sot',
+};
+
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.url}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.url}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.url}/${payload}`);
+    return res;
+  },
+  async update({ commit }, payload) {
+    const id = _.get(payload, 'id', _.get(payload, '_id'));
+    const res = await this.$axios.$post(`${api.url}/${id}`, payload);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.url}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 2 - 6
src/views/zr/zrOrder/detail_orderDetail.vue

@@ -49,10 +49,6 @@
             <el-col :span="6">下单时间</el-col>
             <el-col :span="18" class="other">{{ form.buy_time }}</el-col>
           </el-col>
-          <el-col :span="24" class="bode">
-            <el-col :span="6">支付时间</el-col>
-            <el-col :span="18" class="other">{{ form.pay_time }}</el-col>
-          </el-col>
           <el-col :span="24" class="bode">
             <el-col :span="6">寄出运单号</el-col>
             <el-col :span="18" class="other">{{ transport.shop_transport_no || '暂无单号' }}</el-col>
@@ -129,7 +125,7 @@ const moment = require('moment');
 import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
 const { mapActions } = createNamespacedHelpers('zrOrder');
 const { mapActions: dictData } = createNamespacedHelpers('dictData');
-const { mapActions: sot } = createNamespacedHelpers('sot');
+const { mapActions: sot } = createNamespacedHelpers('zrSot');
 
 export default {
   name: 'form-1',
@@ -222,7 +218,7 @@ export default {
       if (form.id) res = await this.update(form);
       if (this.$checkRes(res)) {
         this.$message({ type: `success`, message: `维护信息成功` });
-        this.toBack();
+        this.search();
       }
     },
     // 返回

+ 9 - 0
src/views/zr/zrOrder/parts/detail-1.vue

@@ -50,6 +50,15 @@ export default {
         { label: '顾客', model: 'customer.name' },
         { label: '店铺名称', model: 'shop.name' },
         { label: '兑换数量', model: 'buy_num' },
+        {
+          label: '订单状态',
+          model: 'status',
+          format: (i) => {
+            let data = this.statusList.find((f) => f.value == i);
+            if (data) return data.label;
+            else return '暂无';
+          },
+        },
       ],
       // 多选值
       selected: [],