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

export default {
  data() {
    return {
      span: 8,
      items: this.setItems({}, this.search, this.ok),
    }
  },
  mounted() {},
  computed: {},
  watch: {},
  methods: {
    setItems() {
      return [
        ...setPopupIteminfo({
          label: '选择商品',
          ok: this.ok,
          required: true, //是否必填
          //itemcode: false,是否显示物流商编码默认显示
          remoteData: {}, //参数
        }),
      ]
    },
    search(value, event, form) {
      console.log(form.getFieldValue('customername'))

      this.items = this.setItems({ parent_id: 123 }, this.search, this.ok)
    },
    ok() {},
    hanlderSubmit() {},
  },
}
</script>
<style lang="less"></style>
