const initheaders = [
  "商品编码",
  "采购税率",
  "采购类目编码",
  "采购开票商品名称",
  "财务税率",
  "财务类目编码",
  "财务开票商品名称",
  "税率标识",
  "是否有优惠政策",
  "增值税管理内容"
];

export const mapProp = {
  value0: "spuCode",
  value1: "cg_tax",
  value2: "cg_cat_code",
  value3: "cg_inv_good_name",
  value4: "tax",
  value5: "cat_code",
  value6: "inv_good_name",
  value7: "inv_tag",
  value8: "is_discount",
  value9: "addTax"
};

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

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

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

export { initheaders, columns };
