export default function useColumns() {
  // 负责人信息
  const PrincipalCloumns = [
    {
      item: { key: "personName", title: "人员姓名", required: true, },
      attr: {
        is: "el-popover-select-v2",
        referName: "CONTACTS_PARAM",
        valueKey: "name",
        placeholder: "请选择负责人",
        dataMapping: {
          person: 'id',
        },
      },
    },
    {
      item: { key: "customersName", title: "客户名称" },
      attr: {
        is: "el-input",
      },
    },
    {
      item: { key: "relationshipType", title: "关系类型", required: true, },
      attr: {
        is: "el-select",
        dictName: "mk_cm_relationship_type",
      },
    },
    {
      item: { key: "productionLine", title: "产线", required: true, },
      attr: {
        is: "el-select",
        dictName: "mk_cm_production_line",
      },
    },
    {
      item: { key: "startDate", title: "开始日期", required: true, },
      attr: {
        is: "el-date-picker",
        type: "date",
        placeholder: "请选择开始日期",
      },
    },
    {
      item: { key: "endDate", title: "结束日期" },
      attr: {
        is: "el-date-picker",
        type: "date",
        placeholder: "请选择结束日期",
      },
    },

  ].map(({ item, attr }) => ({
    attr,
    item: {
      ...item,
      span: item.span || 6
    }
  }))

  return { PrincipalCloumns }
}