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

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

    {
      label: "开票申请编号",
      prop: "invNo",
      width: 160
    },

    {
      label: "资金编号",
      prop: "tradNo",
      width: 160
    },

    {
      label: "资金认领编号",
      prop: "logNo",
      width: 160
    },

    {
      label: "退票申请编号",
      prop: "returnInv",
      width: 160
    },
    {
      label: "退款申请编号",
      prop: "returnTrad",
      width: 160
    },
    {
      label: "业务公司编号",
      prop: "companyNo",
      width: 160
    },
    {
      label: "供应商编号",
      prop: "supplierNo",
      width: 160
    },
    {
      label: "客户企业编号",
      prop: "customerNo",
      width: 160
    },
    {
      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
  };
}
