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 = [
  {
    type: "index",
    fixed: "left",
    label: "序号",
    width: "50"
  },
  {
    label: '业务编号',
    prop: 'TODO1',
    minWidth: '100px'
  },
  {
    label: '类型',
    prop: 'TODO2',
    minWidth: '100px'
  },
  {
    label:'订单来源',
    prop: 'TODO3',
    minWidth: '100px'
  },
  {
    label: '销售方公司纳税识别号',
    prop: 'TODO4',
    minWidth: '140px'
  },
  {
    label: '销售方公司',
    prop: 'TODO5',
    minWidth: '100px'
  },
  {
    label: '订单编号',
    prop: 'TODO6',
    minWidth: '120px'
  },
  {
    label: '订单主单号',
    prop: 'TODO7',
    minWidth: '120px'
  },
  {
    label: '商品编号',
    prop: 'TODO8',
    minWidth: '100px'
  },
  {
    label: '商品名称',
    prop: 'TODO9',
    minWidth: '100px'
  },
  {
    label: '单位',
    prop: 'TODO10',
    minWidth: '80px'
  },
  {
    label: '商品数量',
    prop: 'TODO11',
    minWidth: '110px'
  },
  {
    label: '商品数量',
    prop: 'TODO11',
    minWidth: '110px'
  },
  {
    label:'商品单价',
    prop: 'TODO12',
    minWidth: '110px'
  },
  {
    label: '订单总金额',
    prop: 'TODO13',
    minWidth: '110px'
  },
  {
    label: '税目',
    prop: 'TODO14',
    minWidth: '80px'
  },
  {
    label: '税目名称',
    prop: 'TODO15',
    minWidth: '100px'
  },
  {
    label: '关联金额',
    prop: 'TODO16',
    minWidth: '100px'
  },
  {
    label: '购买方公司名称',
    prop: 'TODO17',
    minWidth: '110px'
  },
  {
    label: '购买方公司纳税识别号',
    prop: 'TODO18',
    minWidth: '140px'
  },
  {
    label: '发票号码',
    prop: 'TODO19',
    minWidth: '100px'
  },
  {
    label: '发票类型',
    prop: 'TODO20',
    minWidth: '100px'
  },
  {
    label: '销售方公司名称',
    prop: 'TODO21',
    minWidth: '110px'
  },
  {
    label: '销售方公司纳税号',
    prop: 'TODO22',
    minWidth: '140px'
  },
  {
    label: '发票明细ID',
    prop: 'TODO23',
    minWidth: '110px'
  },
  {
    label: '货物或应税劳务、服务名称',
    prop: 'TODO24',
    minWidth: '200px'
  },
  {
    label: '类目编号',
    prop: 'TODO25',
    minWidth: '90px'
  },
  {
    label: '规格型号',
    prop: 'TODO27',
    minWidth: '110px'
  },
  {
    label: '单位',
    prop: 'TODO28',
    minWidth: '80px'
  },
  {
    label: '数量',
    prop: 'TODO29',
    minWidth: '80px'
  },
  {
    label: '税前单价',
    prop: 'TODO30',
    minWidth: '100px'
  },
  {
    label: '税前总价',
    prop: 'TODO30',
    minWidth: '100px'
  },
  {
    label: '税率',
    prop: 'TODO31',
    minWidth: '80px'
  },
  {
    label: '税后单价',
    prop: 'TODO32',
    minWidth: '100px'
  },
  {
    label: '税后总额',
    prop: 'TODO33',
    minWidth: '100px'
  },
  {
    label: '类目编号状态',
    prop: 'TODO34',
    minWidth: '100px'
  },
  {
    label: '税率状态',
    prop: 'TODO35',
    minWidth: '100px'
  },
  {
    label: '备注',
    prop: 'TODO36',
    minWidth: '80px'
  },
  {
    label: '入账月份',
    prop: 'TODO37',
    minWidth: '80px'
  }
]

const orderTemplate = [columns.slice(1).reduce((prev, current) => {
  return { ...prev, [current.label]: current.detaultData ? current.defaultData : '' }
}, {})]

export { initheaders, columns, orderTemplate };
