<template>
  <div class="directorOrderDetails">
    <div class="head-title">
      <span @click="gobaclk()" class="blue point">{{$t('objFill.v101.dindanlieb')}}</span> / {{$t('commonPickUp.Pick_OrderInfo')}}
    </div>
    <div class="content app-order-detail">
      <el-card class="app-order-status" shadow="never">
        <el-steps :active="activeStep" align-center>
          <el-step :title="$t('objFill.v101.yixiadan')" icon="el-icon-edit" :description="dataInfo.CreateDate">
            <i :class="activeStep>0?'step01Active':'step01'" slot="icon"></i>
          </el-step>
          <template>
            <el-step v-if="dataInfo.PaymentTime=='' && !exitState" :title="$t('objFill.v101.weifukuan')" icon="el-icon-edit"
                     description="2020-05-13 16:36:11">
              <i :class="activeStep>1?'step02Active':'step02'" slot="icon"></i>
            </el-step>
            <el-step v-else :title="$t('objFill.yifukuan')" icon="el-icon-edit" :description="dataInfo.PaymentTime">
              <i :class="activeStep>1?'step02Active':'step02'" slot="icon"></i>
            </el-step>
          </template>
          <template v-if="exitState">
            <el-step :title="$t('hotel.hotel_HasBeenCancelled')" icon="el-icon-edit" :description="dataInfo.CancelTime">
              <i class="stepExit" slot="icon"></i>
            </el-step>
          </template>
          <template v-else>
            <template>
              <el-step v-if="activeStep>2" :title="$t('ground.yiqueding')" icon="el-icon-edit" :description="dataInfo.DeliveryTime">
                <i :class="activeStep>2?'step03Active':'step03'" slot="icon"></i>
              </el-step>
              <el-step v-else :title="$t('ground.daiqueding')" icon="el-icon-edit" description="">
                <i :class="activeStep>2?'step03Active':'step03'" slot="icon"></i>
              </el-step>
            </template>
            <template>
              <el-step v-if="activeStep==3" :title="$t('objFill.v101.daichuxing')" icon="el-icon-edit">
                <i :class="activeStep==4?'step04Active':'step04'" slot="icon"></i>
              </el-step>
              <el-step v-else-if="activeStep>3" :title="$t('objFill.v101.chuxwancheng')" icon="el-icon-edit" :description="dataInfo.ReceivingTime">
                <i :class="activeStep>3?'step04Active':'step04'" slot="icon"></i>
              </el-step>
            </template>
            <template>
              <el-step v-if="activeStep>4" :title="$t('objFill.v101.activity.yijies')" icon="el-icon-edit" :description="dataInfo.FinishTime">
                <i :class="activeStep>4?'step05Active':'step05'" slot="icon"></i>
              </el-step>
              <el-step v-else :title="$t('objFill.v101.activity.weijies')" icon="el-icon-edit">
                <i :class="activeStep==5?'step05Active':'step05'" slot="icon"></i>
              </el-step>
            </template>
          </template>

        </el-steps>
      </el-card>
      <el-row :gutter="16">
        <el-col :span="8">
          <div class="card-box">
            <h3>{{$t('sm.dingdanxinxi')}}</h3>
            <template v-if="dataInfo.OrderInfo">
              <div flex="dir:left cross:center" class="item-box">
                <span class="label">{{$t('hotel.order_Number')}}:</span>
                <div>{{dataInfo.OrderInfo.OrderNo}}</div>
              </div>
              <div flex="dir:left cross:center" class="item-box">
                <span class="label">{{$t('objFill.v101.shanghudanh')}}:</span>
                <div>{{dataInfo.OrderInfo.MerchantsNo}}</div>
              </div>
              <div flex="dir:left cross:center" class="item-box">
                <span class="label">{{$t('objFill.zffs')}}:</span>
                <span
                  class="el-tag el-tag--success el-tag--small el-tag--light is-hit">{{dataInfo.OrderInfo.PaymentWayName}}</span>
              </div>

              <div flex="dir:left cross:center" class="item-box" v-if="dataInfo.CouponMoney && dataInfo.CouponMoney !='' && dataInfo.CouponMoney>0">
                <span class="label">{{$t('sm.youhuijine')}}:</span>
                <div>¥{{dataInfo.CouponMoney}}</div>
              </div>
              <div flex="dir:left cross:center" class="item-box"  v-if="dataInfo.IntegralMoney && dataInfo.IntegralMoney !='' && dataInfo.IntegralMoney>0">
                <span class="label">{{$t('objFill.v101.jifendiyj')}}:</span>
                <div>¥{{dataInfo.IntegralMoney}}</div>
              </div>
              <div flex="dir:left cross:center" class="item-box"  v-if="dataInfo.IntegralNumber && dataInfo.IntegralNumber !='' && dataInfo.IntegralNumber>0">
                <span class="label">{{$t('objFill.v101.jifenshu')}}:</span>
                <div>¥{{dataInfo.IntegralNumber}}</div>
              </div>
              <div flex="dir:left cross:center" class="item-box"  v-if="dataInfo.MemberDiscountCouponList && dataInfo.MemberDiscountCouponList.length >0">
                <span class="label">{{$t('objFill.v101.Rest.youhuiquanxinx')}}:</span>
                <div>
                  <span v-for="(MItem,Mindex) in dataInfo.MemberDiscountCouponList" :key="Mindex">
                      {{MItem.Name}}{{$t('objFill.v101.quan')}},{{MItem.CouponType==1?$t('active.cl_man')+MItem.MinConsumePrice+$t('objFill.v101.yuanjian')+MItem.DiscountsPrice+$t('hotel.hotel_yuan'):$t('active.cl_man')+MItem.MinConsumePrice+$t('objFill.v101.yuanda')+MItem.DiscountsPrice+$t('objFill.v101.Rest.zhe')}}
                    </span>
                </div>
              </div>
              <div flex="dir:left cross:center" class="item-box">
                <span class="label">{{$t('active.cl_user')}}:</span>
                <div>{{dataInfo.OrderInfo.UserName}}</div>
              </div>
              <div flex="dir:left cross:center" class="item-box">
                <span class="label">{{$t('hotel.suplier_contact')}}:</span>
                <div>{{dataInfo.OrderInfo.Consignee}}</div>
              </div>
              <div flex="dir:left cross:center" class="item-box">
                <span class="label">{{$t('hotel.table_tel')}}:</span>
                <div>{{dataInfo.OrderInfo.Mobile}}</div>
              </div>
              <div flex="dir:left cross:center" class="item-box">
                <span class="label">{{$t('admin.admin_address')}}:</span>
                <div class="express-address">{{dataInfo.OrderInfo.DistrictAddress}}
