/**
 *
 * @param {*} _this 当前vue 的实例
 * @returns  返回一个表格配置数组
 */

export const columns = (_this) => [
  {
    prop: 'warehousingNumber',
    label: '入库文件号'
  },
  {
    prop: 'volumeOrder',
    label: '册序号'
  },
  {
    prop: 'warehousingDate',
    label: '入库日期'
  },
  {
    prop: 'avmatCatalogName',
    label: '名称'
  },
  {
    prop: 'specification',
    label: '型号'
  },
  {
    prop: 'diagramNumber',
    label: '图号'
  },
  {
    prop: 'machineNumber',
    label: '机件号'
  },
  {
    prop: 'warehousingProperty',
    label: '入库性质'
  },
  {
    prop: 'actualNumber',
    label: '实收数'
  },

  {
    button: true,
    label: '操作',
    width: '340px',
    group: [
      {
        name: '删除',
        type: 'text',
        round: false,
        plain: false,
        onClick: (row, index, scope) => {
          _this.handRemove(row)
        }
      },
      {
        name: '手动匹配',
        type: 'text',
        round: false,
        plain: false,
        onClick: (row, index, scope) => {
          _this.matching('manually', row)
        }
      }
    ]
  }
]

export const data = [
  { id: '1', inboundFileNumber: '成G9 xx', outboundDate: '2022-03-01', equipmentName: '发动机', model: 'ZG-1', figureNumber: 'K-7H-1', machineNumber: '03', aircraftNumber: '25', payoffProperty: '发付性质', payoffNumber: '1' },
  { id: '2', inboundFileNumber: '成G10 xx', outboundDate: '2022-07-01', equipmentName: '发动机', model: 'ZG-1', figureNumber: 'K-7H-1', machineNumber: '03', aircraftNumber: '25', payoffProperty: '发付性质', payoffNumber: '1' }
]

/**
 *
 * @returns 返回表格基础配置项
 */
export const options = {
  stripe: true, // 斑马纹
  mutiSelect: true, // 多选框
  index: false, // 显示序号， 多选则 mutiSelect
  loading: false, // 表格动画
  initTable: true, // 是否一挂载就加载数据
  border: true,
  height: 'calc(100vh - 300px)'
}
