const initheaders = [
  "买方公司编码",
  "买方公司名称",
  "卖方公司编码",
  "卖方公司名称",
  "对账编码",
  "发票类型",
  "发票代码",
  "发票号码",
  "发票税前金额",
  "发票税后金额",
  "开票日期",
  "校验码"
];

export const mapProp = {
  value0: "companyNo",
  value1: "companyName",
  value2: "supplierNo",
  value3: "supplierName",
  value4: "payNo",
  value5: "invoiceType",
  value6: "invoiceCode",
  value7: "invoiceNumber",
  value8: "inv_subtotal_amount",
  value9: "inv_total",
  value10: "open_time",
  value11: "checkNumber"
};

export const requireHeaders = [];

const columns = () => {
  const list: any[] = [
    {
      type: "index",
      width: "50",
      fixed: "left",
      label: "序号"
    }
  ];
  initheaders.forEach((si, sii) => {
    list.push({
      prop: "value" + sii,
      label: si,
      minWidth: sii === 0 || sii === 1 ? "120px" : "90px"
    });
  });

  console.log(list);
  return list;
};

export { initheaders, columns };
