<template>
  <div class="auto">
      <data-grid :model="model" class="list_area table_sy"  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>
          </tr>
        </template>
        <template partial='body'>
          <tr>
            <td style="text-align:center">{{row.f_price_type}}</td>
            <td style="text-align:center">{{row.f_price_name}}</td>
            <td style="text-align:center">{{row.f_perform_date}}</td>
            <td style="text-align:center">{{row.f_end_date}}</td>
            <td style="text-align:center">{{row.f_version}}</td>
            <td style="text-align:center">{{row.f_price_state}}</td>
            <td style="text-align:center">{{row.stairprice}}</td>
          </tr>
        </template>
        <template partial='foot'></template>
      </data-grid>
  </div>
</template>
<script>
  export default {
    title: '详细信息',
    data () {
      return {
        model: {
          rows: []
        }

      }
    },
    props: ['row', 'show'],
    ready () {
      this.search()
    },
    methods: {
      async search () {
        // 获取这个气价的所有记录
        console.log('气价记录', this.row)
        let data = {
          f_price_id: this.row.f_price_id
          //f_filialeid: this.row.f_filialeid
        }

        let res = await this.$resetpost('rs/logic/gasUpdateInfo', {data: data}, {rejectMsg: '获取气价记录出错', resolveMsg: null})

        this.model.rows = res.data
      }
    },
    watch: {
      'row' () {
        this.search()
      }

    }

  }
</script>
