<!--
  @description: 收货&发货-订单处理-编辑&详情-订单基本信息组件
  @author: 王俊楠
  @routerPath:
  @date： 2020-10-30 14:02:12
-->
<template>
  <div>
    <p class="page-title">
      1.订单基本信息
    </p>
    <table class="tableData mb16">
      <tr>
        <td>订单编号</td>
        <td>{{ orderInfoList.orderCode }}</td>
        <td>
          <p>
            订单名称
          </p>
        </td>
        <td>
          <p>
            {{ orderInfoList.orderName }}
          </p>
        </td>
      </tr>
      <tr>
        <td>供应商名称</td>
        <td>{{ orderInfoList.winningDepartName }}</td>
        <td>采购人</td>
        <td>{{ orderInfoList.purchaseDepartName }}</td>
      </tr>
      <tr>
        <td>供应商联系人</td>
        <td>{{ orderInfoList.winningLinker }}</td>
        <td>联系人电话</td>
        <td>{{ orderInfoList.linkerTel }}</td>
      </tr>
      <tr>
        <td>订单净总价(元)</td>
        <td>{{ orderInfoList.orderTotalMoney?moneyFormat(orderInfoList.orderTotalMoney.toFixed(2)):orderInfoList.orderTotalMoney }}</td>
        <td>订单含税总价(元)</td>
        <td>{{ orderInfoList.orderTotalTaxMoney && moneyFormat(orderInfoList.orderTotalTaxMoney.toFixed(2)) }}</td>
      </tr>
      <tr>
        <td>创建日期</td>
        <td>{{ $Moment(orderInfoList.createTime).format(momentDate) }}</td>
        <td>状态</td>
        <td>
          {{ filterDictText(procurementOrderOrderStatusList, orderInfoList.orderStatus) }}
        </td>
      </tr>
      <tr>
        <td>订单来源</td>
        <td>
          {{ filterDictText(tender_methodList,orderInfoList.tenderMethod) }}
        </td>
        <td>
          <p>
            送货地址
          </p>
        </td>
        <td>
          {{ orderInfoList.deliveryAddress }}
        </td>
      </tr>
    </table>
  </div>
</template>

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

export default {
  name: 'ProcurementOrderBasicCompDetail',
  mixins: [procurementOrderGroupMixins],
  // 订单基本信息
  props: {
    orderInfoData: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      orderInfoList: [], // 订单基本信息
      confirmLoading: false // 页面加载
    }
  },
  watch: {
    // 订单基础信息
    orderInfoData: {
      handler(val, old) {
        // 如果新值和旧值相同，则不触发方法。
        if (val !== old) {
          this.orderInfoList = val // props传值本页面
        }
      },
      deep: true
    }
  },
  methods: {
    filterDictText, // 字典翻译
    moneyFormat // 金额
  }
}
</script>

<style scoped>

</style>
