Browse Source

Merge branch 'master' of http://132.232.92.186:3000/XinXiBu/oa-system

liuhj 1 year ago
parent
commit
701ec9e223
1 changed files with 262 additions and 122 deletions
  1. 262 122
      src/components/Finance/Cost.vue

+ 262 - 122
src/components/Finance/Cost.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="cost-all" v-loading.fullscreen.lock="costloading" >
+    <div class="cost-all" v-loading.fullscreen.lock="costloading">
         <div class="cost-box">
             <div class="cost-haed">
                 <div class="ser-btn">
@@ -10,10 +10,12 @@
                                 <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
+                            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-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>
@@ -82,16 +84,16 @@
                                 :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"
+                                            <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"
+                                    <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>
@@ -99,8 +101,9 @@
                                 </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-form-item label="人数:" prop="costTypenumber"><el-input size="small"
+                                                placeholder="人数" v-model.number="AGroupCostParameter.costTypenumber"
+                                                clearable>
                                             </el-input>
                                         </el-form-item>
                                     </div>
@@ -147,8 +150,8 @@
                                 :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"
+                                            <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>
@@ -164,8 +167,9 @@
                                 </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-form-item label="人数:" prop="costTypenumber"><el-input size="small"
+                                                placeholder="人数" v-model.number="BGroupCostParameter.costTypenumber"
+                                                clearable>
                                             </el-input>
                                         </el-form-item>
                                     </div>
@@ -269,7 +273,8 @@
                             </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)" />
+                                    type="number" controls-position="right" min="0"
+                                    @change="NumberSetTime(scope.row[item.prop], scope.$index)" />
                             </div>
                             <div v-else-if="item.prop === 'date'">
                                 <span :title="scope.row[item.prop]">
@@ -318,8 +323,7 @@
                                             </div>
                                         </div>
                                     </div>
-                                    <el-input size="mini" slot="reference"
-                                        v-model="scope.row[item.prop]">
+                                    <el-input size="mini" slot="reference" v-model="scope.row[item.prop]">
                                     </el-input>
                                 </el-popover>
                             </div>
@@ -339,13 +343,12 @@
                                             </div>
                                         </div>
                                     </div>
-                                    <el-input size="mini" slot="reference" 
-                                        v-model="scope.row[item.prop]">
+                                    <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 size="mini" v-model="scope.row[item.prop]">
                                 </el-input></span>
                         </template>
                     </el-table-column>
@@ -353,15 +356,18 @@
                 <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 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">
+                        <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 class="czbtn" size="mini" @click="insertRow(scope.$index, scope.row, 'DOWN')"
+                            type="primary">插入行↓
                         </el-button>
                     </template>
                 </el-table-column>
@@ -370,8 +376,7 @@
                         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"
+                    <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)">
@@ -383,8 +388,7 @@
             </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"
+                    <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)">
@@ -408,7 +412,7 @@
                     </el-checkbox-group>
                     <div style="display: flex;font-size: 12px">
                         <div :style="{ 'width': costTypevalue == 'A' ? '100%' : '49%' }">
-                            <div class="biaoge" style="width: 200px;margin-bottom:0px;margin-top: 20px;"
+                            <div style="width: 200px;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%">
@@ -503,8 +507,7 @@
                         <div style="width: 2%;" v-show="costTypevalue != 'A'"></div>
                         <div style="width: 49%;" v-show="costTypevalue != 'A'">
 
-                            <div class="biaoge"
-                                style="width: 200px;margin-bottom:0px;margin-top: 20px;visibility: hidden;"
+                            <div class="" style="width: 200px;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%">
@@ -740,7 +743,6 @@
     </div>
 </template>
 <script>
