Commit 7b0a8d01 authored by 黄奎's avatar 黄奎

页面修改

parent c54811c3
...@@ -511,26 +511,13 @@ ...@@ -511,26 +511,13 @@
path: path, path: path,
query: { query: {
id: item.ID, id: item.ID,
Country: item.Country,
IsSelfBook: item.IsSelfBook,
blank: 'y', blank: 'y',
tab: '报价详情' tab: '报价详情'
} }
}); });
}, },
//调整到房型列表
goproduct(path, item) {
this.$router.push({
path: path,
query: {
id: item.ID,
Country: item.Country,
IsSelfBook: item.IsSelfBook,
blank: 'y',
tab: '房型列表'
}
});
},
goSubInfo(path, id) { goSubInfo(path, id) {
this.$store.commit("pageConditionUpdate", this.msg); this.$store.commit("pageConditionUpdate", this.msg);
this.$router.push({ this.$router.push({
......
<style> <style>
.priceUpdate .resource-content { .priceUpdate .resource-content {
min-width: 1200px; min-width: 1200px;
margin-top: 30px; margin-top: 30px;
font-size: 12px; font-size: 12px;
} }
.priceUpdate .resource-content > div {
display: inline-block; .priceUpdate .resource-content>div {
} display: inline-block;
.priceUpdate .resource-baseinfo { }
float: left;
height: auto; .priceUpdate .resource-baseinfo {
width: 550px; float: left;
margin-left: 30px; height: auto;
} width: 550px;
.priceUpdate .resource-imginfo { margin-left: 30px;
float: left; }
width: 550px;
margin-top: 60px; .priceUpdate .resource-imginfo {
} float: left;
.priceUpdate .resource-imginfo > div { width: 550px;
margin-bottom: 20px; margin-top: 60px;
} }
.priceUpdate .resource-lititle {
display: block; .priceUpdate .resource-imginfo>div {
border-left: 4px solid #e95252; margin-bottom: 20px;
padding-left: 10px; }
}
.priceUpdate .resource-baseinfo span { .priceUpdate .resource-lititle {
display: inline-block; display: block;
} border-left: 4px solid #e95252;
.priceUpdate .resource-baseinfo > div { padding-left: 10px;
margin-bottom: 20px; }
}
.clearfix:after { .priceUpdate .resource-baseinfo span {
content: "\0020"; display: inline-block;
display: block; }
height: 0;
clear: both; .priceUpdate .resource-baseinfo>div {
} margin-bottom: 20px;
.priceUpdate .priceDate { }
width: 500px;
background-color: #fff; .clearfix:after {
border: 1px solid #d1d1d1; content: "\0020";
} display: block;
.priceUpdate .noticeInfo div { height: 0;
margin-bottom: 10px; clear: both;
margin: 0 120px 10px 80px; }
}
.priceUpdate .subPrice { .priceUpdate .priceDate {
margin: 0 20px 0 70px; width: 500px;
} background-color: #fff;
.priceUpdate .inventory-div > div { border: 1px solid #d1d1d1;
float: left; }
margin: 10px 30px 30px 0;
} .priceUpdate .noticeInfo div {
.priceUpdate .inventoryCommon { margin-bottom: 10px;
display: inline-block; margin: 0 120px 10px 80px;
width: 10px; }
height: 10px;
border-radius: 50%; .priceUpdate .subPrice {
} margin: 0 20px 0 70px;
.priceUpdate .inOne { }
background-color: #e95252;
} .priceUpdate .inventory-div>div {
.priceUpdate .inTwo { float: left;
background-color: #f58f0c; margin: 10px 30px 30px 0;
} }
.priceUpdate .inThree {
background-color: #1bc594; .priceUpdate .inventoryCommon {
} display: inline-block;
.priceUpdate .inFour { width: 10px;
background-color: #1b63c5; height: 10px;
} border-radius: 50%;
.priceUpdate .price-manage { }
margin: 20px 0 25px 0;
} .priceUpdate .inOne {
.priceUpdate .day { background-color: #e95252;
width: 1000px; }
margin: 0 auto;
position: relative; .priceUpdate .inTwo {
overflow: hidden; background-color: #f58f0c;
} }
.priceUpdate .yearSelect,
.monthSelect { .priceUpdate .inThree {
float: left; background-color: #1bc594;
width: 168px; }
height: 30px;
} .priceUpdate .inFour {
.priceUpdate .priceDate td.checked > label { background-color: #1b63c5;
border-color: red; }
line-height: 28px;
box-sizing: border-box; .priceUpdate .price-manage {
border-radius: 15px; margin: 20px 0 25px 0;
} }
.priceUpdate .triangle_border_up {
width: 0; .priceUpdate .day {
height: 0; width: 1000px;
border-width: 0 123px 30px; margin: 0 auto;
border-style: solid; position: relative;
opacity: 0.75; overflow: hidden;
border-color: transparent transparent rgba(233, 82, 82, 1); /*透明 透明 灰*/ }
}
.priceUpdate #calendar { .priceUpdate .yearSelect,
width: 500px; .monthSelect {
height: 400px; float: left;
margin: 0 auto; width: 168px;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.1), height: 30px;
0 1px 5px 0 rgba(0, 0, 0, 0.12); }
}
.priceUpdate .month ul { .priceUpdate .priceDate td.checked>label {
margin: 0; border-color: red;
padding: 0; line-height: 28px;
display: flex; box-sizing: border-box;
justify-content: space-between; border-radius: 15px;
} }
.priceUpdate .year-month {
flex-direction: column; .priceUpdate .triangle_border_up {
align-items: center; width: 0;
justify-content: space-around; height: 0;
} border-width: 0 123px 30px;
.priceUpdate .year-month > input { border-style: solid;
width: 100px; opacity: 0.75;
float: left; border-color: transparent transparent rgba(233, 82, 82, 1);
} /*透明 透明 灰*/
.priceUpdate .arrow { }
padding: 10px;
font-style: normal; .priceUpdate #calendar {
cursor: pointer; width: 500px;
} height: 400px;
.priceUpdate .monthminus { margin: 0 auto;
position: absolute; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.1),
left: 15px; 0 1px 5px 0 rgba(0, 0, 0, 0.12);
top: 15px; }
}
.priceUpdate .monthadd { .priceUpdate .month ul {
position: absolute; margin: 0;
right: 21px; padding: 0;
top: 16px; display: flex;
} justify-content: space-between;
.priceUpdate .month ul li { }
font-size: 12px;
position: relative; .priceUpdate .year-month {
text-transform: uppercase; flex-direction: column;
float: left; align-items: center;
letter-spacing: 3px; justify-content: space-around;
} }
.priceUpdate .month ul li > input {
padding-left: 10px; .priceUpdate .year-month>input {
text-align: center; width: 100px;
margin: 20px 10px 20px; float: left;
} }
.priceUpdate .weekdays {
margin: 0; .priceUpdate .arrow {
padding: 10px 0; padding: 10px;
background-color: #f9f9f9; font-style: normal;
display: flex; cursor: pointer;
flex-wrap: wrap; }
color: #999999;
justify-content: space-around; .priceUpdate .monthminus {
} position: absolute;
.priceUpdate .weekdays li { left: 15px;
display: inline-block; top: 15px;
width: 13.6%; }
text-align: center;
} .priceUpdate .monthadd {
.priceUpdate .days { position: absolute;
width: 500px; right: 21px;
padding: 0; top: 16px;
margin: 0; }
display: flex;
flex-wrap: wrap; .priceUpdate .month ul li {
justify-content: space-around; font-size: 12px;
} position: relative;
.priceUpdate .days li { text-transform: uppercase;
list-style-type: none; float: left;
display: inline-block; letter-spacing: 3px;
width: 14.2%; }
text-align: center;
position: relative; .priceUpdate .month ul li>input {
padding-bottom: 15px; padding-left: 10px;
padding-top: 10px; text-align: center;
font-size: 1rem; margin: 20px 10px 20px;
color: #000; }
}
.priceUpdate .spanCheck { .priceUpdate .weekdays {
cursor: pointer; margin: 0;
} padding: 10px 0;
.priceUpdate .days li .active { background-color: #f9f9f9;
padding: 6px 10px; display: flex;
border-radius: 50%; flex-wrap: wrap;
background: #00b8ec; color: #999999;
color: #fff; justify-content: space-around;
} }
.priceUpdate .days li span {
display: inline-block; .priceUpdate .weekdays li {
width: 30px; display: inline-block;
height: 30px; width: 13.6%;
border: 1px solid #fff; text-align: center;
border-radius: 17px; }
line-height: 30px;
} .priceUpdate .days {
.priceUpdate .days li .other-month { width: 500px;
display: inline-block; padding: 0;
width: 30px; margin: 0;
height: 30px; display: flex;
line-height: 30px; flex-wrap: wrap;
color: gainsboro; justify-content: space-around;
} }
.priceUpdate .checked span {
border-color: green !important; .priceUpdate .days li {
} list-style-type: none;
.priceUpdate .currentInput { display: inline-block;
width: 120px; width: 14.2%;
height: 30px; text-align: center;
border-radius: 17px; position: relative;
outline: none; padding-bottom: 15px;
border: none; padding-top: 10px;
margin-top: 20px; font-size: 1rem;
border: 1px solid #dcdfe6; color: #000;
} }
.priceUpdate .detailInfo {
display: none; .priceUpdate .spanCheck {
position: absolute; cursor: pointer;
left: -85px; }
top: 50px;
z-index: 999; .priceUpdate .days li .active {
} padding: 6px 10px;
.priceUpdate .priceUpdate { border-radius: 50%;
min-width: 1200px; background: #00b8ec;
} color: #fff;
.priceUpdate .popContent { }
width: 245px;
height: 145px; .priceUpdate .days li span {
background-color: #e95252; display: inline-block;
text-align: left; width: 30px;
color: #fff; height: 30px;
font-size: 12px; border: 1px solid #fff;
} border-radius: 17px;
.priceUpdate .popContent div { line-height: 30px;
width: 100%; }
}
.priceUpdate .popList label:first-child { .priceUpdate .days li .other-month {
display: inline-block; display: inline-block;
width: 40%; width: 30px;
margin: 10px 0 0 10px; height: 30px;
text-align: left; line-height: 30px;
} color: gainsboro;
.priceUpdate .popList label:last-child { }
display: inline-block;
width: 40%; .priceUpdate .checked span {
margin: 10px 10px 0 0; border-color: green !important;
text-align: right; }
}
.priceUpdate .class-a { .priceUpdate .currentInput {
background-color: #e95252; width: 120px;
color: #fff; height: 30px;
} border-radius: 17px;
.priceUpdate .class-b { outline: none;
background-color: #f58f0c; border: none;
color: #fff; margin-top: 20px;
} border: 1px solid #dcdfe6;
.priceUpdate .class-c { }
background-color: #1bc594;
color: #fff; .priceUpdate .detailInfo {
} display: none;
.priceUpdate .class-d { position: absolute;
background-color: #1b63c5; left: -85px;
color: #fff; top: 50px;
} z-index: 999;
}
.packagePrice .class-e {
background-color: #e95252; .priceUpdate .priceUpdate {
color: #fff; min-width: 1200px;
} }
.priceUpdate .delButton {
position: relative; .priceUpdate .popContent {
top: -50px; width: 245px;
background-color: #1bc594; height: 145px;
color: #fff; background-color: #e95252;
} text-align: left;
.priceUpdate .el-form-item { color: #fff;
display: inline-block; font-size: 12px;
} }
.priceUpdate .el-form-item__label {
width: 80px; .priceUpdate .popContent div {
} width: 100%;
.priceUpdate .resDiv { }
width: 700px;
} .priceUpdate .popList label:first-child {
.priceUpdate .el-textarea__inner { display: inline-block;
resize: none; width: 40%;
font-family: "微软雅黑"; margin: 10px 0 0 10px;
} text-align: left;
.priceUpdate input::-webkit-outer-spin-button, }
.priceUpdate input::-webkit-inner-spin-button {
-webkit-appearance: none !important; .priceUpdate .popList label:last-child {
margin: 0; display: inline-block;
} width: 40%;
.priceUpdate .el-form-item__error { margin: 10px 10px 0 0;
left: 80px; text-align: right;
} }
.priceUpdate .s {
display: block !important; .priceUpdate .class-a {
} background-color: #e95252;
.priceUpdate .el-form-item__content { color: #fff;
width: 315px; }
}
.priceUpdate .RemarkDiv .el-form-item__content { .priceUpdate .class-b {
width: 400px; background-color: #f58f0c;
} color: #fff;
.priceUpdate .ckAll { }
margin: 25px 20px 0 0;
} .priceUpdate .class-c {
.priceUpdate .ckStyle { background-color: #1bc594;
cursor: pointer; color: #fff;
} }
.HS_supplier {
margin: 10px 0 10px 10px; .priceUpdate .class-d {
} background-color: #1b63c5;
color: #fff;
}
.packagePrice .class-e {
background-color: #e95252;
color: #fff;
}
.priceUpdate .delButton {
position: relative;
top: -50px;
background-color: #1bc594;
color: #fff;
}
.priceUpdate .el-form-item {
display: inline-block;
}
.priceUpdate .el-form-item__label {
width: 80px;
}
.priceUpdate .resDiv {
width: 700px;
}
.priceUpdate .el-textarea__inner {
resize: none;
font-family: "微软雅黑";
}
.priceUpdate input::-webkit-outer-spin-button,
.priceUpdate input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin: 0;
}
.priceUpdate .el-form-item__error {
left: 80px;
}
.priceUpdate .s {
display: block !important;
}
.priceUpdate .el-form-item__content {
width: 315px;
}
.priceUpdate .RemarkDiv .el-form-item__content {
width: 400px;
}
.priceUpdate .ckAll {
margin: 25px 20px 0 0;
}
.priceUpdate .ckStyle {
cursor: pointer;
}
.HS_supplier {
margin: 10px 0 10px 10px;
}
</style> </style>
<template> <template>
<div class="flexOne priceUpdate"> <div class="flexOne priceUpdate">
...@@ -330,17 +396,20 @@ ...@@ -330,17 +396,20 @@
<ul> <ul>
<li> <li>
<i class="arrow monthminus" @click="currentYear-=1,getDateString(),initCalendar(dateString)"></i> <i class="arrow monthminus" @click="currentYear-=1,getDateString(),initCalendar(dateString)"></i>
<input type="text" v-model="currentYear" class="currentInput" @input="getDateString(),initCalendar(dateString)" />{{$t('pub.year')}} <input type="text" v-model="currentYear" class="currentInput"
@input="getDateString(),initCalendar(dateString)" />{{$t('pub.year')}}
<i class="arrow monthadd" @click="currentYear+=1,getDateString(),initCalendar(dateString)"></i> <i class="arrow monthadd" @click="currentYear+=1,getDateString(),initCalendar(dateString)"></i>
</li> </li>
<li> <li>
<i class="arrow monthminus" @click="pickPre(currentYear,currentMonth)"></i> <i class="arrow monthminus" @click="pickPre(currentYear,currentMonth)"></i>
<input type="text" v-model="currentMonth" class="currentInput" @input="getDateString(),initCalendar(dateString)" />{{$t('pub.month')}} <input type="text" v-model="currentMonth" class="currentInput"
@input="getDateString(),initCalendar(dateString)" />{{$t('pub.month')}}
<i class="arrow monthadd" @click="pickNext(currentYear,currentMonth)"></i> <i class="arrow monthadd" @click="pickNext(currentYear,currentMonth)"></i>
</li> </li>
<li> <li>
<div class="ckAll"> <div class="ckAll">
<el-checkbox class="checkBox" v-model='isCheckAll' @change="checkAll">{{$t('system.table_chekAll')}}</el-checkbox> <el-checkbox class="checkBox" v-model='isCheckAll' @change="checkAll">{{$t('system.table_chekAll')}}
</el-checkbox>
</div> </div>
</li> </li>
</ul> </ul>
...@@ -357,15 +426,17 @@ ...@@ -357,15 +426,17 @@
</ul> </ul>
<!-- 日期 --> <!-- 日期 -->
<ul class="days"> <ul class="days">
<li class="liList" :class="{'checked':dayobject.checkState==$calendarUtils.checkState.checked}" v-for="(dayobject,index) in days" <li class="liList" :class="{'checked':dayobject.checkState==$calendarUtils.checkState.checked}"
:key="dayobject.subCode" @mouseover="disBoard(dayobject,index)" @mouseout="disNoneBoard()"> v-for="(dayobject,index) in days" :key="dayobject.subCode" @mouseover="disBoard(dayobject,index)"
@mouseout="disNoneBoard()">
<span v-if="dayobject.day.getMonth()+1 != currentMonth" class="other-month">{{ <span v-if="dayobject.day.getMonth()+1 != currentMonth" class="other-month">{{
dayobject.day.getDate()}}</span> dayobject.day.getDate()}}</span>
<span class="ckStyle" @click="clickedDay(dayobject)" v-else-if="updateDay==-1 || dayobject.day.getDate()==updateDay" <span class="ckStyle" @click="clickedDay(dayobject)"
:class="dayobject.class"> v-else-if="updateDay==-1 || dayobject.day.getDate()==updateDay" :class="dayobject.class">
{{dayobject.day.getDate()}} {{dayobject.day.getDate()}}
</span> </span>
<span class="other-month" v-else :class="{'class-a': dayobject.checkState==$calendarUtils.checkState.hasValue}"> <span class="other-month" v-else
:class="{'class-a': dayobject.checkState==$calendarUtils.checkState.hasValue}">
{{dayobject.day.getDate()}} {{dayobject.day.getDate()}}
</span> </span>
<div class="detailInfo" :class="{s:index==num}"> <div class="detailInfo" :class="{s:index==num}">
...@@ -383,8 +454,10 @@ ...@@ -383,8 +454,10 @@
<label>{{$t('hotel.hotel_Supplier')}}{{dayobject.SupplierName}}</label> <label>{{$t('hotel.hotel_Supplier')}}{{dayobject.SupplierName}}</label>
</div> </div>
</div> </div>
<input type="button" class="hollowFixedBtn delButton" @click="isdelete(dayobject.ID)" :value="$t('system.table_delete')" /> <input type="button" class="hollowFixedBtn delButton" @click="isdelete(dayobject.ID)"
<button class="hollowFixedBtn delButton" @click="updateInfo(dayobject.ID,dayobject.date,index)">{{$t('system.table_edit')}}</button> :value="$t('system.table_delete')" />
<button class="hollowFixedBtn delButton"
@click="updateInfo(dayobject.ID,dayobject.date,index)">{{$t('system.table_edit')}}</button>
</div> </div>
</li> </li>
</ul> </ul>
...@@ -414,8 +487,8 @@ ...@@ -414,8 +487,8 @@
<div class="resDiv" style="margin:0 0 20px 42px"> <div class="resDiv" style="margin:0 0 20px 42px">
<span> <span>
<em style="margin-right:10px;">{{$t('pub.date')}}</em> <em style="margin-right:10px;">{{$t('pub.date')}}</em>
<el-date-picker class="w150" v-model='addMsg.StartDate' type="date" :picker-options="pickerBeginDateBefore" <el-date-picker class="w150" v-model='addMsg.StartDate' type="date"
value-format="yyyy-MM-dd" placeholder=""> :picker-options="pickerBeginDateBefore" value-format="yyyy-MM-dd" placeholder="">
</el-date-picker> </el-date-picker>
<el-date-picker class="w150" v-model='addMsg.EndDate' type="date" value-format="yyyy-MM-dd" <el-date-picker class="w150" v-model='addMsg.EndDate' type="date" value-format="yyyy-MM-dd"
:picker-options="pickerBeginDateAfter" placeholder=""> :picker-options="pickerBeginDateAfter" placeholder="">
...@@ -424,26 +497,32 @@ ...@@ -424,26 +497,32 @@
</div> </div>
<div class="resDiv"> <div class="resDiv">
<el-form-item :label="$t('hotel.hotel_CostPrice')" prop="CostPrice"> <el-form-item :label="$t('hotel.hotel_CostPrice')" prop="CostPrice">
<el-input type="text" class="w210" v-model="addMsg.CostPrice" @keyup.native="checkPrice(addMsg,'CostPrice')"></el-input> <el-input type="text" class="w210" v-model="addMsg.CostPrice"
@keyup.native="checkPrice(addMsg,'CostPrice')"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.hotel_Inventory')" prop="Inventory"> <el-form-item :label="$t('hotel.hotel_Inventory')" prop="Inventory">
<el-input type="text" class="w210" v-model="addMsg.Inventory" @keyup.native="checkPrice(addMsg,'Inventory')"></el-input> <el-input type="text" class="w210" v-model="addMsg.Inventory"
@keyup.native="checkPrice(addMsg,'Inventory')"></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div class="resDiv"> <div class="resDiv">
<el-form-item :label="$t('hotel.hotel_B2BPrice')" prop="B2BPrice"> <el-form-item :label="$t('hotel.hotel_B2BPrice')" prop="B2BPrice">
<el-input type="text" class="w210" v-model="addMsg.B2BPrice" @keyup.native="checkPrice(addMsg,'B2BPrice')"></el-input> <el-input type="text" class="w210" v-model="addMsg.B2BPrice"
@keyup.native="checkPrice(addMsg,'B2BPrice')"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.hotel_B2CPrice')" prop="B2CPrice"> <el-form-item :label="$t('hotel.hotel_B2CPrice')" prop="B2CPrice">
<el-input type="text" class="w210" v-model="addMsg.B2CPrice" @keyup.native="checkPrice(addMsg,'B2CPrice')"></el-input> <el-input type="text" class="w210" v-model="addMsg.B2CPrice"
@keyup.native="checkPrice(addMsg,'B2CPrice')"></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div class="resDiv"> <div class="resDiv">
<el-form-item label="原价" prop="SalesPrice"> <el-form-item label="原价" prop="SalesPrice">
<el-input type="text" class="w210" v-model="addMsg.SalesPrice" @keyup.native="checkPrice(addMsg,'SalesPrice')"></el-input> <el-input type="text" class="w210" v-model="addMsg.SalesPrice"
@keyup.native="checkPrice(addMsg,'SalesPrice')"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.hotel_Supplier')" v-if="IsSelfBook==1" prop="Supplier"> <el-form-item :label="$t('hotel.hotel_Supplier')" v-if="IsSelfBook==1" prop="Supplier">
<el-select v-model="addMsg.Supplier" class="w210" filterable clearable :placeholder="$t('hotel.hotel_inputholder')"> <el-select v-model="addMsg.Supplier" class="w210" filterable clearable
:placeholder="$t('hotel.hotel_inputholder')">
<el-option :label='$t("pub.ph_buxian")' value=''></el-option> <el-option :label='$t("pub.ph_buxian")' value=''></el-option>
<el-option v-for="item in SupplierList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option> <el-option v-for="item in SupplierList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select> </el-select>
...@@ -451,15 +530,16 @@ ...@@ -451,15 +530,16 @@
</div> </div>
<div class="resDiv"> <div class="resDiv">
<el-form-item :label="$t('hotel.hotel_Currency')"> <el-form-item :label="$t('hotel.hotel_Currency')">
<el-select :placeholder="$t('ground.qingxuanbizhong')" filterable class='multiple_input w210' @change="getCurrentRate(addMsg.CurrencyId)" <el-select :placeholder="$t('ground.qingxuanbizhong')" filterable class='multiple_input w210'
v-model="addMsg.CurrencyId"> @change="getCurrentRate(addMsg.CurrencyId)" v-model="addMsg.CurrencyId">
<el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option> <el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
<el-option v-for="item in allCurrencyList" :key="item.ID" :label="item.Name" :value="item.ID"> <el-option v-for="item in allCurrencyList" :key="item.ID" :label="item.Name" :value="item.ID">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.hotel_CurrentRate')" prop="Fax"> <el-form-item :label="$t('hotel.hotel_CurrentRate')" prop="Fax">
<el-input class="w210" v-model='addMsg.CurrentRate' @keyup.native="checkRate(addMsg,'CurrentRate')"></el-input> <el-input class="w210" v-model='addMsg.CurrentRate' @keyup.native="checkRate(addMsg,'CurrentRate')">
</el-input>
</el-form-item> </el-form-item>
</div> </div>
<div class="resDiv RemarkDiv"> <div class="resDiv RemarkDiv">
...@@ -475,406 +555,395 @@ ...@@ -475,406 +555,395 @@
</div> </div>
<button type="success" class="subPrice" :class="{'comDisableBtn':isDisable==true,'normalBtn':isDisable==false}" <button type="success" class="subPrice" :class="{'comDisableBtn':isDisable==true,'normalBtn':isDisable==false}"
:disabled='isDisable' @click="isDeleteNote=true,submitForm('addMsg')">{{comBtnText}}</button> :disabled='isDisable' @click="isDeleteNote=true,submitForm('addMsg')">{{comBtnText}}</button>
<button type="success" class="hollowFixedBtn" @click="goBack" v-if="updateDay=='-1'">{{$t('pub.returnBack')}}</button> <button type="success" class="hollowFixedBtn" @click="goBack"
<button type="success" class="hollowFixedBtn" @click="resetForm('addMsg')" v-else>{{$t('pub.cancelBtn')}}</button> v-if="updateDay=='-1'">{{$t('pub.returnBack')}}</button>
<button type="success" class="hollowFixedBtn" @click="resetForm('addMsg')"
v-else>{{$t('pub.cancelBtn')}}</button>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
//供应商 //供应商
SupplierList: [], SupplierList: [],
productname: "", productname: "",
serviceNum: "", serviceNum: "",
yearInput: "", //输入框年 yearInput: "", //输入框年
monthInput: "", //输入框月 monthInput: "", //输入框月
ID: "", ID: "",
HotelID: "", HotelID: "",
DateList: [], DateList: [],
DateArr: [], DateArr: [],
currentDay: 1, currentDay: 1,
currentMonth: 1, currentMonth: 1,
currentYear: 1970, currentYear: 1970,
currentWeek: 1, currentWeek: 1,
days: [], days: [],
nowDate: "", nowDate: "",
dateString: "2016-01-02", dateString: "2016-01-02",
num: -1, num: -1,
updateDay: -1, updateDay: -1,
IsSelfBook: 0, IsSelfBook: 0,
Country:0, Country: 0,
//提交报价中 //提交报价中
comBtnText: this.$t('ground.tijiaobaojia'), comBtnText: this.$t('ground.tijiaobaojia'),
isDisable: false, isDisable: false,
//选中状态 //选中状态
isCheckAll: false, isCheckAll: false,
//选择的币种 //选择的币种
SelectDefaultValue: 0, SelectDefaultValue: 0,
//所有币种 //所有币种
allCurrencyList: [], allCurrencyList: [],
addMsg: { addMsg: {
Hotel: "", Hotel: "",
Product: "", Product: "",
Supplier: "", Supplier: "",
Inventory: "", Inventory: "",
B2BPrice: "", B2BPrice: "",
B2CPrice: "", B2CPrice: "",
SalesPrice: "", SalesPrice: "",
DMCPrice: 0, DMCPrice: 0,
DateList: "", DateList: "",
Remark: "", Remark: "",
CostPrice: "", CostPrice: "",
CurrencyId: 0, CurrencyId: 0,
CurrentRate: 0, CurrentRate: 0,
StartDate: "", StartDate: "",
EndDate: "" EndDate: ""
}, },
rules: { rules: {
//表单必填验证 //表单必填验证
CostPrice: [ CostPrice: [{
{ required: true,
required: true, message: this.$t('ground.qingshurcbj'),
message: this.$t('ground.qingshurcbj'), trigger: "change"
trigger: "change" },
}, {
{ pattern: this.$commonUtils.Regex.el_Isdecimal,
pattern: this.$commonUtils.Regex.el_Isdecimal, message: this.$t('ground.qingshurlwxs')
message: this.$t('ground.qingshurlwxs') }
} ],
], Inventory: [{
Inventory: [ required: true,
{ message: this.$t('ground.qingshurukc'),
trigger: "change"
},
{
pattern: this.$commonUtils.Regex.el_Isdecimal,
message: this.$t('ground.qingshuruzqdsz')
}
],
B2BPrice: [{
required: true,
message: this.$t('ground.qingshuruB2Bjg'),
trigger: "change"
},
{
pattern: this.$commonUtils.Regex.el_Isdecimal,
message: this.$t('ground.qingshurlwxs')
}
],
B2CPrice: [{
required: true,
message: this.$t('ground.qingshuruB2Cjg'),
trigger: "change"
},
{
pattern: this.$commonUtils.Regex.el_Isdecimal,
message: this.$t('ground.qingshurlwxs')
}
],
SalesPrice: [{
required: true,
message: this.$t('ground.qingshurnbjg'),
trigger: "change"
},
{
pattern: this.$commonUtils.Regex.el_Isdecimal,
message: this.$t('ground.qingshurlwxs')
}
],
Supplier: [{
required: true, required: true,
message: this.$t('ground.qingshurukc'), message: this.$t('ground.qingxuanzgys')
trigger: "change" }]
}, },
{ pickerBeginDateBefore: {
pattern: this.$commonUtils.Regex.el_Isdecimal, disabledDate: time => {
message: this.$t('ground.qingshuruzqdsz') let endTime = new Date(this.addMsg.EndDate);
return endTime.getTime() < time.getTime();
} }
], },
B2BPrice: [ pickerBeginDateAfter: {
{ disabledDate: time => {
required: true, let startTime = new Date(this.addMsg.StartDate);
message: this.$t('ground.qingshuruB2Bjg'), return startTime.getTime() >= time.getTime();
trigger: "change"
},
{
pattern: this.$commonUtils.Regex.el_Isdecimal,
message: this.$t('ground.qingshurlwxs')
} }
], }
B2CPrice: [ };
{ },
required: true,
message: this.$t('ground.qingshuruB2Cjg'), methods: {
trigger: "change" //初始化列表数据
initDataTable() {
let msg = {
Product: this.ID,
Date: this.nowDate
};
this.apipost(
"dict_post_HotelOffer_GetList",
msg,
res => {
if (res.data.resultCode == 1) {
var tableinfo = res.data.data;
this.days.forEach(dayItem => {
var d = dayItem.day;
var myDate = this.$calendarUtils.formatDate(
d.getFullYear(),
d.getMonth() + 1,
d.getDate()
);
for (var j = 0; j < tableinfo.length; j++) {
if (tableinfo[j].DateStr == myDate) {
dayItem.CostPrice = tableinfo[j].CostPrice;
dayItem.B2BPrice = tableinfo[j].B2BPrice;
dayItem.B2CPrice = tableinfo[j].B2CPrice;
dayItem.kucun = tableinfo[j].Inventory;
dayItem.SupplierName = tableinfo[j].SupplierName;
dayItem.ID = tableinfo[j].ID;
dayItem.date = tableinfo[j].Date;
dayItem.checkState = this.$calendarUtils.checkState.hasValue;
if (dayItem.kucun >= 0 && dayItem.kucun < 10) {
dayItem.class = "class-a";
} else if (dayItem.kucun >= 10 && dayItem.kucun < 100) {
dayItem.class = "class-b";
} else if (dayItem.kucun >= 100 && dayItem.kucun < 500) {
dayItem.class = "class-c";
} else if (dayItem.kucun >= 500) {
dayItem.class = "class-d";
}
}
}
});
}
}, },
{ null
pattern: this.$commonUtils.Regex.el_Isdecimal, );
message: this.$t('ground.qingshurlwxs') },
} initSupplier() {
], let msg = {
SalesPrice: [ Type: 1
{ }; //HK新增查询条件
required: true, this.apipost(
message: this.$t('ground.qingshurnbjg'), "supplier_post_GetAllList",
trigger: "change" msg,
response => {
if (response.data.resultCode == 1) {
this.SupplierList = response.data.data;
}
}, },
{ null
pattern: this.$commonUtils.Regex.el_Isdecimal, );
message: this.$t('ground.qingshurlwxs')
}
],
Supplier: [
{
required: true,
message: this.$t('ground.qingxuanzgys')
}
]
}, },
pickerBeginDateBefore: { //提交酒店报价
disabledDate: time => { hotelOfferSet() {
let endTime = new Date(this.addMsg.EndDate); this.addMsg.Hotel = this.HotelID;
return endTime.getTime() < time.getTime(); this.addMsg.Product = this.ID;
this.addMsg.DateList = this.DateArr;
if (
this.addMsg.DateList == "" &&
(this.addMsg.StartDate == "" || this.addMsg.EndDate == "")
) {
this.Error(this.$t('ground.qingxuanzeriq'));
return;
} }
this.isDisable = true;
this.comBtnText = this.$t('ground.zhengzaitijiao');
this.apipost(
"dict_post_HotelOffer_Set",
this.addMsg,
res => {
this.isDisable = false;
this.comBtnText = this.$t('ground.tijiaobaojia');
if (res.data.resultCode == 1) {
this.initDataTable();
this.addMsg = {};
this.Success(this.$t('tips.saveYes'));
this.DateArr = [];
this.resetForm("addMsg");
} else {
this.Error(res.data.message);
}
},
null
);
}, },
pickerBeginDateAfter: { isdelete(ID) {
disabledDate: time => { var that = this;
let startTime = new Date(this.addMsg.StartDate); that.Confirm(that.$t('tips.shifoushanchu'), function () {
return startTime.getTime() >= time.getTime(); that.apipost(
} "dict_post_HotelOffer_Remove", {
} Id: ID
}; },
}, res => {
if (res.data.resultCode == 1) {
methods: { that.initDataTable();
//初始化列表数据 that.initCalendar();
initDataTable() { that.Success(that.$t('tips.shanchuchenggong'));
let msg = {
Product: this.ID,
Date: this.nowDate
};
this.apipost(
"dict_post_HotelOffer_GetList",
msg,
res => {
if (res.data.resultCode == 1) {
var tableinfo = res.data.data;
this.days.forEach(dayItem => {
var d = dayItem.day;
var myDate = this.$calendarUtils.formatDate(
d.getFullYear(),
d.getMonth() + 1,
d.getDate()
);
for (var j = 0; j < tableinfo.length; j++) {
if (tableinfo[j].DateStr == myDate) {
dayItem.CostPrice = tableinfo[j].CostPrice;
dayItem.B2BPrice = tableinfo[j].B2BPrice;
dayItem.B2CPrice = tableinfo[j].B2CPrice;
dayItem.kucun = tableinfo[j].Inventory;
dayItem.SupplierName = tableinfo[j].SupplierName;
dayItem.ID = tableinfo[j].ID;
dayItem.date = tableinfo[j].Date;
dayItem.checkState = this.$calendarUtils.checkState.hasValue;
if (dayItem.kucun >= 0 && dayItem.kucun < 10) {
dayItem.class = "class-a";
} else if (dayItem.kucun >= 10 && dayItem.kucun < 100) {
dayItem.class = "class-b";
} else if (dayItem.kucun >= 100 && dayItem.kucun < 500) {
dayItem.class = "class-c";
} else if (dayItem.kucun >= 500) {
dayItem.class = "class-d";
}
}
} }
}); }
);
});
},
updateInfo(ID, date, index) {
let msg = {
Id: ID
};
this.addMsg.ID = ID;
let parameterDate = date.split("-");
this.setCheck(index);
this.updateDay = parameterDate[parameterDate.length - 1];
this.apipost("dict_post_HotelOffer_Get", msg, res => {
if (res.data.resultCode == 1) {
this.addMsg = res.data.data;
this.DateArr = [date];
} }
}, });
null },
); getDateString: function () {
}, this.dateString = this.$calendarUtils.formatDate(
initSupplier() { this.currentYear,
let msg = { this.currentMonth,
Type: 1 1
}; //HK新增查询条件 );
this.apipost( },
"supplier_post_GetAllList", initCalendar: function (cur) {
msg, var newDays = this.$calendarUtils.createCalendar(cur);
response => { this.currentDay = newDays.CurrentDay;
if (response.data.resultCode == 1) { this.currentYear = newDays.CurrentYear;
this.SupplierList = response.data.data; this.currentMonth = newDays.CurrentMonth;
this.currentWeek = newDays.CurrentWeek;
this.days.length = 0;
var dateArray = newDays.DayArray;
for (var i = 0; i < dateArray.length; i++) {
var d = dateArray[i].day;
var dayobject = {};
dayobject.day = d;
if (d.getMonth() + 1 == this.currentMonth) {
dayobject.checkState = this.$calendarUtils.checkState.noChecked;
} }
}, this.days.push(dayobject);
null }
); },
}, //点击左箭头切换年月
//提交酒店报价 pickPre: function (year, month) {
hotelOfferSet() { var d = new Date(this.$calendarUtils.formatDate(year, month, 1));
this.addMsg.Hotel = this.HotelID; d.setDate(0);
this.addMsg.Product = this.ID; this.nowDate = d.getFullYear() + "-" + (d.getMonth() + 1) + "-1";
this.addMsg.DateList = this.DateArr; this.initCalendar(
if ( this.$calendarUtils.formatDate(d.getFullYear(), d.getMonth() + 1, 1)
this.addMsg.DateList == "" && );
(this.addMsg.StartDate == "" || this.addMsg.EndDate == "") this.initDataTable();
) { },
this.Error(this.$t('ground.qingxuanzeriq')); //点击右箭头切换年月
return; pickNext: function (year, month) {
} var d = new Date(this.$calendarUtils.formatDate(year, month, 1));
this.isDisable = true; d.setDate(35);
this.comBtnText = this.$t('ground.zhengzaitijiao'); this.nowDate = d.getFullYear() + "-" + (d.getMonth() + 1) + "-1";
this.apipost( this.initCalendar(
"dict_post_HotelOffer_Set", this.$calendarUtils.formatDate(d.getFullYear(), d.getMonth() + 1, 1)
this.addMsg, );
res => { this.initDataTable();
this.isDisable = false; },
this.comBtnText = this.$t('ground.tijiaobaojia'); //鼠标移入显示详情看板
if (res.data.resultCode == 1) { disBoard(item, index) {
this.initDataTable(); if (item.checkState == this.$calendarUtils.checkState.hasValue) {
this.addMsg = {}; this.num = index;
this.Success(this.$t('tips.saveYes')); }
this.DateArr = []; },
this.resetForm("addMsg"); //鼠标移出隐藏详情看板
disNoneBoard() {
this.num = -1;
},
//日历修改设置
setCheck(index) {
this.$calendarUtils.daySetCheck(this.days, index);
},
//点击选取日历日期
clickedDay(item) {
this.$calendarUtils.dayClick(item, this.DateArr);
},
//日历全选
checkAll() {
this.DateArr = this.$calendarUtils.checkAll(this.days, this.isCheckAll);
},
//提交创建、修改表单
submitForm(addMsg) {
let that = this;
that.$refs[addMsg].validate(valid => {
if (valid) {
that.hotelOfferSet();
} else { } else {
this.Error(res.data.message); return false;
} }
}, });
null },
); resetForm(formName) {
}, this.$refs[formName].resetFields();
isdelete(ID) { this.updateDay = -1;
var that = this; this.$calendarUtils.resetChekState(this.days);
that.Confirm(that.$t('tips.shifoushanchu'), function() { },
that.apipost( goBack() {
"dict_post_HotelOffer_Remove", this.$router.push({
{ path: 'HotelProductManage',
Id: ID query: {
}, id: this.HotelID,
tab: '房型列表'
}
});
},
//获取所有币种
getAllCurrency() {
this.apipost(
"financeinfo_post_GetList", {},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
that.initDataTable(); this.allCurrencyList = res.data.data;
that.initCalendar();
that.Success(that.$t('tips.shanchuchenggong'));
} }
} },
err => {}
); );
}); },
}, //获取当前下拉选中币种汇率
updateInfo(ID, date, index) { getCurrentRate(currencyId) {
let msg = { this.allCurrencyList.forEach(x => {
Id: ID if (x.ID == currencyId) {
}; this.addMsg.CurrentRate = x.Rate;
this.addMsg.ID = ID; }
let parameterDate = date.split("-"); });
this.setCheck(index);
this.updateDay = parameterDate[parameterDate.length - 1];
this.apipost("dict_post_HotelOffer_Get", msg, res => {
if (res.data.resultCode == 1) {
this.addMsg = res.data.data;
this.DateArr = [date];
}
});
},
getDateString: function() {
this.dateString = this.$calendarUtils.formatDate(
this.currentYear,
this.currentMonth,
1
);
},
initCalendar: function(cur) {
var newDays = this.$calendarUtils.createCalendar(cur);
this.currentDay = newDays.CurrentDay;
this.currentYear = newDays.CurrentYear;
this.currentMonth = newDays.CurrentMonth;
this.currentWeek = newDays.CurrentWeek;
this.days.length = 0;
var dateArray = newDays.DayArray;
for (var i = 0; i < dateArray.length; i++) {
var d = dateArray[i].day;
var dayobject = {};
dayobject.day = d;
if (d.getMonth() + 1 == this.currentMonth) {
dayobject.checkState = this.$calendarUtils.checkState.noChecked;
}
this.days.push(dayobject);
} }
}, },
//点击左箭头切换年月 mounted() {
pickPre: function(year, month) { this.getAllCurrency();
var d = new Date(this.$calendarUtils.formatDate(year, month, 1)); var d = new Date();
d.setDate(0); var vYear = d.getFullYear();
this.nowDate = d.getFullYear() + "-" + (d.getMonth() + 1) + "-1"; var vMonth = d.getMonth() + 1;
this.initCalendar( var vDate = d.getDate();
this.$calendarUtils.formatDate(d.getFullYear(), d.getMonth() + 1, 1) this.nowDate = vYear + "-" + vMonth + "-" + vDate;
); this.yearInput = vYear;
this.initDataTable(); this.monthInput = vMonth;
}, this.ID = this.$route.query.id;
//点击右箭头切换年月 this.HotelID = this.$route.query.HotelID;
pickNext: function(year, month) { this.IsSelfBook = this.$route.query.IsSelfBook;
var d = new Date(this.$calendarUtils.formatDate(year, month, 1)); this.Country = this.$route.query.Country;
d.setDate(35); this.initSupplier();
this.nowDate = d.getFullYear() + "-" + (d.getMonth() + 1) + "-1";
this.initCalendar( this.initCalendar();
this.$calendarUtils.formatDate(d.getFullYear(), d.getMonth() + 1, 1)
);
this.initDataTable(); this.initDataTable();
},
//鼠标移入显示详情看板
disBoard(item, index) {
if (item.checkState == this.$calendarUtils.checkState.hasValue) {
this.num = index;
}
},
//鼠标移出隐藏详情看板
disNoneBoard() {
this.num = -1;
},
//日历修改设置
setCheck(index) {
this.$calendarUtils.daySetCheck(this.days, index);
},
//点击选取日历日期
clickedDay(item) {
this.$calendarUtils.dayClick(item, this.DateArr);
},
//日历全选
checkAll() {
this.DateArr = this.$calendarUtils.checkAll(this.days, this.isCheckAll);
},
//提交创建、修改表单
submitForm(addMsg) {
let that = this;
that.$refs[addMsg].validate(valid => {
if (valid) {
that.hotelOfferSet();
} else {
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
this.updateDay = -1;
this.$calendarUtils.resetChekState(this.days);
},
goBack() {
window.history.back(-1);
},
//设置供应商是否显示
// setSuplier() {
// var msg = {
// hotelID: this.HotelID
// };
// this.apipost("hotel_post_GetAll", msg, res => {
// if (res.data.resultCode == 1) {
// this.IsSelfBook = res.data.data.IsSelfBook;
// }
// });
// },
//获取所有币种
getAllCurrency() {
this.apipost(
"financeinfo_post_GetList",
{},
res => {
if (res.data.resultCode == 1) {
this.allCurrencyList = res.data.data;
}
},
err => {}
);
},
//获取当前下拉选中币种汇率
getCurrentRate(currencyId) {
this.allCurrencyList.forEach(x => {
if (x.ID == currencyId) {
this.addMsg.CurrentRate = x.Rate;
}
});
} }
}, };
mounted() {
this.getAllCurrency(); </script>
var d = new Date();
var vYear = d.getFullYear();
var vMonth = d.getMonth() + 1;
var vDate = d.getDate();
this.nowDate = vYear + "-" + vMonth + "-" + vDate;
this.yearInput = vYear;
this.monthInput = vMonth;
this.ID = this.$route.query.id;
this.HotelID = this.$route.query.HotelID;
this.IsSelfBook = this.$route.query.IsSelfBook;
this.Country = this.$route.query.Country;
this.initSupplier();
// this.setSuplier();
this.initCalendar();
this.initDataTable();
}
};
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment