<template>
  <div>
    <Modal v-model="showSampleModal" v-drag @on-visible-change="_visibleChange"  width="1330"
           class="zIndex-900 modal-footer-none">
      <p slot="header"> 按样品查看原始记录</p>
      <div>
        <WaitReceive ref="waitReceiveModal"></WaitReceive>
      </div>
    </Modal>
  </div>
</template>
<script>
import WaitReceive from './ItemTabs'

export default {
  components: {
    WaitReceive
  },
  data() {
    return {
      contractId: '', // 合同id
      entrustId: '',
      showSampleModal: false,
      modalTitle: '',
      selectIds: [],
      name: '',
      currentComponent: ''
    }
  },
  mounted() {
    // this.currentComponent = 'waitScan'
  },
  methods: {
    _open(entrustId) {
      this.showSampleModal = true
      this.entrustId = entrustId // 委托id
      // this.currentComponent = 'waitScan'
      this.selectIds = []
      this._waitPage()
    },
    // 待接收
    _waitPage() {
      this.$refs.waitReceiveModal._open(this.entrustId)
    },
    _search() {
      this.$emit('on-result-change')
    },
    // 关闭弹框的时候刷新上个界面
    _visibleChange(data) {
      if (data === false) {
        this._search()
      }
    }
  }
}
</script>
