|
@@ -243,14 +243,17 @@
|
|
|
<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">
|
|
|
- <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"
|
|
|
: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">
|
|
|
- <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>
|
|
|
</template>
|
|
|
<template slot-scope="scope">
|
|
@@ -261,6 +264,12 @@
|
|
|
<el-input :ref="'el-input-' + index" v-model="scope.row[item.prop]" type="number" min="0"
|
|
|
@change="NumberSetTime(scope.row[item.prop], scope.$index)" />
|
|
|
</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'">
|
|
|
<el-row class="figures-btn">
|
|
|
<el-button @click="handleEdit(scope.$index, scope.row, 1)" size="mini"
|
|
@@ -286,8 +295,16 @@
|
|
|
<el-table-column label="操作" :width="200">
|
|
|
<!-- eslint-disable-next-line -->
|
|
|
<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>
|
|
|
+ <br />
|
|
|
+ <el-button size="mini" @click="insertRow(scope.$index, scope.row, 'DOWN')" type="primary">插入行
|
|
|
+ ↓</el-button>
|
|
|
+
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -297,16 +314,17 @@
|
|
|
<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"
|
|
|
+ <el-checkbox v-for="( item, index ) in sheetoneOptions " :key="index"
|
|
|
:label="item"></el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
<div style="display: flex;">
|
|
|
<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"
|
|
|
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 "
|
|
|
+ <el-table-column
|
|
|
+ v-for="( itemsheetone, index ) in sheetitem.childList "
|
|
|
:key="index" :prop="itemsheetone.prop" :label="itemsheetone.childLabel">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="itemsheetone.prop.indexOf(sheetitem.EnLabel) != -1">
|
|
@@ -342,12 +360,13 @@
|
|
|
</div>
|
|
|
<div style="width: 2%;" v-show="costTypevalue != 'A'"></div>
|
|
|
<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"
|
|
|
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 "
|
|
|
+ <el-table-column
|
|
|
+ v-for="( itemsheetone, index ) in sheetitem.childList "
|
|
|
:key="index" :prop="itemsheetone.prop" :label="itemsheetone.childLabel">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="itemsheetone.prop.indexOf(sheetitem.EnLabel) != -1">
|
|
@@ -389,19 +408,20 @@
|
|
|
<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"
|
|
|
+ <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 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 "
|
|
|
+ <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'">
|
|
@@ -442,14 +462,15 @@
|
|
|
</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 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 "
|
|
|
+ <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'">
|
|
@@ -505,8 +526,8 @@
|
|
|
<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">
|
|
|
+ <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] }}
|
|
@@ -2797,6 +2818,7 @@ export default {
|
|
|
Data.groupCostParameters = [Aparam, Bparam];
|
|
|
}
|
|
|
|
|
|
+ this.Dataformat();
|
|
|
console.log(Data, "save-------Data");
|
|
|
|
|
|
var that = this;
|
|
@@ -4015,6 +4037,141 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ },
|
|
|
+ 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 = "";
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
},
|