<!--
  @description:待确认收费列表
  @Modifier: 王俊楠
  @routerPath:
  @date: 2020-11-18-14:12
-->
<template>
  <el-table
    ref="smallTable"
    v-loading="loading"
    :data="tableData"
    select-on-indeterminate
    :row-key="getRowKeys"
    @selection-change="selectionChange"
  >
    <el-table-column
      type="selection"
      width="55"
      align="center"
    />
    <el-table-column
      type="index"
      label="序号"
      align="center"
      width="60"
    />
    <el-table-column
      prop="serviceFeeCode"
      label="服务费单号"
      header-align="center"
      align="center"
      min-width="180"
    />
    <el-table-column
      :formatter="formatterOrderTotalMoney"
      prop="shouldChargeMoney"
      label="应收服务费金额(元)"
      min-width="180"
      header-align="center"
      align="right"
    />
    <el-table-column
      prop="orderCode"
      label="订单编号"
      header-align="center"
      align="center"
      min-width="140"
    />
    <el-table-column
      prop="supplierName"
      label="供应商名称"
      header-align="center"
      align="left"
      min-width="220"
    />
    <el-table-column
      prop="purchaseDepartName"
      label="采购单位"
      min-width="220"
      header-align="center"
      align="left"
    />
    <el-table-column
      :formatter="formatterOrderTotalMoney"
      prop="orderTotalMoney"
      label="订单不含税总额(元)"
      min-width="130"
      header-align="center"
      align="right"
    />
    <el-table-column
      :formatter="formatterOrderTotalMoney"
      prop="taxOrderTotalMoney"
      label="订单含税总额(元)"
      min-width="120"
      header-align="center"
      align="right"
    />
    <el-table-column
      prop="createTime"
      label="订单生效时间"
      align="center"
      width="150"
      header-align="center"
    />
    <!-- 采购员 -->
    <el-table-column
      prop="purchaseUserRealName"
      label="采购员"
      min-width="140"
      header-align="center"
      align="left"
    />
    <!-- 采购单结果 -->
    <el-table-column
      prop="tenderNo"
      label="采购单结果"
      min-width="140"
      header-align="center"
      align="left"
    />
    <el-table-column
      :formatter="formatterOrderTotalMoney"
      prop="reliefMoney"
      label="减免金额"
      header-align="center"
      align="left"
      min-width="180"
    />
  </el-table>
</template>

<script>
/* 混入公共方法*/
import { orderServeFeeMixins } from '../../mixins/orderServeFeeMixins'

export default {
  name: 'WaitCollectionList',
  mixins: [orderServeFeeMixins],
  props: {
    loading: {
      type: Boolean,
      default: function() {
        return {}
      }
    },
    tableData: {
      type: Array,
      default: function() {}
    } // 自建项目列表
  },
  methods: {
    // 选择批量待确认收费的数据
    selectionChange(val) {
      this.$emit('selectionChange', val)
    },
    // 获取row的key值优化表格的渲染
    getRowKeys(row) {
      return row.planDetailId
    }
  }
}
</script>

<style lang="less" scoped>
</style>
