<template>
  <div :style="{'height':needRepair?'60%':'100%'}">

    <criteria-paged :model="model" :pager="false" v-ref:paged>
      <data-grid :model="$parent.model" partial='list' class="table_sy">

        <template partial='head'>
          <tr>
            <th>
              <nobr>产品类型</nobr>
            </th>
            <th>
              <nobr>购买时间</nobr>
            </th>
            <th>
              <nobr>是否购买</nobr>
            </th>
          </tr>
        </template>

        <template partial='body'>
          <td style="text-align: center">
            <nobr>{{row.value_type}}</nobr>
          </td>
          <td style="text-align: center">
            <nobr>{{row.startDate}}</nobr>
          </td>
          <td style="text-align: center">
            <nobr>{{row.isuse}}</nobr>
          </td>
        </template>
      </data-grid>
    </criteria-paged>
  </div>

</template>

<script>
import co from 'co'
import {PagedList} from 'vue-client'
import { HttpResetClass } from 'vue-client'



export default {
  title: '增值产品',
props:['check'],
  data(){
    return{
      service: null,
      // 是否显示详情modal
      repaierShow: false,
      isshow: false,
      show: false,
      takeshow:false,   // 操作面板显示
      repair: {},
      rowOne:{},
      evaluate: {},
      curActivity:{},
      num: 14,
      wavflie : '',
      model: new PagedList('api/af-revenue/logic/chargevalueaddinfo', 200)
    }
  },
  watch: {
    'check'() {
      if (!this.check.f_userfiles_id || !this.check.f_userinfo_id){
        this.$showMessage('增值产品获取用户信息错误！！！')
        return
      }
      let data={
            f_userfiles_id: this.check.f_userfiles_id,
            f_userinfo_id: this.check.f_userinfo_id
        }
        new HttpResetClass().load('post','api/af-revenue/logic/chargevalueaddinfo',data).then(resp=>{
          this.$refs.paged.model.rows = resp.data
        })

    }
  },
  ready(){
    if (!this.check.f_userfiles_id || !this.check.f_userinfo_id){
        this.$showMessage('增值产品获取用户信息错误！！！')
        return
      }
    let data={
            f_userfiles_id: this.check.f_userfiles_id,
            f_userinfo_id: this.check.f_userinfo_id
        }
      new HttpResetClass().load('post','api/af-revenue/logic/chargevalueaddinfo',data).then(resp=>{
        this.$refs.paged.model.rows = resp.data
      })
  },
  methods:{

  }
}


</script>


<style lang="less" scoped>
.select-error {
  button {
    border-bottom: 1px solid #a94442 !important;
  }
}
</style>