<!--                  {{dataInfo.OrderInfo.ShoppingAddress}}-->
<!--                  <button v-if="activeStep==2 || activeStep==3" @click="ExitshAdress(dataInfo.OrderInfo)" type="button"-->
<!--                          class="el-button el-button&#45;&#45;text el-button&#45;&#45;small is-circle">-->
<!--                    <i class="el-icon-edit"></i>-->
<!--                  </button>-->
                </div>
              </div>
              <div flex="dir:left cross:center" class="item-box">
                <span class="label">{{$t('sm.chufadi')}}:</span>
                <div class="express-address">
                  {{dataInfo.OrderInfo.ShoppingAddress}}
                  <button v-if="activeStep==2 || activeStep==3" @click="ExitshAdress(dataInfo.OrderInfo)" type="button"
                          class="el-button el-button--text el-button--small is-circle">
                    <i class="el-icon-edit"></i>
                  </button>
                </div>
              </div>
              <div flex="dir:left cross:center" class="item-box" v-if="dataInfo.DetailList.length>0 && dataInfo.DetailList[0].CarType!=5">
                <span class="label">{{$t('system.query_dest')}}:</span>
                <div class="express-address">
                  {{dataInfo.OrderInfo.DestinationAddress}}
                  <button v-if="activeStep==2 || activeStep==3" @click="ExitshAdress(dataInfo.OrderInfo)" type="button"
                          class="el-button el-button--text el-button--small is-circle">
                    <i class="el-icon-edit"></i>
                  </button>
                </div>
              </div>
              <div v-if="OrderInfo.OrderExpressList && OrderInfo.OrderExpressList.length==1" flex="dir:top"
                   class="item-box">
                <div flex="dir:left cross:center">
                  <span class="label">{{$t('objFill.v101.Buying.wuliuxx')}}:</span>
                  <template v-if="OrderInfo.OrderExpressList && OrderInfo.OrderExpressList.length==1">
                    <el-tag type="info" size="small">{{OrderInfo.OrderExpressList[0].ExpressName}}</el-tag>
                    <a :href="'https://www.baidu.com/s?wd='+OrderInfo.OrderExpressList[0].ExpressName+OrderInfo.OrderExpressList[0].ExpressNumber"
                       target="_blank" :title="$t('objFill.v101.dianjssyundh')">
                      {{OrderInfo.OrderExpressList[0].ExpressNumber}}
                    </a>
                  </template>
                </div>
                <div flex="dir:left" style="margin-top:10px">
                  <span class="label">{{$t('objFill.v101.liuyansjia')}}:</span>
                  <span>{{OrderInfo.OrderExpressList[0].Remark}}</span>
                </div>
              </div>
              <div v-if="OrderInfo.OrderExpressList.length>1" v-for="(item,index) in OrderInfo.OrderExpressList"
                   :key="index" flex="dir:top" class="item-box">
                <el-row>
                  <el-col :span="4">
                    <div>
                      <div class="label"
                           style="background: rgb(255, 250, 239); color: rgb(230, 162, 60); padding: 3px 0px;">
                        {{$t('objFill.v101.shouhuxxin')}}:{{index+1}}
                      </div>
                    </div>
                  </el-col>
                  <el-col :span="18">
                    <div style="display:inline-flex;width:80%" flex="dir:top">
                      <div flex="cross:center">
                        <el-tag type="info" size="small">{{item.ExpressName}}</el-tag>
                        <a style="margin-left:5px"
                           :href="'https://www.baidu.com/s?wd='+item.ExpressName+item.ExpressNumber" target="_blank"
                           :title="$t('objFill.v101.dianjssyundh')">
                          {{item.ExpressNumber}}
                        </a>
                        <button type="button" class="el-button el-button--text is-circle" style="padding: 2px 12px;">
                          <i class="el-icon-edit"></i>
                        </button>
                      </div>
                      <div flex="dir:left" style="margin-top: 10px;">
                        <span class="label">{{$t('objFill.v101.liuyansjia')}}:</span>
                        <span></span>
                      </div>
                      <div v-for="(good,index2) in item.GoodsList" :key="index2" flex="dir:left"
                           style="margin-top: 10px;">
                        <span class="label">{{$t('objFill.v101.peisongsp')}}:</span>
                        <img :src="getIconLink(good.CoverImagePath)" class="goods-pic">
                      </div>
                    </div>
                  </el-col>
                </el-row>
              </div>
            </template>

          </div>
        </el-col>
        <el-col :span="8">
          <div class="card-box">
            <h3>{{$t('objFill.v101.biaodanxinxi')}}</h3>
            <div flex="dir:left cross:center" class="item-box" style="flex-shrink: 0;">
              <span class="label">{{$t('objFill.v101.shangjiabzu')}}:</span>
              <div>
                {{dataInfo.Remark}}
                <i v-if="activeStep==2 || activeStep==3" @click="OrderExit" class="el-icon-edit"
                   style="color: rgb(64, 158, 255); cursor: pointer; margin-left: 10px;"></i>
              </div>
            </div>
            <div v-if="dataInfo.BuyerMessage && dataInfo.BuyerMessage!=''" flex="dir:left cross:center" class="item-box" style="flex-shrink: 0;">
              <span class="label">{{$t('objFill.v101.maijialiy')}}:</span>
              <div>
                {{dataInfo.BuyerMessage}}
              </div>
            </div>
          </div>
        </el-col>
        <el-col :span="8">
          <div flex="dir:top" class="card-box">
            <div  v-if="dataInfo.DistributionInfo !=undefined &&dataInfo.DistributionInfo.length>0 && dataInfo.VipCommissionInfo!=undefined && dataInfo.VipCommissionInfo.length==0">
              <h3>{{$t('objFill.v101.fenxiaoxxi')}}</h3>
              <div v-for="(item,index) in dataInfo.DistributionInfo" :key="index">
                <div class="share-title">
                  <span>{{item.GradeDescription}}</span>
                </div>
                <div flex="dir:left cross:center" class="item-box">
                  <span class="label">{{$t('system.query_name')}}:</span>
                  <div>{{item.UserName}}</div>
                </div>
                <div flex="dir:left cross:center" class="item-box">
                  <span class="label">{{$t('system.table_phone')}}:</span>
                  <div>{{item.Mobile}}</div>
                </div>
                <div flex="dir:left cross:center" class="item-box share-price">
                  <span class="label orange-label">{{$t('objFill.v101.administrative.yongjin')}}:</span>
                  <div>¥{{item.Commission}}</div>
                </div>
              </div>
            </div>
            <div v-if="dataInfo.VipCommissionInfo!=undefined && dataInfo.VipCommissionInfo.length>0">
              <h3 >{{$t('objFill.v101.vipfanli')}}</h3>
              <div  v-for="(item,index2) in dataInfo.VipCommissionInfo" :key="index2">
                <div class="share-title">
                  <span>{{item.GradeDescription}}</span>
                </div>
                <div flex="dir:left cross:center" class="item-box">
                  <span class="label">{{$t('system.query_name')}}:</span>
                  <div>{{item.UserName}}</div>
                </div>

                <div flex="dir:left cross:center" class="item-box share-price">
                  <span class="label orange-label">{{$t('objFill.v101.administrative.yongjin')}}:</span>
                  <div>¥{{item.Commission}}</div>
                </div>
              </div>

            </div>
            <div v-if="dataInfo.OrderIntroductionInfo!=undefined && dataInfo.OrderIntroductionInfo.length>0">
              <h3 >{{$t('objFill.v101.tuijiangysfyo')}}</h3>
              <div  v-for="(item,index2) in dataInfo.OrderIntroductionInfo" :key="index2">
                <div flex="dir:left cross:center" class="item-box">
                  <span class="label">{{$t('system.query_name')}}:</span>
                  <div>{{item.UserName}}</div>
                </div>

                <div flex="dir:left cross:center" class="item-box share-price">
                  <span class="label orange-label">{{$t('objFill.v101.administrative.yongjin')}}:</span>
                  <div>¥{{item.Commission}}</div>
                </div>
              </div>

            </div>
            <div v-if="dataInfo.SmallShopsCommissionInfo!=undefined && dataInfo.SmallShopsCommissionInfo.length>0">
              <h3 >{{$t('objFill.v101.weidianyjin')}}</h3>
              <div  v-for="(item,index2) in dataInfo.SmallShopsCommissionInfo" :key="index2">
                <div class="share-title">
                  <span>{{item.SmallShopsName}}</span>
                </div>
                <div flex="dir:left cross:center" class="item-box">
                  <span class="label">{{$t('system.query_name')}}:</span>
                  <div>{{item.UserName}}</div>
                </div>

                <div flex="dir:left cross:center" class="item-box share-price">
                  <span class="label orange-label">{{$t('objFill.v101.administrative.yongjin')}}:</span>
                  <div>¥{{item.Commission}}</div>
                </div>
              </div>

            </div>


          </div>
        </el-col>
      </el-row>
      <el-card style="margin-top:15px" shadow="never">
        <el-table border :data="dataInfo.DetailList"  style="width: 100%">
          <el-table-column prop="Id" :label="$t('objFill.v101.shangpinbti')">
            <template slot-scope="scope">
              <div flex="dir:left cross:center">
                <img :src="getIconLink(scope.row.CoverImagePath)" alt=""
                     style="height: 60px; width: 60px; margin-right: 5px;">
                <div class="app-ellipsis">
                  <div class="vue-line-clamp" style="word-break: break-all; -webkit-line-clamp: 1;">
                    {{scope.row.GoodsName}}
                  </div>
                </div>
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="name" :label="$t('objFill.xinxi')" width="300" align="center">
            <template slot-scope="scope">
                <div>{{$t('MarketingActi.car')}}:{{scope.row.CarName}}、{{scope.row.CarColorName}}、{{scope.row.CarNumber}}</div>
                <div>{{$t('leader.leader_Guide')}}:{{scope.row.GuideName}}、{{$t('objFill.v101.fuwuleix')}}:{{scope.row.CarTypeName}}、{{scope.row.CarType==5? (scope.row.IsSpell==1?$t('objFill.v101.pinche'):$t('objFill.v101.bupinche')):''}}</div>

            </template>
          </el-table-column>
          <el-table-column prop="Unit_Price" :label="$t('fnc.danjia')" width="120" align="center">
            <template slot-scope="scope">
              ¥{{scope.row.Unit_Price}}
            </template>
          </el-table-column>
          <el-table-column prop="Number" :label="$t('restaurant.res_Number')" width="80" align="center">
          </el-table-column>
          <el-table-column prop="Original_Price" :label="$t('objFill.v101.yuanjia')" width="120" align="center">
            <template slot-scope="scope">
              ¥{{scope.row.Original_Price}}
            </template>
          </el-table-column>
          <el-table-column prop="Final_Price" :label="$t('objFill.v101.zhekouhou')" width="120" align="center">
            <template slot-scope="scope">
              ¥{{scope.row.Final_Price}}
            </template>
          </el-table-column>
          <el-table-column prop="FreeShippingRemarks" :label="$t('pub.pubRemark')" width="200" align="center">

          </el-table-column>
        </el-table>
        <el-form label-width="200px" class="app-order-count-price">
          <el-form-item :label="$t('objFill.v101.shangpinxji')">
            ¥{{dataInfo.PreferPrice}}
          </el-form-item>
          <el-form-item :label="$t('objFill.v101.qizhongbxje')">
            ¥{{dataInfo.InsuranceMoney}}
          </el-form-item>
          <el-form-item :label="$t('objFill.v101.shifukuan')">
            <span style="color: rgb(255, 69, 68);">¥<b>{{dataInfo.Income}}</b></span>
          </el-form-item>
        </el-form>
      </el-card>
      <div flex="dir:right" class="action-box">
        <el-button @click="qrEnd(dataInfo,3)" v-if="activeStep==4 && !exitState" style="margin-left: 10px;" size="small"
                   type="primary">{{$t('objFill.v101.querenwanc')}}</el-button>
        <el-button @click="qrEnd(dataInfo,2)" v-if="activeStep==3 && !exitState" style="margin-left: 10px;"
                   size="small" type="primary">{{$t('objFill.v101.querenchux')}}</el-button>
        <el-button @click="qrEnd(dataInfo,1)" v-if="activeStep==2 && !exitState" style="margin-left: 10px;" size="small"
                   type="primary">{{$t('restaurant.res_confirm')}}</el-button>
      </div>
    </div>
    <!-- 修改收货地址 -->
    <el-dialog :title="$t('objFill.v101.xiugaishdiz')" :visible.sync="shDig" width="600px">
      <el-form :model="shMsg" :rules="shMsgrule" ref="shMsg" label-width="80px">
        <el-form-item :label="$t('objFill.v101.shoujianren')" prop="Consignee">
          <el-input size="small" v-model="shMsg.Consignee"></el-input>
        </el-form-item>
        <el-form-item :label="$t('hotel.table_tel')" prop="Mobile">
          <el-input type="number" size="small" v-model="shMsg.Mobile"></el-input>
        </el-form-item>
        <el-form-item :label="$t('restaurant.res_belongArea')" prop="Province">
          <el-select size="small" @change="shMsg.City='',getCity(shMsg.Province)" v-model="shMsg.Province"
                     style="width:144px" filterable :placeholder="$t('pub.pleaseSel')">
            <el-option v-for="item in provinceList" :key="item.ID" :label="item.Name" :value="item.ID">
            </el-option>
          </el-select>
          <el-select size="small" @change="shMsg.District='',getArea(shMsg.City)" v-model="shMsg.City"
                     style="width:144px" filterable :placeholder="$t('pub.pleaseSel')">
            <el-option v-for="item in cityList" :key="item.ID" :label="item.Name" :value="item.ID">
            </el-option>
          </el-select>
          <el-select size="small" v-model="shMsg.District" style="width:144px" filterable :placeholder="$t('pub.pleaseSel')">
            <el-option v-for="item in areaList" :key="item.ID" :label="item.Name" :value="item.ID">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item :label="$t('hotel.hotel_detailinfo')" prop="ShoppingAddress">
          <el-input size="small" v-model="shMsg.ShoppingAddress"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="shDig = false">{{$t('pub.cancelBtn')}}</el-button>
        <el-button size="small" type="primary" @click="shsubmitForm('shMsg')">{{$t('pub.sureBtn')}}</el-button>
      </span>
    </el-dialog>
    <!-- 订单取消 -->
    <el-dialog :title="$t('pub.updateMsg')" :visible.sync="exitDig" width="600px">
      <el-form :model="exitMsg" ref="exitMsg" label-width="0">
        <p style="padding:10px 0" v-if="exitMsg.Type==1">{{$t('salesModule.UpRemarks')}}:</p>
        <el-form-item>
          <el-input type="textarea" row="2" size="small" v-model="exitMsg.Remark"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="exitDig = false">{{$t('pub.cancelBtn')}}</el-button>
        <el-button size="small" type="primary" @click="submitForm('exitMsg')">{{$t('pub.sureBtn')}}</el-button>
      </span>
    </el-dialog>
    <!-- 发货 -->
    <el-dialog custom-class="app-send" :title="$t('objFill.v101.fahuo')" :visible.sync="fhDig" width="35%">
      <div class="title-box">
        <span class="text">{{$t('objFill.v101.xuanzfahsp')}}</span>
        <span>({{$t('objFill.v101.morenquanx')}})</span>
      </div>
      <el-table ref="fahuoTable" :data="fahuoList" @selection-change="TableSelectChange" style="width: 100%">
        <el-table-column :selectable="selectable" type="selection" width="55">
        </el-table-column>
        <el-table-column prop="id" :label="$t('system.label_img')" width="60">
          <template slot-scope="scope">
            <img style="width:30px;height:30px" :src="domainManager().ImageUrl+scope.row.CoverImagePath" alt="">
          </template>
        </el-table-column>
        <el-table-column prop="GoodsName" :label="$t('system.query_airName')" width="314">
          <template slot-scope="scope">
            <el-tag v-if="scope.row.IsBindExpress==1" style="margin-left:5px" size="small" type="success">{{$t('objFill.v101.yifahuo')}}</el-tag>
            <span>{{scope.row.GoodsName}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="Number" :label="$t('restaurant.res_Number')" width="80">
        </el-table-column>
        <el-table-column prop="Specification" :label="$t('objFill.v101.FinancialModule.guge')">
        </el-table-column>
      </el-table>
      <div class="title-box"><span class="text">{{$t('objFill.v101.Buying.wuliuxx')}}</span></div>
      <el-form :model="fhMsg" ref="exitMsg" :rules="fhrules" label-width="130px">
        <el-form-item :label="$t('objFill.v101.wuliukdi')">
          <el-radio v-model="fhMsg.Type" :label="1">{{$t('objFill.v101.kuaidi')}}</el-radio>
          <el-radio v-model="fhMsg.Type" :label="2">{{$t('objFill.v101.qitafanshi')}}</el-radio>
        </el-form-item>
        <template v-if="fhMsg.Type==1">
          <el-form-item :label="$t('objFill.v101.kuaidigosi')" prop="ExpressId">
            <el-select class="w200" size="small" v-model="fhMsg.ExpressId" filterable :placeholder="$t('pub.pleaseSel')">
              <el-option v-for="item in ExpressList" :key="item.ID" :label="item.Name" :value="item.ID">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="$t('objFill.v101.shoujianryb')">
            <el-input type="number" min="1" size="small" v-model="fhMsg.PostCode"></el-input>
          </el-form-item>
          <el-form-item :label="$t('objFill.v101.kuaididanh')" prop="ExpressNumber">
            <el-input size="small" v-model="fhMsg.ExpressNumber">
              <!-- <el-button slot="append"> 获取面单</el-button> -->
            </el-input>
          </el-form-item>
          <el-form-item :label="$t('objFill.v101.liuyansjia')">
            <el-input type="textarea" row="2" size="small" v-model="fhMsg.Remark"></el-input>
          </el-form-item>
        </template>
        <template v-if="fhMsg.Type==2">
          <el-form-item :label="$t('objFill.v101.liucneir')">
            <el-input type="textarea" row="2" size="small" v-model="fhMsg.Remark"></el-input>
          </el-form-item>
        </template>

      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="fhDig = false">{{$t('pub.cancelBtn')}}</el-button>
        <el-button size="small" type="primary" @click="FhsubmitForm('fhMsg')">{{$t('pub.sureBtn')}}</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        activeStep: 0,
        tableData: [{
          Id: 1
        }],
        OrderId: 0,
        dataInfo: {},
        OrderInfo: {},
        shDig: false,
        shMsg: {
          OrderId: 0,
          Consignee: '',
          Mobile: '',
          Province: '',
          City: '',
          District: '',
          ShoppingAddress: '',
        },
        shMsgrule: {
          Province: [{
            required: true,
            message: this.$t('ground.qxzs'),
            trigger: 'change'
          }],
          ShoppingAddress: [{
            required: true,
            message: this.$t('hotel.hotel_detailInfo'),
            trigger: 'blur'
          }],
          Mobile: [{
            required: true,
            message: this.$t('admin.admin_phPhone'),
            trigger: 'blur'
          }],
          Consignee: [{
            required: true,
            message: this.$t('objFill.v101.qingsrusjianr'),
            trigger: 'blur'
          }],
        },
        provinceList: [],
        cityList: [],
        areaList: [],
        exitMsg: {
          OrderId: 0,
          Type: 1,
          Remark: '',
        },
        exitDig: false,
        fhrules: {
          ExpressId: [{
            required: true,
            message: this.$t('objFill.v101.qingxzkdigsi'),
            trigger: 'change'
          }],
          ExpressNumber: [{
            required: true,
            message: this.$t('objFill.v101.qingsrukdidh'),
            trigger: 'blur'
          }],
        },
        fhMsg: {
          Id: 0,
          OrderId: '',
          Type: 1,
          ExpressId: '',
          PostCode: '',
          ExpressNumber: '',
          Remark: '',
          OrderDetailIdList: [],
        },
        fahuoList: [],
        fhDig: false,
        checkfhList: [],
        ExpressList: [],
        exitState: false,
      };
    },
    created() {
      if (this.$route.query.OrderId) {
        this.OrderId = this.$route.query.OrderId;
        this.getData()
        this.getProvince();
        this.getExpressInfo();

      }
    },
    methods: {

      // 确认完成
      qrEnd(item, num) {
        let msg = {
          OrderId: item.OrderId,
          Type: num
        };
        let that = this;
        let text
        if(num == 1){
          text = this.$t('objFill.v101.shifqrendd')
        }else if(num == 2){
          text = this.$t('objFill.v101.shifouchux')
        }else if(num == 2){
          text = this.$t('objFill.v101.shifouwcgdind')
        }
        that.$confirm(text, this.$t('tips.tips'), {
          confirmButtonText: this.$t('pub.sureBtn'),
          cancelButtonText: this.$t('pub.cancelBtn'),
          type: 'warning'
        }).then(() => {
          this.lxymallapipost('/api/order/SetSDOrderConfirm', msg,
            res => {
              if (res.data.resultCode === 1) {
                this.getData();
                this.Success(res.data.message)
              } else {
                this.Error(res.data.message);
              }
            },
            null
          );
        }).catch(() => {

        });
      },
      // 确认收货
      ConfirmSh(item) {
        let msg = {
          OrderId: item.OrderId,
          Type: 5
        };
        let that = this;
        that.$confirm(this.$t('objFill.v101.shifqrenshuo'), this.$t('tips.tips'), {
          confirmButtonText: this.$t('pub.sureBtn'),
          cancelButtonText: this.$t('pub.cancelBtn'),
          type: 'warning'
        }).then(() => {
          this.lxymallapipost('/api/order/SetOrderOperation', msg,
            res => {
              if (res.data.resultCode === 1) {
                this.getData();
                this.Success(res.data.message)

              } else {
                this.Error(res.data.message);
              }
            },
            null
          );
        }).catch(() => {

        });
      },
      FhsubmitForm(formName) {
        this.$refs[formName].validate((valid) => {
          if (valid) {
            this.fhMsg.OrderDetailIdList = [];
            if (this.checkfhList.length == 0) {
              this.Error(this.$t('objFill.atleastone')+'!');
              return;
            }
            this.checkfhList.forEach(item => {
              this.fhMsg.OrderDetailIdList.push(item.Id);
            })
            if (this.fhMsg.Type == 2) {
              this.fhMsg.ExpressId = "";
              this.fhMsg.PostCode = "";
              this.fhMsg.ExpressNumber = "";
            }
            this.lxymallapipost('/api/order/SetOrderSendGoods', this.fhMsg,
              res => {
                if (res.data.resultCode === 1) {
                  this.getData();
                  this.fhDig = false;
                  this.Success(res.data.message)

                } else {
                  this.Error(res.data.message);
                }
              },
              null
            );
          } else {
            return false;
          }
        });
      },
      TableSelectChange(val) {
        this.checkfhList = val;

      },
      selectable(row, index) {
        return row.IsBindExpress === 2
      },
      // 发货
      fhBtn(item) {
        this.fhDig = true;
        this.fhMsg = {
          Id: 0,
          OrderId: item.OrderId,
          Type: 1,
          ExpressId: '',
          PostCode: '',
          ExpressNumber: '',
          Remark: '',
          OrderDetailIdList: [],
        }
        this.fahuoList = item.DetailList;
      },
      getData() {
        this.lxymallapipost("/api/order/GetSDGoodsOrderInfo", {
          OrderId: this.OrderId
        }, res => {
          this.dataInfo = res.data.data;
          let data = res.data.data;
          // 未付款
          if (data.PaymentTime == '' && data.DeliveryTime == '') {
            this.activeStep = 1;
          }
          // 已付款 未发货
          else if (data.PaymentTime != '' && data.DeliveryTime == '' && data.ReceivingTime == '') {
            this.activeStep = 2;
          }
          // 已发货  未收货
          else if (data.PaymentTime != '' && data.DeliveryTime != '' && data.ReceivingTime == '') {
            this.activeStep = 3;
          }
          // 已收货  未结束
          else if (data.PaymentTime != '' && data.DeliveryTime != '' && data.ReceivingTime != '' && data
            .FinishTime == '') {
            this.activeStep = 4;
          }
          // 已结束
          else if (data.FinishTime != '') {
            this.activeStep = 5;
          }
          if (data.OrderStatus == 7) {
            this.exitState = true;
            this.activeStep = 5;
          }
          if (data.OrderInfo) {
            this.OrderInfo = data.OrderInfo;
          }
        })
      },
      // 快递公司
      getExpressInfo() {
        this.lxymallapipost("/api/MallBase/GetExpressInfo", {}, res => {
          if (res.data.resultCode == 1) {
            this.ExpressList = res.data.data;
          } else {
            this.Info(res.data.message);
          }
        })
      },
      // 修改备注
      OrderExit() {
        this.exitMsg = {
          OrderId: this.dataInfo.OrderId,
          Type: 1,
          Remark: this.dataInfo.Remark,
        }
        this.exitDig = true;
      },
      // 订单操作
      submitForm(formName) {
        this.$refs[formName].validate((valid) => {
          if (valid) {
            this.lxymallapipost('/api/order/SetOrderOperation', this.exitMsg,
              res => {
                if (res.data.resultCode === 1) {
                  this.getData();
                  this.Success(res.data.message)
                  this.exitDig = false;

                } else {
                  this.Error(res.data.message);
                }
              },
              null
            );
          } else {
            return false;
          }
        });
      },
      // 修改收货地址
      ExitshAdress(item) {
        this.shDig = true;
        this.shMsg = {
          OrderId: this.dataInfo.OrderId,
          Consignee: item.Consignee,
          Mobile: item.Mobile,
          Province: item.Province,
          City: item.City,
          District: item.District,
          ShoppingAddress: item.ShoppingAddress,
        }
        this.getCity(item.Province);
        this.getArea(item.City);
      },
      shsubmitForm(formName) {
        this.$refs[formName].validate((valid) => {
          if (valid) {
            this.lxymallapipost('/api/order/SetOrderShopingAddress', this.shMsg,
              res => {
                if (res.data.resultCode === 1) {
                  this.getData();
                  this.Success(res.data.message)
                  this.shDig = false;

                } else {
                  this.Error(res.data.message);
                }
              },
              null
            );
          } else {
            return false;
          }
        });
      },
      getArea(val) {
        this.lxymallapipost("/api/Destination/GetChildList", {
          Id: val
        }, res => {
          this.areaList = res.data.data;
        })
      },
      getCity(val) {
        this.lxymallapipost("/api/Destination/GetChildList", {
          Id: val
        }, res => {
          this.cityList = res.data.data;
          if (this.cityList.length > 0) {
            this.getArea(this.cityList[0].ID)
          }
        })
      },
      getProvince() {
        this.lxymallapipost("/api/Destination/GetChildList", {
          Id: 1
        }, res => {
          this.provinceList = res.data.data;
          if (this.provinceList.length > 0) {
            this.getCity(this.provinceList[0].ID)
          }
        })
      },
      gobaclk(){
         this.$router.go(-1);//返回上一层
      }

    },
    mounted() {

    }
  };

