Browse Source

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

liuhj 1 year ago
parent
commit
81a31a6745
1 changed files with 313 additions and 92 deletions
  1. 313 92
      src/components/Finance/Cost.vue

+ 313 - 92
src/components/Finance/Cost.vue

@@ -240,17 +240,20 @@
                 <el-checkbox v-for="(  item, index  ) in    checkOptions  " :key="index" :title="item.tips"
                 <el-checkbox v-for="(  item, index  ) in    checkOptions  " :key="index" :title="item.tips"
                     :label="item.label" @change="(val) => { topcheckboxChange(val, item.label) }"></el-checkbox>
                     :label="item.label" @change="(val) => { topcheckboxChange(val, item.label) }"></el-checkbox>
             </el-checkbox-group>
             </el-checkbox-group>
-            <el-table :summary-method="getSummaries" show-summary :data="tableData" :border="true" size="small"
-                row-class-name="row" cell-class-name="column" :highlight-current-row="true" :fit="true"
+            <el-table :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">
                 :height="centerheight">
-                <template v-for="(  item, index  ) in   tableLabel  ">
+                <template v-for="(  item, index  ) in      tableLabel     ">
                     <el-table-column :key="index" :prop="item.prop" :width="item.width == 150 ? columnWidth : item.width"
                     <el-table-column :key="index" :prop="item.prop" :width="item.width == 150 ? columnWidth : item.width"
                         :label="item.label"
                         :label="item.label"
                         v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
                         v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
                         <!-- eslint-disable-next-line -->
                         <!-- eslint-disable-next-line -->
                         <template slot="header" slot-scope="scope">
                         <template slot="header" slot-scope="scope">
                             <el-tooltip effect="dark" :content="item.describe" placement="top">
                             <el-tooltip effect="dark" :content="item.describe" placement="top">
-                                <span class="rapAddress">{{ item.label }}</span>
+                                <div>
+                                    <span class="rapAddress">{{ item.label }}</span>
+                                    <span v-show="item.describe.indexOf('个人成本') != -1" style=" color:red">*</span>
+                                </div>
                             </el-tooltip>
                             </el-tooltip>
                         </template>
                         </template>
                         <template slot-scope="scope">
                         <template slot-scope="scope">
@@ -261,6 +264,12 @@
                                 <el-input :ref="'el-input-' + index" v-model="scope.row[item.prop]" type="number" min="0"
                                 <el-input :ref="'el-input-' + index" v-model="scope.row[item.prop]" type="number" min="0"
                                     @change="NumberSetTime(scope.row[item.prop], scope.$index)" />
                                     @change="NumberSetTime(scope.row[item.prop], scope.$index)" />
                             </div>
                             </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></span>
+                            </div>
                             <div v-else-if="item.prop === 'sale'">
                             <div v-else-if="item.prop === 'sale'">
                                 <el-row class="figures-btn">
                                 <el-row class="figures-btn">
                                     <el-button @click="handleEdit(scope.$index, scope.row, 1)" size="mini"
                                     <el-button @click="handleEdit(scope.$index, scope.row, 1)" size="mini"
@@ -278,7 +287,7 @@
                                 </el-input>
                                 </el-input>
                             </div>
                             </div>
                             <span v-else :title="scope.row[item.prop]"><el-input placeholder="请输入内容"
                             <span v-else :title="scope.row[item.prop]"><el-input placeholder="请输入内容"
-                                    v-model="scope.row[item.prop]" clearable>
+                                    v-model="scope.row[item.prop]">
                                 </el-input></span>
                                 </el-input></span>
                         </template>
                         </template>
                     </el-table-column>
                     </el-table-column>
@@ -286,8 +295,16 @@
                 <el-table-column label="操作" :width="200">
                 <el-table-column label="操作" :width="200">
                     <!-- eslint-disable-next-line -->
                     <!-- eslint-disable-next-line -->
                     <template slot-scope="scope">
                     <template slot-scope="scope">
