Pārlūkot izejas kodu

平台------发货提醒,售后提醒

YY 2 gadi atpakaļ
vecāks
revīzija
1574e75060

+ 1 - 1
src/components/orderParts/card-1.vue

@@ -6,7 +6,7 @@
         <el-col :span="24" class="one">
           <search-1 :form="searchForm" @onSubmit="toSearch" @querySearch="querySearch" @toReset="toClose" :shopList="shopList"> </search-1>
         </el-col>
-        <data-table ref="dataTable" :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @detail="toDetail" @sales="toSales">
+        <data-table ref="dataTable" :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @detail="toDetail" @sales="toSales" >
         </data-table>
       </el-col>
     </el-row>

+ 2 - 0
src/components/orderParts/parts/detail-1.vue

@@ -80,6 +80,7 @@ export default {
   },
   methods: {
     ...shop({ shopQuery: 'query' }),
+
     ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
     toSearch() {
       this.$refs.dataTable.resetPage();
@@ -106,6 +107,7 @@ export default {
       }
       this.loadings = false;
     },
+
     getAddress(i) {
       let name = i.name + ',' + i.phone;
       return name;

+ 2 - 0
src/store/index.js

@@ -42,6 +42,7 @@ import serviceContact from './module/shop/serviceContact';
 import goodsSpec from './module/shop/goodsSpec';
 import afterSale from './module/shop/afterSale';
 import getTransportInfo from './module/shop/getTransportInfo';
+import shopNotice from './module/shop/shopNotice';
 import goodsRate from './module/shop/goodsRate';
 
 // 订单
@@ -119,5 +120,6 @@ export default new Vuex.Store({
     msgList,
     shopCashOut,
     getBill,
+    shopNotice,
   },
 });

+ 53 - 0
src/store/module/shop/shopNotice.js

@@ -0,0 +1,53 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+const _ = require('lodash');
+Vue.use(Vuex);
+const api = {
+  url: '/point/v1/api/shopNotice',
+};
+
+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 rts({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.url}/rts`, payload);
+    return res;
+  },
+  async rtas({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.url}/rtas`, 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,
+};

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

@@ -29,7 +29,17 @@
                 <el-col :span="24" class="one">
                   <search-1 :form="searchForm" @onSubmit="toSearch" @querySearch="querySearch" @toReset="toClose" :shopList="shopList"> </search-1>
                 </el-col>
-                <data-table ref="dataTable" :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @detail="toDetails" @sales="toSaless">
+                <data-table
+                  ref="dataTable"
+                  :fields="fields"
+                  :opera="opera"
+                  @query="search"
+                  :data="list"
+                  :total="total"
+                  @detail="toDetails"
+                  @sales="toSaless"
+                  @order="toOrder"
+                >
                   <template #is_afterSale="{ row }">
                     <span :style="{ color: row.is_afterSale === true ? 'red' : '' }">
                       {{ row.is_afterSale === true ? '该订单有商品申请售后' : '未申请售后' }}
@@ -55,6 +65,8 @@ import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
 const { mapActions: dictData } = createNamespacedHelpers('dictData');
 const { mapActions: shop } = createNamespacedHelpers('shop');
 const { mapActions } = createNamespacedHelpers('orderDetail');
+const { mapActions: shopNotice } = createNamespacedHelpers('shopNotice');
+
 export default {
   name: 'index',
   props: {},
@@ -86,6 +98,7 @@ export default {
       opera: [
         { label: '详情', method: 'detail' },
         { label: '售后', method: 'sales', type: 'danger', display: (i) => i.status == '1' || i.status == '2' || i.status == '2-' || i.status == '3' },
+        { label: '提醒发货', method: 'order', type: 'warning', display: (i) => i.status == '1' },
       ],
       fields: [
         { label: '订单号', model: 'no', showTip: false },
@@ -107,6 +120,7 @@ export default {
   methods: {
     ...dictData({ dictQuery: 'query' }),
     ...shop({ shopQuery: 'query' }),
+    ...shopNotice({ shopRts: 'rts' }),
     ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
     toSearch() {
       this.$refs.dataTable.resetPage();
@@ -139,6 +153,20 @@ export default {
       }
       this.loadings = false;
     },
+    toOrder({ data }) {
+      let info = { source_id: data._id };
+      this.$confirm('是否确认提醒发货', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(async () => {
+        let res = await this.shopRts(info);
+        if (this.$checkRes(res)) {
+          this.$message({ type: `success`, message: `提醒发货成功` });
+          this.search();
+        }
+      });
+    },
     // 未付款
     toDetail(val) {
       this.$set(this, `order_id`, val);

+ 23 - 2
src/views/platmanag/sales/index.vue

@@ -14,7 +14,8 @@
             <search-1 :form="searchForm" :statusList="statusList" :typeList="typeList" @onSubmit="toSearch" @toReset="toClose"> </search-1>
           </el-col>
           <el-col :span="24" class="four">
-            <data-table ref="dataTable" :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @exam="toExam"> </data-table>
+            <data-table ref="dataTable" :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @exam="toExam" @sales="toSales">
+            </data-table>
           </el-col>
         </span>
         <detail v-if="view === 'order'" :id="id" @toBack="toBack"></detail>
@@ -28,6 +29,8 @@ const _ = require('lodash');
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions } = createNamespacedHelpers('afterSale');
 const { mapActions: dictData } = createNamespacedHelpers('dictData');
+const { mapActions: shopNotice } = createNamespacedHelpers('shopNotice');
+
 export default {
   name: 'card-1',
   props: {},
@@ -43,7 +46,10 @@ export default {
       searchForm: {},
       list: [],
       total: 0,
-      opera: [{ label: '审核', method: 'exam' }],
+      opera: [
+        { label: '审核', method: 'exam' },
+        { label: '提醒售后', method: 'sales', type: 'warning' },
+      ],
       fields: [
         { label: '顾客', model: 'customer.name', showTip: false },
         { label: '订单号', model: 'order_detail.no', showTip: false },
@@ -83,6 +89,7 @@ export default {
   },
   methods: {
     ...dictData({ dictQuery: 'query' }),
+    ...shopNotice({ shopRtas: 'rtas' }),
     ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
     toSearch() {
       this.$refs.dataTable.resetPage();
@@ -101,6 +108,20 @@ export default {
       }
       this.loadings = false;
     },
+    toSales({ data }) {
+      let info = { source_id: data._id };
+      this.$confirm('是否确认提醒售后', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(async () => {
+        let res = await this.shopRtas(info);
+        if (this.$checkRes(res)) {
+          this.$message({ type: `success`, message: `提醒售后成功` });
+          this.search();
+        }
+      });
+    },
     toExam({ data }) {
       this.$set(this, `id`, data.id);
       this.$set(this, `view`, 'order');