Kaynağa Gözat

平台财务-提现审核

YY 2 yıl önce
ebeveyn
işleme
df506485e9

+ 2 - 0
src/store/index.js

@@ -34,6 +34,7 @@ import order from './module/trade/order';
 import orderDetail from './module/trade/orderDetail';
 import sot from './module/trade/sot';
 import coupon from './module/trade/coupon';
+import cashOut from './module/trade/cashOut';
 
 import zrGoods from './module/zr/zrGoods';
 import zrOrder from './module/zr/zrOrder';
@@ -73,6 +74,7 @@ export default new Vuex.Store({
     getBill,
     outBill,
     admins,
+    cashOut,
     zrGoods,
     zrOrder,
     zrSot,

+ 44 - 0
src/store/module/trade/cashOut.js

@@ -0,0 +1,44 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+const _ = require('lodash');
+Vue.use(Vuex);
+const api = {
+  url: '/point/v1/api/cashOut',
+};
+
+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,
+};

+ 120 - 8
src/views/platfinance/withdrawal/index.vue

@@ -1,22 +1,127 @@
 <template>
-  <div id="index">
+  <div id="card-1">
     <el-row>
-      <el-col :span="24" class="main"> test </el-col>
+      <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="two">
+          <search-1 :form="searchForm" :statusList="statusList" @onSubmit="search" @toReset="toClos"> </search-1>
+        </el-col>
+        <el-col :span="24" class="four">
+          <data-table :fields="fields" :opera="opera" @query="search" :data="list" :total="total" @exam="toExam"> </data-table>
+        </el-col>
+      </el-col>
     </el-row>
+    <e-dialog :dialog="dialog" @toClose="toClose">
+      <template v-slot:info>
+        <data-form :span="24" :fields="fieldsForm" :rules="fieldRules" v-model="fieldform" labelWidth="150px" @save="onSubmit">
+          <template #status>
+            <el-option v-for="i in statusList" :key="i.model" :label="i.label" :value="i.value"></el-option>
+          </template>
+        </data-form>
+      </template>
+    </e-dialog>
   </div>
 </template>
 
 <script>
+const _ = require('lodash');
+const moment = require('moment');
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('cashOut');
+const { mapActions: dictData } = createNamespacedHelpers('dictData');
 export default {
-  name: 'index',
+  name: 'card-1',
   props: {},
-  components: {},
+  components: { search1: () => import('./parts/search-1.vue') },
   data: function () {
-    return {};
+    const that = this;
+    return {
+      searchForm: {},
+      list: [],
+      total: 0,
+      opera: [{ label: '审核', method: 'exam' }],
+      fields: [
+        { label: '申请人姓名', model: 'customer.name' },
+        { label: '提现金额', model: 'money' },
+        { label: '申请时间', model: 'apply_time' },
+        {
+          label: '审核状态',
+          model: 'status',
+          format: (i) => {
+            let data = this.statusList.find((f) => f.value == i);
+            if (data) return data.label;
+            else return '暂无';
+          },
+        },
+        { label: '审核处理人', model: 'deal_person.name' },
+        { label: '审核时间', model: 'exam_time' },
+      ],
+      statusList: [],
+      // 弹框
+      dialog: { title: '信息管理', show: false, type: '1' },
+      fieldform: {},
+      fieldsForm: [
+        { label: '申请理由', model: 'apply_reason', readonly: true },
+        { label: '是否通过', model: 'status', type: 'select' },
+        { label: '审核理由', model: 'exam_reason', type: 'textarea' },
+      ],
+      fieldRules: {
+        status: [{ required: true, message: '请选择是否通过', trigger: 'change' }],
+        exam_reason: [{ required: true, message: '请输入审核理由', trigger: 'blur' }],
+      },
+    };
+  },
+  async created() {
+    await this.search();
+    await this.searchOther();
+  },
+  methods: {
+    ...dictData({ dictQuery: 'query' }),
+    ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
+    // 查询
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
+      let condition = _.cloneDeep(this.searchForm);
+      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);
+      }
+    },
+    toExam({ data }) {
+      this.$set(this, 'fieldform', data);
+      this.dialog = { title: '信息管理', show: true, type: '1' };
+    },
+    // 保存
+    async onSubmit({ data }) {
+      data.exam_time = moment().format('YYYY-MM-DD HH:mm:ss');
+      let res;
+      if (data.id) res = await this.update(data);
+      else res = await this.create(data);
+      if (this.$checkRes(res)) {
+        this.$message({ type: `success`, message: `维护信息成功` });
+        this.toClose();
+      }
+    },
+    // 关闭
+    toClose() {
+      this.fieldform = {};
+      this.dialog = { title: '信息管理', show: false, type: '1' };
+      this.search();
+    },
+    toClos() {
+      this.searchForm = {};
+      this.search();
+    },
+    // 查询其他信息
+    async searchOther() {
+      let res;
+      // 提现审核状态
+      res = await this.dictQuery({ code: 'withdrawal_exam_status' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `statusList`, res.data);
+      }
+    },
   },