-                        <el-button size="mini" @click="handleDelete(scope.$index, scope.row, tableData)" type="danger"><i
+                        <el-button size="mini" @click="insertRow(scope.$index, scope.row, 'UP')" type="primary">插入行
+                            ↑</el-button>
+                        <br />
+                        <el-button style="margin: 10px;" size="mini"
+                            @click="handleDelete(scope.$index, scope.row, tableData)" type="danger">删除<i
                                 class="el-icon-delete"></i></el-button>
                                 class="el-icon-delete"></i></el-button>
+                        <br />
+                        <el-button size="mini" @click="insertRow(scope.$index, scope.row, 'DOWN')" type="primary">插入行
+                            ↓</el-button>
+
                     </template>
                     </template>
                 </el-table-column>
                 </el-table-column>
             </el-table>
             </el-table>
@@ -297,21 +314,22 @@
                 <div class="sheet-li">
                 <div class="sheet-li">
                     <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
                     <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-group v-model="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues">
-                        <el-checkbox v-for="(   item, index   ) in    sheetoneOptions   " :key="index"
+                        <el-checkbox v-for="(      item, index      ) in       sheetoneOptions      " :key="index"
                             :label="item"></el-checkbox>
                             :label="item"></el-checkbox>
                     </el-checkbox-group>
                     </el-checkbox-group>
                     <div style="display: flex;">
                     <div style="display: flex;">
                         <div :style="{ 'width': costTypevalue == 'A' ? '100%' : '49%' }">
                         <div :style="{ 'width': costTypevalue == 'A' ? '100%' : '49%' }">
-                            <div v-for="(   sheetitem, index   ) in    sheetDatal   " :key="index">
+                            <div v-for="(      sheetitem, index      ) in       sheetDatal      " :key="index">
                                 <div class="biaoge"
                                 <div class="biaoge"
                                     v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes(sheetitem.label)">
                                     v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes(sheetitem.label)">
                                     <el-table :data="[{ a: 1 }]" border style="width: 100%">
                                     <el-table :data="[{ a: 1 }]" border style="width: 100%">
-                                        <el-table-column v-for="(   itemsheetone, index   ) in    sheetitem.childList   "
+                                        <el-table-column
+                                            v-for="(      itemsheetone, index      ) in       sheetitem.childList      "
                                             :key="index" :prop="itemsheetone.prop" :label="itemsheetone.childLabel">
                                             :key="index" :prop="itemsheetone.prop" :label="itemsheetone.childLabel">
                                             <template slot-scope="scope">
                                             <template slot-scope="scope">
                                                 <div v-if="itemsheetone.prop.indexOf(sheetitem.EnLabel) != -1">
                                                 <div v-if="itemsheetone.prop.indexOf(sheetitem.EnLabel) != -1">
                                                     <div v-if="itemsheetone.isBind">
                                                     <div v-if="itemsheetone.isBind">
-                                                        {{ AGroupCostParameter[itemsheetone.prop] }}
+                                                        <span>{{ AGroupCostParameter[itemsheetone.prop] }}</span>
                                                     </div>
                                                     </div>
                                                     <div v-else>
                                                     <div v-else>
                                                         <el-input v-model="AGroupCostParameter[itemsheetone.prop]"
                                                         <el-input v-model="AGroupCostParameter[itemsheetone.prop]"
@@ -342,17 +360,18 @@
                         </div>
                         </div>
                         <div style="width: 2%;" v-show="costTypevalue != 'A'"></div>
                         <div style="width: 2%;" v-show="costTypevalue != 'A'"></div>
                         <div style="width: 49%;" v-show="costTypevalue != 'A'">
                         <div style="width: 49%;" v-show="costTypevalue != 'A'">
