<!--
  @description: 退货详情-订单状态
  @Modifier：dijia
  @routerPath:
  @date：2021/07/29
-->
<template>
  <div class="m order-info-mod">
    <div v-if="orderDetailObj.orderBackLog" 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.orderBackLog.status) }}
      </div>
      <div class="order-info-content">
        <div>
          <div class="item">
            <span class="label">
              售后单编号：
            </span>
            <div class="info-rcol" :title="orderDetailObj.orderBackLog.returnId">
              {{ orderDetailObj.orderBackLog.returnId }}
            </div>
          </div>
          <div class="item">
            <span class="label">
              申请人：
            </span>
            <div class="info-rcol" :title="orderDetailObj.orderBackLog.createUserName">
              {{ orderDetailObj.orderBackLog.createUserName }}
            </div>
          </div>
          <div class="item">
            <span class="label">
              联系电话：
            </span>
            <div class="info-rcol" :title="orderDetailObj.orderBackLog.phoneNumber">
              {{ orderDetailObj.orderBackLog.phoneNumber }}
            </div>
          </div>
        </div>
      </div>
      <!--  -->
      <div class="order-info-content">
        <div>
          <div class="item">
            <span class="label">
              申请时间：
            </span>
            <div class="info-rcol" :title="orderDetailObj.orderBackLog.createTime">
              {{ orderDetailObj.orderBackLog.createTime }}
            </div>
          </div>
          <div class="item">
            <span class="label">
              采购部门：
            </span>
            <div class="info-rcol" :title="orderDetailObj.orderBackLog.buyerDepartName">
              {{ orderDetailObj.orderBackLog.buyerDepartName }}
            </div>
          </div>
          <div class="item">
            <span class="label">
              退款金额：
            </span>
            <div class="info-rcol" :title="orderDetailObj.orderBackLog.backAmount" style="color: #1f94f4;">
              ￥{{ orderDetailObj.orderBackLog.backAmount }}
            </div>
          </div>
        </div>
      </div>
      <div class="order-info-content">
        <div>
          <div class="item">
            <span class="label">
              订单编号：
            </span>
            <div class="info-rcol" :title="orderDetailObj.orderBackLog.orderNo">
              {{ orderDetailObj.orderBackLog.orderNo }}
            </div>
          </div>
          <div class="item">
            <span class="label">
              供应商：
            </span>
            <div class="info-rcol" :title="orderDetailObj.orderBackLog.type">
              {{ orderDetailObj.orderBackLog.type }}
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { filterDictText } from '@/assets/js/utils'// 常用方法
export default {
  name: 'OrderStatus',
  components: {
  },
  props: {
    orderDetailObj: {
      type: Object,
      default: function() {
        return {}
      }
    }
  },
  data() {
    return {
      orderStatus: [
        { typename: '待处理', typecode: '00' },
        { typename: '退货中', typecode: '01' },
        { typename: '已取消', typecode: '02' },
        { typename: '拒绝退货', typecode: '03' },
        { typename: '未收到退货', typecode: '04' },
        { typename: '买家退货', typecode: '05' },
        { typename: '卖家确认并发货', typecode: '06' },
        { typename: '卖家确认退货完毕', typecode: '09' },
        { typename: '买家确认换货结束', typecode: '10' }
      ]
    }
  },
  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: inline-block;
        width: 100%;
        flex-wrap: wrap;
      }
      .label {
        float: left;
        margin-right: 5px;
      }
      .info-rcol{
        cursor: pointer;
        width: 178px;
        float: left;
        max-height: 72px;
        word-break: break-all;
      }
    }
  }
</style>