-  created() {},
-  methods: {},
   computed: {
     ...mapState(['user']),
   },
@@ -33,4 +138,11 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.one {
+  margin: 0 0 10px 0;
+}
+.two {
+  margin: 0 0 10px 0;
+}
+</style>

+ 67 - 0
src/views/platfinance/withdrawal/parts/search-1.vue

@@ -0,0 +1,67 @@
+<template>
+  <div id="search-1">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-form :model="form" ref="form" label-width="130px">
+          <el-col :span="6">
+            <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 statusList" :key="i.label" :label="i.label" :value="i.value"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24" class="btn">
+            <el-button type="primary" icon="el-icon-search" size="mini" @click="onSubmit('form')">搜索</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="toReset('form')">重置</el-button>
+          </el-col>
+        </el-form>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'search-1',
+  props: { form: { type: Object }, statusList: { type: Array } },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    onSubmit() {
+      this.$emit('onSubmit');
+    },
+    toReset(formName) {
+      this.$refs[formName].resetFields();
+      this.$emit('toReset');
+    },
+  },
+  computed: {},
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .btn {
+    text-align: right;
+  }
+  /deep/.el-form-item {
+    float: left;
+    width: 100%;
+    margin: 0 0 10px 0;
+  }
+}
+</style>

+ 21 - 33
src/views/platmanag/sales/detail.vue

@@ -53,12 +53,27 @@
             <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-button type="primary" @click="toStatus()">
+              {{
+                info.type == '1' && info.status == '0'
+                  ? '正在处理退款'
+                  : info.type == '1' && info.status == '1'
+                  ? '已退款'
+                  : info.type == '2' && info.status == '0'
+                  ? '正在处理退货'
+                  : info.type == '2' && info.status == '2'
+                  ? '已退货'
+                  : info.type == '3' && info.status == '0'
+                  ? '正在处理换货'
+                  : '已换货'
+              }}
+            </el-button> -->
+            <el-button type="primary" @click="toStatus('1')" v-if="info.type == '1' && info.status == '0'"> 正在处理退款 </el-button>
+            <el-button type="primary" @click="toStatus('-1')" v-if="info.type == '1' && info.status == '1'"> 已退款 </el-button>
+            <el-button type="primary" @click="toStatus('2')" v-if="info.type == '2' && info.status == '0'"> 正在处理退货 </el-button>
+            <el-button type="primary" @click="toStatus('-2')" v-if="info.type == '2' && info.status == '2'"> 已退货 </el-button>
+            <el-button type="primary" @click="toStatus('3')" v-if="info.type == '3' && info.status == '0'"> 正在处理换货 </el-button>
+            <el-button type="primary" @click="toStatus('-3')" v-if="info.type == '3' && info.status == '3'"> 已换货 </el-button>
           </el-col>
           <el-col :span="24">
             <el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
@@ -150,34 +165,8 @@ export default {
         this.$set(this, `goods`, res.data.goods.goods);
         // 规格
         this.$set(this, `good`, res.data.goods);
-        // 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);
-    //       }
-    //     }
-    //   } 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('是否确认修改订单状态', '提示', {
@@ -202,7 +191,6 @@ 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.shop_transport_no && form.shop_transport_type) {
         transport.shop_transport_no = form.shop_transport_no;
         transport.shop_transport_type = form.shop_transport_type;

+ 1 - 1
src/views/selfShop/bill/index.vue

@@ -74,7 +74,7 @@ export default {
     ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
     ...outBill({ outQuery: 'query', outCreate: 'create' }),
     // 查询
-    async search({ skip = 0,limit = this.$limit, ...info } = {}) {
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
       let condition = _.cloneDeep(this.searchForm);
       if (condition.buy_time) {
         condition[`start`] = _.head(condition.buy_time);

+ 6 - 6
src/views/selfShop/sales/detail.vue

@@ -53,12 +53,12 @@
             <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-button type="primary" @click="toStatus('1')" v-if="info.type == '1' && info.status == '0'"> 正在处理退款 </el-button>
+            <el-button type="primary" @click="toStatus('-1')" v-if="info.type == '1' && info.status == '1'"> 已退款 </el-button>
+            <el-button type="primary" @click="toStatus('2')" v-if="info.type == '2' && info.status == '0'"> 正在处理退货 </el-button>
+            <el-button type="primary" @click="toStatus('-2')" v-if="info.type == '2' && info.status == '2'"> 已退货 </el-button>
+            <el-button type="primary" @click="toStatus('3')" v-if="info.type == '3' && info.status == '0'"> 正在处理换货 </el-button>
+            <el-button type="primary" @click="toStatus('-3')" v-if="info.type == '3' && info.status == '3'"> 已换货 </el-button>
           </el-col>
           <el-col :span="24">
             <el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">