<template>
  <a-modal
    width="1000px"
    :visible="visible"
    title="查看二级销售人员"
    @ok="handleOk"
    @cancel="handleCancel"
  >
    <SalesUser :id="id" :name="name" :phone="phone" v-if="id"></SalesUser>
  </a-modal>
</template>
<script>
import SalesUser from './salesUser.vue'

export default {
  data () {
    return {
      visible: false,
      id: '',
      name: '',
      phone: ''
    }
  },
  components: {
    SalesUser
  },
  methods: {
    show (item) {
      this.visible = true
      this.id = item.id
      this.phone = item.phone
      this.name = item.real_name || item.name
    },
    handleOk () {
      this.visible = false
    },
    handleCancel () {
      this.visible = false
      this.id = ''
    }
  }
}
</script>
<style lang="">

</style>