-                            <div v-for="(   sheetitem, index   ) in    sheetDatal   " :key="index">
+                            <div v-for="(      sheetitem, index      ) in       sheetDatal      " :key="index">
                                 <div class="biaogeB"
                                 <div class="biaogeB"
                                     v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes(sheetitem.label)">
                                     v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes(sheetitem.label)">
                                     <el-table :data="[{ a: 1 }]" border style="width: 100%"
                                     <el-table :data="[{ a: 1 }]" border style="width: 100%"
                                         :class="{ 'hiddenElement': (sheetitem.EnLabel == 'visa' || sheetitem.EnLabel == 'bx') ? true : false }">
                                         :class="{ 'hiddenElement': (sheetitem.EnLabel == 'visa' || sheetitem.EnLabel == 'bx') ? true : false }">
-                                        <el-table-column v-for="(   itemsheetone, index   ) in    sheetitem.childList   "
+                                        <el-table-column
+                                            v-for="(      itemsheetone, index      ) in       sheetitem.childList      "
                                             :key="index" :prop="itemsheetone.prop" :label="itemsheetone.childLabel">
                                             :key="index" :prop="itemsheetone.prop" :label="itemsheetone.childLabel">
                                             <template slot-scope="scope">
                                             <template slot-scope="scope">
                                                 <div v-if="itemsheetone.prop.indexOf(sheetitem.EnLabel) != -1">
                                                 <div v-if="itemsheetone.prop.indexOf(sheetitem.EnLabel) != -1">
                                                     <div v-if="itemsheetone.isBind">
                                                     <div v-if="itemsheetone.isBind">
-                                                        {{ BGroupCostParameter[itemsheetone.prop] }}
+                                                        <span>{{ BGroupCostParameter[itemsheetone.prop] }}</span>
                                                     </div>
                                                     </div>
                                                     <div v-else>
                                                     <div v-else>
                                                         <el-input v-model="BGroupCostParameter[itemsheetone.prop]"
                                                         <el-input v-model="BGroupCostParameter[itemsheetone.prop]"
@@ -389,19 +408,20 @@
                 <div class="cabin-li">
                 <div class="cabin-li">
                     <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
                     <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-group v-model="CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues">
-                        <el-checkbox v-for="(   item, index   ) in    cabinoneOptions   " :key="index"
+                        <el-checkbox v-for="(      item, index      ) in       cabinoneOptions      " :key="index"
                             :label="item"></el-checkbox>
                             :label="item"></el-checkbox>
                     </el-checkbox-group>
                     </el-checkbox-group>
                     <div style="display: flex;">
                     <div style="display: flex;">
                         <div :style="{ 'width': costTypevalue == 'A' ? '100%' : '49%' }">
                         <div :style="{ 'width': costTypevalue == 'A' ? '100%' : '49%' }">
-                            <div v-for="(   cabinitem, index   ) in    cabinDatal   " :key="index">
+                            <div v-for="(      cabinitem, index      ) in       cabinDatal      " :key="index">
                                 <div class="biaoge"
                                 <div class="biaoge"
                                     v-if="CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues.includes(cabinitem.label)">
                                     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;">{{
                                     <div style="    color: rgb(96, 98, 102);font-size: 15px;font-weight: 600;">{{
                                         cabinitem.label }}
                                         cabinitem.label }}
                                     </div>
                                     </div>
                                     <el-table :data="cabinitem.sheetInfo" border style="width: 100%">
                                     <el-table :data="cabinitem.sheetInfo" border style="width: 100%">
-                                        <el-table-column v-for="(   itemcabinone, index   ) in    cabinitem.childList   "
+                                        <el-table-column
+                                            v-for="(      itemcabinone, index      ) in       cabinitem.childList      "
                                             :key="index" :prop="itemcabinone.prop" :label="itemcabinone.childLabel">
                                             :key="index" :prop="itemcabinone.prop" :label="itemcabinone.childLabel">
                                             <template slot-scope="scope">
                                             <template slot-scope="scope">
                                                 <div v-if="itemcabinone.prop === 'toll'">
                                                 <div v-if="itemcabinone.prop === 'toll'">
