<template>
  <!-- 客户选择 -->
  <p-grid-form ref="grid" :span="span" :label-col="{ span: 9 }" :items="items" @submit="hanlderSubmit" />
</template>
<script>
import setCustomer from '@/views/example/modules/form/customer.js'

export default {
  data() {
    return {
      span: 8,
      items: this.setItems(),
    }
  },
  mounted() {},
  computed: {},
  watch: {},
  methods: {
    setItems(remoteData = {}) {
      return [...setCustomer({ remoteData, search: this.search, ok: this.ok, change: this.change })]
    },
    change() {},
    search(value, event, form) {
      console.log(form.getFieldValue('customername'))
      this.items = this.setItems({ parent_id: 123 })
    },
    ok() {},
    hanlderSubmit() {},
  },
}
</script>
<style lang="less"></style>
