<!--
  @description: 收货&发货-订单处理-编辑&详情-收款申请列表公共
  @author: 王俊楠
  @date： 2020-9-24 22:41:12
-->
<template>
  <div>
    <div class="clearfix offerInfo">
      <p class="fl page-title">
        4.收款申请
        <slot name="addDisposeBtn" />
      </p>
    </div>
    <el-table
      :data="collectionInfoList"
      border
      class="mb16 tableLimit"
    >
      <el-table-column type="index" label="序号" width="55" align="center" />
      <el-table-column
        prop="applicationCode"
        header-align="center"
        align="center"
        min-width="150"
        label="申请单号"
      />
      <el-table-column
        prop="paymentType"
        header-align="center"
        align="center"
        min-width="120"
        label="付款方式"
      />
      <el-table-column
        header-align="center"
        align="left"
        min-width="200"
        label="款项性质"
      >
        <template slot-scope="scope">
          <span>{{ filterDictText(nature_of_moneyList, scope.row.natureOfMoney ) }}</span>
        </template>
      </el-table-column>
      <el-table-column header-align="center" align="right" min-width="110">
        <template slot="header">
          <span>收款金额（元）</span>
        </template>
        <template slot-scope="scope">
          <p>
            {{ scope.row.consigneeAmount }}
          </p>
        </template>
      </el-table-column>
      <el-table-column
        header-align="center"
        align="right"
        min-width="100"
        label="状态"
      >
        <template slot-scope="scope">
          <span>{{ filterDictText(consignee_application_statusList, scope.row.status) }}</span>
        </template>
      </el-table-column>
      <el-table-column
        header-align="center"
        label="操作"
        align="center"
        width="230"
      >
        <template slot-scope="scope">
          <slot :row="scope.row" :index="scope.$index" />
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
/* 公共方法 */
import { filterDictText } from '@/assets/js/utils' // 深拷贝
import { procurementOrderGroupMixins } from '@/views/procurement/procurementOrder/mixins/procurementOrderGroupMixins.js'
// 组件
import pagination from '@comp/common/pagination/pagination' // 分页组件

export default {
  name: 'ProcurementOrderCollectionCompDetail',
  components: {
    pagination
  },
  mixins: [procurementOrderGroupMixins],
  props: {
    // 删除后数据更新
    collectionInfoData: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  data() {
    return {
      // 收款申请确认信息
      collectionInfoList: [],
      // 收款其他数据
      collectionInfoOther: {
      },
      confirmLoading: false // 页面加载
    }
  },
  watch: {
    // 删除收款信息返回数据
    collectionInfoData: {
      handler(val, old) {
        // 如果新值和旧值相同，则不触发方法。
        if (val !== old) {
          this.collectionInfoList = val // props传值本页面
        }
      },
      deep: true
    }
  },
  created() {
  },
  methods: {
    filterDictText
  }

}
</script>

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