@@ -442,14 +462,15 @@
                         </div>
                         </div>
                         <div style="width: 2%;" v-show="costTypevalue != 'A'"></div>
                         <div style="width: 2%;" v-show="costTypevalue != 'A'"></div>
                         <div style="width: 49%;" v-show="costTypevalue != 'A'">
                         <div style="width: 49%;" v-show="costTypevalue != 'A'">
-                            <div v-for="(   cabinitem, index   ) in    BcabinDatal   " :key="index">
+                            <div v-for="(      cabinitem, index      ) in       BcabinDatal      " :key="index">
                                 <div class="biaogeB"
                                 <div class="biaogeB"
                                     v-if="CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues.includes(cabinitem.label)">
                                     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;">{{
                                     <div style="    color: rgb(96, 98, 102);font-size: 15px;font-weight: 600;">{{
                                         cabinitem.label }}
                                         cabinitem.label }}
                                     </div>
                                     </div>
                                     <el-table :data="cabinitem.sheetInfo" border style="width: 100%">
                                     <el-table :data="cabinitem.sheetInfo" border style="width: 100%">
-                                        <el-table-column v-for="(   itemcabinone, index   ) in    cabinitem.childList   "
+                                        <el-table-column
+                                            v-for="(      itemcabinone, index      ) in       cabinitem.childList      "
                                             :key="index" :prop="itemcabinone.prop" :label="itemcabinone.childLabel">
                                             :key="index" :prop="itemcabinone.prop" :label="itemcabinone.childLabel">
                                             <template slot-scope="scope">
                                             <template slot-scope="scope">
                                                 <div v-if="itemcabinone.prop === 'toll'">
                                                 <div v-if="itemcabinone.prop === 'toll'">
@@ -505,8 +526,8 @@
                 <el-table ref="singleTable" border @current-change="SelChange"
                 <el-table ref="singleTable" border @current-change="SelChange"
                     :data="filterdialogSearchInput.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
                     :data="filterdialogSearchInput.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
                     highlight-current-row style="width: 100%">
                     highlight-current-row style="width: 100%">
-                    <el-table-column v-for="    item, index    in    SeldialogColumn   " :key="index" :prop="item.prop"
-                        :label="item.title">
+                    <el-table-column v-for="       item, index       in       SeldialogColumn      " :key="index"
+                        :prop="item.prop" :label="item.title">
                         <template slot-scope="scope">
                         <template slot-scope="scope">
                             <div>
                             <div>
                                 {{ scope.row[item.prop] }}
                                 {{ scope.row[item.prop] }}
@@ -2052,7 +2073,8 @@ export default {
                 costTypeStartTime: [
                 costTypeStartTime: [
                     { message: '请输入开始时间', trigger: 'blur', required: true, },
                     { message: '请输入开始时间', trigger: 'blur', required: true, },
                 ],
                 ],
-            }
+            },
+            titleText: [],
         };
         };
     },
     },
     watch: {
     watch: {
@@ -2083,6 +2105,7 @@ export default {
             const { columns, data } = param;
             const { columns, data } = param;
             const sums = [];
             const sums = [];
             const sums1 = [];
             const sums1 = [];
+            const texts = [];
             var prices = [];
             var prices = [];
             var thisData = data;
             var thisData = data;
             var ATime = { start: that.addOneDay(that.AGroupCostParameter.costTypeStartTime, 0), end: that.addOneDay(that.AGroupCostParameter.costTypeendTime, 0) };
             var ATime = { start: that.addOneDay(that.AGroupCostParameter.costTypeStartTime, 0), end: that.addOneDay(that.AGroupCostParameter.costTypeendTime, 0) };
@@ -2180,13 +2203,28 @@ export default {
                     that.sumTopPrice.push({ name: column.property, label: column.label, Aprice: sums[index], Bprice: sums1[index] == undefined ? 0 : sums1[index] });
                     that.sumTopPrice.push({ name: column.property, label: column.label, Aprice: sums[index], Bprice: sums1[index] == undefined ? 0 : sums1[index] });
                 } else {
                 } else {
                     fliterList[0].Aprice = sums[index];
                     fliterList[0].Aprice = sums[index];
-                    fliterList[0].Bprice = sums1[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.text = text;
+                }
             });
             });
