import { initDictionary, resultExtendedField } from '@/blocks/utils'
import {getOrganization } from '@/blocks/components/formConfig/departmenTree.js'

export default {
  data() {
    return {
      options: {},
      tableExtendedField: [],
      formExtendedField: {
        form: [],
        formTable:[]
      },
      goodsExtendedField: [],
    }
  },
  mounted() {
    let _this = this
    getOrganization(this)

    initDictionary([
      { objectcode: 'LINE_CARRIER_TYPE' },
      { objectcode: 'CONSIGNEE_TYPE' },
      { objectcode: 'ORDER_BUSINESS_TYPE' },
      { objectcode: 'PLAN_BILL_STATUS' },

    ]).then((res) => {
      for (let key in res) {
        res[key].forEach((item) => {
          if (!isNaN(item.value)) {
            item.value = +item.value
          }
        })
      }

      _this.options = { ..._this.options, ...res }
    })
  },
  computed: {},
  methods: {},
}
