<style>
  @import "../../assets/css/newTravelManager.css";

  .color_red_order {
    color: #e95252 !important;
  }

  .groupTourOrderSearch {
    width: 100%;
    min-height: auto;
    padding: 0 0 20px 0;
  }

  .groupTourOrderSearch li {
    float: left;
    font-size: 12px;
    color: #666;
    margin: 20px 0 0px 0;
  }

  .groupTourOrderSearch li>span {
    display: inline-block;
  }

  .groupTourOrderSearch li span>em {
    display: inline-block;
    min-width: 60px;
    text-align: right;
    font-style: normal;
    margin: 0 12px 0 0;
  }

  .groupTourOrderSearch li:last-child {
    position: fixed;
    z-index: 10;
    top: 36px;
    right: 20px;
  }

  .groupTourOrderSearch ul {
    overflow: hidden;
  }

  .groupTourOrderSearchTable {
    width: 100%;
    min-width: 1500px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #cccccc;
    border-right: 1px solid #cccccc;
    border-collapse: collapse;
  }

  .groupTourOrderSearchTable tbody tr:last-child {
    border-bottom: 2px solid #333;
  }

  .groupTourOrderSearchTable tr:first-child td:first-child {
    border-bottom: 2px solid #333;
  }

  .groupTourOrderSearchTable tbody {}

  .groupTourOrderSearchTable tr th {
    background: #e6e6e6;
    height: 30px;
    font-size: 12px;
    text-align: left;
    text-indent: 15px;
    border-top: 1px solid #cccccc;
    border-left: 1px solid #cccccc;
  }

  .groupTourOrderSearchTable tr {
    background: #fff;
    text-align: left;
  }

  .groupTourOrderSearchTable tr td {
    height: 60px;
    padding: 10px;
    border-top: 1px solid #cccccc;
    border-left: 1px solid #cccccc;
  }

  .groupTourOrderSearchTable tr td p {
    line-height: 20px;
  }

  .groupTourOrderSearchTable .dowloadSpan:hover {
    text-decoration: underline;
    cursor: pointer;
  }

  .groupTourOrderSearchTable span.personNo {
    text-decoration: underline;
    cursor: pointer;
  }

  .groupTourOrderSearchTable span.personNo:hover {
    font-weight: bold;
    color: #e95252;
  }

  .personNolayer p {
    height: 28px;
    line-height: 28px;
    padding-left: 15px;
  }

  .personNolayer p>span {
    font-size: 12px;
    color: #333;
    margin-right: 15px;
  }

  .personNolayer table {
    padding: 10px 0 0 20px;
    width: 100%;
    background-color: #ededed;
    border-collapse: collapse;
    border: 1px solid #d2d2d2;
    font-size: 12px;
  }

  .personNolayer table th {
    background-color: #ededed;
    height: 34px;
    text-indent: 15px;
  }

  .personNolayer table td {
    background-color: #ffffff;
    padding: 9px 15px;
    color: #333333;
    border: 1px solid #d2d2d2;
  }

  .personNolayer table ._color_666 {
    color: #666666;
  }

  .personNolayer table tr._color_666 th {
    padding: 9px 15px;
  }

  .groupSuperSearchLayer {}

  .groupSuperSearchLayer>p {
    padding: 20px 0;
    font-size: 14px;
    color: #333;
    font-weight: bold;
  }

  .groupSuperSearchLayerTable {
    font-size: 12px;
    color: #666;
  }

  .groupSuperSearchLayerTable tr {
    height: 50px;
  }

  .groupSuperSearchLayerTable td {
    padding-right: 15px;
  }

  .groupTourOrderIcon button {
    width: 30px;
    height: 30px;
    border-radius: 4px;
  }

  .groupTourOrderIcon .el-button--primary {
    padding: 5px;
    margin: 0;
    font-size: 14px !important;
  }

  .groupTourOrderIcon .el-button+.el-button {
    margin-left: 0 !important;
  }

  .productQuerybottomLayer {
    overflow: auto;
    position: fixed;
    min-height: 300px;
    z-index: 50;
    bottom: 0;
    left: 0;
    border-top: 3px solid #38425d;
    background-color: #ffffff;
    padding: 10px 10px 0;
    width: 100%;
  }

  .productQuerybottomLayer .el-form-item__label {
    font-size: 12px !important;
  }

  .productQuerybottomLayer>p {
    border-left: 3px solid #e95252;
    text-indent: 15px;
    height: 16px;
    font-family: "PingFangSc-Fine";
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 14px;
    color: #000;
  }

  .productQuerybottomLayer .el-input-number {
    width: auto !important;
  }

  .groupTourOrder_count_green {
    color: #1BC594;
  }

  .groupTourOrder_count_blue {
    color: #4D7AFD;
  }

  .groupTourOrder_count_yellow {
    color: #FF9C00;
  }

  .groupTourOrder_count_gray {
    color: #999999;
  }

  .groupTourOrder_count {
    margin: 0 0 20px 0;
    width: 100%;
    height: auto;
  }

  .groupTourOrder_count_col {
    height: 80px;
  }

  .groupTourOrder_count_item {
    font-weight: 400;
    padding: 10px;
    height: 100%;
    border: 1px solid #E6E6E6;
    background-color: #FFFFFF;
    color: #333333;
  }

  .groupTourOrder_count_item>div>i {
    font-size: 12px;
    vertical-align: bottom;
  }

  .groupTourOrder_count_item>div>span:nth-child(2) {
    font-size: 14px;
    vertical-align: bottom;
  }

  .groupTourOrder_count_item>div>span:nth-child(3) {
    font-weight: bold;
    font-size: 16px;
    vertical-align: bottom;
  }

  .groupTourOrder_count_item>p {
    font-size: 12px;
    line-height: 18px;
  }

  .groupTourOrder_count_item>p>span {
    margin: 0 5px 0 0;
    white-space: nowrap;
  }

  .groupTourOrder_more {
    margin: 0 -12px;
  }

  .groupTourOrder_more>div {
    width: 100%;
    height: 30px;
    line-height: 30px;
    text-align: center;
    font-size: 12px;
    color: #333333;
    background-color: #FFFFFF;
    cursor: pointer;
  }

  .groupTourOrder_more>div:hover {
    color: #297BEF;
    background-color: #DCEBFF;
  }

  .groupTourOrder_remarks {
    font-size: 0px;
  }

  .groupTourOrder_remarks>div {}

  .groupTourOrder_remarks>div>div:nth-child(1) {
    float: left;
    display: flex;
    align-items: flex-start;
  }

  .groupTourOrder_remarks>div>div:nth-child(1)>span {
    line-height: 20px;
    font-size: 12px;
    color: #e95252;
    white-space: nowrap;
  }

  .groupTourOrder_remarks>div>div:nth-child(1)>p {
    line-height: 20px;
    font-size: 12px;
    color: #e95252;
  }

  .groupTourOrder_remarks>div>div:nth-child(2) {
    float: right;
    text-align: right;
    font-size: 12px;
    color: #e95252;
  }

  .groupTourOrder_remarks>div>div:nth-child(2)>i {
    font-size: 10px;
    cursor: pointer;
  }

  .groupTourOrder_remarks>div::after {
    display: block;
    clear: both;
    content: "";
    visibility: hidden;
    height: 0;
  }

  .groupTourOrder_remarks_btn {
    padding: 0px;
    width: 12px;
    height: 12px;
    border: none;
    background-color: transparent;
  }

  .groupTourOrder_remarks_btn>i {
    color: #e95252;
    font-size: 12px;
  }

  .groupTourOrder_remarks_popover>div {
    display: inline-block;
    font-size: 14px;
    color: #000000;
  }

  .groupTourOrder_remarks_popover>div::before {
    content: '';
    display: inline-block;
    margin: 0 5px 0 0;
    width: 2px;
    height: 12px;
    background-color: #e95252;
  }

  .groupTourOrder_remarks_popover>span {
    display: block;
    margin: 0 0 0 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #000000;
  }

  .groupTourOrder_remarks_popover>p {
    margin: 5px 0 0 0;
    padding: 3px;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    font-size: 12px;
    color: #000000;
  }

  .groupTourOrder_remarks_popover>p:nth-child(even) {
    background-color: #E6E6E6;
  }

  .groupTourOrder_remarks_popover>p>span:nth-child(1) {
    float: left;
  }

  .groupTourOrder_remarks_popover>p>span:nth-child(2) {
    margin: 0 10px 0 0;
    float: right;
  }

  .groupTourOrder_remarks_popover>p::after {
    display: block;
    clear: both;
    content: "";
    visibility: hidden;
    height: 0;
  }

  .groupTourOrder_tickets>div {
    display: table;
  }

  .groupTourOrder_tickets>div>div {
    display: table-cell;
    cursor: pointer;
  }

  .groupTourOrder_tickets>div>div:nth-child(1) {
    width: 80px;
  }

  .groupTourOrder_tickets>div>div>span {
    display: inline-block;
    margin: 0 10px 0 0;
  }

  .groupTourOrder_tickets_red {
    color: #FF0000;
    text-decoration: underline;
  }

  .groupTourOrder_tickets_blue {
    color: #0000FF;
    text-decoration: underline;
  }

  .groupTourOrder_tickets_green {
    color: #008000;
    text-decoration: underline;
  }

  .groupTourOrder_tickets_black {
    color: #000000;
    text-decoration: underline;
  }

  .groupTourOrderByTuan_ico {
    margin: 0 10px 0 0;
  }

  .groupTourOrderByTuan_ico>i {
    display: inline-block;
    margin: 0 2px 0 0;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    vertical-align: middle;
  }

  .groupTourOrderByTuan_ico>span {
    vertical-align: middle;
  }

  /* 出团通知书打印选择 */
  .travelControlTripLayer {
    position: fixed;
    z-index: 99;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    left: 0;
    top: 0;
  }

  .travelControlTripLayerCont {
    position: absolute;
    left: 50%;
    margin-left: -300px;
    background: #fff;
    top: 50%;
    margin-top: -180px;
    width: 600px;
  }

  .travelControlTripLayerCont>div {
    padding: 0 30px;
  }

  .travelControlTripLayerCont>div label {
    cursor: pointer;
    vertical-align: middle;
  }

  .travelControlTripLayerCont>div label input {
    vertical-align: middle;
  }

  .travelControlTripBtn {
    color: #fff;
    width: 90px;
    height: 30px;
    background: #E95252;
    border: 1px solid #E95252;
    cursor: pointer;
    border-radius: 15px;
    margin-left: 10px;
  }

  .travelControlTripLayer input[type="checkbox"]+label::before {
    content: "\A0";
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 5px;
    border-radius: 4px;
    background-color: white;
    text-indent: .15em;
    line-height: 15px;
    color: white;
    border: 1px solid #e95252;
  }

  .travelControlTripLayer input[type="checkbox"]:checked+label::before {
    content: "\2713";
    background-color: #e95252;
  }

  .travelControlTripLayer input[type="checkbox"] {
    position: absolute;
    clip: rect(0, 0, 0, 0);
  }

  .travelControlTripLayer input[type="checkbox"]:focus+label::before {
    box-shadow: none;
  }

  .travelControlTripLayer input[type="checkbox"]:disabled+label::before {
    background-color: gray;
    box-shadow: none;
    color: #555;
  }

  .groupTourOrder_transfer {
    position: fixed;
    z-index: 50;
    bottom: 0;
    left: 50px;
    padding: 10px 10px;
    width: 100%;
    min-width: 1366px;
    min-height: 200px;
    border-top: 3px solid #38425d;
    background-color: #ffffff;
    overflow-y: auto;
  }

  .groupTourOrder_transfer>.transfer_header {
    position: relative;
    width: 100%;
    height: 30px;
  }

  .groupTourOrder_transfer>.transfer_header>div:nth-child(1) {
    display: inline-block;
    padding: 0 10px;
    width: 200px;
    height: 30px;
    line-height: 30px;
    border-left: 3px solid #e95252;
    text-indent: 10px;
    font-size: 16px;
    color: #000000;
  }

  .groupTourOrder_transfer>.transfer_header>div:nth-child(2) {
    position: absolute;
    top: 0px;
    right: 80px;
    height: 30px;
  }

  .groupTourOrder_transfer>.transfer_header>div:nth-child(2)>div:nth-child(1) {
    display: inline-block;
    padding: 0 15px;
    height: 30px;
    line-height: 28px;
    font-size: 14px;
    color: #E95252;
    border: 1px solid #E95252;
    background: #fff;
    border-radius: 15px;
    cursor: pointer;
    vertical-align: top;
  }

  .groupTourOrder_transfer>.transfer_header>div:nth-child(2)>div:nth-child(2) {
    display: inline-block;
    margin: 0 0 0 10px;
    padding: 0 15px;
    height: 30px;
    line-height: 28px;
    font-size: 14px;
    color: #fff;
    border: 1px solid #E95252;
    background: #E95252;
    border-radius: 15px;
    cursor: pointer;
    vertical-align: top;
  }

  .groupTourOrder_transfer>.transfer_info {
    padding: 20px 0;
    width: 100%;
    font-size: 0px;
    border-bottom: 1px dashed #999999;
  }

  .groupTourOrder_transfer>.transfer_info>div {
    display: inline-block;
    padding: 0 10px;
    width: 25%;
    height: 30px;
    vertical-align: top;
  }

  .groupTourOrder_transfer>.transfer_info>div>em {
    display: inline-block;
    padding: 0 10px;
    width: 35%;
    height: 30px;
    line-height: 30px;
    text-align: right;
    font-size: 16px;
    vertical-align: top;
  }

  .groupTourOrder_transfer>.transfer_info>div>span {
    display: inline-block;
    padding: 0 10px;
    width: 65%;
    height: 30px;
    line-height: 30px;
    text-align: left;
    font-size: 16px;
    border-radius: 3px;
    background-color: #E5E5E5;
    vertical-align: top;
  }

  .groupTourOrder_transfer>.transfer_input {
    padding: 20px 0;
    width: 100%;
    font-size: 0px;
  }

  .groupTourOrder_transfer>.transfer_input>div {
    display: inline-block;
    padding: 0 10px;
    width: 25%;
    height: 30px;
    vertical-align: top;
  }

  .groupTourOrder_transfer>.transfer_input>div>em {
    display: inline-block;
    padding: 0 10px;
    width: 35%;
    height: 30px;
    line-height: 30px;
    text-align: right;
    font-size: 16px;
    vertical-align: top;
  }

  .groupTourOrder_transfer>.transfer_input>div>.el-input {
    display: inline-block;
    width: 65%;
    height: 30px;
    line-height: 30px;
    text-align: left;
    font-size: 14px;
    vertical-align: top;
  }

  .Ysze {
    position: relative;
  }

  .Ysze .changeYsze {
    position: absolute;
    left: 110%;
    z-index: 10000;
    top: 0;
    width: 700px;
    background: #fff;
    box-shadow: 0 0 8px #888;
    padding: 10px;
    box-sizing: border-box;
  }

  .Ysze .Ysze-button {
    position: absolute;
    left: 98%;
    top: 3px;
    border-radius: 4px;
    cursor: pointer;
  }

  .Ysze .changeYsze .el-form-item {
    display: inline-block;
    width: 30%;
    margin-bottom: 5px;
  }

  .Ysze .changeYsze .el-icon-close {
    position: absolute;
    right: 6px;
    top: 6px;
    color: #f78989;
    font-size: 20px;
    cursor: pointer;
  }

  /* 添加窗口 */
  .branding_buttom {
    position: absolute;
    left: 0px;
    bottom: 0px;
    width: 100%;
    height: 250px;
    background-color: #ffffff;
    border-top: 3px solid #38425d;
  }

  .groupts .underline {
    text-decoration: underline;
    margin: 5px;
    text-align: center;
  }