+            this.titleText = texts;
             console.log(that.sumTopPrice, 'sumTopPrice---------------');
             console.log(that.sumTopPrice, 'sumTopPrice---------------');
             this.CalculatedPrice();
             this.CalculatedPrice();
             //console.log(that.sumTopPrice, '------------');
             //console.log(that.sumTopPrice, '------------');
+            setTimeout(() => {
+                this.setLastTitle(prices);
+            }, 1000);
+
             return prices;
             return prices;
         },
         },
         handleEdit(index, row, buttonIndex) {
         handleEdit(index, row, buttonIndex) {
@@ -2729,77 +2767,86 @@ export default {
             this.clearFormVerify();
             this.clearFormVerify();
             this.loadData(this.diid);
             this.loadData(this.diid);
         },
         },
-        async save() {
-            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(',')
-                    };
-                });
+        save() {
 
 
-                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.diId = this.diid;
-                this.BGroupCostParameter.diId = this.diid;
+            return new Promise(async (resolve, reject) => {
+                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(',')
+                        };
+                    });
 
 
-                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];
-                }
+                    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
+                        };
+                    });
 
 
-                console.log(Data, "save-------Data");
+                    this.AGroupCostParameter.diId = this.diid;
+                    this.BGroupCostParameter.diId = this.diid;
 
 
-                var that = this;
-                this.$axios.post('/api/Groups/SaveGroupCost', Data, {
-                    headers: {
-                        'Authorization': that.token,
+                    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);
                     }
                     }
