<template>
  <!--药品责任人查询 -->
  <p-grid-form ref="grid" :span="span" :label-col="{ span: 9 }" :items="items" @submit="hanlderSubmit" />
</template>
<script>
import setPopupVendor from '@/views/example/modules/form/drugResponsiblePerson.js'

export default {
  data() {
    return {
      span: 8,
      items: this.setItems({}, this.search, this.ok),
    }
  },
  mounted() {},
  computed: {},
  watch: {},
  methods: {
    setItems(params = {}) {
      return [
        ...setPopupVendor({
          label: '选择药品责任人',
          name: 'goodsresman',
          ok: this.ok,
          required: true,
          vendorcode: true,
          ...params,
        }),
        ...setPopupVendor({
          label: '选择基药责任人',
          name: 'bgoodsresman',
          ok: this.ok,
          required: true,
          vendorcode: true,
          ...params,
        }),
        ...setPopupVendor({
          label: '选择上市许可人',
          name: 'licensor',
          ok: this.ok,
          required: true,
          vendorcode: true,
          ...params,
        }),
        ...setPopupVendor({
          label: '选择推广责任人',
          name: 'marketman',
          ok: this.ok,
          required: true,
          vendorcode: true,
          ...params,
        }),
        ...setPopupVendor({
          label: '选择分销责任人',
          name: 'saleman',
          ok: this.ok,
          required: true,
          vendorcode: true,
          ...params,
        }),
        ...setPopupVendor({
          label: '选择终端责任人',
          name: 'terminalman',
          ok: this.ok,
          required: true,
          vendorcode: true,
          ...params,
        }),
      ]
    },
    search(value, event, form) {
      this.items = this.setItems({ parent_id: 123 })
    },
    ok() {
      console.log('21212')
    },
    hanlderSubmit() {},
  },
}
</script>
<style lang="less"></style>
