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

export default {
  data() {
    return {
      span: 8,
      items: this.setItems(),
    }
  },
  mounted() {},
  computed: {},
  watch: {},
  methods: {
    setItems(params = {}) {
      return [
        ...setPubCarrier({
          label: '选择物流商',
          search: this.search,
          ok: this.ok,
          required: true, //是否必填
          //carrierCode: false,是否显示物流商编码默认显示
          ...params,
        }),
      ]
    },
    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>