-import { co } from '@fullcalendar/core/internal-common';
 
 export default {
     data() {
@@ -776,6 +778,10 @@ export default {
                 { 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)' },
@@ -815,6 +821,10 @@ export default {
                 { 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)' },
@@ -2049,7 +2059,7 @@ export default {
                 {
                     "diid": 0,
                     "cbType": "Left",
-                    "cbValues": ['签证', '机票', '保险','火车票','地接','公务','零用金'] //"string"
+                    "cbValues": ['签证', '机票', '保险', '火车票', '地接', '公务', '零用金'] //"string"
                 },
                 {
                     "diid": 0,
@@ -2506,6 +2516,22 @@ export default {
                     "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",
@@ -2598,25 +2624,25 @@ export default {
         };
     },
     watch: {
-        costTypeHotelNumbers:{
-            handler(val){
-                for(var i=0;i<val.length;i++){
+        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].tbr == '') {
+                        val[i].tbr = 0
                     }
-                    if(val[i].sgr==''){
-                        val[i].sgr=0
+                    if (val[i].sgr == '') {
+                        val[i].sgr = 0
                     }
-                    if(val[i].jses==''){
-                        val[i].jses=0
+                    if (val[i].jses == '') {
+                        val[i].jses = 0
                     }
-                    if(val[i].suite==''){
-                        val[i].suite=0
+                    if (val[i].suite == '') {
+                        val[i].suite = 0
                     }
                 }
             },
-            deep:true
+            deep: true
         },
         'tableData.length': {
             handler(newValue, oldValue) {
@@ -2641,7 +2667,7 @@ export default {
             const sums1 = [];
             const texts = [];
             var prices = [];
-            var BUpdate= []
+            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) };
@@ -2682,7 +2708,7 @@ export default {
                     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 == '操作') {
+                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') {
                     prices[index] = "——";
                     that.lableSetPrice(column.label, '', '');
                     return;
@@ -2704,8 +2730,13 @@ export default {
                         prices[index] = '共' + (sums[index] * that.peopleNumber).toFixed(2) + ' ' + this.AGroupCostParameter.currency + '\r\n人均' + (sums[index]).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + '  人均(' + sums[index] + ')';
                     }
                     else if (column.label == 'SGR' || column.label == 'JS/ES' || column.label == 'SUITE' || column.label == 'TBR') {
-                        that.lableSetPrice(column.label, (sums[index]).toFixed(2), (sums[index]).toFixed(2));
-                        prices[index] = '共' + (sums[index]).toFixed(2) + ' ' + this.AGroupCostParameter.currency + '\r\n人均' + (sums[index]).toFixed(2) + " " + this.AGroupCostParameter.currency
+                        if (column.label == 'TBR') {
+                            that.lableSetPrice(column.label, (sums[index]).toFixed(2), (sums[index] / 2).toFixed(2));
+                            prices[index] = '共' + (sums[index]).toFixed(2) + ' ' + this.AGroupCostParameter.currency + '\r\n人均' + (sums[index] / 2).toFixed(2) + " " + this.AGroupCostParameter.currency
+                        } else {
+                            that.lableSetPrice(column.label, (sums[index]).toFixed(2), (sums[index]).toFixed(2));
+                            prices[index] = '共' + (sums[index]).toFixed(2) + ' ' + this.AGroupCostParameter.currency + '\r\n人均' + (sums[index]).toFixed(2) + " " + this.AGroupCostParameter.currency
+                        }
                     }
                     else {
                         that.lableSetPrice(column.label, sums[index].toFixed(2), (sums[index] / that.peopleNumber).toFixed(2));
@@ -2731,15 +2762,15 @@ export default {
                         }, 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)});
+                            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.AGroupCostParameter.currency + '\r\n人均' + (sums1[index]).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + '  人均(' + sums[index] + ')';
                         }
                         else if (column.label == 'SGR' || column.label == 'JS/ES' || column.label == 'SUITE' || column.label == 'TBR') {
-                            BUpdate.push({label:column.label,  total:(sums1[index]).toFixed(2), single:(sums1[index]).toFixed(2)});
+                            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.AGroupCostParameter.currency + '\r\n人均' + (sums1[index]).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + '  人均(' + sums[index] + ')';
                         }
                         else {
-                            BUpdate.push({label:column.label,  total:sums1[index].toFixed(2), single:(sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2)});
+                            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.AGroupCostParameter.currency + '\r\n人均' + (sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2) + " " + this.AGroupCostParameter.currency //sums[index] + '(' + this.AGroupCostParameter.currency + ')' + '  人均(' + sums[index] + ')';
                             sums1[index] = ((sums1[index] / that.BGroupCostParameter.costTypenumber).toFixed(2));
                         }
@@ -2777,7 +2808,7 @@ export default {
             //////console.log(that.sumTopPrice, '------------');
             setTimeout(() => {
                 this.setLastTitle(prices);
-                if(that.costTypevalue == 'B'){
+                if (that.costTypevalue == 'B') {
                     //遍历bupdate
                     BUpdate.forEach(function (item) {
                         that.BlableSetPrice(item.label, item.total, item.single);
@@ -2871,6 +2902,14 @@ export default {
                 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 = '-';
+                    }
                 }
             }
 
@@ -2915,6 +2954,8 @@ export default {
                     "tlf": "",
                     "ect": "",
                     "id": 1,
+                    "gwCount": "",
+                    "fyCount": ""
                 }
             )
         },
@@ -2967,7 +3008,7 @@ export default {
                             {
                                 "diid": that.diid,
                                 "cbType": "Left",
-                                "cbValues": ['签证', '机票', '保险','火车票','地接','公务','零用金'] //"string"
+                                "cbValues": ['签证', '机票', '保险', '火车票', '地接', '公务', '零用金'] //"string"
                             },
                             {
                                 "diid": that.diid,
@@ -2984,11 +3025,11 @@ export default {
                     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 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]=''
+                                if (that.tableData[i][prop] == 0) {
+                                    that.tableData[i][prop] = ''
                                 }
                             }
                         }
@@ -3002,7 +3043,7 @@ export default {
                                 "carType": "",
                                 "carCost": "",
                                 "carNumber": "",
-                                "carTiming":"",
+                                "carTiming": "",
                                 "tgs": "",
                                 "tgwh": "",
                                 "tgn": "",
@@ -3026,7 +3067,7 @@ export default {
                                 "iL": "",
                                 "if": "",
                                 "ef": "",
-                                "b_R_F":"",
+                                "b_R_F": "",
                                 "te": "",
                                 "tgTips": "",
                                 "drvTips": "",
@@ -3034,6 +3075,8 @@ export default {
                                 "tlf": "",
                                 "ect": "",
                                 "id": 1,
+                                "gwCount": "",
+                                "fyCount": ""
                             }
                         ]
                     }
@@ -3463,6 +3506,40 @@ export default {
         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;
+                            }
+                        }
+                    }
+
+                    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();
@@ -3512,7 +3589,8 @@ export default {
                         Data.groupCostParameters = [Aparam, Bparam];
                     }
 
-                    this.Dataformat();
+                    var ResultCostArr = this.Dataformat();
+                    Data.groupCosts = ResultCostArr;
                     ////console.log(Data, "save-------Data");
 
                     var that = this;
@@ -3856,8 +3934,8 @@ export default {
                 return x.label == 'TBR';
             })
             if (TBRList.length > 0) {
-                TBRsum = TBRList[0].Aprice * 2;
-                BTBRsum = TBRList[0].Bprice * 2;
+                TBRsum = TBRList[0].Aprice;
+                BTBRsum = TBRList[0].Bprice;
             }
             TBRsum = isNaN(TBRsum) ? 0 : TBRsum;
             BTBRsum = isNaN(BTBRsum) ? 0 : BTBRsum;
@@ -3889,8 +3967,8 @@ export default {
             }
             SUITEsum = isNaN(SUITEsum) ? 0 : SUITEsum;
             BSUITEsum = isNaN(BSUITEsum) ? 0 : BSUITEsum;
-            SUITEsum = SUITEsum * rate;
-            BSUITEsum = BSUITEsum * rate;
+            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');
@@ -3935,6 +4013,7 @@ export default {
                 }
             }
 
+            var rightCheckArr = [];
             if (this.costTypevalue == 'B') {
 
                 let BhotelRooms = {
@@ -3965,6 +4044,26 @@ export default {
                 var BJJCSUITERS = (Bresult.hasOwnProperty("经济舱SUITE") ? Bresult["经济舱SUITE"] : 0)
                 var BtxtGWCSUITERS = (Bresult.hasOwnProperty("公务舱SUITE") ? Bresult["公务舱SUITE"] : 0)
 
+
+                if (BtxtJJCSGRRS > 0) {
+                    rightCheckArr.push('经济舱 SGR');
+                }
+                if (BlblGWCSGRRS > 0) {
+                    rightCheckArr.push('公务舱 SGR');
+                }
+                if (BtxtJJCTBRRS > 0) {
+                    rightCheckArr.push('经济舱 TBR');
+                }
+                if (BtxtGWCJSESRS > 0) {
+                    rightCheckArr.push('公务舱 JSES');
+                }
+                if (BJJCSUITERS > 0) {
+                    rightCheckArr.push('经济舱 SUITE');
+                }
+                if (BtxtGWCSUITERS > 0) {
+                    rightCheckArr.push('公务舱 SUITE');
+                }
+
                 this.BcabinDatal[0].sheetInfo[0].toll = BtxtJJCTBRRS;
                 this.BcabinDatal[1].sheetInfo[0].toll = BtxtJJCSGRRS;
                 this.BcabinDatal[2].sheetInfo[0].toll = BlblGWCSGRRS;
@@ -4025,6 +4124,34 @@ export default {
             var JJCSUITERS = (result.hasOwnProperty("经济舱SUITE") ? result["经济舱SUITE"] : 0)
             var txtGWCSUITERS = (result.hasOwnProperty("公务舱SUITE") ? result["公务舱SUITE"] : 0)
 
+
+            if (txtJJCSGRRS > 0) {
+                rightCheckArr.push('经济舱 SGR');
+            }
+            if (lblGWCSGRRS > 0) {
+                rightCheckArr.push('公务舱 SGR');
+            }
+            if (txtJJCTBRRS > 0) {
+                rightCheckArr.push('经济舱 TBR');
+            }
+            if (txtGWCJSESRS > 0) {
+                rightCheckArr.push('公务舱 JSES');
+            }
+            if (JJCSUITERS > 0) {
+                rightCheckArr.push('经济舱 SUITE');
+            }
+            if (txtGWCSUITERS > 0) {
+                rightCheckArr.push('公务舱 SUITE');
+            }
+
+            rightCheckArr.push('团组预算明细');
+            rightCheckArr = [...new Set(rightCheckArr)];
+
+            try {
+                console.log('rightCheckArr', rightCheckArr);
+                this.CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues = rightCheckArr;
+            } catch (e) { }
+
             this.cabinDatal[0].sheetInfo[0].toll = txtJJCTBRRS;
             this.cabinDatal[1].sheetInfo[0].toll = txtJJCSGRRS;
             this.cabinDatal[2].sheetInfo[0].toll = lblGWCSGRRS;
@@ -4238,17 +4365,17 @@ export default {
                     cancelButtonText: '取消',
                     type: 'warning'
                 }).then(() => {
-                    if(label=='SGR'){
-                        this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0].sgr=0
+                    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 == '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 == '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 == 'SUITE') {
+                        this.costTypeHotelNumbers.filter(item => item.type == 'Default')[0].suite = 0
                     }
                     ////console.log('确定清空数据');
                     var fliterList = this.sumTopPrice.filter(x => x.label == label);
@@ -4265,40 +4392,42 @@ export default {
                             "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,
+                            "carCost": "",
+                            "carNumber": "",
+                            "carTiming": "",
+                            "tgs": "",
+                            "tgwh": "",
+                            "tgn": "",
+                            "tgof": "",
+                            "tgm": "",
+                            "tga": "",
+                            "tgtf": "",
+                            "tgef": "",
+                            "cfs": "",
+                            "cfm": "",
+                            "cfof": "",
+                            "b": "",
+                            "l": "",
+                            "d": "",
+                            "tbr": "",
+                            "sgr": "",
+                            "jS_ES": "",
+                            "suite": "",
                             "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,
+                            "tv": "",
+                            "iL": "",
+                            "if": "",
+                            "ef": "",
+                            "b_R_F": "",
+                            "te": "",
+                            "tgTips": "",
+                            "drvTips": "",
+                            "pc": "",
+                            "tlf": "",
+                            "ect": "",
                             "id": 1,
+                            "gwCount": "",
+                            "fyCount": ""
                         };
                         var prop = fliterList[0].prop;
                         var initval = obj[prop];
@@ -4890,6 +5019,8 @@ export default {
                 "tlf": "",
                 "ect": "",
                 "id": 1,
+                "gwCount": "",
+                "fyCount": ""
             };
 
             if (oper == 'UP') {
@@ -4915,8 +5046,8 @@ export default {
             }
         },
         Dataformat() {
-
             var that = this;
+            var oldSoure = JSON.stringify(that.tableData);
             var souer = {
                 "diid": this.diid,
                 "day": "-",
@@ -4957,6 +5088,8 @@ export default {
                 "tlf": 0,
                 "ect": 0,
                 "id": 1,
+                "gwCount": "",
+                "fyCount": ""
             };
             var numberList = [];
             for (var key in souer) {
@@ -4977,7 +5110,9 @@ export default {
                 }
             }
 
-
+            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])$/
@@ -5251,10 +5386,10 @@ export default {
                 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(aT)) {
+                        this.columnTotalData[i].totalPrice = 'A段费用' + aT + '\r\n B段费用' + total;
                     }
-                    if(!isNaN(aS)){
+                    if (!isNaN(aS)) {
                         this.columnTotalData[i].singlePrice = 'A段费用' + aS + '\r\n B段费用' + single;
                     }
                     break
@@ -5262,11 +5397,11 @@ export default {
             }
         },
     },
-    updated(){
-        this.$emit('transfer',true)
+    updated() {
+        this.$emit('transfer', true)
     },
-    destroyed(){
-        this.$emit('transfer',false) 
+    destroyed() {
+        this.$emit('transfer', false)
     },
     mounted() {
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
@@ -5282,7 +5417,7 @@ export default {
         }
 
         window.Vue = this;
-        
+
     },
     computed: {
         defaultCostTypeHotelNumber() {
@@ -5300,10 +5435,10 @@ export default {
             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){
+            else if (22 <= this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 26) {
                 return 59
-            } 
-            else{
+            }
+            else {
                 return 55
             }
         },
@@ -5360,11 +5495,12 @@ export default {
 }
 </script>
 <style lang="less" scoped>
-/deep/ .el-table th.el-table__cell > .cell {
-    white-space: pre-wrap; 
+/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;
+    background: #F0F9FF;
 }
 </style>
 <style>
@@ -5540,17 +5676,21 @@ export default {
 .tables .el-input--mini {
     font-size: 12px;
 }
-.tables .el-input__inner{
+
+.tables .el-input__inner {
     padding: 0;
     text-align: center;
 }
-.sheet-box .el-table th.el-table__cell>.cell{
+
+.sheet-box .el-table th.el-table__cell>.cell {
     font-size: 12px;
 }
-.sheet-box .el-input__inner{
+
+.sheet-box .el-input__inner {
     font-size: 12px;
 }
-.cost-all .el-form-item{
+
+.cost-all .el-form-item {
     margin-bottom: 5px;
 }
 </style>