-                }).then(resp => {
-                    console.log(resp.data.data, '------------------------------------');
-                    if (resp.data.code == 200) {
-                        this.$message({
-                            message: '保存成功!',
-                            type: 'success'
-                        });
+                    if (this.costTypevalue == "A") {
+                        Data.groupCostParameters = [Aparam];
                     } else {
                     } else {
-                        this.$message.error('保存失败!' + resp.data.msg);
+                        Data.groupCostParameters = [Aparam, Bparam];
                     }
                     }
-                })
 
 
-            } else {
-                this.$message.error('请输入完整!');
-            }
+                    this.Dataformat();
+                    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);
+                        }
+                    })
+
+                } else {
+                    this.$message.error('请输入完整!');
+                }
+
+
+            })
+
 
 
         },
         },
         TopChange() {
         TopChange() {
@@ -3782,7 +3829,7 @@ export default {
                 console.log(resp, '------------------------------------');
                 console.log(resp, '------------------------------------');
                 try {
                 try {
                     if (resp.data.code != 200) {
                     if (resp.data.code != 200) {
-                        throw false;
+                        throw resp.data.msg;
                     }
                     }
                     var file = resp.data.data;
                     var file = resp.data.data;
                     that.fileDownload(file.data, file.strFileName);
                     that.fileDownload(file.data, file.strFileName);
@@ -3809,7 +3856,15 @@ export default {
             }
             }
             return new Blob([u8arr], { type });
             return new Blob([u8arr], { type });
         },
         },
-        GetGroupCostExcel() {
+        async GetGroupCostExcel() {
+
+            console.log(this.titleText, 'this.titleText');
+
+            var isTrue = await this.save();
+            if (!isTrue) {
+                this.$message.error('请检查数据!');
+                return;
+            }
 
 
             var that = this;
             var that = this;
             var group = this.options.filter(function (x) {
             var group = this.options.filter(function (x) {
@@ -3823,6 +3878,7 @@ export default {
 
 
             var data = {
             var data = {
                 diid: this.diid,
                 diid: this.diid,
+                costType: this.costTypevalue,
                 title: {
                 title: {
                     groupNumber: Number(this.grouptitleinfo.visitPNumber),
                     groupNumber: Number(this.grouptitleinfo.visitPNumber),
                     teamName: group[0].groupName,
                     teamName: group[0].groupName,
@@ -3835,12 +3891,16 @@ export default {
                 },
                 },
                 rightInfo: {
                 rightInfo: {
 
 
+                },
+                titleModel: {
+
                 }
                 }
             };
             };
             var leftObject = this.GetDomLeftValue();
             var leftObject = this.GetDomLeftValue();
             var rightObject = this.GetDomRightValue();
             var rightObject = this.GetDomRightValue();
             data.leftInfo = leftObject;
             data.leftInfo = leftObject;
             data.rightInfo = rightObject;
             data.rightInfo = rightObject;
+            data.titleModel = this.titleText;
 
 
             console.log(data);
             console.log(data);
 
 
@@ -3850,7 +3910,12 @@ export default {
                 }
                 }
             }).then(resp => {
             }).then(resp => {
                 console.log(resp, '------------------------------------');
                 console.log(resp, '------------------------------------');
-
+                if (resp.data.code == 200) {
+                    var file = resp.data.data;
+                    that.fileDownload(file.data, file.strFileName);
+                } else {
+                    this.$message.error('操作失败!' + resp.data.msg);
+                }
             })
             })
 
 
 
 
@@ -3869,7 +3934,12 @@ export default {
                     if (chiBoxs[j].className.indexOf(titleClassName) != -1) {
                     if (chiBoxs[j].className.indexOf(titleClassName) != -1) {
                         info.title = chiBoxs[j].querySelectorAll('thead tr th')[0].innerText;
                         info.title = chiBoxs[j].querySelectorAll('thead tr th')[0].innerText;
                     } else if (chiBoxs[j].className.indexOf(bodyClassName) != -1) {
                     } else if (chiBoxs[j].className.indexOf(bodyClassName) != -1) {
-                        info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('input').value : '0';
+                        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.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';
                         info.xs = chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('input').value : '0';
                     }
                     }
@@ -3889,7 +3959,12 @@ export default {
                         if (chiBoxs[j].className.indexOf(titleClassName) != -1) {
                         if (chiBoxs[j].className.indexOf(titleClassName) != -1) {
                             info.title = chiBoxs[j].querySelectorAll('thead tr th')[0].innerText;
                             info.title = chiBoxs[j].querySelectorAll('thead tr th')[0].innerText;
                         } else if (chiBoxs[j].className.indexOf(bodyClassName) != -1) {
                         } else if (chiBoxs[j].className.indexOf(bodyClassName) != -1) {
-                            info.cb = chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[0].querySelector('input').value : '0';
+                            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.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';
                             info.xs = chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('input') ? chiBoxs[j].querySelectorAll('tbody tr td')[2].querySelector('input').value : '0';
                         }
                         }
@@ -3951,6 +4026,152 @@ export default {
 
 
 
 
             return AllResult;
             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() {
+
+        },
+        insertRow(index, rowParam, oper) {
+
+            var that = this;
+            var row = {
+                "diid": this.diid,
+                "day": rowParam.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,
+            };
+
+            if (oper == 'UP') {
+                that.tableData.splice(index, 0, row)
+            } else {
+                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 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,
+            };
+            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;
+                    }
+                }
+            }
+        },
+        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 = "";
+            }
+
         }
         }
 
 
     },
     },
@@ -3971,10 +4192,10 @@ export default {
             })
             })
         },
         },
         columnWidth() {
         columnWidth() {
-            if (this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 9) {
+            if (this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 15) {
                 return ''
                 return ''
             } else {
             } else {
-                return 150
+                return 75
             }
             }
         }
         }
     }
     }