Explorar el Código

添加菜单,修改状态

YY hace 2 años
padre
commit
688cc0e76a

+ 6 - 0
src/layout/data/menu.js

@@ -96,6 +96,12 @@ export const adminMenu = [
         name: '账单管理',
         index: '4-2',
       },
+      {
+        icon: 'icon-rencai',
+        path: '/platfinance/withdrawal',
+        name: '提现审核',
+        index: '4-3',
+      },
     ],
   },
   {

+ 14 - 8
src/router/module/platfinance.js

@@ -1,14 +1,20 @@
 export default [
   {
-    path: '/platfinance/statistics',
-    name: 'platfinance_statistics',
-    meta: { title: '平台管理-统计' },
-    component: () => import('@/views/platfinance/statistics/index.vue'),
+    path: "/platfinance/statistics",
+    name: "platfinance_statistics",
+    meta: { title: "平台管理-统计" },
+    component: () => import("@/views/platfinance/statistics/index.vue"),
   },
   {
-    path: '/platfinance/bill',
-    name: 'platfinance_bill',
-    meta: { title: '平台管理-账单管理' },
-    component: () => import('@/views/platfinance/bill/index.vue'),
+    path: "/platfinance/bill",
+    name: "platfinance_bill",
+    meta: { title: "平台管理-账单管理" },
+    component: () => import("@/views/platfinance/bill/index.vue"),
+  },
+  {
+    path: "/platfinance/withdrawal",
+    name: "platfinance_withdrawal",
+    meta: { title: "平台管理-提现审核" },
+    component: () => import("@/views/platfinance/withdrawal/index.vue"),
   },
 ];

+ 36 - 0
src/views/platfinance/withdrawal/index.vue

@@ -0,0 +1,36 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main"> test </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 53 - 28
src/views/platmanag/sales/detail.vue

@@ -52,13 +52,21 @@
             <el-col :span="6">售后描述</el-col>
             <el-col :span="18" class="other">{{ info.desc }}</el-col>
           </el-col>
+          <el-col>
+            <el-button type="primary" @click="toStatus('1')" v-if="info.type == '0' && info.status == '0'"> 正在处理退款 </el-button>
+            <el-button type="primary" @click="toStatus('-1')" v-if="info.type == '0' && info.status == '1'"> 已退款 </el-button>
+            <el-button type="primary" @click="toStatus('2')" v-if="info.type == '1' && info.status == '0'"> 正在处理退货 </el-button>
+            <el-button type="primary" @click="toStatus('-2')" v-if="info.type == '1' && info.status == '2'"> 已退货 </el-button>
+            <el-button type="primary" @click="toStatus('3')" v-if="info.type == '2' && info.status == '0'"> 正在处理换货 </el-button>
+            <el-button type="primary" @click="toStatus('-3')" v-if="info.type == '2' && info.status == '3'"> 已换货 </el-button>
+          </el-col>
           <el-col :span="24">
             <el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
-              <el-form-item label="售后状态" prop="status">
+              <!-- <el-form-item label="售后状态" prop="status">
                 <el-select v-model="form.status" clearable filterable placeholder="请选择" style="width: 100%" size="small">
                   <el-option v-for="i in status" :key="i.label" :label="i.label" :value="i.value"></el-option>
                 </el-select>
-              </el-form-item>
+              </el-form-item> -->
               <el-form-item label="寄出运单号" prop="shop_transport_no" v-if="info.type == '2' && !transport.shop_transport_no">
                 <el-input v-model="form.shop_transport_no" placeholder="请输入运单号,快递类型,同时填入" size="small"></el-input>
               </el-form-item>
@@ -142,33 +150,50 @@ export default {
         this.$set(this, `goods`, res.data.goods.goods);
         // 规格
         this.$set(this, `good`, res.data.goods);
-        this.getStatusList();
+        // this.getStatusList();
       }
     },
