import { ref } from "vue";

export function useColumns() {
  const xsColumns = ref([
    {
      label: "业务编码",
      prop: "invNo",
      width: "150px"
    },
    {
      label: "业务类型",
      slot: "type",
      width: "100px"
    },
    {
      label: "上传方式",
      prop: "open_type",
      slot: "open_type",
      width: "100px"
    },
    {
      label: "状态",
      prop: "status",
      slot: "status",
      width: "180px"
    },
    {
      label: "发票类型",
      prop: "inv_type",
      slot: "inv_type",
      width: "160px"
    },
    {
      label: "买方公司名称",
      width: "180px",
      prop: "buyer_title"
    },
    {
      label: "卖方公司名称",
      width: "180px",
      prop: "seller_title"
    },
    {
      label: "发票号码",
      width: "100px",
      prop: "inv_number"
    },
    {
      label: "发票代码",
      width: "100px",
      prop: "inv_code"
    },
    {
      label: "发票总金额",
      prop: "inv_value",
      width: "120px"
    },
    {
      label: "创建时间",
      prop: "addtime",
      minWidth: "100px"
    }
  ]);

  const cgColumns = ref([
    {
      prop: "hpNo",
      label: "对账回票申请",
      width: "150px"
    },
    {
      label: "业务类型",
      width: "100px",
      slot: "type"
    },
    {
      label: "上传方式",
      prop: "open_type",
      slot: "open_type",
      width: "100px"
    },
    {
      label: "状态",
      prop: "status",
      slot: "status",
      width: "180px"
    },
    {
      label: "发票类型",
      prop: "type",
      slot: "inv_type",
      width: "180px"
    },
    {
      label: "买方公司名称",
      prop: "buyer_name",
      width: "180px"
    },
    {
      label: "卖方公司名称",
      width: "180px",
      prop: "seller_name"
    },
    {
      label: "发票号码",
      width: "100px",
      prop: "checkNumber"
    },
    {
      label: "发票代码",
      width: "120px",
      prop: "invoiceCode"
    },
    {
      label: "发票总金额",
      width: "100px",
      prop: "subtotal_amount"
    },
    {
      label: "创建时间",
      minWidth: "120px",
      prop: "addtime"
    }
  ]);

  return {
    xsColumns,
    cgColumns
  };
}
