<!--
  @description: 订单详情-订单状态
  @Modifier：杨胜国
  @routerPath:orderInfo-detail
  @date：  2021/06/01-10:00
-->
<template>
  <div class="m order-info-mod">
    <div class="order-info order-info-new mc">
      <div class="order_title">
        <img src="@/assets/img/shopmall/orderstatus.png" width="24px" height="24px">
        订单状态：
        {{ filterDictText(orderStatus, orderDetailObj.orderstatus) }}
      </div>
      <div class="order-info-content">
        <div>
          <div class="item">
            <span class="label">
              订单编号：
            </span>
            <div class="info-rcol" :title="orderDetailObj.orderNo">
              {{ orderDetailObj.orderNo ? orderDetailObj.orderNo : '暂无' }}
            </div>
          </div>
          <div class="item">
            <span class="label">
              采购人：
            </span>
            <div class="info-rcol" :title="orderDetailObj.receiverName">
              {{ orderDetailObj.receiverName ? orderDetailObj.receiverName : '暂无' }}
            </div>
          </div>
          <div class="item">
            <span class="label">
              采购部门：
            </span>
            <div class="info-rcol" :title="orderDetailObj.buyerDepartName">
              {{ orderDetailObj.buyerDepartName ? orderDetailObj.buyerDepartName : '暂无' }}
            </div>
          </div>
        </div>
      </div>
      <!--  -->
      <div class="order-info-content">
        <div>
          <div class="item">
            <span class="label">
              下单时间：
            </span>
            <div class="info-rcol" :title="orderDetailObj.createTime">
              {{ orderDetailObj.createTime ? orderDetailObj.createTime : '暂无' }}
            </div>
          </div>
          <div class="item">
            <span class="label">
              手机号码：
            </span>
            <div class="info-rcol" :title="orderDetailObj.phoneNumber">
              {{ orderDetailObj.phoneNumber ? orderDetailObj.phoneNumber : '暂无' }}
            </div>
          </div>
        </div>
      </div>
      <div class="order-info-content">
        <div>
          <div class="item">
            <span class="label">
              供应商：
            </span>
            <div class="info-rcol" :title="orderDetailObj.goodsDepartName">
              {{ orderDetailObj.goodsDepartName ? orderDetailObj.goodsDepartName : '暂无' }}
            </div>
          </div>
          <div class="item">
            <span class="label">
              供应商订单号：
            </span>
            <div class="info-rcol" :title="orderDetailObj.supplierOrderId ? orderDetailObj.supplierOrderId : '暂无'">
              {{ orderDetailObj.supplierOrderId ? orderDetailObj.supplierOrderId : '暂无' }}
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { filterDictText } from '@/assets/js/utils'// 常用方法
import { orderGrounpMixin } from '../../allOrder/mixins/orderGroupMixins' // 公共字典
export default {
  name: 'TrackDetail',
  components: {
  },
  mixins: [orderGrounpMixin],
  props: {
    orderDetailObj: {
      type: Object,
      default: function() {
        return {}
      }
    }
  },
  data() {
    return {
    }
  },
  methods: {
    filterDictText // 字典值替换文本通用方法

  }
}
</script>

<style scoped lang="less">
.order-info-mod{
    box-shadow: 2px 2px 5px #dcd8d8;
    margin-bottom: 20px;
    .order_title{
      padding-top: 15px;
      margin-bottom: 15px;
      font-size: 16px;
      margin-left: 26px;
    }
    .mc{
      border-top-width: 4px;
      background: #fff;
      border: 1px solid #eee;
    }
    .order-info {
      height: 250px;
      display: block;
      position: relative;
      padding: 15px 0;
      .order-info-content{
        // height: 100%;
        width: 30%;
        float: left;
        font-family: 'PingFangSC-Regular', 'PingFang SC';
        font-style: normal;
        font-size: 12px;
        // border: 1px solid #f1f1f1;
        padding: 0 10px 0 30px;
        margin: 0 0 0 -1px;
        border-width: 0 0 0 1px;
      }
      .order-info-content:nth-child(2) {
        margin-left: 2%;
      }
      .item {
        margin-top: 20px;
        display: flex;
        width: 100%;
        flex-wrap: wrap;
      }
      .label {
        float: left;
        margin-right: 5px;
      }
      .info-rcol{
        cursor: pointer;
        flex: 1;
        float: left;
        max-height: 72px;
        word-break: break-all;
      }
    }
  }
</style>