</style>

<template>
  <div class="flexOne groupts" style="min-width: 1200px;">
    <!-- 修改信息 -->
    <div class="productQuerybottomLayer ownScrollbarStyle" v-show="isShowLayer">
      <p>修改
        <span class="fr">
          <input type="button" class="hollowFixedBtn" value="取消" @click="cancelSubmit()" />
          <input type="button" class="normalBtn" value="保存" @click="submitForm('addMsg')" />
        </span>
      </p>
      <el-form :model="addMsg" ref="addMsg" label-position="right" :rules="rules" label-width="90px">
        <el-row :gutter="20">
          <el-col :span="4">
            <el-form-item label="客户类型" prop="CustomerType">
              <el-select v-model='addMsg.CustomerType' filterable :placeholder="$t('pub.pleaseSel')"
                @change='getTypePrice' :disabled="true">
                <el-option v-for="item in khlxList" :label='item.Name' :value='item.Id' :key='item.Id'>
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="参团类型" prop="GroupType">
              <el-select v-model='addMsg.GroupType' filterable :placeholder="$t('pub.pleaseSel')">
                <el-option v-for="item in ctlxList" :label='item.Name' :value='item.Id' :key='item.Id'
                  v-if="item.Id!=5">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="联系人" prop="ContactName" v-show='addMsg.CustomerType==3||addMsg.CustomerType==4'>
              <el-input v-model='addMsg.ContactName'></el-input>
            </el-form-item>
            <el-form-item label="联系电话" prop="ContactMobile" v-show='addMsg.CustomerType==3||addMsg.CustomerType==4'>
              <el-input v-model='addMsg.ContactMobile'></el-input>
            </el-form-item>
            <el-form-item label="客户门店" prop="CustomerId"
              v-show="addMsg.CustomerType==1||addMsg.CustomerType==2||addMsg.CustomerType==''">
              <el-select v-model='addMsg.CustomerId' filterable :placeholder="$t('pub.pleaseSel')" @change='getSspt'
                :disabled="true">
                <el-option v-for="item in khmdList" :label='item.customerName' :value='item.customerId'
                  :key='item.customerId'>
                </el-option>
              </el-select>
            </el-form-item>

          </el-col>
          <el-col :span="4">
            <el-form-item label="出发城市" prop="DepartureCityId">
              <el-select v-model='addMsg.DepartureCityId' :disabled="IsUnion===1" filterable
                :placeholder="$t('pub.pleaseSel')" @change="addMsg.IsIntermodal=2">
                <el-option v-for="item in startCityList" :label='item.Name' :value='item.ID' :key='item.ID'>
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="是否联运" prop="IsIntermodal" v-show="addMsg.DepartureCityId!=SetOutCityId">
              <el-switch v-model="addMsg.IsIntermodal" active-value="1" inactive-value="2"
                @change='getUnionTravelPrice(addObj,1)'></el-switch>
            </el-form-item>
            <el-form-item label="联运时间" prop="GoCityTime"
              v-show='addMsg.IsIntermodal==1&&addMsg.DepartureCityId!=SetOutCityId'>
              <el-date-picker :picker-options="pickerOptions0" v-model='addMsg.GoCityTime' value-format="yyyy-MM-dd"
                type="date" @change='getUnionTravelPrice(addObj,1)'></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="返回城市" prop="ReturnArriveCityId">
              <el-select v-model='addMsg.ReturnArriveCityId' :disabled="IsUnion===1" filterable
                :placeholder="$t('pub.pleaseSel')" @change="addMsg.IsReturnIntermodal=2">
                <el-option v-for="item in startCityList" :label='item.Name' :value='item.ID' :key='item.ID'>
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="是否联运" prop="IsReturnIntermodal" v-show="addMsg.ReturnArriveCityId!=reOutCityId">
              <el-switch v-model="addMsg.IsReturnIntermodal" active-value="1" inactive-value="2"
                @change='getUnionTravelPrice(addObj,2)'></el-switch>
            </el-form-item>
            <el-form-item label="联运时间" prop="IsReturnIntermodal"
              v-show='addMsg.IsReturnIntermodal==1&&addMsg.ReturnArriveCityId!=reOutCityId'>
              <el-date-picker :picker-options="pickerOptions1" v-model='addMsg.BackCityTime' value-format="yyyy-MM-dd"
                type="date" @change='getUnionTravelPrice(addObj,2)'></el-date-picker>
            </el-form-item>

          </el-col>
          <el-col :span="4">
            <el-form-item label="本团单价" prop="TC_Price">
              <el-input v-model='addMsg.TC_Price' :disabled="true"></el-input>
            </el-form-item>
            <el-form-item label="出发联运价" v-show='addMsg.IsIntermodal==1&&addMsg.DepartureCityId!=SetOutCityId'>
              <el-input v-model='stratPrice' v-show='stratPriceShow' :disabled="true"></el-input>
              <span class="colorE95252" v-show='!stratPriceShow'>暂无报价！</span>
            </el-form-item>
            <el-form-item label="返回联运价" v-show='addMsg.IsReturnIntermodal==1&&addMsg.ReturnArriveCityId!=reOutCityId'>
              <el-input v-model='returnPrice' v-show='returnPriceShow' :disabled="true"></el-input>
              <span class="colorE95252" v-show='!returnPriceShow'>暂无报价！</span>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="成交单价" prop="Unit_Price" v-if="HightUnitPrice === '2'">
              <el-select v-model='addMsg.Unit_Price' filterable :placeholder="$t('pub.pleaseSel')"
                @change="getTotalPrice()">
                <el-option v-for="item in Unit_PriceList" :label='item.LessMoney' :value='item.ID' :key='item.ID'>
                </el-option>
              </el-select>
              <!-- <el-input v-model='addMsg.Unit_Price' :disabled="true" @keyup.native="checkPrice(addMsg,'Unit_Price');getTotalPrice()"></el-input> -->
            </el-form-item>
            <el-form-item label="成交单价" prop="Unit_Price" v-else>
              <el-input v-model='addMsg.Unit_Price' @change="getTotalPrice(3)"></el-input>
            </el-form-item>
            <el-form-item label="高于本团单价">
              <el-switch v-model="HightUnitPrice" active-value="1" inactive-value="2"></el-switch>
            </el-form-item>
            <el-form-item>
              <p v-if="LessMoney==0" style="line-height: 18px; color: #E95252;">注：如果超出本团的最低让价，差价将由你来承担</p>
              <p v-else="LessMoney>0" style="line-height: 18px; color: #E95252;">注：最多少价{{LessMoney}}元，如需少价更多请联系上级主管</p>
            </el-form-item>
            <!--<el-form-item>
							<p style="line-height: 18px; color: #E95252;">注：如果超出本团的最低让价，差价将由你来承担</p>
						</el-form-item>-->
          </el-col>
        </el-row>
        <div style="width: 100%; border-top:1px dashed #ccc;margin-bottom:25px;"></div>
        <el-row :gutter="20">
          <el-col :span="4">
            <el-form-item label="成人人数" prop="ManNum">
              <el-input v-model='addMsg.ManNum' @keyup.native="checkInteger(addMsg,'ManNum')"
                @input='getNumber();getHouseNo();getTotalPrice()'></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <p v-if='IsChildrenTour==2' style="color: #E95252; font-size: 12px; line-height: 40px; text-align: center;">
              本团不支持儿童出游!</p>
            <el-form-item v-if='IsChildrenTour==1' label="儿童不占床" prop="ChirdNoNeedBedNum">
              <el-input v-model='addMsg.ChirdNoNeedBedNum' @keyup.native="checkInteger(addMsg,'ChirdNoNeedBedNum')"
                @input='getNumber();getHouseNo();getTotalPrice()'></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" v-if='IsChildrenTour==1'>
            <el-form-item label="儿童占床" prop="ChirdNeedBedNum">
              <el-input v-model='addMsg.ChirdNeedBedNum' @keyup.native="checkInteger(addMsg,'ChirdNeedBedNum')"
                @input='getNumber();getHouseNo();getTotalPrice()'></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" v-if='IsChildrenTour==1'>
            <el-form-item label="婴儿人数" prop="BabyNum">
              <el-input v-model='addMsg.BabyNum' @keyup.native="checkInteger(addMsg,'BabyNum')"
                @input='getNumber();getTotalPrice();getTotalPrice()'></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="老人人数" prop="OldPeopleNum">
              <el-input v-model='addMsg.OldPeopleNum' @keyup.native="checkInteger(addMsg,'OldPeopleNum')"
                @input='getNumber();getHouseNo();getTotalPrice()'></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="单地接数量" prop="AirticketNum">
              <el-input v-model='addMsg.AirticketNum' @keyup.native="checkInteger(addMsg,'AirticketNum')"
                @input='getNumber();getTotalPrice();getHouseNo()'></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="4">
            <el-form-item label="单房数量" prop="SingleRoomNum">
              <el-input v-model='addMsg.SingleRoomNum' @keyup.native="checkInteger(addMsg,'SingleRoomNum')"
                @input='yzBigBed2();getTotalPrice()'></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="大床房" prop="BigRoomNum">
              <el-input v-model='addMsg.BigRoomNum' @keyup.native="checkInteger(addMsg,'BigRoomNum')"
                @input='yzBigBed();getTotalPrice()'></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="三人房" prop="TripleRoomNum">
              <el-input v-model='addMsg.TripleRoomNum' @keyup.native="checkInteger(addMsg,'TripleRoomNum')"
                @input='yzBigBed1();getTotalPrice()'></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="签证数量" prop="VisaNum">
              <el-input v-model='addMsg.VisaNum' @keyup.native="checkInteger(addMsg,'VisaNum')"
                @input='getTotalPrice();yzVisaNum()'></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="保险数量" prop="SaleNum">
              <el-input v-model='addMsg.SafeNum' @keyup.native="checkInteger(addMsg,'SafeNum')"
                @input='getTotalPrice();yzSafeNum()'></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="拒签人数" prop="RefuseVisaNum" style="display:none;">
              <el-input v-model='addMsg.RefuseVisaNum' @keyup.native="checkInteger(addMsg,'RefuseVisaNum')"
                @input='getTotalPrice()'></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="4">
            <el-form-item label="预计用房" prop="PredictRoomNum">
              <el-input v-model='addMsg.PredictRoomNum' :disabled="true"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" class="Ysze">
            <el-form-item label="应收总额" prop="PreferPrice">
              <el-input v-model='addMsg.PreferPrice' :disabled="true"></el-input>
            </el-form-item>
            <button @click="Yszefz" type="button" class="Ysze-button el-button--primary"
              style="background: rgb(0, 198, 255); border-color: rgb(0, 198, 255);">
              <i class="iconfont icon-nav-hangzheng" style="font-size:12px"></i>
            </button>
            <!-- 修改应收总额 -->
            <div class="changeYsze" v-show="Ysze">
              <el-form :model="addMsg_form" ref="addMsg_form" label-position="right" label-width="100px">
                <span class="el-icon-close" @click="Ysze=false"></span>
                <el-form-item label="签证费">
                  <el-input v-model='addMsg_form.VisaPrice' :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="退签证费">
                  <el-input v-model='addMsg_form.BackVisaPrice' :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="杂费">
                  <el-input v-model='addMsg_form.OtherPrice' :disabled="true"></el-input>
                </el-form-item>

                <el-form-item label="老人附加费">
                  <el-input v-model='addMsg_form.OldManChargePrice' :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="儿童附加费">
                  <el-input v-model='addMsg_form.BabyChargePrice' :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="单房差">
                  <el-input v-model='addMsg_form.SingleRoomPrice' :disabled="true"></el-input>
                </el-form-item>

                <el-form-item label="儿童占床增收">
                  <el-input v-model='addMsg_form.ChildNeedPrice' :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="儿童不占床减免">
                  <el-input v-model='addMsg_form.ChildNoNeedPrice' :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="收损金额">
                  <el-input v-model='addMsg_form.OpSetLossMoney' :disabled="true"></el-input>
                </el-form-item>

                <el-form-item label="单地接">
                  <el-input v-model='addMsg_form.SingleDMCPrice' :disabled="true"></el-input>
                </el-form-item>
                <el-form-item label="婴儿价">
                  <el-input v-model='addMsg_form.BabyPrice' :disabled="true"></el-input>
                </el-form-item>
                <!-- <el-form-item v-if="IsUpdateOrderMoney">
                        <el-button type="primary" style="padding:6px 15px" @click="submitYSZEForm">确定</el-button>
                         <el-button type="danger" style="padding:6px"  @click="Ysze=false">关闭</el-button> -->
                <!-- </el-form-item> -->
              </el-form>
            </div>
          </el-col>
          <el-col :span="4">
            <el-form-item label="预计提成" prop="Commission">
              <el-input v-model='addMsg.Commission' :disabled="true"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" v-show="addMsg.CustomerType==1||addMsg.CustomerType==2">
            <el-form-item label="分摊人" prop="CommissionSharePeople">
              <el-select :disabled="isUpdateSharePeople" filterable clearable @change='getTicheng'
                v-model='addMsg.CommissionSharePeople' :placeholder="$t('pub.pleaseSel')">
                <el-option label='无' :value='comSelect'></el-option>
                <el-option v-for='item in employeeList' :label='item.EmName' :value='item.EmployeeId'
                  :key='item.EmployeeId'></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4"
            v-show="addMsg.CommissionSharePeople!='-1'&&(addMsg.CustomerType==1||addMsg.CustomerType==2)">
            <el-form-item label="分摊金额" prop="CommissionShareMoney">
              <el-input v-model='addMsg.CommissionShareMoney' :disabled="true"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            &nbsp;
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="4">
            <el-form-item label="经济舱" prop="YSeatNum">
              <el-input v-model='addMsg.YSeatNum' @keyup.native="checkInteger(addMsg,'YSeatNum')"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="商务舱" prop="ESeatNum">
              <el-input v-model='addMsg.ESeatNum' @input="getNumber()"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="头等舱" prop="FSeatNum">
              <el-input v-model='addMsg.FSeatNum' @input="getNumber()"></el-input>
            </el-form-item>
          </el-col>
          <!-- <el-col :span="4">
						<el-form-item label="单地接数量" prop="AirticketNum">
						   <el-input v-model='addMsg.AirticketNum' @keyup.native="checkInteger(addMsg,'AirticketNum')"    @input='getTotalPrice();getHouseNo()'></el-input>
						</el-form-item>
					</el-col> -->
          <el-col :span="4">
            <el-form-item label="可退景点">
              <el-select filterable multiple class='multiple_input' v-model='addMsg.ScenicRefundArr'
                :placeholder="$t('pub.pleaseSel')" @change='ScenicRefundMethods'>
                <el-option v-for='item in ScenicRefundList' :label='item.ScenicName' :value='item.Id' :key='item.Id'>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            &nbsp;
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="4">
            <el-form-item label="客人来源" prop="ClientSource">
              <el-select v-model='addMsg.ClientSource' :disabled="true" filterable :placeholder="$t('pub.pleaseSel')">
                <el-option v-for="item in ddlyList" :label='item.Name' :value='item.Id' :key='item.Id'>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="所属平台" prop="BrandId" v-show="addMsg.ClientSource==1">
              <el-select v-model='addMsg.BrandId' :disabled="false" filterable :placeholder="$t('pub.pleaseSel')">
                <el-option v-for="item in ssptList" :label='item.brandName' :value='item.dictId' :key='item.dictId'>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="交易方式" prop="TradeWay" v-show='addMsg.ClientSource==1'>
              <el-select v-model='addMsg.TradeWay' :disabled="true" filterable :placeholder="$t('pub.pleaseSel')">
                <el-option v-for="item in jyfsList" :label='item.Name' :value='item.Id' :key='item.Id'>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4" v-if='addMsg.TradeWay==1'>
            <el-form-item label="收款账户">
              <el-select filterable v-model='addMsg.PlatformAccount' @change="changeSelect">
                <el-option v-for='item in PlatformAccountList' :label='item.Alias' :value='item.ID' :key='item.ID'>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4" v-if='addMsg.TradeWay==1'>
            <el-form-item label="平台订单号" prop="PlatformOrder">
              <el-input v-model='addMsg.PlatformOrder' @input='platformOrderMethods' :disabled="isAllowUpdate==0">
              </el-input>
            </el-form-item>
          </el-col>
          <!-- <el-col :span="4" v-if="addMsg.TradeWay==1 && addMsg.PlatformOrder!='' && isAllowUpdate!==0">
            <el-form-item label="定金" prop="MinOrderPrice">
              <el-input v-model='addMsg.MinOrderPrice' @keyup.native="checkPrice(addMsg,'MinOrderPrice')"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" v-if="addMsg.TradeWay==1&&addMsg.PlatformOrder!='' && isAllowUpdate!==0">
            <el-form-item label="费用类型" prop="CostType">
              <el-select v-model="addMsg.CostType" filterable placeholder="请选择费用类型">
                <el-option v-for='item in fylxList' :label="item.Name" :value="item.ID" :key='item.ID'>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4" v-if="addMsg.TradeWay==1&&addMsg.PlatformOrder!='' && isAllowUpdate!==0">
            <el-form-item label="交易日期" prop="TradeDate">
              <el-date-picker v-model='addMsg.TradeDate' value-format="yyyy-MM-dd" type="date"></el-date-picker>
            </el-form-item>
          </el-col> -->
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="备注" prop="Remarks">
              <el-input v-model='addMsg.Remarks' type='textarea' maxlength='500'></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- 修改房型 -->
    <div class="productQuerybottomLayer ownScrollbarStyle" v-show="isShowHouse">
      <p>修改房型
        <span class="fr">
          <input type="button" class="hollowFixedBtn" value="取消" @click="houseCancel()" />
          <input type="button" class="normalBtn" value="保存" @click="houseSubmit()" />
        </span>
      </p>
      <el-form :model="addMsg" ref="addMsg" label-position="right" :rules="rules" label-width="80px">
        <el-row :gutter="20">
          <el-col :span="4">
            <el-form-item label="成人人数" prop="ManNum">
              <el-input v-model='addMsg.ManNum' :disabled="true"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <p v-if='IsChildrenTour==2' style="color: #E95252; font-size: 12px; line-height: 40px; text-align: center;">
              本团不支持儿童出游!</p>
            <el-form-item v-if='IsChildrenTour==1' label="儿童不占床" prop="ChirdNoNeedBedNum">
              <el-input v-model='addMsg.ChirdNoNeedBedNum' :disabled="true"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" v-if='IsChildrenTour==1'>
            <el-form-item label="儿童占床" prop="ChirdNeedBedNum">
              <el-input v-model='addMsg.ChirdNeedBedNum' :disabled="true"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" v-if='IsChildrenTour==1'>
            <el-form-item label="婴儿人数" prop="BabyNum">
              <el-input v-model='addMsg.BabyNum' :disabled="true"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="老人人数" prop="OldPeopleNum">
              <el-input v-model='addMsg.OldPeopleNum' :disabled="true"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="单地接数量" prop="AirticketNum">
              <el-input v-model='addMsg.AirticketNum' :disabled="true"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="4">
            <el-form-item label="单房数量" prop="SingleRoomNum">
              <el-input v-model='addMsg.SingleRoomNum' @keyup.native="checkInteger(addMsg,'SingleRoomNum')"
                @input='yzBigBed2();getTotalPrice()'></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="大床房" prop="BigRoomNum">
              <el-input v-model='addMsg.BigRoomNum' @keyup.native="checkInteger(addMsg,'BigRoomNum')"
                @input='yzBigBed();getTotalPrice()'></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="三人房" prop="TripleRoomNum">
              <el-input v-model='addMsg.TripleRoomNum' @keyup.native="checkInteger(addMsg,'TripleRoomNum')"
                @input='yzBigBed1();getTotalPrice()'></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="4">
            <el-form-item label="预计用房" prop="PredictRoomNum">
              <el-input v-model='addMsg.PredictRoomNum' :disabled="true"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="备注" prop="Remarks">
              <el-input v-model='addMsg.Remarks' type='textarea' maxlength='500'></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!-- 修改备注 -->
    <div class="productQuerybottomLayer ownScrollbarStyle" v-show="isShowLayerRemarks"
      style="height: 150px;min-height:150px;">
      <p>修改备注
        <span class="fr" v-if="remarksMsg.isOrder=='1'">
          <input type="button" class="hollowFixedBtn" value="取消" @click="cancelSubmitRemarks()" />
          <input type="button" class="normalBtn" value="保存" @click="submitFormRematks('remarksMsg')" />
        </span>
        <span class="fr" v-else style="color:red;">
          OP已禁止修改订单信息，请联系OP修改备注。
        </span>
      </p>
      <el-form :model="remarksMsg" ref="remarksMsg" label-position="right" :rules="RemarksRules" label-width="80px">
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="备注" prop="Remarks">
              <el-input v-model='remarksMsg.Remarks' type='textarea' maxlength='500'></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <!--    申请优惠-->
    <div class="productQuerybottomLayer ownScrollbarStyle" v-show="SpecialOffer"
      style="height: 150px;min-height:200px;">
      <p>申请优惠
        <span class="fr">
          <input type="button" class="hollowFixedBtn" value="取消" @click="cancelSubmitRemarks()" />
          <input type="button" class="normalBtn" value="保存" @click="Preservation()" />
        </span>
      </p>
      <el-form :model="remarksMsg" ref="remarksMsg" label-position="right" :rules="RemarksRules" label-width="80px">
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item>
              <em style="font-size: 12px !important;color: #606266;line-height: 34px">订单当前单价</em>
              <em
                style=" display: inline-block;padding: 0 10px;height: 34px;line-height: 34px;text-align: left;font-size: 16px;border-radius: 3px;background-color: #E5E5E5;vertical-align: top;"
                class='w150'>{{SOMsg.OrderUnitPrice}}</em>

              <!-- <em style="margin-left: 100px;font-size: 12px !important;color: #606266;" >优惠金额</em>
              <el-input v-model='SOMsg.ApplyPrice' type='text' maxlength='20' class='w150' ></el-input> -->

              <em style="margin-left: 100px;font-size: 12px !important;color: #606266;">审核人</em>
              <el-select placeholder="请选择" v-model="SOMsg.UpdateBy">
                <el-option v-for="(item,index) in SuperiorPeople" :label='(item.EmName)' :value='(item.EmployeeId)'
                  :key="index"></el-option>
              </el-select>
            </el-form-item>

            <el-form-item label="申请理由" style="margin-left: 58px;">
              <el-input v-model='SOMsg.ApplyReason' type='textarea' maxlength='1000' style="width: 60%"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>




    <div class="groupTourOrderSearch">
      <ul>
        <li><span><em>线路</em>
            <el-select class='w150' v-model="msg.LineId" filterable :placeholder="$t('pub.pleaseSel')"
              @change="getLineTeamList(msg.LineId)">
              <el-option label="不限" value='-1'></el-option>
              <el-option v-for="item in LineList" :label='item.LineName' :value='item.LineID' :key='item.LineID'>
              </el-option>
            </el-select>
          </span>
        </li>
        <li><span><em>系列</em>
            <el-select class='w150' v-model="msg.LineteamId" filterable :placeholder="$t('pub.pleaseSel')">
              <el-option label="不限" value='-1'></el-option>
              <el-option v-for="item in LineTeamList" :label='item.LtName' :value='item.LtID' :key='item.LtID'>
              </el-option>
            </el-select>
          </span>
        </li>
        <li>
          <span>
            <em>团号</em>
            <el-input v-model='msg.TCNUM' class='w150'></el-input>
          </span>
        </li>
        <li>
          <span>
            <em>订单号</em>
            <el-input v-model='msg.tempOrderId' class='w150'></el-input>
          </span>
        </li>
        <li><span><em>发团日期</em>
            <el-date-picker v-model='msg.QStartDate' @change="dataDui2()" class='w150' value-format="yyyy-MM-dd"
              type="date"></el-date-picker>
            -
            <el-date-picker v-model='msg.QEndDate' @change="dataDui2()" class='w150' value-format="yyyy-MM-dd"
              type="date"></el-date-picker>
          </span>
        </li>
        <li style="line-height: 30px; padding-left: 30px;">
          <el-popover width="520" trigger="click">
            <div class="groupSuperSearchLayer">
              <p>团控高级查询</p>
            </div>
            <table class="groupSuperSearchLayerTable" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="70">出团公司</td>
                <td>
                  <el-select v-model='msg.OutBranchId' filterable :placeholder="$t('pub.pleaseSel')">
                    <el-option label="不限" value='-1'></el-option>
                    <el-option v-for="item in companyList" :label='item.bName' :value='item.id' :key='item.id'>
                    </el-option>
                  </el-select>
                </td>
                <td width="70">付款状态</td>
                <td>
                  <el-select v-model='msg.PayStatus' filterable :placeholder="$t('pub.pleaseSel')">
                    <el-option label="不限" value='-1'></el-option>
                    <el-option label="待收定金" value='1'></el-option>
                    <el-option label="待收尾款" value='2'></el-option>
                  </el-select>
                </td>
              </tr>
              <tr>
                <td>报名日期</td>
                <td colspan="3">
                  <el-date-picker v-model='msg.CStartDate' @change="dataDui()" class='w135' value-format="yyyy-MM-dd"
                    type="date"></el-date-picker>
                  -
                  <el-date-picker v-model='msg.CEndDate' @change="dataDui()" class='w135' value-format="yyyy-MM-dd"
                    type="date"></el-date-picker>
                </td>
              </tr>
              <tr>
                <td width="70">订单状态</td>
                <td>
                  <el-select v-model='msg.OrderState' filterable :placeholder="$t('pub.pleaseSel')">
                    <el-option label="不限" value='-1'></el-option>
                    <el-option v-for="item in ddztList" :label='item.Name' :value='item.Id' :key='item.Id'>
                    </el-option>
                  </el-select>
                </td>
                <td width="70">客户类型</td>
                <td>
                  <el-select v-model='msg.CustomerType' filterable :placeholder="$t('pub.pleaseSel')">
                    <el-option label="不限" value='-1'></el-option>
                    <el-option v-for="item in khlxList" :label='item.Name' :value='item.Id' :key='item.Id'>
                    </el-option>
                  </el-select>
                </td>
              </tr>
              <tr>
                <td width="70">客户名称</td>
                <td>
                  <el-input v-model='msg.ContactName'></el-input>
                </td>
                <td width="70">报名类型</td>
                <td>
                  <el-select v-model='msg.GroupType' filterable :placeholder="$t('pub.pleaseSel')">
                    <el-option label="不限" value='-1'></el-option>
                    <el-option v-for="item in ctlxList" :label='item.Name' :value='item.Id' :key='item.Id'>
                    </el-option>
                  </el-select>
                </td>
              </tr>
              <tr>
                <td width="70">订单来源</td>
                <td>
                  <el-select v-model='msg.OrderSource' filterable :placeholder="$t('pub.pleaseSel')">
                    <el-option label="不限" value='-1'></el-option>
                    <el-option v-for="item in ddlyList" :label='item.Name' :value='item.Id' :key='item.Id'>
                    </el-option>
                  </el-select>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td colspan="4">
                  <input type="button" class="normalBtn" value="查询" @click="getList();resetPageIndex()"
                    style="width: 476px!important;" />
                </td>
              </tr>
            </table>
            <span slot="reference" style="cursor: pointer;">高级查询<i class="el-icon-caret-bottom"></i></span>
          </el-popover>
        </li>
        <li>
          <input type="button" class="hollowFixedBtn" value="查询" @click="getList();resetPageIndex()" />
        </li>
      </ul>
    </div>
    <!-- 统计版块 -->
    <div class="groupTourOrder_count">
      <el-row :gutter="20">
        <el-col :span="5" class="groupTourOrder_count_col">
          <div class="groupTourOrder_count_item">
            <div>
              <i class="iconfont icon-qian groupTourOrder_count_green"></i>
              <span>销售额统计</span>
            </div>
            <p>
              <span>应收款：{{countData.PreferPrice}};</span>
              <span>已收款：{{countData.Income}};</span>
              <span
                :class="{color_red_order:countData.DueinMoney!==countData.PreferPrice}">未收款：{{countData.DueinMoney}};</span>
              <span>在途金额：{{countData.ZaiTu}};</span>
            </p>
          </div>
        </el-col>
        <el-col :span="4" class="groupTourOrder_count_col">
          <div class="groupTourOrder_count_item">
            <div class="groupTourOrder_count_blue">
              <i class="iconfont icon-baomingrenshu"></i>
              <span>正常报名人数</span>
              <span>{{countData.NormalGuestNum}}</span>
            </div>
            <p>
              <span>经济舱：{{countData.NormalYSeatNum}};</span>
              <span>商务舱：{{countData.NormalESeatNum}};</span>
              <span>头等舱：{{countData.NormalFSeatNum}};</span>
            </p>
          </div>
        </el-col>
        <el-col :span="4" class="groupTourOrder_count_col">
          <div class="groupTourOrder_count_item">
            <div class="groupTourOrder_count_yellow">
              <i class="iconfont icon-baomingrenshu"></i>
              <span>取消人数</span>
              <span>{{countData.CancelGuestNum}}</span>
            </div>
            <p>
              <span>经济舱：{{countData.CancelYSeatNum}};</span>
              <span>商务舱：{{countData.CancelESeatNum}};</span>
              <span>头等舱：{{countData.CancelFSeatNum}};</span>
            </p>
          </div>
        </el-col>

        <el-col :span="4" class="groupTourOrder_count_col">
          <div class="groupTourOrder_count_item">
            <div>
              <i class="iconfont icon-tongji1 groupTourOrder_count_gray"></i>
              <span>其他统计项</span>
            </div>
            <p>
              <span>内部报名：{{countData.InteriorNum}};</span>
              <span>B2B/WAP网络报名：{{countData.B2BNum}};</span>
            </p>
          </div>
        </el-col>
        <el-col :span="4" class="groupTourOrder_count_col">
          <div class="groupTourOrder_count_item">
            <div>
              <i class="iconfont icon-tongji1 groupTourOrder_count_gray"></i>
              <span>财务单据说明</span>
            </div>
            <p>
              <span class="groupTourOrderByTuan_ico"><i style="background-color:#0000ff"></i><span>已打单</span></span>
              <span class="groupTourOrderByTuan_ico"><i style="background-color:#00FF00"></i><span>平台出纳已审核</span></span>
              <span class="groupTourOrderByTuan_ico"><i style="background-color:#FF0000"></i><span>银行出纳已审核</span></span>
              <span class="groupTourOrderByTuan_ico"><i style="background-color:#000000"></i><span>已通过</span></span>
            </p>
          </div>
        </el-col>
        <el-col :span="3" class="groupTourOrder_count_col">
          <div class="groupTourOrder_count_item">
            <div>
              <i class="iconfont icon-tongji1 groupTourOrder_count_gray"></i>
              <span>累计提成</span>
            </div>
            <p>
              <span>提成金额：{{countData.SumCommissionMoney}};</span>
            </p>
          </div>
        </el-col>
      </el-row>
    </div>
    <!-- 表格 -->
    <div style="width: 100%; height: auto;  overflow-x: auto;" class="ownScrollbarStyle">
      <table class="groupTourOrderSearchTable" border="0" cellspacing="0" cellpadding="0" v-loading='loading'>
        <tr>
          <th width="240">单号&团号</th>
          <th width="120">客户信息</th>
          <th width="70">类型</th>
          <th width="150">系列&线路</th>
          <th width="60">人数</th>
          <th width="80">单价</th>
          <th width="80">成交单价</th>
          <th width="80">应收总额</th>
          <th width="80">实收</th>
          <th width="80">优惠</th>
          <th width="80">退款</th>
          <th width="80">平台税金</th>
          <th width="80">平台在途</th>
          <th width="80">待收金额</th>
          <th width="80">状态</th>
          <th width="120">确认函</th>
          <th width="200">操作</th>
        </tr>
        <tr>
          <td v-show="list.length==0" colspan="17" align="center">暂无数据</td>
        </tr>
        <tbody v-for="(item,index) in list" :key="index">
          <tr>
            <td rowspan="3">
              <p v-if="item.isChargeLossOrders==1" style="color:red">损</p>
              <p class="fbold over_ellipsis" style="width: 100%;cursor:pointer;" :title="item.orderId"
                @click="goUrlX('团报名清单','groupTourOrderByTuan',item.tcid,item.tcnum)">{{item.orderId}}</p>
              <p class="fz12 over_ellipsis" style="width: 100%;text-decoration:underline;cursor:pointer;"
                :title="item.alName" @click="goUrlX('产品查询','productQuery',item.tcid,item.tcnum)">{{item.tcnum}}</p>
              <p class="fz12 over_ellipsis" style="width: 100%;">{{item.commissionSPeopleName}}</p>
              <p style="min-width: 180px;">发团：{{item.startDate}}</p>
              <p>下单时间：{{item.createDate}}</p>
              <p v-if='item.commissionMoney' style="color:red">提成：{{item.commissionMoney}}</p>
              <p v-else-if="item.latestCommissionMoney" style="color:red">提成：{{item.latestCommissionMoney}}</p>
            </td>
            <td>
              <p class="fz12 over_ellipsis" style="width: 120px;" :title="item.contactName">{{item.contactName}}</p>
              <p class="fz12">{{item.contactMobile}}</p>
            </td>
            <td>
              <p class="fz12 over_ellipsis" style="width: 100%;">{{item.orderTypeName}}</p>
            </td>
            <td class="fz12">
              <p style="max-width: 160px;display: block;" class="over_ellipsis" :title="item.lineName">
                <span>{{item.lineName}}</span>
              </p>
              <p style="max-width: 160px;display: block;" class="over_ellipsis" :title="item.ltName">{{item.ltName}}</p>
            </td>
            <td>
              <!-- <el-popover style='padding: 0;' width="470" trigger="click"> -->
              <!-- <div class="personNolayer">
                <p>
                  <span>成人：{{item.manNum}}人</span>
                  <span>儿童：{{item.chirdNum}}人</span>
                  <span>老人：{{item.oldPeopleNum}}人</span>
                  <span>婴儿：{{item.babyNum}}人</span>
                  <span>单地接：{{item.airticketNum}}人</span>
                </p>
                <table border="0" cellspacing="1" cellpadding="1">
                  <tr>
                    <th>姓名</th>
                    <th>护照</th>
                    <th>性别</th>
                    <th>年龄</th>
                    <th width="110">联系电话</th>
                  </tr>
                  <tr v-if='memberList.length>0' v-for="(item2,index2) in memberList" :key="index2">
                    <td>{{item2.userName}}</td>
                    <td>{{item2.passportNo}}</td>
                    <td>{{item2.sexStr}}</td>
                    <td>{{item2.age}}</td>
                    <td>{{item2.mobilePhone}}</td>
                  </tr>
                  <tr v-if='memberList.length==0'>
                    <td colspan="5" align="center">暂无数据</td>
                  </tr>
                </table>
              </div> -->
              <span v-if='item.guestNumStatus==1' style="color:#1AA86B;" class="personNo" slot="reference"
                @click="getMembersDetail(item)">{{item.guestNum}}/{{item.ySeatNum>0? item.ySeatNum+'Y ':''}}{{item.eSeatNum>0? item.eSeatNum+'E ':''}}{{item.fSeatNum>0? item.fSeatNum+'F ':''}}</span>
              <span v-if='item.guestNumStatus==2' style="color:#E95252;" class="personNo" slot="reference"
                @click="getMembersDetail(item)">{{item.guestNum}}/{{item.ySeatNum>0? item.ySeatNum+'Y ':''}}{{item.eSeatNum>0? item.eSeatNum+'E ':''}}{{item.fSeatNum>0? item.fSeatNum+'F ':''}}</span>
              <span v-if='item.guestNumStatus==3' style="color:#666;" class="personNo" slot="reference"
                @click="getMembersDetail(item)">{{item.guestNum}}/{{item.ySeatNum>0? item.ySeatNum+'Y ':''}}{{item.eSeatNum>0? item.eSeatNum+'E ':''}}{{item.fSeatNum>0? item.fSeatNum+'F ':''}}</span>
              <!-- </el-popover> -->
            </td>
            <td style="color:#FF9C00">{{item.tC_Price}}</td>
            <td style="color:#FF9C00">{{item.unit_Price}}</td>
            <td>
              <p style="color:#FF9C00">{{item.preferPrice}}</p>
            </td>
            <td>
              <el-popover style='padding: 0;' width="370" trigger="click">
                <div class="personNolayer">
                  <table border="0" cellspacing="1" cellpadding="1">
                    <tr>
                      <th>单据号</th>
                      <th>金额</th>
                      <th>类型</th>
                      <th>状态</th>
                    </tr>
                    <tr v-if='orderList.length>0' v-for="(item2,index2) in orderList" :key="index2">
                      <td>{{item2.FrID}}</td>
                      <td>{{item2.PayMoney}}</td>
                      <td>{{item2.TypeName}}</td>
                      <td>{{item2.StatusName}}</td>
                    </tr>
                    <tr v-if='orderList.length==0'>
                      <td colspan="4" align="center">暂无数据</td>
                    </tr>
                  </table>
                </div>
                <span v-if='item.isEnd==0' style="cursor: pointer;" @click="getOrderDetail(item)"
                  slot="reference">{{item.income}}</span>
                <span v-if='item.isEnd!=0' style="cursor: pointer;color: #e95252;" @click="getOrderDetail(item)"
                  slot="reference">{{item.income}}</span>
              </el-popover>
            </td>
            <!-- 优惠 -->
            <td>
              <el-popover style='padding: 0;' width="600" trigger="click">
                <div class="personNolayer">
                  <table border="0" cellspacing="1" cellpadding="1">
                    <tr>
                      <th>优惠券名称</th>
                      <th>优惠券类型</th>
                      <th>抵扣金额/折扣</th>
                      <th>使用条件</th>
                      <th>获取方式</th>
                      <th>获取日期</th>
                    </tr>
                    <tr v-if='item.couponAllotList.length>0' v-for="(item2,index2) in item.couponAllotList"
                      :key="index2">
                      <td>{{item2.couponsName}}</td>
                      <td>
                        <span v-if="item2.couponsType==1">抵用券</span>
                        <span v-if="item2.couponsType==2">折扣卷</span>
                      </td>
                      <td>{{item2.denomination}}</td>
                      <td>满{{item2.useCondition}}可用</td>
                      <td>
                        <span v-if="item2.accessType==1">抽奖</span>
                        <span v-else></span>
                      </td>
                      <td>{{item2.acessDate}}</td>
                    </tr>
                    <tr v-if='item.couponAllotList.length==0'>
                      <td colspan="6" align="center">暂无数据</td>
                    </tr>
                  </table>
                </div>
                <span style="cursor: pointer;color: #e95252;" slot="reference">{{item.discountMoney}}</span>
              </el-popover>
            </td>
            <td>{{item.refund}}</td>
            <td>{{item.platformTax}}</td>
            <td>{{item.zaiTuMoney}}</td>
            <td><span :class="{color_red_order:item.dueInMoney!==item.preferPrice}">{{item.dueInMoney}}</span></td>
            <td v-if="item.isChargeLossOrders==1" class="fz12" style="color: #e95252">收损</td>
            <td v-else class="fz12" :style="item.orderState===3?'color: #e95252;':''">{{item.statsstr}}</td>
            <td width="120">
              <!--{{item.confirmFileList}}-->
              <!--<span>确认函</span>-->
              <span v-if='item.confirmFileList.length>0' class="fz12 dowloadSpan"
                @click="downLoadFile(item.confirmFileList)">
                确认函下载
              </span>
              <i v-if='item.confirmFileList.length>0&&item.commissionSharePeople !== userId' @click="deleteFile(item)"
                style="margin-left: 5px;" class="el-icon-error color999"></i>
              <el-upload v-if='item.confirmFileList.length==0&&item.commissionSharePeople !== userId'
                :http-request="uploadFileBtn" :multiple="false" :show-file-list="false" action=''>
                <el-button size="small" type="danger" @click='getItem(item)'>上传</el-button>
              </el-upload>
            </td>
            <td class="groupTourOrderIcon">
              <el-button-group v-if="item.commissionSharePeople !== userId">
                <el-tooltip class="item" effect="dark" content="修改" placement="top-start">
                  <el-button
                    v-if="item.isOrder=='1'&&item.isHaveFinance!='1'&&item.orderState!='1'&&item.orderState!='4'"
                    type="primary" style='background:#00C6FF; border-color:#00C6FF' icon="iconfont icon-bianji-smal"
                    @click='getDetail(item)'></el-button>
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="修改备注" placement="top-start">
                  <!-- v-if="item.Status=='1'&&item.isHaveFinance=='1'||item.orderState=='1'" -->
                  <el-button type="primary" style='background:green; border-color:green'
                    icon="iconfont icon-bianji-smal" @click='getRemarks(item)'></el-button>
                </el-tooltip>
                <el-tooltip effect="dark" content="日志" placement="top-start" style="float:left">
                  <el-popover width='230' trigger="click">
                    <div class="priceContentDiv">
                      <div class="AuditLog">日志</div>
                      <div class="logContact" style="background:#f9f9f9; padding:20px 10px 0;">
                        <div v-if='logList.length>0' v-for="(item,index) in logList" :key="index">
                          <div class="clearfix">
                            <div class="Auditcircle" style="left: 6px!important;"></div>
                            <div class="operateName" style="color:#005CAA;">{{item.emName}}</div>
                            <div class="operateDate fz12 color666">{{item.x}}</div>
                          </div>
                          <div class="fz12 color333">{{item.logInfo}}</div>
                        </div>
                        <div v-if='logList.length==0'>暂无数据</div>
                      </div>
                    </div>
                    <el-button slot="reference" @click='getLogDetail(item)' type="primary"
                      style='background:#47BF8C; border-color:#47BF8C;border-top-right-radius: 0;border-bottom-right-radius: 0;'
                      icon="iconfont icon-rizhi1"></el-button>
                  </el-popover>
                </el-tooltip>
                <el-tooltip effect="dark" content="更多" placement="top-start" style="float:left">
                  <el-popover width='100' trigger="hover">
                    <div class="groupTourOrder_more">
                      <div @click="goUrlT('confirmationOrder',item.orderId)">确认函</div>
                      <div v-if="userId==1" @click="getSalerInfo(item)">修改业务员</div>
                      <div v-if="item.isGuestOk=='1'&&item.outNotice==1" @click="toTrip(item)">出团通知书<span
                          v-if="item.outNotice==1">(OK)</span><span v-else>(暂定)</span></div>
                      <div v-if="item.orderState!='4'" @click="goUrlP('旅客名单','passengerSaleList',item)">旅客名单</div>
                      <div v-if="item.isOrder=='1'&&(item.isHaveFinance=='1'||item.orderState=='1')"
                        @click='getHouse(item)'>修改房型
                      </div>
                      <div v-if="item.isOrder=='1'&&item.orderState!='4'" @click="transfer(item)">订单转团</div>
                      <div v-if="item.isOrder=='1'&&(item.orderState=='1'||item.orderState=='2')"
                        @click='setChargeLoss(item)'>
                        <span v-if="item.isChargeLossOrders==1">恢复收损单</span>
                        <span v-else>设为收损单</span>
                      </div>
                      <!-- item.confirmFileList.length>0 && ((item.receivableMoney - item.invoiceApplyTotal) > 0) -->
                      <div v-if='item.confirmFileList.length>0 && ((item.receivableMoney - item.invoiceApplyTotal) > 0)'
                        @click='goUrlAdd("invoicesManagerAdd", item.orderId, item.tcid, item.customerId)'>申请发票</div>
                      <div
                        @click='Discount(item.tcid),SOMsg.OrderId = item.orderId,SOMsg.OrderUnitPrice  = item.unit_Price'>
                        申请优惠</div>
                      <div v-if="item.isOrder=='1'&&(item.orderState=='1'||item.orderState=='2'||item.orderState=='3')"
                        @click='deleteItem(item)'>取消
                      </div>

                    </div>
                    <el-button slot="reference" type="primary"
                      style='background:#297BEF; border-color:#297BEF;border-top-left-radius: 0;border-bottom-left-radius: 0;'
                      icon="iconfont icon-more"></el-button>
                  </el-popover>
                </el-tooltip>
              </el-button-group>
              <payurlItem v-if="item.commissionSharePeople !== userId" :item="item" :showID="showID"
                v-show="item.orderState!='4'&&item.orderState!='3'" v-on:childByValue="childByValue"></payurlItem>
            </td>
          </tr>
          <tr style="height:20px">
            <td colspan="16" class="RL_Order" style="height:20px">
              <span class="RL-remarkTitle">名单:</span>
              <span class="RL-redType RL-remarkCon" v-if="item.guestList.length>0">
                <span v-for="(childItem) in item.guestList">{{childItem.userName}}&nbsp;&nbsp;</span>
              </span>
              <span class="RL-redType RL-remarkCon" v-else>
                <span>暂无名单</span>
              </span>
              <span v-if="item.tipMoney" style="color:red">（小费：{{item.tipMoney}}）</span>
            </td>
          </tr>
          <tr>
            <td colspan="4" class="groupTourOrder_remarks" style="height: 40px;">
              <div>
                <div><span>备注：</span>
                  <p><span v-if="item.tsIdList.length>0">投诉单号：
                      <a class="underline" v-for="ts in item.tsIdList" href="javascript:void(0);"
                        @click="goUrlTS('ComplaintsDetail',ts,item.orderId,'投诉详情')">{{ts}}</a> ;</span><span
                      v-if='item.clientSource==1&&item.brandName!=""'>{{item.brandName}}订单
                      {{item.platformOrder}};</span>{{item.remarks}}
                  </p>
                </div>
                <div>
                  <span>{{item.remarksName}}&ensp;{{item.rematksTime}}</span>
                  <el-popover width="600" placement="bottom-end" trigger="click">
                    <div class="groupTourOrder_remarks_popover">
                      <div>历史备注</div>
                      <p v-if="item.remarksList.length !== 0" v-for="(item2, index2) in item.remarksList" :key="index2">
                        <span>{{item2.remarks}}</span>
                        <span>{{item2.createByName}}&ensp;<span
                            style="color: #666666;">{{item2.createDate}}</span></span>
                      </p>
                      <span v-if="item.remarksList.length === 0">暂无数据</span>
                    </div>
                    <el-button slot="reference" icon="iconfont icon-gengduo"
                      style="padding:0px;border:none;background-color:transparent;" class="groupTourOrder_remarks_btn">
                    </el-button>
                  </el-popover>
                </div>
              </div>
            </td>
            <td colspan="5" class="groupTourOrder_remarks" style="height: 40px;">
              <div>
                <div>
                  <span>OP备注:</span>
                  <p>{{item.oP_Remarks ? item.oP_Remarks : '无'}}</p>
                </div>
              </div>
            </td>
            <td colspan="7" class="groupTourOrder_tickets" style="height: 40px;">
              <div @click="goUrlSFD('SalesFinancialDetail', '销售财务单据', item)">
                <div>收款单据：</div>
                <div>
                  <span v-for="(item2,index2) in item.financeList" :key="index2">
                    <span v-if="item2.colorState===1" class="groupTourOrder_tickets_blue">{{item2.frID}}</span>
                    <span v-else-if="item2.colorState===2" class="groupTourOrder_tickets_green">{{item2.frID}}</span>
                    <span v-else-if="item2.colorState===3" class="groupTourOrder_tickets_red">{{item2.frID}}</span>
                    <span v-else-if="item2.colorState===4" class="groupTourOrder_tickets_black">{{item2.frID}}</span>
                    <!-- @click="goUrl('财务单据','FinancialDocumentsDetail',item2.frID,'')" -->
                  </span>
                  <span v-if="item.financeList.length===0" style="cursor: default;">暂无数据</span>
                </div>
              </div>
              <div @click="goUrlSFD('SalesFinancialDetail', '销售财务单据', item)">
                <div>付款单据：</div>
                <div>
                  <span v-for="(item2,index2) in item.refundFinanceList" :key="index2">
                    <span v-if="item2.colorState===1" class="groupTourOrder_tickets_blue">{{item2.frID}}</span>
                    <span v-else-if="item2.colorState===2" class="groupTourOrder_tickets_green">{{item2.frID}}</span>
                    <span v-else-if="item2.colorState===3" class="groupTourOrder_tickets_red">{{item2.frID}}</span>
                    <span v-else-if="item2.colorState===4" class="groupTourOrder_tickets_black">{{item2.frID}}</span>
                  </span>
                  <span v-if="item.refundFinanceList.length===0" style="cursor: default;">暂无数据</span>
                </div>
              </div>
              <div>
                <div>发票单据：</div>
                <div>
                  <span v-for="(item2,index2) in item.invoiceApplyList" :key="index2">
                    <span v-if="item2.invoiceApplyState === 6" class="groupTourOrder_tickets_blue"
                      @click="goIisDetail(item2.id)">{{item2.id}}</span>
                    <span
                      v-else-if="item2.invoiceApplyState === 1 || item2.invoiceApplyState === 3 || item2.invoiceApplyState === 6"
                      class="groupTourOrder_tickets_green" @click="goIisDetail(item2.id)">{{item2.id}}</span>
                    <span v-else-if="item2.invoiceApplyState === 5 || item2.invoiceApplyState === 4 "
                      class="groupTourOrder_tickets_red" @click="goIisDetail(item2.id)">{{item2.id}}</span>
                    <span v-else-if="item2.invoiceApplyState === 2" class="groupTourOrder_tickets_black"
                      @click="goIisDetail(item2.id)">{{item2.id}}</span>
                  </span>
                  <span v-if="item.invoiceApplyList.length===0" style="cursor: default;">暂无数据</span>
                </div>
              </div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
      layout="total,prev, pager, next, jumper" :page-size='msg.pageSize' :total='total'></el-pagination>
    <el-dialog custom-class='w450' title="行程下载" :visible.sync="travelControlTripLayerShow" center>
      <tripDownLoadCommon ref="tripDownLoadCommon" :tripObj="tripObj" @headCallBack="hideTripDown" :downType="2">
      </tripDownLoadCommon>
    </el-dialog>

    <div class="groupTourOrder_transfer" v-show="transferData.show">
      <div class="transfer_header">
        <div>订单转团</div>
        <div>
          <div @click="transferClose()">取消</div>
          <div @click="transferSave()">确定</div>
        </div>
      </div>
      <div class="transfer_info">
        <div>
          <em>订单号：</em>
          <span>{{transferData.info.OrderId}}</span>
        </div>
        <div>
          <em>业务员：</em>
          <span>{{transferData.info.CreateByName}}</span>
        </div>
        <div>
          <em>团队编号：</em>
          <span>{{transferData.info.OldTCID}}</span>
        </div>
        <div>
          <em>团号：</em>
          <span>{{transferData.info.OldTCNUM}}</span>
        </div>
      </div>
      <div class="transfer_input">
        <div>
          <em>团号：</em>
          <el-input v-model="transferData.info.TCNUM" placeholder="请输入团号或团队编号"></el-input>
        </div>
      </div>
    </div>
    <div class="combottomDiv" v-if="showChangeSales" style="height:200px;">
      <updateSalesMan @closeUpdiv="closeSalseDiv" @getList="getList" :subInfo="subInfo"></updateSalesMan>
    </div>
    <a id='groupTourOrder_DownLoad' target="_blank" style="display:none">1不要删除</a>
  </div>
