<template>
  <div id="taskdetail">
    <div class="topbar">
      <div class="topbar_left" @click="goback">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-fanhui"></use>
        </svg>
      </div>
      <div class="topbar_middle">
        销售订单详情
      </div>
      <div class="topbar_right">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-caidan"></use>
        </svg>
      </div>
    </div>
    <div id="content">
      <div class="toparea_dt" :class="colortop">
        <div class="taskcode_dt">
          SC181211001
          <svg class="icon" aria-hidden="true" v-if="ifnew==1">
            <use xlink:href="#icon-ziyuan"></use>
          </svg>
        </div>
        <div class="taskflag_dt">
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-weikaishi" v-if="taskflag_dt=='待审核'"></use>
            <use xlink:href="#icon-jindu" v-if="taskflag_dt=='在进行'"></use>
            <use xlink:href="#icon-CombinedShape" v-if="taskflag_dt=='已完成'"></use>
          </svg>
          {{taskflag_dt}}
        </div>
      </div>
      <div class="taskinfo_dt">
        <div class="cust_dt">
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-kehu"></use>
          </svg>
          广东省佛山市顺德区某某经销商
        </div>
      </div>
      <div class="reptel_dt">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-address"></use>
        </svg>
        <span>王利云</span>
        <span style="margin-left:10px;">13800138000</span>
      </div>
      <div class="address_dt">地址：广东省顺德市芙蓉中路二段115号湖南千思湖南千思湖南千思湖南千思湖南千思</div>

      <div class="liubai_dt"></div>

      <div class="middlearea">
        <div class="taskinfo_dttitle_dt">
          <div class="title_dt">业务员：</div>
          <div class="taskinfo_dtitem">张大三</div>
        </div>
        <div class='taskinfo_dtflex'>
          <div class="taskinfo_dttitle_dt">
            <div class="title_dt ">订货日期：</div>
            <div class="taskinfo_dtitem leftsize">2018-12-10</div>
          </div>
          <div class="taskinfo_dttitle_dt">
            <div class="title_dt rightside">交货日期：</div>
            <div class="taskinfo_dtitem requiredate">2018-12-30</div>
          </div>
        </div>
        <div class="taskinfo_dtamt">
          <div class="taskinfo_dttitle_dt">
            <div class="title_dt">金额：</div>
            <div class="taskinfo_dtitem taskamt leftsize">¥100000</div>
          </div>
          <div class="taskinfo_dttitle_dt dingjin">
            <div class="title_dt rightside">订金：</div>
            <div class="taskinfo_dtitem taskamt">¥30000</div>
          </div>
        </div>
        <div class="taskinfo_dtamt">
          <div class="taskinfo_dttitle_dt">
            <div class="title_dt">优惠金额：</div>
            <div class="taskinfo_dtitem taskamt leftsize">¥8000</div>
          </div>
          <div class="taskinfo_dttitle_dt dingjin">
            <div class="title_dt rightside">已收金额：</div>
            <div class="taskinfo_dtitem taskamt">¥40000</div>
          </div>
        </div>

        <div class="taskinfo_dtamt">
          <div class="taskinfo_dttitle_dt">
            <div class="title_dt">未收金额：</div>
            <div class="taskinfo_dtitem taskamt leftsize">¥52000</div>
          </div>
          <div class="taskinfo_dttitle_dt rightside">
            <div class="title_dt">结算方式：</div>
            <div class="taskinfo_dtitem">款到发货</div>
          </div>
        </div>

        <div class="taskinfo_dttitle_dt" style="margin-top:10px; ">
          <div class="title_dt">货运部：</div>
          <div class="taskinfo_dtitem">佳杰物流</div>
        </div>
        <div class="taskinfo_dttitle_dt">
          <div class="title_dt">货运电话：</div>
          <div class="taskinfo_dtitem">13928952902</div>
        </div>
        <div class="hyaddress_dt">货运部地址：乐从水藤加油站后面陆通物流园A6座12-16仓湖南大本营</div>
      </div>

      <div class="dscrp">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-wentibuchong"></use>
        </svg>
        备注：客户要求先发样板进行确认再排产。
      </div>

      <div class="liubai_dt"></div>

      <div class="subtitle_dt">订单进度跟踪</div>
      <div class="jindu">
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-buzhoutiaowancheng"></use>
          </svg>
          下单日期：2018-12-09
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-buzhoutiaowancheng"></use>
          </svg>
          审核时间：2018-12-11 09:30
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-buzhoutiaowancheng"></use>
          </svg>
          物料清单审核：2018-12-11 15:32
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-buzhoutiaowancheng"></use>
          </svg>
          主生产计划MRP：2018-12-12 14:29
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-buzouweijinxing"></use>
          </svg>
          物料采购下单：
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-buzouweijinxing"></use>
          </svg>
          唛头采购下单：
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-baifenbi"></use>
          </svg>
          材料入库：33%
          <span class="jindubtn">欠料情况</span>
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-baifenbi"></use>
          </svg>
          发料完成：10%
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-baifenbi"></use>
          </svg>
          木工：90%
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-baifenbi"></use>
          </svg>
          裁剪：10%
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-baifenbi"></use>
          </svg>
          入库：2%&nbsp&nbsp(20/1000)
        </div>
        <div> <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-buzouweijinxing"></use>
          </svg>
          订船日期：
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-buzouweijinxing"></use>
          </svg>
          装柜日期：
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-buzouweijinxing"></use>
          </svg>
          发货开单日期：
        </div>
        <div>
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-buzouweijinxing"></use>
          </svg>
          发货完成日期：
        </div>
        <!-- <div>
          *要求完成日期：
        </div> -->


      </div>

      <div class="liubai_dt"></div>
      <!-- <div class="mxjdinfo">*点击明细可查看明细产品进度</div> -->
      <div class="subtitle_dt">订单明细</div>
      <div class="taskmx_dt">

        <div id="rowmx_dt">
          <div class="mxmtrl_dt">
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-dian"></use>
            </svg>
            218B两人位沙发，拉扣:布扣|座包:型号标配|配置:皮加布|
          </div>
          <div class="mx_bottomarea">
            <div class="mxqty_dt">数量：100，¥50000</div>
            <div class="mx_btndetail" @click="gotomxjd">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-chakan"></use>
              </svg>
              查看进度
            </div>
          </div>
        </div>

        <div id="rowmx_dt">
          <div class="mxmtrl_dt">
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-dian"></use>
            </svg>
            6528茶几，型号：P069（72913）
          </div>
          <div class="mx_bottomarea">
            <div class="mxqty_dt">数量：100，¥30000</div>
            <div class="mx_btndetail" @click="gotomxjd">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-chakan"></use>
              </svg>
              查看进度
            </div>
          </div>
        </div>


        <div id="rowmx_dt">
          <div class="mxmtrl_dt">
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-dian"></use>
            </svg>
            电视柜，型号：T9999
          </div>
          <div class="mx_bottomarea">
            <div class="mxqty_dt">数量：100，¥20000</div>
            <div class="mx_btndetail" @click="gotomxjd">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-chakan"></use>
              </svg>
              查看进度
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {

    name: 'saletaskDetail',
    data() {
      return {
        taskflag_dt: '待审核',
        ifnew: 1
      };
    },
    methods: {
      goback() {
        {
          history.back();
        }
      },
      gotomxjd() {
        this.$router.push({
          path: "/salemxjd"
        });
      }
    },
    computed: {
      colortop: function () {
        return {
          bgcolorred: this.taskflag_dt == "待审核",
          bgcolorgreen: this.taskflag_dt == "在进行",
          bgcolorblue: this.taskflag_dt == "已完成"
        };
      },
    }
  }

