<template>
  <div>
    <criteria-paged :model="model" v-ref:paged>
      <data-grid :model="model" v-ref:grid  partial='list'>
        <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>
          </tr>
        </template>
        <template partial='body'>
          <!--<td style="text-align: center;">{{$index + 1}}</td>-->
          <td style="text-align: center;">{{row.f_operat_type}}</td>
          <td style="text-align: center;">{{row.f_operate_date}}</td>
          <td style="text-align: center;">{{row.f_describe}}</td>
          <td style="text-align: center;">{{row.f_state}}</td>
          <td style="text-align: center;">{{row.f_operator}}</td>
        </template>
      </data-grid>
    </criteria-paged>
  </div>
</template>

<script>
  import { PagedList } from 'vue-client'
  export default {
    name: 'OutLetsRecord',
    data () {
      return {
        model: new PagedList('rs/sql/getRecord', 20, {orderitem: '`f_operate_date DESC`'}),
        f_filialeids: this.$login.f.f_orgids
      }
    },
    props: {
      row: Object
    },
    created () {
    },
    ready () {
      this.search()
    },
    methods: {
      search () {
        let condition = `f_filialeids  = '${this.f_filialeids}'`
        condition += `and f_operat_type like '%售气%'`
        this.model.search(condition)
      }
    },
    watch: {
      'row.id' (val) {
        console.log('row变化', val)
        if (val) {
          this.search(val)
        }
      }
    }
  }
</script>

<style lang="less">
</style>
