<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>
            <th>
              <nobr>购气的费用</nobr>
            </th>
          </tr>
        </template>

        <template partial='body'>
          <td style="text-align: center">
            <nobr>{{row.f_user_name}}</nobr>
          </td>
          <td style="text-align: center">
            <nobr>{{row.f_pregas}}</nobr>
          </td>
          <td style="text-align: center">
            <nobr>{{row.f_operate_date}}</nobr>
          </td>
          <td style="text-align: center">
            <nobr>{{row.f_preamount}}</nobr>
          </td>

        </template>
      </data-grid>
    </criteria-paged>
  </div>
</template>

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

export default {
  title: '购气记录',
  props: ['check'],
  data(){
    return{
      model: new PagedList('api/af-safecheck/sql/NewfileList1', 100, {

      })
    }

  },
  watch: {
    'check'() {
      console.log('1111111哈哈哈哈1111'+JSON.stringify(this.check))
      console.log('11111111111'+JSON.stringify(this.model))  //打印
      this.model.paramSource.f_userinfo_id = this.check.f_userinfo_id
      console.log('22222222222'+JSON.stringify(this.model))
      this.model.search(`f_userinfo_id = '${this.check.f_userinfo_id}'`)
    }
  },
  ready(){
    console.log("7777777777777777"+JSON.stringify(this.check))
    this.model.search(`f_userinfo_id = '${this.check.f_userinfo_id}'`)
  },
  methods:{
  }
}


</script>


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

