zhangdan 3 年之前
父节点
当前提交
9af7423dc1

+ 29 - 4
src/config/router.config.js

@@ -153,7 +153,7 @@ export const asyncRouterMap = [
                   title: '待结算明细',
                   icon: 'monitor',
                   hidden: true,
-                  replaceTab: true,
+                  replaceTab: true
                   // permission: 'M_salesQueryList'
                 }
               },
@@ -165,7 +165,32 @@ export const asyncRouterMap = [
                   title: '结算历史',
                   icon: 'monitor',
                   hidden: true,
-                  replaceTab: true,
+                  replaceTab: true
+                  // permission: 'M_salesQueryList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/numsGoodsShelves/withdrawalManagement',
+            redirect: '/numsGoodsShelves/withdrawalManagement/list',
+            name: 'withdrawalManagement',
+            component: BlankLayout,
+            meta: {
+              title: '提现管理',
+              icon: 'monitor'
+              // permission: 'M_salesQueryList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'withdrawalManagementList',
+                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/withdrawalManagement/list.vue'),
+                meta: {
+                  title: '提现管理列表',
+                  icon: 'monitor',
+                  hidden: true
                   // permission: 'M_salesQueryList'
                 }
               }
@@ -177,7 +202,7 @@ export const asyncRouterMap = [
             name: 'accountManagement',
             component: BlankLayout,
             meta: {
-              title: '账户管理',
+              title: '账户明细',
               icon: 'monitor'
               // permission: 'M_salesQueryList'
             },
@@ -188,7 +213,7 @@ export const asyncRouterMap = [
                 name: 'accountManagementList',
                 component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/accountManagement/list.vue'),
                 meta: {
-                  title: '账户管理列表',
+                  title: '账户明细列表',
                   icon: 'monitor',
                   hidden: true
                   // permission: 'M_salesQueryList'

+ 9 - 16
src/views/numsGoodsShelves/accountManagement/list.vue

@@ -20,11 +20,7 @@
       <div style="margin:10px 0">
         <div style="display: flex;align-items: center;padding: 2px 0;">
           <div>
-            账户余额:<strong>¥986.00 </strong>元;
-            可提现金额:<strong>¥500.00</strong>;
-          </div>
-          <div>
-            <a-button size="small" type="primary" class="button-primary" @click="handleTX">申请提现</a-button>
+            账户余额:<strong>¥986.00 </strong>元
           </div>
         </div>
       </div>
@@ -41,8 +37,6 @@
         bordered>
       </s-table>
     </a-spin>
-    <!-- 申请提现 -->
-    <applyWithdrawal :isOpenModal="showModal" :currentData="currentData" @close="showModal=false" @refresh="$refs.table.refresh(true)"></applyWithdrawal>
   </a-card>
 </template>
 
@@ -50,9 +44,8 @@
 import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
 import { STable } from '@/components'
-import applyWithdrawal from './applyWithdrawal.vue'
 export default {
-  components: { STable, applyWithdrawal, commonMixin },
+  components: { STable, commonMixin },
   data () {
     return {
       spinning: false,
@@ -63,13 +56,13 @@ export default {
       time: [],
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '交易时间', dataIndex: 'createDate', width: '15%', align: 'center' },
-        { title: '交易说明', dataIndex: 'name', width: '30%', align: 'center' },
-        { title: '交易类型', dataIndex: 'remarks', width: '10%', align: 'center' },
-        { title: '交易金额', dataIndex: 'remarks', width: '10%', align: 'center' },
-        { title: '手续费', dataIndex: 'remarks', width: '10%', align: 'center' },
-        { title: '账户变动', dataIndex: 'remarks', width: '10%', align: 'center' },
-        { title: '变动后余额', dataIndex: 'remarks', width: '10%', align: 'center' }
+        { title: '交易时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '交易说明', dataIndex: 'name', width: '30%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '交易类型', dataIndex: '', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '交易金额', dataIndex: '', width: '10%', align: 'right', customRender: function (text) { return text || '--' } },
+        { title: '手续费', dataIndex: '', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '账户变动', dataIndex: '', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '变动后余额', dataIndex: '', width: '10%', align: 'right', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 88 - 0
src/views/numsGoodsShelves/withdrawalManagement/applyWithdrawal.vue

@@ -0,0 +1,88 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    :width="560"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="applyWithdrawal-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="申请提现金额" prop="consigneeName">
+          <a-input
+            id="applyWithdrawal"
+            placeholder="请输入正数(最多两位小数)"
+            allowClear />
+        </a-form-model-item>
+        <a-form-model-item label="实际扣除金额">
+          <span>{{}}元 </span><span style="color: #999;">(申请提现金额-提现手续费)</span>
+        </a-form-model-item>
+        <a-form-model-item label="提现账户">
+          <span>{{}}</span>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="applyWithdrawal-btn-submit">确定</a-button>
+          <a-button @click="cancel" style="margin-left: 15px" id="applyWithdrawal-btn-back">取消</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+export default {
+  props: {
+    isOpenModal: {
+      type: Boolean,
+      default: false
+    },
+    currentData: {
+      type: Object,
+      default: function () {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: { span: 6 },
+        wrapperCol: { span: 15 }
+      },
+      opened: this.isOpenModal,
+      title: '申请提现',
+      confirmLoading: false,
+      spinning: false,
+      rules: []
+    }
+  },
+  methods: {
+    // 保存
+    handleSubmit () {
+      this.$emit('close')
+    },
+    // 取消
+    cancel () {
+      this.$emit('close')
+    }
+  },
+  watch: {
+    isOpenModal (nVal, oVal) {
+      this.opened = nVal
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 175 - 0
src/views/numsGoodsShelves/withdrawalManagement/list.vue

@@ -0,0 +1,175 @@
+<template>
+  <a-card size="small" :bordered="false" class="accountManagementList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :xl="6" :lg="6" :md="12" :sm="24">
+              <a-form-item label="交易时间">
+                <a-range-picker v-model="time" allowClear :disabledDate="disabledDate" format="YYYY-MM-DD"/>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="6" :md="6" :sm="6">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="outboundOrderList-refresh" >查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <div style="margin:10px 0">
+        <div style="display: flex;align-items: center;padding: 2px 0;">
+          <div style="display: flex;align-items: center;">
+            可提现金额:<a-statistic :precision="2" :value="112893" />
+            <a-button size="small" type="primary" class="button-primary" @click="handleTX">申请提现</a-button>
+            <span>(提示:① 提现手续费为0.5元/笔;② 资金到账周期为工作日+1天)</span>
+          </div>
+        </div>
+      </div>
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+77+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y:tableHeight }"
+        :defaultLoadData="true"
+        bordered>
+      </s-table>
+    </a-spin>
+    <!-- 申请提现 -->
+    <applyWithdrawal :isOpenModal="showModal" :currentData="currentData" @close="showModal=false" @refresh="$refs.table.refresh(true)"></applyWithdrawal>
+  </a-card>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import moment from 'moment'
+import { STable } from '@/components'
+import applyWithdrawal from './applyWithdrawal.vue'
+export default {
+  components: { STable, applyWithdrawal, commonMixin },
+  data () {
+    return {
+      spinning: false,
+      disabled: false,
+      tableHeight: 0,
+      showModal: false,
+      currentData: null,
+      time: [],
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '提现单号', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '提现时间', dataIndex: 'name', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '申请提现金额', dataIndex: '', width: '10%', align: 'right', customRender: function (text) { return text || '--' } },
+        { title: '开户名', dataIndex: '', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '银行卡号', dataIndex: '', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '提现人', dataIndex: '', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: '', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备注', dataIndex: '', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const _this = this
+        _this.disabled = true
+        _this.spinning = true
+        return new Promise(function (resolve, reject) {
+          const data = {
+            list: [{ id: 1, createDate: '2020-08-09' }]
+          }
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = i + 1
+          }
+          _this.spinning = false
+          _this.disabled = false
+          resolve(data)
+        })
+
+        // const paramsPage = Object.assign(this.queryParam) //  有分页
+        // return reportSalesReturnThjdReportList(paramsPage).then(res => {
+        //   let data
+        //   if (res.status == 200) {
+        //     data = res.data
+        //     // this.getCount(paramsPage)
+        //     const no = (data.pageNo - 1) * data.pageSize
+        //     for (var i = 0; i < data.list.length; i++) {
+        //       data.list[i].no = no + i + 1
+        //     }
+        //     this.disabled = false
+        //   }
+        //   this.spinning = false
+        //   return data
+        // })
+      }
+    }
+  },
+  methods: {
+    // 时间改变
+    dateChange (date) {
+
+    },
+    // 禁止选择今天之后的日期
+    disabledDate (current) {
+      return current && current > moment().endOf('day')
+    },
+    // 重置
+    resetSearchForm () {
+      this.time = []
+    },
+    // 申请提现
+    handleTX () {
+      this.showModal = true
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 265
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .accountManagementList-wrap{
+
+  }
+</style>