export default function useColumns() {
  const TableColumns = [
    {
      item: {
        key: "candidate",
        title: "修改项",
      },
      attr: {}
    },
    {
      item: {
        key: "value",
        title: "修改值",
      },
      attr: {}
    },
  ];

  const SelectColumns = [
    {
      item: {
        key: "priceType",
        title: "价格类型",
      },
      attr: {
        is: "el-select",
        dictName: "sys_price_type",
      }
    },
    {
      item: {
        key: "assignSupplierName",
        title: "指定供应商",
        // key: "supplierName",
      },
      attr: {
        readonly: true,
        is: "el-popover-select-v2",
        valueKey: "name",
        referName: "SUPPLIER_PARAM",
        dataMapping: {
          assignSupplier: 'id',
          assignSupplierName: 'name'
        },
      },
    },

  ].map(({ item, attr }) => {
    return {
      item: { ...item },
      attr: {
        ...attr,
        disabled: false,
      }
    }
  });
  return { TableColumns, SelectColumns }
}