</script>

<style>
  body {
    margin: 0;
    padding: 0;
    /* background-color: #fff; */
    font-family: "微软雅黑";
  }

  .topbar {
    min-height: 44px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
    position: fixed;
    width: 100%;
    z-index: 9999;
    display: flex;
    font-size: 18px;
    align-items: center;
  }

  .topbar_left {
    /* flex: 0 0 %; */
    margin-left: 10px;
  }

  .topbar_middle {
    text-align: center;
    flex: 0 0 85%;
  }

  .topbar_right {
    /* flex: 0 0 10%; */
    position: absolute;
    right: 10px;
  }

  #taskdetail {
    background-color: #fff;
  }

  #content {
    position: absolute;
    top: 44px;
    background-color: #fff;
    width: 100%
  }

  .toparea_dt {
    color: white;
    background-color: rgb(252, 78, 44);
    height: 80px;
    display: flex;
  }

  .bgcolorred {
    background-color: #fc4e2c
  }

  .bgcolorgreen {
    background-color: #8dc026;
  }

  .bgcolorblue {
    background-color: #1e90ff;
  }

  .taskcode_dt {
    font-size: 20px;
    font-weight: bold;
    padding: 10px 0 10px 20px;
    line-height: 30px;
  }

  .taskflag_dt {
    font-size: 16px;
    font-weight: bold;
    padding: 10px;
    line-height: 30px;
    position: absolute;
    right: 20px;
  }

  .taskinfo_dt {
    background-color: #fff;
    width: 100%;
    height: 35px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 0px;
    border-bottom-left-radius: 0px;
    position: absolute;
    top: 50px;
  }

  .cust_dt {
    font-size: 16px;
    font-weight: bold;
    padding: 10px
  }

  .reptel_dt {
    font-size: 14px;
    font-weight: bold;
    margin: 10px 0 2px 10px;
  }

  .address_dt {
    font-size: 13px;
    margin-left: 30px;
    margin-right: 20px;
    margin-bottom: 10px;
    color: #666;
  }

  .hyaddress_dt {
    font-size: 13px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
    color: #666;
  }

  .liubai_dt {
    width: 100%;
    height: 10px;
    background-color: #f6f6f6;
  }

  .middlearea {
    margin: 10px;
    font-size: 14px;
  }

  .taskinfo_dtflex {
    display: flex;
    /* height: 60px; */
    align-items: center;
    line-height: 20px;
  }

  .taskinfo_dttitle_dt {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    flex-wrap: wrap;
  }

  .title_dt {
    width: 80px;
    text-align: right
  }

  .taskinfo_dtitem {
    font-weight: normal;
    color: #333;

  }

  .taskinfo_dtamt {
    display: flex;
    line-height: 20px;
  }

  .taskamt {
    font-weight: bold;
    color: red;
  }

  .leftsize {
    width: 100px;
  }

  .dscrp {
    border-radius: 10px;
    background: rgb(240, 237, 237);
    padding: 10px 20px;
    margin: 0 20px 10px 20px;
    font-size: 14px;
    color: #555;
    line-height: 18px;
  }

  .subtitle_dt {
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    margin: 0 20px;
    height: 42px;
    line-height: 43px;
  }

  .jindu {
    border-top: 1px solid #f0f0f0;
    margin: 0 20px;
    font-size: 14px;
    line-height: 30px;
    padding: 10px 0;
  }

  .jindubtn {
    margin-left: 20px;
    border: 1px solid #bbb;
    padding: 0 10px;
    border-radius: 15px;
    font-size: 13px;
  }

  .taskmx_dt {
    border-top: 1px solid #f0f0f0;

  }

  #rowmx_dt {

    margin-bottom: 10px;
  }

  .mxmtrl_dt {
    margin: 5px;
    font-size: 14px;
  }

  .mxqty_dt {
    font-size: 14px;
    color: #888;
    margin-bottom: 3px;
    margin-left: 25px;
  }

  .mxjdinfo {
    background-color: #f6f6f6;
    font-size: 12px;
    color: #888;
    padding: 5px 0 5px 5px;
  }

  .mx_bottomarea {
    display: flex;
  }

  .mx_btndetail {
    position: absolute;
    right: 20px;
    color: #888;
    font-size: 13px;
    margin-right: 0px;
    border-radius: 5px;
  }

</style>
