<!--
  @description: 收货订单管理-收款申请确认详情
  @author: 王俊楠
  @routerPath: /procurement/procurementOrderCollectionConfirmDetail
  @date： 2020-10-30 17:10:12
-->
<template>
  <div class="p0-16">
    <section v-if="isBack" class="title title_border">
      <i class="iconfont icon-fanhui pointer" @click="back()" />
      收款申请确认详情
    </section>
    <div>
      <p class="page-title">
        1.收款单信息
      </p>
      <table class="tableData mb16">
        <tr>
          <td>
            采购订单号
          </td>
          <td>
            {{ formData.orderCode }}
          </td>
          <td>
            付款单位
          </td>
          <td>
            {{ formData.paymentDepartName }}
          </td>
        </tr>
        <tr>
          <td>
            付款方式
          </td>
          <td>
            {{ formData.paymentType }}
          </td>
          <td>
            付款账号
          </td>
          <td>
            {{ formData.paymentNumber }}
          </td>
        </tr>
        <tr>
          <td>款项性质</td>
          <td>{{ filterDictText( collectionTypeList,formData.natureOfMoney) }}</td>
          <td>
            收款金额（元）
          </td>
          <td colspan="3">
            <!--金额组件-->
            {{ formData.consigneeAmount?moneyFormat(formData.consigneeAmount.toFixed(2)):formData.consigneeAmount }}
          </td>
        </tr>
        <tr>
          <td>收款单位</td>
          <td>{{ formData.consigneeDepartName }}</td>
          <td>收款账号</td>
          <td>
            {{ formData.consigneeNumber }}
          </td>
        </tr>
        <tr>
          <td>
            收款账户开户行名称
          </td>
          <td>{{ formData.consigneeBankname }}</td>
          <td>开户行行号</td>
          <td>{{ formData.consigneeBankaccount }}</td>
        </tr>
        <tr>
          <td>
            开户行联行号
          </td>
          <td>{{ formData.consigneeUnionpayNumber }}</td>
          <td>联系人</td>
          <td>{{ formData.consigneeLinkerName }}</td>
        </tr>
        <tr>
          <td>
            联系人电话
          </td>
          <td>{{ formData.consigneeLinkerTel }}</td>
          <td>联系人邮箱</td>
          <td>{{ formData.consigneeLinkerEmali }}</td>
        </tr>
        <tr>
          <td>
            收款人备注
          </td>
          <td colspan="3">
            {{ formData.consigneeRemark }}
          </td>
        </tr>
      </table>
      <p class="page-title">
        2.采购方开票信息
      </p>
      <table class="tableData mb16">
        <tr>
          <td>发票抬头</td>
          <td>{{ formData.paymentInvoiceTitle }}</td>
          <td>
            发票税号
          </td>
          <td>
            <p>
              {{ formData.paymentTaxpayerIdentificationNumber }}
            </p>
          </td>
        </tr>
        <tr>
          <td>发票开户行、账号</td>
          <td>{{ formData.paymentBankname }}</td>
          <td>发票地址、电话</td>
          <td>{{ formData.paymentTaxpayerIdentificationNumber }}</td>
        </tr>
        <tr>
          <td>开票内容</td>
          <td>{{ formData.paymentInvoiceMessage }}</td>
          <td>开票税率（%）</td>
          <td>{{ formData.paymentInvoiceRate }}</td>
        </tr>
      </table>
    </div>
  </div>
</template>

<script>
/* api接口*/
import {
  queryConsigneeApplicationInfo
} from '@/api/procurement/procurementOrder'
/* 公共方法 */
import { filterDictText, moneyFormat } from '@/assets/js/utils' // 字典code翻译中文
import { procurementOrderGroupMixins } from '@/views/procurement/procurementOrder/mixins/procurementOrderGroupMixins.js'

/*  公共组件 */
import money from '@comp/common/money/money'// 金额组件

export default {
  name: 'ProcurementOrderCollectionAdd',
  components: {
    money// 金额组件
  },
  mixins: [procurementOrderGroupMixins],

  data() {
    return {
      isBack: true,
      // 收款申请页数据
      formData: {},
      confirmLoading: false
    }
  },
  computed: {
  },
  watch: {
  },
  created() {
    this.isBack = this.$route.params.isBack !== '00'
    this.loadData()
  },
  methods: {
    filterDictText, // 字典code翻译中文
    moneyFormat, // 金额千分位
    // 返回收货订单处理页面
    back() {
      this.$router.push({
        path: '/procurement/procurementOrderReceiveHandleDetail'
      })
    },
    // 获取数据
    loadData() {
      const params = this.$route.params
      queryConsigneeApplicationInfo(params).then(response => {
        this.loading = false
        this.formData = response.data
      }).catch(() => {
        this.loading = false
      })
    }
  }
}
</script>

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

