const initheaders = [
  "商品编码",
  "税率",
  "类目编码",
  "开票商品名称",
];

export const mapProp = {
  value0: "spuCode",
  value1: "tax",
  value2: "cat_code",
  value3: "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" : "90px"
    });
  });

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

export { initheaders, columns };