</script>
<style>
  @import './css/index.css';

  .app-order-detail .goods-pic {
    width: 35px;
    height: 35px;
    margin: 0 4px;
  }

  .app-order-detail .express-address {
    width: 80%;
  }

  .app-order-detail .action-box {
    padding: 10px 20px;
  }

  .app-order-detail .app-order-count-price .el-form-item {
    margin-bottom: 5px;
  }

  .app-order-detail .app-order-count-price {
    float: right;
    margin-right: 55px;
    font-size: 12px;
    text-align: right;
    margin-top: 15px;
  }

  .app-order-detail h3 {
    padding: 15px 0;
  }

  .app-order-detail .share-price {
    color: #EF8933;
  }

  .app-order-detail .share-title {
    font-size: 15px;
    margin: 10px 0 5px;
  }

  .app-order-detail .card-box .label {
    color: #999999;
    margin-right: 10px;
  }

  .app-order-detail .item-box {
    margin-bottom: 10px;
  }

  .app-order-detail .card-box {
    border: 1px solid #EBEEF5;
    border-radius: 3px;
    padding: 10px;
    height: 300px;
    overflow-y: scroll;
  }

  .app-order-detail .stepExit {
    height: 30px;
    width: 30px;
    background-image: url("../../../assets/img/userman/status_6_active.png");
  }

  .app-order-detail .step05 {
    height: 30px;
    width: 30px;
    background-image: url("../../../assets/img/userman/status_5.png");
  }

  .app-order-detail .step04 {
    height: 30px;
    width: 30px;
    background-image: url("../../../assets/img/userman/status_4.png");
  }

  .app-order-detail .step03 {
    height: 30px;
    width: 30px;
    background-image: url("../../../assets/img/userman/status_3.png");
  }

  .app-order-detail .step02 {
    height: 30px;
    width: 30px;
    background-image: url("../../../assets/img/userman/status_2.png");
  }
  .app-order-detail .step01 {
    height: 30px;
    width: 30px;
    background-image: url("../../../assets/img/userman/status_2.png");
  }

  .app-order-detail .step05Active {
    height: 30px;
    width: 30px;
    background-image: url("../../../assets/img/userman/status_5_active.png");
  }

  .app-order-detail .step04Active {
    height: 30px;
    width: 30px;
    background-image: url("../../../assets/img/userman/status_4_active.png");
  }

  .app-order-detail .step03Active {
    height: 30px;
    width: 30px;
    background-image: url("../../../assets/img/userman/status_3_active.png");
  }

  .app-order-detail .step02Active {
    height: 30px;
    width: 30px;
    background-image: url("../../../assets/img/userman/status_2_active.png");
  }

  .app-order-detail .step01Active {
    height: 30px;
    width: 30px;
    background-image: url("../../../assets/img/userman/status_1_active.png");
  }

  .app-order-detail .app-order-status {
    padding: 50px 120px;
    margin-bottom: 30px;
  }

  .directorOrderDetails .content {
    background: #fff;
    margin-top: 10px;
    padding: 20px;
    box-sizing: border-box;
  }

</style>