-    async getStatusList() {
-      let form = this.info;
-      let e = this.statusList;
-      let list = [];
-      if (form.type == '0') {
-        for (const val of e) {
-          if (val.value == '0' || val.value == '1' || val.value == '-1') {
-            list.push(val);
-          }
-        }
-      } else if (form.type == '1') {
-        for (const val of e) {
-          if (val.value == '0' || val.value == '2' || val.value == '-2') {
-            list.push(val);
-          }
+    // async getStatusList() {
+    //   let form = this.info;
+    //   let e = this.statusList;
+    //   let list = [];
+    //   if (form.type == '0') {
+    //     for (const val of e) {
+    //       if (val.value == '0' || val.value == '1' || val.value == '-1') {
+    //         list.push(val);
+    //       }
+    //     }
+    //   } else if (form.type == '1') {
+    //     for (const val of e) {
+    //       if (val.value == '0' || val.value == '2' || val.value == '-2') {
+    //         list.push(val);
+    //       }
+    //     }
+    //   } else {
+    //     for (const val of e) {
+    //       if (val.value == '0' || val.value == '3' || val.value == '-3') {
+    //         list.push(val);
+    //       }
+    //     }
+    //   }
+    //   this.$set(this, `status`, list);
+    // },
+    // 修改状态
+    async toStatus(val) {
+      this.$confirm('是否确认修改订单状态', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(async () => {
+        let form = this.info;
+        form.status = val;
+        let res;
+        if (form.id) res = await this.update(form);
+        if (this.$checkRes(res)) {
+          this.$message({ type: `success`, message: `维护信息成功` });
+          this.search();
         }
-      } else {
-        for (const val of e) {
-          if (val.value == '0' || val.value == '3' || val.value == '-3') {
-            list.push(val);
-          }
-        }
-      }
-      this.$set(this, `status`, list);
+      });
     },
     // 提交
     async onSubmit() {
@@ -177,7 +202,7 @@ export default {
       let transport = {};
       let res;
       if (form.end_time) info.end_time = form.end_time;
-      if (form.status) info.status = form.status;
+      // if (form.status) info.status = form.status;
       if (form.shop_transport_no && form.shop_transport_type) {
         transport.shop_transport_no = form.shop_transport_no;
         transport.shop_transport_type = form.shop_transport_type;
@@ -186,7 +211,7 @@ export default {
       if (info.id) res = await this.update(info);
       if (this.$checkRes(res)) {
         this.$message({ type: `success`, message: `维护信息成功` });
-        this.toBack();
+        this.search();
       }
     },
     // 查询其他信息

+ 53 - 28
src/views/selfShop/sales/detail.vue

@@ -52,13 +52,21 @@
             <el-col :span="6">售后描述</el-col>
             <el-col :span="18" class="other">{{ info.desc }}</el-col>
           </el-col>
+          <el-col>
+            <el-button type="primary" @click="toStatus('1')" v-if="info.type == '0' && info.status == '0'"> 正在处理退款 </el-button>
+            <el-button type="primary" @click="toStatus('-1')" v-if="info.type == '0' && info.status == '1'"> 已退款 </el-button>
+            <el-button type="primary" @click="toStatus('2')" v-if="info.type == '1' && info.status == '0'"> 正在处理退货 </el-button>
+            <el-button type="primary" @click="toStatus('-2')" v-if="info.type == '1' && info.status == '2'"> 已退货 </el-button>
+            <el-button type="primary" @click="toStatus('3')" v-if="info.type == '2' && info.status == '0'"> 正在处理换货 </el-button>
+            <el-button type="primary" @click="toStatus('-3')" v-if="info.type == '2' && info.status == '3'"> 已换货 </el-button>
+          </el-col>
           <el-col :span="24">
             <el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
-              <el-form-item label="售后状态" prop="status">
+              <!-- <el-form-item label="售后状态" prop="status">
                 <el-select v-model="form.status" clearable filterable placeholder="请选择" style="width: 100%" size="small">
                   <el-option v-for="i in status" :key="i.label" :label="i.label" :value="i.value"></el-option>
                 </el-select>
-              </el-form-item>
+              </el-form-item> -->
               <el-form-item label="寄出运单号" prop="shop_transport_no" v-if="info.type == '2' && !transport.shop_transport_no">
                 <el-input v-model="form.shop_transport_no" placeholder="请输入运单号,快递类型,同时填入" size="small"></el-input>
               </el-form-item>
@@ -142,33 +150,50 @@ export default {
         this.$set(this, `goods`, res.data.goods.goods);
         // 规格
         this.$set(this, `good`, res.data.goods);
-        this.getStatusList();
+        // this.getStatusList();
       }
     },
-    async getStatusList() {
-      let form = this.info;
-      let e = this.statusList;
-      let list = [];
-      if (form.type == '0') {
-        for (const val of e) {
-          if (val.value == '0' || val.value == '1' || val.value == '-1') {
-            list.push(val);
-          }
-        }
-      } else if (form.type == '1') {
-        for (const val of e) {
-          if (val.value == '0' || val.value == '2' || val.value == '-2') {
-            list.push(val);
-          }
+    // async getStatusList() {
+    //   let form = this.info;
+    //   let e = this.statusList;
+    //   let list = [];
+    //   if (form.type == '0') {
+    //     for (const val of e) {
+    //       if (val.value == '0' || val.value == '1' || val.value == '-1') {
+    //         list.push(val);
+    //       }
+    //     }
+    //   } else if (form.type == '1') {
+    //     for (const val of e) {
+    //       if (val.value == '0' || val.value == '2' || val.value == '-2') {
+    //         list.push(val);
+    //       }
+    //     }
+    //   } else {
+    //     for (const val of e) {
+    //       if (val.value == '0' || val.value == '3' || val.value == '-3') {
+    //         list.push(val);
+    //       }
+    //     }
+    //   }
+    //   this.$set(this, `status`, list);
+    // },
+    // 修改状态
+    async toStatus(val) {
+      this.$confirm('是否确认修改订单状态', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(async () => {
+        let form = this.info;
+        form.status = val;
+        let res;
+        if (form.id) res = await this.update(form);
+        if (this.$checkRes(res)) {
+          this.$message({ type: `success`, message: `维护信息成功` });
+          this.search();
         }
-      } else {
-        for (const val of e) {
-          if (val.value == '0' || val.value == '3' || val.value == '-3') {
-            list.push(val);
-          }
-        }
-      }
-      this.$set(this, `status`, list);
+      });
     },
     // 提交
     async onSubmit() {
@@ -177,7 +202,7 @@ export default {
       let transport = {};
       let res;
       if (form.end_time) info.end_time = form.end_time;
-      if (form.status) info.status = form.status;
+      // if (form.status) info.status = form.status;
       if (form.shop_transport_no && form.shop_transport_type) {
         transport.shop_transport_no = form.shop_transport_no;
         transport.shop_transport_type = form.shop_transport_type;
@@ -186,7 +211,7 @@ export default {
       if (info.id) res = await this.update(info);
       if (this.$checkRes(res)) {
         this.$message({ type: `success`, message: `维护信息成功` });
-        this.toBack();
+        this.search();
       }
     },
     // 查询其他信息