import { ref } from "vue";
import dayjs from "dayjs";
export function useColumns() {
  const columns = ref([
    {
      label: "销售订单编码",
      prop: "qrdNo",
      width: 150
    },

    {
      label: "采购单编码",
      prop: "cgdNo",
      width: 150
    },
    {
      label: "对账编码",
      prop: "payNo",
      width: 150
    },
    {
      label: "对账回票申请编码",
      prop: "hpNo",
      width: 150
    },

    {
      label: "开票申请编码",
      prop: "invNo",
      width: 150
    },

    {
      label: "资金编码",
      prop: "tradNo",
      width: 150
    },

    {
      label: "资金认领编码",
      prop: "logNo",
      width: 150
    },

    {
      label: "退票申请编码",
      prop: "returnInv",
      width: 150
    },
    {
      label: "退款申请编码",
      prop: "returnTrad",
      width: 150
    },
    {
      label: "业务公司编码",
      prop: "companyNo",
      width: 150
    },
    {
      label: "供应商编码",
      prop: "supplierNo",
      width: 150
    },
    {
      label: "客户企业编码",
      prop: "customerNo",
      width: 150
    },
    {
      label: "采购员",
      prop: "cgder",
      width: 80
    },
    {
      label: "销售员",
      prop: "seller",
      width: 80
    },
    {
      label: "创建时间",
      width: 145,
      prop: "createTime",
      formatter: ({ createTime }) =>
        dayjs(createTime).format("YYYY-MM-DD HH:mm:ss")
    },
    {
      label: "操作",
      fixed: "right",
      width: 55,
      slot: "operation"
    }
  ]);

  return {
    columns
  };
}
