<style>
  * {
    margin: 0;
    padding: 0;
  }

  .TC-MainContent {
    min-height: 650px;
    background: url(../assets/img/bodyBg.png);
    padding-top: 10px;
    font: normal 13px "Microsoft Yahei";
    color: #555;
    height: auto !important;
  }

  .TC-MainContent .fixedMenu {
    position: fixed;
    left: 20px;
    top: 75px;
    margin: 0;
    padding-top: 10px;
  }

  .TC-MainContent .fixedMenu li {
    padding: 5px 15px;
    position: relative;
    border-right: 2px solid #e2e2e2;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
  }

  .TC-MainContent .fixedMenu li:after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-left-color: #e2e2e2;
    position: absolute;
    right: -12px;
    top: 11px;
  }

  .TC-MainContent .contractTit {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 20px 12px;
    line-height: 30px;
    box-sizing: border-box;
    background: url(../assets/img/bodyBg.png);
    font-size: 18px;
    color: #555;
  }

  .TC-MainContent .contractTit span {
    font-size: 21px;
    font-weight: bold;
  }

  .TC-MainContent .block {
    border: 1px solid #cdcdcd;
    background: #f9f9f9;
    position: relative;
    margin-bottom: 20px;
  }

  .TC-MainContent .container-fluid {
    padding-right: 20px;
    padding-left: 20px;
    *zoom: 1;
  }

  .TC-MainContent .mtop15 {
    margin-top: 15px;
  }

  .TC-MainContent .blockTitle {
    border-bottom: 1px solid #cdcdcd;
    background-color: #efefef;
  }

  .TC-MainContent .blockTitle span.icon {
    border-right: 1px solid #cdcdcd;
    position: absolute;
    left: 10px;
    height: 40px;
    padding-right: 10px;
    padding-top: 8px;
  }

  .TC-MainContent .blockTitle h2 {
    font-size: 15px;
    min-height: 40px;
    margin: 0;
    font-family: "Microsoft Yahei";
    color: #5b5b5b;
    padding-right: 15px;
    padding-left: 48px;
    line-height: 40px;
  }

  .TC-MainContent .blockTitle h2 {
    font-size: 15px;
    min-height: 40px;
    margin: 0;
    font-family: "Microsoft Yahei";
    color: #5b5b5b;
    padding-right: 15px;
    padding-left: 48px;
  }

  .TC-MainContent .block em {
    font-style: normal;
  }

  .TC-MainContent .createTableTitle {
    padding: 10px 0;
    margin: 5px 30px 0;
    border-bottom: 1px dashed #ccc;
    font: normal 15px "microsoft yahei";
  }

  .TC-MainContent .createTable {
    background-color: #f9f9f9;
    width: 100%;
  }

  .TC-MainContent .el-form-item {
    margin-bottom: 10px;
  }

  .TC-MainContent .w300 {
    width: 300px !important;
  }

  .TC-MainContent .w150 {
    width: 150px !important;
  }

  .TC-MainContent .w138 {
    width: 138px !important;
  }

  .TC-MainContent .w600 {
    width: 600px !important;
  }

  .TC-MainContent .singeRowTable {
    width: 100%;
    border-collapse: collapse;
  }

  .TC-MainContent .singeRowTable tr th,
  .v-table-title-cell {
    background: #e6e6e6;
    height: 40px;
    font-size: 14px;
    color: #333;
  }

  .TC-MainContent .singeRowTable tr {
    background: #fff;
    text-align: center;
    height: 40px;
  }

  .TC-MainContent .singeRowTable tr:nth-child(2n + 1) {
    background: #fafafa;
  }

  .TC-MainContent .singeRowTable tr:hover {
    background: #f2f2f2;
  }

  .TC-MainContent .singeRowTable tr td {
    font-size: 12px;
    border: 1px solid #e5e5e5;
  }

  .TC-MainContent .TC_NewAddBtn {
    background-color: #006dcc;
    width: 83px;
    height: 26px;
    color: #fff;
    border: none;
    margin-right: 5px;
    cursor: pointer;
  }

  .TC-MainContent .singeRowTable .el-button.is-circle {
    padding: 5px;
  }

  .TC-MainContent .TcNewTable td {
    padding: 5px;
  }

  .TC-MainContent .fixedMenu li.active {
    background: #90b7ec;
    color: #fff;
    border-right-color: #5882bb;
  }

  .TC-MainContent .fixedMenu li.active:after {
    border-left-color: #5882bb;
  }

  .TC-MainContent .pull-right {
    float: right;
  }

  .TC-MainContent .TC_disabled {
    color: #57a3f3;
    cursor: not-allowed !important;
  }

  .TC-MainContent .TCbtn-info {
    color: #ffffff;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
    background-color: #49afcd;
    background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
    background-image: -webkit-gradient(linear,
        0 0,
        0 100%,
        from(#5bc0de),
        to(#2f96b4));
    background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
    background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
    background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
    background-repeat: repeat-x;
    border-color: #2f96b4 #2f96b4 #1f6377;
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);
    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
    padding: 10px 19px;
    border: none;
    outline: none;
    cursor: pointer;
  }

  .TC-MainContent .btn-warning {
    color: #ffffff;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
    background-color: #faa732;
    *background-color: #f89406;
    background-image: -moz-linear-gradient(top, #fbb450, #f89406);
    background-image: -webkit-gradient(linear,
        0 0,
        0 100%,
        from(#fbb450),
        to(#f89406));
    background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
    background-image: -o-linear-gradient(top, #fbb450, #f89406);
    background-image: linear-gradient(to bottom, #fbb450, #f89406);
    background-repeat: repeat-x;
    border-color: #f89406 #f89406 #ad6704;
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
    padding: 10px 19px;
    outline: none;
    border: none;
    cursor: pointer;
  }

  .TCbtn-info:hover,
  .btn-warning:hover {
    color: #ffffff;
    opacity: 0.8;
  }

  .TcTravel_Table {
    width: 100%;
    border: none;
    border-collapse: collapse;
    border-spacing: 0;
  }

  .TcTravel_Table td {
    border: 1px solid rgb(0, 0, 0);
    word-break: break-all;
    padding: 5px;
    line-height: 2;
  }

  .TC_LASTTD div {
    margin-bottom: 10px;
  }

  .feeJisuan .el-form-item__label {
    margin-top: 5px;
  }

  .Tc_ExchangeBtn {
    padding: 3px 10px;
    background-color: #006dcc;
    color: #fff;
    float: right;
    margin-top: 10px;
    border: none;
    outline: none;
    cursor: pointer;
  }

  .Tc_ExchangeBtn:hover {
    color: #ffffff;
    background-color: #0044cc;
    *background-color: #003bb3;
  }

  .TC-MainContent .disClick {
    background-color: #d1d1d1 !important;
    color: #fff !important;
    background-image: none;
    border: 1px solid #d1d1d1 !important;
  }

  .TC-MainContent .disClick:hover {
    background-color: #d1d1d1 !important;
    cursor: default !important;
    box-shadow: none !important;
  }

</style>
<template>
  <div class="TC-MainContent">
    <!-- 内容开始 -->
    <ul class="fixedMenu" id="fixedMenu">
      <li v-for="(item, index) in menuArr" :key="index" :class="{ active: index == ckedIndex }"
        @click="(ckedIndex = index), goAnchor('#anchor-' + index)">
        {{ item }}
      </li>
    </ul>
    <div class="contractTit">
      <span>
        大陆居民境内旅游合同
        <span style="color:blue;font-size:14px;"></span>
      </span>
      <div class="pull-right">
        <input type="button" class="btn-warning" :class="{'disClick':!isSubmit}" @click="submitForm('CtObj')"
          :value="$t('pub.saveBtn')" />
      </div>
    </div>
    <el-form label-width="180px" :model="CtObj" :rules="rules" ref="CtObj">
      <div class="container-fluid" style="padding-top: 60px; padding-left: 220px;">
        <div class="block mtop15" id="anchor-0" ref="anchor0">
          <div class="blockTitle">
            <span class="icon">
              <i class="iconfont icon-dingdanguanli-"></i>
            </span>
            <h2>
              <em>合同基本信息</em>
            </h2>
          </div>
          <div class="createTableTitle">旅游者代表信息</div>
          <table class="createTable">
            <tbody>
              <tr>
                <td>
                  <el-form-item :label="$t('system.query_name')" prop="Tourists_Name">
                    <el-input type="text" v-model="CtObj.Tourists_Name" maxlength="100" class="w300"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="旅客人数">
                    <el-input type="text" v-model="CtObj.GuestNum" maxlength="100" class="w300"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="证件号码">
                    <el-input type="text" v-model="CtObj.Tourists_IDNum" maxlength="100" class="w300"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="住所">
                    <el-input type="text" v-model="CtObj.Tourists_Addres" class="w300"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('scen.sc_tel')" prop="Tourists_Tel">
                    <el-input type="text" v-model="CtObj.Tourists_Tel" maxlength="100" class="w300"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="邮箱">
                    <el-input type="text" v-model="CtObj.Tourists_Email" maxlength="100" class="w300"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('hotel.hotel_fax')">
                    <el-input type="text" v-model="CtObj.Tourists_Fax" maxlength="100" class="w300"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('objFill.youbian')">
                    <el-input type="text" v-model="CtObj.Tourists_PostNum" maxlength="100" class="w300"></el-input>
                  </el-form-item>
                </td>
              </tr>
            </tbody>
          </table>
          <div class="createTableTitle">旅行社信息</div>
          <table class="createTable">
            <tbody>
              <tr>
                <td>
                  <el-form-item label="合同章">
                    <el-select v-model="CtObj.SignType" :placeholder="$t('pub.pleaseSel')" @change="changeSignType">
                      <el-option key="0" label="和平章" :value="0">
                      </el-option>
                      <el-option key="2" label="欧亚" :value="2">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('admin.admin_company')">
                    <el-input type="text" v-model="CtObj.TravelAgency_Name" :disabled="true" class="w300"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="经营许可证编号">
                    <el-input type="text" class="w300" :disabled="true" v-model="CtObj.TravelAgency_LicenseNum">
                    </el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('objFill.jinbanr')" prop="TravelAgency_DealMan">
                    <el-input type="text" class="w300" v-model="CtObj.TravelAgency_DealMan"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="营业地址">
                    <el-input type="text" class="w300" v-model="CtObj.TravelAgency_Address"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('scen.sc_tel')">
                    <el-input type="text" class="w300" v-model="CtObj.TravelAgency_Tel"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('hotel.hotel_fax')">
                    <el-input type="text" class="w300" v-model="CtObj.TravelAgency_Fax"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('objFill.youbian')">
                    <el-input type="text" class="w300" v-model="CtObj.TravelAgency_PostNum"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('objFill.dianziyx')">
                    <el-input type="text" class="w300" v-model="CtObj.TravelAgency_Email"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="签约地点">
                    <el-input type="text" class="w300" v-model="CtObj.TravelAgency_SignAddress"></el-input>
                  </el-form-item>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
        <div class="block mtop15" id="anchor-1" ref="anchor1">
          <div class="blockTitle">
            <span class="icon">
              <i class="iconfont icon-renwuguanli"></i>
            </span>
            <h2>
              <em>合同协议条款</em>
            </h2>
          </div>
          <div class="createTableTitle">{{$t('objFill.xianluxcsj')}}</div>
          <table class="createTable">
            <tbody>
              <tr>
                <td>
                  <el-form-item :label="$t('visa.v_tuanhao')">
                    <el-input type="text" class="w300" v-model="CtObj.C_TCNUM"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="旅游产品名称" prop="C_ProductName">
                    <el-input type="text" class="w300" v-model="CtObj.C_ProductName"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('hotel.hotel_StarDate')" prop="C_StartDate">
                    <el-date-picker class="w300" v-model="CtObj.C_StartDate" type="date" value-format="yyyy-MM-dd"
                      placeholder></el-date-picker>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('MarketingActi.endTime')" prop="C_EndDate">
                    <el-date-picker class="w300" v-model="CtObj.C_EndDate" type="date" value-format="yyyy-MM-dd"
                      placeholder></el-date-picker>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('hotel.hotel_totalRoom')" prop="C_DayNum">
                    <el-input type="text" class="w300" @keyup.native="checkInteger(CtObj,'C_DayNum')"
                      v-model="CtObj.C_DayNum"></el-input>&nbsp;天
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('objFill.jiudianzs')"
   prop="C_NightNum">
                    <el-input type="text" class="w300" @keyup.native="checkInteger(CtObj,'C_NightNum')"
                      v-model="CtObj.C_NightNum"></el-input>&nbsp;晚
                  </el-form-item>
                </td>
              </tr>
            </tbody>
          </table>
          <div class="createTableTitle">{{$t('objFill.lvyoufyjzf')}}</div>
          <table class="createTable">
            <tbody>
              <tr>
                <td>
                  <el-form-item :label="$t('salesModule.Adult')" prop="C_AdultPrice">
                    <el-input type="text" class="w300" @keyup.native="checkPrice(CtObj,'C_AdultPrice')"
                      v-model="CtObj.C_AdultPrice"></el-input>
                    元/人
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="儿童(不满14岁的)">
                    <el-input type="text" class="w300" @keyup.native="checkPrice(CtObj,'C_ChildrenPrice')"
                      v-model="CtObj.C_ChildrenPrice"></el-input>
                    元/人
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="导游服务费" prop="C_GuideServicePrice">
                    <el-input type="text" class="w300" @keyup.native="checkPrice(CtObj,'C_GuideServicePrice')"
                      v-model="CtObj.C_GuideServicePrice"></el-input>
                    元/人
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('fnc.a_heji')" prop="C_TotalPrice">
                    <el-input type="text" class="w300" @keyup.native="checkPrice(CtObj,'C_TotalPrice')"
                      v-model="CtObj.C_TotalPrice"></el-input>
                    {{$t('hotel.hotel_yuan')}}
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="旅游费用支付日期" prop="C_PayDate">
                    <el-date-picker class="w300" v-model="CtObj.C_PayDate" type="date" value-format="yyyy-MM-dd"
                      placeholder></el-date-picker>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('objFill.zffs')" prop="C_PayType">
                    <el-select :placeholder="$t('pub.pleaseSel')" filterable class="w300" v-model="CtObj.C_PayType">
                      <el-option :label="$t('fnc.xianjin')" :value="1"></el-option>
                      <el-option label="支票" :value="2"></el-option>
                      <el-option label="信用卡" :value="3"></el-option>
                      <el-option :label="$t('objFill.zhuanzhang')" :value="5"></el-option>
                      <el-option :label="$t('active.cl_qita')" :value="4"></el-option>
                    </el-select>
                  </el-form-item>
                </td>
              </tr>
              <tr v-if="CtObj.C_PayType == 4">
                <td>
                  <el-form-item :label="$t('pub.pubRemark')">
                    <el-input type="text" class="w300" v-model="CtObj.C_PayTypeRemark"></el-input>
                  </el-form-item>
                </td>
              </tr>
            </tbody>
          </table>
          <div class="createTableTitle">{{$t('objFill.renshnegywbx')}}</div>
          <table class="createTable">
            <tbody>
              <tr>
                <td>
                  <el-form-item label="旅游者">
                    <el-select :placeholder="$t('pub.pleaseSel')" filterable class="w300"
                      v-model="CtObj.C_InsuranceType">
                      <el-option label="委托旅行社购买" :value="1"></el-option>
                      <el-option label="自行购买" :value="2"></el-option>
                      <el-option label="放弃购买" :value="3"></el-option>
                    </el-select>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="保险公司名称" v-if="CtObj.C_InsuranceType==1">
                    <el-select :placeholder="$t('pub.pleaseSel')" filterable class='w300'
                      v-model="CtObj.C_InsuranceName">
                      <el-option label="中国平安财产保险股份有限公司成都市锦城支公司" value='中国平安财产保险股份有限公司成都市锦城支公司'></el-option>
                      <el-option label="あいおいニッセイ同和損害保険株式会社" value='あいおいニッセイ同和損害保険株式会社'></el-option>
                      <el-option label="中国大地财产保险股份有限公司" value='中国大地财产保险股份有限公司'></el-option>
                    </el-select>
                  </el-form-item>
                </td>
              </tr>
            </tbody>
          </table>
          <div class="createTableTitle">{{$t('objFill.chengtrsybctyd')}}</div>
          <table class="createTable">
            <tbody>
              <tr>
                <td>
                  <el-form-item :label="$t('objFill.zuidictrs')" prop="C_LowNum">
                    <el-input type="text" class="w150" @keyup.native="checkInteger(CtObj,'C_LowNum')"
                      v-model="CtObj.C_LowNum"></el-input>
                    {{$t('hotel.hotel_people')}}
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td style="padding:10px 0 20px 86px;">
                  如不能成团,旅游者是否同意按下列方式解决:
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="1、">
                    <el-select :placeholder="$t('pub.pleaseSel')" filterable class="w150"
                      v-model="CtObj.C_IsAgreeTravel">
                      <el-option :label="$t('salesModule.Agree')" :value="0"></el-option>
                      <el-option :label="$t('objFill.butongyi')" :value="1"></el-option>
                    </el-select>
                    旅行社委托
                    <el-input type="text" class="w300" v-model="CtObj.C_AgreeTravelName"></el-input>
                    旅行社履行合同;
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="2、">
                    <el-select :placeholder="$t('pub.pleaseSel')" filterable class="w150"
                      v-model="CtObj.C_IsAgreeDelay">
                      <el-option :label="$t('objFill.butongyi')" :value="1"></el-option>
                      <el-option :label="$t('salesModule.Agree')" :value="0"></el-option>
                    </el-select>
                    延期出团;
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="3、">
                    <el-select :placeholder="$t('pub.pleaseSel')" filterable class="w150"
                      v-model="CtObj.C_IsAgreeCndorse">
                      <el-option :label="$t('objFill.butongyi')" :value="1"></el-option>
                      <el-option :label="$t('salesModule.Agree')" :value="0"></el-option>
                    </el-select>
                    改签其他线路出团;
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="4、">
                    <el-select :placeholder="$t('pub.pleaseSel')" filterable class="w150"
                      v-model="CtObj.C_IsAgreeRemove">
                      <el-option :label="$t('objFill.butongyi')" :value="1"></el-option>
                      <el-option :label="$t('salesModule.Agree')" :value="0"></el-option>
                    </el-select>
                    解除合同。
                  </el-form-item>
                </td>
              </tr>
            </tbody>
          </table>
          <div class="createTableTitle">{{$t('objFill.pingtuanyd')}}</div>
          <table class="createTable">
            <tbody>
              <tr>
                <td>
                  <el-form-item label="旅游者">
                    <el-select :placeholder="$t('pub.pleaseSel')" filterable class="w150"
                      v-model="CtObj.C_IsAgreeSpellGroup">
                      <el-option :label="$t('objFill.butongyi')" :value="1"></el-option>
                      <el-option :label="$t('salesModule.Agree')" :value="0"></el-option>
                    </el-select>
                    采用拼团方式拼至
                    <el-input type="text" class="w300" v-model="CtObj.C_SpellGroupName"></el-input>
                    旅行社成团。
                  </el-form-item>
                </td>
              </tr>
            </tbody>
          </table>
          <div class="createTableTitle">{{$t('objFill.zhenyidjjfs')}}</div>
          <table class="createTable">
            <tbody>
              <tr>
                <td>
                  <div style="margin:20px 0 10px 50px">
                    本合同履行过程中发生争议,由双方协商解决;亦可向合同签订地的旅游质监执法机构、消费者协会等有关部门或者机构申请调解解决。
                  </div>
                  <el-form-item label-width="0" style="margin-left:50px;">
                    <span style="color:red;">*</span>
                    争议解决方式选择:协商或调解不成,按下列第
                    <el-select :placeholder="$t('pub.pleaseSel')" filterable class="w150" v-model="CtObj.C_SolveType">
                      <el-option label="1" :value="1"></el-option>
                      <el-option label="2" :value="2"></el-option>
                    </el-select>
                    {{$t('objFill.zhongfangs')}}
                  </el-form-item>
                  <el-form-item label="1、提交" v-if="CtObj.C_SolveType == 1" label-width="110px">
                    <el-input type="text" class="w300" v-model="CtObj.C_SolveRemark"></el-input>&nbsp;仲裁委员会仲裁;
                  </el-form-item>
                  <div v-if="CtObj.C_SolveType == 2" style="margin:0 0 20px 50px;">
                    2、依法向人民法院起诉。
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
          <div class="createTableTitle">{{$t('objFill.hetongxiaol')}}</div>
          <table class="createTable feeJisuan">
            <tbody>
              <tr>
                <td width="450">
                  <el-form-item :label="$t('objFill.benhtys')" prop="C_ContractTotal">
                    <el-input type="text" class="w150" v-model="CtObj.C_ContractTotal"></el-input>&nbsp;份
                  </el-form-item>
                </td>
                <td>
                  <el-form-item label=",双方各持" prop="C_ContractPer" label-width="120">
                    <el-input type="text" class="w150" v-model="CtObj.C_ContractPer"></el-input>
                    &nbsp;份,具有同等法律效力,自双方当事人签字或者盖章之日起生效。
                  </el-form-item>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
        <div class="block mtop15" id="anchor-2" ref="anchor2">
          <div class="blockTitle">
            <span class="icon">
              <i class="iconfont icon-copy"></i>
            </span>
            <h2>
              <em>{{$t('objFill.qitayuedsx')}}</em>
            </h2>
          </div>
          <div style="padding:10px;">
            未尽事宜,经旅游者和旅行社双方协商一致,可以列入补充条款。(如合同空间不够,可以另附纸张,由双方签字或者盖章确认。)
          </div>
          <el-input type="textarea" resize="none" v-model="CtObj.OtherConvention" rows="13"></el-input>
        </div>
        <div class="block mtop15" id="anchor-3" ref="anchor3">
          <div class="blockTitle">
            <span class="icon">
              <i class="iconfont icon-Shape2"></i>
            </span>
            <h2>
              <em>投诉联系</em>
            </h2>
          </div>
          <table class="createTable">
            <tbody>
              <tr>
                <td>
                  <el-form-item label="旅行社监督、投诉电话">
                    <el-input type="text" class="w300" v-model="CtObj.TravelAgency_ServiceTel"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item style="display:inline-block;">
                    <el-input type="text" class="w138" v-model="CtObj.C_ComplaintProvince"></el-input>&nbsp;省
                  </el-form-item>
                  <el-form-item label-width="0" style="display:inline-block;">
                    <el-input type="text" class="w138" v-model="CtObj.C_ComplaintCity"></el-input>&nbsp;市旅游质监执法机构
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item label="投诉电话">
                    <el-input type="text" class="w300" v-model="CtObj.C_ComplaintTel"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('objFill.dianziyx')">
                    <el-input type="text" class="w300" v-model="CtObj.C_ComplaintEmail"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('admin.admin_address')">
                    <el-input type="text" class="w300" v-model="CtObj.C_ComplaintAddress"></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <td>
                  <el-form-item :label="$t('objFill.youbian')">
                    <el-input type="text" class="w300" v-model="CtObj.C_ComplaintPostNum"></el-input>
                  </el-form-item>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
        <div class="block mtop15" id="anchor-4" ref="anchor4">
          <div class="blockTitle">
            <span class="icon">
              <i class="iconfont icon-Shape1"></i>
            </span>
            <h2>
              <em>{{$t('objFill.xiingchengxx')}}</em>
              <input type="button" class="Tc_ExchangeBtn" @click="exchangeTrip()" :value="tripStr" />
            </h2>
          </div>
          <div style="padding:10px;background:#f9f9f9;color:red;">
            《行程单》应当对如下内容作出明确的说明:
            (1)旅游行程的出发地、途经地、目的地、结束地,线路行程时间(按自然日计算,含乘飞机、车、船等在途时间,不足24小时以一日计);
            (2)旅游目的地地接社的名称、地址、联系人和联系电话;
            (3)交通服务安排及其标准(明确交通工具及档次等级、出发时间以及是否需中转等信息);
            (4)住宿服务安排及其标准(明确住宿饭店的名称、地址、档次等级及是否有空调、热水等相关服务设施);
            (5)用餐(早餐和正餐)服务安排及其标准(明确用餐次数、地点、标准);
            (6)旅行社统一安排的游览项目的具体内容及时间(明确旅游线路内容包括景区点及游览项目名称、景区点停留的最少时间);
            (7)自由活动的时间;
            (8)行程安排的娱乐活动(明确娱乐活动的时间、地点和项目内容);
            {{$t('objFill.v101.Contract.xingcdyyx')}}
          </div>
          <!-- <div v-if="IsLoad==1">
            <commonTripList @tripData="tripData" :ContractTripList="CtObj.ContractTripList" :TripType="CtObj.TripType">
            </commonTripList>
          </div> -->
          <div v-if="CtObj.ID>0" ref="TcTravel_Table" v-html="CtObj.ContractTripList[0].TravelContent" ></div>
          <div v-else ref="TcTravel_Table">
            <table class="TcTravel_Table">
              <tbody>
                <tr>
                  <td colspan="5" contenteditable="true">组团社:印象之旅</td>
                </tr>
                <tr>
                  <td colspan="5" contenteditable="true">
                    旅游线路名称:{{
                      CtObj.C_ProductName
                    }}&nbsp;&nbsp;&nbsp;&nbsp;行程共计:{{ CtObj.C_DayNum }}天
                    {{ CtObj.C_NightNum }}{{$t('objFill.wan')}}(含在途时间)
                  </td>
                </tr>
                <tr>
                  <td colspan="5" contenteditable="true">
                    {{$t('Airticket.Air_StartTime')}}:{{
                      getDate(CtObj.C_StartDate)
                    }}&nbsp;&nbsp;&nbsp;&nbsp; 出发地点:{{
                      CtObj.C_StartAddress
                    }}
                    &nbsp;&nbsp;&nbsp;&nbsp;目的地:{{
                      CtObj.touristDestination
                    }}
                  </td>
                </tr>
                <tr>
                  <td colspan="5" contenteditable="true">
                    结束时间:{{
                      getDate(CtObj.C_EndDate)
                    }}&nbsp;&nbsp;&nbsp;&nbsp; 返回地点:{{ CtObj.C_ReturnAddress }}
                  </td>
                </tr>
                <tr>
                  <td colspan="5">
                    <div style="display: flex">
                      <span>地接社名称:</span>
                      <div contenteditable="true" style="width: 250px">
                        株式会社 ピースインターナショナル
                      </div>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td style="width: 15%">行程时间</td>
                  <td style="width: 50%">主要景点名称(游览时间)</td>
                  <td>交通工具(标准)</td>
                  <td>酒店标准</td>
                  <td>房间标准</td>
                </tr>
                <tr v-for="(item, index) in tripDays" :key="`td_`+index">
                  <td contenteditable="true">
                    {{ getDayAddOne(CtObj.C_StartDate, index) }}
                  </td>
                  <td contenteditable="true">
                    <div v-for="(subItem,subIndex) in item.dayArray" :key="`tdd_`+index+subIndex">
                      <span v-if="subItem.type == 2">
                        {{ subItem.childItem.couponsName }}
                        <span v-if="
                            subItem.childItem.playTimeHour != null &&
                            subItem.childItem.playTimeHour != ''
                          ">({{ subItem.childItem.playTimeHour }}小时</span>
                        <span v-if="
                            subItem.childItem.playTimeMinutes != null &&
                            subItem.childItem.playTimeMinutes != ''
                          ">
                          <template v-if="
                              subItem.childItem.playTimeHour == null &&
                              subItem.childItem.playTimeHour != ''
                            ">(</template>
                          {{ subItem.childItem.playTimeMinutes }}分钟)</span>
                      </span>
                      <span v-if="
                          subItem.type == 7 &&
                          (index == 0 || index == tripDays.length - 1)
                        ">
                        {{ subItem.childItem.title }}
                      </span>
                    </div>
                  </td>
                  <td contenteditable="true">
                    {{ item.TrifficType }}
                  </td>
                  <td contenteditable="true">
                    <span v-if="index != tripList.length - 1">旅游酒店</span>
                    <span v-else>无</span>
                  </td>
                  <td contenteditable="true">
                    <span v-if="index != tripList.length - 1">{{$t('objFill.shuanrenjian')}}</span>
                    <span v-else>无</span>
                  </td>
                </tr>
                <tr>
                  <td colspan="5" class="TC_LASTTD" contenteditable="true">
                    <div>
                      {{$t('pub.pubRemark')}}:1、在主要景点的游览时间不小于此数的时间,以小时填;<br />
                      2、交通工具不含景区观光车、索道等;<br />
                      3、“交通工具”栏中的“标准”按各类别的标准填写。
                    </div>
                    <div>
                      飞机:头等舱/商务舱/经济舱;&nbsp;&nbsp;&nbsp;汽车:空调大巴/空调卧铺/普通客车
                    </div>
                    <div>
                      火车:普通车/空调车/动车组(其中:软卧/硬卧/软座/硬座);
                    </div>
                    <div style="color: red" v-if="CtObj.CType!=3">
                      注:用房全程酒店均为二人一间,如您的订单产生单房,在未补单房差的情况下,我社将尽量安排您与其它客人拼房或是与同行者入住三人房,不可选择房型。敬请配合,服从调配。
                    </div>
                    <template v-if="CtObj.TeamType == 2">
                      <div>
                        {{$t('pub.pubRemark')}}:<br />
                        注:《1》本行程交通、住宿、用餐、观光点尽量忠于原行程,若遇特殊状况:如天气、交通阻塞、路况等、观光点休假、住宿饭店调整及其它不可抗拒之现象,行程会有所变动,相应调整,本公司保有变更行程之权利。尽量忠于原行程,敬请谅解!<br />
                        注:《2》根据人数调配车型,不可以指定车型车牌!<br />
                        注:《3》由于停车问题,司机兼向导大多数情况下为沿途讲解,不入景区,司机兼向导最重要的是保证贵宾的行车安全,敬请谅解!如果对讲解有特别高的要求,建议加配专职导游! <br />
                        注:《4》あいおいニッセイ同和損害保険株式会社的保险保障只针对日本以外的外国人有效,不适用于:持在留卡者及日本本国人。敬请注意!<br />
                        【行程中的观光时间仅限参考,实际旅行过程中有时间浮动敬请贵宾谅解为谢!!!】<br />

                        ※因本行程为精品拼团游,雨雪天行驶较为困难,故建议于出发前
                        10 分钟⾄集合地点等候,请贵宾注意集合时间。<br />
                        ※⾏程时间由司导根据⻋程远近等情况来进⾏安排,请互相理解配合,统⼀听从司导安排!精品散拼团
                        请贵宾时间严守!<br />
                        ※再次提醒短途旅行,请贵宾携带小包出行,【不要带大件礼箱!】<br />

                        【退改规则】<br />
                        出发前 11-8 天(不含),收取损失30%。<br />
                        出发前 3~7(不含),收取损失50%。<br />
                        出发前 2~3 天(含),收取损失 80%。<br />
                        出发前 1 天(含),将不退还任何费⽤,收取损失100%<br />
                      </div>
                    </template>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
        <div class="block mtop15" id="anchor-5" ref="anchor5">
          <div class="blockTitle">
            <span class="icon">
              <i class="iconfont icon-people"></i>
            </span>
            <h2>
              <em>游客信息</em>
            </h2>
          </div>
          <table class="singeRowTable TcNewTable" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <th width="80">{{$t('active.ad_xuhao')}}</th>
              <th>{{$t('system.query_name')}}</th>
              <th>{{$t('system.table_sex')}}</th>
              <th>证件类型</th>
              <th>{{$t('sm.huzhaohaoma')}}</th>
              <th>联系电话(手机)</th>
              <th>{{$t('objFill.v101.Contract.shengtizk')}}</th>
              <th width="100">{{$t('hotel.table_operat')}}</th>
            </tr>
            <tr v-for="(item, index) in CtObj.ContractGuestList" :key="index">
              <td>{{ index + 1 }}</td>
              <td>
                <span v-if="item.IsShow == 0">{{ item.CGuestName }}</span>
                <el-input type="text" class="w150" v-model="item.CGuestName" v-else></el-input>
              </td>
              <td>
                <span v-if="item.IsShow == 0">{{ item.CGuestSex }}</span>
                <el-select v-model="item.CGuestSex" v-else>
                  <el-option :label="$t('pub.man')" value="男"></el-option>
                  <el-option :label="$t('pub.woman')" value="女"></el-option>
                </el-select>
              </td>
              <td>
                <span v-if="item.IsShow == 0">{{
                  item.CGuestCertificateType
                }}</span>
                <el-select v-model="item.CGuestCertificateType" v-else>
                  <el-option label="护照" value="护照"></el-option>
                  <el-option label="港澳通行证" value="港澳通行证"></el-option>
                  <el-option label="赴台证" value="赴台证"></el-option>
                  <el-option label="身份证" value="身份证"></el-option>
                  <el-option :label="$t('active.cl_qita')" :value="$t('active.cl_qita')"></el-option>
                </el-select>
              </td>
              <td>
                <span v-if="item.IsShow == 0">{{
                  item.CGuestCertificateNum
                }}</span>
                <el-input type="text" v-model="item.CGuestCertificateNum" v-else></el-input>
              </td>
              <td>
                <span v-if="item.IsShow == 0">{{ item.CGuestTel }}</span>
                <el-input type="text" @keyup.native="checkInteger(item,'CGuestTel')" v-model="item.CGuestTel" v-else>
                </el-input>
              </td>
              <td>
                <span v-if="item.IsShow == 0">{{ item.CGuestHealth }}</span>
                <el-input type="text" placeholder="健康" v-model="item.CGuestHealth" v-else></el-input>
              </td>
              <td>
                <el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" v-if="item.IsShow == 0"
                  placement="top-start">
                  <el-button type="primary" icon="el-icon-edit" circle @click="commonUpdate(item)"></el-button>
                </el-tooltip>
                <el-tooltip class="item" effect="dark" :content="$t('pub.saveBtn')" v-if="item.IsShow == 1" placement="top-start">
                  <el-button type="primary" icon="iconfont icon-baocun" @click="commonSave(item)" circle></el-button>
                </el-tooltip>
                <el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
                  <el-button type="danger" icon="el-icon-delete" circle @click="delTouristArr(index)"></el-button>
                </el-tooltip>
              </td>
            </tr>
            <tr>
              <td colspan="9" style="text-align:right;">
                <input type="button" class="TC_NewAddBtn" @click="addTourist()" value="+添加游客" />
              </td>
            </tr>
          </table>
        </div>
        <div class="block mtop15" id="anchor-6" ref="anchor6">
          <div class="blockTitle">
            <span class="icon">
              <i class="iconfont icon-bianji"></i>
            </span>
            <h2>
              <em>自愿购物活动补充协议</em>
            </h2>
          </div>
          <table class="singeRowTable TcNewTable" border="0" cellspacing="0" cellpadding="0">
            <tbody>
              <tr>
                <th width="60">{{$t('active.ad_xuhao')}}</th>
                <th width="10%">{{$t('objFill.jutishij')}}</th>
                <th width="15%">{{$t('objFill.didian')}}</th>
                <th width="12%">{{$t('objFill.gouwucsmc')}}</th>
                <th width="12%">{{$t('objFill.zhuyaospxx')}}</th>
                <th width="12%">{{$t('objFill.zuichangtlsj')}}</th>
                <th width="12%">{{$t('objFill.qitashuim')}}</th>
                <th width="12%">旅游者签名同意</th>
                <th width="100">{{$t('hotel.table_operat')}}</th>
              </tr>
              <tr v-for="(item, index) in CtObj.ContractShopList" :key="index">
                <td>
                  {{ index + 1 }}
                </td>
                <td>
                  <span v-if="item.IsShow == 0">{{ item.ShopTime }}</span>
                  <el-date-picker v-else v-model="item.ShopTime" class="w150" type="date" value-format="yyyy-MM-dd"
                    placeholder=""></el-date-picker>
                </td>
                <td>
                  <span v-if="item.IsShow == 0">{{ item.ShopAddress }}</span>
                  <el-input type="text" v-model="item.ShopAddress" v-else></el-input>
                </td>
                <td style="text-align:left;">
                  <span v-if="item.IsShow == 0">{{ item.ShopName }}</span>
                  <el-input type="text" v-model="item.ShopName" v-else></el-input>
                </td>
                <td style="text-align:left;">
                  <span v-if="item.IsShow == 0">{{ item.ShopGoodName }}</span>
                  <el-input type="text" v-model="item.ShopGoodName" v-else></el-input>
                </td>
                <td>
                  <span v-if="item.IsShow == 0">{{ item.StopTime }}</span>
                  <el-input type="text" @keyup.native="checkInteger(item,'StopTime')" v-model="item.StopTime" v-else>
                  </el-input>
                </td>
                <td style="text-align:left;">
                  <span v-if="item.IsShow == 0">{{
                    item.OtherInstruction
                  }}</span>
                  <el-input type="text" v-model="item.OtherInstruction" v-else></el-input>
                </td>
                <td>
                  <span v-if="item.IsShow == 0">{{
                    item.TouristsSignAgree
                  }}</span>
                  <el-input type="text" v-model="item.TouristsSignAgree" v-else></el-input>
                </td>
                <td>
                  <el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" placement="top-start"
                    v-if="item.IsShow == 0">
                    <el-button type="primary" icon="el-icon-edit" circle @click="commonUpdate(item)"></el-button>
                  </el-tooltip>
                  <el-tooltip class="item" effect="dark" :content="$t('pub.saveBtn')" placement="top-start" v-if="item.IsShow == 1">
                    <el-button type="primary" icon="iconfont icon-baocun" circle @click="commonSave(item)"></el-button>
                  </el-tooltip>
                  <el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
                    <el-button type="danger" icon="el-icon-delete" @click="delVoluntray(index)" circle></el-button>
                  </el-tooltip>
                </td>
              </tr>
              <tr>
                <td colspan="9" style="text-align:right;">
                  <input type="button" class="TC_NewAddBtn" @click="addRecord()" value="+添加记录" />
                </td>
              </tr>
            </tbody>
          </table>
        </div>
        <div class="block mtop15" id="anchor-7" ref="anchor7">
          <div class="blockTitle">
            <span class="icon">
              <i class="iconfont icon-bianji"></i>
            </span>
            <h2>
              <em>自愿付费项目补充协议</em>
            </h2>
          </div>
          <table class="singeRowTable TcNewTable" border="0" cellspacing="0" cellpadding="0">
            <tbody>
              <tr>
                <th width="60">{{$t('active.ad_xuhao')}}</th>
                <th width="10%">{{$t('objFill.jutishij')}}</th>
                <th width="15%">{{$t('objFill.didian')}}</th>
                <th width="12%">项目名称和内容</th>
                <th width="12%">费用(元)</th>
                <th width="12%">项目时长(分钟)</th>
                <th width="12%">{{$t('objFill.qitashuim')}}</th>
                <th width="12%">旅游者签名同意</th>
                <th width="100">{{$t('hotel.table_operat')}}</th>
              </tr>
              <tr v-for="(item, index) in CtObj.ContractSelfFeeList" :key="index">
                <td>
                  {{ index + 1 }}
                </td>
                <td>
                  <span v-if="item.IsShow == 0">{{ item.SelfFeeTime }}</span>
                  <el-date-picker v-else v-model="item.SelfFeeTime" class="w150" type="date" value-format="yyyy-MM-dd"
                    placeholder=""></el-date-picker>
                </td>
                <td>
                  <span v-if="item.IsShow == 0">{{ item.SelfFeeAddress }}</span>
                  <el-input type="text" v-model="item.SelfFeeAddress" v-else></el-input>
                </td>
                <td style="text-align:left;">
                  <span v-if="item.IsShow == 0">{{ item.SelfFeeName }}</span>
                  <el-input type="text" v-model="item.SelfFeeName" v-else></el-input>
                </td>
                <td style="text-align:left;">
                  <span v-if="item.IsShow == 0">{{ item.SelfFeePrice }}</span>
                  <el-input type="text" v-model="item.SelfFeePrice" @keyup.native="checkPrice(item,'SelfFeePrice')"
                    v-else></el-input>
                </td>
                <td>
                  <span v-if="item.IsShow == 0">{{ item.StopTime }}</span>
                  <el-input type="text" @keyup.native="checkInteger(item,'StopTime')" v-model="item.StopTime" v-else>
                  </el-input>
                </td>
                <td style="text-align:left;">
                  <span v-if="item.IsShow == 0">{{ item.OtherInstruction }}</span>
                  <el-input type="text" v-model="item.OtherInstruction" v-else></el-input>
                </td>
                <td>
                  <span v-if="item.IsShow == 0">{{ item.TouristsSignAgree }}</span>
                  <el-input type="text" v-model="item.TouristsSignAgree" v-else></el-input>
                </td>
                <td>
                  <el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" placement="top-start"
                    v-if="item.IsShow == 0">
                    <el-button type="primary" icon="el-icon-edit" circle @click="commonUpdate(item)"></el-button>
                  </el-tooltip>
                  <el-tooltip class="item" effect="dark" :content="$t('pub.saveBtn')" placement="top-start" v-if="item.IsShow == 1">
                    <el-button type="primary" icon="iconfont icon-baocun" circle @click="commonSave(item)"></el-button>
                  </el-tooltip>
                  <el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
                    <el-button type="danger" icon="el-icon-delete" @click="delWilling(index)" circle></el-button>
                  </el-tooltip>
                </td>
              </tr>
              <tr>
                <td colspan="9" style="text-align:right;">
                  <input type="button" class="TC_NewAddBtn" @click="addWilling()" value="+添加记录" />
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </el-form>
  </div>
</template>
<script>
  import moment from "moment";
  import commonTripList from "./commonPage/commonTripList.vue";
  export default {
    data() {
      return {
        //选中切换
        cked: 1,
        //查询参数
        msg: {
          TCID: 0,
          orderID: 0,
          guestId: 0
        },
        addMsg: {
          Country: 0,
          Province: 0,
          City: 0
        },
        //参数
        CtObj: {
          CType: 2, //合同类型:(1-单项委托协议[平台版2018],2大陆境内旅游合同2014,3-全国版国内旅游一日游旅游合同示范文本[2015版])
          Tourists_Name: "",
          Tourists_IDNum: "",
          Tourists_Addres: "",
          Tourists_Tel: "",
          Tourists_Email: "",
          Tourists_PostNum: "",
          Tourists_Fax: "",
          Tourists_EmergencyLinkMan: "",
          Tourists_EmergencyLinkTel: "",
          TravelAgency_Name: "四川和平国际旅行社有限公司", //旅行社名称
          TravelAgency_LicenseNum: "L-SC-CJ00015",
          TravelAgency_DealMan: "",
          TravelAgency_IDNum: "",
          TravelAgency_Address: "成都市锦江区青和里南段55号1栋2310、2311、2312号 ",
          TravelAgency_Tel: "",
          TravelAgency_Fax: "",
          TravelAgency_PostNum: "",
          TravelAgency_Email: "",
          TravelAgency_Scope: "出境游/境内游", //旅行社经营范围
          TravelAgency_SignAddress: "",
          Guide_Name: "",
          Guide_Num: "",
          Guide_Tel: "",
          C_TCNUM: "", //团号
          C_ProductName: "",
          C_StartDate: "", //出发时间
          C_EndDate: "",
          C_DayNum: "",
          C_NightNum: "",
          C_AdultNum: "",
          C_AdultPrice: "", //成人价格
          C_ChildrenNum: "",
          C_ChildrenPrice: "",
          C_GuideServicePrice: "",
          C_TotalPrice: "",
          C_PayDate: "",
          C_PayType: 1, // 旅游费用支付方式(1-现金,2-支票,3-信用卡,4-其他,5-转账)
          C_PayTypeRemark: "", //转账填写转账账号和备注
          C_InsuranceType: 1, // 旅游者保险购买方式(1-委托旅行社购买,2-自行购买,3-放弃购买)
          C_InsuranceName: "",
          C_LowNum: "",
          C_IsAgreeTravel: 1, // 是否同意旅行社委托(1-不同意,0同意)
          C_AgreeTravelName: "", // 是否同意旅行社名称
          C_IsAgreeDelay: 1, /// 是否同意延期出团(1-不同意,0同意)
          C_IsAgreeCndorse: 1, /// 是否同意改签(1-不同意,0同意)
          C_IsAgreeRemove: 1, // 是否同意解除合同(1-不同意,0同意)
          C_IsAgreeSpellGroup: 1, // 是否同意拼团(1-不同意,0同意)
          C_SpellGroupName: "", // 拼团旅行社名称
          C_SolveType: 2, // 争议解决方式
          C_SolveRemark: "", // 争议解决方式备注
          C_ContractTotal: "2", // 合同总分数
          C_ContractPer: "1", // 各持几份
          C_StartAddress: "", // 出发地点
          C_ReturnAddress: "", //返回地点
          C_TrafficType: 1, // 交通方式(1-合车游,2-包车游)
          C_BusCode: "", // 车牌号
          C_DriverName: "", // 驾驶员姓名
          C_IsHaveKongTiao: 1, // 是否有空调(0-有空调,1-无空调)
          C_BusType: 1, // 车辆类型(1-面包车,2-中巴车,3-大巴车)
          C_BreakfastAddress: "", // 早餐地点
          C_BreakfastBasic: "", // 早餐标准
          C_LunchAddress: "", // 午餐地点
          C_LunchBasic: "", // 午餐标准
          C_DinnerAddress: "", // 晚餐地点
          C_DinnerBasic: "", // 晚餐标准
          C_IncludeRemark: "", // 费用包含
          C_NonIncludeRemark: "", // 费用不包含
          TravelAgency_ServiceTel: "", // 旅行社客服电话
          C_ComplaintProvince: "", // 投诉省
          C_ComplaintCity: "", // 投诉市
          C_ComplaintTel: "", // 投诉电话
          C_ComplaintEmail: "", // 投诉电子邮箱
          C_ComplaintAddress: "", // 投诉地址
          C_ComplaintPostNum: "", // 投诉邮编
          C_ZhiFaTel: "", // 执法机构电话
          C_XFZXHTSTel: "", // 消费者协会投诉电话
          C_TicketDayNum: "", // 几日内出票
          C_OrderDayNum: "", // 几日内下单
          C_PayDayNum: "", // 几日内缴费
          C_SignType: "", // 获取签证资料及领取签证方式
          OtherConventionPrice: "", // 其他服务费用合计
          OtherConvention: "", // 其他约定事项
          TripJson: "",
          GuestJson: "", // 游客信息【json】
          ShopJson: "", // 购物信息【json】
          SelfFeeJson: "", // 自费信息【Json】
          TicketJson: "", // 机票信息
          TicketTotalNum: 0, // 机票总数量
          TicketOutDayNum: 0, // 机票几日内出票
          TicketTotalDepositPrice: 0, // 机票预订总费用
          HotelBookJson: "", // 酒店预订
          HotelTotal: "", // 酒店多少间、晚
          HotelCheckInType: "", // 酒店入住方式
          HotelNotice: "", // 下订单后通知旅游者的方式
          HotelTotalPrice: "0", // 酒店费用总计
          PickUpJson: "", // 接送信息
          PickUpTotalPrice: "0", // 接送总费用
          VisaJson: "", // 签证信息
          VisaTotalPrice: "0", // 签证总费用
          TicketAndHotelJson: "", // 机票与酒店信息
          TicketAndHotelTotalPrice: "0", // 机票加酒店组合总费用
          ContractShopList: [], //自愿购物活动补充协议
          ContractGuestList: [], //旅客名单
          ContractTripList: [{
            TripType: 1,
            DayNum: 1,
            Go: "",
            GoProvice: "",
            IsOut: 0,
            TravelContent: ""
          }], //行程列表
          ContractSelfFeeList: [], //自愿付费项目补充协议
          TripType: 0, //行程类型(0-简易行程,1-标准行程)
          TCID: 0,
          OrderId: 0,
          GuestNum: 0, //旅客人数
          SignType: 0, //0-四川和平,1-日本PIC,2-成都欧亚
        },
        //旅客名单
        guestList: [],
        tripList: [],
        rules: {
          Tourists_Name: [{
            required: true,
            message: this.$t('rule.EnterCusNameC'),
            trigger: "blur"
          }],
          Tourists_Tel: [{
            required: true,
            message: this.$t('rule.EnterPNum'),
            trigger: "blur"
          }],
          TravelAgency_DealMan: [{
            required: true,
            message: this.$t('objFill.qingsrjbren'),
            trigger: "blur"
          }],
          C_ProductName: [{
            required: true,
            message: "请输入旅游产品名称",
            trigger: "blur"
          }],
          C_StartDate: [{
            required: true,
            message: this.$t('objFill.qingxuanzcfrq'),
            trigger: "change"
          }],
          C_EndDate: [{
            required: true,
            message: this.$t('objFill.qingxuanzjssj'),
            trigger: "change"
          }],
          C_DayNum: [{
            required: true,
            message: "请输入天数",
            trigger: "blur"
          }],
          C_AdultPrice: [{
            required: true,
            message: "请输入成人价",
            trigger: "blur"
          }],
          C_GuideServicePrice: [{
            required: true,
            message: "请输入导游服务费",
            trigger: "blur"
          }],
          C_TotalPrice: [{
            required: true,
            message: "请输入合计",
            trigger: "blur"
          }],
          C_PayDate: [{
            required: true,
            message: this.$t('objFill.qingxzzfrqi'),
            trigger: "blur"
          }],
          C_InsuranceName: [{
            required: true,
            message: "请输入保险名称",
            trigger: "blur"
          }],
          C_LowNum: [{
            required: true,
            message: "请输入最低成团人数",
            trigger: "blur"
          }],
          C_ContractTotal: [{
            required: true,
            message: "请输入合同份数",
            trigger: "blur"
          }]
        },
        //自愿购物活动补充协议
        VoluntaryArr: [],
        //自愿付费项目补充协议
        WillingPayArr: [],
        //菜单列表
        menuArr: [
          "合同基本信息",
          "合同协议条款",
          "其他约定事项",
          "投诉联系",
          "行程信息",
          "游客信息",
          "自愿购物活动补充协议",
          "自愿付费项目补充协议"
        ],
        ckedIndex: 0,
        TripInfo: '',
        tripStr: '切换到标准行程录入',
        //防止重复提交
        isSubmit: true,
        startDate: "",
        tripDays: [],
        trifficList: [],
        tripList: [],
        LineName: "",
      };
    },
    components: {
      commonTripList: commonTripList
    },
    methods: {
      getDate(date) {
        if (date && date != "") {
          return moment(date).format("YYYY-MM-DD");
        }
        return "";
      },
      //加一天返回
      getDayAddOne(day, num) {
        if (day && day != "") {
          return moment(day).add(num, "days").format("MM/DD");
        }
        return "";
      },
      changeSignType() {
        if (this.CtObj.SignType == 0) {
          this.CtObj.TravelAgency_Name = "四川和平国际旅行社有限公司";
          this.CtObj.TravelAgency_Address = "成都市锦江区青和里南段55号1栋2310、2311、2312号 ";
          this.CtObj.TravelAgency_LicenseNum = "L-SC-CJ00015";
        } else if (this.CtObj.SignType == 2) {
          this.CtObj.TravelAgency_Name = "成都欧亚旅行社有限公司";
          this.CtObj.TravelAgency_Address = "成都市金牛区营门口路48号1栋3单元16楼1601";
          this.CtObj.TravelAgency_LicenseNum = "L-SC-A00289";
        }
      },
      //点击切换行程
      exchangeTrip() {
        if (this.CtObj.TripType == 0) {
          this.CtObj.TripType = 1;
          this.tripStr = '切换到简易行程录入';
        } else {
          this.CtObj.TripType = 0;
          this.tripStr = '切换到标准行程录入';
        }
      },
      //获取子组件数据
      tripData(msg) {
        this.CtObj.ContractTripList = msg;
      },
      //跳转锚点
      goAnchor(selector) {
        var anchor = this.$el.querySelector(selector);
        if (anchor) {
          document.documentElement.scrollTop = anchor.offsetTop - 70;
        }
      },
      //提交数据
      SaveMsg() {
        if (this.isSubmit) {
          if (this.CtObj.ContractTripList && this.CtObj.ContractTripList.length > 0) {
            this.CtObj.ContractTripList[0].TravelContent = this.$refs.TcTravel_Table.innerHTML;
          }
          this.isSubmit = false;
          this.apipost(
            "travelcontract_post_SetTravelContractService",
            this.CtObj,
            res => {
              this.isSubmit = true;
              if (res.data.resultCode == 1) {
                this.Success(res.data.message);
                this.CtObj.ID = res.data.data;
                var queryMsg = {
                  id: res.data.data,
                  TCID: this.CtObj.TCID,
                  OrderId: this.CtObj.OrderId,
                }
                this.$router.push({
                  name: 'DomesticTravelcontract',
                  query: queryMsg
                });
              } else {
                this.Error(res.data.message);
              }
            },
            err => {}
          );
        }
      },
      //提交
      submitForm(addMsg) {
        //提交创建、修改表单
        this.$refs[addMsg].validate(valid => {
          if (valid) {
            this.SaveMsg();
          } else {
            this.Error("请完成必填项");
            return false;
          }
        });
      },
      //添加购物
      addRecord() {
        let obj = {
          ShopTime: "",
          ShopAddress: "",
          ShopName: "",
          ShopGoodName: "",
          StopTime: "",
          OtherInstruction: "",
          TouristsSignAgree: "",
          IsShow: 1
        };
        this.CtObj.ContractShopList.push(obj);
      },
      //删除补充协议1
      delVoluntray(index) {
        this.CtObj.ContractShopList.splice(index, 1);
      },
      //添加自愿付费协议
      addWilling() {
        let obj = {
          SelfFeeTime: "",
          SelfFeeAddress: "",
          SelfFeeName: "",
          SelfFeePrice: "",
          StopTime: "",
          OtherInstruction: "",
          TouristsSignAgree: "",
          IsShow: 1
        };
        this.CtObj.ContractSelfFeeList.push(obj);
      },
      //删除自愿付费协议
      delWilling(index) {
        this.CtObj.ContractSelfFeeList.splice(index, 1);
      },
      //添加游客信息
      addTourist() {
        this.CtObj.ContractGuestList.forEach((x, index) => {
          x.IsShow = 0;
        });
        let obj = {
          CGuestName: "",
          CGuestSex: "男",
          CGuestCertificateType: "身份证",
          CGuestCertificateNum: "",
          CGuestTel: "",
          CGuestHealth: "健康",
          IsShow: 1
        };
        this.CtObj.ContractGuestList.push(obj);
      },
      //删除游客
      delTouristArr(index) {
        this.CtObj.ContractGuestList.splice(index, 1);
      },
      //滚动条滚动选中tab
      menu() {
        var _self = this;
        _self.scroll =
          (document.documentElement.scrollTop || document.body.scrollTop) + 70;
        //滑动到指定位置相应菜单高亮
        var a_0 = 0;
        if (this.$refs.anchor0 && this.$refs.anchor0.offsetTop) {
          a_0 = this.$refs.anchor0.offsetTop;
        }
        var a_1 = 0;
        if (this.$refs.anchor1 && this.$refs.anchor1.offsetTop) {
          a_1 = this.$refs.anchor1.offsetTop;
        }
        var a_2 = 0;
        if (this.$refs.anchor2 && this.$refs.anchor2.offsetTop) {
          a_2 = this.$refs.anchor2.offsetTop;
        }
        var a_3 = 0;
        if (this.$refs.anchor3 && this.$refs.anchor3.offsetTop) {
          a_3 = this.$refs.anchor3.offsetTop;
        }
        var a_4 = 0;
        if (this.$refs.anchor4 && this.$refs.anchor4.offsetTop) {
          a_4 = this.$refs.anchor4.offsetTop;
        }
        var a_5 = 0;
        if (this.$refs.anchor5 && this.$refs.anchor5.offsetTop) {
          a_5 = this.$refs.anchor5.offsetTop;
        }
        var a_6 = 0;
        if (this.$refs.anchor6 && this.$refs.anchor6.offsetTop) {
          a_6 = this.$refs.anchor6.offsetTop;
        }
        var a_7 = 0;
        if (this.$refs.anchor7 && this.$refs.anchor7.offsetTop) {
          a_7 = this.$refs.anchor7.offsetTop;
        }
        if (_self.scroll < a_0) {
          this.ckedIndex = 0;
        } else if (_self.scroll > a_0 && _self.scroll < a_1) {
          this.ckedIndex = 1;
        } else if (_self.scroll > a_2 && _self.scroll < a_3) {
          this.ckedIndex = 2;
        } else if (_self.scroll > a_3 && _self.scroll < a_4) {
          this.ckedIndex = 3;
        } else if (_self.scroll > a_4 && _self.scroll < a_5) {
          this.ckedIndex = 4;
        } else if (_self.scroll > a_5 && _self.scroll < a_6) {
          this.ckedIndex = 5;
        } else if (_self.scroll > a_6 && _self.scroll < a_7) {
          this.ckedIndex = 6;
        } else if (_self.scroll > a_7) {
          this.ckedIndex = 7;
        }
      },
      GetData() {
        this.apipost(
          "travelcontract_get_GetTravelContractService", {
            ID: this.CtObj.ID,
            TCID: this.CtObj.TCID,
            OrderId: this.CtObj.OrderId,
          },
          res => {
            if (res.data.resultCode == 1) {
              var tempObj = res.data.data;
              this.CtObj.ID = tempObj.ID;
              if (tempObj.CType) {
                this.CtObj.CType = tempObj.CType;
              }
              this.CtObj.T_ContractNum = tempObj.T_ContractNum;
              this.CtObj.Tourists_Name = tempObj.Tourists_Name;
              this.CtObj.Tourists_IDNum = tempObj.Tourists_IDNum;
              this.CtObj.Tourists_Addres = tempObj.Tourists_Addres;
              this.CtObj.Tourists_Tel = tempObj.Tourists_Tel;
              this.CtObj.Tourists_Email = tempObj.Tourists_Email;
              this.CtObj.Tourists_PostNum = tempObj.Tourists_PostNum;
              this.CtObj.Tourists_Fax = tempObj.Tourists_Fax;
              this.CtObj.Tourists_EmergencyLinkMan =
                tempObj.Tourists_EmergencyLinkMan;
              this.CtObj.Tourists_EmergencyLinkTel =
                tempObj.Tourists_EmergencyLinkTel;
              this.CtObj.TravelAgency_DealMan = tempObj.TravelAgency_DealMan;
              this.CtObj.TravelAgency_IDNum = tempObj.TravelAgency_IDNum;
              this.CtObj.TravelAgency_Tel = tempObj.TravelAgency_Tel;
              this.CtObj.TravelAgency_Fax = tempObj.TravelAgency_Fax;
              this.CtObj.TravelAgency_PostNum = tempObj.TravelAgency_PostNum;
              this.CtObj.TravelAgency_Email = tempObj.TravelAgency_Email;
              this.CtObj.TravelAgency_SignAddress =
                tempObj.TravelAgency_SignAddress;
              this.CtObj.Guide_Name = tempObj.Guide_Name;
              this.CtObj.Guide_Num = tempObj.Guide_Num;
              this.CtObj.Guide_Tel = tempObj.Guide_Tel;
              this.CtObj.C_TCNUM = tempObj.C_TCNUM;
              this.CtObj.C_ProductName = tempObj.C_ProductName;
              this.CtObj.C_StartDate = tempObj.C_StartDate;
              this.CtObj.C_EndDate = tempObj.C_EndDate;
              this.CtObj.C_DayNum = tempObj.C_DayNum;
              this.CtObj.C_NightNum = tempObj.C_NightNum;
              this.CtObj.C_AdultNum = tempObj.C_AdultNum;
              this.CtObj.C_AdultPrice = tempObj.C_AdultPrice;
              this.CtObj.C_ChildrenNum = tempObj.C_ChildrenNum;
              this.CtObj.C_ChildrenPrice = tempObj.C_ChildrenPrice;
              this.CtObj.C_GuideServicePrice = tempObj.C_GuideServicePrice;
              this.CtObj.C_TotalPrice = tempObj.C_TotalPrice;
              this.CtObj.C_PayDate = tempObj.C_PayDate;
              this.CtObj.C_PayType = tempObj.C_PayType;
              this.CtObj.C_PayTypeRemark = tempObj.C_PayTypeRemark;
              this.CtObj.C_InsuranceType = tempObj.C_InsuranceType;
              this.CtObj.C_InsuranceName = tempObj.C_InsuranceName;
              this.CtObj.C_LowNum = tempObj.C_LowNum;
              this.CtObj.C_IsAgreeTravel = tempObj.C_IsAgreeTravel;
              this.CtObj.C_AgreeTravelName = tempObj.C_AgreeTravelName;
              this.CtObj.C_IsAgreeDelay = tempObj.C_IsAgreeDelay;
              this.CtObj.C_IsAgreeCndorse = tempObj.C_IsAgreeCndorse;
              this.CtObj.C_IsAgreeRemove = tempObj.C_IsAgreeRemove;
              this.CtObj.C_IsAgreeSpellGroup = tempObj.C_IsAgreeSpellGroup;
              this.CtObj.C_SpellGroupName = tempObj.C_SpellGroupName;
              this.CtObj.C_SolveType = tempObj.C_SolveType;
              this.CtObj.C_SolveRemark = tempObj.C_SolveRemark;
              this.CtObj.C_ContractTotal = tempObj.C_ContractTotal;
              this.CtObj.C_ContractPer = tempObj.C_ContractPer;
              this.CtObj.C_StartAddress = tempObj.C_StartAddress;
              this.CtObj.C_ReturnAddress = tempObj.C_ReturnAddress;
              this.CtObj.C_TrafficType = tempObj.C_TrafficType;
              this.CtObj.C_BusCode = tempObj.C_BusCode;
              this.CtObj.C_DriverName = tempObj.C_DriverName;
              this.CtObj.C_IsHaveKongTiao = tempObj.C_IsHaveKongTiao;
              this.CtObj.C_BusType = tempObj.C_BusType;
              this.CtObj.C_BreakfastAddress = tempObj.C_BreakfastAddress;
              this.CtObj.C_BreakfastBasic = tempObj.C_BreakfastBasic;
              this.CtObj.C_LunchAddress = tempObj.C_LunchAddress;
              this.CtObj.C_LunchBasic = tempObj.C_LunchBasic;
              this.CtObj.C_DinnerAddress = tempObj.C_DinnerAddress;
              this.CtObj.C_DinnerBasic = tempObj.C_DinnerBasic;
              this.CtObj.C_IncludeRemark = tempObj.C_IncludeRemark;
              this.CtObj.C_IncludeFee = tempObj.C_IncludeFee;
              this.CtObj.C_NonIncludeRemark = tempObj.C_NonIncludeRemark;
              this.CtObj.TravelAgency_ServiceTel =
                tempObj.TravelAgency_ServiceTel;
              this.CtObj.C_ComplaintProvince = tempObj.C_ComplaintProvince;
              this.CtObj.C_ComplaintCity = tempObj.C_ComplaintCity;
              this.CtObj.C_ComplaintTel = tempObj.C_ComplaintTel;
              this.CtObj.C_ComplaintEmail = tempObj.C_ComplaintEmail;
              this.CtObj.C_ComplaintAddress = tempObj.C_ComplaintAddress;
              this.CtObj.C_ComplaintPostNum = tempObj.C_ComplaintPostNum;
              this.CtObj.C_ZhiFaTel = tempObj.C_ZhiFaTel;
              this.CtObj.C_XFZXHTSTel = tempObj.C_XFZXHTSTel;
              this.CtObj.C_TicketDayNum = tempObj.C_TicketDayNum;
              this.CtObj.C_OrderDayNum = tempObj.C_OrderDayNum;
              this.CtObj.C_PayDayNum = tempObj.C_PayDayNum;
              this.CtObj.C_SignType = tempObj.C_SignType;
              this.CtObj.SignType = tempObj.SignType;
              this.CtObj.OtherConventionPrice = tempObj.OtherConventionPrice;
              this.CtObj.OtherConvention = tempObj.OtherConvention;
              this.CtObj.OtherConventionPrice = tempObj.OtherConventionPrice;
              this.CtObj.TicketTotalNum = tempObj.TicketTotalNum;
              this.CtObj.TicketOutDayNum = tempObj.TicketOutDayNum;
              this.CtObj.TicketTotalDepositPrice =
                tempObj.TicketTotalDepositPrice;
              this.CtObj.HotelTotal = tempObj.HotelTotal;
              this.CtObj.HotelCheckInType = tempObj.HotelCheckInType;
              this.CtObj.HotelNotice = tempObj.HotelNotice;
              this.CtObj.HotelTotalPrice = tempObj.HotelTotalPrice;
              this.CtObj.PickUpTotalPrice = tempObj.PickUpTotalPrice;
              this.CtObj.VisaTotalPrice = tempObj.VisaTotalPrice;
              this.CtObj.GuestNum = tempObj.GuestNum;
              if (tempObj.TravelAgency_Name && tempObj.TravelAgency_Name != '') {
                this.CtObj.TravelAgency_Name = tempObj.TravelAgency_Name;
              }
              if (tempObj.TravelAgency_Address && tempObj.TravelAgency_Address != '') {
                this.CtObj.TravelAgency_Address = tempObj.TravelAgency_Address;
              }
              if (tempObj.TravelAgency_LicenseNum && tempObj.TravelAgency_LicenseNum != '') {
                this.CtObj.TravelAgency_LicenseNum = tempObj.TravelAgency_LicenseNum;
              }
              this.CtObj.TicketAndHotelTotalPrice =
                tempObj.TicketAndHotelTotalPrice;
              if (
                tempObj.ContractShopList &&
                tempObj.ContractShopList != null &&
                tempObj.ContractShopList.length > 0
              ) {
                this.CtObj.ContractShopList = tempObj.ContractShopList;
              } else {
                this.CtObj.ContractShopList = [];
              }
              if (
                this.CtObj.ContractShopList &&
                this.CtObj.ContractShopList != null &&
                this.CtObj.ContractShopList.length > 0
              ) {
                this.CtObj.ContractShopList.forEach(gItem => {
                  gItem.IsShow = 0;
                });
              }

              if (
                tempObj.ContractGuestList &&
                tempObj.ContractGuestList != null &&
                tempObj.ContractGuestList.length > 0
              ) {
                this.CtObj.ContractGuestList = tempObj.ContractGuestList;
              } else {
                this.CtObj.ContractGuestList = [];
              }
              if (
                this.CtObj.ContractGuestList &&
                this.CtObj.ContractGuestList != null &&
                this.CtObj.ContractGuestList.length > 0
              ) {
                this.CtObj.ContractGuestList.forEach(gItem => {
                  gItem.IsShow = 0;
                });
              }
              if (
                tempObj.ContractSelfFeeList &&
                tempObj.ContractSelfFeeList != null &&
                tempObj.ContractSelfFeeList.length > 0
              ) {
                this.CtObj.ContractSelfFeeList = tempObj.ContractSelfFeeList;
              } else {
                this.CtObj.ContractSelfFeeList = [];
              }
              if (
                this.CtObj.ContractSelfFeeList &&
                this.CtObj.ContractSelfFeeList != null &&
                this.CtObj.ContractSelfFeeList.length > 0
              ) {
                this.CtObj.ContractSelfFeeList.forEach(gItem => {
                  gItem.IsShow = 0;
                });
              }
              if (
                tempObj.ContractTripList &&
                tempObj.ContractTripList != null &&
                tempObj.ContractTripList.length > 0
              ) {
                this.CtObj.ContractTripList = tempObj.ContractTripList;
              } else {
                this.CtObj.ContractTripList = [];
                var tripObj = {
                  TripType: 1,
                  DayNum: 1,
                  Go: "",
                  GoProvice: "",
                  IsOut: 0,
                  TravelContent: ""
                };
                this.CtObj.ContractTripList.push(tripObj);
              }
            } else {
              this.Error(res.data.message);
            }
          },
          err => {}
        );
      },
      //公用休改
      commonUpdate(item) {
        item.IsShow = 1;
        this.$forceUpdate();
      },
      //公用保存
      commonSave(item) {
        item.IsShow = 0;
        this.$forceUpdate();
      },
      //获取行程信息
      GetTrip(TCID) {
        this.tripList = [];
        this.startDate = "";
        var nTCID = 0;
        if (TCID) {
          nTCID = TCID;
        }
        var msg = {
          configId: 0,
          tcid: nTCID,
          isClick: 1, //不算统计
        };
        //根据ID 获取行程内容
        this.apipost(
          "b2b_get_GetB2BTravelInfoNoDes",
          msg,
          (res) => {
            if (res.data.resultCode == 1) {
              if (
                res.data.data.priceList &&
                res.data.data.priceList.length > 0
              ) {
                this.startDate = res.data.data.priceList[0].startDate;
              }
              this.tripDays = res.data.data.dayList;
              this.trifficList = res.data.data.trafficList;
              this.tripList = res.data.data.dayList;
              this.LineName = res.data.data.lineName;
              this.init();
            }
          },
          (err) => {});
      },
      init() {
        this.tripList.forEach((x, j) => {
          let useDinnerTypeBy = "";
          let jin = [],
            jiu = [],
            jiu2 = [],
            jiao = [],
            dadian = [],
            tips = [],
            activy = [],
            can = {
              breakfirst: "敬请自理",
              lanuch: "敬请自理",
              dinner: "敬请自理",
            };
          x.dayArray.forEach((y, index) => {
            if (y.type == 7 && y.childItem.title != "") {
              let obj = {
                title: y.childItem.title,
                content: y.childItem.description,
                img: y.childItem.imaArray && y.childItem.imaArray.length > 0 ?
                  y.childItem.imaArray[0].url : "",
                ticketName: "",
                playTimeHour: null,
                playTimeMinutes: null,
              };
              dadian.push(obj);
            } else if (y.type == 1 && y.childItem.subTraffic.length > 0) {
              let title = "";
              y.childItem.subTraffic.forEach((z, i) => {
                title += z.startCityName;
                if (z.arrivalType == 1) {
                  title += "-";
                } else if (z.arrivalType == 2) {
                  title += "-";
                } else if (z.arrivalType == 3) {
                  title += "-";
                } else {
                  title += "-";
                }
                if (i + 1 == y.childItem.subTraffic.length) {
                  title += z.arrivalCityName;
                }
              });
              let obj = {
                title: title,
                content: y.childItem.description,
                img: "",
                ticketName: "",
                playTimeHour: null,
                playTimeMinutes: null,
              };
              jiao.push(obj);
            } else if (
              y.type == 2 &&
              y.childItem.couponsName != "" &&
              y.childItem.imaArray.length > 0
            ) {
              let obj = {
                title: y.childItem.couponsName,
                content: y.childItem.description,
                img: y.childItem.imaArray[0].url,
                ticketName: y.childItem.couponsTicketName,
                playTimeHour: y.childItem.playTimeHour,
                playTimeMinutes: y.childItem.playTimeHour,
              };
              jin.push(obj);
            } else if (
              y.type == 3 &&
              y.childItem.hotelName != "" &&
              y.childItem.imaArray.length > 0
            ) {
              let obj = {
                title: y.childItem.hotelName,
                content: y.childItem.description,
                img: y.childItem.imaArray[0].url,
                ticketName: "",
                playTimeHour: null,
                playTimeMinutes: null,
              };
              jiu.push(obj);
            } else if (y.type == 4) {
              if (y.childItem.useDinnerType == "1") {
                can.breakfirst = y.childItem.dinnerName;
              } else if (y.childItem.useDinnerType == "2") {
                can.lanuch = y.childItem.dinnerName;
              } else if (y.childItem.useDinnerType == "3") {
                can.dinner = y.childItem.dinnerName;
              }
            } else if (y.type == 5) {
              let obj = {
                title: "自由活动",
                content: y.childItem.description,
                img: "",
                ticketName: "",
                playTimeHour: null,
                playTimeMinutes: null,
              };
              activy.push(obj);
            } else if (y.type == 6) {
              let obj = {
                title: y.childItem.title,
                content: y.childItem.description,
                img: "",
                ticketName: "",
                playTimeHour: null,
                playTimeMinutes: null,
              };
              tips.push(obj);
            }
            if (y.type == 3) {
              jiu2.push(y.childItem.hotelName);
              useDinnerTypeBy = y.childItem.useDinnerType;
            }
          });
          if (
            can.breakfirst == "敬请自理" &&
            useDinnerTypeBy.indexOf("1") != -1
          ) {
            can.breakfirst = "酒店内享用早餐";
          }
          if (can.lanuch == "敬请自理" && useDinnerTypeBy.indexOf("2") != -1) {
            can.lanuch = "酒店自助";
          }
          if (can.dinner == "敬请自理" && useDinnerTypeBy.indexOf("3") != -1) {
            can.dinner = "酒店自助";
          }
          x.can = can;
          let details = [];
          x.tips = tips;
          x.jiu2 = jiu2;
          if (jin.length > 0) {
            details = jin;
          } else if (jiu.length > 0) {
            details = jiu;
          } else if (dadian.length > 0) {
            details = dadian;
          } else if (jiao.length > 0) {
            if (j == this.tripList.length - 1) {
              let obj = {
                title: "温暖的家",
                content: "感谢您参加本次行程,期待下次与您相遇",
                img: "",
              };
              details.push(obj);
            } else {
              details = jiao;
            }
          } else if (activy.length > 0) {
            details = activy;
          }
          x.title =
            dadian.length > 0 ?
            dadian[0].title :
            jiao.length > 0 ?
            jiao[0].title :
            "集合出发";
          x.details = details;

          if (x.details.length == 0) {
            if (j == 0) {
              let obj = {
                title: "集合出发",
                content: "向着远方的目标出发起飞",
                img: "",
                ticketName: "",
                playTimeHour: null,
                playTimeMinutes: null,
              };
              details.push(obj);
            } else if (j == this.tripList.length - 1) {
              let obj = {
                title: "温暖的家",
                content: "感谢您参加本次行程,期待下次与您相遇",
                img: "",
                ticketName: "",
                playTimeHour: null,
                playTimeMinutes: null,
              };
              details.push(obj);
            }
          } else {
            if (x.title == "集合出发") {
              x.details.forEach((xc) => {
                if (xc.title !== undefined) x.title = xc.title + "~";
              });
              if (x.title == "集合出发") {
                if (j > 0 && j < tripList.length - 1) x.title = "自由活动";
              } else {
                x.title = x.title.substring(0, x.title.length - 1);
              }
            }
          }
          x.islast = j + 1 == this.tripList.length;
          this.$set(this.tripList, j, x);
        });
        for (let i = this.tripList.length - 1; i >= 0; i--) {
          if (i == 0) this.tripList[i].can.breakfirst = "敬请自理";
          else {
            this.tripList[i].can.breakfirst = this.tripList[i - 1].can.breakfirst;
            if (
              this.tripList[i].lineId != 5 &&
              this.tripList[i].can.breakfirst == "敬请自理"
            )
              this.tripList[i].can.breakfirst = "酒店内享用早餐";
          }
        }
        this.trifficList.forEach((x, index) => {
          if (x.airportPickUp == 1 || x.airportPickUp == 2) {
            if (x.isUseBus == 1) {
              this.tripDays[index].TrifficType = "飞机+大巴";
            }
          }
          if (x.airportPickUp == 0 && x.isUseBus == 1) {
            this.tripDays[index].TrifficType = "大巴";
          }
          if (x.airportPickUp == 1 || x.airportPickUp == 2) {
            if (x.isUseBus == 0) {
              this.tripDays[index].TrifficType = "飞机";
            }
          }
          if (x.airportPickUp == 0 || x.airportPickUp == 0) {
            if (x.isUseBus == 0) {
              this.tripDays[index].TrifficType = this.$t('fnc.no')
            }
          }
        });
      },
    },
    created() {
      if (this.$route.query.TCID && this.$route.query.TCID > 0) {
        this.CtObj.TCID = this.$route.query.TCID;
        this.GetTrip(this.CtObj.TCID);
      }
      if (this.$route.query.orderID && this.$route.query.orderID > 0) {
        this.CtObj.OrderId = this.$route.query.orderID;
      }
    },
    mounted() {
      if (this.$route.query.id && this.$route.query.id > 0) {
        this.CtObj.ID = this.$route.query.id;
      }
      if (this.CtObj.ID > 0 || this.CtObj.TCID > 0) {
        this.GetData();
      }
      this.$nextTick(function () {
        //滚动监听事件
        window.addEventListener("scroll", this.menu);
      });
    }
  };

</script>