<style>
  .QuotationPrice_SWT_details .swttable {
    border: 1px solid #106BAF !important;
    border-collapse: collapse;
  }

  .QuotationPrice_SWT_details .swttable tr td {
    border: 1px solid #106BAF !important;
    border-collapse: collapse;
    height: 40px;
    line-height: 40px;
    padding: 0 3px;
  }

  .QuotationPrice_SWT_details .space {
    width: 30px;
  }

  .QuotationPrice_SWT_details .ComTitle {
    color: #106BAF;
    font-weight: bold;
    background-color: #D1EEEE;
    white-space: nowrap;
  }

  .QuotationPrice_SWT_details .link {
    cursor: pointer;
    color: blue;
    text-decoration: underline;
  }

  .QuotationPrice_SWT_details .linkLeft {
    cursor: pointer;
    color: blue;
    text-decoration: underline;
    float: left;
    padding-left: 5px;
  }
  .quotationSaveBtn {
    width: 45px;
    height: 45px;
    border-radius: 4px;
    background-color: #ffc2c2;
    margin: 8px;
    color: #cc1212;
    text-align: center;
    line-height: 45px;
    font-size: 12px;
    cursor: pointer;
  }

  .QuotationPrice_SWT_details .tdCenter {
    text-align: center;
  }

