<template>
  <div class="auto">
    <criteria-paged :model="model" v-ref:paged>
      <data-grid  :model="model" partial='list' v-ref:grid >
        <template partial='head'>
          <tr>
            <th><nobr>序号</nobr></th>
            <th><nobr>表编号</nobr></th>
            <th><nobr>换标类型</nobr></th>
            <th><nobr>交款人</nobr></th>
            <th><nobr>换表表费</nobr></th>
            <th><nobr>旧帐户结余</nobr></th>
            <th><nobr>新帐户结余</nobr></th>
            <th><nobr>旧表具剩余气量</nobr></th>
            <th><nobr>新表具剩余气量</nobr></th>
            <th><nobr>旧表具剩余金额</nobr></th>
            <th><nobr>新表具剩余金额</nobr></th>
            <th><nobr>旧表号</nobr></th>
            <th><nobr>新表号</nobr></th>
            <th><nobr>旧表封号</nobr></th>
            <th><nobr>新表封号</nobr></th>
          </tr>
        </template>
        <template partial='body'>
          <td ><nobr>{{$index + 1}}</nobr></td>
          <td ><nobr>{{row.f_user_id}}</nobr></td>
          <td ><nobr>{{row.f_type}}</nobr></td>
          <td ><nobr>{{row.f_pay_person}}</nobr></td>
          <td ><nobr>{{row.f_changemeter_fee}}</nobr></td>
          <td ><nobr>{{row.f_balance}}</nobr></td>
          <td ><nobr>{{row.f_newbalance}}</nobr></td>
          <td ><nobr>{{row.f_balance_gas}}</nobr></td>
          <td ><nobr>{{row.f_newbalance_gas}}</nobr></td>
          <td ><nobr>{{row.f_balance_amount}}</nobr></td>
          <td ><nobr>{{row.f_newbalance_amount}}</nobr></td>
          <td ><nobr>{{row.f_meternumber}}</nobr></td>
          <td ><nobr>{{row.f_newmeternumber}}</nobr></td>
          <td ><nobr>{{row.f_metertitles}}</nobr></td>
          <td ><nobr>{{row.f_newmetertitles}}</nobr></td>
        </template>
        <template partial='foot'>
        </template>
      </data-grid>
    </criteria-paged>
  </div>
</template>

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

  export default {
    title: '换表信息',
    data () {
      return {
        model: new PagedList('rs/sql/newchangemeterQuery', 15,{})
      }
    },
    props: ['data'],
    ready () {
      console.log('换表信息',this.data)
      //u.f_userinfo_code=${data.f_userinfo_code} and h.f_filialeids = ${data.f_filialeids}
      this.model.search(`f_userinfo_code='${this.data.f_userinfo_code}' and f_filialeids = '${this.data.f_filialeids}'`)
    }
  }

</script>
