export default function useColumns() {
  const FearchColumns = [
    {
      item: { key: "code", title: "编码" },
      attr: {
        is: "el-input",
        disabled: true,
      }
    },
    {
      item: { key: "projectName", title: "项目名称" },
      attr: {
        is: "el-input",
        disabled: true,
      }
    },
    {
      item: { key: "startDate", title: "结算开始日期" },
      attr: {
        is: "el-date-picker",
        type: "date",
        valueFormat: "yyyy-MM-dd",
        disabled: true,
      }
    },
    {
      item: { key: "endDate", title: "结算截止日期" },
      attr: {
        is: "el-date-picker",
        type: "date",
        valueFormat: "yyyy-MM-dd",
        disabled: true,
      }
    },
    {
      item: { key: "spdProjectName", title: "SPD项目" },
      attr: {
        is: "el-popover-select-v2",
        referName: "CUSTOMER_PARAM",
        valueKey: "name",
        dataMapping: {
          spdProject: "code",
          spdProjectName: "name",
        },
        disabled: true,
      }
    },
    {
      item: { key: "profileCenterName", title: "利润中心" },
      attr: {
        is: "el-popover-select-v2",
        referName: "LIACENTER_PARAM",
        valueKey: "name",
        dataMapping: {
          profileCenter: "id",
          profileCenterName: "name",
        },
        disabled: true,
      }
    },
    {
      item: { key: "calculateSupplierName", title: "结算供应商" },
      attr: {
        is: "el-popover-select-v2",
        referName: "SUPPLIER_PARAM",
        valueKey: "name",
        dataMapping: {
          calculateSupplier: "code",
          calculateSupplierName: "name",
        },
        disabled: true,
      }
    },
    {
      item: { key: "supplierName", title: "供应商" },
      attr: {
        is: "el-popover-select-v2",
        referName: "SUPPLIER_PARAM",
        valueKey: "name",
        dataMapping: {
          supplier: "code",
          supplierName: "name",
        },
        disabled: true,
      }
    },
    {
      item: { key: "saleOrgName", title: "销售组织" },
      attr: {
        is: "el-popover-select-v2",
        referName: "ORG_PARAM",
        valueKey: "name",
        dataMapping: {
          saleOrg: "id",
          saleOrgName: "name",
        },
        clearable: true,
      }
    },
    {
      item: { key: "saleMonth", title: "销售月份" },
      attr: {
        is: "el-input",
      }
    },
    {
      item: { key: "saleOrderNo", title: "销售订单号" },
      attr: {
        is: "el-input",
      }
    },
    {
      item: { key: "priceSum", title: "价税合计" },
      attr: {
        is: "el-input",
        disabled: true,
      }
    },
    {
      item: { key: "serviceFee", title: "服务费" },
      attr: {
        is: "el-input",
        disabled: true,
      }
    },
    {
      item: { key: "isToSaleOrder", title: "是否转销售订单" },
      attr: {
        is: "el-select",
        dictName: "sys_yes_no",
        disabled: true,
      }
    },
    {
      item: { key: "isReturnMoney", title: "是否回款" },
      attr: {
        is: "el-select",
        dictName: "sys_return_money",
        disabled: true,
      }
    },
    {
      item: { key: "isTicket", title: "是否开票" },
      attr: {
        is: "el-select",
        dictName: "sys_yes_no",
        disabled: true,
      }
    },
    {
      item: { key: "isOpen", title: "单据打开状态" },
      attr: {
        is: "el-select",
        dictName: "sys_open_status",
        disabled: true,
      }
    },
    {
      item: { key: "status", title: "单据状态" },
      attr: {
        is: "el-select",
        dictName: "sys_status",
        disabled: true,
      }
    },
    {
      item: { key: "isWhether", title: "是否带量", width: 100, },
      attr: {
        is: "el-select",
        dictName: "carry_or_not",
        disabled: true,
      }
    },

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

  return { FearchColumns }
}