</template>

<script>
  import moment from "moment";
  import payURL from '../commonPage/payURL.vue'
  import payURL1 from '../commonPage/payURL1.vue'
  import tripDownLoadCommon from '../commonPage/TripDownLoadCommon.vue'
  import updateSalesMan from '../commonPage/updateSalesMan.vue'

  export default {
    data() {
      return {
        // 修改应收总额
        Ysze: false,
        addMsg_form: {},

        pickerOptions0: {
          disabledDate: time => {
            let starTime = new Date(this.starTime)
            return time.getTime() > starTime.getTime()
          }
        },
        pickerOptions1: {
          disabledDate: time => {
            let endTime = new Date(this.endTime)
            return time.getTime() < endTime.getTime() - 5.64e7
          }
        },
        travelControlTripLayerShow: false,
        tripObj: {
          tcid: 0,
          configId: 0,
          cityId: 0,
          orderId: 0
        },
        userId: '',
        customerId: '',
        createByInfo: '',
        isUpdateSharePeople: false,
        HightUnitPrice: '2',
        starTime: '',
        endTime: '',
        stratPrice: '',
        stratPriceShow: false,
        returnPrice: '',
        returnPriceShow: false,
        isAllowUpdate: 0,
        isPingtai: false,
        IsChildrenTour: 0,
        IsBirdDiscount: 0,
        SetOutCityId: 0,
        reOutCityId: 0,
        isShowLayer: false,
        isShowHouse: false,
        isShowLayerRemarks: false,
        comSelect: -1,
        loading: true,
        remarksMsg: {
          OrderId: '0',
          OldRemarks: '',
          Remarks: '',
          //1-可以修改，0-不能修改【默认可以修改】
          isOrder: '1'
        },
        IsUnion: 2,
        IsChargeLossOrders: 0,
        Unit_PriceList: [], //成交单价下拉数据
        LessMoney: 0,
        addMsg: {
          OrderId: '0',
          TCID: '0',
          CustomerType: '',
          GroupType: '',
          ContactName: '',
          ContactMobile: '',
          CustomerId: '',
          DepartureCityId: '',
          ReturnArriveCityId: '',
          IsIntermodal: '2',
          IsReturnIntermodal: '2',
          Unit_Price: '0',
          TC_Price: '0',
          ManNum: '0',
          ChirdNum: '0',
          ChirdNoNeedBedNum: '0',
          ChirdNeedBedNum: '0',
          BabyNum: '0',
          OldPeopleNum: '0',
          SingleRoomNum: '0',
          PreferPrice: 0,
          YSeatNum: '0',
          ESeatNum: '0',
          FSeatNum: '0',
          Commission: '0',
          ClientSource: '',
          BrandId: '',
          TradeWay: '2',
          PlatformAccount: '',
          PlatformOrder: '',
          GuestNum: 0,
          IsChildrenTour: '0',
          IsBirdDiscount: '0',
          PredictRoomNum: '0',
          BigRoomNum: '0',
          TripleRoomNum: '0',
          TradeDate: '',
          CostType: '',
          Remarks: '',
          VisaNum: '0',
          SafeNum: '0',
          RefuseVisaNum: '0', //拒签数量
          AirticketNum: '0',
          ScenicRefundArr: [],
          GoCityTime: '',
          BackCityTime: '',
          CommissionSharePeople: '-1',
          CommissionShareMoney: '0',
        },
        employeeMsg: {
          BranchId: '-1',
          IsLeave: 0
        },
        employeeList: [],
        rules: {
          CustomerType: [{
            required: true,
            message: '请选择客户类型',
            trigger: 'change'
          }],
          CustomerId: [{
            required: false,
            message: '请选择客户门店',
            trigger: 'change'
          }],
          DepartureCityId: [{
            required: true,
            message: '请选择出发城市',
            trigger: 'change'
          }],
          ReturnArriveCityId: [{
            required: true,
            message: '请选择返回城市',
            trigger: 'change'
          }],
          GroupType: [{
            required: true,
            message: '请选择参团类型',
            trigger: 'change'
          }],
          ClientSource: [{
            required: true,
            message: '请选择客人来源',
            trigger: 'change'
          }],
          TradeWay: [{
            required: true,
            message: '请选择交易方式',
            trigger: 'change'
          }],
          ContactName: [{
            required: true,
            message: '请输入联系人姓名',
            trigger: 'blur'
          }],
          ContactMobile: [{
            required: true,
            message: '请输入联系人电话',
            trigger: 'blur'
          }]
        },
        RemarksRules: {
          Remarks: [{
            required: true,
            message: '请输入备注信息',
            trigger: 'blur'
          }]
        },
        msg: {
          pageIndex: 1,
          pageSize: 10,
          LineId: '-1',
          LineteamId: '-1',
          TCNUM: '',
          tempOrderId: '',
          OutBranchId: '-1',
          OrderState: '-1',
          CustomerType: '-1',
          ContactName: '',
          CustomerId: '-1',
          GroupType: '-1',
          OrderSource: '-1',
          CStartDate: '',
          CEndDate: '',
          QStartDate: '',
          QEndDate: '',
          PayStatus: '-1',
          IsAirTicket: '2'
        },
        checkedObj: {},
        //返回数据
        currentPage: 1,
        total: 0,
        startCityList: [],
        list: [],
        LineList: [],
        LineTeamList: [],
        memberList: [],
        logList: [],
        orderList: [],
        companyList: [],
        khlxList: [],
        ctlxList: [],
        ddlyList: [],
        ddztList: [],
        khmdList: [],
        ssptList: [],
        jyfsList: [],
        ScenicRefundList: [],
        PlatformAccountList: [],
        ScenicRefundMoney: 0,
        //显示修改业务员
        showChangeSales: false,

        //支付
        minpay: '0',

        fylxList: [],
        showID: -1,
        countData: {
          // 总报名人数
          TotalGuestNum: 0,
          TotalYSeatNum: 0,
          TotalESeatNum: 0,
          TotalFSeatNum: 0,
          // 正常报名人数
          NormalGuestNum: 0,
          NormalYSeatNum: 0,
          NormalESeatNum: 0,
          NormalFSeatNum: 0,
          // 取消人数
          CancelGuestNum: 0,
          CancelYSeatNum: 0,
          CancelESeatNum: 0,
          CancelFSeatNum: 0,
          // 其他统计项
          Income: 0,
          Commission: 0,
          DueinMoney: 0,
          PreferPrice: 0,
          InteriorNum: 0,
          B2BNum: 0,
          SumCommissionMoney: 0
        },
        // 订单转团
        transferData: {
          show: false,
          info: {
            OrderId: '',
            CreateByName: '',
            OldTCID: '',
            OldTCNUM: '',
            TCNUM: ''
          }
        },
        //订单编号及业务员信息
        subInfo: {
          CreateBy: '',
          OrderId: 0
        },
        // 申请优惠的弹窗
        SpecialOffer: false,
        SOMsg: {
          OrderId: '',
          ApplyPrice: 0,
          ApplyReason: '',
          UpdateBy: '',
          OrderUnitPrice: 0
        },
        SuperiorPeople: [],


      }
    },
    components: {
      payurlItem: payURL,
      payurlItem1: payURL1,
      tripDownLoadCommon: tripDownLoadCommon,
      updateSalesMan: updateSalesMan
    },
    filters: {
      priceFormat(value) {
        let nStr = value.toFixed(2)
        nStr += ''
        let x = nStr.split('.')
        let x1 = x[0]
        let x2 = x.length > 1 ? '.' + x[1] : ''
        var rgx = /(\d+)(\d{3})/
        while (rgx.test(x1)) {
          x1 = x1.replace(rgx, '$1' + ',' + '$2')
        }
        return x1 + x2
      }
    },
    methods: {
      goIisDetail: function (id) { // 跳转发票详情页面
        this.$router.push({
          name: 'invoicesManagerDetail',
          query: {
            id: id,
            noDetail: 1,
            blank: "y",
          }
        });
      },
      // 申请发票
      goUrlAdd: function (path, OrderId, TCID, customerId) {
        this.$router.push({
          name: path,
          query: {
            OrderId: OrderId,
            TCID: TCID,
            customerId: customerId,
            blank: "y",
          }
        });
      },
      // 给其他费用赋值
      Yszefz() {
        this.Ysze = true;
        this.addMsg_form = Object.assign({}, this.addObj);
      },
      //跳转
      goUrlTS(path, id, orderId, title) {
        this.$router.push({
          name: path,
          query: {
            'id': id,
            'orderId': orderId,
            blank: 'y',
            tab: title
          }
        })
      },
      getItem(obj) {
        this.checkedObj = obj
      },
      deleteFile(obj) {
        this.$confirm('是否删除确认函?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          let saveMsg = {}
          saveMsg.Path = obj.confirmFileList[0].fullUrl
          saveMsg.FileName = obj.confirmFileList[0].name
          saveMsg.Status = 2
          saveMsg.OrderId = obj.orderId
          this.apipost('sellorder_post_SetConfirmationLetter', saveMsg, res => {
            if (res.data.resultCode == 1) {
              this.$message.success(res.data.message)
              this.getList()
            } else {
              this.$message.error(res.data.message)
            }
          }, err => {})
        }).catch(() => {
          this.$message.info('取消删除')
        })

      },
      uploadFileBtn(file) { //上传

        let that = this
        let newArr = []
        newArr.push(file.file)
        let path = '/Upload/Temporary/'
        this.$message.info('上传中...')
        this.UploadSelfFileT(path, newArr, x => {

          let fileSize = file.file.size < 1024 ? file.file.size : (file.file.size / 1024).toFixed(0)
          let saveMsg = {}
          saveMsg.Path = x.data.FilePath;
          saveMsg.FileName = file.file.name;
          saveMsg.Status = 1;
          saveMsg.OrderId = this.checkedObj.orderId;
          that.apipost('sellorder_post_SetConfirmationLetter', saveMsg, res => {
            if (res.data.resultCode == 1) {
              this.$message.success(res.data.message)
              this.getList()
            } else {
              this.$message.error(res.data.message)
            }
          }, err => {})
        })
      },
      downLoadFile(obj) {
        let dom = document.querySelector("#groupTourOrder_DownLoad");
        dom.href = obj[0].fullUrl;
        dom.click();
      },
      // 订单转团
      transfer: function (item) {
        this.transferData.info.OrderId = item.orderId
        this.transferData.info.CreateByName = item.createByName
        this.transferData.info.OldTCID = item.tcid
        this.transferData.info.OldTCNUM = item.tcnum
        this.transferData.info.TCNUM = ''

        this.isShowLayer = false
        this.isShowHouse = false
        this.isShowLayerRemarks = false
        this.transferData.show = true
      },
      transferClose: function () {
        this.transferData.show = false
      },
      transferSave: function () {
        if (this.transferData.info.TCNUM.trim() === '') {
          this.$message.error('请输入团号或团队编号')
        } else {
          this.apipost('sellorder_post_SetOrderTurnGroup', this.transferData.info, res => {
            if (res.data.resultCode === 1) {
              this.$message.success('转团成功')
              this.transferData.show = false
              this.getList()
            } else {
              this.$message.error(res.data.message)
            }
          }, err => {})
        }
      },
      toTrip: function (obj) {
        this.tripObj.tcid = obj.tcid
        this.tripObj.configId = obj.configId
        this.tripObj.orderId = obj.orderId
        this.tripObj.cityId = obj.startCityId
        this.travelControlTripLayerShow = true
      },
      hideTripDown() {
        this.travelControlTripLayerShow = false
      },
      yzVisaNum: function () {
        let count = (Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) +
          Number(this.addMsg.BabyNum) + Number(this.addMsg.OldPeopleNum))
        if (count < this.addMsg.VisaNum) {
          this.addMsg.VisaNum = count
          this.$message.error('签证人数不能大于总人数')
        }
      },
      yzSafeNum: function () {
        let count = (Number(this.addMsg.AirticketNum) + Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) +
          Number(this.addMsg.BabyNum) + Number(this.addMsg.OldPeopleNum))
        if (count < this.addMsg.SafeNum) {
          this.addMsg.SafeNum = count
          this.$message.error('保险人数不能大于总人数')
        }
      },
      // 结束日期不能大于开始日期
      dataDui() {
        if (this.msg.CStartDate > this.msg.CEndDate && this.msg.CEndDate !== '') {
          this.$message.error('结束日期不能大于开始日期')
          this.msg.CEndDate = ''
        }
      },
      // 结束日期不能大于开始日期
      dataDui2() {
        if (this.msg.QStartDate > this.msg.QEndDate && this.msg.QEndDate !== '') {
          this.$message.error('结束日期不能大于开始日期')
          this.msg.QEndDate = ''
        }
      },
      // 获取统计数据
      getCount: function () {
        this.apipost('sellorder_get_GetTravelOrderListStatistics', this.msg, res => {
          if (res.data.resultCode == 1) {
            this.countData = res.data.data
          } else {
            this.$message.error('数据获取失败！')
          }
        }, err => {})
      },
      deleteItem(obj) {
        this.$confirm('是否取消?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          })
          .then(() => {
            this.apipost(
              'sellorder_post_RemoveOrder', {
                ID: obj.orderId
              },
              res => {
                if (res.data.resultCode == 1) {
                  this.$message.success('取消成功！')
                  this.getList()
                } else {
                  this.$message.error(res.data.message)
                }
              },
              err => {}
            )
          })
          .catch(() => {
            this.$message.info('已取消！')
          })
      },
      setChargeLoss(obj) {
        let confirmC = '确定设为收损单?'
        if (obj.isChargeLossOrders == 1) {
          confirmC = '确定恢复收损单?'
        }
        this.$confirm(confirmC, '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          })
          .then(() => {
            this.apipost(
              'sellorder_post_RemoveChargeLossOrders', {
                OrderId: obj.orderId
              },
              res => {
                if (res.data.resultCode == 1) {
                  this.$message.success('操作成功！')
                  this.getList()
                } else {
                  this.$message.error(res.data.message)
                }
              },
              err => {}
            )
          })
          .catch(() => {
            this.$message.info('取消！')
          })
      },
      getUnionTravelPrice(obj, type) {
        let msg = {}
        msg.TCID = obj.TCID
        msg.OrderId = obj.OrderId
        msg.Type = type
        if (type == 1) {
          msg.StartCityId = this.addMsg.DepartureCityId
          msg.CityTime = this.addMsg.GoCityTime
          if (this.addMsg.IsIntermodal == 2) {
            this.stratPrice = '0'
            this.stratPriceShow = false
            this.getTotalPrice()
          } else {
            this.apipost(
              'sellorder_get_GetUnionTravelPrice',
              msg,
              res => {
                if (res.data.resultCode == 1) {
                  this.stratPrice = res.data.data.Price
                  if (this.stratPrice == 0) {
                    this.stratPriceShow = false
                  } else {
                    this.stratPriceShow = true
                  }
                  this.getTotalPrice()
                }
              },
              err => {}
            )
          }
        } else {
          msg.StartCityId = this.addMsg.ReturnArriveCityId
          msg.CityTime = this.addMsg.BackCityTime
          if (this.addMsg.IsReturnIntermodal == 2) {
            this.returnPrice = '0'
            this.returnPriceShow = true
            this.getTotalPrice()
          } else {
            this.apipost(
              'sellorder_get_GetUnionTravelPrice',
              msg,
              res => {
                if (res.data.resultCode == 1) {
                  this.returnPrice = res.data.data.Price
                  if (this.returnPrice == 0) {
                    this.returnPriceShow = false
                  } else {
                    this.returnPriceShow = true
                  }
                  this.getTotalPrice()
                }
              },
              err => {}
            )
          }
        }
      },
      goUrlSFD: function (path, name, item) {
        let obj = JSON.parse(JSON.stringify(item))
        obj.oP_Remarks = ''
        obj.remarksList = []
        obj.refundFinanceList = []
        obj.remarks = []
        obj.ltName = []
        obj.lineName = []
        obj.financeList = []
        obj.guestList = []
        obj.description = []
        this.$router.push({
          name: path,
          query: {
            blank: 'y',
            tab: name,
            item: JSON.stringify(obj)
          }
        })
      },
      goUrlX(name, path, id, tcmun) {
        this.$router.push({
          name: path,
          query: {
            id: id,
            tcmun: tcmun,
            blank: 'y',
            tab: name
          }
        })
      },
      goUrlT(path, id) {
        let routeData = this.$router.resolve({
          name: path,
          query: {
            id: id,
            blank: 'y'
          }
        })
        window.open(routeData.href, '_blank')
      },
      goUrlR() {
        let obj = this.tripObj
        let routeData = this.$router.resolve({
          name: obj.path,
          query: {
            id: obj.configId,
            orderId: obj.orderId,
            cityId: obj.startCityId,
            tcid: obj.tcid,
            vshowA: this.travelControlTripLayer.vshowA,
            vshowB: this.travelControlTripLayer.vshowB,
            vshowC: this.travelControlTripLayer.vshowC,
            vshowD: this.travelControlTripLayer.vshowD,
            vshowE: this.travelControlTripLayer.vshowE,
            vshowF: this.travelControlTripLayer.vshowF,
            vshowG: this.travelControlTripLayer.vshowG,
            vshowH: this.travelControlTripLayer.vshowH,
            vshowI: this.travelControlTripLayer.vshowI,
            vshowJ: this.travelControlTripLayer.vshowJ,
            vshowK: this.travelControlTripLayer.vshowK,
            vshowL: this.travelControlTripLayer.vshowL,
            vshowM: this.travelControlTripLayer.vshowM,
            vshowN: this.travelControlTripLayer.vshowN,
            vshowLLR: this.travelControlTripLayer.vshowLLR,
          }
        })
        window.open(routeData.href, '_blank')
      },
      goUrlP(name, path, item) {
        this.$router.push({
          name: path,
          query: {
            id: item.orderId,
            tcid: item.tcid,
            tcnum: item.tcnum,
            isOrder: item.isOrder,
            blank: 'y',
            tab: name
          }
        })
      },
      goUrl(name, path, id, tcmun) {
        this.$router.push({
          name: path,
          query: {
            id: id,
            tcmun: tcmun,
            blank: 'y',
            tab: name
          }
        })
      },
      ScenicRefundMethods() {
        if (this.addMsg.ScenicRefundArr.length == 0) {
          this.ScenicRefundMoney = 0
        } else {
          this.ScenicRefundMoney = 0
          this.addMsg.ScenicRefundArr.forEach(x => {
            let listIndex = this.ScenicRefundList.findIndex(item => item.Id == x)
            if (listIndex != -1) {
              this.ScenicRefundMoney += this.ScenicRefundList[
                listIndex
              ].RefundMoney
            }
          })
        }
        this.getTotalPrice()
        this.getTicheng()
      },
      getPlatformAccount(typeIdtwo, platformAccount) {
        let platBranchId = this.getLocalStorage().RB_Branch_id;
        this.apipost('FinancialInstitutions_post_GetALLAccountList', {
          TypeId: typeIdtwo,
          BranchId: platBranchId
        }, res => {
          if (res.data.resultCode == 1) {
            this.PlatformAccountList = res.data.data;
            this.addMsg.PlatformAccount = platformAccount;
          }
        }, err => {})
      },
      getScenicRefund(TCID) {
        this.apipost(
          'sellorder_get_GetScenicRefundList', {
            TCID
          },
          res => {
            if (res.data.resultCode == 1) {
              this.ScenicRefundList = res.data.data
              this.ScenicRefundList.forEach(item => {
                item['ScenicName'] =
                  item.CouponsName + ' -￥' + this.moneyFormat(item.RefundMoney)
              })
              this.ScenicRefundMethods()
            }
          },
          err => {}
        )
      },
      platformOrderMethods() {
        if (this.addMsg.PlatformOrder == '') {
          this.addMsg.MinOrderPrice = 0
          this.addMsg.CostType = ''
          this.addMsg.TradeDate = ''
        } else {
          this.addMsg.MinOrderPrice =
            this.minPrice *
            (Number(this.addMsg.AirticketNum) +
              Number(this.addMsg.ManNum) +
              Number(this.addMsg.ChirdNum) +
              Number(this.addMsg.OldPeopleNum))
        }
      },
      getMinPrice(id) {
        this.apipost(
          'Financial_post_GetLowPrice', {
            OrderID: id,
            OrderResource: 8
          },
          res => {
            if (res.data.resultCode == 1) {
              if (res.data.data.LowDeposit != -1) {
                this.minpay = res.data.data.LowDeposit
              }
            }
          },
          err => {}
        )
      },
      childByValue(data) {
        this.showID = data
      },
      getRemarks(obj) {
        // 华国豪5-5新增 
        if (moment().format("YYYY-MM-DD") >= obj.startDate) {
          this.$confirm("该团目前已是结团状态，不能随意修改备注信息，若强行修改备注，将会计入个人考核，是否确定修改备注信息？", "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning"
            })
            .then(() => {
              this.isShowLayerRemarks = true
              this.isShowLayer = false
              this.$refs['addMsg'].resetFields()
              this.clearMsg()
              this.remarksMsg.OrderId = obj.orderId
              this.remarksMsg.Remarks = obj.remarks
              this.remarksMsg.OldRemarks = obj.remarks
              this.remarksMsg.isOrder = obj.isOrder
            })
            .catch(() => {
              this.$message.info("已取消！");
            });
        } else {
          this.isShowLayerRemarks = true
          this.isShowLayer = false
          this.$refs['addMsg'].resetFields()
          this.clearMsg()
          this.remarksMsg.OrderId = obj.orderId
          this.remarksMsg.Remarks = obj.remarks
          this.remarksMsg.OldRemarks = obj.remarks
          this.remarksMsg.isOrder = obj.isOrder
        }
      },
      getDetail(obj) {
        this.Ysze = false;
        this.starTime = obj.startDate
        this.endTime = obj.backDate
        this.getMinPrice(obj.orderId)
        this.addMsg.OrderId = obj.orderId
        this.IsChargeLossOrders = obj.isChargeLossOrders
        this.apipost(
          'sellorder_post_GetOrderEntity', {
            ID: obj.orderId
          },
          res => {
            console.log(res.data.data.model);
            if (res.data.resultCode == 1) {
              this.IsUnion = res.data.data.IsUnion
              this.isAllowUpdate = res.data.data.IsUpdatePlatOrder
              this.addObj = res.data.data.modelPrice
              let x = res.data.data.model;

              this.addObj.OrderId = x.OrderId;
              this.addObj.OpSetLossMoney = x.OpSetLossMoney;

              this.addMsg = x;
              this.addMsg.ScenicRefundArr = res.data.data.ScenicRefundArr
              this.addMsg.PlatformAccount = ''
              this.getScenicRefund(obj.tcid)
              this.getPlatformAccount(obj.platformAccountTypeId, obj.platformAccount);
              this.SetOutCityId = res.data.data.SetOutCityId
              this.reOutCityId = res.data.data.SetBackCityId
              this.addMsg.CustomerType = x.CustomerType.toString()
              this.addMsg.ClientSource = x.ClientSource.toString()
              this.addMsg.GroupType = x.GroupType.toString()
              this.addMsg.TradeWay = x.TradeWay.toString()
              this.addMsg.PredictRoomNum = x.PredictRoomNum
              this.addMsg.IsIntermodal = x.IsIntermodal.toString()
              this.addMsg.IsReturnIntermodal = x.IsReturnIntermodal.toString()
              this.addMsg.ChirdNum = x.ChirdNum.toString()
              this.addMsg.ChirdNeedBedNum = x.ChirdNeedBedNum.toString()
              this.addMsg.ChirdNoNeedBedNum = (x.ChirdNum - x.ChirdNeedBedNum).toString()
              this.addMsg.BabyNum = x.BabyNum.toString();
              this.addMsg.RefuseVisaNum = x.RefuseVisaNum.toString();
              this.IsChildrenTour = x.IsChildrenTour
              this.IsBirdDiscount = x.IsBirdDiscount

              this.stratPrice = res.data.data.modelPrice.GoAddPrice

              if (this.stratPrice == 0) {
                this.stratPriceShow = false
              } else {
                this.stratPriceShow = true
              }
              this.returnPrice = res.data.data.modelPrice.BackAddPrice
              if (this.returnPrice == 0) {
                this.returnPriceShow = false
              } else {
                this.returnPriceShow = true
              }

              if (x.ClientSource == 1) {
                this.isPingtai = true
              }

              this.isShowLayer = true
              this.isShowHouse = false
              this.isShowLayerRemarks = false
              this.apipost(
                'app_today_visit_GetCustomerBrandByCustomerId', {
                  customerInfoId: x.CustomerId
                },
                res => {
                  if (res.data.resultCode == 1) {
                    this.ssptList = res.data.data
                    this.addMsg.BrandId = x.BrandId
                  }
                },
                err => {}
              )
              this.Unit_PriceList = [];
              this.apipost('sellorder_post_GetLessPrice', {
                "TCID": obj.tcid
              }, res => {
                this.LessMoney = res.data.data.lessMoney;
                if (parseFloat(this.LessMoney) > 0) {
                  for (var i = 0; i <= parseInt(this.LessMoney) / 10; i++) {
                    var obj = {
                      ID: '',
                      LessMoney: ''
                    }
                    obj.ID = this.addMsg.TC_Price - i * 10;
                    obj.LessMoney = this.addMsg.TC_Price - i * 10;
                    this.Unit_PriceList.push(obj);
                  }
                  if (this.Unit_PriceList.findIndex(markers => markers.ID == this.addMsg.Unit_Price) < 0) {
                    var obj = {
                      ID: '',
                      LessMoney: ''
                    }
                    obj.ID = this.addMsg.Unit_Price;
                    obj.LessMoney = this.addMsg.Unit_Price;
                    this.Unit_PriceList.push(obj);
                  }
                } else {
                  var obj = {
                    ID: '',
                    LessMoney: ''
                  }
                  obj.ID = this.addMsg.Unit_Price;
                  obj.LessMoney = this.addMsg.Unit_Price;
                  this.Unit_PriceList.push(obj);
                }
              }, err => {})

              this.getKhmdList(this.addMsg.CustomerType, obj.lineId)
              this.getDdlyList(this.addMsg.CustomerType)
            } else {
              this.$message.error(res.data.message)
            }
          },
          err => {}
        )
      },
      getHouse: function (obj) {
        this.starTime = obj.startDate
        this.endTime = obj.backDate
        this.getMinPrice(obj.orderId)
        this.addMsg.OrderId = obj.orderId
        this.apipost(
          'sellorder_post_GetOrderEntity', {
            ID: obj.orderId
          },
          res => {
            if (res.data.resultCode == 1) {
              this.IsUnion = res.data.data.IsUnion
              this.isAllowUpdate = res.data.data.IsUpdatePlatOrder
              this.addObj = res.data.data.modelPrice
              let x = res.data.data.model
              this.addMsg = x
              this.addMsg.ScenicRefundArr = res.data.data.ScenicRefundArr
              this.getScenicRefund(obj.tcid)
              this.SetOutCityId = res.data.data.SetOutCityId
              this.reOutCityId = res.data.data.SetBackCityId
              this.addMsg.CustomerType = x.CustomerType.toString()
              this.addMsg.ClientSource = x.ClientSource.toString()
              this.addMsg.GroupType = x.GroupType.toString()
              this.addMsg.TradeWay = x.TradeWay.toString()
              this.addMsg.PredictRoomNum = x.PredictRoomNum
              this.addMsg.IsIntermodal = x.IsIntermodal.toString()
              this.addMsg.IsReturnIntermodal = x.IsReturnIntermodal.toString()
              this.addMsg.ChirdNum = x.ChirdNum.toString()
              this.addMsg.ChirdNeedBedNum = x.ChirdNeedBedNum.toString()
              this.addMsg.ChirdNoNeedBedNum = (x.ChirdNum - x.ChirdNeedBedNum).toString()
              this.addMsg.BabyNum = x.BabyNum.toString()
              this.IsChildrenTour = x.IsChildrenTour
              this.IsBirdDiscount = x.IsBirdDiscount
              this.stratPrice = res.data.data.modelPrice.GoAddPrice

              if (this.stratPrice == 0) {
                this.stratPriceShow = false
              } else {
                this.stratPriceShow = true
              }
              this.returnPrice = res.data.data.modelPrice.BackAddPrice
              if (this.returnPrice == 0) {
                this.returnPriceShow = false
              } else {
                this.returnPriceShow = true
              }

              if (x.ClientSource == 1) {
                this.isPingtai = true
              }

              this.isShowHouse = true
              this.isShowLayer = false
              this.isShowLayerRemarks = false
              this.apipost(
                'app_today_visit_GetCustomerBrandByCustomerId', {
                  customerInfoId: x.CustomerId
                },
                res => {
                  if (res.data.resultCode == 1) {
                    this.ssptList = res.data.data
                    this.addMsg.BrandId = x.BrandId
                  }
                },
                err => {}
              )

              this.getKhmdList(this.addMsg.CustomerType, obj.lineId)
              this.getDdlyList(this.addMsg.CustomerType)
            } else {
              this.$message.error(res.data.message)
            }
          },
          err => {}
        )
      },
      getTypePrice() {
        this.addMsg.ContactName = ''
        this.addMsg.ContactMobile = ''
        if (this.addMsg.CustomerType == 1) {
          this.addMsg.TC_Price = this.addObj.B2BMemberPrice
        }
        if (this.addMsg.CustomerType == 2) {
          this.addMsg.TC_Price = this.addObj.B2BPrice
        }
        if (this.addMsg.CustomerType == 3) {
          this.addMsg.TC_Price = this.addObj.B2CMemberPrice
          this.addMsg.CustomerId = '0'
          this.addMsg.CommissionShareMoney = '0'
        }
        if (this.addMsg.CustomerType == 4) {
          this.addMsg.TC_Price = this.addObj.B2CPrice
          this.addMsg.CustomerId = '0'
          this.addMsg.CommissionShareMoney = '0'
        }
      },
      getTicheng() {
        //提成
        let num =
          Number(this.addMsg.ManNum) +
          Number(this.addMsg.ChirdNum) +
          Number(this.addMsg.OldPeopleNum)
        let yh = 0
        if (num > 0) {
          this.apipost(
            'sellorder_get_GetOrderMinPrice', {
              ltID: this.addObj.ltID,
              Num: num
            },
            res => {
              yh = res.data.data
            },
            err => {}
          )
        }
        //  let cj='成交单价-最低成交价格（标准单价-符合人数[成人，儿童，老人]条件的最高少价）'
        let chajia = Number(this.addMsg.Unit_Price) - (this.addMsg.TC_Price - yh)
        let ewtc = chajia > 0 ? chajia * 0.5 * num : chajia * num //额外提成
        this.addMsg.Commission = (
          Number(this.addMsg.PreferPrice) * 0.01 +
          ewtc
        ).toFixed(2)
        if (this.addMsg.CustomerType == 1 || this.addMsg.CustomerType == 2) {
          if (this.addMsg.CommissionSharePeople != '-1') {
            if (this.addMsg.Commission > 0) {
              this.addMsg.CommissionShareMoney = this.addMsg.Commission / 2
              this.addMsg.Commission =
                this.addMsg.Commission - this.addMsg.CommissionShareMoney
            } else {
              this.addMsg.CommissionShareMoney = '0'
            }
          }
        }
      },
      getHouseNo() {
        //算法：((成人+儿童占床数+老人-（三人房数量*3）)-单房数)/2+单房数+三人房数量
        this.addMsg.PredictRoomNum =
          (Number(this.addMsg.AirticketNum) +
            (Number(this.addMsg.ManNum) +
              Number(this.addMsg.ChirdNeedBedNum) +
              Number(this.addMsg.OldPeopleNum)) -
            Number(this.addMsg.TripleRoomNum) * 3 -
            Number(this.addMsg.SingleRoomNum)) /
          2 +
          Number(this.addMsg.SingleRoomNum) +
          Number(this.addMsg.TripleRoomNum)
      },
      getNumber() {
        this.addMsg.ChirdNum = this.addMsg.ChirdNoNeedBedNum * 1 + this.addMsg.ChirdNeedBedNum * 1
        this.addMsg.VisaNum =
          Number(this.addMsg.AirticketNum) +
          Number(this.addMsg.ManNum) +
          Number(this.addMsg.ChirdNum) +
          Number(this.addMsg.BabyNum) +
          Number(this.addMsg.OldPeopleNum)
        this.addMsg.SafeNum =
          Number(this.addMsg.AirticketNum) +
          Number(this.addMsg.ManNum) +
          Number(this.addMsg.ChirdNum) +
          Number(this.addMsg.BabyNum) +
          Number(this.addMsg.OldPeopleNum)

        var SeatNum = (Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this.addMsg.OldPeopleNum)) -
          (Number(this.addMsg.ESeatNum) + Number(this.addMsg.FSeatNum));
        this.addMsg.YSeatNum = SeatNum < 0 ? 0 : SeatNum;
      },
      getTotalPrice(t) {
        if (t === 3) {
          if (parseFloat(this.addMsg.Unit_Price).toString() === "NaN") {
            this.$message.error('请输入正确的价格！')
            this.addMsg.Unit_Price = this.addMsg.TC_Price
            return
          }
          if (parseFloat(this.addMsg.Unit_Price) < this.addMsg.TC_Price) {
            this.$message.error('成交单价必须大于等于本团单价！')
            this.addMsg.Unit_Price = this.addMsg.TC_Price
            return
          }
        }
        this.addMsg.ChirdNum = this.addMsg.ChirdNoNeedBedNum * 1 + this.addMsg.ChirdNeedBedNum * 1
        if (this.addObj.IsBirdDiscount == 1) {
          //早鸟优惠
          //this.addMsg.Unit_Price  //成交单价
          //BabyPrice 婴儿价
          //BabyChargePrice  儿童附加费
          //OldManChargePrice  老人 附加费
          //DiscountPrice 早鸟优惠
          let chengren =
            Number(this.addMsg.ManNum) *
            (Number(this.addMsg.Unit_Price) - this.addObj.DiscountPrice)
          let ertong =
            Number(this.addMsg.ChirdNum) *
            (Number(this.addMsg.Unit_Price) -
              this.addObj.DiscountPrice +
              this.addObj.BabyChargePrice)
          let yinger = Number(this.addMsg.BabyNum) * this.addObj.BabyPrice
          let laoren =
            Number(this.addMsg.OldPeopleNum) *
            (Number(this.addMsg.Unit_Price) -
              this.addObj.DiscountPrice +
              this.addObj.OldManChargePrice)
          let zafeiqianzhen =
            this.addObj.OtherPrice *
            (Number(this.addMsg.ManNum) +
              Number(this.addMsg.ChirdNum) +
              Number(this.addMsg.OldPeopleNum)) +
            this.addObj.VisaPrice *
            (Number(this.addMsg.AirticketNum) +
              Number(this.addMsg.ManNum) +
              Number(this.addMsg.ChirdNum) +
              Number(this.addMsg.OldPeopleNum)) -
            this.addObj.BackVisaPrice *
            (Number(this.addMsg.AirticketNum) +
              Number(this.addMsg.ManNum) +
              Number(this.addMsg.ChirdNum) +
              Number(this.addMsg.BabyNum) +
              Number(this.addMsg.OldPeopleNum) -
              Number(this.addMsg.VisaNum))
          let danfang =
            Number(this.addMsg.SingleRoomNum) * this.addObj.SingleRoomPrice
          let ertongbed =
            this.addObj.ChildNeedPrice * Number(this.addMsg.ChirdNeedBedNum) -
            this.addObj.ChildNoNeedPrice *
            (Number(this.addMsg.ChirdNum) -
              Number(this.addMsg.ChirdNeedBedNum))
          let lianyun =
            (Number(this.addMsg.ManNum) +
              Number(this.addMsg.ChirdNum) +
              Number(this.addMsg.OldPeopleNum)) *
            (Number(this.stratPrice) + Number(this.returnPrice))
          let dandijie =
            this.addObj.SingleDMCPrice * Number(this.addMsg.AirticketNum)
          this.addMsg.PreferPrice =
            dandijie +
            lianyun +
            chengren +
            ertong +
            yinger +
            laoren +
            zafeiqianzhen +
            danfang +
            ertongbed -
            this.ScenicRefundMoney *
            (Number(this.addMsg.ManNum) +
              Number(this.addMsg.ChirdNum) +
              Number(this.addMsg.OldPeopleNum))
        } else {
          let chengren =
            Number(this.addMsg.ManNum) * Number(this.addMsg.Unit_Price)
          let ertong =
            Number(this.addMsg.ChirdNum) *
            (Number(this.addMsg.Unit_Price) + this.addObj.BabyChargePrice)
          let yinger = Number(this.addMsg.BabyNum) * this.addObj.BabyPrice
          let laoren =
            Number(this.addMsg.OldPeopleNum) *
            (Number(this.addMsg.Unit_Price) + this.addObj.OldManChargePrice)
          let zafeiqianzhen =
            this.addObj.OtherPrice *
            (Number(this.addMsg.ManNum) +
              Number(this.addMsg.ChirdNum) +
              Number(this.addMsg.OldPeopleNum)) +
            this.addObj.VisaPrice *
            (Number(this.addMsg.AirticketNum) +
              Number(this.addMsg.ManNum) +
              Number(this.addMsg.ChirdNum) +
              Number(this.addMsg.OldPeopleNum)) -
            this.addObj.BackVisaPrice *
            (Number(this.addMsg.AirticketNum) +
              Number(this.addMsg.ManNum) +
              Number(this.addMsg.ChirdNum) +
              Number(this.addMsg.BabyNum) +
              Number(this.addMsg.OldPeopleNum) -
              Number(this.addMsg.VisaNum))
          let danfang =
            Number(this.addMsg.SingleRoomNum) * this.addObj.SingleRoomPrice
          let ertongbed =
            this.addObj.ChildNeedPrice * Number(this.addMsg.ChirdNeedBedNum) -
            this.addObj.ChildNoNeedPrice *
            (Number(this.addMsg.ChirdNum) -
              Number(this.addMsg.ChirdNeedBedNum))
          let lianyun =
            (Number(this.addMsg.ManNum) +
              Number(this.addMsg.ChirdNum) +
              Number(this.addMsg.OldPeopleNum)) *
            (Number(this.stratPrice) + Number(this.returnPrice))
          let dandijie =
            this.addObj.SingleDMCPrice * Number(this.addMsg.AirticketNum)
          this.addMsg.PreferPrice =
            dandijie +
            lianyun +
            chengren +
            ertong +
            yinger +
            laoren +
            zafeiqianzhen +
            danfang +
            ertongbed -
            this.ScenicRefundMoney *
            (Number(this.addMsg.ManNum) +
              Number(this.addMsg.ChirdNum) +
              Number(this.addMsg.OldPeopleNum))
        }

        this.getTicheng()
      },
      yzBigBed2() {
        let x =
          Number(this.addMsg.AirticketNum) +
          Number(this.addMsg.ManNum) +
          Number(this.addMsg.ChirdNeedBedNum) +
          Number(this.addMsg.OldPeopleNum) -
          Number(this.addMsg.SingleRoomNum)
        let y =
          x -
          Number(this.addMsg.TripleRoomNum) * 3 -
          Number(this.addMsg.BigRoomNum) * 2

        if (y < 0) {
          this.addMsg.SingleRoomNum = 0
        }
        this.getHouseNo()
      },

      yzBigBed() {
        let x =
          Number(this.addMsg.AirticketNum) +
          Number(this.addMsg.ManNum) +
          Number(this.addMsg.ChirdNeedBedNum) +
          Number(this.addMsg.OldPeopleNum) -
          Number(this.addMsg.SingleRoomNum)
        let y =
          x -
          Number(this.addMsg.TripleRoomNum) * 3 -
          Number(this.addMsg.BigRoomNum) * 2

        if (y <= -1) {
          this.addMsg.BigRoomNum = 0
        }
        this.getHouseNo()
      },
      changeSelect: function () {
        this.$forceUpdate()
      },
      yzBigBed1() {
        let x =
          Number(this.addMsg.AirticketNum) +
          Number(this.addMsg.ManNum) +
          Number(this.addMsg.ChirdNeedBedNum) +
          Number(this.addMsg.OldPeopleNum) -
          Number(this.addMsg.SingleRoomNum)
        let y =
          x -
          Number(this.addMsg.TripleRoomNum) * 3 -
          Number(this.addMsg.BigRoomNum) * 2

        if (y <= -1) {
          this.addMsg.TripleRoomNum = 0
        }
        this.getHouseNo()
      },
      submitForm(addMsg) {
        //提交创建、修改表单
        this.$refs[addMsg].validate(valid => {
          if (valid) {
            this.saveOrder()
          } else {
            return false
          }
        })
      },
      submitFormRematks(RemarksMsg) {
        //提交创建、修改表单
        this.$refs[RemarksMsg].validate(valid => {
          if (valid) {
            this.apipost(
              'sellorder_post_SetOrderRemarks',
              this.remarksMsg,
              res => {
                if (res.data.resultCode == 1) {
                  this.$message.success(res.data.message)
                  this.remarksMsg.Remarks = ''
                  this.remarksMsg.OrderId = '0'
                  this.remarksMsg.isOrder = '1'
                  this.getList()
                  this.isShowLayerRemarks = false
                } else {
                  this.isShowLayerRemarks = false
                  this.$message.error(res.data.message)
                }
              },
              err => {}
            )
          } else {
            return false
          }
        })
      },
      cancelSubmit() {
        this.isShowLayer = false
        this.$refs['addMsg'].resetFields()
        this.clearMsg()
      },
      houseSubmit: function () {
        //提交修改房型表单
        this.apipost(
          'sellorder_post_SellUpdateOrderHouse',
          this.addMsg,
          res => {
            if (res.data.resultCode == 1) {
              this.$message.success(res.data.message)
              this.$refs['addMsg'].resetFields()
              this.clearMsg()
              this.getList()
              this.isShowHouse = false
            } else {
              this.isShowHouse = false
              this.$message.error(res.data.message)
            }
          },
          err => {}
        )
      },
      houseCancel: function () {
        this.isShowHouse = false
        this.$refs['addMsg'].resetFields()
        this.clearMsg()
      },
      cancelSubmitRemarks() {
        this.isShowLayerRemarks = false
        this.remarksMsg.Remarks = ''
        this.remarksMsg.OrderId = '0'
        this.remarksMsg.isOrder = '1'
        this.SpecialOffer = false
        this.SOMsg.UpdateBy = ''
        this.SOMsg.ApplyPrice = 0
        this.SOMsg.ApplyReason = ''
      },
      clearMsg() {
        this.addMsg.OrderId = '0'
        this.addMsg.TCID = '0'
        this.addMsg.IsIntermodal = '2'
        this.addMsg.IsReturnIntermodal = '2'
        this.addMsg.Unit_Price = '0'
        this.addMsg.TC_Price = '0'
        this.addMsg.ManNum = '0'
        this.addMsg.ChirdNum = '0'
        this.addMsg.ChirdNeedBedNum = '0'
        this.addMsg.BabyNum = '0'
        this.addMsg.OldPeopleNum = '0'
        this.addMsg.SingleRoomNum = '0'
        this.addMsg.PreferPrice = '0'
        this.addMsg.YSeatNum = '0'
        this.addMsg.ESeatNum = '0'
        this.addMsg.FSeatNum = '0'
        this.addMsg.Commission = '0'
        this.addMsg.BrandId = ''
        this.addMsg.TradeWay = '2'
        this.addMsg.PlatformAccount = '';
        this.addMsg.GuestNum = '0'
        this.addMsg.IsChildrenTour = '0'
        this.addMsg.OrderId = '0'
        this.addMsg.IsBirdDiscount = '0'
        this.addMsg.PredictRoomNum = '0'
        this.addMsg.BigRoomNum = '0'
        this.addMsg.TripleRoomNum = '0'
        this.addMsg.TradeDate = ''
        this.addMsg.CostType = ''
        this.addMsg.PlatformOrder = ''
        this.ddlyList = []
        this.addMsg.Remarks = ''
        this.addMsg.MinOrderPrice = ''
        this.addMsg.VisaNum = '0'
        this.addMsg.SafeNum = '0';
        this.addMsg.RefuseVisaNum = '0';
        this.addMsg.AirticketNum = '0'
        this.addMsg.ScenicRefundArr = []
        this.ScenicRefundMoney = 0
        this.addMsg.CommissionSharePeople = -1
        this.addMsg.CommissionShareMoney = '0'
      },
      saveOrder() {
        //验证人数和机位数
        if (
          Number(this.addMsg.ManNum) +
          Number(this.addMsg.ChirdNum) +
          Number(this.addMsg.OldPeopleNum) !=
          Number(this.addMsg.YSeatNum) +
          Number(this.addMsg.ESeatNum) +
          Number(this.addMsg.FSeatNum)
        ) {
          if (this.IsChargeLossOrders == 1) {

          } else {
            this.$message.warning('人数和机位数不相等！')
            return
          }
        }
        if (
          Number(this.addMsg.AirticketNum) +
          Number(this.addMsg.ManNum) +
          Number(this.addMsg.ChirdNum) +
          Number(this.addMsg.OldPeopleNum) +
          Number(this.addMsg.BabyNum) <
          Number(this.addMsg.VisaNum)
        ) {
          this.$message.warning('签证数量不能大于人数总和！')
          return
        }

        if (
          Number(this.addMsg.AirticketNum) +
          Number(this.addMsg.ManNum) +
          Number(this.addMsg.ChirdNum) +
          Number(this.addMsg.OldPeopleNum) +
          Number(this.addMsg.BabyNum) <
          Number(this.addMsg.SafeNum)
        ) {
          this.$message.warning('保险数量不能大于人数总和！')
          return
        }

        if (Number(this.addMsg.ChirdNeedBedNum) > Number(this.addMsg.ChirdNum)) {
          this.$message.warning('儿童占床不能大于儿童数！')
          return
        }

        if (
          Number(this.addMsg.ChirdNum) -
          Number(this.addMsg.ChirdNeedBedNum) +
          Number(this.addMsg.BabyNum) >
          Number(this.addMsg.ManNum) +
          Number(this.addMsg.OldPeopleNum) +
          Number(this.addMsg.ChirdNeedBedNum)
        ) {
          this.$message.warning('儿童占床数量不足！')
          return
        }

        if (this.userId == this.createByInfo) {
          if (this.addMsg.CommissionSharePeople == '-1') {
            this.addMsg.CommissionShareMoney = '0'
          }
        }

        this.addMsg.TCID = this.addObj.TCID
        this.addMsg.GuestNum =
          Number(this.addMsg.ManNum) +
          Number(this.addMsg.ChirdNum) +
          Number(this.addMsg.OldPeopleNum) +
          Number(this.addMsg.BabyNum) +
          Number(this.addMsg.AirticketNum)
        this.addMsg.IsChildrenTour = this.IsChildrenTour
        this.addMsg.IsBirdDiscount = this.addObj.IsBirdDiscount
        this.apipost(
          'sellorder_post_SetOrderInfo_02',
          this.addMsg,
          res => {
            if (res.data.resultCode == 1) {
              this.$message.success(res.data.message)
              this.$refs['addMsg'].resetFields()
              this.clearMsg()
              this.getList()
              this.isShowLayer = false
            } else {
              this.isShowLayer = false
              this.$message.error(res.data.message)
            }
          },
          err => {}
        )
      },
      getStartList() {
        this.apipost(
          'sellorder_get_GetAllStartCity', {},
          res => {
            if (res.data.resultCode == 1) {
              this.startCityList = res.data.data
            }
          },
          err => {}
        )
      },
      getJyfs() {
        this.apipost(
          'sellorder_get_GetSellTradeWayEnumList', {},
          res => {
            if (res.data.resultCode == 1) {
              this.jyfsList = res.data.data
            }
          },
          err => {}
        )
      },
      getFylx() {
        this.apipost(
          'Financial_post_GetByOrderCostTypeList', {
            Type: 1
          },
          res => {
            if (res.data.resultCode == 1) {
              this.fylxList = res.data.data
            }
          },
          err => {}
        )
      },
      getSspt() {
        //给非直客  隐藏电话姓名赋值
        if (this.khmdList.length !== 0) {
          let obj = this.khmdList.find(
            item => item.customerId == this.addMsg.CustomerId
          )
          if (obj) {
            this.customerId = obj.customerId;
            this.createByInfo = obj.createByInfo;
            this.addMsg.ContactName = obj.customerName + '(' + obj.contact + ')'
            this.addMsg.ContactMobile = obj.contactNumber
          }
        }
        if (this.userId != this.createByInfo) {
          this.addMsg.CommissionSharePeople = this.createByInfo
          this.isUpdateSharePeople = true
        } else {
          //this.addMsg.CommissionSharePeople='-1'
          //this.isUpdateSharePeople=false
        }
        this.apipost(
          'app_today_visit_GetCustomerBrandByCustomerId', {
            customerInfoId: this.addMsg.CustomerId
          },
          res => {
            if (res.data.resultCode == 1) {
              this.ssptList = res.data.data
            }
          },
          err => {}
        )
      },
      getKhmdList(id, lineId) {
        this.apipost(
          'app_today_visit_GetOrderMyCustomerList', {
            typeId: id,
            lineId: lineId
          },
          res => {
            if (res.data.resultCode == 1) {
              this.khmdList = res.data.data
              this.getSspt()
            }
          },
          err => {}
        )
      },
      getDdztList() {
        this.apipost(
          'sellorder_post_GetSellOrderStatusEnumList', {},
          res => {
            if (res.data.resultCode == 1) {
              this.ddztList = res.data.data
            }
          },
          err => {}
        )
      },
      getDdlyList(id) {
        this.apipost(
          'sellorder_get_GetSellClientSourceEnumList', {
            typeId: id
          },
          res => {
            if (res.data.resultCode == 1) {
              this.ddlyList = res.data.data
            }
          },
          err => {}
        )
      },
      getCtlxList() {
        this.apipost(
          'sellorder_get_GetOrderJoinEnumList', {},
          res => {
            if (res.data.resultCode == 1) {
              this.ctlxList = res.data.data
            }
          },
          err => {}
        )
      },
      getKhlxList() {
        this.apipost(
          'sellorder_get_GetSellClientTypeEnumList', {},
          res => {
            if (res.data.resultCode == 1) {
              this.khlxList = res.data.data
            }
          },
          err => {}
        )
      },
      getMembersDetail(obj) {
        this.apipost(
          'sellorder_post_GetPeopleList', {
            ID: obj.orderId
          },
          res => {
            if (res.data.resultCode == 1) {
              this.memberList = res.data.data
            }
          },
          err => {}
        )
      },
      getLogDetail(obj) {
        this.apipost(
          'sellorder_post_GetOrderLogList', {
            ID: obj.orderId
          },
          res => {
            if (res.data.resultCode == 1) {
              this.logList = res.data.data
              this.logList.forEach(item => {
                item['x'] = this.$commonUtils.formatMsgTime(item.updateDate)
              })
            }
          },
          err => {}
        )
      },
      getOrderDetail(obj) {
        this.apipost(
          'Financial_post_GetOrderFinanceList', {
            OrderId: obj.orderId,
            OrderResource: 8,
            IsTravelMoney: 1
          },
          res => {
            if (res.data.resultCode == 1) {
              this.orderList = res.data.data
            }
          },
          err => {}
        )
      },
      getList() {
        this.showID = -1
        this.loading = true
        this.apipost(
          'sellorder_post_GetTravelOrderList',
          this.msg,
          res => {

            if (res.data.resultCode == 1) {
              this.loading = false
              this.total = res.data.data.count
              this.list = res.data.data.pageData;
            } else {
              this.$message.error(res.data.message)
            }
          },
          err => {}
        )
        this.getCount()
      },
      getLineList() {
        this.apipost('line_post_GetAllList', {}, res => {
          if (res.data.resultCode == 1) {
            this.LineList = res.data.data
          } else {
            this.$message.error(res.data.message)
          }
        })
      },
      //获取系列列表
      getLineTeamList(lineId) {
        this.LineTeamList = []
        this.apipost(
          'team_post_GetList', {
            lineID: lineId,
            isTOOP: 1
          },
          res => {
            if (res.data.resultCode == 1) {
              this.msg.LineteamId = '-1'
              this.LineTeamList = res.data.data
            }
          }
        )
      },
      getCompanyList() {
        //出团公司
        this.apipost(
          'sellorder_post_GetBranchList', {},
          res => {
            if (res.data.resultCode == 1) {
              this.companyList = res.data.data
            }
          },
          err => {}
        )
      },
      goFinanceUrl(path, Type, OrderID, OrderSource, TCID) {
        this.$router.push({
          name: path,
          query: {
            Type: Type,
            OrderID: OrderID,
            OrderSource: OrderSource,
            TCID: TCID
          }
        })
      },
      handleCurrentChange(val) {
        this.msg.pageIndex = val
        this.getList()
      },
      resetPageIndex() {
        this.msg.pageIndex = 1
        this.currentPage = 1
      },
      getEmployee() {
        //员工
        this.apipost(
          'admin_get_EmployeeGetList',
          this.employeeMsg,
          res => {
            if (res.data.resultCode == 1) {
              this.employeeList = res.data.data
            } else {}
          },
          err => {}
        )
      },
      //点击修改业务员
      getSalerInfo(item) {
        this.subInfo.CreateBy = item.createByName
        this.subInfo.OrderId = item.orderId
        this.showChangeSales = true
      },
      //关闭修改业务员
      closeSalseDiv() {
        this.showChangeSales = false
      },
      Discount(TCID) {
        this.SpecialOffer = true
        this.apipost(
          'lessprice_post_GetSuperiorPeople', {
            'TCID': TCID
          },
          res => {
            if (res.data.resultCode == 1) {
              this.SuperiorPeople = res.data.data;
            }
          },
          err => {}
        )
      },
      //申请优惠
      Preservation() {
        // if(this.SOMsg.ApplyPrice <= 0 ){
        //   this.$message.error('请填写大于等于0的金额')
        //   return
        // }
        var numReg = /^[0-9]+$/
        var numRe = new RegExp(numReg)
        if (!numRe.test(this.SOMsg.ApplyPrice)) {
          this.$message.error('请输入数字')
          return
        }
        if (this.SOMsg.UpdateBy == '请选择' || this.SOMsg.UpdateBy == '') {
          this.$message.error('请选择审核人')
          return
        }
        if (this.SOMsg.ApplyReason == '') {
          this.$message.error('请填写申请理由')
          return
        }
        this.apipost(
          'lessprice_post_SetLesspriceOrder',
          this.SOMsg,
          res => {
            if (res.data.resultCode == 1) {
              this.$message.success(res.data.message)
              this.SpecialOffer = false;
              this.SOMsg.UpdateBy = ''
              this.SOMsg.ApplyPrice = 0
              this.SOMsg.ApplyReason = ''
            } else {
              this.$message.error(res.data.message)
              this.SpecialOffer = false;
              this.SOMsg.UpdateBy = ''
              this.SOMsg.ApplyPrice = 0
              this.SOMsg.ApplyReason = ''
            }
          },
          err => {

          }
        )

      }
    },
    mounted() {
      this.userId = this.getLocalStorage().EmployeeId
      if (this.$route.query.id) {
        this.msg.tempOrderId = this.$route.query.id
      }
      this.msg.QStartDate = new Date().Format('yyyy-MM-dd')
      this.getEmployee()
      this.getList()
      this.getLineList()
      this.getCompanyList()
      this.getStartList()
      this.getKhlxList()
      this.getCtlxList()
      this.getDdztList()
      this.getJyfs()
      this.getFylx()
    },


  }

</script>
