const initheaders = [
  "商品编码",
  "商品名称",
  "买入方公司编码",
  "买入方公司名称",
  "卖出方公司编码",
  "卖出方公司名称",
  "税率",
  "类目编码",
  "开票商品名称",
];

export const mapProp = {
  value0: "spuCode",
  value1: "spuName",
  value2: "companyNo",
  value3: "companyName",
  value4: "suppplierNo",
  value5: "supplierName",
  value6: "tax",
  value7: "cat_code",
  value8: "inv_good_name",
};

export const requireHeaders = [
  "spuCode",
  "tax",
  "cat_code"
];

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" : "120px"
    });
  });

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

export { initheaders, columns };
