|
@@ -14,7 +14,7 @@
|
|
|
<div style="line-height: 40px;width: 90px;text-align: right;padding-right: 12px;">
|
|
|
分段类型:
|
|
|
</div>
|
|
|
- <el-select v-model="costTypevalue" placeholder="请选择">
|
|
|
+ <el-select v-model="costTypevalue" placeholder="请选择" @change="costTypeSelect">
|
|
|
<el-option v-for="item in costType" :key="item.value" :label="item.label" :value="item.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -30,7 +30,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="cost-input">
|
|
|
- <el-form :inline="true" class="demo-form-inline" ref="inputs" :rules="rules">
|
|
|
+ <el-form :inline="true" class="demo-form-inline" :model='AGroupCostParameter' ref="inputs"
|
|
|
+ :rules="rules">
|
|
|
<el-form-item label="税率:" prop="tax">
|
|
|
<el-input v-model="AGroupCostParameter.tax" placeholder="税率"></el-input>
|
|
|
</el-form-item>
|
|
@@ -44,40 +45,50 @@
|
|
|
<el-form-item label="汇率:" prop="rate">
|
|
|
<el-input v-model="AGroupCostParameter.rate" placeholder="汇率"></el-input>
|
|
|
</el-form-item>
|
|
|
- <div v-if="costTypevalue == 'A'">
|
|
|
- <el-form-item label="TBR:">
|
|
|
- <el-input v-model="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].tbr"
|
|
|
+ </el-form>
|
|
|
+ <div v-show="costTypevalue == 'A'">
|
|
|
+ <el-form :inline="true" class="demo-form-inline" :rules="HotelRules" ref="DHotel"
|
|
|
+ :model="costTypeHotelNumbers.filter(item => item.type == 'Default')[0]">
|
|
|
+ <el-form-item label="TBR:" prop="tbr">
|
|
|
+ <el-input
|
|
|
+ v-model.number="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].tbr"
|
|
|
placeholder="TBR"><i slot="suffix"
|
|
|
style="font-style:normal;margin-right: 10px;">间</i></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="SGR:">
|
|
|
- <el-input v-model="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].sgr"
|
|
|
+ <el-form-item label="SGR:" prop="sgr">
|
|
|
+ <el-input
|
|
|
+ v-model.number="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].sgr"
|
|
|
placeholder="SGR"><i slot="suffix"
|
|
|
style="font-style:normal;margin-right: 10px;">间</i></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="JS/ES:">
|
|
|
- <el-input v-model="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].jses"
|
|
|
+ <el-form-item label="JS/ES:" prop="jses">
|
|
|
+ <el-input
|
|
|
+ v-model.number="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].jses"
|
|
|
placeholder="JS/ES"><i slot="suffix"
|
|
|
style="font-style:normal;margin-right: 10px;">间</i></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="SUITE:">
|
|
|
- <el-input v-model="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].suite"
|
|
|
+ <el-form-item label="SUITE:" prop="suite">
|
|
|
+ <el-input
|
|
|
+ v-model.number="costTypeHotelNumbers.filter(item => item.type == 'Default')[0].suite"
|
|
|
placeholder="SUITE"><i slot="suffix"
|
|
|
style="font-style:normal;margin-right: 10px;">间</i></el-input>
|
|
|
</el-form-item>
|
|
|
- </div>
|
|
|
- <div v-else class="CostBShow">
|
|
|
- <el-row>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div v-show="costTypevalue == 'B'" class="CostBShow">
|
|
|
+ <el-row>
|
|
|
+ <el-form ref="Asection" :inline="true" class="demo-form-inline" :rules="CostTimeRules"
|
|
|
+ :model="AGroupCostParameter">
|
|
|
<el-col :span="5">
|
|
|
- <div> <el-form-item label="第一段开始时间:"><el-date-picker
|
|
|
- v-model="AGroupCostParameter.costTypeStartTime" type="date"
|
|
|
+ <div> <el-form-item label="第一段开始时间:" prop="costTypeStartTime">
|
|
|
+ <el-date-picker 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="结束时间:"><el-date-picker
|
|
|
+ <div> <el-form-item label="结束时间:" prop="costTypeendTime"><el-date-picker
|
|
|
v-model="AGroupCostParameter.costTypeendTime" type="date" placeholder="结束时间"
|
|
|
format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
|
|
|
</el-date-picker>
|
|
@@ -86,54 +97,62 @@
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
<div>
|
|
|
- <el-form-item label="人数:"><el-input placeholder="人数"
|
|
|
- v-model="AGroupCostParameter.costTypenumber" clearable>
|
|
|
+ <el-form-item label="人数:" prop="costTypenumber"><el-input placeholder="人数"
|
|
|
+ v-model.number="AGroupCostParameter.costTypenumber" clearable>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
+ </el-form>
|
|
|
+ <el-form ref="AHotel" :inline="true" class="demo-form-inline" :rules="HotelRules"
|
|
|
+ :model="costTypeHotelNumbers.filter(item => item.type == 'A')[0]">
|
|
|
<el-col :span="3">
|
|
|
- <div><el-form-item label="TBR:">
|
|
|
- <el-input v-model="costTypeHotelNumbers.filter(item => item.type == 'A')[0].tbr"
|
|
|
+ <div><el-form-item label="TBR:" prop="tbr">
|
|
|
+ <el-input
|
|
|
+ v-model.number="costTypeHotelNumbers.filter(item => item.type == 'A')[0].tbr"
|
|
|
placeholder="TBR"><i slot="suffix"
|
|
|
style="font-style:normal;margin-right: 10px;">间</i></el-input>
|
|
|
</el-form-item></div>
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
- <div> <el-form-item label="SGR:">
|
|
|
- <el-input v-model="costTypeHotelNumbers.filter(item => item.type == 'A')[0].sgr"
|
|
|
+ <div> <el-form-item label="SGR:" prop="sgr">
|
|
|
+ <el-input
|
|
|
+ v-model.number="costTypeHotelNumbers.filter(item => item.type == 'A')[0].sgr"
|
|
|
placeholder="SGR"><i slot="suffix"
|
|
|
style="font-style:normal;margin-right: 10px;">间</i></el-input>
|
|
|
</el-form-item></div>
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
- <div><el-form-item label="JS/ES:">
|
|
|
+ <div><el-form-item label="JS/ES:" prop="jses">
|
|
|
<el-input
|
|
|
- v-model="costTypeHotelNumbers.filter(item => item.type == 'A')[0].jses"
|
|
|
+ v-model.number="costTypeHotelNumbers.filter(item => item.type == 'A')[0].jses"
|
|
|
placeholder="JS/ES"><i slot="suffix"
|
|
|
style="font-style:normal;margin-right: 10px;">间</i></el-input>
|
|
|
</el-form-item></div>
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
- <div><el-form-item label="SUITE:">
|
|
|
+ <div><el-form-item label="SUITE:" prop="suite">
|
|
|
<el-input
|
|
|
- v-model="costTypeHotelNumbers.filter(item => item.type == 'A')[0].suite"
|
|
|
+ v-model.number="costTypeHotelNumbers.filter(item => item.type == 'A')[0].suite"
|
|
|
placeholder="SUITE"><i slot="suffix"
|
|
|
style="font-style:normal;margin-right: 10px;">间</i></el-input>
|
|
|
</el-form-item></div>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-form ref="Bsection" :inline="true" class="demo-form-inline" :rules="CostTimeRules"
|
|
|
+ :model="BGroupCostParameter">
|
|
|
<el-col :span="5">
|
|
|
- <div> <el-form-item label="第二段开始时间:"><el-date-picker
|
|
|
- v-model="BGroupCostParameter.costTypeStartTime" type="date"
|
|
|
+ <div> <el-form-item label="第二段开始时间:" prop="costTypeStartTime">
|
|
|
+ <el-date-picker v-model="BGroupCostParameter.costTypeStartTime" type="date"
|
|
|
placeholder="第二段开始时间" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <div> <el-form-item label="结束时间:"><el-date-picker
|
|
|
+ <div> <el-form-item label="结束时间:" prop="costTypeendTime"><el-date-picker
|
|
|
v-model="BGroupCostParameter.costTypeendTime" type="date" placeholder="结束时间"
|
|
|
format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
|
|
|
</el-date-picker>
|
|
@@ -142,45 +161,53 @@
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
<div>
|
|
|
- <el-form-item label="人数:"><el-input placeholder="人数"
|
|
|
- v-model="BGroupCostParameter.costTypenumber" clearable>
|
|
|
+ <el-form-item label="人数:" prop="costTypenumber"><el-input placeholder="人数"
|
|
|
+ v-model.number="BGroupCostParameter.costTypenumber" clearable>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
+ </el-form>
|
|
|
+ <el-form ref="BHotel" :inline="true" class="demo-form-inline" :rules="HotelRules"
|
|
|
+ :model="costTypeHotelNumbers.filter(item => item.type == 'B')[0]">
|
|
|
<el-col :span="3">
|
|
|
- <div><el-form-item label="TBR:">
|
|
|
- <el-input v-model="costTypeHotelNumbers.filter(item => item.type == 'B')[0].tbr"
|
|
|
+ <div>
|
|
|
+ <el-form-item label="TBR:" prop="tbr">
|
|
|
+ <el-input
|
|
|
+ v-model.number="costTypeHotelNumbers.filter(item => item.type == 'B')[0].tbr"
|
|
|
placeholder="TBR"><i slot="suffix"
|
|
|
style="font-style:normal;margin-right: 10px;">间</i></el-input>
|
|
|
- </el-form-item></div>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
- <div> <el-form-item label="SGR:">
|
|
|
- <el-input v-model="costTypeHotelNumbers.filter(item => item.type == 'B')[0].sgr"
|
|
|
+ <div> <el-form-item label="SGR:" prop="sgr">
|
|
|
+ <el-input
|
|
|
+ v-model.number="costTypeHotelNumbers.filter(item => item.type == 'B')[0].sgr"
|
|
|
placeholder="SGR"><i slot="suffix"
|
|
|
style="font-style:normal;margin-right: 10px;">间</i></el-input>
|
|
|
</el-form-item></div>
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
- <div><el-form-item label="JS/ES:">
|
|
|
+ <div><el-form-item label="JS/ES:" prop="jses">
|
|
|
<el-input
|
|
|
- v-model="costTypeHotelNumbers.filter(item => item.type == 'B')[0].jses"
|
|
|
+ v-model.number="costTypeHotelNumbers.filter(item => item.type == 'B')[0].jses"
|
|
|
placeholder="JS/ES"><i slot="suffix"
|
|
|
style="font-style:normal;margin-right: 10px;">间</i></el-input>
|
|
|
</el-form-item></div>
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
- <div><el-form-item label="SUITE:">
|
|
|
+ <div><el-form-item label="SUITE:" prop="suite">
|
|
|
<el-input
|
|
|
- v-model="costTypeHotelNumbers.filter(item => item.type == 'B')[0].suite"
|
|
|
+ v-model.number="costTypeHotelNumbers.filter(item => item.type == 'B')[0].suite"
|
|
|
placeholder="SUITE"><i slot="suffix"
|
|
|
style="font-style:normal;margin-right: 10px;">间</i></el-input>
|
|
|
</el-form-item></div>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </el-form>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="cost-info">
|
|
|
<div class="cost-info-li">
|
|
@@ -210,13 +237,15 @@
|
|
|
<div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
|
|
|
<el-checkbox-group class="form-ss" v-model="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues"
|
|
|
@change="TopChange">
|
|
|
- <el-checkbox v-for="(item, index) in checkOptions" :key="index" :title="item.tips"
|
|
|
+ <el-checkbox v-for="( item, index ) in checkOptions " :key="index" :title="item.tips"
|
|
|
:label="item.label"></el-checkbox>
|
|
|
</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 :height="centerheight">
|
|
|
- <template v-for="(item, index) in tableLabel">
|
|
|
- <el-table-column :key="index" :prop="item.prop" :width="item.width" :label="item.label"
|
|
|
+ row-class-name="row" cell-class-name="column" :highlight-current-row="true" :fit="true"
|
|
|
+ :height="centerheight">
|
|
|
+ <template v-for="( item, index ) in tableLabel ">
|
|
|
+ <el-table-column :key="index" :prop="item.prop" :width="item.width == 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">
|
|
@@ -254,7 +283,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</template>
|
|
|
- <el-table-column label="操作">
|
|
|
+ <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
|
|
@@ -268,16 +297,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" :label="item"></el-checkbox>
|
|
|
+ <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" :key="index"
|
|
|
- :prop="itemsheetone.prop" :label="itemsheetone.childLabel">
|
|
|
+ <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">
|
|
|
<div v-if="itemsheetone.isBind">
|
|
@@ -312,13 +342,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="biaoge"
|
|
|
v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes(sheetitem.label)">
|
|
|
<el-table :data="[{ a: 1 }]" border style="width: 100%"
|
|
|
:class="{ 'hiddenElement': (sheetitem.EnLabel == 'visa' || sheetitem.EnLabel == 'bx') ? true : false }">
|
|
|
- <el-table-column v-for="(itemsheetone, index) in sheetitem.childList" :key="index"
|
|
|
- :prop="itemsheetone.prop" :label="itemsheetone.childLabel">
|
|
|
+ <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">
|
|
|
<div v-if="itemsheetone.isBind">
|
|
@@ -359,19 +389,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" :label="item"></el-checkbox>
|
|
|
+ <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" :key="index"
|
|
|
- :prop="itemcabinone.prop" :label="itemcabinone.childLabel">
|
|
|
+ <el-table-column v-for="( itemcabinone, index ) in cabinitem.childList "
|
|
|
+ :key="index" :prop="itemcabinone.prop" :label="itemcabinone.childLabel">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="itemcabinone.prop === 'toll'">
|
|
|
<el-input :ref="'el-input-' + index"
|
|
@@ -411,15 +442,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="biaoge"
|
|
|
v-if="CheckBoxListSelect.filter(item => item.cbType == 'Right')[0].cbValues.includes(cabinitem.label)">
|
|
|
<div style=" color: rgb(96, 98, 102);font-size: 15px;font-weight: 600;">{{
|
|
|
cabinitem.label }}
|
|
|
</div>
|
|
|
<el-table :data="cabinitem.sheetInfo" border style="width: 100%">
|
|
|
- <el-table-column v-for="(itemcabinone, index) in cabinitem.childList" :key="index"
|
|
|
- :prop="itemcabinone.prop" :label="itemcabinone.childLabel">
|
|
|
+ <el-table-column v-for="( itemcabinone, index ) in cabinitem.childList "
|
|
|
+ :key="index" :prop="itemcabinone.prop" :label="itemcabinone.childLabel">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="itemcabinone.prop === 'toll'">
|
|
|
<el-input :ref="'el-input-' + index"
|
|
@@ -474,7 +505,7 @@
|
|
|
<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"
|
|
|
+ <el-table-column v-for=" item, index in SeldialogColumn " :key="index" :prop="item.prop"
|
|
|
:label="item.title">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
@@ -559,7 +590,7 @@ export default {
|
|
|
{ label: 'VA', width: '85', prop: 'sale', describe: '车服务区域(Vehicle Area)' }, // ??????????????
|
|
|
{ label: 'VT', width: '200', prop: 'carType', describe: '车型(VEHICLE TYPE)' },
|
|
|
{ label: 'VF', width: '150', prop: 'carCost', describe: '车费用(VEHICLE FEES)' },
|
|
|
- { label: 'VN', total: '150', prop: 'carNumber', describe: '车数量(VEHICLE Number)' },
|
|
|
+ { label: 'VN', width: '150', prop: 'carNumber', describe: '车数量(VEHICLE Number)' },
|
|
|
{ label: 'VRD', width: '150', prop: 'carTiming', describe: '用车时间(VEHICLE RENTAL DURATION)' },
|
|
|
{ label: 'T/G S', width: '150', prop: 'tgs', describe: '导游工资(TOUR GUIDE SALARY)' },
|
|
|
{ label: 'T/G N', width: '150', prop: 'tgn', describe: '导游数量(TOUR GUIDE Number' },
|
|
@@ -1988,12 +2019,36 @@ export default {
|
|
|
centerheight: 700,
|
|
|
defaultheight: 50,
|
|
|
rules: {
|
|
|
-
|
|
|
rate: [
|
|
|
- { pattern: /^-?\d+\.?\d*$/, message: '请输入正确数据', trigger: 'blur' }
|
|
|
+ { pattern: /^-?\d+\.?\d*$/, message: '请输入正确数据', trigger: 'blur', required: true, }
|
|
|
+ ],
|
|
|
+ tax: [
|
|
|
+ { pattern: /^-?\d+\.?\d*$/, message: '请输入正确数据', trigger: 'blur', required: true, }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ HotelRules: {
|
|
|
+ sgr: [
|
|
|
+ { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
|
|
|
+ ],
|
|
|
+ tbr: [
|
|
|
+ { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
|
|
|
+ ],
|
|
|
+ suite: [
|
|
|
+ { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
|
|
|
],
|
|
|
- currency: [
|
|
|
- { pattern: /^-?\d+\.?\d*$/, message: '请输入正确数据', trigger: 'blur' }
|
|
|
+ jses: [
|
|
|
+ { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ CostTimeRules: {
|
|
|
+ costTypeendTime: [
|
|
|
+ { message: '请输入结束时间', trigger: 'blur', required: true, },
|
|
|
+ ],
|
|
|
+ costTypenumber: [
|
|
|
+ { type: 'number', min: 0, message: '请输入整数', trigger: 'blur', required: true, },
|
|
|
+ ],
|
|
|
+ costTypeStartTime: [
|
|
|
+ { message: '请输入开始时间', trigger: 'blur', required: true, },
|
|
|
],
|
|
|
}
|
|
|
};
|
|
@@ -2669,73 +2724,81 @@ export default {
|
|
|
|
|
|
},
|
|
|
groupChange() {
|
|
|
+ this.clearFormVerify();
|
|
|
this.loadData(this.diid);
|
|
|
},
|
|
|
- save() {
|
|
|
+ async save() {
|
|
|
var that = this;
|
|
|
var Data = { diid: this.diid, userid: this.userId };
|
|
|
- Data.checkBoxs = this.CheckBoxListSelect.map(x => {
|
|
|
- return {
|
|
|
- diid: x.diid,
|
|
|
- cbType: x.cbType,
|
|
|
- cbValues: x.cbValues.join(',')
|
|
|
- };
|
|
|
- });
|
|
|
-
|
|
|
- Data.groupCosts = this.tableData;
|
|
|
- Data.costTypeHotelNumbers = this.costTypeHotelNumbers.map(x => {
|
|
|
- return {
|
|
|
- id: x.id,
|
|
|
- sgr: x.sgr,
|
|
|
- tbr: x.tbr,
|
|
|
- jses: x.jses,
|
|
|
- suite: x.suite,
|
|
|
- type: x.type,
|
|
|
- diid: that.diid
|
|
|
- };
|
|
|
- });
|
|
|
-
|
|
|
- this.AGroupCostParameter.diId = this.diid;
|
|
|
- this.BGroupCostParameter.diId = this.diid;
|
|
|
+ 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);
|
|
|
}
|
|
|
- }).then(resp => {
|
|
|
- console.log(resp.data.data, '------------------------------------');
|
|
|
- if (resp.data.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: '保存成功!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
+ 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 {
|
|
|
- this.$message.error('保存失败!' + resp.data.msg);
|
|
|
+ Data.groupCostParameters = [Aparam, Bparam];
|
|
|
}
|
|
|
- })
|
|
|
+
|
|
|
+ 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'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.error('保存失败!' + resp.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message.error('请输入完整!');
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
TopChange() {
|
|
|
},
|
|
@@ -3373,6 +3436,41 @@ export default {
|
|
|
day = day < 10 ? '0' + day : day;
|
|
|
return `${year}-${month}-${day}`;
|
|
|
},
|
|
|
+ costTypeSelect(val) {
|
|
|
+ console.log('costTypeSelect--------------------------------------------------------', val);
|
|
|
+ },
|
|
|
+ async formVerify() {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+
|
|
|
+ var forFormList = [];
|
|
|
+ if (this.costTypevalue == 'A') {
|
|
|
+ forFormList = ['inputs', 'DHotel'];
|
|
|
+ } else {
|
|
|
+ forFormList = ['inputs', 'AHotel', 'Asection', 'BHotel', 'Bsection'];
|
|
|
+ }
|
|
|
+
|
|
|
+ var that = this;
|
|
|
+ for (var i = 0; i < forFormList.length; i++) {
|
|
|
+ that.$refs[forFormList[i]].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ resolve(valid);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ resolve(true);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ clearFormVerify() {
|
|
|
+ var forFormList = ['inputs', 'AHotel', 'Asection', 'BHotel', 'Bsection', 'DHotel'];
|
|
|
+ this.$nextTick(() => {
|
|
|
+ for (var i = 0; i < forFormList.length; i++) {
|
|
|
+ this.$refs[forFormList[i]].resetFields();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
mounted() {
|
|
|
this.token = JSON.parse(localStorage.getItem('userinif')).token;
|
|
@@ -3390,6 +3488,13 @@ export default {
|
|
|
return x.city.indexOf(that.dialogSearchInput) != -1 || x.country.indexOf(that.dialogSearchInput) != -1;
|
|
|
})
|
|
|
},
|
|
|
+ columnWidth() {
|
|
|
+ if (this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 9) {
|
|
|
+ return ''
|
|
|
+ } else {
|
|
|
+ return 150
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -3491,8 +3596,12 @@ export default {
|
|
|
margin-left: 0;
|
|
|
}
|
|
|
|
|
|
+.CostBShow .el-col-3 .el-form-item__content {
|
|
|
+ width: 40%;
|
|
|
+}
|
|
|
+
|
|
|
.CostBShow .el-form-item__content {
|
|
|
- width: 62%;
|
|
|
+ width: 50%;
|
|
|
}
|
|
|
|
|
|
.CostBShow .el-date-editor--date {
|