Commit 14e9eeb4 authored by 黄奎's avatar 黄奎

页面修改

parent 72dc437c
...@@ -36,8 +36,7 @@ ...@@ -36,8 +36,7 @@
</span> </span>
</li> </li>
<li><span><em>日期</em> <li><span><em>日期</em>
<el-date-picker v-model='msg.StartDate' value-format="yyyy-MM-dd" type="date" <el-date-picker v-model='msg.StartDate' value-format="yyyy-MM-dd" type="date" :picker-options="beforeCheck">
:picker-options="beforeCheck">
</el-date-picker> </el-date-picker>
<el-date-picker v-model='msg.EndDate' value-format="yyyy-MM-dd" type="date" :picker-options="afterCheck"> <el-date-picker v-model='msg.EndDate' value-format="yyyy-MM-dd" type="date" :picker-options="afterCheck">
</el-date-picker> </el-date-picker>
...@@ -53,21 +52,11 @@ ...@@ -53,21 +52,11 @@
</el-select> --> </el-select> -->
</span> </span>
</li> </li>
<li>
<span>
<em>来源</em>
<el-select v-model="msg.SourceType" :placeholder="$t('pub.pleaseSel')">
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option label="ERP" :value='1'></el-option>
<el-option label="PIC" :value='2'></el-option>
</el-select>
</span>
</li>
<li> <li>
<input v-if="HOTEL_memorandum&&!pagesTitle" type="button" class="normalBtn" value="备忘录" <input v-if="HOTEL_memorandum&&!pagesTitle" type="button" class="normalBtn" value="备忘录"
@click="goUrl('memorandumList')" /> @click="goUrl('memorandumList')" />
<input v-if="!pagesTitle" type="button" class="normalBtn" value="温馨提示" <input v-if="!pagesTitle" type="button" class="normalBtn" value="温馨提示" @click="showNotice=true" />
@click="showNotice=true" />
<button style="position: relative;" class="hollowFixedBtn" type="primary" @click="rightCarOpen=true"> <button style="position: relative;" class="hollowFixedBtn" type="primary" @click="rightCarOpen=true">
<i class="el-icon-goods"></i> <i class="el-icon-goods"></i>
购物车 购物车
...@@ -92,18 +81,15 @@ ...@@ -92,18 +81,15 @@
<span style="color:#000000;background-color: #808000;padding:2px 4px;border-radius:5px">行前日</span> <span style="color:#000000;background-color: #808000;padding:2px 4px;border-radius:5px">行前日</span>
</div> </div>
<template v-if="isShow"> <template v-if="isShow">
<hotelTableList v-loading='loading' :list="dataList" <hotelTableList v-loading='loading' :list="dataList" :tableHeight="tableHeight"
:tableHeight="tableHeight" @showOrderSubmitHandler="showOrderSubmitHandler" @success="success" @close="close"></hotelTableList>
@showOrderSubmitHandler="showOrderSubmitHandler"
@success="success"
@close="close"></hotelTableList>
<div class="noDataNotice" v-if="dataList&&dataList.length==0"> <div class="noDataNotice" v-if="dataList&&dataList.length==0">
<i class="iconfont icon-kong"></i> <i class="iconfont icon-kong"></i>
<p>{{$t("active.ld_noData")}}</p> <p>{{$t("active.ld_noData")}}</p>
</div> </div>
<el-pagination v-if="dataList.length>0" background @current-change="handleCurrentChange" <el-pagination v-if="dataList.length>0" background @current-change="handleCurrentChange"
:current-page.sync="msg.pageIndex" :current-page.sync="msg.pageIndex" layout="total,prev, pager, next, jumper" :page-size='msg.pageSize'
layout="total,prev, pager, next, jumper" :page-size='msg.pageSize' :total='total'></el-pagination> :total='total'></el-pagination>
</template> </template>
</div> </div>
...@@ -122,8 +108,7 @@ ...@@ -122,8 +108,7 @@
</template> </template>
<!-- 暂存购物车 --> <!-- 暂存购物车 -->
<el-dialog custom-class="w800" title="酒店信息" :visible.sync="showOrderPreview" center @close="removeEditor"> <el-dialog custom-class="w800" title="酒店信息" :visible.sync="showOrderPreview" center @close="removeEditor">
<TableOperation :editorType="editorType" :HotelRow="orderSubmitObj" <TableOperation :editorType="editorType" :HotelRow="orderSubmitObj" :hotelInfor="orderSubmitItemObj"
:hotelInfor="orderSubmitItemObj"
@close="close"></TableOperation> @close="close"></TableOperation>
</el-dialog> </el-dialog>
<!-- 购物车 --> <!-- 购物车 -->
...@@ -133,8 +118,8 @@ ...@@ -133,8 +118,8 @@
<hotelDetails :hotelId="HotelDetailId"></hotelDetails> <hotelDetails :hotelId="HotelDetailId"></hotelDetails>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import SamplePriceList from './components/SamplePriceList' import SamplePriceList from './components/SamplePriceList'
import TableOperation from './components/TableOperation' import TableOperation from './components/TableOperation'
import ListCar from './components/ListCar' import ListCar from './components/ListCar'
...@@ -143,22 +128,27 @@ ...@@ -143,22 +128,27 @@
import WarmReminder from './components/WarmReminder' import WarmReminder from './components/WarmReminder'
import HotelTipTableList from './components/HotelTipTableList' import HotelTipTableList from './components/HotelTipTableList'
export default { export default {
props:['pagesTitle'], props: ['pagesTitle'],
components: { SamplePriceList, components: {
TableOperation,ListCar, SamplePriceList,
hotelDetails,hotelTableList, TableOperation,
WarmReminder,HotelTipTableList }, ListCar,
hotelDetails,
hotelTableList,
WarmReminder,
HotelTipTableList
},
data() { data() {
return { return {
showHotelDetails: false, showHotelDetails: false,
HotelDetailId: 0, HotelDetailId: 0,
editorType:0, editorType: 0,
rightCarOpen: false, rightCarOpen: false,
HotelLength: 0, HotelLength: 0,
orderSubmitItemObj: {}, orderSubmitItemObj: {},
orderSubmitObj: {}, orderSubmitObj: {},
showOrderPreview: false, showOrderPreview: false,
total:0, total: 0,
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now(); return time.getTime() > Date.now();
...@@ -169,8 +159,8 @@ ...@@ -169,8 +159,8 @@
pageSize: 10, pageSize: 10,
//酒店选择数组 //酒店选择数组
HotelChooseArray: [], HotelChooseArray: [],
StartDate: this.getBeforeDate(0,new Date().Format("yyyy-MM-dd")), StartDate: this.getBeforeDate(0, new Date().Format("yyyy-MM-dd")),
EndDate: this.getBeforeDate(-30,this.getBeforeDate(0,new Date().Format("yyyy-MM-dd"))), EndDate: this.getBeforeDate(-30, this.getBeforeDate(0, new Date().Format("yyyy-MM-dd"))),
//只查询日本 //只查询日本
Country: "651", Country: "651",
Province: 0, Province: 0,
...@@ -185,14 +175,14 @@ ...@@ -185,14 +175,14 @@
MaxPrice: 0, MaxPrice: 0,
MinPrice: 0, MinPrice: 0,
HotelName: '', HotelName: '',
SourceType:'', SourceType: 1,
IsHotelAddPrice: 1 IsHotelAddPrice: 1
}, },
tableHeight: 0, tableHeight: 0,
beforeCheck: { beforeCheck: {
disabledDate: time => { disabledDate: time => {
if (this.msg.StartDate) { if (this.msg.StartDate) {
let endTime = new Date(this.getBeforeDate(-3,new Date().Format("yyyy-MM-dd"))); let endTime = new Date(this.getBeforeDate(-3, new Date().Format("yyyy-MM-dd")));
return time && endTime.getTime() >= time.getTime(); return time && endTime.getTime() >= time.getTime();
} else { } else {
return false; return false;
...@@ -266,8 +256,8 @@ ...@@ -266,8 +256,8 @@
}; };
}, },
watch: { watch: {
dataList:{ dataList: {
handler(val, oldVal){ handler(val, oldVal) {
}, },
deep: true deep: true
...@@ -283,42 +273,41 @@ ...@@ -283,42 +273,41 @@
} }
}); });
}, },
removeEditor(){ removeEditor() {
localStorage.removeItem('editor') localStorage.removeItem('editor')
}, },
// 编辑购物车 // 编辑购物车
editor(x){ editor(x) {
this.dataList.forEach((item,index) => { this.dataList.forEach((item, index) => {
if(item.HotelId==x.HotelId){ if (item.HotelId == x.HotelId) {
item.subList.forEach((xs,indexs)=>{ item.subList.forEach((xs, indexs) => {
if(xs.DateStr==x.Date){ if (xs.DateStr == x.Date) {
this.rightCarOpen = false this.rightCarOpen = false
this.showOrderSubmitHandler(item,indexs,1) this.showOrderSubmitHandler(item, indexs, 1)
} }
}) })
} }
}) })
}, },
// 提交预约成功 // 提交预约成功
success(){ success() {
this.close() this.close()
this.getList() this.getList()
}, },
// 取消 // 取消
close(){ close() {
this.HotelLength = localStorage.getItem("HotelLength")?localStorage.getItem("HotelLength"):0 this.HotelLength = localStorage.getItem("HotelLength") ? localStorage.getItem("HotelLength") : 0
this.showOrderPreview = false this.showOrderPreview = false
this.rightCarOpen = false this.rightCarOpen = false
this.showHotelDetails = false this.showHotelDetails = false
localStorage.removeItem("editor") localStorage.removeItem("editor")
}, },
// 加入购物车 // 加入购物车
showOrderSubmitHandler(row,index,type){ showOrderSubmitHandler(row, index, type) {
this.orderSubmitObj = row this.orderSubmitObj = row
this.orderSubmitItemObj = row.subList[index] this.orderSubmitItemObj = row.subList[index]
this.showOrderPreview = true this.showOrderPreview = true
this.editorType = type?type:0 this.editorType = type ? type : 0
}, },
com_onresize() { com_onresize() {
//clientHeight的值由DIV内容的实际高度和CSS中的padding值决定, //clientHeight的值由DIV内容的实际高度和CSS中的padding值决定,
...@@ -333,10 +322,10 @@ ...@@ -333,10 +322,10 @@
getList() { getList() {
this.loading = true; this.loading = true;
if (this.msg.StartDate == null) { if (this.msg.StartDate == null) {
this.msg.StartDate = this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd")); this.msg.StartDate = this.getBeforeDate(-20, new Date().Format("yyyy-MM-dd"));
} }
if (this.msg.EndDate == null) { if (this.msg.EndDate == null) {
this.msg.EndDate = this.getBeforeDate(-30,this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd"))); this.msg.EndDate = this.getBeforeDate(-30, this.getBeforeDate(-20, new Date().Format("yyyy-MM-dd")));
} }
this.apipost("dict_post_HotelOffer_GetClientHotelStatics", this.msg, this.apipost("dict_post_HotelOffer_GetClientHotelStatics", this.msg,
res => { res => {
...@@ -414,10 +403,10 @@ ...@@ -414,10 +403,10 @@
}, },
mounted() { mounted() {
// crm自动登陆传过来的参数 // crm自动登陆传过来的参数
if(this.$route.query.crmOrderObj){ if (this.$route.query.crmOrderObj) {
this.crmOrderObj = JSON.parse(this.$route.query.crmOrderObj) this.crmOrderObj = JSON.parse(this.$route.query.crmOrderObj)
} }
this.HotelLength = localStorage.getItem("HotelLength")?localStorage.getItem("HotelLength"):0 this.HotelLength = localStorage.getItem("HotelLength") ? localStorage.getItem("HotelLength") : 0
let userinfo = this.getLocalStorage(); let userinfo = this.getLocalStorage();
let ActionMenuCode = userinfo.ActionMenuCode; let ActionMenuCode = userinfo.ActionMenuCode;
...@@ -434,9 +423,9 @@ ...@@ -434,9 +423,9 @@
} }
}; };
</script> </script>
<style> <style>
.Hq_duoge { .Hq_duoge {
cursor: pointer; cursor: pointer;
text-decoration: underline; text-decoration: underline;
...@@ -466,9 +455,11 @@ ...@@ -466,9 +455,11 @@
.classTe { .classTe {
background-color: rgb(2, 247, 142); background-color: rgb(2, 247, 142);
} }
.hotelQueryListclass6 { .hotelQueryListclass6 {
background-color:#808000; background-color: #808000;
} }
.HouseTypeList { .HouseTypeList {
background: #ccc; background: #ccc;
width: 100%; width: 100%;
...@@ -564,13 +555,12 @@ ...@@ -564,13 +555,12 @@
.HotelQueryList .el-table td { .HotelQueryList .el-table td {
padding: 0; padding: 0;
} }
.CostPriceHover{
height:100%; .CostPriceHover {
float:left; height: 100%;
width:100%; float: left;
width: 100%;
cursor: pointer; cursor: pointer;
} }
</style>
</style>
\ No newline at end of file
<style scoped> <style scoped>
.ModifyHotelOrder-OrderId{ .ModifyHotelOrder-OrderId {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
...@@ -9,53 +9,66 @@ ...@@ -9,53 +9,66 @@
font-size: 12px; font-size: 12px;
margin-top: 15px; margin-top: 15px;
} }
.ModifyHotelOrder-OrderId>div{
.ModifyHotelOrder-OrderId>div {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.ModifyHotelOrder-OrderId>div:first-child{
.ModifyHotelOrder-OrderId>div:first-child {
color: #9E9E9E; color: #9E9E9E;
} }
.ModifyHotelOrder-OrderId>div:nth-child(2){
.ModifyHotelOrder-OrderId>div:nth-child(2) {
color: #E76A42; color: #E76A42;
} }
.ModifyHotelOrder-OrderId>div:nth-child(2)>span{
.ModifyHotelOrder-OrderId>div:nth-child(2)>span {
font-weight: bold; font-weight: bold;
color: #009EF7; color: #009EF7;
} }
.ModifyHotelOrder-OrderId>div:nth-child(2)>span:first-child{
.ModifyHotelOrder-OrderId>div:nth-child(2)>span:first-child {
color: #E65152; color: #E65152;
} }
.ModifyHotelOrder-OrderId>div:nth-child(3){
.ModifyHotelOrder-OrderId>div:nth-child(3) {
color: #F25971; color: #F25971;
} }
.ModifyHotelOrder-OrderId>div:nth-child(3)>span:first-child{
.ModifyHotelOrder-OrderId>div:nth-child(3)>span:first-child {
font-size: 16px; font-size: 16px;
} }
.ModifyHotelOrder-OrderId>div:nth-child(3)>b{
.ModifyHotelOrder-OrderId>div:nth-child(3)>b {
font-size: 20px; font-size: 20px;
} }
.ModifyHotelOrder-OrderId>div:last-child{
.ModifyHotelOrder-OrderId>div:last-child {
display: flex; display: flex;
font-size: 16px; font-size: 16px;
} }
.ModifyHotelOrder-OrderInfor{
.ModifyHotelOrder-OrderInfor {
padding: 10px 15px; padding: 10px 15px;
border-radius: 5px; border-radius: 5px;
background: #ffffff; background: #ffffff;
margin-top: 15px; margin-top: 15px;
} }
.ModifyHotelOrder-OrderInfor p{
.ModifyHotelOrder-OrderInfor p {
color: #C1C1C1; color: #C1C1C1;
font-size: 14px; font-size: 14px;
} }
.ModifyHotelOrder-content{
.ModifyHotelOrder-content {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 15px; margin-top: 15px;
} }
.content-box{
.content-box {
width: 320px; width: 320px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -64,24 +77,29 @@ ...@@ -64,24 +77,29 @@
margin: 0 10px 10px 0; margin: 0 10px 10px 0;
overflow: hidden; overflow: hidden;
} }
.content-header{
.content-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 15px 10px; padding: 15px 10px;
} }
.content-header span{
.content-header span {
font-size: 17px; font-size: 17px;
} }
.content-header i{
.content-header i {
color: #009EF7; color: #009EF7;
cursor: pointer; cursor: pointer;
} }
.content-header i:last-child{
.content-header i:last-child {
color: #F1416C; color: #F1416C;
margin-left: 15px; margin-left: 15px;
} }
.content-Car{
.content-Car {
background: #ECEFF1; background: #ECEFF1;
border-radius: 5px; border-radius: 5px;
padding: 10px 5px; padding: 10px 5px;
...@@ -89,7 +107,8 @@ ...@@ -89,7 +107,8 @@
margin-bottom: 10px; margin-bottom: 10px;
font-size: 12px; font-size: 12px;
} }
.content-Car-title{
.content-Car-title {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #009EF7; color: #009EF7;
...@@ -98,49 +117,60 @@ ...@@ -98,49 +117,60 @@
justify-content: space-between; justify-content: space-between;
border-bottom: 1px dashed rgba(96, 125, 139, 0.2); border-bottom: 1px dashed rgba(96, 125, 139, 0.2);
} }
.content-Car-title span{
.content-Car-title span {
width: 80%; width: 80%;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.content-Car-title i{
.content-Car-title i {
color: #F1416C; color: #F1416C;
cursor: pointer; cursor: pointer;
display: none; display: none;
} }
.content-Car-title:hover i{
.content-Car-title:hover i {
display: block; display: block;
} }
.content-Car-num{
.content-Car-num {
padding: 7px 5px; padding: 7px 5px;
align-items: center; align-items: center;
} }
.content-Car-num>div:last-child .num-roomtype{
.content-Car-num>div:last-child .num-roomtype {
padding: 0; padding: 0;
} }
.num-roomtype{
.num-roomtype {
padding: 0 0 15px 0; padding: 0 0 15px 0;
color: #181C32; color: #181C32;
} }
.num-roomtype span{
.num-roomtype span {
color: #6F8A96; color: #6F8A96;
display: block; display: block;
padding: 3px 0 0 0; padding: 3px 0 0 0;
} }
.num-roomnum{
.num-roomnum {
color: #9E9E9E; color: #9E9E9E;
} }
.num-roomnum span{
.num-roomnum span {
color: #F5831E; color: #F5831E;
font-weight: bold; font-weight: bold;
} }
.noroomtype{
.noroomtype {
padding: 10px 5px; padding: 10px 5px;
color: #6F8A96; color: #6F8A96;
font-size: 12px; font-size: 12px;
} }
.content-Car-shui{
.content-Car-shui {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
...@@ -151,18 +181,21 @@ ...@@ -151,18 +181,21 @@
padding: 7px 0; padding: 7px 0;
margin: 0 5px; margin: 0 5px;
} }
.content-Car-heji{
.content-Car-heji {
padding: 7px 5px 0 0; padding: 7px 5px 0 0;
display: flex; display: flex;
justify-content: end; justify-content: end;
font-size: 14px; font-size: 14px;
color: #1CA8F6; color: #1CA8F6;
} }
.content-Car-heji span span{
.content-Car-heji span span {
font-size: 15px; font-size: 15px;
font-weight: bold; font-weight: bold;
} }
.content-picker-text{
.content-picker-text {
height: 192px; height: 192px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -170,35 +203,43 @@ ...@@ -170,35 +203,43 @@
align-items: center; align-items: center;
font-size: 14px; font-size: 14px;
} }
.content-picker-text>div:first-child span{
.content-picker-text>div:first-child span {
border: 1px solid #47B6F5; border: 1px solid #47B6F5;
padding: 5px 15px; padding: 5px 15px;
border-radius: 3px; border-radius: 3px;
cursor: pointer; cursor: pointer;
color: #47B6F5; color: #47B6F5;
} }
.content-picker-text>div:last-child{
.content-picker-text>div:last-child {
margin-top: 20px; margin-top: 20px;
} }
.content-picker-text>div:last-child span{
.content-picker-text>div:last-child span {
color: #A5B5BE; color: #A5B5BE;
} }
/deep/.content-Car .el-input-number .el-input__inner{
/deep/.content-Car .el-input-number .el-input__inner {
height: 30px; height: 30px;
} }
/deep/.content-Car .el-input-number{
/deep/.content-Car .el-input-number {
width: 100%; width: 100%;
line-height: 30px; line-height: 30px;
} }
/deep/.content-Car .el-input-number__increase{
/deep/.content-Car .el-input-number__increase {
width: 25px !important; width: 25px !important;
height: 28px !important; height: 28px !important;
} }
/deep/.content-Car .el-input-number__decrease{
/deep/.content-Car .el-input-number__decrease {
width: 25px !important; width: 25px !important;
height: 28px !important; height: 28px !important;
} }
/deep/.content-Car .el-input-number .el-input__inner{
/deep/.content-Car .el-input-number .el-input__inner {
padding-left: 20px; padding-left: 20px;
padding-right: 20px; padding-right: 20px;
} }
...@@ -211,8 +252,10 @@ ...@@ -211,8 +252,10 @@
<div> <div>
订单编号 {{ order.OrderNo }} 订单编号 {{ order.OrderNo }}
</div> </div>
<div>本次行程<span v-if="order.DetailList">{{ order.DetailList.length }}</span>天,入住<span>{{ order.HotelCount }}</span>个酒店</div> <div>本次行程<span
<div>订单总金额:<span><!-- ¥ --></span><b v-if="order.Money">{{ moneyFormat(order.Money) }}</b></div> v-if="order.DetailList">{{ order.DetailList.length }}</span>天,入住<span>{{ order.HotelCount }}</span>个酒店</div>
<div>订单总金额:<span>
<!-- ¥ --></span><b v-if="order.Money">{{ moneyFormat(order.Money) }}</b></div>
<div> <div>
<button class="hollowFixedBtn" @click="cancelOrder">取消订单</button> <button class="hollowFixedBtn" @click="cancelOrder">取消订单</button>
<button class="normalBtn" @click="saveOrderHandler">保存订单</button> <button class="normalBtn" @click="saveOrderHandler">保存订单</button>
...@@ -285,7 +328,8 @@ ...@@ -285,7 +328,8 @@
<p class="num-roomnum">预计<span>{{ z.Number }}</span>间房</p> <p class="num-roomnum">预计<span>{{ z.Number }}</span>间房</p>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-input-number v-model="z.PeopleNumber" :min="0" :step="1" step-strictly @change="calcPeople"></el-input-number> <el-input-number v-model="z.PeopleNumber" :min="0" :step="1" step-strictly @change="calcPeople">
</el-input-number>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -303,7 +347,8 @@ ...@@ -303,7 +347,8 @@
<span>入汤税: {{ moneyFormat(y.PriceInTangTax) }}/人</span> <span>入汤税: {{ moneyFormat(y.PriceInTangTax) }}/人</span>
</div> </div>
<div class="content-Car-heji"> <div class="content-Car-heji">
<span>合计:<span><!-- ¥ -->円{{ moneyFormat(y.HotelMoeny) }}</span></span> <span>合计:<span>
<!-- ¥ -->円{{ moneyFormat(y.HotelMoeny) }}</span></span>
</div> </div>
</div> </div>
</div> </div>
...@@ -315,7 +360,8 @@ ...@@ -315,7 +360,8 @@
<div class="content-header" style="padding: 9px 10px;"> <div class="content-header" style="padding: 9px 10px;">
<span>新日期预定</span> <span>新日期预定</span>
<div> <div>
<el-date-picker class="w150" v-model="newDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" :picker-options="beforeCheck"></el-date-picker> <el-date-picker class="w150" v-model="newDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期"
:picker-options="beforeCheck"></el-date-picker>
</div> </div>
</div> </div>
<div class="content-Car content-picker-text"> <div class="content-Car content-picker-text">
...@@ -332,34 +378,14 @@ ...@@ -332,34 +378,14 @@
<el-dialog v-show="showChosenHotel" custom-class="w800" title="酒店检索" :visible.sync="showChosenHotel" center> <el-dialog v-show="showChosenHotel" custom-class="w800" title="酒店检索" :visible.sync="showChosenHotel" center>
<ChosenHotel :newDate="newDate" @finish="finishHanler"></ChosenHotel> <ChosenHotel :newDate="newDate" @finish="finishHanler"></ChosenHotel>
</el-dialog> </el-dialog>
<el-dialog <el-dialog custom-class="w600" title="取消订单" :visible.sync="cancelOrderDialog">
custom-class="w600"
title="取消订单"
:visible.sync="cancelOrderDialog"
>
<div style="padding-bottom:20px"> <div style="padding-bottom:20px">
<el-input <el-input type="textarea" autofocus rows="5" placeholder="请填写取消订单的缘由" clear="w300" v-model="cancelRemark">
type="textarea" </el-input>
autofocus
rows="5"
placeholder="请填写取消订单的缘由"
clear="w300"
v-model="cancelRemark"
></el-input>
<el-row :gutter="20" style="margin-top: 20px;"> <el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="24" style="text-align: right;"> <el-col :span="24" style="text-align: right;">
<input <input type="button" class="normalBtn" value="取消订单" @click="cancelOrderHandler" />
type="button" <input type="button" class="hollowFixedBtn" value="关闭" @click="cancelOrderDialog = false" />
class="normalBtn"
value="取消订单"
@click="cancelOrderHandler"
/>
<input
type="button"
class="hollowFixedBtn"
value="关闭"
@click="cancelOrderDialog = false"
/>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -369,26 +395,33 @@ ...@@ -369,26 +395,33 @@
<script> <script>
import ChosenHotel from './components/ChosenHotel.vue'; import ChosenHotel from './components/ChosenHotel.vue';
export default { export default {
components: { ChosenHotel }, components: {
ChosenHotel
},
data() { data() {
return { return {
newDate: this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd")), newDate: this.getBeforeDate(-20, new Date().Format("yyyy-MM-dd")),
orderId: 0, orderId: 0,
order: {},//下单信息 order: {}, //下单信息
loading: false, loading: false,
status: this.getHotelOrderStatus(),//状态 status: this.getHotelOrderStatus(), //状态
rooms: this.getHotelRoomType(),//房型 rooms: this.getHotelRoomType(), //房型
limitGuestNum: [2, 1, 1, 3, 1], limitGuestNum: [2, 1, 1, 3, 1],
showChosenHotel: false, showChosenHotel: false,
tempHotels: { tempHotels: {
key: '', key: '',
data: [] data: []
}, },
cacheHotels: [ cacheHotels: [{
{ Name: '散客', ID: 1 }, Name: '散客',
{ Name: '团队', ID: 2 } ID: 1
},
{
Name: '团队',
ID: 2
}
], ],
rules:{ rules: {
OrderType: [{ OrderType: [{
required: true, required: true,
message: '请选择类型', message: '请选择类型',
...@@ -399,8 +432,11 @@ ...@@ -399,8 +432,11 @@
message: '请输入散客姓名', message: '请输入散客姓名',
trigger: 'blur' trigger: 'blur'
}], }],
ContactNumber: [ ContactNumber: [{
{ required: true, message: "请输入联系电话", trigger: "blur" }, required: true,
message: "请输入联系电话",
trigger: "blur"
},
{ {
pattern: this.$commonUtils.Regex.el_ISphone, pattern: this.$commonUtils.Regex.el_ISphone,
message: "请输入正确的电话" message: "请输入正确的电话"
...@@ -414,11 +450,11 @@ ...@@ -414,11 +450,11 @@
}, },
beforeCheck: { beforeCheck: {
disabledDate: time => { disabledDate: time => {
let endTime = new Date(this.getBeforeDate(-19,new Date().Format("yyyy-MM-dd"))); let endTime = new Date(this.getBeforeDate(-19, new Date().Format("yyyy-MM-dd")));
return time && endTime.getTime() >= time.getTime(); return time && endTime.getTime() >= time.getTime();
} }
}, },
pagesTitle:'', pagesTitle: '',
cancelRemark: '', cancelRemark: '',
cancelOrderDialog: false cancelOrderDialog: false
}; };
...@@ -436,16 +472,16 @@ ...@@ -436,16 +472,16 @@
}); });
}, },
// 保存订单 // 保存订单
saveOrderHandler(){ saveOrderHandler() {
if(this.loading) return if (this.loading) return
let detailList=[] let detailList = []
this.order.DetailList.forEach((x)=>{ this.order.DetailList.forEach((x) => {
detailList.push(...x.data) detailList.push(...x.data)
}) })
detailList.forEach((x)=>{ detailList.forEach((x) => {
x.RoomList = x.RoomList.filter((y)=>y.Number>0) x.RoomList = x.RoomList.filter((y) => y.Number > 0)
}) })
detailList = detailList.filter((x)=>x.RoomList.length>0) detailList = detailList.filter((x) => x.RoomList.length > 0)
let parameter = JSON.parse(JSON.stringify(this.order)) let parameter = JSON.parse(JSON.stringify(this.order))
parameter.DetailList = detailList parameter.DetailList = detailList
this.loading = true this.loading = true
...@@ -455,12 +491,13 @@ ...@@ -455,12 +491,13 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success('保存成功'); this.Success('保存成功');
let path = '' let path = ''
if(this.pagesTitle=='销售'){ if (this.pagesTitle == '销售') {
path = 'singleProductHotelOrder' path = 'singleProductHotelOrder'
}if(this.pagesTitle=='OP'){ }
if (this.pagesTitle == 'OP') {
path = 'singleProductHotelOrderOP' path = 'singleProductHotelOrderOP'
} }
if(!this.pagesTitle) return if (!this.pagesTitle) return
this.$router.push({ this.$router.push({
name: path name: path
}); });
...@@ -503,15 +540,14 @@ ...@@ -503,15 +540,14 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.apipost( this.apipost(
"dict_post_CancelAdminCustomerOrder", "dict_post_CancelAdminCustomerOrder", {
{
OrderId: this.orderId, OrderId: this.orderId,
CancelRemark: this.cancelRemark CancelRemark: this.cancelRemark
},res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message); this.Success(res.data.message);
let path = 'singleProductHotelOrderOP' let path = 'singleProductHotelOrderOP'
if(!this.pagesTitle) return if (!this.pagesTitle) return
this.$router.push({ this.$router.push({
name: path name: path
}); });
...@@ -524,15 +560,15 @@ ...@@ -524,15 +560,15 @@
this.loading = false; this.loading = false;
}); });
}).catch(()=>{ }).catch(() => {
this.loading = false this.loading = false
}) })
}, },
// 取消订单 // 取消订单
cancelOrder() { cancelOrder() {
if(this.pagesTitle!='销售'){ if (this.pagesTitle != '销售') {
this.cancelOrderDialog = true this.cancelOrderDialog = true
}else{ } else {
if (this.loading) return; if (this.loading) return;
this.loading = true this.loading = true
let that = this let that = this
...@@ -543,33 +579,32 @@ ...@@ -543,33 +579,32 @@
}).then(() => { }).then(() => {
this.apipost("dict_post_CancelSaleCustomerOrder", { this.apipost("dict_post_CancelSaleCustomerOrder", {
OrderId: this.orderId OrderId: this.orderId
},res => { }, res => {
this.loading= false this.loading = false
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message); this.Success(res.data.message);
let path = 'singleProductHotelOrder' let path = 'singleProductHotelOrder'
if(!this.pagesTitle) return if (!this.pagesTitle) return
this.$router.push({ this.$router.push({
name: path name: path
}); });
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}).catch(err=>{ }).catch(err => {
this.Error(err.message) this.Error(err.message)
this.loading= false this.loading = false
}) })
}).catch(() => {
}).catch(()=>{
this.loading = false this.loading = false
}) })
} }
}, },
//删除酒店 //删除酒店
deleteHotelsHandler(x, y) { deleteHotelsHandler(x, y) {
let that = this let that = this
that.$confirm(`是否确定删除${this.order.DetailList[x].key}${y > -1 ? this.order.DetailList[x].data[y].HotelName : ''}?`, '提示', { that.$confirm(
`是否确定删除${this.order.DetailList[x].key}${y > -1 ? this.order.DetailList[x].data[y].HotelName : ''}?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
...@@ -614,7 +649,7 @@ ...@@ -614,7 +649,7 @@
TaxesPrice: hp.TaxesPrice TaxesPrice: hp.TaxesPrice
} }
this.rooms.forEach((x) => { this.rooms.forEach((x) => {
if (hp[x.Field? x.Field:''] > 0) { if (hp[x.Field ? x.Field : ''] > 0) {
hotel.RoomList.push({ hotel.RoomList.push({
Destription: '', Destription: '',
IsSelf: true, IsSelf: true,
...@@ -624,7 +659,7 @@ ...@@ -624,7 +659,7 @@
RoomInfo: x, RoomInfo: x,
RoomType: x.TypeId, RoomType: x.TypeId,
RoomName: x.TypeName, RoomName: x.TypeName,
Unit_Price: hp[x.Field ? x.Field:''] Unit_Price: hp[x.Field ? x.Field : '']
}) })
} }
}) })
...@@ -650,17 +685,17 @@ ...@@ -650,17 +685,17 @@
this.cancelHotelCount() this.cancelHotelCount()
}, },
chosenNewHotel(key) { chosenNewHotel(key) {
if(key){ if (key) {
this.newDate = key this.newDate = key
} }
if(!this.newDate) return this.Error('请先选择日期') if (!this.newDate) return this.Error('请先选择日期')
this.showChosenHotel = true this.showChosenHotel = true
}, },
// 计算房间 // 计算房间
calcPeople(hotel) { calcPeople(hotel) {
this.order.DetailList.forEach(x=>{ this.order.DetailList.forEach(x => {
x.data.forEach(y=>{ x.data.forEach(y => {
y.RoomList.forEach(z=>{ y.RoomList.forEach(z => {
let t = z let t = z
t.Number = Math.ceil(t.PeopleNumber / this.limitGuestNum[t.RoomType - 1]) t.Number = Math.ceil(t.PeopleNumber / this.limitGuestNum[t.RoomType - 1])
t.Money = t.PeopleNumber * t.Number t.Money = t.PeopleNumber * t.Number
...@@ -687,8 +722,8 @@ ...@@ -687,8 +722,8 @@
this.order.Money = 0 this.order.Money = 0
this.order.DetailList.forEach((x) => { this.order.DetailList.forEach((x) => {
this.order.HotelCount += x.data.length this.order.HotelCount += x.data.length
x.data.forEach((y)=>{ x.data.forEach((y) => {
this.order.Money+=y.HotelMoeny this.order.Money += y.HotelMoeny
}) })
}) })
}, },
...@@ -700,7 +735,7 @@ ...@@ -700,7 +735,7 @@
this.loading = false; this.loading = false;
if (r.data.resultCode == 1) { if (r.data.resultCode == 1) {
this.order = r.data.data this.order = r.data.data
this.order.typeInfo = this.status.find(y => y.StatusId == this.order.OrderStatus)? this.status[1] : {} this.order.typeInfo = this.status.find(y => y.StatusId == this.order.OrderStatus) ? this.status[1] : {}
this.order.DetailList.forEach((y) => { this.order.DetailList.forEach((y) => {
let PeopleNum = 0 let PeopleNum = 0
y.RoomList.forEach((z) => { y.RoomList.forEach((z) => {
...@@ -724,8 +759,8 @@ ...@@ -724,8 +759,8 @@
err => {} err => {}
); );
}, },
groupBy(array, f){ groupBy(array, f) {
const groups= {} const groups = {}
array.forEach((item) => { array.forEach((item) => {
const group = JSON.stringify(f(item)); const group = JSON.stringify(f(item));
groups[group] = groups[group] || []; groups[group] = groups[group] || [];
...@@ -733,8 +768,8 @@ ...@@ -733,8 +768,8 @@
}); });
return Object.keys(groups).map((group) => { return Object.keys(groups).map((group) => {
return { return {
key:group.replace(/\"/g,""), key: group.replace(/\"/g, ""),
data:groups[group] data: groups[group]
}; };
}); });
}, },
...@@ -762,14 +797,15 @@ ...@@ -762,14 +797,15 @@
if (r.data.data.pageData.length > 0) { if (r.data.data.pageData.length > 0) {
let temp = r.data.data.pageData[0].subList[0].PriceList[0] let temp = r.data.data.pageData[0].subList[0].PriceList[0]
this.rooms.forEach((x) => { this.rooms.forEach((x) => {
if (hotel.RoomList.findIndex((y) => y.RoomType == x.TypeId) == -1 && temp[x.Field ? x.Field:''] > 0) { if (hotel.RoomList.findIndex((y) => y.RoomType == x.TypeId) == -1 && temp[x.Field ? x.Field :
''] > 0) {
hotel.RoomList.push({ hotel.RoomList.push({
Description: '', Description: '',
Money: 0, Money: 0,
PeopleNumber: 0, PeopleNumber: 0,
RoomType: x.TypeId, RoomType: x.TypeId,
RoomTypeName: x.TypeName, RoomTypeName: x.TypeName,
Unit_Price: temp[x.Field ? x.Field:''], Unit_Price: temp[x.Field ? x.Field : ''],
RoomInfo: x, RoomInfo: x,
IsSelf: false IsSelf: false
}) })
...@@ -783,37 +819,37 @@ ...@@ -783,37 +819,37 @@
}) })
}, },
// 房型 // 房型
getHotelRoomType(getNormal){ getHotelRoomType(getNormal) {
let rooms = [] let rooms = []
if(getNormal){ if (getNormal) {
rooms.push({ rooms.push({
TypeId:0, TypeId: 0,
TypeName:'全部房型' TypeName: '全部房型'
}) })
} }
let roomLangs=['标准','大床房','自然单间','三人间','司机间'] let roomLangs = ['标准', '大床房', '自然单间', '三人间', '司机间']
let fileds = ['CostPrice', 'BidroomPrice', 'SingleroomPrice', 'AddBedPrice', 'GuideRoomPrice'] let fileds = ['CostPrice', 'BidroomPrice', 'SingleroomPrice', 'AddBedPrice', 'GuideRoomPrice']
roomLangs.forEach((x,i)=>{ roomLangs.forEach((x, i) => {
rooms.push({ rooms.push({
TypeId:(i+1), TypeId: (i + 1),
TypeName:x, TypeName: x,
Field:fileds[i] Field: fileds[i]
}) })
}) })
return rooms return rooms
}, },
// 状态 // 状态
getHotelOrderStatus(){ getHotelOrderStatus() {
let status=[] let status = []
let text = ['全部订单','待确认','已确认','已取消','收损订单'] let text = ['全部订单', '待确认', '已确认', '已取消', '收损订单']
let color = ['','positive','dark','orange','negative'] let color = ['', 'positive', 'dark', 'orange', 'negative']
let icons = ['','update','done','offline_bolt','cached'] let icons = ['', 'update', 'done', 'offline_bolt', 'cached']
text.forEach((x,i)=>{ text.forEach((x, i) => {
status.push({ status.push({
StatusId:i, StatusId: i,
StatusName:x, StatusName: x,
Icon:icons[i], Icon: icons[i],
Color:`text-${color[i]}` Color: `text-${color[i]}`
}) })
}) })
return status return status
......
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