<template>
  <div id="unit">
    <div>
      <gas-gun-list-new></gas-gun-list-new>
    </div>
  </div>
</template>
<script>
  import co from 'co'

  export default {
    title: '加气枪管理',
    data () {
      return {
        isChange: false,
        userlist: false,
        row: null,
        boxmodel: null,
        f_filialeid: null
      }
    },
    methods: {
      selected (obj) {
        this.isChange = true
        this.userlist = true
        this.row = obj.val
        this.boxmodel = obj.val
      },
      getChange () {
        this.isChange = true
      }
    },
    events: {
      'search' () {
        this.isChange = false
        this.userlist = false
        this.row = null
        this.boxmodel = {}
        this.$refs.list.$refs.paged.$refs.cri.search()
      },
      'success' (name, row, res) {
        this.isChange = false
        this.userlist = false
        this.row = null
        this.boxmodel = {}

        this.$refs.list.search()
      },
      'error' (name, row, res) {
        this.isChange = false
        this.userlist = false
        this.row = null
        this.boxmodel = {}
      },
      'close' () {
        this.isChange = false
        this.userlist = false
        this.row = null
        this.boxmodel = {}
        this.$refs.list.search()
      },
      'add' () {
        this.isChange = true
        this.userlist = false
        this.row = null
        this.boxmodel = {}
        this.$refs.list.$refs.paged.$refs.grid.selectStore.selected = null
      }
    }
  }
</script>
