<template>
    <div class="cost-all" v-loading.fullscreen.lock="costloading">
        <div class="cost-box">

            <el-dialog width="400px" title="团组信息修改" :visible.sync="showEditGroupInfoDialog">
                <div>
                    <el-form :model="groupInfoEditData" :rules="groupInfoRules" ref="groupInfoEditData"
                        label-width="100px">
                        <el-form-item label="出访时间：" prop="visitDate">
                            <el-date-picker style="width: 180px;" v-model="groupInfoEditData.visitDate"
                                placeholder="选择出访时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
                        </el-form-item>
                        <br />
                        <el-form-item label="出访人数：" prop="visitPNumber">
                            <el-input-number :controls="false" v-model="groupInfoEditData.visitPNumber" :min="0"
                                :step="1" placeholder="请输入出访人数"></el-input-number>
                        </el-form-item>
                        <br />
                        <el-form-item label="出访天数：" prop="visitDays">
                            <el-input-number :controls="false" v-model="groupInfoEditData.visitDays" :min="0" :step="1"
                                placeholder="请输入出访天数"></el-input-number>
                        </el-form-item>
                    </el-form>
                </div>
                <br />
                <div class="btn-dialog-cost">
                    <el-button size="small" type="primary" @click='EditGroupInfoEv'>保存</el-button>
                    &nbsp;&nbsp;&nbsp;
                    <el-button @click="showEditGroupInfoDialog = false" size="small">取消</el-button>
                </div>
            </el-dialog>


            <el-dialog width="400px" title="成本数据复制" :visible.sync="dialogCopyVisible">
                <div>
                    <label class="el-form-item__label">将此成本数据复制至：</label>
                    <el-select @focus="GroupSelectFocus" remote :loading="selectLoading" :remote-method="remoteMethod"
                        size="small" v-model="dialogCopySelect" filterable placeholder="请选择">
                        <el-option v-for="item in options" :key="item.id" :label="item.groupName" :value="item.id">
                            <span v-if="item.isTrue == 'True'" style="color:#409EFF">{{ item.groupName }}</span>
                            <span v-else style="color:gray">{{ item.groupName }}</span>
                        </el-option>
                    </el-select>
                </div>
                <br />
                <div class="btn-dialog-cost">
                    <el-button size="small" type="primary" @click='CopyGroupCost'>确定</el-button>
                    &nbsp;&nbsp;&nbsp;
                    <el-button @click="dialogCopyVisible = false" size="small">取消</el-button>
                </div>
            </el-dialog>

            <el-dialog width="400px" title="系数推测" :visible.sync="groupcostXSVisible">
                <div>
                    <el-table border :data="groupcostXSList">
                        <el-table-column property="label" label="系数板块"></el-table-column>
                        <el-table-column property="value" label="系数值"></el-table-column>
                    </el-table>
                </div>
                <br />
                <div class="btn-dialog-cost">
                    <el-button size="small" type="primary" @click='groupcostXSSet'>采用推测系数</el-button>
                    &nbsp;&nbsp;&nbsp;
                    <el-button @click="groupcostXSVisible = false" size="small">取消操作</el-button>
                </div>
            </el-dialog>

            <el-dialog width="85%" title="地接历史费用" :visible.sync="historyCarDialog" @close="dialogClose">
                <div style="display: flex;">
                    <div style="width: 30%;">
                        <el-input v-model="historyCarInput" placeholder="请输入城市名称"></el-input>
                    </div>
                    <div style="width: 2%;"></div>
                    <div><el-button type="primary" @click="historyCarSearch">搜索</el-button></div>
                </div>
                <br />
                <!-- @current-change=""  -->
                <el-table @current-change="historyCarChange" highlight-current-row border
                    :data="historyCarData.slice((currentPage - 1) * pageSize, currentPage * pageSize)">
                    <template slot-scope="scope">
                        <el-table-column v-for="(item, index) in historyCarCloumns" :property="item.value"
                            :label="item.label" :key="item.value"></el-table-column>
                    </template>
                </el-table>
                <div class="btn-dialog-cost">
                    <el-button size="small" @click="historyCarYes" type="primary">采用历史的行程数据</el-button>
                    &nbsp;&nbsp;&nbsp;
                    <el-button @click="historyCarDialog = false; historyCarSelectObject = {}"
                        size="small">采用现有的自定义数据</el-button>
                </div>
                <div class="block">
                    <el-pagination align='center' @current-change="handleCurrentChange" :current-page="currentPage"
                        :page-sizes="[5, 7, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next"
                        @size-change="handleSizeChange" :total="historyCarData.length">
                    </el-pagination>
                </div>
            </el-dialog>

            <el-dialog width="500" title="机票行程数据" :visible.sync="dialogTableVisible">
                <div>
                    <el-select @change="blackCodeSelectChange" v-model="blackCodeSelect" clearable
                        placeholder="请选择机票方案">
                        <el-option v-for="blackCode in blackCodeListSeLect" :key="blackCode.id" :label="blackCode.title"
                            :value="blackCode.id">
                        </el-option>
                    </el-select>
                </div>
                <br />
                <el-table border :data="gridData">
                    <el-table-column property="day" label="DAY" width="150"></el-table-column>
                    <el-table-column property="date" label="DATE" width="200"></el-table-column>
                    <el-table-column property="itin" label="ITIN"></el-table-column>
                </el-table>
                <div class="btn-dialog-cost">
                    <el-button @click="confirmationTP" size="small" type="primary">采用机票同事的行程数据</el-button>
                    &nbsp;&nbsp;&nbsp;
                    <el-button @click="dialogTableVisible = false" size="small">采用现有的自定义数据</el-button>
                </div>
            </el-dialog>

            <el-dialog width="80%" title="酒店询价数据" :visible.sync="dialogTableVisibleXJ">
                <el-table :data="tableDatas" border>
                    <el-table-column type="index" label="选中" width="55">
                        <template slot-scope="scope">
                            <el-checkbox :value='checkboxsXJ.includes(scope.row.id)'
                                @change='CheckboxChangeXJ(scope.row.id)'></el-checkbox>
                        </template>
                    </el-table-column>
                    <el-table-column prop="city" label="城市" width="120">
                    </el-table-column>
                    <el-table-column prop="name" label="酒店名称">
                    </el-table-column>
                    <el-table-column prop="checkInDate" label="入住日期" width="100">
                        <template slot-scope="scope">
                            {{ scope.row.checkInDate | filter_time }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="checkOutDate" label="退房日期" width="100">
                        <template slot-scope="scope">
                            {{ scope.row.checkOutDate | filter_time }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="selectDt" label="查询时间" width="150">
                    </el-table-column>
                    <el-table-column prop="createTime" label="SGR(价格/币种/数量)" width="120">
                        <template slot-scope="scope">
                            {{ scope.row.singlePrice | townum }}&nbsp;/&nbsp;{{ scope.row.singleCurrency
                            }}&nbsp;/&nbsp;{{
                                scope.row.singleQuantity }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="createTime" label="TBR(价格/币种/数量)" width="120">
                        <template slot-scope="scope">
                            {{ scope.row.doublePrice | townum }}&nbsp;/&nbsp;{{ scope.row.doubleCurrency
                            }}&nbsp;/&nbsp;{{
                                scope.row.doubleQuantity }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="createTime" label="JS/ES(价格/币种/数量)" width="120">
                        <template slot-scope="scope">
                            {{ scope.row.suitePrice | townum }}&nbsp;/&nbsp;{{ scope.row.suiteCurrency }}&nbsp;/&nbsp;{{
                                scope.row.suiteQuantity }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="createTime" label="SUITE(价格/币种/数量)" width="120">
                        <template slot-scope="scope">
                            {{ scope.row.otherPrice | townum }}&nbsp;/&nbsp;{{ scope.row.otherCurrency }}&nbsp;/&nbsp;{{
                                scope.row.otherQuantity }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="createUserName" label="查询人" width="80">
                    </el-table-column>
                    <!-- <el-table-column prop="remark" label="备注">
                    </el-table-column> -->
                    <!-- <el-table-column prop="name" label="操 作" width="140">
						<template slot-scope="scope">
							@click="PostHotelReservationsDetails(scope.$index, scope.row)" 
							<el-button @click="PostHotelInquiryInfo(scope.row)" type="primary" size="mini" icon="el-icon-edit"></el-button>
							<el-button @click="PostHotelInquiryDel(scope.row)" type="danger" size="mini" icon="el-icon-delete"></el-button>
						</template>
					</el-table-column> -->
                </el-table>
                <div class="btn-dialog-cost">
                    <el-button size="small" type="primary" @click='adoptHotelData'>采用酒店同事的询价数据</el-button>
                    &nbsp;&nbsp;&nbsp;
                    <el-button @click="dialogTableVisibleXJ = false" size="small">采用现有的自定义数据</el-button>
                </div>
            </el-dialog>

            <div class="cost-haed">
                <div class="ser-btn">
                    <div class="ser-btn-li Cost_topFlex" style="display: flex;">
                        <el-select @focus="GroupSelectFocus" remote :loading="selectLoading"
                            :remote-method="remoteMethod" size="small" v-model="diid" filterable placeholder="请选择"
                            @change="groupChange">
                            <el-option v-for="item in options" :key="item.id" :label="item.groupName" :value="item.id">
                                <span v-if="item.isTrue == 'True'" style="color:#409EFF">{{ item.groupName }}</span>
                                <span v-else style="color:gray">{{ item.groupName }}</span>
                            </el-option>
                        </el-select>
                        <div
                            style="line-height: 28px;font-size: 14px;width: 90px;color: #555;text-align: right;padding-right: 12px;">
                            分段类型:
                        </div>
                        <el-select style="width:200px" size="small" v-model="costTypevalue" placeholder="请选择"
                            @change="costTypeSelect">
                            <el-option v-for="item in costType" :key="item.value" :label="item.label"
                                :value="item.value">
                            </el-option>
                        </el-select>
                    </div>
                    <div class="ser-btn-li">
                        <el-button size="small" type="primary"
                            @click="dialogCopyVisible = true; dialogCopySelect = '';">成本复制</el-button>
                        <el-button size="small" type="primary"
                            @click="() => { groupcostXSVisible = true; QueryGroupCostXS(); }">系数推测</el-button>
                        <el-button size="small" :type="blackCodeIsTrue ? 'primary' : 'danger'"
                            @click="importBlackCode">导入机票行程数据</el-button>
                        <el-button size="small" :type="hotelIsTrue ? 'primary' : 'danger'"
                            @click="PostHotelInquiryPageItem">查看酒店询价价格</el-button>
                        <!-- <el-button size="small" type="primary">导入收款账单</el-button> -->
                        <el-button size="small" type="primary" @click="GetPriceCheckWord">生成报价单</el-button>
                        <el-button size="small" type="primary" @click="GetClientWord">导出客户报价</el-button>
                        <el-button size="small" type="primary" @click="GetGroupCostExcel">导出成本</el-button>
                        <!-- <el-button type="primary">一键复制</el-button> -->
                        <el-button v-if="isShare == 1" size="small" type="info" @click="GroupIsShare">取消成本通知</el-button>
                        <el-button v-if="isShare == 0" size="small" type="primary"
                            @click="GroupIsShare">成本通知</el-button>
                        <el-button size="small" type="primary" @click="save">保存设置</el-button>
                    </div>
                </div>
                <div class="cost-input">
                    <el-form :inline="true" class="demo-form-inline" :model='AGroupCostParameter' ref="inputs"
                        :rules="rules">
                        <el-form-item label="税率:" prop="tax">
                            <el-input size="small" v-model="AGroupCostParameter.tax" placeholder="税率"></el-input>
                        </el-form-item>
                        <el-form-item label="货币:">
                            <el-select size="small" v-model="AGroupCostParameter.currency" @change="changeCurrency"
                                placeholder="请选择">
                                <el-option v-for="item in currencyOption" :key="item.currencyId"
                                    :label="item.currencyCode" :value="item.currencyId">
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="汇率:" prop="rate">
                            <el-input size="small" v-model="AGroupCostParameter.rate" placeholder="汇率"></el-input>
                        </el-form-item>
                    </el-form>
                    <div v-show="costTypevalue == 'A'">
                        <el-form :inline="true" class="demo-form-inline" :rules="HotelRules" ref="DHotel"
                            :model="costTypeHotelNumbers.filter(item => item.type == 'Default')[0]">
                            <el-form-item label="TBR:" prop="tbr">
                                <el-input size="small" @blur='inSelectChangeCheck'
                                    v-model.number="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].tbr"
                                    placeholder="TBR"><i slot="suffix"
                                        style="font-style:normal;margin-right: 10px;">间</i></el-input>
                            </el-form-item>
                            <el-form-item label="SGR:" prop="sgr">
                                <el-input size="small" @blur='inSelectChangeCheck'
                                    v-model.number="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].sgr"
                                    placeholder="SGR"><i slot="suffix"
                                        style="font-style:normal;margin-right: 10px;">间</i></el-input>
                            </el-form-item>
                            <el-form-item label="JS/ES:" prop="jses">
                                <el-input size="small" @blur='inSelectChangeCheck'
                                    v-model.number="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].jses"
                                    placeholder="JS/ES"><i slot="suffix"
                                        style="font-style:normal;margin-right: 10px;">间</i></el-input>
                            </el-form-item>
                            <el-form-item label="SUITE:" prop="suite">
                                <el-input size="small" @blur='inSelectChangeCheck'
                                    v-model.number="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].suite"
                                    placeholder="SUITE"><i slot="suffix"
                                        style="font-style:normal;margin-right: 10px;">间</i></el-input>
                            </el-form-item>
                        </el-form>
                    </div>
                    <div v-show="costTypevalue == 'B'" class="CostBShow">
                        <el-row>
                            <el-form ref="Asection" :inline="true" class="demo-form-inline" :rules="CostTimeRules"
                                :model="AGroupCostParameter">
                                <el-col :span="5">
                                    <div> <el-form-item label="第一段开始:" prop="costTypeStartTime">
                                            <el-date-picker size="small" v-model="AGroupCostParameter.costTypeStartTime"
                                                type="date" placeholder="第一段开始" format="yyyy-MM-dd"
                                                value-format="yyyy-MM-dd">
                                            </el-date-picker>
                                        </el-form-item>
                                    </div>
                                </el-col>
                                <el-col :span="4">
                                    <div> <el-form-item label="结束:" prop="costTypeendTime"><el-date-picker size="small"
                                                v-model="AGroupCostParameter.costTypeendTime" type="date"
                                                placeholder="结束" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
                                            </el-date-picker>
                                        </el-form-item>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div>
                                        <el-form-item label="人数:" prop="costTypenumber"><el-input size="small"
                                                placeholder="人数" v-model.number="AGroupCostParameter.costTypenumber"
                                                clearable>
                                            </el-input>
                                        </el-form-item>
                                    </div>
                                </el-col>
                            </el-form>
                            <el-form ref="AHotel" :inline="true" class="demo-form-inline" :rules="HotelRules"
                                :model="costTypeHotelNumbers.filter(item => item.type == 'A')[0]">
                                <el-col :span="3">
                                    <div><el-form-item label="TBR:" prop="tbr">
                                            <el-input size="small" @blur='inSelectChangeCheck'
                                                v-model.number="costTypeHotelNumbers.filter(item => item.type == 'A')[0].tbr"
                                                placeholder="TBR"><i slot="suffix"
                                                    style="font-style:normal;margin-right: 10px;">间</i></el-input>
                                        </el-form-item></div>
                                </el-col>
                                <el-col :span="3">
                                    <div> <el-form-item label="SGR:" prop="sgr">
                                            <el-input size="small" @blur='inSelectChangeCheck'
                                                v-model.number="costTypeHotelNumbers.filter(item => item.type == 'A')[0].sgr"
                                                placeholder="SGR"><i slot="suffix"
                                                    style="font-style:normal;margin-right: 10px;">间</i></el-input>
                                        </el-form-item></div>
                                </el-col>
                                <el-col :span="3">
                                    <div><el-form-item label="JS/ES:" prop="jses">
                                            <el-input size="small" @blur='inSelectChangeCheck'
                                                v-model.number="costTypeHotelNumbers.filter(item => item.type == 'A')[0].jses"
                                                placeholder="JS/ES"><i slot="suffix"
                                                    style="font-style:normal;margin-right: 10px;">间</i></el-input>
                                        </el-form-item></div>
                                </el-col>
                                <el-col :span="3">
                                    <div><el-form-item label="SUITE:" prop="suite">
                                            <el-input size="small" @blur='inSelectChangeCheck'
                                                v-model.number="costTypeHotelNumbers.filter(item => item.type == 'A')[0].suite"
                                                placeholder="SUITE"><i slot="suffix"
                                                    style="font-style:normal;margin-right: 10px;">间</i></el-input>
                                        </el-form-item></div>
                                </el-col>
                            </el-form>
                        </el-row>
                        <el-row>
                            <el-form ref="Bsection" :inline="true" class="demo-form-inline" :rules="CostTimeRules"
                                :model="BGroupCostParameter">
                                <el-col :span="5">
                                    <div> <el-form-item label="第二段开始:" prop="costTypeStartTime">
                                            <el-date-picker size="small" v-model="BGroupCostParameter.costTypeStartTime"
                                                type="date" placeholder="第二段开始" format="yyyy-MM-dd"
                                                value-format="yyyy-MM-dd">
                                            </el-date-picker>
                                        </el-form-item>
                                    </div>
                                </el-col>
                                <el-col :span="4">
                                    <div> <el-form-item label="结束:" prop="costTypeendTime"><el-date-picker size="small"
                                                v-model="BGroupCostParameter.costTypeendTime" type="date"
                                                placeholder="结束" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
                                            </el-date-picker>
                                        </el-form-item>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div>
                                        <el-form-item label="人数:" prop="costTypenumber"><el-input size="small"
                                                placeholder="人数" v-model.number="BGroupCostParameter.costTypenumber"
                                                clearable>
                                            </el-input>
                                        </el-form-item>
                                    </div>
                                </el-col>
                            </el-form>
                            <el-form ref="BHotel" :inline="true" class="demo-form-inline" :rules="HotelRules"
                                :model="costTypeHotelNumbers.filter(item => item.type == 'B')[0]">
                                <el-col :span="3">
                                    <div>
                                        <el-form-item label="TBR:" prop="tbr">
                                            <el-input size="small" @blur='inSelectChangeCheck'
                                                v-model.number="costTypeHotelNumbers.filter(item => item.type == 'B')[0].tbr"
                                                placeholder="TBR"><i slot="suffix"
                                                    style="font-style:normal;margin-right: 10px;">间</i></el-input>
                                        </el-form-item>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div> <el-form-item label="SGR:" prop="sgr">
                                            <el-input size="small" @blur='inSelectChangeCheck'
                                                v-model.number="costTypeHotelNumbers.filter(item => item.type == 'B')[0].sgr"
                                                placeholder="SGR"><i slot="suffix"
                                                    style="font-style:normal;margin-right: 10px;">间</i></el-input>
                                        </el-form-item></div>
                                </el-col>
                                <el-col :span="3">
                                    <div><el-form-item label="JS/ES:" prop="jses">
                                            <el-input size="small" @blur='inSelectChangeCheck'
                                                v-model.number="costTypeHotelNumbers.filter(item => item.type == 'B')[0].jses"
                                                placeholder="JS/ES"><i slot="suffix"
                                                    style="font-style:normal;margin-right: 10px;">间</i></el-input>
                                        </el-form-item></div>
                                </el-col>
                                <el-col :span="3">
                                    <div><el-form-item label="SUITE:" prop="suite">
                                            <el-input size="small" @blur='inSelectChangeCheck'
                                                v-model.number="costTypeHotelNumbers.filter(item => item.type == 'B')[0].suite"
                                                placeholder="SUITE"><i slot="suffix"
                                                    style="font-style:normal;margin-right: 10px;">间</i></el-input>
                                        </el-form-item></div>
                                </el-col>
                            </el-form>
                        </el-row>

                    </div>
                </div>
                <div class="cost-info">
                    <div class="cost-info-li">
                        <label>团 号：</label>
                        <span>{{ grouptitleinfo.tourCode }}</span>
                    </div>
                    <div class="cost-info-li">
                        <label>客 户：</label>
                        <span>{{ grouptitleinfo.clientName }}</span>
                    </div>
                    <div class="cost-info-li">
                        <label>出访国家：</label>
                        <span>{{ grouptitleinfo.visitCountry }}</span>
                    </div>
                    <div class="cost-info-li">
                        <label>起止日期：</label>
                        <span>{{ grouptitleinfo.visitStartDate }} -
                            {{ grouptitleinfo.visitEndDate
                            }}</span>
                    </div>
                    <div class="cost-info-li">
                        <label>天数/人数：</label>
                        <span>{{ grouptitleinfo.visitDays }}天/{{ grouptitleinfo.visitPNumber }}人</span>
                    </div>
                    <div @click='showEditGroupInfoDialog = true; getGroupInfo();'
                        style=" font-size: 15px;color: rgb(70, 161, 255);margin-left: -15px;cursor: pointer;">
                        <i class="el-icon-edit"></i>
                        编辑
                    </div>
                    <div class="cost-info-li">
                        <!-- 客户名单 -->
                        <el-popover class="clientinfo" placement="bottom" width="1052" trigger="hover">
                            <el-table :cell-style="{ 'text-align': 'center' }"
                                :header-cell-style="{ 'text-align': 'center' }" max-height="600" border
                                :data="rollcallarr">
                                <el-table-column width="100" property="date" label="姓名" align="center">
                                    <template slot-scope="scope">
                                        {{ scope.row.lastName }}{{ scope.row.firstName }}
                                    </template>
                                </el-table-column>
                                <el-table-column width="200" property="lastName" label="拼音" align="center">
                                    <template slot-scope="scope">
                                        {{ pinyingxing(scope.row.lastName) }}/{{ pinyingxing(scope.row.firstName) }}
                                    </template>
                                </el-table-column>
                                <el-table-column width="50" property="sex" label="性别" align="center">
                                    <template slot-scope="scope">
                                        {{ scope.row.sex == 0 ? '男' : '女' }}
                                    </template>
                                </el-table-column>
                                <el-table-column width="200" property="companyFullName" label="单位" align="center">
                                    <template slot-scope="scope">
                                        {{ scope.row.companyFullName }}
                                    </template>
                                </el-table-column>
                                <el-table-column width="200" property="job" label="职位" align="center">
                                    <template slot-scope="scope">
                                        {{ scope.row.job }}
                                    </template>
                                </el-table-column>
                                <el-table-column width="200" property="idCardNo" label="身份证号码" align="center">
                                    <template slot-scope="scope">
                                        {{ scope.row.idCardNo }}
                                    </template>
                                </el-table-column>
                                <el-table-column width="100" property="shippingSpaceType" label="舱位类型" align="center">
                                    <template slot-scope="scope">
                                        {{ scope.row.shippingSpaceType }}
                                    </template>
                                </el-table-column>
                                <!-- <el-table-column width="110" property="birthDay" label="生日">
                                    <template slot-scope="scope">
                                        {{ fgarr(scope.row.birthDay) }}
                                    </template>
                                </el-table-column> -->
                            </el-table>
                            <span slot="reference"
                                style="cursor: pointer;margin-left: 20px;color:red;font-size:14px">"移上查看客户名单"</span>
                        </el-popover>

                        <!-- 各部门操作人 -->
                        <el-popover class="clientinfo" placement="bottom" width="300" trigger="hover">
                            <div v-for="(item, index) in groupModuleOperators" :key="index">
                                <div>
                                    <span>{{ item.cTableName }}：</span>
                                    <!-- <span v-for="(itemsChi, indexChi) in item.operationUsers" :key="indexChi">
                                        {{ itemsChi.userName }}
                                    </span> -->
                                    <span v-if="item.operationUsers.length == 0" style="color: red;">
                                        暂未指定
                                    </span>
                                    <span v-else style="color: green;">
                                        {{item.operationUsers.map(user => user.userName).join('、')}}
                                    </span>
                                </div>
                                <div v-if="index != groupModuleOperators.length - 1">
                                    <br />
                                </div>
                            </div>
                            <span slot="reference"
                                style="cursor: pointer;margin-left: 20px;color:red;font-size:14px">"移上查看各版块操作人"</span>
                        </el-popover>
                    </div>
                </div>
            </div>
            <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项：</div>
            <el-checkbox-group class="form-ss"
                v-model="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues" @change="TopChange">
                <el-checkbox v-for="(item, index) in checkOptions" :key="index" :title="item.tips" :label="item.label"
                    @change="(val) => { topcheckboxChange(val, item.label) }"></el-checkbox>
            </el-checkbox-group>
            <el-table :stripe='true' class="tables" style="font-size:10px" :summary-method="getSummaries" show-summary
                show-overflow-tooltip :data="tableData" :border="true" size="small" row-class-name="row"
                cell-class-name="column" :highlight-current-row="true" :fit="true">

                <!-- :height="centerheight" -->

                <template v-for="(item, index) in tableLabel">
                    <el-table-column :key="index" :prop="item.prop"
                        :width="item.width != '100' ? columnWidth : item.width" :label="item.label"
                        v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
                        <!-- eslint-disable-next-line -->
                        <template slot="header" slot-scope="scope">
                            <el-tooltip effect="dark" :content="item.describe" placement="top">
                                <div>
                                    <span class="rapAddress">{{ item.label }}</span>
                                    <span v-show="item.describe.indexOf('个人成本') != -1" style=" color:red">*</span>
                                </div>
                            </el-tooltip>
                        </template>
                        <template slot-scope="scope">
                            <div v-if="item.prop === 'sales'">
                                <el-input size="mini" :ref="'el-input-' + index" v-model="scope.row[item.prop]"
                                    show-word-limit />
                            </div>
                            <div v-else-if="item.prop === 'day'">
                                <el-input size="mini" :ref="'el-input-' + index" v-model="scope.row[item.prop]"
                                    type="number" controls-position="right" min="0"
                                    @change="NumberSetTime(scope.row[item.prop], scope.$index)">
                                    <div style="display: flex;flex-direction: column;height: 28px;justify-content: center;margin-right: -5px;font-size: 14px;"
                                        slot="suffix" class="number-input-icon">
                                        <i class="el-icon-caret-top btntop" @click="increase(scope.$index)"></i>
                                        <i class="el-icon-caret-bottom btnbottom" @click="decrease(scope.$index)"></i>
                                    </div>
                                </el-input>
                            </div>
                            <div v-else-if="item.prop === 'date'">
                                <span :title="scope.row[item.prop]">
                                    <!-- <el-input placeholder="请输入日期"
                                        v-model="scope.row[item.prop]"
                                        @change="dateChange(scope.row[item.prop], scope.$index)">
                                    </el-input> -->
                                    <el-date-picker @change="TimeUpdateAnewOrderby(scope.$index)" :clearable="false"
                                        size="mini" v-model="scope.row[item.prop]" type="date" value-format="yyyy-MM-dd"
                                        placeholder="选择日期">
                                    </el-date-picker>
                                </span>
                                <div style="position: absolute;left: 36%;">
                                    {{ GetWeek(scope.row[item.prop]) }}
                                </div>
                            </div>
                            <div v-else-if="item.prop === 'sale'">
                                <el-row class="figures-btn">
                                    <el-button @click="handleEdit(scope.$index, scope.row, 1)" size="mini"
                                        type="primary">司兼导</el-button>
                                    <el-button @click="handleEdit(scope.$index, scope.row, 2)" size="mini"
                                        type="primary">导
                                        游</el-button>
                                    <el-button @click="handleEdit(scope.$index, scope.row, 3)" size="mini"
                                        type="primary">车数据</el-button>
                                    <el-button @click="handleEdit(scope.$index, scope.row, 4)" size="mini"
                                        type="primary">景
                                        点</el-button>
                                    <el-button style='display:flex' class="history-btn"
                                        @click="GetHistoryCarData(scope.$index)" size="mini" type="primary">历史数据
                                    </el-button>
                                </el-row>
                            </div>
                            <div v-else-if="item.width == 100">
                                <div v-if="item.label == 'ITIN'">
                                    <el-popover placement="top" width="120" trigger="hover">
                                        <div>
                                            <div style="color:red;font-size:16px">
                                                行程描述格式:
                                            </div>
                                            <div>
                                                1.三字码信息:<br />
                                                <span style="color: green;">例：</span> PEK/WAW
                                            </div>
                                            <div>
                                                2.航班号:<br />
                                                <span style="color: green;">例：</span> CA737
                                            </div>
                                            <div>
                                                3.航班起止时间:<br />
                                                <span style="color: green;">例：</span> 0230/0640
                                            </div>
                                        </div>
                                        <div slot="reference">
                                            <el-input type="textarea"
                                                @input="capslk(scope.row[item.prop], scope.$index)" :rows="6"
                                                placeholder="请输入内容" v-model="scope.row[item.prop]"></el-input>
                                        </div>
                                    </el-popover>
                                </div>
                                <div class="accon-box" v-else-if="item.label == 'ACCO N'">
                                    <el-input @focus="acconinput(scope.row[item.prop], scope.$index)"
                                        @blur="acconblur(scope.$index)"
                                        @input="acconinput(scope.row[item.prop], scope.$index)"
                                        style="position: relative;" type="textarea" :rows="6" placeholder="请输入内容"
                                        v-model="scope.row[item.prop]"></el-input>
                                    <div class="accon-ul">
                                        <div @click="acconclick(item, scope.$index)" v-for="(item, index) in acconarrs"
                                            :key="index" class="accon-li">{{ item }}</div>
                                    </div>
                                </div>
                                <div v-else>
                                    <el-input type="textarea" :rows="6" placeholder="请输入内容"
                                        v-model="scope.row[item.prop]"></el-input>
                                </div>
                            </div>
                            <div v-else-if="item.prop == 'b' || item.prop == 'l' || item.prop == 'd'">
                                <el-popover placement="top-start" title="餐食报批费用:" trigger="hover">
                                    <div>
                                        <span style="color:red;">*具体价格以当前货币汇率为准!</span><br />
                                        <div v-if="ShowMeals.length == 0">
                                            <br />
                                            <span style="color:red">暂无数据!</span>
                                        </div>
                                        <div v-else>
                                            <div v-for="(item, index) in ShowMeals" :key="index">
                                                {{ item.countryOrCity }} &nbsp;&nbsp; <span style="color:green;">{{
                                                    item.price }}</span>元/人
                                                <span v-if="item.currPrice">(<span style="color:green;">{{
                                                    item.currPrice }}</span> </span>
                                                <span v-if="item.currStr">{{
                                                    item.currStr }})</span>
                                                <br>
                                            </div>
                                        </div>
                                        <div>
                                            <div>
                                                <div v-if="ShowOther.length == 0">
                                                </div>
                                                <div v-else>
                                                    <div style="margin-top: 10px;"></div>
                                                    <div class="el-popover__title">三公经费-其它：</div>
                                                    <div v-for="(item, index) in ShowOther" :key="index">
                                                        {{ item.setDataType }} &nbsp;&nbsp; <span
                                                            style="color:green;">{{
                                                                item.subTotal }}</span>元/人
                                                        <span v-if="item.cost">(<span style="color:green;">{{
                                                            item.cost }}</span> </span>
                                                        <span v-if="item.currencyStr">{{
                                                            item.currencyStr }})</span>
                                                        <br>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <el-input size="mini" slot="reference" v-model="scope.row[item.prop]">
                                    </el-input>
                                </el-popover>
                            </div>
                            <div
                                v-else-if="item.prop == 'suite' || item.prop == 'jS_ES' || item.prop == 'sgr' || item.prop == 'tbr'">
                                <el-popover placement="top-start" title="酒店报批费用:" trigger="hover">
                                    <div>
                                        <span style="color:red;">*具体价格以当前货币汇率为准!</span><br />
                                        <div v-if="ShowHotel.length == 0">
                                            <br />
                                            <span style="color:red">暂无数据!</span>
                                        </div>
                                        <div v-else>
                                            <div v-for="(item, index) in ShowHotel" :key="index">
                                                {{ item.countryOrCity }} &nbsp;&nbsp; <span style="color:green;">{{
                                                    item.price }}</span>元/人
                                                <span v-if="item.currPrice">(<span style="color:green;">{{
                                                    item.currPrice }}</span> </span>
                                                <span v-if="item.currStr">{{
                                                    item.currStr }})</span>
                                                <br>
                                            </div>
                                        </div>
                                        <div>
                                            <div>
                                                <div v-if="ShowOther.length == 0">
                                                </div>
                                                <div v-else>
                                                    <div style="margin-top: 10px;"></div>
                                                    <div class="el-popover__title">三公经费-其它：</div>
                                                    <div v-for="(item, index) in ShowOther" :key="index">
                                                        {{ item.setDataType }} &nbsp;&nbsp; <span
                                                            style="color:green;">{{
                                                                item.subTotal }}</span>元/人
                                                        <span v-if="item.cost">(<span style="color:green;">{{
                                                            item.cost }}</span> </span>
                                                        <span v-if="item.currencyStr">{{
                                                            item.currencyStr }})</span>
                                                        <br>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <el-input size="mini" slot="reference" v-model="scope.row[item.prop]">
                                    </el-input>
                                </el-popover>
                            </div>
                            <span v-else :title="scope.row[item.prop]">
                                <el-input size="mini" v-model="scope.row[item.prop]">
                                </el-input></span>
                        </template>
                    </el-table-column>
                </template>
                <el-table-column class="czbtn" label="操作">
                    <!-- eslint-disable-next-line -->
                    <template slot-scope="scope">
                        <el-button class="czbtn" size="mini" @click="insertRow(scope.$index, scope.row, 'UP')"
                            type="primary">
                            插入行↑
                        </el-button>
                        <br />
                        <el-button class="czbtn" style="margin: 10px 0;" size="mini"
                            @click="handleDelete(scope.$index, scope.row, tableData)" type="danger">
                            删除<i class="el-icon-delete"></i>
                        </el-button>
                        <br />
                        <el-button class="czbtn" size="mini" @click="insertRow(scope.$index, scope.row, 'DOWN')"
                            type="primary">插入行↓
                        </el-button>
                    </template>
                </el-table-column>
            </el-table>
            <div style="text-align: center;padding: 10px 0;"><el-button @click="addStrip" type="primary">添 加 <i
                        class="el-icon-plus"></i></el-button></div>
            <div>
                <el-table :data="[{ a: 1 }]" border style="width: 100%;font-size:12px">
                    <el-table-column v-for="item in columnTotalData" :key="item.label"
                        :width="item.width != '100' ? columnWidth : item.width"
                        :label="item.tips ? item.tips + getCurr : ''"
                        v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
                        {{ item.totalPrice }}
                    </el-table-column>
                    <el-table-column class="czbtn">
                    </el-table-column>
                </el-table>
            </div>
            <div>
                <el-table :data="[{ a: 1 }]" border style="width: 100%;font-size:12px">
                    <el-table-column v-for="item in columnTotalData" :key="item.label"
                        :width="item.width != '100' ? columnWidth : item.width"
                        :label="item.singleTips ? item.singleTips + getCurr : ''"
                        v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
                        {{ item.singlePrice }}
                        <!-- <template slot="header">
                            <div>{{item.singleTips ? item.singleTips:''}}</div>
                            <div v-bind="getCurr">{{getCurr().toString}}</div>
                        </template> -->
                    </el-table-column>
                    <el-table-column class="czbtn">
                    </el-table-column>
                </el-table>
            </div>

            <div class="sheet-box">
                <div class="sheet-li">
                    <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项：</div>
                    <el-checkbox-group v-model="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues">
                        <el-checkbox v-for="(item, index) in sheetoneOptions" :key="index" :label="item"></el-checkbox>
                    </el-checkbox-group>
                    <div style="display: flex;font-size: 12px">
                        <div :style="{ 'width': costTypevalue == 'A' ? '100%' : '49%' }">
                            <div :style="{ 'width': costTypevalue == 'A' ? '50%' : '100%' }"
                                style="margin-bottom:0px;margin-top: 20px;"
                                v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes('签证') && visaCountryInfoArr.length > 0">

                                <el-table :data="visaCountryInfoArr" border style="width: 100%">
                                    <el-table-column prop="country" width="90" label="签证国家">
                                    </el-table-column>

                                    <el-table-column prop="largeVisaPrice" label="大公务签证费（元）">
                                    </el-table-column>
                                    <el-table-column prop="largeAgencyFee" label="大公务代办费（元）">
                                    </el-table-column>
                                    <el-table-column prop="isVisaExemptionLarge" label="大公务是否免签">
                                    </el-table-column>

                                    <el-table-column prop="smallVisaPrice" label="小公务签证费（元）">
                                    </el-table-column>
                                    <el-table-column prop="smallAgencyFee" label="小公务代办费（元）">
                                    </el-table-column>
                                    <el-table-column prop="isVisaExemptionSmall" label="小公务是否免签">
                                    </el-table-column>

                                    <el-table-column prop="yinsivalue" label="因私签证费【包含代办费】（元）">
                                    </el-table-column>
                                </el-table>

                            </div>
                            <div v-for="(sheetitem, index) in sheetDatal" :key="index">
                                <div class="biaoge" :class="{ 'biaogeKz': costTypevalue == 'B' }"
                                    v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes(sheetitem.label)">
                                    <el-table :data="[{ a: 1 }]" border style="width: 100%">
                                        <el-table-column v-for="(itemsheetone, index) in sheetitem.childList"
                                            :key="index" :prop="itemsheetone.prop" :label="itemsheetone.childLabel">
                                            <!-- eslint-disable-next-line -->
                                            <template slot-scope="scope">
                                                <div v-if="itemsheetone.prop.indexOf(sheetitem.EnLabel) != -1">
                                                    <div v-if="itemsheetone.isBind">
                                                        <span>{{ AGroupCostParameter[itemsheetone.prop] }}</span>
                                                    </div>
                                                    <div v-else>
                                                        <!-- <el-input v-model="AGroupCostParameter[itemsheetone.prop]"
                                                            show-word-limit /> -->
                                                        <!-- <el-input-number
                                                            v-model="AGroupCostParameter[itemsheetone.prop]"
                                                            @change="handleChange" :min="0" size="small"
                                                            :controls="false"></el-input-number> -->
                                                        <div v-if="itemsheetone.tips">
                                                            <el-popover placement="top-start"
                                                                :title="itemsheetone.title" width="200" trigger="hover">
                                                                <!-- :content="itemsheetone.tips" -->
                                                                <div v-if="itemsheetone.tips != '暂无！'">
                                                                    <span style="color:green">{{ itemsheetone.tips
                                                                    }}</span>
                                                                    元/人
                                                                </div>
                                                                <div v-else>
                                                                    <span style="color:red">{{ itemsheetone.tips
                                                                        }}</span>
                                                                </div>
                                                                <el-input-number slot="reference"
                                                                    v-model="AGroupCostParameter[itemsheetone.prop]"
                                                                    @change="handleChange" :min="0" size="small"
                                                                    :controls="false"></el-input-number>
                                                            </el-popover>
                                                        </div>
                                                        <div
                                                            v-else-if="(typeof itemsheetone.title).toString() != 'undefined'">
                                                            <el-popover placement="top-start"
                                                                :title="itemsheetone.title" width="200" trigger="hover">
                                                                <span style="color:red">暂无数据！</span>
                                                                <el-input-number slot="reference"
                                                                    v-model="AGroupCostParameter[itemsheetone.prop]"
                                                                    @change="handleChange" :min="0" size="small"
                                                                    :controls="false"></el-input-number>
                                                            </el-popover>
                                                        </div>
                                                        <div v-else>
                                                            <el-input-number
                                                                v-model="AGroupCostParameter[itemsheetone.prop]"
                                                                @change="handleChange" :min="0" size="small"
                                                                :controls="false"></el-input-number>

                                                        </div>
                                                    </div>
                                                </div>
                                                <div v-else-if="itemsheetone.prop === 'ZCB'">
                                                    {{ calculateZCB(sheetitem.EnLabel) }}
                                                </div>
                                                <div v-else-if="itemsheetone.prop === 'DRBJ'">
                                                    {{ calculateDRBJ(sheetitem.EnLabel) }}
                                                </div>
                                                <div v-else-if="itemsheetone.prop === 'ZBJ'">
                                                    {{ calculateZBJ(sheetitem.EnLabel) }}
                                                </div>
                                                <div v-else-if="itemsheetone.prop === 'DRLR'">
                                                    {{ calculateDRLR(sheetitem.EnLabel) }}
                                                </div>
                                                <div v-else-if="itemsheetone.prop === 'ZLR'">
                                                    {{ calculateZLR(sheetitem.EnLabel) }}
                                                </div>
                                                <!-- 绑定对象属性的值 -->
                                            </template>
                                        </el-table-column>
                                    </el-table>
                                </div>
                            </div>
                        </div>
                        <div style="width: 2%;" v-show="costTypevalue != 'A'"></div>
                        <div style="width: 49%;" v-show="costTypevalue != 'A'">

                            <div class="" style="width: 800px;margin-bottom:0px;margin-top: 20px;visibility: hidden;"
                                v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes('签证') && visaCountryInfoArr.length > 0">

                                <el-table :data="visaCountryInfoArr" border style="width: 100%">
                                    <el-table-column prop="country" label="签证国家">
                                    </el-table-column>
                                    <!-- <el-table-column prop="visaPrice" label="签证费用(元)">
                                    </el-table-column>
                                    <el-table-column prop="grandBusinessAgencyFee" label="大公务代办费(元)">
                                    </el-table-column>
                                    <el-table-column prop="pettyBusinessAgencyFee" label="小公务代办费(元)">
                                    </el-table-column> -->
                                    <el-table-column prop="isVisaExemption" label="是否免签">
                                    </el-table-column>
                                    <el-table-column prop="isVisaOnArrival" label="是否落地签">
                                    </el-table-column>
                                    <el-table-column prop="isElectronicSignature" label="是否电子签">
                                    </el-table-column>
                                    <el-table-column prop="visaTime" label="一般签证时间(天)">
                                    </el-table-column>
                                </el-table>

                            </div>
                            <div v-for="(sheetitem, index) in sheetDatal" :key="index">
                                <div class="biaogeB"
                                    v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes(sheetitem.label)">
                                    <el-table :data="[{ a: 1 }]" border style="width: 100%"
                                        :class="{ 'hiddenElement': (sheetitem.EnLabel == 'visa' || sheetitem.EnLabel == 'bx') ? true : false }">
                                        <el-table-column v-for="(itemsheetone, index) in sheetitem.childList"
                                            :key="index" :prop="itemsheetone.prop" :label="itemsheetone.childLabel">
                                            <!-- eslint-disable-next-line -->
                                            <template slot-scope="scope">
                                                <div v-if="itemsheetone.prop.indexOf(sheetitem.EnLabel) != -1">
                                                    <div v-if="itemsheetone.isBind">
                                                        <span>{{ BGroupCostParameter[itemsheetone.prop] }}</span>
                                                    </div>
                                                    <div v-else>
                                                        <!-- <el-input v-model="BGroupCostParameter[itemsheetone.prop]"
                                                            show-word-limit /> -->
                                                        <el-input-number
                                                            v-model="BGroupCostParameter[itemsheetone.prop]"
                                                            @change="handleChange" :min="0" size="small"
                                                            :controls="false"></el-input-number>
                                                    </div>
                                                </div>
                                                <div v-else-if="itemsheetone.prop === 'ZCB'">
                                                    {{ BcalculateZCB(sheetitem.EnLabel) }}
                                                </div>
                                                <div v-else-if="itemsheetone.prop === 'DRBJ'">
                                                    {{ BcalculateDRBJ(sheetitem.EnLabel) }}
                                                </div>
                                                <div v-else-if="itemsheetone.prop === 'ZBJ'">
                                                    {{ BcalculateZBJ(sheetitem.EnLabel) }}
                                                </div>
                                                <div v-else-if="itemsheetone.prop === 'DRLR'">
                                                    {{ BcalculateDRLR(sheetitem.EnLabel) }}
                                                </div>
                                                <div v-else-if="itemsheetone.prop === 'ZLR'">
                                                    {{ BcalculateZLR(sheetitem.EnLabel) }}
                                                </div>
                                                <!-- 绑定对象属性的值 -->
                                            </template>
                                        </el-table-column>
                                    </el-table>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="cabin-box">
                <div class="cabin-li">
                    <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项：</div>
                    <el-checkbox-group v-model="CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues">
                        <el-checkbox v-for="(item, index) in cabinoneOptions" :key="index" :label="item"></el-checkbox>
                    </el-checkbox-group>
                    <div style="display: flex;">
                        <div :style="{ 'width': costTypevalue == 'A' ? '100%' : '49%' }">
                            <div v-for="(cabinitem, index) in cabinDatal" :key="index">
                                <div class="biaoge"
                                    v-if="CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues.includes(cabinitem.label)">
                                    <div style="    color: rgb(96, 98, 102);font-size: 15px;font-weight: 600;">{{
                                        cabinitem.label }}
                                    </div>
                                    <el-table :data="cabinitem.sheetInfo" border style="width: 100%">
                                        <el-table-column v-for="(itemcabinone, index) in cabinitem.childList"
                                            :key="index" :prop="itemcabinone.prop" :label="itemcabinone.childLabel">
                                            <template slot-scope="scope">
                                                <div v-if="itemcabinone.prop === 'toll'">
                                                    <el-input size="small" :ref="'el-input-' + index"
                                                        v-model="scope.row[itemcabinone.prop]" show-word-limit
                                                        disabled />
                                                </div>
                                                <span
                                                    v-else-if="itemcabinone.prop === 'costPerson' || itemcabinone.prop === 'singleQuote'"
                                                    :title="scope.row[itemcabinone.prop]">
                                                    <span v-if="itemcabinone.prop === 'singleQuote'">
                                                        <span v-if="itemcabinone.tips">
                                                            <el-popover placement="top-start"
                                                                :title="itemcabinone.title" width="200" trigger="hover">
                                                                <span v-if="itemcabinone.tips != '暂无！'"
                                                                    style="color:green">{{ itemcabinone.tips
                                                                    }}元/人</span>
                                                                <span v-else style="color: red">暂无!</span>
                                                                <span slot="reference">{{ scope.row[itemcabinone.prop]
                                                                    }}</span>
                                                            </el-popover>
                                                        </span>
                                                        <span v-else>
                                                            <el-popover placement="top-start"
                                                                :title="itemcabinone.title" width="200" trigger="hover">
                                                                <span style="color: red">暂无!</span>
                                                                <span slot="reference">{{ scope.row[itemcabinone.prop]
                                                                    }}</span>
                                                            </el-popover>
                                                        </span>
                                                    </span>
                                                    <span v-else>{{ scope.row[itemcabinone.prop] }}</span>
                                                </span>
                                                <span v-else-if="itemcabinone.prop === 'totalCost'"
                                                    :title="scope.row[itemcabinone.prop]">{{
                                                        (scope.row['toll'] * scope.row['costPerson']).toFixed(2)
                                                    }}</span>
                                                <span v-else-if="itemcabinone.prop === 'totalQuote'"
                                                    :title="scope.row[itemcabinone.prop]">{{
                                                        (scope.row['toll'] * scope.row['singleQuote']).toFixed(2)
                                                    }}</span>
                                                <span v-else-if="itemcabinone.prop === 'singleProfit'"
                                                    :title="scope.row[itemcabinone.prop]">{{
                                                        ((scope.row['singleQuote'] - scope.row['costPerson'])).toFixed(2)
                                                    }}</span>
                                                <span v-else-if="itemcabinone.prop === 'totalProfit'"
                                                    :title="scope.row[itemcabinone.prop]">{{
                                                        ((scope.row['singleQuote'] - scope.row['costPerson']) *
                                                            scope.row['toll']).toFixed(2)
                                                    }}</span>
                                                <span v-else :title="scope.row[itemcabinone.prop]">{{
                                                    scope.row[itemcabinone.prop]
                                                    }}</span>

                                            </template>
                                        </el-table-column>
                                    </el-table>
                                </div>
                            </div>
                        </div>
                        <div style="width: 2%;" v-show="costTypevalue != 'A'"></div>
                        <div style="width: 49%;" v-show="costTypevalue != 'A'">
                            <div v-for="(cabinitem, index) in BcabinDatal" :key="index">
                                <div class="biaogeB"
                                    v-if="CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues.includes(cabinitem.label)">
                                    <div style="color: rgb(96, 98, 102);font-size: 15px;font-weight: 600;">{{
                                        cabinitem.label }}
                                    </div>
                                    <el-table :data="cabinitem.sheetInfo" border style="width: 100%">
                                        <el-table-column v-for="(itemcabinone, index) in cabinitem.childList"
                                            :key="index" :prop="itemcabinone.prop" :label="itemcabinone.childLabel">
                                            <template slot-scope="scope">
                                                <div v-if="itemcabinone.prop === 'toll'">
                                                    <el-input size="small" :ref="'el-input-' + index"
                                                        v-model="scope.row[itemcabinone.prop]" show-word-limit
                                                        disabled />
                                                </div>
                                                <span
                                                    v-else-if="itemcabinone.prop === 'costPerson' || itemcabinone.prop === 'singleQuote'"
                                                    :title="scope.row[itemcabinone.prop]">{{
                                                        scope.row[itemcabinone.prop]
                                                    }}</span>
                                                <span v-else-if="itemcabinone.prop === 'totalCost'"
                                                    :title="scope.row[itemcabinone.prop]">{{
                                                        (scope.row['toll'] * scope.row['costPerson']).toFixed(2)
                                                    }}</span>
                                                <span v-else-if="itemcabinone.prop === 'totalQuote'"
                                                    :title="scope.row[itemcabinone.prop]">{{
                                                        (scope.row['toll'] * scope.row['singleQuote']).toFixed(2)
                                                    }}</span>
                                                <span v-else-if="itemcabinone.prop === 'singleProfit'"
                                                    :title="scope.row[itemcabinone.prop]">{{
                                                        (scope.row['singleQuote'] - scope.row['costPerson']).toFixed(2)
                                                    }}</span>
                                                <span v-else-if="itemcabinone.prop === 'totalProfit'"
                                                    :title="scope.row[itemcabinone.prop]">{{
                                                        ((scope.row['singleQuote'] - scope.row['costPerson']) *
                                                            scope.row['toll']).toFixed(2)
                                                    }}</span>
                                                <span v-else :title="scope.row[itemcabinone.prop]">{{
                                                    scope.row[itemcabinone.prop]
                                                    }}</span>

                                            </template>
                                        </el-table-column>
                                    </el-table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <el-dialog :title="DialogTitle" :visible.sync="outerVisible" :width="'60%'" :close-on-click-modal="false"
            @close="dialogClose">
            <div>
                <div style="display: flex;">
                    <div style="width: 30%;">
                        <el-input v-model="dialogSearchInput" placeholder="请输入城市名称"></el-input>
                    </div>
                    <div style="width: 2%;"></div>
                    <!-- <div><el-button type="primary" @click="dialogSearchMethon">搜索</el-button></div> -->
                </div>
                <br />
                <el-table ref="singleTable" border @current-change="SelChange"
                    :data="filterdialogSearchInput.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
                    highlight-current-row style="width: 100%">
                    <el-table-column v-for="item, index in SeldialogColumn" :key="index" :prop="item.prop"
                        :label="item.title">
                        <template slot-scope="scope">
                            <div>
                                {{ scope.row[item.prop] }}
                            </div>
                        </template>
                    </el-table-column>
                </el-table>
                <div class="block">
                    <el-pagination align='center' @current-change="handleCurrentChange" :current-page="currentPage"
                        :page-sizes="[5, 10]" :page-size="pageSize" layout="total, sizes, prev, pager, next"
                        @size-change="handleSizeChange" :total="filterdialogSearchInput.length">
                    </el-pagination>
                </div>
            </div>
            <!-- <el-dialog width="30%" title="内层 Dialog" :visible.sync="innerVisible" append-to-body>
            </el-dialog> -->

            <!-- <div slot="footer" class="dialog-footer">
                <el-button @click="outerVisible = false">取 消</el-button>
                <el-button type="primary" @click="innerVisible = true">打开内层 Dialog</el-button>
            </div> -->

            <div slot="footer" class="dialog-footer">
                <el-button @click="outerVisible = false; dialogSelectObject = {}">取 消</el-button>
                <el-button type="primary" @click="confirm">确定</el-button>
            </div>
        </el-dialog>
    </div>
</template>
<script>
import { pinyin } from 'pinyin-pro';
export default {
    data() {
        return {
            costloading: true,
            outerVisible: false,
            innerVisible: false,
            //checkList: ['DAY', 'ITIN', 'VA', 'VF', 'VRD', 'T/G S', 'DATE'], //列表默认选中
            checkOptions: [
                { label: 'DAY', tips: '时间(DATE)' },
                { label: 'DATE', tips: '行程描述(ITINERARY)' },
                { label: 'ITIN', tips: '行程描述(ITINERARY)' },
                { label: 'VA', tips: '车服务区域(Vehicle Area)' },
                { label: 'VT', tips: '车型(VEHICLE TYPE)' },
                { label: 'VF', tips: '车费用(VEHICLE FEES)' },
                { label: 'VN', tips: '车数量(VEHICLE Number)' },
                { label: 'VRD', tips: '用车时间(VEHICLE RENTAL DURATION)' },
                { label: 'T/G S', tips: '导游工资(TOUR GUIDE SALARY)' },
                { label: 'T/G N', tips: '导游数量(TOUR GUIDE Number)' },
                { label: 'T/G WH', tips: '导游工作时间(导游工作时间)' },
                { label: 'T/G OF', tips: '导游超时费用(TOUR GUIDE OVERTIME FEES)' },
                { label: 'T/G M', tips: '导游餐补(TOUR GUIDE MEALS)' },
                { label: 'T/G A', tips: '导游房补(TOUR GUIDE ACCOMMODATION)' },
                { label: 'T/G TF', tips: '导游交通费(TOUR GUIDE TRANSPORATION FEES)' },
                { label: 'T/G EF', tips: '导游景点费(TOUR GUIDE ENTRANCE FEES)' },
                { label: 'C/F M', tips: '司机餐补(CHAUFFEUR MEALS)' },
                { label: 'C/F OF', tips: '司机超时费用(CHAUFFEUR OVERTIME FEES)' },
                { label: 'B', tips: '早餐(BREAKFAST) #个人成本' },
                { label: 'L', tips: '午餐(LUNCH) #个人成本' },
                { label: 'D', tips: '晚餐(DINNER) #个人成本' },
                { label: 'TBR', tips: '双人间(TWIN BED ROOM) #个人成本' },
                { label: 'SGR', tips: '单间(SINGLE ROOM) #个人成本' },
                { label: 'JS/ES', tips: '小套房/豪华套房(JUNIOR SUITE/EXECUTIVE SUITE) #个人成本' },
                { label: 'SUITE', tips: '套房(SUITE) #个人成本' },
                { label: 'ACCO N', tips: '住宿地名称(ACCOMMODATION NAME)' },
                //--------------------------------------------------
                { label: 'TV/N', tips: '公务场次' },
                { label: 'IF/N', tips: '翻译场次' },
                //-----------------------------------------------------
                { label: 'T/V', tips: '公务活动费用(T/V)' },
                { label: '1/L', tips: '公务活动费用(1/L)' },
                { label: 'I/F', tips: '公务翻译费用(INTERPRETER FEES)' },
                { label: 'EF', tips: '景点门票(ENTRANCE FEE) #个人成本' },
                { label: 'B/R/F', tips: '饮料零食水果(BEVERAGE/RRESHMENT/FRUIT)' },
                { label: 'TE', tips: '出行物资(TRAVELLLING ESSENTIALS) #个人成本' },
                { label: 'T/G T', tips: '导游小费(T/G TIPS) #个人成本' },
                { label: 'DRV T', tips: '司机小费(DRIVER TIPS #个人成本)' },
                { label: 'P/C', tips: '零用金(PETTY CASH) #个人成本' },
                { label: 'T/L F', tips: '领队费(TOUR LEADER FEES)' },
                { label: 'E/C T', tips: '会务费(EXPO/CONFERENCE TICKET)' }
            ],
            tableLabel: [
                { label: 'DAY', width: '50', prop: 'day', describe: '天数(DAY)' },
                { label: 'DATE', width: '100', prop: 'date', describe: '时间(DATE)' },
                { label: 'ITIN', width: '100', prop: 'itin', describe: '行程描述(ITINERARY)' },
                { label: 'VA', width: '100', prop: 'sale', describe: '车服务区域(Vehicle Area)' }, // ??????????????
                { label: 'VT', width: '100', prop: 'carType', describe: '车型(VEHICLE TYPE)' },
                { label: 'VF', width: '60', prop: 'carCost', describe: '车费用(VEHICLE FEES)' },
                { label: 'VN', width: '60', prop: 'carNumber', describe: '车数量(VEHICLE Number)' },
                { label: 'VRD', width: '60', prop: 'carTiming', describe: '用车时间(VEHICLE RENTAL DURATION)' },
                { label: 'T/G S', width: '60', prop: 'tgs', describe: '导游工资(TOUR GUIDE SALARY)' },
                { label: 'T/G N', width: '60', prop: 'tgn', describe: '导游数量(TOUR GUIDE Number' },
                { label: 'T/G WH', width: '60', prop: 'tgwh', describe: '导游工作时间(导游工作时间)' },
                { label: 'T/G OF', width: '60', prop: 'tgof', describe: '导游超时费用(TOUR GUIDE OVERTIME FEES)' },
                { label: 'T/G M', width: '60', prop: 'tgm', describe: '导游餐补(TOUR GUIDE MEALS)' },
                { label: 'T/G A', width: '60', prop: 'tga', describe: '导游房补(TOUR GUIDE ACCOMMODATION)' },
                { label: 'T/G TF', width: '60', prop: 'tgtf', describe: '导游交通费(TOUR GUIDE TRANSPORATION FEES)' },
                { label: 'T/G EF', width: '60', prop: 'tgef', describe: '导游景点费(TOUR GUIDE ENTRANCE FEES)' },
                { label: 'C/F M', width: '60', prop: 'cfm', describe: '司机餐补(CHAUFFEUR MEALS)' },
                { label: 'C/F OF', width: '60', prop: 'cfof', describe: '司机超时费用(CHAUFFEUR OVERTIME FEES)' },
                { label: 'B', width: '60', prop: 'b', describe: '早餐(BREAKFAST) #个人成本' },
                { label: 'L', width: '60', prop: 'l', describe: '午餐(LUNCH) #个人成本' },
                { label: 'D', width: '60', prop: 'd', describe: '晚餐(DINNER) #个人成本' },
                { label: 'TBR', width: '60', prop: 'tbr', describe: '双人间(TWIN BED ROOM) #个人成本' },
                { label: 'SGR', width: '60', prop: 'sgr', describe: '单间(SINGLE ROOM) #个人成本' },
                { label: 'JS/ES', width: '60', prop: 'jS_ES', describe: '小套房/豪华套房(JUNIOR SUITE/EXECUTIVE SUITE) #个人成本' },
                { label: 'SUITE', width: '60', prop: 'suite', describe: '套房(SUITE) #个人成本' },
                { label: 'ACCO N', width: '100', prop: 'accon', describe: '住宿地名称(ACCOMMODATION NAME)' },
                //--------------------------------------------------
                { label: 'TV/N', width: '60', prop: 'gwCount', describe: '公务场次' },
                { label: 'IF/N', width: '60', prop: 'fyCount', describe: '翻译场次' },
                //-----------------------------------------------------
                { label: 'T/V', width: '60', prop: 'tv', describe: '公务活动费用(T/V)' },
                { label: '1/L', width: '60', prop: 'iL', describe: '邀请函相关费用(1/L)' },
                { label: 'I/F', width: '60', prop: 'if', describe: '公务翻译费用(INTERPRETER FEES)' },
                { label: 'EF', width: '60', prop: 'ef', describe: '景点门票(ENTRANCE FEE) #个人成本' },
                //--------------------------------------------------
                { label: 'EFR', width: '100', prop: 'efr', describe: '景点门票详细信息 (ENTRANCE FEE REMARK)' },
                //-----------------------------------------------------
                { label: 'B/R/F', width: '60', prop: 'b_R_F', describe: '饮料零食水果(BEVERAGE/RRESHMENT/FRUIT)' },
                { label: 'TE', width: '60', prop: 'te', describe: '出行物资(TRAVELLLING ESSENTIALS) #个人成本' },
                { label: 'T/G T', width: '60', prop: 'tgTips', describe: '导游小费(T/G TIPS) #个人成本' },
                { label: 'DRV T', width: '60', prop: 'drvTips', describe: '司机小费(DRIVER TIPS #个人成本)' },
                { label: 'P/C', width: '60', prop: 'pc', describe: '零用金(PETTY CASH) #个人成本' },
                { label: 'T/L F', width: '60', prop: 'tlf', describe: '领队费(TOUR LEADER FEES)' },
                { label: 'E/C T', width: '60', prop: 'ect', describe: '会务费(EXPO/CONFERENCE TICKET)' }
            ],
            statisticsArr: [
                { label: 'DAY', total: '', individual: '' },
                { label: 'DATE', total: '', individual: '' },
                { label: 'ITIN', total: '', individual: '' },
                { label: 'VA', total: '', individual: '' },
                { label: 'VT', total: '', individual: '' },
                { label: 'VF', total: '车费', individual: '车费人均' },
                { label: 'VN', total: '', individual: '' },
                { label: 'VRD', total: '', individual: '' },
                { label: 'T/G S', total: '导游工资', individual: '导游工资人均' },
                { label: 'T/G N', total: '', individual: '' },
                { label: 'T/G WH', total: '', individual: '' },
                { label: 'T/G OF', total: '', individual: '' },
                { label: 'T/G M', total: '', individual: '' },
                { label: 'T/G A', total: '', individual: '' },
                { label: 'T/G TF', total: '', individual: '' }

            ],
            tableData: [], //列表数据
            options: [],
            diid: '',
            currencyOption: [],
            currencyValueL: 'CNY',
            formInline: {
                user: '',
                region: ''
            },
            //sheetoneList: ['签证', '机票', '核酸检测',],
            sheetoneOptions: ['签证', '保险', '机票', '火车票', '船票', '核酸检测', '酒店TBR', '酒店SGR', '酒店JSES', '酒店SUITE', '地接', '公务', '零用金'],
            sheetDatal: [
                {
                    label: '签证',
                    EnLabel: 'visa',
                    childList: [
                        {
                            childLabel: '签证单人成本(CNY)',
                            prop: 'visaCB',
                            tips: '这是一个tips',
                            title: '签证报批费用:'
                        },
                        {
                            childLabel: '人数',
                            prop: 'visaRS'
                        },
                        {
                            childLabel: '签证系数',
                            prop: 'visaXS'
                        },
                        {
                            childLabel: '签证总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '签证单人报价(CNY)',
                            prop: 'DRBJ'  // 系数 * 单价
                        },
                        {
                            childLabel: '签证总报价(CNY)',
                            prop: 'ZBJ'  // 系数 * 单价 * 人数
                        },
                        {
                            childLabel: '签证单人利润(CNY)',
                            prop: 'DRLR' //系数 * 单价 - 单价
                        },
                        {
                            childLabel: '签证总利润(CNY)',
                            prop: 'ZLR'  //（系数 * 单价 - 单价） * 人数
                        },
                    ],

                },
                {
                    label: '保险',
                    EnLabel: 'bx',
                    childList: [
                        {
                            childLabel: '保险单人成本(CNY)',
                            prop: 'bxcb',
                            title: '保险报批费用:',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '人数',
                            prop: 'bxrs'
                        },
                        {
                            childLabel: '保险系数',
                            prop: 'bxxs'
                        },
                        {
                            childLabel: '保险总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '保险单人报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '保险总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '保险单人利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '保险总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],

                },
                {
                    label: '火车票',
                    EnLabel: 'hcp',
                    childList: [
                        {
                            childLabel: '火车票单人成本(CNY)',
                            prop: 'hcpcb'
                        },
                        {
                            childLabel: '人数',
                            prop: 'hcprs'
                        },
                        {
                            childLabel: '火车票系数',
                            prop: 'hcpxs'
                        },
                        {
                            childLabel: '火车票总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '火车票单人报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '火车票总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '火车票单人利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '火车票总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],

                },
                {
                    label: '机票',
                    EnLabel: 'jjc',
                    childList: [
                        {
                            childLabel: '经济舱单人成本(CNY)',
                            prop: 'jjccb',
                            title: '经济舱报批费用:',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '人数',
                            prop: 'jjcrs'
                        },
                        {
                            childLabel: '经济舱系数',
                            prop: 'jjcxs'
                        },
                        {
                            childLabel: '经济舱总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '经济舱单人报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '经济舱总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '经济舱单人利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '经济舱总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],

                },
                {
                    label: '机票',
                    EnLabel: 'gwc',
                    childList: [
                        {
                            childLabel: '公务舱单人成本(CNY)',
                            prop: 'gwccb',
                            title: '公务舱报批费用:',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '人数',
                            prop: 'gwcrs'
                        },
                        {
                            childLabel: '公务舱系数',
                            prop: 'gwcxs'
                        },
                        {
                            childLabel: '公务舱总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '公务舱单人报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '公务舱总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '公务舱单人利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '公务舱总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],

                },
                {
                    label: '机票',
                    EnLabel: 'tdc',
                    childList: [
                        {
                            childLabel: '头等舱单人成本(CNY)',
                            prop: 'tdccb',
                            title: '头等舱报批费用:',
                            tips: '0',
                        },
                        {
                            childLabel: '人数',
                            prop: 'tdcrs'
                        },
                        {
                            childLabel: '头等舱系数',
                            prop: 'tdcxs'
                        },
                        {
                            childLabel: '头等舱总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '头等舱单人报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '头等舱总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '头等舱单人利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '头等舱总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],

                },
                {
                    label: '船票',
                    EnLabel: 'cp',
                    childList: [
                        {
                            childLabel: '船票单人成本(CNY)',
                            prop: 'cpcb'
                        },
                        {
                            childLabel: '人数',
                            prop: 'cprs'
                        },
                        {
                            childLabel: '船票系数',
                            prop: 'cpxs'
                        },
                        {
                            childLabel: '船票总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '船票单人报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '船票总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '船票单人利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '船票总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],

                },
                {
                    label: '核酸检测',
                    EnLabel: 'hs',
                    childList: [
                        {
                            childLabel: '核酸检测单人成本(CNY)',
                            prop: 'hscb',
                            title: '核酸检测报批费用:',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '人数',
                            prop: 'hsrs'
                        },
                        {
                            childLabel: '核酸检测系数',
                            prop: 'hsxs'
                        },
                        {
                            childLabel: '核酸检测总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '核酸检测单人报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '核酸检测总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '核酸检测单人利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '核酸检测总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],
                },
                //---
                {
                    label: '酒店TBR',
                    EnLabel: 'tbr',
                    childList: [
                        {
                            childLabel: '酒店TBR单间成本(CNY)',
                            prop: 'tbrcb',
                            isBind: true
                        },
                        {
                            childLabel: '间数',
                            prop: 'tbrNumber'
                        },
                        {
                            childLabel: '酒店TBR系数',
                            prop: 'tbrxs'
                        },
                        {
                            childLabel: '酒店TBR总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '酒店TBR单间报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '酒店TBR总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '酒店TBR单间利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '酒店TBR总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],
                },
                {
                    label: '酒店SGR',
                    EnLabel: 'sgr',
                    childList: [
                        {
                            childLabel: '酒店SGR单间成本(CNY)',
                            prop: 'sgrcb',
                            isBind: true
                        },
                        {
                            childLabel: '间数',
                            prop: 'sgrNumber'
                        },
                        {
                            childLabel: '酒店SGR系数',
                            prop: 'sgrxs'
                        },
                        {
                            childLabel: '酒店SGR总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '酒店SGR单间报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '酒店SGR总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '酒店SGR单间利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '酒店SGR总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],
                },
                {
                    label: '酒店JSES',
                    EnLabel: 'jses',
                    childList: [
                        {
                            childLabel: '酒店JSES单间成本(CNY)',
                            prop: 'jsescb',
                            isBind: true
                        },
                        {
                            childLabel: '间数',
                            prop: 'jsesNumber'
                        },
                        {
                            childLabel: '酒店JSES系数',
                            prop: 'jsesxs'
                        },
                        {
                            childLabel: '酒店JSES总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '酒店JSES单间报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '酒店JSES总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '酒店JSES单间利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '酒店JSES总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],
                },
                {
                    label: '酒店SUITE',
                    EnLabel: 'suite',
                    childList: [
                        {
                            childLabel: '酒店SUITE单间成本(CNY)',
                            prop: 'suitecb',
                            isBind: true
                        },
                        {
                            childLabel: '间数',
                            prop: 'suiteNumber'
                        },
                        {
                            childLabel: '酒店SUITE系数',
                            prop: 'suitexs'
                        },
                        {
                            childLabel: '酒店SUITE总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '酒店SUITE单间报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '酒店SUITE总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '酒店SUITE单间利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '酒店SUITE总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],
                },
                {
                    label: '地接',
                    EnLabel: 'dj',
                    childList: [
                        {
                            childLabel: '地接单人成本(CNY)',
                            prop: 'djcb',
                            isBind: true
                        },
                        {
                            childLabel: '人数',  //实体类无地接人数
                            prop: 'djrs'
                        },
                        {
                            childLabel: '地接系数',
                            prop: 'djxs'
                        },
                        {
                            childLabel: '地接总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '地接单人报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '地接总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '地接单人利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '地接总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],
                },
                {
                    label: '公务',
                    EnLabel: 'gw',
                    childList: [
                        {
                            childLabel: '公务单人成本(CNY)',
                            prop: 'gwcb',
                            isBind: true
                        },
                        {
                            childLabel: '人数',
                            prop: 'gwrs'
                        },
                        {
                            childLabel: '公务系数',
                            prop: 'gwxs'
                        },
                        {
                            childLabel: '公务总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '公务单人报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '公务总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '公务单人利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '公务总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],
                },
                {
                    label: '零用金',
                    EnLabel: 'lyj',
                    childList: [
                        {
                            childLabel: '零用金单人成本(CNY)',
                            prop: 'lyjcb',
                            isBind: true
                        },
                        {
                            childLabel: '人数',
                            prop: 'lyjrs'
                        },
                        {
                            childLabel: '零用金系数',
                            prop: 'lyjxs'
                        },
                        {
                            childLabel: '零用金总成本(CNY)',
                            prop: 'ZCB'
                        },
                        {
                            childLabel: '零用金单人报价(CNY)',
                            prop: 'DRBJ'
                        },
                        {
                            childLabel: '零用金总报价(CNY)',
                            prop: 'ZBJ'
                        },
                        {
                            childLabel: '零用金单人利润(CNY)',
                            prop: 'DRLR'
                        },
                        {
                            childLabel: '零用金总利润(CNY)',
                            prop: 'ZLR'
                        },
                    ],
                },

            ],
            //cabinoneList: ['经济舱 TBR', '经济舱 SGR', '核酸检测', '团组预算明细'],
            cabinoneOptions: ['经济舱 TBR', '经济舱 SGR', '公务舱 SGR', '公务舱 JS/ES', '公务舱 SUITE', '经济舱 SUITE', '头等舱 JS/ES', '头等舱 SUITE', '经济舱 JS/ES', "公务舱 TBR"],
            cabinDatal: [
                {
                    label: '经济舱 TBR',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人经济舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '经济舱 SGR',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人经济舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '公务舱 SGR',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人公务舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '公务舱 JS/ES',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人公务舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '公务舱 SUITE',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人公务舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                }
                ,
                {
                    label: '经济舱 SUITE',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人经济舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '头等舱 JS/ES',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人头等舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '头等舱 SUITE',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人头等舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '经济舱 JS/ES',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人经济舱总报价):',
                            tips: '0',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '公务舱 TBR',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人经济舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '团组预算明细',
                    childList: [
                        {
                            childLabel: '团组成本(CNY)',
                            prop: 'groupCosts'
                        },
                        {
                            childLabel: '团组报价(CNY)',
                            prop: 'gtroupQuotes'
                        },
                        {
                            childLabel: '团组利润(CNY)',
                            prop: 'groupProfit'
                        }
                    ],
                    sheetInfo: [
                        {
                            groupCosts: 1,
                            gtroupQuotes: 11,
                            groupProfit: 137597.76,
                        },
                    ]
                }
            ],
            BcabinDatal: [
                {
                    label: '经济舱 TBR',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人经济舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 0,
                            toll: 0,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '经济舱 SGR',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人经济舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '公务舱 SGR',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人公务舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '公务舱 JS/ES',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人公务舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '公务舱 SUITE',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人公务舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                }
                ,
                {
                    label: '经济舱 SUITE',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人经济舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '头等舱 JS/ES',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人头等舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '头等舱 SUITE',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人头等舱总报价):',
                            tips: '这是一个tips',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
                {
                    label: '经济舱 JS/ES',
                    childList: [
                        {
                            childLabel: '单人成本(CNY)',
                            prop: 'costPerson'
                        },
                        {
                            childLabel: '人数',
                            prop: 'toll'
                        },
                        {
                            childLabel: '总成本(CNY)',
                            prop: 'totalCost'
                        },
                        {
                            childLabel: '单人报价(CNY)',
                            prop: 'singleQuote',
                            title: '报批(单人经济舱总报价):',
                            tips: '0',
                        },
                        {
                            childLabel: '总报价(CNY)',
                            prop: 'totalQuote'
                        },
                        {
                            childLabel: '单人利润(CNY)',
                            prop: 'singleProfit'
                        },
                        {
                            childLabel: '总利润(CNY)',
                            prop: 'totalProfit'
                        },
                    ],
                    sheetInfo: [
                        {
                            costPerson: 1,
                            toll: 11,
                            totalCost: 137597.76,
                            singleQuote: 102203.71,
                            totalQuote: 35394.05,
                            singleProfit: 35394.05,
                            totalProfit: 35394.05
                        },
                    ]
                },
            ],
            costType: [
                {
                    value: 'A',
                    label: '单段模式'
                },
                {
                    value: 'B',
                    label: '双段模式'
                }
            ],
            userId: 0,
            token: '',
            costTypevalue: 'A',
            grouptitleinfo: {},
            costTypeHotelNumbers: [{
                "sgr": 0,
                "tbr": 0,
                "jses": 0,
                "suite": 0,
                "type": "Default",
                "diid": 0,
                id: 0,
            },
            {
                "sgr": 0,
                "tbr": 0,
                "jses": 0,
                "suite": 0,
                "type": "A",
                "diid": 0,
                id: 0,
            },
            {
                "sgr": 0,
                "tbr": 0,
                "jses": 0,
                "suite": 0,
                "type": "B",
                "diid": 0,
                id: 0,
            }],
            CheckBoxListSelect: [
                {
                    "diid": 0,
                    "cbType": "Top",
                    "cbValues": ['DAY', 'DATE', 'ITIN', 'VA', 'VT', 'VF', 'T/G S', 'T/G WH', 'C/F M', 'L', 'D', 'SGR', 'SUITE', 'ACCO N', 'T/V', 'EF', 'B/R/F', 'TE', 'P/C'] //"string"
                },
                {
                    "diid": 0,
                    "cbType": "Left",
                    "cbValues": ['签证', '机票', '保险', '地接', '公务', '零用金'] //"string"
                },
                {
                    "diid": 0,
                    "cbType": "Right",
                    "cbValues": ['公务舱 SGR', '经济舱 SGR', '团组预算明细'] //"string"
                }
            ],
            AGroupCostParameter: {
                "id": 0,
                "diId": 0,
                "currency": "CNY",
                "rate": 0,
                "tax": 0,
                "ffys": 0,
                "hotelXS": 0,
                "jjccb": 0,
                "jjcxs": 0,
                "jjcrs": 0,
                "gwccb": 0,
                "gwcxs": 0,
                "gwcrs": 0,
                "hcpcb": 0,
                "hcpxs": 0,
                "hcprs": 0,
                "cpcb": 0,
                "cpxs": 0,
                "cprs": 0,
                "bxcb": 0,
                "bxxs": 25,
                "bxrs": 0,
                "hscb": 0,
                "hsxs": 0,
                "hsrs": 0,
                "visaCB": 0,
                "visaXS": 0,
                "visaRS": 0,
                "gwcb": 0,
                "gwxs": 0,
                "gwrs": 0,
                "djcb": 0,
                "djrs": 0,
                "djxs": 0,
                "sgrcb": 0,
                "sgrNumber": 0,
                "sgrxs": 0,
                "tbrcb": 0,
                "tbrNumber": 0,
                "tbrxs": 0,
                "jsescb": 0,
                "jsesNumber": 0,
                "jsesxs": 0,
                "suitecb": 0,
                "suiteNumber": 0,
                "suitexs": 0,
                "lyjcb": 0,
                "lyjxs": 0,
                "lyjrs": 0,
                "isShare": 0,
                "costType": "A",
                "costTypeStartTime": "",
                "costTypeendTime": "",
                "costTypenumber": 0,
                "tdccb": 0,
                "tdcxs": 0,
                "tdcrs": 0
            },
            BGroupCostParameter: {
                "id": 0,
                "diId": 0,
                "currency": "",
                "rate": 0,
                "tax": 0,
                "ffys": 0,
                "hotelXS": 0,
                "jjccb": 0,
                "jjcxs": 0,
                "jjcrs": 0,
                "gwccb": 0,
                "gwcxs": 0,
                "gwcrs": 0,
                "hcpcb": 0,
                "hcpxs": 0,
                "hcprs": 0,
                "cpcb": 0,
                "cpxs": 0,
                "cprs": 0,
                "bxcb": 0,
                "bxxs": 25,
                "bxrs": 0,
                "hscb": 0,
                "hsxs": 0,
                "hsrs": 0,
                "visaCB": 0,
                "visaXS": 0,
                "visaRS": 0,
                "gwcb": 0,
                "gwxs": 0,
                "gwrs": 0,
                "djcb": 0,
                "djxs": 0,
                "djrs": 0,
                "sgrcb": 0,
                "sgrNumber": 0,
                "sgrxs": 0,
                "tbrcb": 0,
                "tbrNumber": 0,
                "tbrxs": 0,
                "jsescb": 0,
                "jsesNumber": 0,
                "jsesxs": 0,
                "suitecb": 0,
                "suiteNumber": 0,
                "suitexs": 0,
                "lyjcb": 0,
                "lyjxs": 0,
                "lyjrs": 0,
                "isShare": 0,
                "costType": "B",
                "costTypeStartTime": "",
                "costTypeendTime": "",
                "costTypenumber": 0,
                "tdccb": 0,
                "tdcxs": 0,
                "tdcrs": 0
            },
            dialogColumn: [
                {
                    index: 1, data: [
                        { title: "国家", prop: "country" },
                        { title: "城市", prop: "city" },
                        { title: "服务类型", prop: "serviceType" },
                        { title: "用车类型", prop: "carType" },
                        { title: "用车报价", prop: "offer" },
                        { title: "车兼导费用", prop: "cgCost" },
                        { title: "用车时长", prop: "runingTime" },
                        { title: "车超时费用/时", prop: "overtimeFee" },
                        { title: "司兼导超时费/时", prop: "cgOvertimeFee" },
                        { title: "币种", prop: "currency" },
                        { title: "备注", prop: "remark" }
                    ]
                },
                {
                    index: 2, data: [
                        { title: "国家", prop: "country" },
                        { title: "城市", prop: "city" },
                        { title: "导游服务类型", prop: "serviceType" },
                        { title: "导游工资", prop: "price" },
                        { title: "翻译工资", prop: "translationPrice" },
                        { title: "超时费用", prop: "overtimeFee" },
                        { title: "币种", prop: "currency" },
                        { title: "备注", prop: "remark" }
                    ]
                },
                {
                    index: 3, data: [
                        { title: "国家", prop: "country" },
                        { title: "城市", prop: "city" },
                        { title: "车类型", prop: "carType" },
                        { title: "服务类型", prop: "serviceType" },
                        { title: "用车时间", prop: "when" },
                        { title: "工资", prop: "price" },
                        { title: "超时费用", prop: "overtimeFee" },
                        { title: "币种", prop: "currency" },
                        { title: "备注", prop: "remark" }
                    ]
                },
                {
                    index: 4, data: [
                        { title: "国家", prop: "country" },
                        { title: "城市", prop: "city" },
                        { title: "景点", prop: "scenicSpot" },
                        { title: "景点项目描述", prop: "scenicSpotDetail" },
                        { title: "景点价格", prop: "price" },
                        { title: "币种", prop: "currency" },
                        { title: "景点地址", prop: "address" }
                    ]
                }
                //  司兼导
                //  导游
                //  车数据
                //  景点
            ],
            dialogTableData: [],
            SeldialogColumn: [],
            DialogTitle: '',
            pageSize: 5,
            currentPage: 1,
            dialogSearchInput: '',
            selectRow: {},
            rowIndex: 0,
            sumTopPrice: [],
            DJLables: ['VF', 'T/G S', 'T/G OF', 'T/G M', 'T/G A', 'T/G TF', 'T/G EF', 'C/F M', 'C/F OF', 'B', 'L', 'D', 'EF', 'B/R/F', 'TE', 'T/G T', 'DRV T', 'T/L F'],
            GwLables: ['T/V', 'E/C T', 'I/F', '1/L'],
            OtherCostProperty: ['visaCB', 'hcpcb', 'cpcb', 'bxcb', 'hscb', 'djcb', 'gwcb', 'lyjcb'],
            OtherCostPropertyBJ: ['visa', 'hcp', 'cp', 'bx', 'hs', 'dj', 'gw', 'lyj'],
            peopleNumber: 1,
            centerheight: 700,
            defaultheight: 50,
            rules: {
                rate: [
                    { pattern: /^-?\d+\.?\d*$/, message: '请输入正确数据', trigger: 'blur', required: true, }
                ],
                tax: [
                    { pattern: /^-?\d+\.?\d*$/, message: '请输入正确数据', trigger: 'blur', required: true, }
                ],
            },
            HotelRules: {
                sgr: [
                    { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
                ],
                tbr: [
                    { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
                ],
                suite: [
                    { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
                ],
                jses: [
                    { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
                ],
            },
            CostTimeRules: {
                costTypeendTime: [
                    { message: '请输入结束时间', trigger: 'blur', required: true, },
                ],
                costTypenumber: [
                    { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
                ],
                costTypeStartTime: [
                    { message: '请输入开始时间', trigger: 'blur', required: true, },
                ],
            },
            titleText: [],
            vehicleLables: ['VF', 'T/G OF', 'T/G S', 'T/G TF', 'C/F OF'],
            DJMeal: ['B', 'L', 'D'],
            SubsidizedMeals: ['T/G M', 'C/F M'],
            NightRepair: ['T/G A'],
            AttractionsTickets: ['T/G EF', 'EF'],
            MiscellaneousFees: ['B/R/F', 'TE', 'T/L F'],
            ATip: ['T/G T', 'DRV T'],
            visaCountryInfoArr: [],
            equalWhere: [
                { "Visa": "visa" },
                { "HeSuan": "hs" },
                { "Insurance": "bx" },
                { "JJC": "jjc" },
                { "GWC": "gwc" },
                { "TDC": "tdc" }
            ],
            ShowBaoPi: [

            ],
            dialogSelectObject: {

            },
            columnTotalData: [
                {
                    "label": "DAY",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 50,
                },
                {
                    "label": "DATE",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 100,
                },
                {
                    "label": "ITIN",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 100,
                },
                {
                    "label": "VA",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 100,
                },
                {
                    "label": "VT",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 100,
                },
                {
                    "label": "VF",
                    "tips": "车费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "车费用人均\n",
                    "width": 60,
                },
                {
                    "label": "VN",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 60,
                },
                {
                    "label": "VRD",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 60,
                },
                {
                    "label": "T/G S",
                    "tips": "导游工资\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "导游工资人均\n",
                    "width": 60,
                },
                {
                    "label": "T/G N",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 60,
                },
                {
                    "label": "T/G WH",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 60,
                },
                {
                    "label": "T/G OF",
                    "tips": "导游超时费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "导游超时费用人均\n",
                    "width": 60,
                },
                {
                    "label": "T/G M",
                    "tips": "导游餐补\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "导游餐补人均\n",
                    "width": 60,
                },
                {
                    "label": "T/G A",
                    "tips": "导游房补\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "导游房补人均\n",
                    "width": 60,
                },
                {
                    "label": "T/G TF",
                    "tips": "导游交通费\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "导游交通费人均\n",
                    "width": 60,
                },
                {
                    "label": "T/G EF",
                    "tips": "导游景点费\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "导游景点费人均\n",
                    "width": 60,
                },
                {
                    "label": "C/F M",
                    "tips": "司机餐补\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "司机餐补人均\n",
                    "width": 60,
                },
                {
                    "label": "C/F OF",
                    "tips": "司机超时费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "司机超时费用人均\n",
                    "width": 60,
                },
                {
                    "label": "B",
                    "tips": "早餐费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "早餐费用人均\n",
                    "width": 60,
                },
                {
                    "label": "L",
                    "tips": "午餐费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "午餐费用人均\n",
                    "width": 60,
                },
                {
                    "label": "D",
                    "tips": "晚餐费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "晚餐费用人均\n",
                    "width": 60,
                },
                {
                    "label": "TBR",
                    "tips": "双人间费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "双人间费用人均\n",
                    "width": 60,
                },
                {
                    "label": "SGR",
                    "tips": "单间费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "单间费用人均\n",
                    "width": 60,
                },
                {
                    "label": "JS/ES",
                    "tips": "小套房/豪华套房费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "小套房/豪华套房费用人均\n",
                    "width": 60,
                },
                {
                    "label": "SUITE",
                    "tips": "套房费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "套房费用人均\n",
                    "width": 60,
                },
                {
                    "label": "ACCO N",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 100,
                },
                {
                    "label": "TV/N",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 60,
                },
                {
                    "label": "IF/N",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 60,
                },
                {
                    "label": "T/V",
                    "tips": "公务活动费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "公务活动费用人均\n",
                    "width": 60,
                },
                {
                    "label": "1/L",
                    "tips": "公务活动费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "公务活动费用人均\n",
                    "width": 60,
                },
                {
                    "label": "I/F",
                    "tips": "公务翻译费用\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "公务翻译费用人均\n",
                    "width": 60,
                },
                {
                    "label": "EF",
                    "tips": "景点门票\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "景点门票人均\n",
                    "width": 60,
                },
                {
                    "label": "EFR",
                    "tips": "",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "",
                    "width": 100,
                },
                {
                    "label": "B/R/F",
                    "tips": "饮料零食水果\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "饮料零食水果人均\n",
                    "width": 60,
                },
                {
                    "label": "TE",
                    "tips": "出行物资\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "出行物资人均\n",
                    "width": 60,
                },
                {
                    "label": "T/G T",
                    "tips": "导游小费\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "导游小费人均\n",
                    "width": 60,
                },
                {
                    "label": "DRV T",
                    "tips": "司机小费\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "司机小费人均\n",
                    "width": 60,
                },
                {
                    "label": "P/C",
                    "tips": "零用金\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "零用金人均\n",
                    "width": 60,
                },
                {
                    "label": "T/L F",
                    "tips": "领队费\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "领队费人均\n",
                    "width": 60,
                },
                {
                    "label": "E/C T",
                    "tips": "会务费\n",
                    "totalPrice": 0,
                    "singlePrice": 0,
                    "singleTips": "会务费人均\n",
                    "width": 60,
                }
            ],
            autoSave: null,
            acconarr: [],
            acconarrs: [],
            isShare: 0,
            blackCodeIsTrue: false,
            dialogTableVisible: false,
            gridData: [],
            //监听变量
            //count: 0,
            x: 0,
            y: 0,
            tableDatas: [],
            dialogTableVisibleXJ: false,
            checkboxsXJ: [],
            historyCarInput: '',
            historyCarDialog: false,
            historyCarData: [],
            // {
            //         "value": "id",
            //         "label": ""
            //     },
            historyCarCloumns: [
                {
                    "value": "teamName",
                    "label": "团组名称"
                },
                {
                    "value": "start",
                    "label": "开始时间"
                },
                {
                    "value": "end",
                    "label": "结束时间"
                },
                {
                    "value": "area",
                    "label": "地区"
                },

                {
                    "value": "price",
                    "label": "总价格"
                },
                {
                    "value": "dayPrice",
                    "label": "单日价格"
                },
                {
                    "value": "priceName",
                    "label": "费用名称"
                },
                {
                    "value": "priceContent",
                    "label": "费用明细"
                },
                {
                    "value": "datePrice",
                    "label": "费用准确日期"
                }
            ],
            historyCarSelectObject: {},
            historyCarIndex: -1,
            hotelIsTrue: false,
            rollcallarr: [],
            blackCodeListSeLect: [],
            blackCodeSelect: '',
            selectLoading: false,
            dialogCopyVisible: false,
            dialogCopySelect: '',
            showEditGroupInfoDialog: false,
            groupInfoRules: {
                visitDate: [
                    { required: true, message: '请选择日期', trigger: 'blur' }
                ],
                visitPNumber: [
                    { required: true, message: '请输入人数', trigger: 'blur' },
                    { type: 'integer', message: '人数必须为整数', trigger: 'blur' },
                ],
                visitDays: [
                    { required: true, message: '请输入天数', trigger: 'blur' },
                    { type: 'integer', message: '访问天数必须为整数', trigger: 'blur' },
                ]
            },
            groupInfoEditData: {
                visitDate: '',
                visitPNumber: 0,
                visitDays: 0
            },
            excludeGroupList: [2836],
            groupModuleOperators: [],
            hideGroupModuleId: [98],
            groupcostXSVisible: false,
            groupcostXSList: [],
        };
    },
    watch: {
        costTypeHotelNumbers: {
            handler(val) {
                for (var i = 0; i < val.length; i++) {
                    ////console.log(val[i]);
                    if (val[i].tbr == '') {
                        val[i].tbr = 0
                    }
                    if (val[i].sgr == '') {
                        val[i].sgr = 0
                    }
                    if (val[i].jses == '') {
                        val[i].jses = 0
                    }
                    if (val[i].suite == '') {
                        val[i].suite = 0
                    }
                }
            },
            deep: true
        },
        'tableData.length': {
            handler(newValue, oldValue) {
                if (newValue !== oldValue) {
                    if (this.tableData.length > 3) {
                        this.centerheight = 700;
                    } else {
                        this.centerheight = this.defaultheight + (this.tableData.length * 230) - ((this.tableData.length - 1) * 50);
                    }
                    ////////console.log('高度' + this.centerheight);
                }
            }
        }

    },
    methods: {
        capslk(val, index) {
            this.tableData[index].itin = val.toUpperCase()
        },
        acconblur(index) {
            setTimeout(() => {
                document.querySelectorAll('.accon-ul')[index].classList.remove('accons-ul')
            }, 150)
        },
        acconinput(val, index) {
            this.acconarr = [];
            this.acconarrs = [];
            ////console.log(val);
            ////console.log(index);
            for (var i = 0; i < this.tableData.length; i++) {
                this.acconarr.push(this.tableData[i].accon)
            }
            for (var j = 0; j < this.acconarr.length; j++) {
                if (this.acconarr[j].includes(val)) {
                    this.acconarrs.push(this.acconarr[j])
                }
            }
            this.acconarrs = Array.from(new Set(this.acconarrs));
            ////console.log(this.acconarrs)
            document.querySelectorAll('.accon-ul')[index].classList.add('accons-ul')
        },
        acconclick(val, index) {
            this.tableData[index].accon = val;
        },
        getSummaries(param) {
            var that = this;
            //////console.log(param)
            const { columns, data } = param;
            const sums = [];
            const sums1 = [];
            const texts = [];
            var prices = [];
            var BUpdate = []
            var thisData = data;
            var ATime = { start: that.addOneDay(that.AGroupCostParameter.costTypeStartTime, 0), end: that.addOneDay(that.AGroupCostParameter.costTypeendTime, 0) };
            var BTime = { start: that.addOneDay(that.BGroupCostParameter.costTypeStartTime, 0), end: that.addOneDay(that.BGroupCostParameter.costTypeendTime, 0) };

            ////////console.log('ATime,BTime', ATime, BTime);
            var data1 = [];
            var data2 = [];

            ////////console.log('datas', data);

            if (that.costTypevalue == 'B') {
                for (var i = 0; i < thisData.length; i++) {
                    var forTime = thisData[i].date;
                    if (forTime == '' && i != 0) {
                        forTime = thisData[i - 1].date;
                    }
                    if (forTime) {
                        forTime = new Date(forTime).getTime();
                    }
                    if (forTime >= new Date(ATime.start).getTime() && forTime <= new Date(ATime.end).getTime()) {
                        data1.push(thisData[i])
                    }
                    if (forTime >= new Date(BTime.start).getTime() && forTime <= new Date(BTime.end).getTime()) {
                        data2.push(thisData[i])
                    }
                }
                thisData = data1;
                if (isNaN(Number(that.AGroupCostParameter.costTypenumber)) || Number(that.AGroupCostParameter.costTypenumber) < 1) {
                    that.peopleNumber = 1;
                } else {
                    that.peopleNumber = Number(that.AGroupCostParameter.costTypenumber);
                }
            }
            //////console.log('3data', thisData, data1, data2);
            columns.forEach((column, index) => {
                if (index === 0) {
                    prices[index] = "总计:";
                    that.lableSetPrice(column.label, '', '');
                    return;
                }
                if (column.label == 'DATE' || column.label == 'ITIN' || column.label == 'VT' || column.label == 'VN' || column.label == 'ACCO N' || column.label == 'VA' || column.label == 'VRD' || column.label == 'T/G N' || column.label == 'T/G WH' || column.label == '操作' || column.label == 'TV/N' || column.label == 'IF/N' || column.label == 'EFR') {
                    prices[index] = "——";
                    that.lableSetPrice(column.label, '', '');
                    return;
                }
                const values = thisData.map(item => Number(item[column.property]));
                if (!values.every(value => isNaN(value))) {
                    sums[index] = values.reduce((prev, curr) => {
                        const value = Number(curr);
                        if (!isNaN(value)) {
                            return prev + curr;
                        } else {
                            return prev;
                        }

                    }, 0);

                    if (column.label == 'B' || column.label == 'L' || column.label == 'D' || column.label == 'EF' || column.label == 'TE' || column.label == 'T/G T' || column.label == 'P/C' || column.label == 'DRV T' || column.label == 'DRV T') {
                        that.lableSetPrice(column.label, (sums[index] * that.peopleNumber).toFixed(2), (sums[index]).toFixed(2));
                        prices[index] = '共' + (sums[index] * that.peopleNumber).toFixed(2) + ' ' + this.getCurr + '\r\n人均' + (sums[index]).toFixed(2) + " " + this.getCurr; //sums[index] + '(' + this.getCurr + ')' + '  人均(' + sums[index] + ')';
                    }
                    else if (column.label == 'SGR' || column.label == 'JS/ES' || column.label == 'SUITE' || column.label == 'TBR') {
                        if (column.label == 'TBR') {
                            that.lableSetPrice(column.label, (sums[index]).toFixed(2), (sums[index] / 2).toFixed(2));
                            prices[index] = '共' + (sums[index]).toFixed(2) + ' ' + this.getCurr + '\r\n人均' + (sums[index] / 2).toFixed(2) + " " + this.getCurr;
                        } else {
                            that.lableSetPrice(column.label, (sums[index]).toFixed(2), (sums[index]).toFixed(2));
                            prices[index] = '共' + (sums[index]).toFixed(2) + ' ' + this.getCurr + '\r\n人均' + (sums[index]).toFixed(2) + " " + this.getCurr;
                        }
                    }
                    else {
                        that.lableSetPrice(column.label, sums[index].toFixed(2), (sums[index] / that.peopleNumber).toFixed(2));
                        prices[index] = '共' + sums[index].toFixed(2) + ' ' + this.getCurr + '\r\n人均' + (sums[index] / that.peopleNumber).toFixed(2) + " " + this.getCurr;//sums[index] + '(' + this.getCurr + ')' + '  人均(' + sums[index] + ')';
                        sums[index] = parseFloat((sums[index] / that.peopleNumber).toFixed(2));
                    }

                } else {
                    prices[index] = 'N/A';
                }

                if (that.costTypevalue == 'B') {

                    const values1 = data2.map(item => Number(item[column.property]));
                    if (!values1.every(value => isNaN(value))) {
                        sums1[index] = values1.reduce((prev, curr) => {
                            const value = Number(curr);
                            if (!isNaN(value)) {
                                return prev + curr;
                            } else {
                                return prev;
                            }
                        }, 0);

                        if (column.label == 'B' || column.label == 'L' || column.label == 'D' || column.label == 'EF' || column.label == 'TE' || column.label == 'T/G T' || column.label == 'P/C' || column.label == 'DRV T' || column.label == 'DRV T') {
                            BUpdate.push({ label: column.label, total: (sums1[index] * that.BGroupCostParameter.costTypenumber).toFixed(2), single: (sums1[index]).toFixed(2) });
                            prices[index] = 'A段费用' + prices[index] + '\r\nB段费用共' + (sums1[index] * that.BGroupCostParameter.costTypenumber).toFixed(2) + " " + this.getCurr + '\r\n人均' + (sums1[index]).toFixed(2) + " " + this.getCurr //sums[index] + '(' + this.getCurr + ')' + '  人均(' + sums[index] + ')';
                        }
                        else if (column.label == 'SGR' || column.label == 'JS/ES' || column.label == 'SUITE' || column.label == 'TBR') {
                            if (column.label == 'TBR') {
                                BUpdate.push({ label: column.label, total: (sums1[index]).toFixed(2), single: (sums1[index] / 2).toFixed(2) });
                                prices[index] = 'A段费用' + prices[index] + '\r\nB段费用共' + (sums1[index]).toFixed(2) + " " + this.getCurr + '\r\n人均' + (sums1[index] / 2).toFixed(2) + " " + this.getCurr //sums[index] + '(' + this.getCurr + ')' + '  人均(' + sums[index] + ')';
                            } else {
                                BUpdate.push({ label: column.label, total: (sums1[index]).toFixed(2), single: (sums1[index]).toFixed(2) });
                                prices[index] = 'A段费用' + prices[index] + '\r\nB段费用共' + (sums1[index]).toFixed(2) + " " + this.getCurr + '\r\n人均' + (sums1[index]).toFixed(2) + " " + this.getCurr //sums[index] + '(' + this.getCurr + ')' + '  人均(' + sums[index] + ')';
                            }
                        }
                        else {
                            BUpdate.push({ label: column.label, total: sums1[index].toFixed(2), single: (sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2) });
                            prices[index] = 'A段费用' + prices[index] + '\r\nB段费用共' + sums1[index].toFixed(2) + " " + this.getCurr + '\r\n人均' + (sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2) + " " + this.getCurr //sums[index] + '(' + this.getCurr + ')' + '  人均(' + sums[index] + ')';
                            sums1[index] = ((sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2));
                        }

                    } else {
                        prices[index] = 'A段费用' + prices[index] + '  B段费用' + 'N/A';
                    }
                }

                var fliterList = that.sumTopPrice.filter(function (x) {
                    return x.name == column.property;
                })

                if (fliterList.length == 0) {
                    that.sumTopPrice.push({ name: column.property, label: column.label, Aprice: sums[index], Bprice: sums1[index] == undefined ? 0 : sums1[index] });
                } else {
                    fliterList[0].Aprice = sums[index];
                    fliterList[0].Bprice = sums1[index] == undefined ? 0 : sums1[index];
                }

                var TextfliterList = texts.filter(function (x) {
                    return x.label == column.label;
                })

                var text = prices[index];
                if (TextfliterList.length == 0) {
                    texts.push({ label: column.label, text: text });
                } else {
                    TextfliterList[0].text = text;
                }
            });
            this.titleText = texts;
            ////////console.log(that.sumTopPrice, 'sumTopPrice---------------');
            this.CalculatedPrice();
            //////////console.log(that.sumTopPrice, '------------');
            setTimeout(() => {
                this.setLastTitle(prices);
                if (that.costTypevalue == 'B') {
                    //遍历bupdate
                    BUpdate.forEach(function (item) {
                        that.BlableSetPrice(item.label, item.total, item.single);
                    })
                }

            }, 600);

            return prices;
        },
        handleEdit(index, row, buttonIndex) {
            //////////console.log(index, row, buttonIndex);
            this.rowIndex = index; // 行的索引
            var api = '';
            switch (buttonIndex) {
                case 1:
                    api = 'GetCarGuides';
                    this.DialogTitle = '选择车导数据';
                    break;
                case 2:
                    api = 'GetGuidesInfo';
                    this.DialogTitle = '导游信息';
                    break;
                case 3:
                    api = 'GetCarInfo';
                    this.DialogTitle = '选择车数据';
                    break;
                case 4:
                    api = 'GetScenicSpotInfo';
                    this.DialogTitle = '景点信息';
                    break;
            }

            if (api == '') {
                this.$message.error('程序异常！');
                return;
            }

            this.dialogSearchInput = this.grouptitleinfo.visitCountry;

            var dataC = this.dialogColumn.filter(x => x.index == buttonIndex);
            if (dataC.length == 0) {
                this.SeldialogColumn = [];
            } else {
                this.SeldialogColumn = dataC[0].data;
            }

            var that = this;
            this.$axios.post('/api/Groups/' + api, {}, {
                headers: {
                    'Authorization': that.token,
                }
            }).then(resp => {
                ////////console.log(resp.data.data, '------------------------------------');
                that.outerVisible = true;
                if (resp.data.code == 200) {
                    that.dialogTableData = resp.data.data;
                } else {
                    that.$message.error('获取数据失败！' + resp.data.msg);
                }
            })


        },
        handleDelete(index, row, rows) {
            ////////console.log(index, row, rows);
            this.$confirm('此操作将删除该条信息, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                this.$message({
                    message: '已删除',
                    type: 'success',
                    offset: 50
                });
                rows.splice(index, 1);
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: '已取消删除'
                });
            });
        },
        //减
        increase(val) {
            ////console.log(this.tableData[val]);
            if (this.tableData[val].day == "-") {
                this.tableData[val].day = 0
            }
            if (this.tableData[val].day <= 1) {
                return
            }
            this.tableData[val].day--
            this.NumberSetTime(this.tableData[val].day, val)
        },
        //加
        decrease(val) {
            if (this.tableData[val].day == "-") {
                this.tableData[val].day = 0
            }
            this.tableData[val].day++
            this.NumberSetTime(this.tableData[val].day, val)
        },
        addStrip() {
            var souerLength = this.tableData.length - 1;
            var dataStr = "";
            var day = '-';
            if (souerLength >= 0) {
                dataStr = this.tableData[souerLength].date;
                dataStr = this.addOneDay(dataStr, 1);
                var getDay = this.tableData[souerLength].day;
                if (getDay) {
                    day = parseInt(getDay) + 1;
                } else {
                    try {
                        day = parseInt(this.tableData[souerLength - 1].day) + 1;
                        dataStr = this.addOneDay(this.tableData[souerLength - 1].date, 1)
                    } catch (e) {
                        dataStr = "";
                        day = '-';
                    }
                }
            }

            this.tableData.push(
                {
                    "diid": this.diid,
                    "day": day,
                    "date": dataStr,
                    "itin": "",
                    "carType": "",
                    "carCost": "",
                    "carNumber": "",
                    "carTiming": "",
                    "tgs": "",
                    "tgwh": "",
                    "tgn": "",
                    "tgof": "",
                    "tgm": "",
                    "tga": "",
                    "tgtf": "",
                    "tgef": "",
                    "cfs": "",
                    "cfm": "",
                    "cfof": "",
                    "b": "",
                    "l": "",
                    "d": "",
                    "tbr": "",
                    "sgr": "",
                    "jS_ES": "",
                    "suite": "",
                    "accon": "",
                    "tv": "",
                    "iL": "",
                    "if": "",
                    "ef": "",
                    "b_R_F": "",
                    "te": "",
                    "tgTips": "",
                    "drvTips": "",
                    "pc": "",
                    "tlf": "",
                    "ect": "",
                    "id": 1,
                    "gwCount": "",
                    "fyCount": "",
                    "efr": "",
                }
            )
        },
        loadData(id) {
            this.costloading = true;
            this.tableData = [];
            var that = this;
            this.$axios.post('/api/Groups/GroupCostInit', {
                Diid: id
            }, {
                headers: {
                    'Authorization': that.token,
                }
            }).then(resp => {
                setTimeout(() => {
                    that.PostTourClientListByDiId(id);
                }, 1000)
                ////////console.log(resp.data.data, '------------------------------------');
                if (resp.data.code == 200) {

                    that.options = resp.data.data.groupList;
                    that.grouptitleinfo = resp.data.data.groupInfo.data;
                    that.diid = that.grouptitleinfo.id;
                    localStorage.setItem('costLoadData', JSON.stringify({
                        diid: that.diid
                    }))

                    setTimeout(() => {
                        that.QueryRate();
                    }, 500)

                    for (var i = 0; i < that.CheckBoxListSelect.length; i++) {
                        that.CheckBoxListSelect[i].diid = that.diid;
                    }

                    if (resp.data.data.groupChecks.length > 0) {
                        resp.data.data.groupChecks.forEach(item => {
                            for (var i = 0; i < that.CheckBoxListSelect.length; i++) {
                                if (item.cbType == that.CheckBoxListSelect[i].cbType) {
                                    that.CheckBoxListSelect[i].cbValues = item.cbValues.split(',');
                                    ////////console.log(item.cbValues.split(','));
                                    break;
                                }
                                if (that.CheckBoxListSelect[i].diid == 0) {
                                    that.CheckBoxListSelect[i].diid = that.diid;
                                }
                            }
                        })
                    } else {
                        that.CheckBoxListSelect = [
                            {
                                "diid": that.diid,
                                "cbType": "Top",
                                "cbValues": ['DAY', 'DATE', 'ITIN', 'VA', 'VT', 'VF', 'T/G S', 'T/G WH', 'C/F M', 'L', 'D', 'SGR', 'SUITE', 'ACCO N', 'T/V', 'EF', 'EFR', 'B/R/F', 'TE', 'P/C'] //"string"
                            },
                            {
                                "diid": that.diid,
                                "cbType": "Left",
                                "cbValues": ['签证', '机票', '保险', '地接', '公务', '零用金'] //"string"
                            },
                            {
                                "diid": that.diid,
                                "cbType": "Right",
                                "cbValues": ['公务舱 SGR', '经济舱 SGR', '团组预算明细'] //"string"
                            }
                        ]
                    }

                    that.CheckBoxListSelect.forEach(x => {
                        if (x.cbType == 'Top') {
                            if (x.cbValues.includes("EF") && !x.cbValues.includes("EFR")) {
                                x.cbValues.push("EFR");
                            }
                        }
                    });

                    that.grouptitleinfo.visitStartDate = that.grouptitleinfo.visitStartDate.split(' ')[0];
                    that.grouptitleinfo.visitEndDate = that.grouptitleinfo.visitEndDate.split(' ')[0];
                    that.peopleNumber = that.grouptitleinfo.visitPNumber > 0 ? that.grouptitleinfo.visitPNumber : 1;

                    if (resp.data.data.groupCost.length > 0) {
                        that.tableData = resp.data.data.groupCost;
                        ////console.log(that.tableData);
                        for (var i = 0; i < that.tableData.length; i++) {
                            for (var prop in that.tableData[i]) {
                                ////console.log(that.tableData[i][prop]);
                                if (that.tableData[i][prop] == 0) {
                                    that.tableData[i][prop] = ''
                                }
                            }
                        }
                    } else {
                        that.tableData = [
                            {
                                "diid": that.diid,
                                "day": "-",
                                "date": "",
                                "itin": "",
                                "carType": "",
                                "carCost": "",
                                "carNumber": "",
                                "carTiming": "",
                                "tgs": "",
                                "tgwh": "",
                                "tgn": "",
                                "tgof": "",
                                "tgm": "",
                                "tga": "",
                                "tgtf": "",
                                "tgef": "",
                                "cfs": "",
                                "cfm": "",
                                "cfof": "",
                                "b": "",
                                "l": "",
                                "d": "",
                                "tbr": "",
                                "sgr": "",
                                "jS_ES": "",
                                "suite": "",
                                "accon": "",
                                "tv": "",
                                "iL": "",
                                "if": "",
                                "ef": "",
                                "b_R_F": "",
                                "te": "",
                                "tgTips": "",
                                "drvTips": "",
                                "pc": "",
                                "tlf": "",
                                "ect": "",
                                "id": 1,
                                "gwCount": "",
                                "fyCount": "",
                                "efr": "",
                            }
                        ]
                    }

                    if (resp.data.data.groupCostParameter.length > 0) {
                        var acostvalue = resp.data.data.groupCostParameter.filter(x => x.costType == 'A')[0];
                        if (acostvalue != undefined) {
                            that.AGroupCostParameter = acostvalue;
                            that.isShare = that.AGroupCostParameter.isShare;//是否通知
                            ////console.log(that.AGroupCostParameter)
                            var result = Number(that.AGroupCostParameter.currency);
                            if (isNaN(result)) {

                            } else {
                                that.AGroupCostParameter.currency = result;
                            }

                        } else {
                            that.AGroupCostParameter = {
                                "id": 0,
                                "diId": 0,
                                "currency": "CNY",
                                "rate": 0,
                                "tax": 0,
                                "ffys": 0,
                                "hotelXS": 0,
                                "jjccb": 0,
                                "jjcxs": 0,
                                "jjcrs": 0,
                                "gwccb": 0,
                                "gwcxs": 0,
                                "gwcrs": 0,
                                "hcpcb": 0,
                                "hcpxs": 0,
                                "hcprs": 0,
                                "cpcb": 0,
                                "cpxs": 0,
                                "cprs": 0,
                                "bxcb": 0,
                                "bxxs": 25,
                                "bxrs": 0,
                                "hscb": 0,
                                "hsxs": 0,
                                "hsrs": 0,
                                "visaCB": 0,
                                "visaXS": 0,
                                "visaRS": 0,
                                "gwcb": 0,
                                "gwxs": 0,
                                "gwrs": 0,
                                "djcb": 0,
                                "djrs": 0,
                                "djxs": 0,
                                "sgrcb": 0,
                                "sgrNumber": 0,
                                "sgrxs": 0,
                                "tbrcb": 0,
                                "tbrNumber": 0,
                                "tbrxs": 0,
                                "jsescb": 0,
                                "jsesNumber": 0,
                                "jsesxs": 0,
                                "suitecb": 0,
                                "suiteNumber": 0,
                                "suitexs": 0,
                                "lyjcb": 0,
                                "lyjxs": 0,
                                "lyjrs": 0,
                                "isShare": 0,
                                "costType": "A",
                                "costTypeStartTime": "",
                                "costTypeendTime": "",
                                "costTypenumber": 0,
                                "tdccb": 0,
                                "tdcxs": 0,
                                "tdcrs": 0
                            };
                        }
                        var bcostvalue = resp.data.data.groupCostParameter.filter(x => x.costType == 'B')[0];
                        if (bcostvalue != undefined) {
                            that.BGroupCostParameter = bcostvalue;
                        } else {
                            that.BGroupCostParameter = {
                                "id": 0,
                                "diId": 0,
                                "currency": "",
                                "rate": 0,
                                "tax": 0,
                                "ffys": 0,
                                "hotelXS": 0,
                                "jjccb": 0,
                                "jjcxs": 0,
                                "jjcrs": 0,
                                "gwccb": 0,
                                "gwcxs": 0,
                                "gwcrs": 0,
                                "hcpcb": 0,
                                "hcpxs": 0,
                                "hcprs": 0,
                                "cpcb": 0,
                                "cpxs": 0,
                                "cprs": 0,
                                "bxcb": 0,
                                "bxxs": 25,
                                "bxrs": 0,
                                "hscb": 0,
                                "hsxs": 0,
                                "hsrs": 0,
                                "visaCB": 0,
                                "visaXS": 0,
                                "visaRS": 0,
                                "gwcb": 0,
                                "gwxs": 0,
                                "gwrs": 0,
                                "djcb": 0,
                                "djxs": 0,
                                "djrs": 0,
                                "sgrcb": 0,
                                "sgrNumber": 0,
                                "sgrxs": 0,
                                "tbrcb": 0,
                                "tbrNumber": 0,
                                "tbrxs": 0,
                                "jsescb": 0,
                                "jsesNumber": 0,
                                "jsesxs": 0,
                                "suitecb": 0,
                                "suiteNumber": 0,
                                "suitexs": 0,
                                "lyjcb": 0,
                                "lyjxs": 0,
                                "lyjrs": 0,
                                "isShare": 0,
                                "costType": "B",
                                "costTypeStartTime": "",
                                "costTypeendTime": "",
                                "costTypenumber": 0,
                                "tdccb": 0,
                                "tdcxs": 0,
                                "tdcrs": 0
                            };
                        }

                        if (resp.data.data.groupCostParameter.length > 1) {
                            that.costTypevalue = "B";
                        } else {
                            that.costTypevalue = "A";
                        }

                        if (that.AGroupCostParameter.costTypeStartTime) {
                            that.AGroupCostParameter.costTypeStartTime = new Date(that.AGroupCostParameter.costTypeStartTime);
                        }
                        if (that.AGroupCostParameter.costTypeendTime) {
                            that.AGroupCostParameter.costTypeendTime = new Date(that.AGroupCostParameter.costTypeendTime);
                        }
                        if (that.BGroupCostParameter.costTypeStartTime) {
                            that.BGroupCostParameter.costTypeStartTime = new Date(that.BGroupCostParameter.costTypeStartTime);
                        }
                        if (that.BGroupCostParameter.costTypeendTime) {
                            that.BGroupCostParameter.costTypeendTime = new Date(that.BGroupCostParameter.costTypeendTime);
                        }

                    } else {
                        that.AGroupCostParameter = {
                            "id": 0,
                            "diId": 0,
                            "currency": "CNY",
                            "rate": 0,
                            "tax": 0,
                            "ffys": 0,
                            "hotelXS": 0,
                            "jjccb": 0,
                            "jjcxs": 0,
                            "jjcrs": 0,
                            "gwccb": 0,
                            "gwcxs": 0,
                            "gwcrs": 0,
                            "hcpcb": 0,
                            "hcpxs": 0,
                            "hcprs": 0,
                            "cpcb": 0,
                            "cpxs": 0,
                            "cprs": 0,
                            "bxcb": 0,
                            "bxxs": 25,
                            "bxrs": 0,
                            "hscb": 0,
                            "hsxs": 0,
                            "hsrs": 0,
                            "visaCB": 0,
                            "visaXS": 0,
                            "visaRS": 0,
                            "gwcb": 0,
                            "gwxs": 0,
                            "gwrs": 0,
                            "djcb": 0,
                            "djrs": 0,
                            "djxs": 0,
                            "sgrcb": 0,
                            "sgrNumber": 0,
                            "sgrxs": 0,
                            "tbrcb": 0,
                            "tbrNumber": 0,
                            "tbrxs": 0,
                            "jsescb": 0,
                            "jsesNumber": 0,
                            "jsesxs": 0,
                            "suitecb": 0,
                            "suiteNumber": 0,
                            "suitexs": 0,
                            "lyjcb": 0,
                            "lyjxs": 0,
                            "lyjrs": 0,
                            "isShare": 0,
                            "costType": "A",
                            "costTypeStartTime": "",
                            "costTypeendTime": "",
                            "costTypenumber": 0,
                            "tdccb": 0,
                            "tdcxs": 0,
                            "tdcrs": 0
                        };
                        that.BGroupCostParameter = {
                            "id": 0,
                            "diId": 0,
                            "currency": "",
                            "rate": 0,
                            "tax": 0,
                            "ffys": 0,
                            "hotelXS": 0,
                            "jjccb": 0,
                            "jjcxs": 0,
                            "jjcrs": 0,
                            "gwccb": 0,
                            "gwcxs": 0,
                            "gwcrs": 0,
                            "hcpcb": 0,
                            "hcpxs": 0,
                            "hcprs": 0,
                            "cpcb": 0,
                            "cpxs": 0,
                            "cprs": 0,
                            "bxcb": 0,
                            "bxxs": 25,
                            "bxrs": 0,
                            "hscb": 0,
                            "hsxs": 0,
                            "hsrs": 0,
                            "visaCB": 0,
                            "visaXS": 0,
                            "visaRS": 0,
                            "gwcb": 0,
                            "gwxs": 0,
                            "gwrs": 0,
                            "djcb": 0,
                            "djxs": 0,
                            "djrs": 0,
                            "sgrcb": 0,
                            "sgrNumber": 0,
                            "sgrxs": 0,
                            "tbrcb": 0,
                            "tbrNumber": 0,
                            "tbrxs": 0,
                            "jsescb": 0,
                            "jsesNumber": 0,
                            "jsesxs": 0,
                            "suitecb": 0,
                            "suiteNumber": 0,
                            "suitexs": 0,
                            "lyjcb": 0,
                            "lyjxs": 0,
                            "lyjrs": 0,
                            "isShare": 0,
                            "costType": "B",
                            "costTypeStartTime": "",
                            "costTypeendTime": "",
                            "costTypenumber": 0,
                            "tdccb": 0,
                            "tdcxs": 0,
                            "tdcrs": 0
                        };
                        that.AGroupCostParameter.diId = that.diid;
                        that.BGroupCostParameter.diId = that.diid;
                        that.costTypevalue = 'A';
                    }

                    let hotelNumber = resp.data.data.hotelNumber;
                    if (hotelNumber.length > 0) {
                        for (var i = 0; i < hotelNumber.length; i++) {
                            //替换costTypeHotelNumbers ;
                            Array.forEach(that.costTypeHotelNumbers, (item, index) => {
                                if (hotelNumber[i]['type'] == item.type) {
                                    that.$set(that.costTypeHotelNumbers, index, hotelNumber[i]);
                                }
                            })
                        }

                    } else {
                        that.costTypeHotelNumbers = [{
                            "sgr": 0,
                            "tbr": 0,
                            "jses": 0,
                            "suite": 0,
                            "type": "Default",
                            "diid": 0,
                            id: 0,
                        },
                        {
                            "sgr": 0,
                            "tbr": 0,
                            "jses": 0,
                            "suite": 0,
                            "type": "A",
                            "diid": 0,
                            id: 0,
                        },
                        {
                            "sgr": 0,
                            "tbr": 0,
                            "jses": 0,
                            "suite": 0,
                            "type": "B",
                            "diid": 0,
                            id: 0,
                        }]
                    }

                    if (resp.data.data.visaCountryInfoArr.length > 0) {
                        var visainfo = resp.data.data.visaCountryInfoArr;
                        that.visaCountryInfoArr = visainfo.map(item => {
                            return {
                                country: item.country,
                                yinsiid: item.yinsi.id,
                                yinsivalue: item.yinsi.value,
                                ...item.visaMain
                            }
                        });
                        //console.log(that.visaCountryInfoArr, "that.visaCountryInfoArr");
                    } else {
                        that.visaCountryInfoArr = [];
                    }

                    that.ShowBaoPi = [];
                    const rightBaoPiShow = [
                        { apiType: "SumAirJJC", containValue: "经济舱" },
                        { apiType: "SumAirGWC", containValue: "公务舱" },
                        { apiType: "SumAirTDC", containValue: "头等舱" }];
                    if (resp.data.data.baoPi.length > 0) {
                        const baoPi = resp.data.data.baoPi;
                        //left 报批
                        for (var i = 0; i < baoPi.length; i++) {
                            for (var j = 0; j < that.equalWhere.length; j++) {
                                let item = that.equalWhere[j];
                                for (var p in item) {
                                    if (baoPi[i].type == p) {
                                        ////////console.log("key:" + p + "已经匹配 value:" + item[p]);
                                        for (var m = 0; m < that.sheetDatal.length; m++) {
                                            if (that.sheetDatal[m].EnLabel == item[p]) {
                                                ////////console.log(" 1 key:" + that.sheetDatal[m].EnLabel + "已经匹配 1 value:" + baoPi[i].price);
                                                that.sheetDatal[m].childList[0].tips = baoPi[i].price;
                                            }
                                        }
                                    }
                                }

                            }

                        }

                        for (var i = 0; i < rightBaoPiShow.length; i++) {
                            var val = baoPi.filter(x => {
                                return x.type == rightBaoPiShow[i].apiType
                            })

                            if (val.length > 0) {
                                for (var j = 0; j < that.cabinDatal.length; j++) {
                                    if (that.cabinDatal[j].label.indexOf(rightBaoPiShow[i].containValue) != -1) {
                                        that.cabinDatal[j].childList[3].tips = val[0].price;
                                    }
                                }
                            }
                        }

                        const centerBaoPiShow = [
                            "Meals", "Hotel", "GongZa", "Other"
                        ];

                        for (var i = 0; i < centerBaoPiShow.length; i++) {
                            var val = baoPi.filter(x => {
                                return x.type == centerBaoPiShow[i]
                            })

                            if (val.length > 0) {
                                that.ShowBaoPi.push(val[0]);
                            }
                        }

                    } else {
                        for (var m = 0; m < that.sheetDatal.length; m++) {
                            if (that.sheetDatal[m].childList[0].tips) {
                                that.sheetDatal[m].childList[0].tips = "暂无！";
                            }
                        }

                        for (var j = 0; j < rightBaoPiShow.length; j++) {
                            for (var i = 0; i < that.cabinDatal.length; i++) {
                                if (that.cabinDatal[i].label.indexOf(rightBaoPiShow[j].containValue) != -1) {
                                    that.cabinDatal[i].childList[3].tips = '暂无！';
                                }
                            }
                        }
                    }

                    that.hotelIsTrue = resp.data.data.hotelIsTrue;
                    that.blackCodeIsTrue = resp.data.data.blackCodeIsTrue;
                    that.GivePeopleNumber();

                    //处理各部门操作人员
                    var groupModuleOperators = resp.data.data.groupModuleOperators;
                    that.groupModuleOperators = groupModuleOperators.filter(x => {
                        return !that.hideGroupModuleId.includes(x.cTableId);
                    })
                }
                that.inSelectChangeCheck();
                that.costloading = false;
            }).catch(err => {
                that.costloading = false;
                this.$message({
                    message: '网络异常！',
                    type: 'error'
                });
            })

        },
        groupChange() {
            this.clearFormVerify();
            this.loadData(this.diid);
        },
        save() {

            return new Promise(async (resolve, reject) => {

                if (this.costTypevalue == 'A') {
                    var sgrfilter = this.costTypeHotelNumbers.filter(x => {
                        return x.type == 'Default'
                    })[0];
                    var pNumber = 0;
                    //遍历 sgrfilter对象
                    for (var key in sgrfilter) {
                        var parNumber = Number(sgrfilter[key]);
                        if (isNaN(parNumber)) {
                            parNumber = 0;
                        } else {
                            if (key == 'tbr') {
                                pNumber += parNumber * 2;
                            }
                            if (key == 'sgr') {
                                pNumber += parNumber;
                            }
                            if (key == 'jses') {
                                pNumber += parNumber;
                            }
                            if (key == 'suite') {
                                pNumber += parNumber;
                            }
                        }
                    }

                    var isChange = await this.getGroupInfo();
                    if (isChange) {
                        var number = this.grouptitleinfo.visitPNumber;
                        this.AGroupCostParameter.visaRS = number;
                        this.AGroupCostParameter.bxrs = number;
                        this.AGroupCostParameter.djrs = number;
                        this.AGroupCostParameter.gwrs = number;
                        this.AGroupCostParameter.lyjrs = number;
                    }

                    ////console.log(pNumber, 'pNumber-------------');
                    if (this.grouptitleinfo.visitPNumber != pNumber && !this.excludeGroupList.includes(this.diid) && this.diid != 2948) {
                        this.$message.error('团组人数与房间人数不一致！')
                        return resolve(false);
                    }
                }

                var that = this;
                var Data = { diid: this.diid, userid: this.userId };
                var isTrue = await this.formVerify();
                if (isTrue) {
                    Data.checkBoxs = this.CheckBoxListSelect.map(x => {
                        return {
                            diid: x.diid,
                            cbType: x.cbType,
                            cbValues: x.cbValues.join(',')
                        };
                    });

                    Data.groupCosts = this.tableData;
                    Data.costTypeHotelNumbers = this.costTypeHotelNumbers.map(x => {
                        return {
                            id: x.id,
                            sgr: x.sgr,
                            tbr: x.tbr,
                            jses: x.jses,
                            suite: x.suite,
                            type: x.type,
                            diid: that.diid
                        };
                    });

                    this.AGroupCostParameter.currency = this.AGroupCostParameter.currency.toString();
                    this.AGroupCostParameter.diId = this.diid;
                    this.BGroupCostParameter.diId = this.diid;

                    var Aparam = Object.assign({}, this.AGroupCostParameter);
                    var Bparam = Object.assign({}, this.BGroupCostParameter);
                    if (that.AGroupCostParameter.costTypeStartTime) {
                        Aparam.costTypeStartTime = this.addOneDay(that.AGroupCostParameter.costTypeStartTime, 0);
                    }
                    if (that.AGroupCostParameter.costTypeendTime) {
                        Aparam.costTypeendTime = this.addOneDay(that.AGroupCostParameter.costTypeendTime, 0);
                    }
                    if (that.BGroupCostParameter.costTypeStartTime) {
                        Bparam.costTypeStartTime = this.addOneDay(that.BGroupCostParameter.costTypeStartTime, 0);
                    }
                    if (that.BGroupCostParameter.costTypeendTime) {
                        Bparam.costTypeendTime = this.addOneDay(that.BGroupCostParameter.costTypeendTime, 0);
                    }
                    if (this.costTypevalue == "A") {
                        Data.groupCostParameters = [Aparam];
                    } else {
                        Data.groupCostParameters = [Aparam, Bparam];
                    }

                    var ResultCostArr = this.Dataformat();
                    Data.groupCosts = ResultCostArr;
                    ////////console.log(Data, "save-------Data");

                    var that = this;
                    this.$axios.post('/api/Groups/SaveGroupCost', Data, {
                        headers: {
                            'Authorization': that.token,
                        }
                    }).then(resp => {
                        ////////console.log(resp.data.data, '------------------------------------');
                        if (resp.data.code == 200) {
                            this.$message({
                                message: '保存成功！',
                                type: 'success'
                            });
                            resolve(true);
                        } else {
                            this.$message.error('保存失败！' + resp.data.msg);
                            resolve(false);
                        }

                        var result = Number(that.AGroupCostParameter.currency);
                        if (isNaN(result)) {

                        } else {
                            that.AGroupCostParameter.currency = result;
                        }
                    })

                } else {
                    this.$message.error('请输入完整！');
                }


            })


        },
        TopChange() {
        },
        calculateZCB(EnLabelParam) {
            if (EnLabelParam == undefined) {
                return 0.00;
            }

            var sum = 0.00;
            if (this.AGroupCostParameter[EnLabelParam + 'CB'] != undefined) {

                sum = (parseFloat(this.AGroupCostParameter[EnLabelParam + 'CB']) * parseInt(this.AGroupCostParameter[EnLabelParam + 'RS']));

            } else if (this.AGroupCostParameter[EnLabelParam + 'cb'] != undefined) {

                sum = (parseFloat(this.AGroupCostParameter[EnLabelParam + 'cb']) * parseInt(this.AGroupCostParameter[EnLabelParam + 'rs'] != undefined ? this.AGroupCostParameter[EnLabelParam + 'rs'] : this.AGroupCostParameter[EnLabelParam + 'Number']));
            }

            if (isNaN(sum)) {
                sum = 0.00;
            }
            return sum.toFixed(2);
        },
        calculateDRBJ(EnLabelParam) {
            if (EnLabelParam == undefined) {
                return 0.00;
            }

            var sum = 0.00;
            if (this.AGroupCostParameter[EnLabelParam + 'CB'] != undefined) {

                sum = (parseFloat(this.AGroupCostParameter[EnLabelParam + 'CB']) * parseFloat(this.AGroupCostParameter[EnLabelParam + 'XS']));

            } else if (this.AGroupCostParameter[EnLabelParam + 'cb'] != undefined) {

                sum = (parseFloat(this.AGroupCostParameter[EnLabelParam + 'cb']) * parseFloat(this.AGroupCostParameter[EnLabelParam + 'xs']));
            }

            if (isNaN(sum)) {
                sum = 0.00;
            }
            return sum.toFixed(2);
        },
        calculateZBJ(EnLabelParam) {
            if (EnLabelParam == undefined) {
                return 0.00;
            }

            var sum = 0.00;
            var drbj = this.calculateDRBJ(EnLabelParam);
            if (this.AGroupCostParameter[EnLabelParam + 'RS'] != undefined) {

                sum = drbj * parseInt(this.AGroupCostParameter[EnLabelParam + 'RS']);

            } else if (this.AGroupCostParameter[EnLabelParam + 'rs'] != undefined) {

                sum = drbj * parseInt(this.AGroupCostParameter[EnLabelParam + 'rs']);

            } else if (this.AGroupCostParameter[EnLabelParam + 'Number'] != undefined) {

                sum = drbj * parseInt(this.AGroupCostParameter[EnLabelParam + 'Number']);
            }

            if (isNaN(sum)) {
                sum = 0.00;
            }
            return sum.toFixed(2);
        },
        calculateDRLR(EnLabelParam) {
            if (EnLabelParam == undefined) {
                return 0.00;
            }

            var sum = 0.00;
            var drbj = this.calculateDRBJ(EnLabelParam);
            if (this.AGroupCostParameter[EnLabelParam + 'CB'] != undefined) {

                sum = (drbj - parseFloat(this.AGroupCostParameter[EnLabelParam + 'CB']));

            } else if (this.AGroupCostParameter[EnLabelParam + 'cb'] != undefined) {

                sum = (drbj - parseFloat(this.AGroupCostParameter[EnLabelParam + 'cb']));
            }

            if (isNaN(sum)) {
                sum = 0.00;
            }
            return sum.toFixed(2);
        },
        calculateZLR(EnLabelParam) {
            if (EnLabelParam == undefined) {
                return 0.00;
            }

            var sum = 0.00;
            var drlr = this.calculateDRLR(EnLabelParam);
            if (this.AGroupCostParameter[EnLabelParam + 'RS'] != undefined) {
                sum = drlr * parseInt(this.AGroupCostParameter[EnLabelParam + 'RS']);
            } else if (this.AGroupCostParameter[EnLabelParam + 'rs'] != undefined) {
                sum = drlr * parseInt(this.AGroupCostParameter[EnLabelParam + 'rs']);
            } else if (this.AGroupCostParameter[EnLabelParam + 'Number'] != undefined) {

                sum = drlr * parseInt(this.AGroupCostParameter[EnLabelParam + 'Number']);
            }

            if (isNaN(sum)) {
                sum = 0.00;
            }
            return sum.toFixed(2);
        },
        BcalculateZCB(EnLabelParam) {
            if (EnLabelParam == undefined) {
                return 0.00;
            }

            var sum = 0.00;
            if (this.BGroupCostParameter[EnLabelParam + 'CB'] != undefined) {

                sum = (parseFloat(this.BGroupCostParameter[EnLabelParam + 'CB']) * parseInt(this.BGroupCostParameter[EnLabelParam + 'RS']));

            } else if (this.BGroupCostParameter[EnLabelParam + 'cb'] != undefined) {

                sum = (parseFloat(this.BGroupCostParameter[EnLabelParam + 'cb']) * parseInt(this.BGroupCostParameter[EnLabelParam + 'rs'] != undefined ? this.BGroupCostParameter[EnLabelParam + 'rs'] : this.BGroupCostParameter[EnLabelParam + 'Number']));
            }

            if (isNaN(sum)) {
                sum = 0.00;
            }
            return sum.toFixed(2);;
        },
        BcalculateDRBJ(EnLabelParam) {
            if (EnLabelParam == undefined) {
                return 0.00;
            }

            var sum = 0.00;
            if (this.BGroupCostParameter[EnLabelParam + 'CB'] != undefined) {

                sum = (parseFloat(this.BGroupCostParameter[EnLabelParam + 'CB']) * parseFloat(this.BGroupCostParameter[EnLabelParam + 'XS']));

            } else if (this.BGroupCostParameter[EnLabelParam + 'cb'] != undefined) {

                sum = (parseFloat(this.BGroupCostParameter[EnLabelParam + 'cb']) * parseFloat(this.BGroupCostParameter[EnLabelParam + 'xs']));
            }

            if (isNaN(sum)) {
                sum = 0.00;
            }
            return sum.toFixed(2);
        },
        BcalculateZBJ(EnLabelParam) {
            if (EnLabelParam == undefined) {
                return 0.00;
            }

            var sum = 0.00;
            var drbj = this.BcalculateDRBJ(EnLabelParam);
            if (this.BGroupCostParameter[EnLabelParam + 'RS'] != undefined) {

                sum = drbj * parseInt(this.BGroupCostParameter[EnLabelParam + 'RS']);

            } else if (this.BGroupCostParameter[EnLabelParam + 'rs'] != undefined) {

                sum = drbj * parseInt(this.BGroupCostParameter[EnLabelParam + 'rs']);

            } else if (this.BGroupCostParameter[EnLabelParam + 'Number'] != undefined) {

                sum = drbj * parseInt(this.BGroupCostParameter[EnLabelParam + 'Number']);
            }

            if (isNaN(sum)) {
                sum = 0.00;
            }
            return sum.toFixed(2);
        },
        BcalculateDRLR(EnLabelParam) {
            if (EnLabelParam == undefined) {
                return 0.00;
            }

            var sum = 0.00;
            var drbj = this.BcalculateDRBJ(EnLabelParam);
            if (this.BGroupCostParameter[EnLabelParam + 'CB'] != undefined) {

                sum = drbj - parseFloat(this.BGroupCostParameter[EnLabelParam + 'CB']);

            } else if (this.BGroupCostParameter[EnLabelParam + 'cb'] != undefined) {

                sum = drbj - parseFloat(this.BGroupCostParameter[EnLabelParam + 'cb']);
            }

            if (isNaN(sum)) {
                sum = 0.00;
            }
            return sum.toFixed(2);;
        },
        BcalculateZLR(EnLabelParam) {
            if (EnLabelParam == undefined) {
                return 0.00;
            }

            var sum = 0.00;
            var drlr = this.BcalculateDRLR(EnLabelParam);
            if (this.BGroupCostParameter[EnLabelParam + 'RS'] != undefined) {
                sum = drlr * parseInt(this.BGroupCostParameter[EnLabelParam + 'RS']);
            } else if (this.BGroupCostParameter[EnLabelParam + 'rs'] != undefined) {
                sum = drlr * parseInt(this.BGroupCostParameter[EnLabelParam + 'rs']);
            } else if (this.BGroupCostParameter[EnLabelParam + 'Number'] != undefined) {
                sum = drlr * parseInt(this.BGroupCostParameter[EnLabelParam + 'Number']);
            }

            if (isNaN(sum)) {
                sum = 0.00;
            }
            return sum.toFixed(2);;
        },
        handleCurrentChange(val) {
            this.currentPage = val;
        },
        SelChange(row, oldrow) {
            ////////console.log(row, oldrow);
            this.dialogSelectObject = row;
        },
        handleSizeChange(val) {
            this.currentPage = 1;
            this.pageSize = val;
        },
        CalculatedPrice() {

            let rate = Number(this.AGroupCostParameter.rate);
            let Djsum = 0;
            let BDjsum = 0;
            var that = this;
            this.DJLables.forEach(function (item) {
                that.sumTopPrice.forEach(function (item1) {
                    if (item == item1.label) {
                        var Aprice = Number(item1.Aprice);
                        if (!isNaN(Aprice)) {
                            Djsum += Aprice;
                        }

                        var Bprice = Number(item1.Bprice);
                        if (!isNaN(Bprice)) {
                            BDjsum += Bprice;
                        }
                    }
                })
            })
            Djsum = Number((Djsum * rate).toFixed(2));
            BDjsum = Number((BDjsum * rate).toFixed(2));

            let GWsum = 0;
            let BGWsum = 0;
            this.GwLables.forEach(function (item) {
                that.sumTopPrice.forEach(function (item1) {
                    if (item == item1.label) {
                        var Aprice = Number(item1.Aprice);
                        if (!isNaN(Aprice)) {
                            GWsum += Aprice;
                        }

                        var Bprice = Number(item1.Bprice);
                        if (!isNaN(Bprice)) {
                            BGWsum += Bprice;
                        }
                    }
                })
            })
            GWsum = Number((GWsum * rate).toFixed(2));
            BGWsum = Number((BGWsum * rate).toFixed(2));

            let LYJsum = 0;
            let BLYJsum = 0;
            var lyjList = that.sumTopPrice.filter((x) => {
                return x.label == 'P/C';
            })

            if (lyjList.length > 0) {
                LYJsum = lyjList[0].Aprice;
                BLYJsum = lyjList[0].Bprice;
            }
            LYJsum = isNaN(LYJsum) ? 0 : LYJsum;
            BLYJsum = isNaN(BLYJsum) ? 0 : BLYJsum;
            LYJsum = Number((LYJsum * rate).toFixed(2));
            BLYJsum = Number((BLYJsum * rate).toFixed(2));

            let SGRsum = 0;
            let BSGRsum = 0;
            var SGRList = that.sumTopPrice.filter((x) => {
                return x.label == 'SGR';
            })
            if (SGRList.length > 0) {
                SGRsum = SGRList[0].Aprice;
                BSGRsum = SGRList[0].Bprice;
            }
            SGRsum = isNaN(SGRsum) ? 0 : SGRsum;
            BSGRsum = isNaN(BSGRsum) ? 0 : BSGRsum;
            SGRsum = (SGRsum * rate).toFixed(2);
            BSGRsum = (BSGRsum * rate).toFixed(2);


            let TBRsum = 0;
            let BTBRsum = 0;
            var TBRList = that.sumTopPrice.filter((x) => {
                return x.label == 'TBR';
            })
            if (TBRList.length > 0) {
                TBRsum = TBRList[0].Aprice;
                BTBRsum = TBRList[0].Bprice;
            }
            TBRsum = isNaN(TBRsum) ? 0 : TBRsum;
            BTBRsum = isNaN(BTBRsum) ? 0 : BTBRsum;
            TBRsum = (TBRsum * rate).toFixed(2);
            BTBRsum = (BTBRsum * rate).toFixed(2);

            let JSESsum = 0;
            let BJSESsum = 0;
            var JSESList = that.sumTopPrice.filter((x) => {
                return x.label == 'JS/ES';
            })
            if (JSESList.length > 0) {
                JSESsum = JSESList[0].Aprice;
                BJSESsum = JSESList[0].Bprice;
            }
            JSESsum = isNaN(JSESsum) ? 0 : JSESsum;
            BJSESsum = isNaN(BJSESsum) ? 0 : BJSESsum;
            JSESsum = (JSESsum * rate).toFixed(2);
            BJSESsum = BJSESsum * rate;

            let SUITEsum = 0;
            let BSUITEsum = 0;
            var SUITEList = that.sumTopPrice.filter((x) => {
                return x.label == 'SUITE';
            })
            if (SUITEList.length > 0) {
                SUITEsum = SUITEList[0].Aprice;
                BSUITEsum = SUITEList[0].Bprice;
            }
            SUITEsum = isNaN(SUITEsum) ? 0 : SUITEsum;
            BSUITEsum = isNaN(BSUITEsum) ? 0 : BSUITEsum;
            SUITEsum = (SUITEsum * rate).toFixed(2);
            BSUITEsum = (BSUITEsum * rate).toFixed(2);

            // ////////console.log(Djsum, GWsum, LYJsum, 'Djsum,GWsum,LYJsum');
            // ////////console.log(SGRsum, TBRsum, JSESsum, SUITEsum, 'SGRsum,TBRsum,JSESsum,SUITEsum');

            var sgrfilter = this.costTypeHotelNumbers.filter(x => {
                return x.type == 'Default'
            })
            let Bsgrfilter = {};

            if (this.costTypevalue == 'B') {
                sgrfilter = this.costTypeHotelNumbers.filter(x => {
                    return x.type == 'A'
                })

                Bsgrfilter = this.costTypeHotelNumbers.filter(x => {
                    return x.type == 'B'
                })

                Bsgrfilter = Bsgrfilter[0];
            }

            sgrfilter = sgrfilter[0];

            let hotelRooms = {
                "SGR": sgrfilter.sgr,
                "TBR": sgrfilter.tbr,
                "JSES": sgrfilter.jses,
                "SUITE": sgrfilter.suite
            };

            let flights = {
                "经济舱": this.AGroupCostParameter.jjcrs,
                "公务舱": this.AGroupCostParameter.gwcrs,
                "头等舱": this.AGroupCostParameter.tdcrs,
            };

            let result = {};

            if (this.diid == 2616) {
                result['经济舱SGR'] = 4;
                result['经济舱JSES'] = 1;
                result['公务舱SGR'] = 1;
            } else {
                for (let flight of ["经济舱", "头等舱", "公务舱"]) {
                    if (flight === "经济舱") {
                        this.matchRooms(hotelRooms, flights, ["TBR", "SGR", "JSES", "SUITE"], flight, result);
                    } else if (flight === "公务舱") {
                        this.matchRooms(hotelRooms, flights, ["SUITE", "JSES", "SGR", "TBR"], flight, result);
                    } else if (flight === "头等舱") {
                        this.matchRooms(hotelRooms, flights, ["SUITE", "JSES",], flight, result);
                    }
                }
            }

            // 添加公务舱双人间

            var rightCheckArr = [];
            const airByHotelType = [
                { name: "经济舱TBR", index: 0, lable: "经济舱 TBR" },
                { name: "经济舱SGR", index: 1, lable: "经济舱 SGR" },
                { name: "公务舱SGR", index: 2, lable: "公务舱 SGR" },
                { name: "公务舱JSES", index: 3, lable: "公务舱 JS/ES" },
                { name: "公务舱SUITE", index: 4, lable: "公务舱 SUITE" },
                { name: "经济舱SUITE", index: 5, lable: "经济舱 SUITE" },
                { name: "头等舱JSES", index: 6, lable: "头等舱 JS/ES" },
                { name: "头等舱SUITE", index: 7, lable: "头等舱 SUITE" },
                { name: "经济舱JSES", index: 8, lable: "经济舱 JS/ES" },
                { name: "公务舱TBR", index: 9, lable: "公务舱 TBR" }
            ];
            const paramArr = [
                {
                    costPerson: ['sgrcb', 'jjccb'],
                    singleQuote: ['jjc', 'sgr'],
                    index: 1,
                },
                {
                    costPerson: ['tbrcb', 'jjccb'],
                    singleQuote: ['jjc', 'tbr'],
                    index: 0,
                },
                {
                    costPerson: ['suitecb', 'jjccb'],
                    singleQuote: ['jjc', 'suite'],
                    index: 5,
                },
                {
                    costPerson: ['suitecb', 'gwccb'],
                    singleQuote: ['gwc', 'suite'],
                    index: 4,
                },
                {
                    costPerson: ['sgrcb', 'gwccb'],
                    singleQuote: ['gwc', 'sgr'],
                    index: 2,
                },
                {
                    costPerson: ['jsescb', 'gwccb'],
                    singleQuote: ['gwc', 'jses'],
                    index: 3,
                },
                {
                    costPerson: ['jsescb', 'tdccb'],
                    singleQuote: ['tdc', 'jses'],
                    index: 6,
                },
                {
                    costPerson: ['suitecb', 'tdccb'],
                    singleQuote: ['tdc', 'suite'],
                    index: 7,
                },
                {
                    costPerson: ['jsescb', 'jjccb'],
                    singleQuote: ['jjc', 'jses'],
                    index: 8,
                },
                {
                    costPerson: ['tbrcb', 'gwccb'],
                    singleQuote: ['gwc', 'tbr'],
                    index: 9,
                }
            ];
            if (this.costTypevalue == 'B') {

                let BhotelRooms = {
                    "SGR": Bsgrfilter.sgr,
                    "TBR": Bsgrfilter.tbr,
                    "JSES": Bsgrfilter.jses,
                    "SUITE": Bsgrfilter.suite
                };

                let Bflights = {
                    "经济舱": this.BGroupCostParameter.jjcrs,
                    "公务舱": this.BGroupCostParameter.gwcrs,
                    "头等舱": this.BGroupCostParameter.tdcrs,
                };

                let Bresult = {};
                for (let flight of ["经济舱", "头等舱", "公务舱"]) {
                    if (flight === "经济舱") {
                        this.matchRooms(BhotelRooms, Bflights, ["SGR", "TBR", "JSES", "SUITE"], flight, Bresult);
                    } else if (flight === "公务舱") {
                        this.matchRooms(BhotelRooms, Bflights, ["SUITE", "JSES", "SGR", "TBR"], flight, Bresult);
                    } else if (flight === "头等舱") {
                        this.matchRooms(BhotelRooms, Bflights, ["SUITE", "JSES",], flight, Bresult);
                    }
                }

                for (var i = 0; i < airByHotelType.length; i++) {
                    if (Bresult.hasOwnProperty(airByHotelType[i].name)) {
                        let count = Bresult[airByHotelType[i].name];
                        if (airByHotelType[i].name.indexOf("TBR") != -1) {
                            count = count * 2;
                        }
                        if (count > 0) {
                            rightCheckArr.push(airByHotelType[i].lable);
                            that.BcabinDatal[airByHotelType[i].index].sheetInfo[0].toll = count;
                        }
                        else {
                            that.BcabinDatal[airByHotelType[i].index].sheetInfo[0].toll = 0;
                        }
                    } else {
                        that.BcabinDatal[airByHotelType[i].index].sheetInfo[0].toll = 0;
                    }
                }

                this.BGroupCostParameter.djcb = BDjsum;
                this.BGroupCostParameter.gwcb = BGWsum;
                this.BGroupCostParameter.lyjcb = BLYJsum;
                this.BGroupCostParameter.sgrcb = BSGRsum;
                this.BGroupCostParameter.tbrcb = BTBRsum;
                this.BGroupCostParameter.jsescb = BJSESsum;
                this.BGroupCostParameter.suitecb = BSUITEsum;

                var BleftSum = this.BOtherCost();
                var BrightSum = 0;
                this.OtherCostPropertyBJ.forEach((x) => {
                    BrightSum += Number(that.BcalculateDRBJ(x));
                })

                for (var i = 0; i < paramArr.length; i++) {
                    var costPersonPrice = 0;
                    var singleQuotePrice = 0;
                    for (var j = 0; j < paramArr[i].costPerson.length; j++) {
                        var costPersonKey = paramArr[i].costPerson[j];
                        var price = Number(that.BGroupCostParameter[costPersonKey]);
                        if (costPersonKey.indexOf('tbr') != -1) {
                            price = price / 2;
                        }
                        costPersonPrice += price;
                    }
                    for (var k = 0; k < paramArr[i].singleQuote.length; k++) {
                        var singleQuoteKey = paramArr[i].singleQuote[k];
                        var price = Number(that.BcalculateDRBJ(singleQuoteKey));
                        if (singleQuoteKey.indexOf('tbr') != -1) {
                            price = price / 2;
                        }
                        singleQuotePrice += price;
                    }
                    that.BcabinDatal[paramArr[i].index].sheetInfo[0].costPerson = (BleftSum + costPersonPrice).toFixed(2);
                    that.BcabinDatal[paramArr[i].index].sheetInfo[0].singleQuote = (BrightSum + singleQuotePrice).toFixed(2);
                }
            }

            for (var i = 0; i < airByHotelType.length; i++) {
                if (result.hasOwnProperty(airByHotelType[i].name)) {
                    let count = result[airByHotelType[i].name];
                    if (airByHotelType[i].name.indexOf("TBR") != -1) {
                        count = count * 2;
                    }
                    if (count > 0) {
                        rightCheckArr.push(airByHotelType[i].lable);
                        that.cabinDatal[airByHotelType[i].index].sheetInfo[0].toll = count;
                    }
                    else {
                        that.cabinDatal[airByHotelType[i].index].sheetInfo[0].toll = 0;
                    }
                } else {
                    that.cabinDatal[airByHotelType[i].index].sheetInfo[0].toll = 0;
                }
            }

            rightCheckArr.push('团组预算明细');
            rightCheckArr = [...new Set(rightCheckArr)];

            try {
                ////console.log('rightCheckArr', rightCheckArr);
                this.CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues = rightCheckArr;
            } catch (e) { }

            this.AGroupCostParameter.djcb = Djsum;
            this.AGroupCostParameter.gwcb = GWsum;
            this.AGroupCostParameter.lyjcb = LYJsum;
            this.AGroupCostParameter.sgrcb = SGRsum;
            this.AGroupCostParameter.tbrcb = TBRsum;
            this.AGroupCostParameter.jsescb = JSESsum;
            this.AGroupCostParameter.suitecb = SUITEsum;

            var leftSum = this.OtherCost();
            var rightSum = 0;
            this.OtherCostPropertyBJ.forEach((x) => {
                rightSum += Number(that.calculateDRBJ(x));
            })

            //总人数价格
            if (this.excludeGroupList.includes(this.diid)) {
                leftSum = leftSum * this.grouptitleinfo.visitPNumber;
                rightSum = rightSum * this.grouptitleinfo.visitPNumber;
            }


            for (var i = 0; i < paramArr.length; i++) {
                var costPersonPrice = 0;
                var singleQuotePrice = 0;
                for (var j = 0; j < paramArr[i].costPerson.length; j++) {
                    var costPersonKey = paramArr[i].costPerson[j];
                    var price = Number(that.AGroupCostParameter[costPersonKey]);

                    if (this.excludeGroupList.includes(this.diid) && costPersonKey.indexOf('gwc') != -1) {
                        price = price * this.grouptitleinfo.visitPNumber;
                    }

                    if (costPersonKey.indexOf('tbr') != -1) {
                        price = price / 2;
                    }
                    costPersonPrice += price;
                }
                for (var k = 0; k < paramArr[i].singleQuote.length; k++) {
                    var singleQuoteKey = paramArr[i].singleQuote[k];
                    var price = Number(that.calculateDRBJ(singleQuoteKey));

                    if (this.excludeGroupList.includes(this.diid) && singleQuoteKey.indexOf('gwc') != -1) {
                        price = price * this.grouptitleinfo.visitPNumber;
                    }

                    if (singleQuoteKey.indexOf('tbr') != -1) {
                        price = price / 2;
                    }
                    singleQuotePrice += price;
                }
                that.cabinDatal[paramArr[i].index].sheetInfo[0].costPerson = (leftSum + costPersonPrice).toFixed(2);
                that.cabinDatal[paramArr[i].index].sheetInfo[0].singleQuote = (rightSum + singleQuotePrice).toFixed(2);
            }

            let groupCosts = 0;
            let gtroupQuotes = 0;
            for (var i = 0; i < this.cabinDatal.length; i++) {
                var forNumber = Number(this.cabinDatal[i].sheetInfo[0]['toll']);
                if (!isNaN(forNumber) && forNumber > 0) {
                    groupCosts += (Number(this.cabinDatal[i].sheetInfo[0]['costPerson']) * forNumber);
                    gtroupQuotes += (Number(this.cabinDatal[i].sheetInfo[0]['singleQuote']) * forNumber);
                }
            }

            if (this.costTypevalue == 'B') {
                for (var i = 0; i < this.BcabinDatal.length; i++) {
                    var forNumber = Number(this.BcabinDatal[i].sheetInfo[0]['toll']);
                    if (!isNaN(forNumber) && forNumber > 0) {
                        groupCosts += (Number(this.BcabinDatal[i].sheetInfo[0]['costPerson']) * forNumber);
                        gtroupQuotes += (Number(this.BcabinDatal[i].sheetInfo[0]['singleQuote']) * forNumber);
                    }
                }
            }

            let groupProfit = gtroupQuotes - groupCosts;

            var cabinDatalLast = this.cabinDatal.filter(function (x) {
                return x.label == '团组预算明细'
            })

            groupCosts = groupCosts.toFixed(2);
            gtroupQuotes = gtroupQuotes.toFixed(2);
            groupProfit = groupProfit.toFixed(2);

            cabinDatalLast[0].sheetInfo[0]['groupCosts'] = groupCosts;
            cabinDatalLast[0].sheetInfo[0]['gtroupQuotes'] = gtroupQuotes;
            cabinDatalLast[0].sheetInfo[0]['groupProfit'] = groupProfit;
        },
        OtherCost() {
            // txtVisaCost.Text +txtHCPCB.Text + txtCPCB.Text
            // txtBXCB.Text +txtHSCB.Text) +lblDJDRCB.Text + lblGWDRCD.Text + lblLYJDRCB.Text
            var that = this;
            let sum = 0;
            this.OtherCostProperty.forEach((x) => {
                var param = that.AGroupCostParameter[x];
                if (param != undefined) {
                    sum += Number(param);
                }
            })
            return sum;
        },
        BOtherCost() {
            // txtVisaCost.Text +txtHCPCB.Text + txtCPCB.Text
            // txtBXCB.Text +txtHSCB.Text) +lblDJDRCB.Text + lblGWDRCD.Text + lblLYJDRCB.Text
            var that = this;
            let sum = 0;
            this.OtherCostProperty.forEach((x) => {
                var param;
                if (x == 'visaCB' || x == 'bxcb') {
                    param = that.AGroupCostParameter[x];
                } else {
                    param = that.BGroupCostParameter[x];
                }
                if (param != undefined) {
                    sum += Number(param);
                }
            })
            return sum;
        },
        matchRooms(hotelRooms, flights, roomTypes, flightType, result) {
            for (let roomType of roomTypes) {
                while (hotelRooms[roomType] > 0 && flights[flightType] > 0) {
                    hotelRooms[roomType]--;
                    flights[flightType]--;
                    if (roomType === "TBR") {
                        flights[flightType]--; //双人间在减少1
                    }
                    if (result.hasOwnProperty(flightType + roomType)) {
                        result[flightType + roomType]++;
                    } else {
                        result[flightType + roomType] = 1;
                    }
                }
            }
        },
        NumberSetTime(number, index) {
            ////console.log(number, index, this.grouptitleinfo.visitStartDate);
            number = parseInt(number);
            if (!isNaN(number)) {
                var time = this.addOneDay(this.grouptitleinfo.visitStartDate, number - 1)
                this.tableData[index].date = time;
            } else {
                this.tableData[index].date = '';
                this.tableData[index].day = '';
            }
        },
        addOneDay(dateString, number) {
            if (!dateString) {
                return "";
            }
            let date = new Date(dateString);
            date.setDate(date.getDate() + number);
            let year = date.getFullYear();
            let month = date.getMonth() + 1;
            let day = date.getDate();
            month = month < 10 ? '0' + month : month;
            day = day < 10 ? '0' + day : day;
            return `${year}-${month}-${day}`;
        },
        costTypeSelect(val) {
            ////////console.log('costTypeSelect--------------------------------------------------------', val);
            setTimeout(() => {
                this.hideAirInfo();
            }, 300);
        },
        async formVerify() {
            return new Promise((resolve, reject) => {

                var forFormList = [];
                if (this.costTypevalue == 'A') {
                    forFormList = ['inputs', 'DHotel'];
                } else {
                    forFormList = ['inputs', 'AHotel', 'Asection', 'BHotel', 'Bsection'];
                }

                var that = this;
                for (var i = 0; i < forFormList.length; i++) {
                    that.$refs[forFormList[i]].validate((valid) => {
                        if (valid) {

                        } else {
                            resolve(valid);
                        }
                    });
                }
                resolve(true);
            })
        },
        clearFormVerify() {
            var forFormList = ['inputs', 'AHotel', 'Asection', 'BHotel', 'Bsection', 'DHotel'];
            this.$nextTick(() => {
                for (var i = 0; i < forFormList.length; i++) {
                    this.$refs[forFormList[i]].resetFields();
                }
            })
        },
        topcheckboxChange(val, label) {
            // ////console.log(val, label, 'topcheckboxChangeval');
            var that = this;
            if (!val) {
                this.$confirm('此操作将清空整列数据, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    if (label == 'SGR') {
                        this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0].sgr = 0
                    }
                    if (label == 'TBR') {
                        this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0].tbr = 0
                    }
                    if (label == 'JS/ES') {
                        this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0].jses = 0
                    }
                    if (label == 'SUITE') {
                        this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0].suite = 0
                    }

                    if (label == 'EF') {
                        that.CheckBoxListSelect.forEach(x => {
                            if (x.cbType == 'Top') {
                                if (x.cbValues.includes("EFR")) {
                                    var index = x.cbValues.indexOf("EFR");
                                    if (index > -1) {
                                        x.cbValues.splice(index, 1);
                                    }
                                }
                            }
                        });

                        var fliterList = that.tableLabel.filter(x => x.label == "EFR");
                        if (fliterList.length != 0) {
                            var obj = {
                                "diid": that.diid,
                                "day": "-",
                                "date": "",
                                "itin": "",
                                "carType": "",
                                "carCost": "",
                                "carNumber": "",
                                "carTiming": "",
                                "tgs": "",
                                "tgwh": "",
                                "tgn": "",
                                "tgof": "",
                                "tgm": "",
                                "tga": "",
                                "tgtf": "",
                                "tgef": "",
                                "cfs": "",
                                "cfm": "",
                                "cfof": "",
                                "b": "",
                                "l": "",
                                "d": "",
                                "tbr": "",
                                "sgr": "",
                                "jS_ES": "",
                                "suite": "",
                                "accon": "",
                                "tv": "",
                                "iL": "",
                                "if": "",
                                "ef": "",
                                "b_R_F": "",
                                "te": "",
                                "tgTips": "",
                                "drvTips": "",
                                "pc": "",
                                "tlf": "",
                                "ect": "",
                                "id": 1,
                                "gwCount": "",
                                "fyCount": "",
                                "efr": "",
                            };
                            var prop = fliterList[0].prop;
                            var initval = obj[prop];

                            for (var i = 0; i < that.tableData.length; i++) {
                                that.tableData[i][prop] = initval;
                            }
                            ////////console.log(that.tableData, 'that.tableData数据');
                        }

                    }
                    ////////console.log('确定清空数据');
                    var fliterList = this.sumTopPrice.filter(x => x.label == label);
                    if (fliterList.length != 0) {
                        fliterList[0].Aprice = 0;
                        fliterList[0].Bprice = 0;
                    }

                    fliterList = that.tableLabel.filter(x => x.label == label);
                    if (fliterList.length != 0) {
                        var obj = {
                            "diid": that.diid,
                            "day": "-",
                            "date": "",
                            "itin": "",
                            "carType": "",
                            "carCost": "",
                            "carNumber": "",
                            "carTiming": "",
                            "tgs": "",
                            "tgwh": "",
                            "tgn": "",
                            "tgof": "",
                            "tgm": "",
                            "tga": "",
                            "tgtf": "",
                            "tgef": "",
                            "cfs": "",
                            "cfm": "",
                            "cfof": "",
                            "b": "",
                            "l": "",
                            "d": "",
                            "tbr": "",
                            "sgr": "",
                            "jS_ES": "",
                            "suite": "",
                            "accon": "",
                            "tv": "",
                            "iL": "",
                            "if": "",
                            "ef": "",
                            "b_R_F": "",
                            "te": "",
                            "tgTips": "",
                            "drvTips": "",
                            "pc": "",
                            "tlf": "",
                            "ect": "",
                            "id": 1,
                            "gwCount": "",
                            "fyCount": "",
                            "efr": "",
                        };
                        var prop = fliterList[0].prop;
                        var initval = obj[prop];

                        for (var i = 0; i < that.tableData.length; i++) {
                            that.tableData[i][prop] = initval;
                        }
                        ////////console.log(that.tableData, 'that.tableData数据');
                    }

                    this.$message({
                        message: '已清除！',
                        type: 'success',
                        offset: 50
                    });

                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消操作'
                    });

                    if (!that.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(label)) {
                        that.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.push(label);
                    }

                });
            } else {
                if (label == 'EF') {
                    that.CheckBoxListSelect.forEach(x => {
                        if (x.cbType == 'Top') {
                            if (!x.cbValues.includes("EFR")) {
                                x.cbValues.push("EFR");
                            }
                        }
                    });
                }
            }

        },
        GroupIsShare() {
            this.$axios.post('/api/Groups/GroupIsShare', { diid: this.diid }, {
                headers: {
                    'Authorization': this.token,
                }
            }).then(resp => {
                ////////console.log(resp.data.data, '------------------------------------');
                if (resp.data.code == 200) {
                    this.isShare = resp.data.data.isShare;
                    this.$message({
                        message: '操作成功！' + resp.data.msg,
                        type: 'success'
                    });
                } else {
                    this.$message.error('操作失败！' + resp.data.msg);
                }
            })
        },
        GetPriceCheckWord() {
            var that = this;

            var airs = [

            ];

            var sgrfilter = this.costTypeHotelNumbers.filter(x => {
                return x.type == 'Default'
            })
            let Bsgrfilter = {};

            if (this.costTypevalue == 'B') {
                sgrfilter = this.costTypeHotelNumbers.filter(x => {
                    return x.type == 'A'
                })

                Bsgrfilter = this.costTypeHotelNumbers.filter(x => {
                    return x.type == 'B'
                })

                Bsgrfilter = Bsgrfilter[0];
            }

            sgrfilter = sgrfilter[0];

            let hotelRooms = {
                "SGR": sgrfilter.sgr,
                "TBR": sgrfilter.tbr,
                "JSES": sgrfilter.jses,
                "SUITE": sgrfilter.suite
            };

            let flights = {
                "经济舱": this.AGroupCostParameter.jjcrs,
                "公务舱": this.AGroupCostParameter.gwcrs
            };

            let result = {};
            for (let flight of ["经济舱", "公务舱"]) {
                if (flight === "经济舱") {
                    this.matchRooms(hotelRooms, flights, ["SGR", "TBR", "JSES", "SUITE"], flight, result);
                } else if (flight === "公务舱") {
                    this.matchRooms(hotelRooms, flights, ["SUITE", "JSES", "SGR", "TBR"], flight, result);
                }
            }

            if (this.costTypevalue == 'B') {

                let BhotelRooms = {
                    "SGR": Bsgrfilter.sgr,
                    "TBR": Bsgrfilter.tbr,
                    "JSES": Bsgrfilter.jses,
                    "SUITE": Bsgrfilter.suite
                };

                let Bflights = {
                    "经济舱": this.BGroupCostParameter.jjcrs,
                    "公务舱": this.BGroupCostParameter.gwcrs
                };

                let Bresult = {};
                for (let flight of ["经济舱", "公务舱"]) {
                    if (flight === "经济舱") {
                        this.matchRooms(BhotelRooms, Bflights, ["SGR", "TBR", "JSES", "SUITE"], flight, Bresult);
                    } else if (flight === "公务舱") {
                        this.matchRooms(BhotelRooms, Bflights, ["SUITE", "JSES", "SGR", "TBR"], flight, Bresult);
                    }
                }

                var BtxtJJCSGRRS = (Bresult.hasOwnProperty("经济舱SGR") ? Bresult["经济舱SGR"] : 0)
                var BlblGWCSGRRS = (Bresult.hasOwnProperty("公务舱SGR") ? Bresult["公务舱SGR"] : 0)
                var BtxtJJCTBRRS = (Bresult.hasOwnProperty("经济舱TBR") ? Bresult["经济舱TBR"] * 2 : 0)
                var BtxtGWCJSESRS = (Bresult.hasOwnProperty("公务舱JSES") ? Bresult["公务舱JSES"] : 0)
                var BJJCSUITERS = (Bresult.hasOwnProperty("经济舱SUITE") ? Bresult["经济舱SUITE"] : 0)
                var BtxtGWCSUITERS = (Bresult.hasOwnProperty("公务舱SUITE") ? Bresult["公务舱SUITE"] : 0)

                var BrightSum = 0;
                this.OtherCostPropertyBJ.forEach((x) => {
                    BrightSum += Number(that.BcalculateDRBJ(x));
                })

                let BJJCSGRDRBJ = BrightSum + Number(that.BcalculateDRBJ('jjc')) + Number(that.BcalculateDRBJ('sgr'));
                let BJJCTBRDRBJ = BrightSum + (Number(that.BcalculateDRBJ('tbr')) / 2) + Number(that.BcalculateDRBJ('jjc'));
                let BJJCSUITEDRBJ = BrightSum + Number(that.BcalculateDRBJ('suite')) + Number(that.BcalculateDRBJ('jjc'));
                let BGWCSUITEDRBJ = BrightSum + Number(that.BcalculateDRBJ('suite')) + Number(that.BcalculateDRBJ('gwc'));
                let BGWCSGRDRBJ = BrightSum + Number(that.BcalculateDRBJ('sgr')) + Number(that.BcalculateDRBJ('gwc'));
                let BGWCJSESDRBJ = BrightSum + Number(that.BcalculateDRBJ('jses')) + Number(that.BcalculateDRBJ('gwc'));

                airs.push({
                    "code": "JJCTBR",
                    "number": BtxtJJCTBRRS,
                    "price": BJJCTBRDRBJ,
                    "costType": "B"
                });

                airs.push({
                    "code": "JJCSGR",
                    "number": BtxtJJCSGRRS,
                    "price": BJJCSGRDRBJ,
                    "costType": "B"
                });

                airs.push({
                    "code": "GWCSGR",
                    "number": BlblGWCSGRRS,
                    "price": BGWCSGRDRBJ,
                    "costType": "B"
                });

                airs.push({
                    "code": "GWCJSES",
                    "number": BtxtGWCJSESRS,
                    "price": BGWCJSESDRBJ,
                    "costType": "B"
                });

                airs.push({
                    "code": "GWCSUITE",
                    "number": BtxtGWCSUITERS,
                    "price": BGWCSUITEDRBJ,
                    "costType": "B"
                });

                airs.push({
                    "code": "JJCSUITE",
                    "number": BJJCSUITERS,
                    "price": BJJCSUITEDRBJ,
                    "costType": "B"
                });

            }

            var txtJJCSGRRS = (result.hasOwnProperty("经济舱SGR") ? result["经济舱SGR"] : 0)
            var lblGWCSGRRS = (result.hasOwnProperty("公务舱SGR") ? result["公务舱SGR"] : 0)
            var txtJJCTBRRS = (result.hasOwnProperty("经济舱TBR") ? result["经济舱TBR"] * 2 : 0)
            var txtGWCJSESRS = (result.hasOwnProperty("公务舱JSES") ? result["公务舱JSES"] : 0)
            var JJCSUITERS = (result.hasOwnProperty("经济舱SUITE") ? result["经济舱SUITE"] : 0)
            var txtGWCSUITERS = (result.hasOwnProperty("公务舱SUITE") ? result["公务舱SUITE"] : 0)

            var rightSum = 0;
            this.OtherCostPropertyBJ.forEach((x) => {
                rightSum += Number(that.calculateDRBJ(x));
            })

            let JJCSGRDRBJ = (rightSum + Number(that.calculateDRBJ('jjc')) + Number(that.calculateDRBJ('sgr'))).toFixed(2);
            let JJCTBRDRBJ = (rightSum + (Number(that.calculateDRBJ('tbr')) / 2) + Number(that.calculateDRBJ('jjc'))).toFixed(2);
            let JJCSUITEDRBJ = (rightSum + Number(that.calculateDRBJ('suite')) + Number(that.calculateDRBJ('jjc'))).toFixed(2);
            let GWCSUITEDRBJ = (rightSum + Number(that.calculateDRBJ('suite')) + Number(that.calculateDRBJ('gwc'))).toFixed(2);
            let GWCSGRDRBJ = (rightSum + Number(that.calculateDRBJ('sgr')) + Number(that.calculateDRBJ('gwc'))).toFixed(2);
            let GWCJSESDRBJ = (rightSum + Number(that.calculateDRBJ('jses')) + Number(that.calculateDRBJ('gwc'))).toFixed(2);

            airs.push({
                "code": "JJCTBR",
                "number": txtJJCTBRRS,
                "price": JJCTBRDRBJ,
                "costType": "A"
            });

            airs.push({
                "code": "JJCSGR",
                "number": txtJJCSGRRS,
                "price": JJCSGRDRBJ,
                "costType": "A"
            });

            airs.push({
                "code": "GWCSGR",
                "number": lblGWCSGRRS,
                "price": GWCSGRDRBJ,
                "costType": "A"
            });

            airs.push({
                "code": "GWCJSES",
                "number": txtGWCJSESRS,
                "price": GWCJSESDRBJ,
                "costType": "A"
            });

            airs.push({
                "code": "GWCSUITE",
                "number": txtGWCSUITERS,
                "price": GWCSUITEDRBJ,
                "costType": "A"
            });

            airs.push({
                "code": "JJCSUITE",
                "number": JJCSUITERS,
                "price": JJCSUITEDRBJ,
                "costType": "A"
            });


            var that = this;
            this.$axios.post('/api/Groups/ExportPriceCheckWordFile', { diid: this.diid, airs: airs }, {
                headers: {
                    'Authorization': this.token,
                }
            }).then(resp => {
                ////////console.log(resp, '------------------------------------');
                try {
                    if (resp.data.code != 200) {
                        throw resp.data.msg;
                    }
                    var file = resp.data.data;
                    that.fileDownload(file.data, file.strFileName);
                } catch (error) {
                    this.$message.error('操作失败！' + error.message);
                }
            })


        },
        fileDownload(data, filename) {
            let blob = this.base64toBlob(data);
            let link = document.createElement('a');
            link.href = window.URL.createObjectURL(blob);
            link.download = filename;
            link.click();
        },
        base64toBlob(base64, type = 'application/octet-stream') {
            const bstr = atob(base64);
            let n = bstr.length;
            const u8arr = new Uint8Array(n);
            while (n--) {
                u8arr[n] = bstr.charCodeAt(n);
            }
            return new Blob([u8arr], { type });
        },
        async GetGroupCostExcel() {

            ////////console.log(this.titleText, 'this.titleText');

            var isTrue = await this.save();
            if (!isTrue) {
                this.$message.error('请检查数据！');
                return;
            }

            var that = this;
            var group = this.options.filter(function (x) {
                return x.id == that.diid
            })

            if (group.length == 0) {
                this.$message.error('请选择团组！' + resp.data.msg);
                return;
            }

            var resultCurr = Number(this.AGroupCostParameter.currency);
            if (isNaN(resultCurr)) {
                resultCurr = this.AGroupCostParameter.currency;
            } else {
                for (let index = 0; index < this.currencyOption.length; index++) {
                    if (this.currencyOption[index].currencyId == resultCurr) {
                        resultCurr = this.currencyOption[index].currencyCode;
                    }
                }

            }

            var data = {
                diid: this.diid,
                costType: this.costTypevalue,
                title: {
                    groupNumber: Number(this.grouptitleinfo.visitPNumber),
                    teamName: group[0].groupName,
                    tax: this.AGroupCostParameter.tax,
                    currency: resultCurr,
                    rate: this.AGroupCostParameter.rate
                },
                leftInfo: {

                },
                rightInfo: {

                },
                titleModel: {

                }
            };
            var leftObject = this.GetDomLeftValue();
            var rightObject = this.GetDomRightValue();
            data.leftInfo = leftObject;
            data.rightInfo = rightObject;
            data.titleModel = this.titleText;

            ////////console.log(data);

            this.$axios.post('/api/Groups/ExportGroupCostExcelFile', data, {
                headers: {
                    'Authorization': this.token,
                }
            }).then(resp => {
                ////////console.log(resp, '------------------------------------');
                if (resp.data.code == 200) {
                    var file = resp.data.data;
                    that.fileDownload(file.data, file.strFileName);
                } else {
                    that.$message.error('操作失败！' + resp.data.msg);
                }
            })


        },
        GetDomLeftValue() {
            var AllResult = [];
            var boxDoms = document.querySelectorAll(".sheet-box .biaoge");
            var titleClassName = 'el-table__header-wrapper';
            var bodyClassName = 'el-table__body-wrapper';
            var result = [];
            for (var i = 0; i < boxDoms.length; i++) {
                var chiBoxs = boxDoms[i].children[0].children;
                var info = {};
                info.index = i;
                for (var j = 0; j < chiBoxs.length; j++) {
                    if (chiBoxs[j].className.indexOf(titleClassName) != -1) {
                        info.title = chiBoxs[j].querySelectorAll('thead tr th')[0].innerText;
                    } else if (chiBoxs[j].className.indexOf(bodyClassName) != -1) {
                        var title = info.title;
                        if (title.indexOf('酒店') != -1 || title.indexOf('地接') != -1 || title.indexOf('公务单人') != -1 || title.indexOf('零用金') != -1) {
                            info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span').innerText : '0';
                        } else {
                            info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('input').value : '0';
                        }
                        info.rs = chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input').value : '0';
                        info.xs = chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('input').value : '0';
                    }
                }
                result.push(info)
            }
            AllResult.push({ type: "A", leftinfoNumber: result })

            if (this.costTypevalue == 'B') {
                var boxDoms = document.querySelectorAll(".sheet-box .biaogeB");
                var result = [];
                for (var i = 0; i < boxDoms.length; i++) {
                    var chiBoxs = boxDoms[i].children[0].children;
                    var info = {};
                    info.index = i;
                    for (var j = 0; j < chiBoxs.length; j++) {
                        if (chiBoxs[j].className.indexOf(titleClassName) != -1) {
                            info.title = chiBoxs[j].querySelectorAll('thead tr th')[0].innerText;
                        } else if (chiBoxs[j].className.indexOf(bodyClassName) != -1) {
                            var title = info.title;
                            if (title.indexOf('酒店') != -1 || title.indexOf('地接') != -1 || title.indexOf('公务单人') != -1 || title.indexOf('零用金') != -1) {
                                info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span').innerText : '0';
                            } else {
                                info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('input').value : '0';
                            }
                            info.rs = chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input').value : '0';
                            info.xs = chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('input').value : '0';
                        }
                    }
                    result.push(info)
                }
                AllResult.push({ type: "B", leftinfoNumber: result })
            }

            return AllResult;
        },
        GetDomRightValue() {
            var AllResult = [];
            var boxDoms = document.querySelectorAll(".cabin-li .biaoge");
            var titleClassName = 'el-table__header-wrapper';
            var bodyClassName = 'el-table__body-wrapper';
            var result = [];
            for (var i = 0; i < boxDoms.length - 1; i++) {
                var chiBoxs = boxDoms[i].children[1].children;
                var info = {};
                info.index = i;
                for (var j = 0; j < chiBoxs.length; j++) {
                    if (chiBoxs[j].className.indexOf(titleClassName) != -1) {
                        info.title = boxDoms[i].children[0].innerText + chiBoxs[j].querySelectorAll('thead tr th')[0].innerText;
                    } else if (chiBoxs[j].className.indexOf(bodyClassName) != -1) {
                        info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span').innerText : '0';
                        info.rs = chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input').value : '0';
                        info.xs = chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('span').innerText : '0';
                        info.bj = chiBoxs[j].querySelectorAll('tbody tr td')[3].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[3].querySelector('span').innerText : '0';
                    }
                }
                result.push(info)
            }

            AllResult.push({ type: "A", rightInfoNumber: result })

            if (this.costTypevalue == 'B') {
                var boxDoms = document.querySelectorAll(".cabin-li .biaogeB");
                var result = [];
                for (var i = 0; i < boxDoms.length; i++) {
                    var chiBoxs = boxDoms[i].children[1].children;
                    var info = {};
                    info.index = i;
                    for (var j = 0; j < chiBoxs.length; j++) {
                        if (chiBoxs[j].className.indexOf(titleClassName) != -1) {
                            info.title = boxDoms[i].children[0].innerText + chiBoxs[j].querySelectorAll('thead tr th')[0].innerText;
                        } else if (chiBoxs[j].className.indexOf(bodyClassName) != -1) {
                            info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('span').innerText : '0';
                            info.rs = chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[1].querySelector('input').value : '0';
                            info.xs = chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('span').innerText : '0';
                            info.bj = chiBoxs[j].querySelectorAll('tbody tr td')[3].querySelector('span') ? chiBoxs[j].querySelectorAll('tbody tr td')[3].querySelector('span').innerText : '0';
                        }
                    }
                    result.push(info)
                }
                AllResult.push({ type: "B", rightInfoNumber: result })
            }



            return AllResult;
        },
        setLastTitle(list) {
            let summaryRow = document.querySelectorAll('.el-table__footer-wrapper .cell');
            for (var i = 0; i < summaryRow.length; i++) {
                let summaryRowOne = summaryRow[i];
                if (summaryRowOne.innerHTML == '总计:' || summaryRowOne.innerHTML == '——') {
                } else {
                    summaryRowOne.setAttribute('title', list[i]);
                }
            }

        },
        GetClientWord() {

            var that = this;
            var data = {
                "diid": this.diid,
                "costType": this.costTypevalue,
                "rate": this.AGroupCostParameter.rate,
                "carGuides1": "",
                "meal": "",
                "subsidizedMeals": "",
                "nightRepair": "",
                "attractionsTickets": "",
                "miscellaneousFees": "",
                "aTip": "",
                "tzZCost": "",
                "leftInfo": '',
            };

            var vehicleResult = this.GetDJLableBJ(this.vehicleLables);
            var DJMealResult = this.GetDJLableBJ(this.DJMeal);
            var SubsidizedMealsResult = this.GetDJLableBJ(this.SubsidizedMeals);
            var NightRepairResult = this.GetDJLableBJ(this.NightRepair);
            var AttractionsTicketsResult = this.GetDJLableBJ(this.AttractionsTickets);
            var DJMealResult = this.GetDJLableBJ(this.DJMeal);
            var ATipResult = this.GetDJLableBJ(this.ATipResult);
            data.leftInfo = this.GetDomLeftValue();
            // vehicleLables: ['VF', 'T/G OF', 'T/G S', 'T/G TF', 'C/F OF'],
            // DJMeal: ['B', 'L', 'D'],
            // SubsidizedMeals: ['T/G M', 'C/F M'],
            // NightRepair: ['T/G A'],
            // AttractionsTickets: ['T/G EF', 'EF'],
            // MiscellaneousFees: ['B/R/F', 'TE', 'T/L F'],
            // ATip: ['T/G T', 'DRV T'],


            if (this.costTypevalue === "B") {

                data.carGuides1 = "RMB A段费用 " + vehicleResult.sum + " B段费用 RMB" + vehicleResult.Bsum;
                data.meal = "RMB A段费用 " + DJMealResult.sum + " B段费用 RMB" + DJMealResult.Bsum;
                data.subsidizedMeals = "RMB A段费用 " + SubsidizedMealsResult.sum + " B段费用 RMB" + SubsidizedMealsResult.Bsum;
                data.nightRepair = "RMB A段费用 " + NightRepairResult.sum + " B段费用 RMB" + NightRepairResult.Bsum;
                data.attractionsTickets = "RMB A段费用 " + AttractionsTicketsResult.sum + " B段费用 RMB" + AttractionsTicketsResult.Bsum;
                data.miscellaneousFees = "RMB A段费用 " + DJMealResult.sum + " B段费用 RMB" + DJMealResult.Bsum;
                data.aTip = "RMB A段费用 " + ATipResult.sum + " B段费用 RMB" + ATipResult.Bsum;

            } else {
                data.carGuides1 = "RMB " + vehicleResult.sum;
                data.meal = "RMB " + DJMealResult.sum;
                data.subsidizedMeals = "RMB " + SubsidizedMealsResult.sum;
                data.nightRepair = "RMB " + NightRepairResult.sum;
                data.attractionsTickets = "RMB " + AttractionsTicketsResult.sum;
                data.miscellaneousFees = "RMB " + DJMealResult.sum;
                data.aTip = "RMB " + ATipResult.sum;
            }

            var cabinDatalLast = this.cabinDatal.filter(function (x) {
                return x.label == '团组预算明细'
            })

            data.tzZCost = cabinDatalLast[0].sheetInfo[0].gtroupQuotes;

            this.$axios.post('/api/Groups/ExportClientWordFile', data, {
                headers: {
                    'Authorization': this.token,
                }
            }).then(resp => {
                ////////console.log(resp, '------------------------------------');
                if (resp.data.code == 200) {
                    var file = resp.data.data;
                    that.fileDownload(file.data, file.strFileName);
                } else {
                    that.$message.error('操作失败！' + resp.data.msg);
                }
            })

        },
        insertRow(index, rowParam, oper) {

            var that = this;
            var row = {
                "diid": this.diid,
                "day": rowParam.day,
                "date": "",
                "itin": "",
                "carType": "",
                "carCost": "",
                "carNumber": "",
                "carTiming": "",
                "tgs": "",
                "tgwh": "",
                "tgn": "",
                "tgof": "",
                "tgm": "",
                "tga": "",
                "tgtf": "",
                "tgef": "",
                "cfs": "",
                "cfm": "",
                "cfof": "",
                "b": "",
                "l": "",
                "d": "",
                "tbr": "",
                "sgr": "",
                "jS_ES": "",
                "suite": "",
                "accon": "",
                "tv": "",
                "iL": "",
                "if": "",
                "ef": "",
                "b_R_F": "",
                "te": "",
                "tgTips": "",
                "drvTips": "",
                "pc": "",
                "tlf": "",
                "ect": "",
                "id": 1,
                "gwCount": "",
                "fyCount": "",
                "efr": "",
            };

            if (oper == 'UP') {
                if (rowParam.date) {
                    row.date = this.addOneDay(rowParam.date, -1);
                }
                that.tableData.splice(index, 0, row)
            } else {
                if (rowParam.date) {
                    row.date = this.addOneDay(rowParam.date, 1);
                }
                that.tableData.splice(index + 1, 0, row)
            }

            ////////console.log('that.tableData', that.tableData)
            var thisDay = 1;
            for (var i = 0; i < that.tableData.length; i++) {
                ////////console.log("iiiiiiiiiiiiiiii", i, Number(that.tableData.day))
                if (Number(that.tableData[i].day) > 0) {
                    that.tableData[i].day = thisDay;
                    thisDay++;
                }
            }
        },
        Dataformat() {
            var that = this;
            var oldSoure = JSON.stringify(that.tableData);
            var souer = {
                "diid": this.diid,
                "day": "-",
                "date": "",
                "itin": "",
                "carType": "",
                "carCost": 0,
                "carNumber": 0,
                "carTiming": 0,
                "tgs": 0,
                "tgwh": 0,
                "tgn": 0,
                "tgof": 0,
                "tgm": 0,
                "tga": 0,
                "tgtf": 0,
                "tgef": 0,
                "cfs": 0,
                "cfm": 0,
                "cfof": 0,
                "b": 0,
                "l": 0,
                "d": 0,
                "tbr": 0,
                "sgr": 0,
                "jS_ES": 0,
                "suite": 0,
                "accon": "",
                "tv": 0,
                "iL": 0,
                "if": 0,
                "ef": 0,
                "b_R_F": 0,
                "te": 0,
                "tgTips": 0,
                "drvTips": 0,
                "pc": 0,
                "tlf": 0,
                "ect": 0,
                "id": 1,
                "gwCount": "",
                "fyCount": "",
                "efr": "",
            };
            var numberList = [];
            for (var key in souer) {
                if (typeof souer[key] == 'number') {
                    numberList.push(key);
                }
            }

            ////////console.log(numberList, "numberList!");
            ////////console.log(that.tableData, "that.tableData!");
            for (var i = 0; i < that.tableData.length; i++) {
                that.tableData[i].day = that.tableData[i].day.toString();
                for (var j = 0; j < numberList.length; j++) {
                    if (that.tableData[i][numberList[j]] === "") {
                        ////////console.log(i + "行数据异常!", numberList[j]);
                        that.tableData[i][numberList[j]] = 0;
                    }
                }
            }

            var NewSoure = [...that.tableData];
            that.tableData = JSON.parse(oldSoure);
            return NewSoure;
        },
        dateChange(val, index) {
            const regex = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/
            if (!regex.test(val)) {
                this.$message.error('日期格式不正确!应该为YYYY-MM-DD格式!');
                this.tableData[index].date = "";
            }
        },
        GetDJLableBJ(lableList) {
            var that = this;
            var result = { sum: 0, Bsum: 0 };
            if (typeof lableList != "object" || lableList['length'] == undefined) {
                return result
            }

            let Djsum = 0;
            let BDjsum = 0;
            for (var i = 0; i < lableList.length; i++) {
                that.sumTopPrice.forEach(function (item1) {
                    if (lableList[i] == item1.label) {
                        var Aprice = Number(item1.Aprice);
                        if (!isNaN(Aprice)) {
                            Djsum += Aprice;
                        }

                        var Bprice = Number(item1.Bprice);
                        if (!isNaN(Bprice)) {
                            BDjsum += Bprice;
                        }
                    }
                })
            }

            Djsum = Djsum * this.AGroupCostParameter.rate * this.AGroupCostParameter.djxs;
            BDjsum = BDjsum * this.AGroupCostParameter.rate * this.BGroupCostParameter.djxs;
            if (isNaN(Djsum)) {
                Djsum = 0;
            }

            if (isNaN(BDjsum)) {
                BDjsum = 0;
            }

            result.sum = Djsum.toFixed(2);
            result.Bsum = BDjsum.toFixed(2);

            return result;
        },
        handleChange(currentValue, oldValue) {
            ////////console.log(currentValue, oldValue);
            if (currentValue == undefined) {

            }
        },
        GetWeek(date) {
            if (date) {
                try {
                    var myDate = new Date(date);
                    var myDay = myDate.getDay();//获取存储当前日期
                    var weekday = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
                    return weekday[myDay];
                } catch (e) {
                    ////////console.log("时间格式不正确！")
                    return "时间格式不正确!";
                }
            }
            return '';
        },
        confirm() {
            debugger;
            this.outerVisible = false;
            if (this.dialogSelectObject == null) {
                this.dialogSelectObject = {};
            }

            if (Object.keys(this.dialogSelectObject).length != 0) {

                const possibleDialogTitles = ['选择车导数据', '导游信息', '选择车数据', '景点信息'];
                const indexBtn = possibleDialogTitles.indexOf(this.DialogTitle);
                if (indexBtn != -1) {
                    if (indexBtn == 0) {
                        this.bindCD();
                    } else if (indexBtn == 1) {
                        this.bindDY();
                    } else if (indexBtn == 2) {
                        this.bindCSJ();
                    } else if (indexBtn == 3) {
                        this.bindJD();
                    }
                }
            }

            this.dialogSelectObject = {};
        },
        bindCD() {
            debugger;
            var offer = this.dialogSelectObject.offer.match(/\d+/g) != null ? Number(this.dialogSelectObject.offer.match(/\d+/g)[0]) : 0;
            var cgCost = this.dialogSelectObject.cgCost.match(/\d+/g) != null ? Number(this.dialogSelectObject.cgCost.match(/\d+/g)[0]) : 0;
            var cgOvertimeFee = this.dialogSelectObject.cgOvertimeFee.match(/\d+/g) != null ? Number(this.dialogSelectObject.cgOvertimeFee.match(/\d+/g)[0]) : 0;
            var overtimeFee = this.dialogSelectObject.overtimeFee.match(/\d+/g) != null ? Number(this.dialogSelectObject.overtimeFee.match(/\d+/g)[0]) : 0;
            var runingTime = this.dialogSelectObject.runingTime.match(/\d+/g) != null ? Number(this.dialogSelectObject.runingTime.match(/\d+/g)[0]) : 0;
            var row = this.tableData[this.rowIndex];
            var carNumber = row.carNumber;
            row['carCost'] = (carNumber * offer).toFixed(2);
            row['tgs'] = cgCost.toFixed(2);
            row['carTiming'] = runingTime.toFixed(2);
            var carType = this.dialogSelectObject.city + "/" + this.dialogSelectObject.carType + "/" + this.dialogSelectObject.serviceType + "\n";
            row['carType'] = carType;
        },
        bindDY() {
            debugger;
            var row = this.tableData[this.rowIndex];
            var tgn = row.tgn;
            var price = this.dialogSelectObject.price.match(/\d+/g) != null ? Number(this.dialogSelectObject.price.match(/\d+/g)[0]) : 0;
            var translationPrice = this.dialogSelectObject.translationPrice.match(/\d+/g) != null ? Number(this.dialogSelectObject.translationPrice.match(/\d+/g)[0]) : 0;
            var when = this.dialogSelectObject.when.match(/\d+/g) != null ? Number(this.dialogSelectObject.when.match(/\d+/g)[0]) : 0;

            row['tgs'] = (tgn * price).toFixed(2);
            row['if'] = translationPrice.toFixed(2);
            row['tgwh'] = when.toFixed(2);
        },
        bindCSJ() {
            debugger;
            var row = this.tableData[this.rowIndex];
            var carType = this.dialogSelectObject.city + "/" + this.dialogSelectObject.carType + "/" + this.dialogSelectObject.serviceType + "\n";
            var toPrice = this.dialogSelectObject.price.match(/\d+/g) != null ? Number(this.dialogSelectObject.price.match(/\d+/g)[0]) : 0;
            var when = this.dialogSelectObject.when.match(/\d+/g) != null ? Number(this.dialogSelectObject.when.match(/\d+/g)[0]) : 0;
            row['carType'] = carType;
            row['carCost'] = toPrice.toFixed(2);
            row['carTiming'] = when.toFixed(2);

        },
        bindJD() {
            debugger;
            var row = this.tableData[this.rowIndex];
            var Price = this.dialogSelectObject.price;
            row['ef'] = Price.toFixed(2);
        },
        QueryRate() {
            var url = "/api/Business/PostGroupTeamRateByDiIdAndCTableId"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' + that.token
                },
                data: {
                    "portType": 1,
                    "diId": this.diid,
                    "cTable": 85
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    //汇率
                    //////console.log("汇率--", res.data.data);
                    that.currencyOption = res.data.data.teamRates;
                }
            })


        },
        changeCurrency(data) {
            //////console.log('data', data);
            for (let index = 0; index < this.currencyOption.length; index++) {
                if (this.currencyOption[index].currencyId == data) {
                    this.AGroupCostParameter.rate = this.currencyOption[index].rate;
                    break;
                }
            }
        },
        inSelectChangeCheck() {
            //////console.log('inSelectChangeCheck');
            var arr = [];
            var pusharr = [];
            var topArr = [];
            var topPushArr = [];
            if (this.costTypevalue == 'A') {
                var defaultP = this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0];

                if (defaultP.sgr == 0) {
                    arr.push('酒店SGR');
                    topArr.push('SGR')
                } else {
                    pusharr.push('酒店SGR');
                    topPushArr.push('SGR')
                }
                if (defaultP.tbr == 0) {
                    arr.push('酒店TBR');
                    topArr.push('TBR')
                } else {
                    pusharr.push('酒店TBR');
                    topPushArr.push('TBR')
                }
                if (defaultP.jses == 0) {
                    arr.push('酒店JSES');
                    topArr.push('JS/ES')
                } else {
                    pusharr.push('酒店JSES');
                    topPushArr.push('JS/ES')
                }
                if (defaultP.suite == 0) {
                    topArr.push('SUITE')
                    arr.push('酒店SUITE');
                }
                else {
                    pusharr.push('酒店SUITE');
                    topPushArr.push('SUITE')
                }
            } else {
                var HotelA = this.costTypeHotelNumbers.filter(item => item.type == 'A')[0];
                var HotelB = this.costTypeHotelNumbers.filter(item => item.type == 'B')[0];
                if (HotelA.sgr == 0 && HotelB.sgr == 0) { arr.push('酒店SGR'); } else {
                    pusharr.push('酒店SGR');
                }
                if (HotelA.tbr == 0 && HotelB.tbr == 0) { arr.push('酒店TBR'); } else {
                    pusharr.push('酒店TBR');
                }
                if (HotelA.jses == 0 && HotelB.jses == 0) { arr.push('酒店JSES'); } else {
                    pusharr.push('酒店JSES');
                }
                if (HotelA.suite == 0 && HotelB.suite == 0) { arr.push('酒店SUITE'); } else {
                    pusharr.push('酒店SUITE');
                }

            }

            var leftCheck = this.CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues;
            var topCheck = this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues;
            var resultArr = leftCheck.filter(item => !arr.includes(item));
            var topResultArr = topCheck.filter(item => !topArr.includes(item));
            resultArr = [...resultArr, ...pusharr];
            resultArr = [...new Set(resultArr)];
            //////console.log('resultArr', resultArr);
            topResultArr = [...topResultArr, ...topPushArr];
            topResultArr = [...new Set(topResultArr)];
            this.CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues = resultArr;
            this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues = topResultArr;
        },
        GivePeopleNumber() {
            var number = this.grouptitleinfo.visitPNumber;
            if (this.AGroupCostParameter.visaRS == 0) {
                this.AGroupCostParameter.visaRS = number;
            }
            if (this.AGroupCostParameter.bxrs == 0) {
                this.AGroupCostParameter.bxrs = number;
            }
            if (this.AGroupCostParameter.djrs == 0) {
                this.AGroupCostParameter.djrs = number;
            }
            if (this.AGroupCostParameter.lyjrs == 0) {
                this.AGroupCostParameter.lyjrs = number;
            }
            if (this.AGroupCostParameter.gwrs == 0) {
                this.AGroupCostParameter.gwrs = number;
            }
        },
        lableSetPrice(lable, total, single) {
            //遍历this.columnTotalData
            for (var i = 0; i < this.columnTotalData.length; i++) {
                if (this.columnTotalData[i].label == lable) {
                    this.columnTotalData[i].totalPrice = total;
                    this.columnTotalData[i].singlePrice = single;
                    break
                }
            }
        },
        BlableSetPrice(lable, total, single) {
            for (var i = 0; i < this.columnTotalData.length; i++) {
                if (this.columnTotalData[i].label == lable) {
                    var aT = Number(this.columnTotalData[i].totalPrice).toFixed(2);
                    var aS = Number(this.columnTotalData[i].singlePrice).toFixed(2);
                    if (!isNaN(aT)) {
                        this.columnTotalData[i].totalPrice = 'A段费用' + aT + '\r\n B段费用' + total;
                    }
                    if (!isNaN(aS)) {
                        this.columnTotalData[i].singlePrice = 'A段费用' + aS + '\r\n B段费用' + single;
                    }
                    break
                }
            }
        },
        importBlackCode() {
            this.blackCodeSelect = '';
            this.gridData = [];
            var url = "/api/Groups/CraeteGroupCostTravel"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' + that.token
                },
                data: {
                    "diid": that.diid,
                }
            }).then(function (resp) {
                if (resp.data.code == 200) {
                    ////console.log('CraeteGroupCostTravelResponse', resp.data.data);
                    //that.gridData = resp.data.data.groupCost;
                    that.blackCodeIsTrue = resp.data.data.blackCodeIsTrue;
                    if (that.blackCodeIsTrue) {
                        that.dialogTableVisible = true;
                        that.blackCodeListSeLect = resp.data.data.blackCodeListSelect;
                        //console.log('that.blackCodeListSeLect', that.blackCodeListSeLect);
                    } else {
                        that.$message.error("机票数据未录入！");
                    }
                    // that.tableData = resp.data.data.groupCost;
                    // for (var i = 0; i < that.tableData.length; i++) {
                    //     for (var prop in that.tableData[i]) {
                    //         if (that.tableData[i][prop] == 0) {
                    //             that.tableData[i][prop] = ''
                    //         }
                    //     }
                    // }
                } else {
                    that.$message.error("黑屏代码有误！" + resp.data.msg);
                }
            })

        },
        //机票行程确认赋值
        confirmationTP() {

            if (this.gridData.length == 0) {
                this.$message.error("此机票代码无行程！");
                return
            }

            this.tableData = this.gridData;
            for (var i = 0; i < this.tableData.length; i++) {
                for (var prop in this.tableData[i]) {
                    if (this.tableData[i][prop] == 0) {
                        this.tableData[i][prop] = ''
                    }
                }
            }
            this.dialogTableVisible = false;
        },
        //监听鼠标
        MonitorMouse() {
            document.onmousemove = (event) => {
                let x1 = event.clientX
                let y1 = event.clientY
                if (this.x !== x1 || this.y !== y1) {
                    this.setTimer();
                }
                this.x = x1
                this.y = y1
            }
        },
        //监听键盘
        MonitorKeyboard() {
            document.onkeydown = () => {
                this.setTimer();
            }
        },
        //取消定时器
        clearTimer() {
            clearTimeout(window.myTimer)
            window.myTimer = null
            //取消监听
            document.onmousemove = null;
            document.onkeydown = null;
        },
        //定时调用函数
        setTimer() {
            this.count = 0
            const mm = 1000 * 60;
            if (window.myTimer) {
                try {
                    clearTimeout(window.myTimer);
                } catch (e) {
                    ////console.log("setTimerMessage", e.message);
                }
            }
            window.myTimer = setInterval(this.SaveAndLogOut, mm * 30);
        },
        SaveAndLogOut() {
            this.save().then(() => {
                this.$router.push({ name: 'Login' })
                localStorage.removeItem("userinif");
                this.$message({
                    type: 'success',
                    message: '已退出!'
                });
                ////console.log("保存成功,已退出!");
            }).catch(e => {
                ////console.log(e);
                //console.log("保存失败,仅停止自动保存!");
                clearInterval(this.autoSave);
            })
        },
        TimeUpdateAnewOrderby(index) {
            if (index == 0 && this.tableData.length > 0) {
                var start = this.tableData[0].date;
                for (var i = 0; i < this.tableData.length; i++) {
                    if (this.tableData[i].date) {
                        this.tableData[i].date = start;
                        start = this.addOneDay(start, 1)
                    }
                }
            }
        },
        //团组询价列表
        PostHotelInquiryPageItem() {
            var url = "/api/Groups/PostHotelInquiryPageItem"
            var that = this
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' + this.token
                },
                data: {
                    portType: 1,
                    pageIndex: 1,
                    pageSize: 100,
                    diId: that.diid,
                }
            }).then(function (res) {
                that.tableDatas = [];
                if (res.data.code == 200) {
                    that.dialogTableVisibleXJ = true;
                    that.tableDatas = res.data.data;
                    that.checkboxsXJ = [];
                    that.hotelIsTrue = res.data.data.length > 0 ? true : false;
                    ////console.log(res);
                } else {
                    that.$message.error(res.data.msg);
                }
            })
        },
        CheckboxChangeXJ(val) {
            var isFind = this.checkboxsXJ.includes(val);
            if (isFind) {
                this.checkboxsXJ.splice(this.checkboxsXJ.indexOf(val), 1);
            } else {
                this.checkboxsXJ.push(val);
            }
        },
        adoptHotelData() {
            var selectArr = this.tableDatas.filter((x) => {
                return this.checkboxsXJ.includes(x.id);
            });
            //////console.log(selectArr,'selectArr-----------------------');
            if (selectArr.length != 0) {
                for (var i = 0; i < selectArr.length; i++) {
                    var startTime = this.addOneDay(selectArr[i].checkInDate, 0);
                    var endTime = this.addOneDay(selectArr[i].checkOutDate, 0);
                    if (startTime) {
                        var flitertabs = this.tableData.filter((x) => {
                            var cuo = new Date(x.date).getTime();
                            return cuo >= new Date(startTime).getTime() && cuo < new Date(endTime).getTime();
                        })

                        for (var j = 0; j < flitertabs.length; j++) {
                            flitertabs[j].accon = selectArr[i].name;
                            flitertabs[j].sgr = selectArr[i].singlePrice * selectArr[i].singleQuantity;
                            flitertabs[j].tbr = selectArr[i].doublePrice * selectArr[i].doubleQuantity;
                            flitertabs[j].jS_ES = selectArr[i].suitePrice * selectArr[i].suiteQuantity;
                            flitertabs[j].suite = selectArr[i].otherPrice * selectArr[i].otherQuantity;
                        }
                        ////console.log('flitertabs',flitertabs);
                    }
                }
                this.dialogTableVisibleXJ = false;
            } else {
                this.$message.error("请选择数据！");
            }
        },
        GetHistoryCarData(index) {
            this.historyCarInput = this.grouptitleinfo.visitCountry;
            this.historyCarDialog = true;
            this.pageSize = 7;
            this.historyCarIndex = index;
            this.historyCarSearch();
        },
        historyCarSearch() {
            var url = "/api/Groups/GetHistoryCarData";
            var that = this;
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' + this.token
                },
                data: {
                    param: this.historyCarInput
                }
            }).then(function (res) {
                that.historyCarData = [];
                if (res.data.code == 200) {
                    //console.log(res.data.data)
                    that.historyCarData = res.data.data;
                } else {
                    that.$message.error(res.data.msg);
                }
            })
        },
        dialogClose() {
            this.pageSize = 5;
            this.currentPage = 1;
        },
        historyCarChange(row, oldrow) {
            ////console.log(row, oldrow);
            this.historyCarSelectObject = row;
        },
        historyCarYes() {
            ////console.log(this.historyCarSelectObject,'historyCarSelectObject');
            if (this.historyCarIndex != -1) {
                this.tableData[this.historyCarIndex].carCost = this.historyCarSelectObject.dayPrice;
            }
            this.historyCarDialog = false;
        },
        //获取客户名单info
        PostTourClientListByDiId(id) {
            var that = this
            var url = "/api/Groups/PostTourClientListByDiId"
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' + that.token
                },
                data: {
                    portType: 1,
                    diid: id,
                    pageId: 104,
                    userId: that.userId
                }
            }).then(function (res) {
                if (res.data.code == 200) {
                    that.rollcallarr = res.data.data;
                    that.hideAirInfo();
                }
            })
        },
        //fenge
        fgarr(val) {
            val = val + ""
            return val.split(' ')[0]
        },
        //拼音
        pinyingxing(val) {
            return pinyin(val, { toneType: 'none' }).toUpperCase();
        },
        UserMount() {
            Array.prototype.whereToList = function (callback) {
                if (!callback) return this;
                if (typeof callback !== 'function') return this;
                var list = [];
                for (let index = 0; index < this.length; index++) {
                    if (callback(this[index])) {
                        list.push(this[index])
                    }
                }
                return list;
            };

            Array.prototype.firstWhere = function (callback) {
                if (!callback) return this;
                if (typeof callback !== 'function') return this;
                for (let index = 0; index < this.length; index++) {
                    if (callback(this[index])) {
                        return this[index]
                    }
                }
                return null;
            };
        },
        //重新获取人数
        getGroupInfo() {
            return new Promise((resolve, reject) => {
                var url = "/api/Groups/GetGroupInfo"
                if (this.diid != undefined) {
                    this.$axios({
                        method: 'post',
                        url: url,
                        headers: {
                            Authorization: 'Bearer ' + this.token
                        },
                        data: {
                            portType: 1,
                            id: this.diid
                        }
                    }).then((res) => {
                        ////console.log(res);
                        if (res.data.code == 200) {

                            this.groupInfoEditData = {
                                visitDate: res.data.data.visitDate,
                                visitPNumber: res.data.data.visitPNumber,
                                visitDays: res.data.data.visitDays,
                            }

                            if (this.grouptitleinfo.visitPNumber != res.data.data.visitPNumber) {
                                this.grouptitleinfo.visitPNumber = res.data.data.visitPNumber;
                                resolve(true);
                            } else {
                                resolve(false);
                            }
                        } else {
                            resolve(false);
                        }
                    })
                }
            })
        },
        blackCodeSelectChange(val) {
            //获取行程
            var that = this
            var url = "/api/Groups/CraeteGroupCostTravelById"
            this.$axios({
                method: 'post',
                url: url,
                headers: {
                    Authorization: 'Bearer ' + that.token
                },
                data: {
                    diid: this.diid,
                    BlackCodeId: val
                }
            }).then(function (res) {
                //console.log(res, "res");
                if (res.data.code == 200) {
                    that.gridData = res.data.data.groupCost;
                    //console.log('that.gridData', that.gridData);
                } else {
                    that.gridData = [];
                    that.$message.error("此行程代码有误！");
                }
            })
        },
        remoteMethod(query) {
            if (true) {
                this.selectLoading = true;

                this.$axios.post('/api/Groups/SearchGroupByKeyword', {
                    Keyword: query,
                }, {
                    headers: {
                        'Authorization': this.token,
                    },
                }).then(resp => {
                    if (resp.data.code == 200) {
                        this.options = resp.data.data;
                    } else if (resp.data.code == 201) {
                        this.options = [];
                    } else {
                        //js抛异常
                        throw new Error(resp.data.msg);
                    }
                }).catch(err => {
                    this.$message.error('网络异常！');

                }).finally(() => {
                    this.selectLoading = false;
                })


            }
        },
        GroupSelectFocus() {
            if (this.options.length == 0) {
                this.remoteMethod("")
            }
        },
        async CopyGroupCost() {

            if (this.costTypevalue == 'A') {
                var sgrfilter = this.costTypeHotelNumbers.filter(x => {
                    return x.type == 'Default'
                })[0];
                var pNumber = 0;
                //遍历 sgrfilter对象
                for (var key in sgrfilter) {
                    var parNumber = Number(sgrfilter[key]);
                    if (isNaN(parNumber)) {
                        parNumber = 0;
                    } else {
                        if (key == 'tbr') {
                            pNumber += parNumber * 2;
                        }
                        if (key == 'sgr') {
                            pNumber += parNumber;
                        }
                        if (key == 'jses') {
                            pNumber += parNumber;
                        }
                        if (key == 'suite') {
                            pNumber += parNumber;
                        }
                    }
                }

                var isChange = await this.getGroupInfo();
                if (isChange) {
                    var number = this.grouptitleinfo.visitPNumber;
                    this.AGroupCostParameter.visaRS = number;
                    this.AGroupCostParameter.bxrs = number;
                    this.AGroupCostParameter.djrs = number;
                    this.AGroupCostParameter.gwrs = number;
                    this.AGroupCostParameter.lyjrs = number;
                }

                ////console.log(pNumber, 'pNumber-------------');
                if (this.grouptitleinfo.visitPNumber != pNumber) {
                    this.$message.error('团组人数与房间人数不一致！')
                    return resolve(false);
                }
            }

            var that = this;
            var Data = { diid: this.diid, userid: this.userId };
            var isTrue = await this.formVerify();
            if (isTrue) {
                Data.checkBoxs = this.CheckBoxListSelect.map(x => {
                    return {
                        diid: x.diid,
                        cbType: x.cbType,
                        cbValues: x.cbValues.join(',')
                    };
                });

                Data.groupCosts = this.tableData;
                Data.costTypeHotelNumbers = this.costTypeHotelNumbers.map(x => {
                    return {
                        id: x.id,
                        sgr: x.sgr,
                        tbr: x.tbr,
                        jses: x.jses,
                        suite: x.suite,
                        type: x.type,
                        diid: that.diid
                    };
                });

                this.AGroupCostParameter.currency = this.AGroupCostParameter.currency.toString();
                this.AGroupCostParameter.diId = this.diid;
                this.BGroupCostParameter.diId = this.diid;

                var Aparam = Object.assign({}, this.AGroupCostParameter);
                var Bparam = Object.assign({}, this.BGroupCostParameter);
                if (that.AGroupCostParameter.costTypeStartTime) {
                    Aparam.costTypeStartTime = this.addOneDay(that.AGroupCostParameter.costTypeStartTime, 0);
                }
                if (that.AGroupCostParameter.costTypeendTime) {
                    Aparam.costTypeendTime = this.addOneDay(that.AGroupCostParameter.costTypeendTime, 0);
                }
                if (that.BGroupCostParameter.costTypeStartTime) {
                    Bparam.costTypeStartTime = this.addOneDay(that.BGroupCostParameter.costTypeStartTime, 0);
                }
                if (that.BGroupCostParameter.costTypeendTime) {
                    Bparam.costTypeendTime = this.addOneDay(that.BGroupCostParameter.costTypeendTime, 0);
                }
                if (this.costTypevalue == "A") {
                    Data.groupCostParameters = [Aparam];
                } else {
                    Data.groupCostParameters = [Aparam, Bparam];
                }

                var ResultCostArr = this.Dataformat();
                Data.groupCosts = ResultCostArr;
                Data.ToGroupId = this.dialogCopySelect;
                ////////console.log(Data, "save-------Data");

                var that = this;
                this.$axios.post('/api/Groups/CopyGroupCost', Data, {
                    headers: {
                        'Authorization': that.token,
                    }
                }).then(resp => {

                    if (resp.data.code == 200) {
                        this.$message({
                            message: '复制成功！',
                            type: 'success'
                        });
                    } else {
                        this.$message.error('复制失败！' + resp.data.msg);
                    }

                    var result = Number(that.AGroupCostParameter.currency);
                    if (isNaN(result)) {

                    } else {
                        that.AGroupCostParameter.currency = result;
                    }
                }).finally(() => {
                    this.dialogCopyVisible = false;
                })

            } else {
                this.dialogCopyVisible = false;
                this.$message.error('请将本团组完善！');
            }
        },
        EditGroupInfoEv() {

            //表单校验
            var globalValid = false;
            this.$refs.groupInfoEditData.validate((valid) => {
                globalValid = valid;
            });

            if (!globalValid) {
                this.$message.error('请将数据完善！');
                return;
            }

            var that = this;
            this.groupInfoEditData.diid = this.diid;
            this.$axios.post('/api/Groups/GroupCostEditGroupInfo', this.groupInfoEditData, {
                headers: {
                    'Authorization': that.token,
                }
            }).then(async (res) => {

                if (res.data.code == 200) {
                    this.showEditGroupInfoDialog = false;
                    // this.$message({
                    //     message: '保存成功！',
                    //     type: 'success'
                    // })

                    var Data = { diid: this.diid, userid: this.userId };
                    var isTrue = await this.formVerify();
                    if (isTrue) {
                        Data.checkBoxs = this.CheckBoxListSelect.map(x => {
                            return {
                                diid: x.diid,
                                cbType: x.cbType,
                                cbValues: x.cbValues.join(',')
                            };
                        });

                        Data.groupCosts = this.tableData;
                        Data.costTypeHotelNumbers = this.costTypeHotelNumbers.map(x => {
                            return {
                                id: x.id,
                                sgr: x.sgr,
                                tbr: x.tbr,
                                jses: x.jses,
                                suite: x.suite,
                                type: x.type,
                                diid: this.diid
                            };
                        });

                        this.AGroupCostParameter.currency = this.AGroupCostParameter.currency.toString();
                        this.AGroupCostParameter.diId = this.diid;
                        this.BGroupCostParameter.diId = this.diid;

                        var Aparam = Object.assign({}, this.AGroupCostParameter);
                        var Bparam = Object.assign({}, this.BGroupCostParameter);
                        if (this.AGroupCostParameter.costTypeStartTime) {
                            Aparam.costTypeStartTime = this.addOneDay(this.AGroupCostParameter.costTypeStartTime, 0);
                        }
                        if (this.AGroupCostParameter.costTypeendTime) {
                            Aparam.costTypeendTime = this.addOneDay(this.AGroupCostParameter.costTypeendTime, 0);
                        }
                        if (this.BGroupCostParameter.costTypeStartTime) {
                            Bparam.costTypeStartTime = this.addOneDay(this.BGroupCostParameter.costTypeStartTime, 0);
                        }
                        if (this.BGroupCostParameter.costTypeendTime) {
                            Bparam.costTypeendTime = this.addOneDay(this.BGroupCostParameter.costTypeendTime, 0);
                        }
                        if (this.costTypevalue == "A") {
                            Data.groupCostParameters = [Aparam];
                        } else {
                            Data.groupCostParameters = [Aparam, Bparam];
                        }

                        var ResultCostArr = this.Dataformat();
                        Data.groupCosts = ResultCostArr;
                        ////////console.log(Data, "save-------Data");

                        this.$axios.post('/api/Groups/SaveGroupCost', Data, {
                            headers: {
                                'Authorization': this.token,
                            }
                        }).then(resp => {
                            ////////console.log(resp.data.data, '------------------------------------');
                            if (resp.data.code == 200) {
                                this.$message({
                                    message: '保存成功！',
                                    type: 'success'
                                });

                                //刷新页面
                                var costLoadData = localStorage.getItem('costLoadData');
                                if (costLoadData) {
                                    var JSONP = JSON.parse(costLoadData);
                                    var diidP = Number(JSONP.diid);
                                    this.loadData(isNaN(diidP) ? -1 : diidP);
                                } else {
                                    this.loadData(-1);
                                }

                            } else {
                                this.$message.error('保存失败！' + resp.data.msg);

                            }

                            var result = Number(this.AGroupCostParameter.currency);
                            if (isNaN(result)) {

                            } else {
                                this.AGroupCostParameter.currency = result;
                            }
                        })

                    } else {
                        this.$message.error('请输入完整！');
                    }

                } else {
                    this.$message.error("操作失败" + res.data.msg);
                }
            }).catch((error) => {
                this.$message.error("操作失败" + error);
            })


        },
        hideAirInfo() {

            var settomgAir = [
                //{ key: "经济舱", text: "经济舱单人成本(CNY)" },
                { key: "公务舱", text: "公务舱单人成本(CNY)" },
                { key: "头等舱", text: "头等舱单人成本(CNY)" }
            ];

            var hideAirInfoArr = [];
            for (var j = 0; j < settomgAir.length; j++) {
                var first = this.rollcallarr.firstWhere(x => x.shippingSpaceType == settomgAir[j].key);
                if (!first) {
                    hideAirInfoArr.push(settomgAir[j].text)
                }
            }

            const container = document.getElementsByClassName('sheet-box')[0];

            if (container) {

                container.querySelectorAll('.biaoge').forEach((item) => {
                    item.style.display = 'block';
                })

                console.log(this.rollcallarr.length, 'this.rollcallarr.length');
                if (this.rollcallarr.length == 0) {
                    return;
                }

                if (this.costTypevalue == 'B') {
                    container.querySelectorAll('.biaogeB').forEach((item) => {
                        item.style.display = 'block';
                    })
                    hideAirInfoArr = [...hideAirInfoArr, ...hideAirInfoArr];
                }

                hideAirInfoArr.forEach((item) => {
                    var elem = null;
                    const elementsInContainer = container.querySelectorAll('*');
                    elementsInContainer.forEach((element) => {
                        if (element.textContent == item && element.textContent) {
                            if (!this.isElementHidden(element)) {
                                //console.log('找到包含内容且未隐藏的元素:', element);
                                if (elem == null) {
                                    elem = element;
                                    return
                                }
                            }
                        }
                    });

                    if (elem && elem.tagName == 'TH') {

                        const targetClassName = 'biaoge';
                        let parent = elem;
                        let hasParentWithClass = false;

                        while (parent) {
                            var isBool = parent.classList && parent.classList.contains(targetClassName);

                            if (this.costTypevalue == 'B' && !isBool) {
                                isBool = parent.classList && parent.classList.contains('biaogeB');
                            }

                            if (isBool) {
                                hasParentWithClass = true;
                                parent.style.display = 'none';
                                break;
                            }
                            parent = parent.parentElement; // 移动到上一级父容器
                        }
                    }
                })

            } else {
                console.log('未找到指定的容器');
            }
        },
        isElementHidden(element) {
            if (element.style.display === 'none') {
                return true;
            }

            if (element.hidden) {
                return true;
            }

            if (element.style.visibility === 'hidden') {
                return true;
            }

            if (element.offsetParent === null) {
                return true;
            }

            return false;
        },
        QueryGroupCostXS() {

            this.groupcostXSList = [];
            var Data = {
                diid: this.diid,
                VisaCB: this.AGroupCostParameter.visaCB,
                VisaRS: this.AGroupCostParameter.visaRS,
                HCPCB: this.AGroupCostParameter.hcpcb,
                JJCCB: this.AGroupCostParameter.jjccb,
                GWCCB: this.AGroupCostParameter.gwccb,
                TDCCB: this.AGroupCostParameter.tdccb,
                DJRS: this.AGroupCostParameter.djrs,
                LYJRS: this.AGroupCostParameter.lyjrs
            }

            this.$axios.post('/api/Groups/QueryGroupCostCoefficient', Data, {
                headers: {
                    'Authorization': this.token,
                }

            }).then(resp => {
                this.groupcostXSList = resp.data.data.filter(item => item.value !== 0);
            })

        },
        groupcostXSSet() {
            for (let index = 0; index < this.groupcostXSList.length; index++) {
                if (this.AGroupCostParameter[this.groupcostXSList[index].key.toLowerCase()] != undefined) {
                    this.AGroupCostParameter[this.groupcostXSList[index].key.toLowerCase()] = this.groupcostXSList[index].value;
                } else {
                    console.log(this.groupcostXSList[index].key.toLowerCase() + "属性未找到");
                }
            }
            this.groupcostXSVisible = false;
        }
    },
    updated() {
        this.$emit('transfer', true)
    },
    destroyed() {
        this.$emit('transfer', false)
        clearInterval(this.autoSave);
    },
    mounted() {
        this.token = JSON.parse(localStorage.getItem('userinif')).token;
        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
        var costLoadData = localStorage.getItem('costLoadData');
        const mm = 1000 * 60;
        if (this.userId == 21) {
            this.autoSave = setInterval(() => {
                this.$message.success('自动保存中...');
                setTimeout(() => {
                    this.save();
                }, 100);
            }, mm * 10);

            this.MonitorMouse();
            this.MonitorKeyboard();
            this.setTimer();
        }

        document.querySelectorAll('.el-table__footer')[0].style.display = "none";
        if (costLoadData) {
            var JSONP = JSON.parse(costLoadData);
            var diidP = Number(JSONP.diid);
            this.loadData(isNaN(diidP) ? -1 : diidP);
        } else {
            this.loadData(-1);
        }

        this.UserMount();
        window.Vue = this;
    },
    beforeDestroy() {
        this.clearTimer()
    },
    computed: {
        filterdialogSearchInput() {
            var that = this;
            return this.dialogTableData.filter(function (x) {
                var fliterWhere = [];
                if (that.dialogSearchInput.split('、') != -1) {
                    fliterWhere = that.dialogSearchInput.split('、');
                } else {
                    fliterWhere = [that.dialogSearchInput];
                }

                for (var i = 0; i < fliterWhere.length; i++) {
                    if (x.city.indexOf(fliterWhere[i]) != -1 || x.country.indexOf(fliterWhere[i]) != -1) {
                        return x;
                    }
                }
            })
        },
        columnWidth() {
            ////console.log(this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length);
            if (this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 22) {
                return 74
            }
            else if (22 <= this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 26) {
                return 59
            }
            else {
                return 55
            }
        },
        ShowMeals() {
            if (this.ShowBaoPi.length > 0) {
                var result = this.ShowBaoPi.filter(x => x.type == 'Meals')[0];
                if (result) {
                    return result.content;
                } else {
                    return [];
                }
            }
            return [];
        },
        ShowHotel() {
            if (this.ShowBaoPi.length > 0) {
                var result = this.ShowBaoPi.filter(x => x.type == 'Hotel')[0];
                if (result) {
                    return result.content;
                } else {
                    return [];
                }
            }
            return [];
        },
        ShowGongZa() {
            if (this.ShowBaoPi.length > 0) {
                var result = this.ShowBaoPi.filter(x => x.type == 'GongZa')[0];
                if (result) {
                    return result.content;
                } else {
                    return [];
                }
            }
            return [];
        },
        getCurr() {
            var currStr = '';
            var curr = this.AGroupCostParameter.currency;
            var currResult = Number(curr);
            if (isNaN(currResult)) {
                currStr = curr;
            } else {
                for (let index = 0; index < this.currencyOption.length; index++) {
                    if (this.currencyOption[index].currencyId == currResult) {
                        currStr = this.currencyOption[index].currencyCode;
                        break;
                    }
                }
            }
            return currStr;
        },
        ShowOther() {
            if (this.ShowBaoPi.length > 0) {
                var result = this.ShowBaoPi.filter(x => x.type == 'Other')[0];
                if (result) {
                    return result.content;
                } else {
                    return [];
                }
            }
            return [];
        }
    },
    filters: {
        filter_time(value) {
            if (value) {
                return value.split(" ")[0]
            }
        },
        townum(val) {
            return val.toFixed(2)
        },
    }
}
</script>
<style lang="less" scoped>
/deep/ .el-table th.el-table__cell>.cell {
    white-space: pre-wrap;
}

/deep/ .el-table--striped .el-table__body tr.el-table__row--striped td {
    background: #F0F9FF;
}
</style>
<style>
.cost-all {
    font-size: 12px;
}

.cost-box {
    background-color: #fff;
    padding: 10px;
    box-shadow: 0 0 5px #0005;
    border-radius: 10px;
}

.cost-box .el-button+.el-button {
    margin-left: 0;
}

.fade-enter-active,
.fade-leave-active {
    transition: opacity 1;
}

.fade-enter,
.fade-leave-to {
    opacity: 0;
}

.cost-haed {
    margin-bottom: 10px;
}

.ser-btn {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.cost-info {
    display: flex;
}

.cost-info-li {
    margin-right: 30px;
}

.cost-info-li label {
    color: #606266;
    font-size: 15px;
    font-weight: 600;
}

.cost-info-li span {
    color: #606266;
    font-size: 14px;
}

.cost-box .el-checkbox-group {
    margin: 5px 0;
}

.form-ss .el-checkbox {
    width: 100px;
    margin: 5px 0;
}

.sheet-box {
    margin-top: 30px;
}

.cabin-box {
    margin-top: 30px;
}

.biaoge,
.biaogeB {
    margin-bottom: 30px;
}

.rapAddress {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cost-box .cabin-box .cost-box .el-checkbox {
    margin-right: 20px;
}

.cost-box .el-table .cell {
    text-align: center;
    padding-left: 5px;
    padding-right: 5px;
    font-size: 12px;
}

.figures-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.figures-btn .el-button--mini {
    width: 67px;
    margin: 2px 0;
    margin-left: 0;
}

.CostBShow .el-col-3 .el-form-item__content {
    width: 60%;
}

.CostBShow .el-form-item__content {
    width: 65%;
}

.CostBShow .el-date-editor--date {
    width: 100%;
}

.Cost_topFlex .el-select {
    width: 400px;
}

.hiddenElement {
    visibility: hidden;

}

.cost-all .el-table__footer-wrapper .cell {
    white-space: pre;

}

.cost-all .el-date-editor.el-input,
.el-date-editor.el-input__inner {
    width: 100%;
}

.biaogeB .el-table .el-input--small {
    width: 60%;
}

.biaogeKz .el-table .el-input--small {
    width: 60%;
}

.czbtn {
    width: 70px;
}

.tables .el-textarea {
    font-size: 12px;
}

.tables .el-button--mini {
    font-size: 12px;
}

.tables .el-textarea__inner {
    padding: 0;
}

.tables .el-input--suffix .el-input__inner {
    padding-right: 0px;
    padding-left: 0px;
}

.tables .el-date-editor .el-icon-date {
    display: none;
}

.form-ss .el-checkbox__label {
    font-size: 12px;
}

.tables .el-input--mini {
    font-size: 12px;
}

.tables .el-input__inner {
    padding: 0;
    text-align: center;
}

.sheet-box .el-table th.el-table__cell>.cell {
    font-size: 12px;
}

.sheet-box .el-input__inner {
    font-size: 12px;
}

.cost-all .el-form-item {
    margin-bottom: 5px;
}

.cost-all input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;

}

.cost-all input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;

}

.cost-all input[type="number"] {
    -moz-appearance: textfield;

}

.btntop:hover {
    cursor: pointer;
    color: #000;
}

.btnbottom:hover {
    cursor: pointer;
    color: #000;
}

.accon-ul {
    position: absolute;
    box-shadow: #0005 0 0 10px;
    width: 200px;
    z-index: 444;
    background-color: #fff;
    border-radius: 5px;
    display: none;
}

.accon-box .accons-ul {
    display: inline-block;
}

.accon-li {
    padding: 10px 5px;
    text-align: left;
}

.accon-li:hover {
    background-color: #0001;
}

.accon-ul:last-child {
    bottom: 15px;
}

.btn-dialog-cost {
    margin-top: 20px;
    text-align: right;
}

.history-btn {
    display: flex;
    justify-content: center;
}

.cost-all .el-table th.el-table__cell>.cell {
    text-align: center;
    font-size: 12px;
}
</style>