
<template>
  <div v-loading="loading">
    <div class="heior_box">
      <div class="search-box">
        <el-input v-model="searchModel.keyWord" placeholder="请输入会员号" clearable size="small">
          <el-button slot="append" icon="el-icon-search" @click="search"></el-button>
        </el-input>
      </div>
    </div>
    <el-table :data="retData.Data" size="medium" :height="$getHeight(100)" row-key="Id" border>
      <el-table-column prop="create_time" label="日期"></el-table-column>
      <el-table-column prop="agent_name" label="代理商"></el-table-column>
      <el-table-column prop="score_value" label="金额"></el-table-column>
      <el-table-column prop="op_user" label="操作人"></el-table-column>
       <el-table-column prop="rest_amount1" label="操做前余额"></el-table-column>
       <el-table-column prop="rest_amount2" label="操做后余额"></el-table-column>
       <el-table-column prop="remark" label="备注"></el-table-column>
    </el-table>
    <div class="block">
      <el-pagination
        v-if="retData.Data.length>0"
        @current-change="getAmountDetail"
        :page-size="50"
        :current-page.sync="searchModel.PageIndex"
        layout="total,prev, pager, next"
        :total="retData.TotalCount"
      ></el-pagination>
    </div>
  </div>
</template>
<script>
export default {
  name: 'userIndex',
  components: {
    cutTip: () => import('@/components/common/cutTip'),
    phoneHide: () => import('@/components/common/phonehide')
  },
  data () {
    return {
      loading: false,
      retData: { TotalCount: 0, Data: [] },
      searchModel: {
        PageIndex: 1,
        keyWord: ''
      },
      detailAmountData: [],
    }
  },
  created () {
    this.$store.commit('setCurrentNav', '订单管理>>资金明细')
    this.getAmountDetail()
  },
  methods: {
    search () {
      this.searchModel.PageIndex = 1
      this.getAmountDetail()
    },
    getAmountDetail () {
      this.loading = true
      this.$api
        .get(this.$api.phpURL + "agent/score/getScoreList", this.searchModel)
        .then(res => {
          this.retData = res
          this.loading = false
        })
    },
  }
}
</script>
<style scoped>
</style>