</style>
<template>
  <div class="QuotationPrice_SWT_details clearfix" v-loading="loading">
    <div>
      <table class="swttable">
        <tbody title="线路.系列.团名">
          <tr>
            <td colspan="2" class="ComTitle">
              線路
            </td>
            <td colspan="3">
              {{postData.LineName}}

            </td>
            <td class="ComTitle">
              系列
            </td>
            <td colspan="4">
              {{postData.LtName}}

            </td>
          </tr>
          <tr>
            <td colspan="2" class="ComTitle">
              團名
            </td>
            <td colspan="8">
              {{postData.Title}}
            </td>
          </tr>
        </tbody>

        <tbody title="天数.航班时间.适用人数">
          <tr>
            <td rowspan="3" colspan="2" class="ComTitle">
              TO:
            </td>
            <td class="ComTitle">
              天數
            </td>
            <td>
              {{postData.DayNum}}
            </td>
            <td>
            </td>
            <td rowspan="4" class="ComTitle">
              航班時間：
            </td>
            <td>
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=1">
                <span
                  v-if="postData.SWTFlightList[0].flightDate && postData.SWTFlightList[0].flightDate!=''">{{$commonUtils.getFormatDate(postData.SWTFlightList[0].flightDate)}}</span>
              </template>
            </td>
            <td>
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=1">
                <span>{{postData.SWTFlightList[0].flightNum}}</span>
              </template>
            </td>
            <td colspan="2">
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=1">
                <span>{{postData.SWTFlightList[0].flightContent}}</span>
              </template>
            </td>
          </tr>
          <tr>
            <td class="ComTitle">
              出发日期:
            </td>
            <td>
              {{$commonUtils.getFormatDate(postData.StartDate)}}
            </td>
            <td>
            </td>
            <td>
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=2">
                <span
                  v-if="postData.SWTFlightList[1].flightDate && postData.SWTFlightList[1].flightDate!=''">{{$commonUtils.getFormatDate(postData.SWTFlightList[1].flightDate)}}</span>
              </template>
            </td>
            <td>
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=2">
                <span>{{postData.SWTFlightList[1].flightNum}}</span>
              </template>
            </td>
            <td colspan="2">
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=2">
                <span>{{postData.SWTFlightList[1].flightContent}}</span>
              </template>
            </td>
          </tr>
          <tr>
            <td class="ComTitle">
              連發:
            </td>
            <td>
              {{postData.AirLineName}}
            </td>
            <td class="ComTitle">
              FOC
            </td>
            <td>
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=3">
                <span
                  v-if="postData.SWTFlightList[2].flightDate && postData.SWTFlightList[2].flightDate!=''">{{$commonUtils.getFormatDate(postData.SWTFlightList[2].flightDate)}}</span>
              </template>
            </td>
            <td>
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=3">
                <span>{{postData.SWTFlightList[2].flightNum}}</span>
              </template>
            </td>
            <td colspan="2">
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=3">
                <span>{{postData.SWTFlightList[2].flightContent}}</span>
              </template>
            </td>
          </tr>
          <tr>
            <td colspan="3" class="ComTitle">
              適用人數：
            </td>
            <td>
              {{postData.GuestNum}}
            </td>
            <td>
              {{postData.FocNum}}
            </td>
            <td>
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=4">
                <span
                  v-if="postData.SWTFlightList[3].flightDate && postData.SWTFlightList[3].flightDate!=''">{{$commonUtils.getFormatDate(postData.SWTFlightList[3].flightDate)}}</span>
              </template>
            </td>
            <td>
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=4">
                <span>{{postData.SWTFlightList[3].flightNum}}</span>
              </template>
            </td>
            <td colspan="2">
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=4">
                <span>{{postData.SWTFlightList[3].flightContent}}</span>
              </template>
            </td>
          </tr>
        </tbody>

        <tbody title="领队和导游">
          <tr>
            <td rowspan="2" colspan="3" class="ComTitle">
              導遊
            </td>
            <td rowspan="2">
              <template v-if="postData.SWTGuideList&&postData.SWTGuideList.length>=1">
                <span>{{postData.SWTGuideList[0].LeaderGuideInfo}}</span>
              </template>
            </td>
            <td rowspan="2" class="ComTitle">
              領隊
            </td>
            <td rowspan="2">
              <template v-if="postData.SWTLeaderList&&postData.SWTLeaderList.length>=1">
                <span>{{postData.SWTLeaderList[0].LeaderGuideInfo}}</span>
              </template>
            </td>
            <td>
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=5">
                <span
                  v-if="postData.SWTFlightList[4].flightDate && postData.SWTFlightList[4].flightDate!=''">{{$commonUtils.getFormatDate(postData.SWTFlightList[4].flightDate)}}</span>
              </template>
            </td>
            <td>
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=5">
                <span>{{postData.SWTFlightList[4].flightNum}}</span>
              </template>
            </td>
            <td colspan="2">
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=5">
                <span>
                  {{postData.SWTFlightList[4].flightContent}}
                </span>
              </template>
            </td>
          </tr>
          <tr>
            <td>
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=6">
                <span
                  v-if="postData.SWTFlightList[5].flightDate && postData.SWTFlightList[5].flightDate!=''">{{$commonUtils.getFormatDate(postData.SWTFlightList[5].flightDate)}}</span>
              </template>
            </td>
            <td>
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=6">
                <span>{{postData.SWTFlightList[5].flightNum}}</span>
              </template>
            </td>
            <td colspan="2">
              <template v-if="postData.SWTFlightList&&postData.SWTFlightList.length>=6">
                <span>{{postData.SWTFlightList[5].flightContent}}</span>
              </template>
            </td>
          </tr>
        </tbody>
        <tbody title="LOCAL團號">
          <tr>
            <td colspan="3" class="ComTitle">
              LOCAL團號
            </td>
            <td>
              {{postData.LocalTeamNum}}
            </td>
            <td class="ComTitle">
              估價代號
            </td>
            <td colspan="2">
              {{postData.ValuationCode}}
            </td>
            <td class="ComTitle">
              出團名稱
            </td>
            <td colspan="2">
              {{postData.OutTeamName}}
            </td>
          </tr>
          <tr>
            <td colspan="3" class="ComTitle">
              AGT團號
            </td>
            <td>
              {{postData.AGTTeamName}}
            </td>
            <td class="ComTitle">
              SURCHARGE：
            </td>
            <td colspan="2">
              {{postData.SURCHARGE}}

            </td>
            <td class="ComTitle">
            </td>
            <td colspan="2">
            </td>
          </tr>
        </tbody>
        <tbody>
          <tr>
            <td colspan="10"></td>
          </tr>
        </tbody>
        <tbody title="酒店">
          <tr>
            <td colspan="7" class="ComTitle tdCenter">
              飯店
            </td>
            <td class="ComTitle">
              酒店減免:
            </td>
            <td colspan="2">
              {{postData.HotelDisNum}}
            </td>
          </tr>
          <tr>
            <td class="ComTitle tdCenter" colspan="2">
              DAY
            </td>
            <td class="ComTitle tdCenter">
              飯店名稱
            </td>
            <td class="ComTitle tdCenter">
              美金
            </td>
            <td class="ComTitle tdCenter">
              越盾
            </td>
            <td class="ComTitle tdCenter">
              次/N數
            </td>
            <td class="ComTitle tdCenter">
              房/人數
            </td>
            <td class="ComTitle tdCenter">
              減免人數
            </td>
            <td class="ComTitle tdCenter" colspan="2">
              合計
            </td>
          </tr>
          <tr v-for="(hItem,hIndex) in postData.SWTHotelList" :key="hIndex">
            <td style="width:50px;" colspan="2">
              D{{hItem.DayNum}}
            </td>
            <td>
              {{hItem.HotelName}}

            </td>
            <td>
              {{hItem.USPrice}}

            </td>
            <td>
              {{hItem.VNDPrice}}

            </td>
            <td>
              {{hItem.Times}}

            </td>
            <td>
              {{hItem.TotalNum}}
            </td>
            <td>
              {{hItem.HotelDisNum}}
            </td>
            <td class="w150">
              {{hItem.USSubTotal}}
            </td>
            <td class="w150">
              {{hItem.VNDSubTotal}}
            </td>
          </tr>
        </tbody>
        <tbody title="酒店合计">
          <tr>
            <td colspan="2">
            </td>
            <td>
            </td>
            <td>
              US合計：{{HotelSum.USPriceSum}}
            </td>
            <td>
              VND合計：{{HotelSum.VNDPriceSum}}
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
              {{HotelSum.USTotalSum}}
            </td>
            <td>
              {{HotelSum.VNDTotalSum}}
            </td>
          </tr>
        </tbody>

        <tbody>
          <tr>
            <td colspan="10"></td>
          </tr>
        </tbody>

        <tbody title="餐食">
          <tr>
            <td colspan="7" class="ComTitle tdCenter">
              餐食
            </td>
            <td class="ComTitle">
              餐食減免：
            </td>
            <td colspan="2">
              {{postData.DinnerDisNum}}
            </td>
          </tr>
          <tr>
            <td colspan="2" class="ComTitle tdCenter">
              DAY
            </td>
            <td class="ComTitle tdCenter">
              餐食名稱
            </td>
            <td class="ComTitle tdCenter">
              美金
            </td>
            <td class="ComTitle tdCenter">
              越盾
            </td>
            <td class="ComTitle tdCenter">
              次/N數
            </td>
            <td class="ComTitle tdCenter">
              人數/FOC
            </td>
            <td class="ComTitle tdCenter">
              減免人數
            </td>
            <td class="ComTitle tdCenter" colspan="2">
              合計
            </td>
          </tr>
          <template v-for="(subItem,subIndex) in postData.SWTDinnerList">
            <tr v-for="(childItem,childIndex) in subItem.SubDinnerList">
              <td v-if="childIndex==0" :rowspan="3">
                D{{subItem.DayNum}}
              </td>
              <td>
                <template v-if="childItem.DinnerType==1">
                  早餐
                </template>
                <template v-if="childItem.DinnerType==2">
                  午餐
                </template>
                <template v-if="childItem.DinnerType==3">
                  晚餐
                </template>
              </td>
              <td>
                {{childItem.DinnerName}}

              </td>
              <td>
                {{childItem.USPrice}}

              </td>
              <td>
                {{childItem.VNDPrice}}

              </td>
              <td>
                {{childItem.Times}}

              </td>
              <td>
                {{childItem.TotalNum}} 人
              </td>
              <td>
                {{childItem.DinnerDisNum}}
              </td>
              <td>
                {{childItem.USSubTotal}}
              </td>
              <td>
                {{childItem.VNDSubTotal}}
              </td>
            </tr>
          </template>
        </tbody>
        <tbody title="餐厅合计">
          <tr>
            <td colspan="2">
            </td>
            <td>
            </td>
            <td>
              US合計：{{DinnerSum.USPriceSum}}
            </td>
            <td>
              VND合計：{{DinnerSum.VNDPriceSum}}
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
              {{DinnerSum.USTotalSum}}
            </td>
            <td>
              {{DinnerSum.VNDTotalSum}}
            </td>
          </tr>
        </tbody>
        <tbody>
          <tr>
            <td colspan="10"></td>
          </tr>
        </tbody>
        <tbody title="景點門票">
          <tr>
            <td colspan="7" class="ComTitle tdCenter">
              景點門票
            </td>
            <td class="ComTitle">
              景點減免：
            </td>
            <td colspan="2">
              {{postData.TicketDisNum}}

            </td>
          </tr>
          <tr>
            <td class="ComTitle tdCenter" colspan="2">
              DAY
            </td>
            <td class="ComTitle tdCenter">
              景點門票
            </td>
            <td class="ComTitle tdCenter">
              美金
            </td>
            <td class="ComTitle tdCenter">
              越盾
            </td>
            <td class="ComTitle tdCenter">
              次/N數
            </td>
            <td class="ComTitle tdCenter">
              房/人數
            </td>
            <td class="ComTitle tdCenter">
              減免人數
            </td>
            <td class="ComTitle tdCenter" colspan="2">
              合计
            </td>
          </tr>
          <template v-for="(subItem,subIndex) in postData.SWTTicketList">
            <tr v-for="(childItem,childIndex) in subItem.SubTicketList">
              <td v-if="childIndex==0" :rowspan="subItem.SubTicketList.length" colspan="2">
                D{{subItem.DayNum}}
              </td>
              <td style="width:300px;">
                {{childItem.CouponsName}}
              </td>
              <td>
                {{childItem.USPrice}}

              </td>
              <td>
                {{childItem.VNDPrice}}

              </td>
              <td>
                {{childItem.Times}}

              </td>
              <td>
                {{childItem.TotalNum}} 人
              </td>
              <td>
                {{childItem.TicketDisNum}}
              </td>
              <td>
                {{childItem.USSubTotal}}
              </td>
              <td>
                {{childItem.VNDSubTotal}}
              </td>
            </tr>
          </template>
        </tbody>
        <tbody title="景点门票合计">
          <tr>
            <td colspan="2">
            </td>
            <td>
            </td>
            <td>
              US合計：{{TicketSum.USPriceSum}}
            </td>
            <td>
              VND合計：{{TicketSum.VNDPriceSum}}
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
              {{TicketSum.USTotalSum}}
            </td>
            <td>
              {{TicketSum.VNDTotalSum}}
            </td>
          </tr>
        </tbody>
        <tbody>
          <tr>
            <td colspan="10"></td>
          </tr>
        </tbody>
        <tbody title="車資">
          <tr>
            <td colspan="7" class="ComTitle tdCenter">
              車資
            </td>
            <td class="ComTitle">
              車型：
            </td>
            <td colspan="2">
              <el-select v-model="postData.BusPriceId" class='w150' filterable :placeholder="$t('pub.pleaseSel')">
                <el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
                <el-option v-for="(qitem,qindex) in BusTypeList" :value="qitem.Id" :label="qitem.newName" :key="qindex">
                </el-option>
              </el-select>
            </td>
          </tr>
          <tr>
            <td colspan="2" class="ComTitle tdCenter">
              DAY
            </td>
            <td class="ComTitle tdCenter" colspan="2">
              行程
            </td>
            <td class="ComTitle tdCenter">
              公里數
            </td>
            <td class="ComTitle tdCenter">
              車資
            </td>
            <td class="ComTitle tdCenter">
              次/N數
            </td>
            <td class="ComTitle tdCenter">
              單價
            </td>
            <td class="ComTitle tdCenter" colspan="2">
              合计
            </td>
          </tr>
          <template v-for="(subItem,subIndex) in postData.SWTBusList">
            <tr v-for="(childItem,childIndex) in subItem.SubBusList">
              <td v-if="childIndex==0" :rowspan="subItem.SubBusList.length" colspan="2">
                D{{subItem.DayNum}}
              </td>
              <td colspan="2">

                {{childItem.Trip}}
              </td>
              <td>
                {{childItem.Kilometre}}
              </td>
              <td>
                {{childItem.VNDPrice}}

              </td>
              <td>
                {{childItem.Times}}
              </td>
              <td>
                {{childItem.Price}}
              </td>
              <td colspan="2">
                {{childItem.VNDSubTotal}}
              </td>
            </tr>
          </template>
        </tbody>
        <tbody title="车资合计">
          <tr>
            <td colspan="2">
            </td>
            <td colspan="2">
            </td>
            <td>
              {{BusSum.TotalKM}}
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td colspan="2">
              {{BusSum.VNDTotalSum}}
            </td>
          </tr>
        </tbody>

        <tbody>
          <tr>
            <td colspan="10"></td>
          </tr>
        </tbody>
        <tbody title="船或導遊機票">
          <tr>
            <td colspan="10" class="ComTitle tdCenter">
              船或導遊機票
            </td>
          </tr>
          <tr>
            <td class="ComTitle tdCenter" colspan="4">
              名称
            </td>
            <td class="ComTitle tdCenter">
              美金
            </td>
            <td class="ComTitle tdCenter">
              越南盾
            </td>
            <td class="ComTitle tdCenter">
              次/N數
            </td>
            <td class="ComTitle tdCenter">
              人數
            </td>
            <td class="ComTitle tdCenter" colspan="2">
              合计
            </td>
          </tr>
          <template v-for="(childItem,childIndex) in postData.SWTShipList">
            <tr :key="childIndex">
              <td colspan="4">
                {{childItem.BaoJiaConfigName}}
              </td>
              <td>
                {{childItem.USPrice}}
              </td>
              <td>
                {{childItem.VNDPrice}}
              </td>
              <td>
                {{childItem.Times}}
              </td>
              <td>
                {{childItem.TotalNum}}
              </td>
              <td>
                {{childItem.USSubTotal}}
              </td>
              <td>
                {{childItem.VNDSubTotal}}
              </td>
            </tr>
          </template>
        </tbody>
        <tbody title="船合计">
          <tr>
            <td colspan="4">
            </td>
            <td>
              US合計：{{ShipSum.USPriceSum}}
            </td>
            <td>
              VND合計：{{ShipSum.VNDPriceSum}}
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
              {{ShipSum.USTotalSum}}
            </td>
            <td>
              {{ShipSum.VNDTotalSum}}
            </td>
          </tr>
        </tbody>
        <tbody>
          <tr>
            <td colspan="10"></td>
          </tr>
        </tbody>
        <tbody title="雜支">
          <tr>
            <td colspan="10" class="ComTitle tdCenter">
              雜支 <a class="linkLeft" </td> </tr> <tr>
            <td class="ComTitle tdCenter" colspan="3">
              名称
            </td>
            <td class="ComTitle tdCenter">
              美金
            </td>
            <td class="ComTitle tdCenter">
              越南盾
            </td>
            <td class="ComTitle tdCenter">
              次/N數
            </td>
            <td class="ComTitle tdCenter">
              次
            </td>
            <td class="ComTitle tdCenter">
              FOC
            </td>
            <td class="ComTitle tdCenter" colspan="2">
              合计
            </td>
          </tr>
          <template v-for="(childItem,childIndex) in postData.SWTOtherPayList">
            <tr :key="childIndex">
              <td colspan="3">
                {{childItem.BaoJiaConfigName}}
              </td>
              <td>
                {{childItem.USPrice}}
              </td>
              <td>
                {{childItem.VNDPrice}}
              </td>
              <td>
                {{childItem.DayNum}}
              </td>
              <td>
                {{childItem.Times}}
              </td>
              <td>
                {{childItem.FOCNum}}
              </td>
              <td>
                {{childItem.USSubTotal}}
              </td>
              <td>
                {{childItem.VNDSubTotal}}
              </td>
            </tr>
          </template>
        </tbody>
        <tbody title="杂支合计">
          <tr>
            <td colspan="3">
            </td>
            <td>
              US合計：{{ZaZhiSum.USPriceSum}}
            </td>
            <td>
              VND合計：{{ZaZhiSum.VNDPriceSum}}
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
              {{ZaZhiSum.USTotalSum}}
            </td>
            <td>
              {{ZaZhiSum.VNDTotalSum}}
            </td>
          </tr>
        </tbody>
        <tbody>
          <tr>
            <td colspan="10"></td>
          </tr>
        </tbody>
        <tbody title="購物自費">
          <tr>
            <td colspan="10" class="ComTitle tdCenter">
              購物自費
            </td>
          </tr>
          <tr>
            <td class="ComTitle tdCenter" colspan="4">
              名称
            </td>
            <td class="ComTitle tdCenter">
              美金
            </td>
            <td class="ComTitle tdCenter">
              越南盾
            </td>
            <td class="ComTitle tdCenter">
              次/N數
            </td>
            <td class="ComTitle tdCenter">
              FOC
            </td>
            <td class="ComTitle tdCenter" colspan="2">
              合计
            </td>
          </tr>
          <template v-for="(childItem,childIndex) in postData.SWTSelfFeeList">
            <tr :key="childIndex">
              <td colspan="4">
                {{childItem.BaoJiaConfigName}}
              </td>
              <td>
                {{childItem.USPrice}}
              </td>
              <td>
                {{childItem.VNDPrice}}
              </td>
              <td>
                {{childItem.TotalNum}}
              </td>
              <td>
                {{childItem.FOCNum}}

              </td>
              <td>
                {{childItem.USSubTotal}}
              </td>
              <td>
                {{childItem.VNDSubTotal}}
              </td>
            </tr>
          </template>
        </tbody>
        <tbody title="購物自費合计">
          <tr>
            <td colspan="4">
            </td>
            <td>
              US合計：{{SelfFeeSum.USPriceSum}}
            </td>
            <td>
              VND合計：{{SelfFeeSum.VNDPriceSum}}
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
              {{SelfFeeSum.USTotalSum}}
            </td>
            <td>
              {{SelfFeeSum.VNDTotalSum}}
            </td>
          </tr>
        </tbody>
        <tbody>
          <tr>
            <td colspan="10"></td>
          </tr>
        </tbody>
        <tbody title="小費">
          <tr>
            <td colspan="10" class="ComTitle tdCenter">
              小費
            </td>
          </tr>
          <tr>
            <td class="ComTitle tdCenter" colspan="4">
              名称
            </td>
            <td class="ComTitle tdCenter">
              美金
            </td>
            <td class="ComTitle tdCenter">
              越南盾
            </td>
            <td class="ComTitle tdCenter">
              次/N數
            </td>
            <td class="ComTitle tdCenter">
              FOC
            </td>
            <td class="ComTitle tdCenter" colspan="2">
              合计
            </td>
          </tr>
          <template v-for="(childItem,childIndex) in postData.SWTTipFeeList">
            <tr :key="childIndex">
              <td colspan="4">
                {{childItem.BaoJiaConfigName}}
              </td>
              <td>
                {{childItem.USPrice}}
              </td>
              <td>
                {{childItem.VNDPrice}}

              </td>
              <td>
                {{childItem.TotalNum}}
              </td>
              <td>
                {{childItem.FOCNum}}
              </td>
              <td>
                {{childItem.USSubTotal}}
              </td>
              <td>
                {{childItem.VNDSubTotal}}
              </td>
            </tr>
          </template>
        </tbody>
        <tbody title="小費合计">
          <tr>
            <td colspan="4">
            </td>
            <td>
              US合計：{{TipFeeSum.USPriceSum}}
            </td>
            <td>
              VND合計：{{TipFeeSum.VNDPriceSum}}
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
              {{TipFeeSum.USTotalSum}}
            </td>
            <td>
              {{TipFeeSum.VNDTotalSum}}
            </td>
          </tr>
        </tbody>
        <tbody>
          <tr>
            <td colspan="10"></td>
          </tr>
        </tbody>
        <tbody title="总计">
          <tr>
            <td colspan="4" class="ComTitle tdCenter">

            </td>
            <td colspan="2" class="ComTitle tdCenter">
              個人團費
            </td>
            <td colspan="2" class="ComTitle tdCenter">
              整團團費
            </td>
          </tr>
          <tr>
            <td colspan="4" class="ComTitle tdCenter">
              类型
            </td>
            <td class="ComTitle tdCenter">
              美金
            </td>
            <td class="ComTitle tdCenter">
              越盾
            </td>
            <td class="ComTitle tdCenter">
              美金
            </td>
            <td class="ComTitle tdCenter">
              越盾
            </td>
          </tr>
          <tr>
            <td colspan="4" class="ComTitle tdCenter">
              房費
            </td>
            <td>
              {{(HotelSum.USPriceSum/2).toFixed(2)}}
            </td>
            <td>
              {{(HotelSum.VNDPriceSum/2).toFixed(2)}}
            </td>
            <td>
              {{HotelSum.USTotalSum}}
            </td>
            <td>
              {{HotelSum.VNDTotalSum}}
            </td>
          </tr>
          <tr>
            <td colspan="4" class="ComTitle tdCenter">
              餐食
            </td>
            <td>
              {{DinnerSum.USPriceSum}}
            </td>
            <td>
              {{DinnerSum.VNDPriceSum}}
            </td>
            <td>
              {{DinnerSum.USTotalSum}}
            </td>
            <td>
              {{DinnerSum.VNDTotalSum}}
            </td>
          </tr>
          <tr>
            <td colspan="4" class="ComTitle tdCenter">
              景點門票
            </td>
            <td>
              {{TicketSum.USPriceSum}}
            </td>
            <td>
              {{TicketSum.VNDPriceSum}}
            </td>
            <td>
              {{TicketSum.USTotalSum}}
            </td>
            <td>
              {{TicketSum.VNDTotalSum}}
            </td>
          </tr>
          <tr>
            <td colspan="4" class="ComTitle tdCenter">
              雜支
            </td>
            <td>
              {{ZaZhiSum.USPriceSingle}}
            </td>
            <td>
              {{ZaZhiSum.VNDPriceSingle}}
            </td>
            <td>
              {{ZaZhiSum.USTotalSum}}
            </td>
            <td>
              {{ZaZhiSum.VNDTotalSum}}
            </td>
          </tr>
          <tr>
            <td colspan="4" class="ComTitle tdCenter">
              車資
            </td>
            <td>
            </td>
            <td>
              {{(BusSum.VNDTotalSum/getPeopleNum.totalNum).toFixed(2)}}
            </td>
            <td>
            </td>
            <td>
              {{BusSum.VNDTotalSum}}
            </td>
          </tr>
          <tr>
            <td colspan="4" class="ComTitle tdCenter">
              船 或 導遊機票
            </td>
            <td>
              {{(ShipSum.USPriceSum/getPeopleNum.totalNum).toFixed(2)}}
            </td>
            <td>
              {{(ShipSum.VNDPriceSum/getPeopleNum.totalNum).toFixed(2)}}
            </td>
            <td>
              {{ShipSum.USTotalSum}}
            </td>
            <td>
              {{ShipSum.VNDTotalSum}}
            </td>
          </tr>
          <tr>
            <td colspan="4" class="ComTitle tdCenter">
              購物自費
            </td>
            <td>
              {{SelfFeeSum.USPriceSum}}
            </td>
            <td>
              {{SelfFeeSum.VNDPriceSum}}
            </td>
            <td>
              {{SelfFeeSum.USTotalSum}}
            </td>
            <td>
              {{SelfFeeSum.VNDTotalSum}}
            </td>
          </tr>
          <tr>
            <td colspan="4" class="ComTitle tdCenter">
              合計
            </td>
            <td>
              {{CalcTotal().single_us_price}}
            </td>
            <td>
              {{CalcTotal().single_vnd_price}}
            </td>
            <td>
              {{CalcTotal().total_us_price}}
            </td>
            <td>
              {{CalcTotal().total_vnd_price}}
            </td>
          </tr>
        </tbody>
        <tbody v-if="Type==1">
          <tr>
            <td colspan="10"></td>
          </tr>
          <tr>
            <td colspan="10">
              <el-radio v-model="AuditMsg.AuditStatus" :label="1">通过</el-radio>
              <el-radio v-model="AuditMsg.AuditStatus" :label="2">拒绝</el-radio>
            </td>
          </tr>
          <tr>
            <td colspan="10">
              <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="AuditMsg.AuditContent">
              </el-input>
            </td>
          </tr>
          <tr>
            <td colspan="10" style="text-align:center;">
              <button class="normalBtn" @click="AduitSWT()">审核</button>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        AuditMsg: {
          Id: 0,
          AuditStatus: 1, //原因
          AuditContent: "",
        },
        Id: 0, //编号
        Type:0,//1-审核，0-查看
        //基本配置
        postData: {
          Id: 0,
          LineId: 0,
          LineName: "", //线路名称
          LineteamId: 0,
          LtName: "", //系列名称
          IsDirect: 1, //是否直采（0-否-1-是）【全部默认非直采】  
          TeamType: 3, //团队类型【默认地接团】
          TravelState: 1, //团控状态(1-草稿，2-待审核,3-审核通过,4-审核拒绝,5已撤销)
          Title: "", //团队标题
          ConfigId: 0, //配置编号
          DayNum: 0, //行程天数
          StartDate: "", //出发日期
          AirLineName: "", //航空公司名称
          SWTFlightList: [], //航班列表
          GuestNum: 0, //旅客人数
          FocNum: 0, //Foc人数
          SWTLeaderList: [], //领队信息
          SWTGuideList: [], //导游信息
          LocalTeamNum: "", //LOCAL團號
          ValuationCode: "", //估價代號
          OutTeamName: "", //出團名稱
          AGTTeamName: "", //AGT團號
          SURCHARGE: "", //SURCHARGE
          HotelDisNum: 0, //酒店免人数
          SWTHotelList: [], //酒店信息
          DinnerDisNum: 0, //餐免人数
          SWTDinnerList: [], //餐厅信息
          TicketDisNum: 0, //景点免人数
          SWTTicketList: [], //景点信息
          BusPriceId: 0, //车辆报价编号
          SWTBusList: [], //车资明细
          SWTShipList: [], //船明细
          SWTOtherPayList: [], //杂支信息
          SWTSelfFeeList: [], //自费明细
          SWTTipFeeList: [], //小费明细
        },
        BusTypeList: [], //车辆类型
        //酒店统计
        HotelSum: {
          USPriceSum: 0, //美金单价统计
          VNDPriceSum: 0, //越盾单价统计
          USTotalSum: 0, //美金合计
          VNDTotalSum: 0, //越盾合计
        },
        //餐厅统计
        DinnerSum: {
          USPriceSum: 0, //美金单价统计
          VNDPriceSum: 0, //越盾单价统计
          USTotalSum: 0, //美金合计
          VNDTotalSum: 0, //越盾合计
        },
        //景点门票统计
        TicketSum: {
          USPriceSum: 0, //美金单价统计
          VNDPriceSum: 0, //越盾单价统计
          USTotalSum: 0, //美金合计
          VNDTotalSum: 0, //越盾合计
        },
        //车资统计
        BusSum: {
          TotalKM: 0, //美金单价统计
          VNDTotalSum: 0, //越盾合计
        },
        ZaZhiList: [], //杂支列表
        ShipList: [], //船列表
        SelfFeeList: [], //自费列表
        TipFeeList: [], //小费列表
        //杂支统计
        ZaZhiSum: {
          USPriceSum: 0, //美金单价统计
          USPriceSingle: 0, //单人美元
          VNDPriceSum: 0, //越盾单价统计
          VNDPriceSingle: 0, //单人越盾
          USTotalSum: 0, //美金合计
          VNDTotalSum: 0, //越盾合计
        },
        //船票统计
        ShipSum: {
          USPriceSum: 0, //美金单价统计
          VNDPriceSum: 0, //越盾单价统计
          USTotalSum: 0, //美金合计
          VNDTotalSum: 0, //越盾合计
        },
        //自费统计
        SelfFeeSum: {
          USPriceSum: 0, //美金单价统计
          VNDPriceSum: 0, //越盾单价统计
          USTotalSum: 0, //美金合计
          VNDTotalSum: 0, //越盾合计
        },
        //小费统计
        TipFeeSum: {
          USPriceSum: 0, //美金单价统计
          VNDPriceSum: 0, //越盾单价统计
          USTotalSum: 0, //美金合计
          VNDTotalSum: 0, //越盾合计
        },
        loading: false,
      };
    },
    methods: {
      AduitSWT() {
        this.AuditMsg.Id = this.$route.query.Id;
        this.apipost(
          "travel_post_UpdateBaoJiaDanSwtAuditService",
          this.AuditMsg,
          res => {
            if (res.data.resultCode == 1) {
              this.Success(res.data.message)
              this.gonewQuotationSWT(0,'SWTAuditDan');
            } else {
              this.Info(res.data.message)
            }
          },
          err => {}
        );
      },
      //计算合计
      CalcTotal() {
        var single_us_price = 0; //单人美元
        var single_vnd_price = 0; //单人越盾
        var total_us_price = 0; //团体美元
        var total_vnd_price = 0; //团体越盾
        single_us_price = Number(this.HotelSum.USPriceSum) + Number(this.DinnerSum.USPriceSum) + Number(this.TicketSum
            .USPriceSum) +
          Number(this.ZaZhiSum.USPriceSingle) + Number(this.ShipSum.USPriceSum) + Number(this.SelfFeeSum.USPriceSum);

        single_vnd_price = Number(this.HotelSum.VNDPriceSum) + Number(this.DinnerSum.VNDPriceSum) + Number(this
            .TicketSum
            .VNDPriceSum) +
          Number(this.ZaZhiSum.VNDPriceSingle) + Number(this.ShipSum.VNDPriceSum) + Number(this.SelfFeeSum.VNDPriceSum);

        total_us_price = Number(this.HotelSum.USTotalSum) + Number(this.DinnerSum.USTotalSum) + Number(this.TicketSum
            .USTotalSum) +
          Number(this.ZaZhiSum.USTotalSum) + Number(this.ShipSum.USTotalSum) + Number(this.SelfFeeSum.USTotalSum);

        total_vnd_price = Number(this.HotelSum.VNDTotalSum) + Number(this.DinnerSum.VNDTotalSum) + Number(this.TicketSum
            .VNDTotalSum) +
          Number(this.ZaZhiSum.VNDTotalSum) + Number(this.ShipSum.USTotalSum) + Number(this.SelfFeeSum.USTotalSum) +
          Number(this.BusSum.VNDTotalSum);
        return {
          single_us_price: single_us_price.toFixed(2),
          single_vnd_price: single_vnd_price.toFixed(2),
          total_us_price: total_us_price.toFixed(2),
          total_vnd_price: total_vnd_price.toFixed(2)
        };
      },
      getData() {
        var qmsg = {
          Id: this.Id
        };
        this.apipost("travel_get_GetBaoJiaDanSwtService", qmsg, res => {
          if (res.data.resultCode == 1) {
            var jsonData = res.data.data;
            if (jsonData) {
              this.postData.Id = this.Id;
              this.postData.LineId = jsonData.LineId;
              this.postData.LtName = jsonData.LtName;
              this.postData.LineName = jsonData.LineName;
              this.postData.LineteamId = jsonData.LineteamId;
              this.postData.IsDirect = jsonData.IsDirect;
              this.postData.TeamType = jsonData.TeamType;
              this.postData.TravelState = jsonData.TravelState;
              this.postData.Title = jsonData.Title;
              this.postData.DayNum = jsonData.DayNum;
              this.postData.ConfigId = jsonData.ConfigId;
              this.postData.StartDate = jsonData.StartDate;
              this.postData.AirLineName = jsonData.AirLineName;
              this.postData.GuestNum = jsonData.GuestNum;
              this.postData.FocNum = jsonData.FocNum;
              this.postData.LocalTeamNum = jsonData.LocalTeamNum;
              this.postData.ValuationCode = jsonData.ValuationCode;
              this.postData.OutTeamName = jsonData.OutTeamName;
              this.postData.AGTTeamName = jsonData.AGTTeamName;
              this.postData.SURCHARGE = jsonData.SURCHARGE;
              //航班信息
              if (jsonData.SWTFlightList) {
                this.postData.SWTFlightList = jsonData.SWTFlightList;
              }
              //领队信息
              if (jsonData.SWTLeaderList) {
                this.postData.SWTLeaderList = jsonData.SWTLeaderList;
              }
              //导游信息
              if (jsonData.SWTGuideList) {
                this.postData.SWTGuideList = jsonData.SWTGuideList;
              }
              //酒店
              if (jsonData.HotelDisNum) {
                this.postData.HotelDisNum = jsonData.HotelDisNum;
              }
              if (jsonData.SWTHotelList) {
                this.postData.SWTHotelList = jsonData.SWTHotelList;
              }

              //餐厅
              if (jsonData.DinnerDisNum) {
                this.postData.DinnerDisNum = jsonData.DinnerDisNum;
              }
              if (jsonData.SWTDinnerList) {
                this.postData.SWTDinnerList = jsonData.SWTDinnerList;
              }

              //景点
              if (jsonData.TicketDisNum) {
                this.postData.TicketDisNum = jsonData.TicketDisNum;
              }
              if (jsonData.SWTTicketList) {
                this.postData.SWTTicketList = jsonData.SWTTicketList;
              }

              //车资
              this.postData.BusPriceId = jsonData.BusPriceId;
              if (jsonData.SWTBusList) {
                this.postData.SWTBusList = jsonData.SWTBusList;
              }

              //船
              if (jsonData.SWTShipList) {
                this.postData.SWTShipList = jsonData.SWTShipList;
              }
              //杂支
              if (jsonData.SWTOtherPayList) {
                this.postData.SWTOtherPayList = jsonData.SWTOtherPayList;
              }
              //自费
              if (jsonData.SWTSelfFeeList) {
                this.postData.SWTSelfFeeList = jsonData.SWTSelfFeeList;
              }
              //小费
              if (jsonData.SWTTipFeeList) {
                this.postData.SWTTipFeeList = jsonData.SWTTipFeeList;
              }
              //计算费用合计
              this.CalcFeeTotal();
            }
          }
        });
      },

      //报价单跳转
      gonewQuotationSWT(Id, path) {
        var obj = {};
        if (Id > 0) {
          obj = {
            Id: Id,
            tab: '报价单'
          }
        } else {
          obj = {
            tab: '报价单'
          }
        }
        this.$router.push({
          name: path,
          query: obj
        });
      },
      //计算费用
      CalcFeeTotal() {
        //酒店计算
        if (this.postData.SWTHotelList && this.postData.SWTHotelList.length > 0) {
          var subUSPrice = 0;
          var subVNDPrice = 0;
          var totalUSPrice = 0;
          var totalVNDPrice = 0;
          this.postData.SWTHotelList.forEach(item => {
            var c_usprice = 0;
            if (item.USPrice) {
              c_usprice = item.USPrice;
            }
            var c_vndprice = 0;
            if (item.VNDPrice) {
              c_vndprice = item.VNDPrice
            }
            subUSPrice += Number(c_usprice);
            subVNDPrice += Number(c_vndprice);
            var c_HotelDisNum = 0;
            if (this.postData.HotelDisNum) {
              c_HotelDisNum = this.postData.HotelDisNum;
            }
            item.HotelDisNum = c_HotelDisNum;
            var c_times = 0;
            if (item.Times) {
              c_times = item.Times;
            }
            var c_totalNum = 0;
            if (item.TotalNum) {
              c_totalNum = item.TotalNum;
            }
            item.USSubTotal = (parseFloat(c_usprice) * parseFloat(c_times) * (c_totalNum - c_HotelDisNum)).toFixed(
              2);
            item.VNDSubTotal = (parseFloat(c_vndprice) * parseFloat(c_times) * (c_totalNum - c_HotelDisNum))
              .toFixed(2);

            totalUSPrice += parseFloat(item.USSubTotal);
            totalVNDPrice += parseFloat(item.VNDSubTotal);
          });
          this.HotelSum.USPriceSum = subUSPrice.toFixed(2);
          this.HotelSum.VNDPriceSum = subVNDPrice.toFixed(2);
          this.HotelSum.USTotalSum = totalUSPrice.toFixed(2);
          this.HotelSum.VNDTotalSum = totalVNDPrice.toFixed(2);
        }

        //餐厅计算
        if (this.postData.SWTDinnerList && this.postData.SWTDinnerList.length > 0) {
          var subUSPrice = 0;
          var subVNDPrice = 0;
          var totalUSPrice = 0;
          var totalVNDPrice = 0;
          this.postData.SWTDinnerList.forEach(rootItem => {
            rootItem.SubDinnerList.forEach(item => {
              var c_usprice = 0;
              if (item.USPrice) {
                c_usprice = item.USPrice;
              }
              var c_vndprice = 0;
              if (item.VNDPrice) {
                c_vndprice = item.VNDPrice
              }
              subUSPrice += Number(c_usprice);
              subVNDPrice += Number(c_vndprice);
              var c_DinnerDisNum = 0;
              if (this.postData.DinnerDisNum) {
                c_DinnerDisNum = this.postData.DinnerDisNum;
              }
              item.DinnerDisNum = c_DinnerDisNum;
              var c_times = 0;
              if (item.Times) {
                c_times = item.Times;
              }
              var c_totalNum = 0;
              if (item.TotalNum) {
                c_totalNum = item.TotalNum;
              }
              item.USSubTotal = (parseFloat(c_usprice) * parseFloat(c_times) * (c_totalNum - c_DinnerDisNum))
                .toFixed(
                  2);
              item.VNDSubTotal = (parseFloat(c_vndprice) * parseFloat(c_times) * (c_totalNum - c_DinnerDisNum))
                .toFixed(2);
              totalUSPrice += parseFloat(item.USSubTotal);
              totalVNDPrice += parseFloat(item.VNDSubTotal);
            })
          });
          this.DinnerSum.USPriceSum = subUSPrice.toFixed(2);
          this.DinnerSum.VNDPriceSum = subVNDPrice.toFixed(2);
          this.DinnerSum.USTotalSum = totalUSPrice.toFixed(2);
          this.DinnerSum.VNDTotalSum = totalVNDPrice.toFixed(2);
        }

        //景点门票计算
        if (this.postData.SWTTicketList && this.postData.SWTTicketList.length > 0) {
          var subUSPrice = 0;
          var subVNDPrice = 0;
          var totalUSPrice = 0;
          var totalVNDPrice = 0;
          this.postData.SWTTicketList.forEach(rootItem => {
            rootItem.SubTicketList.forEach(item => {
              var c_usprice = 0;
              if (item.USPrice) {
                c_usprice = item.USPrice;
              }
              var c_vndprice = 0;
              if (item.VNDPrice) {
                c_vndprice = item.VNDPrice
              }
              subUSPrice += Number(c_usprice);
              subVNDPrice += Number(c_vndprice);
              var c_DinnerDisNum = 0;
              if (this.postData.TicketDisNum) {
                c_DinnerDisNum = this.postData.TicketDisNum;
              }
              item.DinnerDisNum = c_DinnerDisNum;
              var c_times = 0;
              if (item.Times) {
                c_times = item.Times;
              }
              var c_totalNum = 0;
              if (item.TotalNum) {
                c_totalNum = item.TotalNum;
              }
              item.USSubTotal = (parseFloat(c_usprice) * parseFloat(c_times) * (c_totalNum - c_DinnerDisNum))
                .toFixed(
                  2);
              item.VNDSubTotal = (parseFloat(c_vndprice) * parseFloat(c_times) * (c_totalNum - c_DinnerDisNum))
                .toFixed(2);
              totalUSPrice += parseFloat(item.USSubTotal);
              totalVNDPrice += parseFloat(item.VNDSubTotal);
            })
          });
          this.TicketSum.USPriceSum = subUSPrice.toFixed(2);
          this.TicketSum.VNDPriceSum = subVNDPrice.toFixed(2);
          this.TicketSum.USTotalSum = totalUSPrice.toFixed(2);
          this.TicketSum.VNDTotalSum = totalVNDPrice.toFixed(2);
        }

        //车资计算
        if (this.postData.SWTBusList && this.postData.SWTBusList.length > 0) {
          var subKMs = 0;
          var totalVNDPrice = 0;
          this.postData.SWTBusList.forEach(rootItem => {
            rootItem.SubBusList.forEach(item => {
              var c_Kilometre = 0;
              if (item.Kilometre) {
                c_Kilometre = item.Kilometre
              }
              subKMs += Number(c_Kilometre)
              var c_times = 0;
              if (item.Times) {
                c_times = item.Times;
              }
              var c_price = 0;
              if (item.Price) {
                c_price = item.Price;
              }
              item.VNDSubTotal = (parseFloat(c_Kilometre) * parseFloat(c_times) * parseFloat(c_price))
                .toFixed(2);
              totalVNDPrice += parseFloat(item.VNDSubTotal);
            })
          });
          this.BusSum.TotalKM = subKMs.toFixed(2);
          this.BusSum.VNDTotalSum = totalVNDPrice.toFixed(2);
        }

        //船
        if (this.postData.SWTShipList && this.postData.SWTShipList.length > 0) {
          var subUSPrice = 0;
          var subVNDPrice = 0;
          var totalUSPrice = 0;
          var totalVNDPrice = 0;
          this.postData.SWTShipList.forEach(item => {
            var c_usprice = 0;
            if (item.USPrice) {
              c_usprice = item.USPrice;
            }
            var c_vndprice = 0;
            if (item.VNDPrice) {
              c_vndprice = item.VNDPrice
            }
            subUSPrice += Number(c_usprice);
            subVNDPrice += Number(c_vndprice);
            var c_times = 0;
            if (item.Times) {
              c_times = item.Times;
            }
            item.USSubTotal = (parseFloat(c_usprice) * parseFloat(c_times)).toFixed(2);
            item.VNDSubTotal = (parseFloat(c_vndprice) * parseFloat(c_times)).toFixed(2);
            totalUSPrice += parseFloat(item.USSubTotal);
            totalVNDPrice += parseFloat(item.VNDSubTotal);
          });
          this.ShipSum.USPriceSum = subUSPrice.toFixed(2);
          this.ShipSum.VNDPriceSum = subVNDPrice.toFixed(2);
          this.ShipSum.USTotalSum = totalUSPrice.toFixed(2);
          this.ShipSum.VNDTotalSum = totalVNDPrice.toFixed(2);
        }

        //杂支
        if (this.postData.SWTOtherPayList && this.postData.SWTOtherPayList.length > 0) {
          var subUSPrice = 0;
          var subVNDPrice = 0;
          var totalUSPrice = 0;
          var totalVNDPrice = 0;
          this.postData.SWTOtherPayList.forEach(item => {
            var c_usprice = 0;
            if (item.USPrice) {
              c_usprice = item.USPrice;
            }
            var c_vndprice = 0;
            if (item.VNDPrice) {
              c_vndprice = item.VNDPrice
            }
            subUSPrice += Number(c_usprice);
            subVNDPrice += Number(c_vndprice);
            var c_times = 0;
            if (item.Times) {
              c_times = item.Times;
            }
            var c_daynum = 0;
            if (item.DayNum) {
              c_daynum = item.DayNum;
            }
            var c_focnum = 0;
            if (item.FOCNum) {
              c_focnum = item.FOCNum;
            }
            item.USSubTotal = (parseFloat(c_usprice) * parseFloat(c_daynum) * (c_times - c_focnum)).toFixed(2);
            item.VNDSubTotal = (parseFloat(c_vndprice) * parseFloat(c_daynum) * (c_times - c_focnum)).toFixed(2);
            totalUSPrice += parseFloat(item.USSubTotal);
            totalVNDPrice += parseFloat(item.VNDSubTotal);
          });
          this.ZaZhiSum.USPriceSum = subUSPrice.toFixed(2);
          var USPrice_Single = 0;
          if (this.postData.GuestNum > 0) {
            USPrice_Single = parseFloat(subUSPrice) / parseFloat(this.postData.GuestNum);
          }
          this.ZaZhiSum.USPriceSingle = USPrice_Single.toFixed(2);

          this.ZaZhiSum.VNDPriceSum = subVNDPrice.toFixed(2);
          var VNDPrice_Single = 0;
          if (this.postData.GuestNum > 0) {
            VNDPrice_Single = parseFloat(subVNDPrice) / parseFloat(this.postData.GuestNum);
          }
          this.ZaZhiSum.VNDPriceSingle = VNDPrice_Single.toFixed(2);
          this.ZaZhiSum.USTotalSum = totalUSPrice.toFixed(2);
          this.ZaZhiSum.VNDTotalSum = totalVNDPrice.toFixed(2);
        }

        //自费计算
        if (this.postData.SWTSelfFeeList && this.postData.SWTSelfFeeList.length > 0) {
          var subUSPrice = 0;
          var subVNDPrice = 0;
          var totalUSPrice = 0;
          var totalVNDPrice = 0;
          this.postData.SWTSelfFeeList.forEach(item => {
            var c_usprice = 0;
            if (item.USPrice) {
              c_usprice = item.USPrice;
            }
            var c_vndprice = 0;
            if (item.VNDPrice) {
              c_vndprice = item.VNDPrice
            }
            subUSPrice += Number(c_usprice);
            subVNDPrice += Number(c_vndprice);

            var c_totalnum = 0;
            if (item.TotalNum) {
              c_totalnum = item.TotalNum;
            }
            var c_focnum = 0;
            if (item.FOCNum) {
              c_focnum = item.FOCNum;
            }

            item.USSubTotal = (parseFloat(c_usprice) * (c_totalnum - c_focnum)).toFixed(2);
            item.VNDSubTotal = (parseFloat(c_vndprice) * (c_totalnum - c_focnum)).toFixed(2);
            totalUSPrice += parseFloat(item.USSubTotal);
            totalVNDPrice += parseFloat(item.VNDSubTotal);
          });
          this.SelfFeeSum.USPriceSum = subUSPrice.toFixed(2);
          this.SelfFeeSum.VNDPriceSum = subVNDPrice.toFixed(2);
          this.SelfFeeSum.USTotalSum = totalUSPrice.toFixed(2);
          this.SelfFeeSum.VNDTotalSum = totalVNDPrice.toFixed(2);
        }

        //小费计算
        if (this.postData.SWTTipFeeList && this.postData.SWTTipFeeList.length > 0) {
          var subUSPrice = 0;
          var subVNDPrice = 0;
          var totalUSPrice = 0;
          var totalVNDPrice = 0;
          this.postData.SWTTipFeeList.forEach(item => {
            var c_usprice = 0;
            if (item.USPrice) {
              c_usprice = item.USPrice;
            }
            var c_vndprice = 0;
            if (item.VNDPrice) {
              c_vndprice = item.VNDPrice
            }
            subUSPrice += Number(c_usprice);
            subVNDPrice += Number(c_vndprice);
            var c_totalnum = 0;
            if (item.TotalNum) {
              c_totalnum = item.TotalNum;
            }
            var c_focnum = 0;
            if (item.FOCNum) {
              c_focnum = item.FOCNum;
            }
            item.USSubTotal = (parseFloat(c_usprice) * (c_totalnum - c_focnum)).toFixed(2);
            item.VNDSubTotal = (parseFloat(c_vndprice) * (c_totalnum - c_focnum)).toFixed(2);
            totalUSPrice += parseFloat(item.USSubTotal);
            totalVNDPrice += parseFloat(item.VNDSubTotal);
          });
          this.TipFeeSum.USPriceSum = subUSPrice.toFixed(2);
          this.TipFeeSum.VNDPriceSum = subVNDPrice.toFixed(2);
          this.TipFeeSum.USTotalSum = totalUSPrice.toFixed(2);
          this.TipFeeSum.VNDTotalSum = totalVNDPrice.toFixed(2);
        }
      },
      //获取车辆类型列表
      getBusTypeList() {
        this.apipost(
          "bus_get_GetBusTypePriceList", {
            StartDate: this.postData.StartDate
          },
          res => {
            if (res.data.resultCode == 1) {
              this.BusTypeList = res.data.data;
              this.BusTypeList.forEach(item => {
                item['newName'] = item.AreaTypeStr + '-' + item.BusTypeStr
              });
            }
          },
          null
        );
      },
    },
    created() {

    },
    mounted() {
      if (this.$route.query.Id) {
        this.Id = this.$route.query.Id;
      }
      if(this.$route.query.Type)
      {
          this.Type=this.$route.query.Type;
      }
      this.getBusTypeList();
      this.getData();
    },
    computed: {
      //人数计算
      getPeopleNum() {
        var totalNum = 0; //总人数【旅客人数+FOC人数】
        var focNum = 0; //FOC人数
        if (this.postData.GuestNum) {
          totalNum += Number(this.postData.GuestNum);
        }
        if (this.postData.FocNum) {
          totalNum += Number(this.postData.FocNum);
          focNum = Number(this.postData.FocNum);
        }
        //酒店房间数
        var hotelNum = (parseFloat(totalNum) / 2.0).toFixed(1);
        var obj = {
          totalNum: totalNum,
          focNum: focNum,
          hotelNum: hotelNum,
        }
        return obj;
      }
    },

  };

</script>
