WithdrawalTable.vue 2.65 KB
<template>
  <d2-table
    class='my-row-height'
    ref='withdrawalTable'
    :hasNum='true'
    :tableParams='withdrawalTableParams'
    :searchForm='searchForm'
    :getListApi='getListApi'
    :pageConf='pageConf'
    @sendAlldata = 'getAmountCollection'
  >
    <div slot="status" slot-scope="scope">
      <span v-if="scope.scope.status == '1'">待审核</span>
      <span v-if="scope.scope.status == '2'">到账中</span>
      <span v-if="scope.scope.status == '3'">已到账</span>
      <span v-if="scope.scope.status == '4'">到账失败</span>
    </div>
  </d2-table>
</template>

<script>
import { withdrawalApi } from '@/api/withdrawalManagement'
export default {
  name: 'WithdrawalTable',
  props:{
    searchForm:{
      type:Object,
      default:{}
    }
  },
  data() {
    return {
      pageConf: {
        pageSize: 'pageSize',
        pageNum: 'pageNum',
        totalCount: 'data.count'
      },
      withdrawalTableParams: {
        mutiSelectUniqueKey: 'id',
        mutiSelectName: 'list',
        listName: 'data.data',
        tableColumns: [
          {
            label: '员工名称',
            prop: 'staffName'
          },
          {
            label: '员工手机号',
            prop: 'staffPhone'
          },
          {
            label: '积分值',
            prop: 'withdrawalScore'
          },
          {
            label: '提现金额(元)',
            prop: 'withdrawalAmount'
          },
          {
            label: '提现时间',
            prop: 'withdrawalTime'
          },
          {
            label: '微信昵称',
            prop: 'wechatNickName'
          },
          {
            label: '微信手机号',
            prop: 'wechatPhone'
          },
          {
            label: '微信openid',
            prop: 'wechatOpenId'
          },
          {
            label: '状态',
            prop: 'status',
            addHtml:'status'
          },
          {
            label: '审核人',
            prop: 'reviewer'
          },
          {
            label: '审核时间',
            prop: 'reviewTime'
          },
          {
            label: '到账时间',
            prop: 'successTime'
          }
        ]
      },
      getListApi: withdrawalApi.withdrawalListApi,
    }
  },
  methods:{
    getAmountCollection(val){
      let {receivedAmount,receivingAmount,reviewingAmount,totalAmount,failureAmount} =val
      let amountCollection = {receivedAmount,receivingAmount,reviewingAmount,totalAmount,failureAmount}
      this.$emit('sendCollection',amountCollection)
      }
    }
  }
</script>

<style scoped>
.my-row-height >>> .el-table__body-wrapper .el-table__row {
  height: 48px;
}
</style>