Commit f3992fd7 authored by youjie's avatar youjie

no message

parent 2cf143bf
......@@ -233,7 +233,7 @@
this.loading = true
let url
// 销售 OP
if(this.pagesTitle){
if(this.pagesTitle=='销售'){
url = "dict_post_GetMySaleCustomerOrderPageList"
}else{
url = "dict_post_GetAdminCustomerOrderPageList"
......
......@@ -349,8 +349,8 @@
<span class="mr">
{{ item.SaleName }}
</span>
<span class="mr" v-if="!pagesTitle&&item.CustomerName">创建人:</span>
<span class="mr" v-if="!pagesTitle&&item.CustomerName"
<span class="mr" v-if="item.CustomerName">创建人:</span>
<span class="mr" v-if="item.CustomerName"
>{{ item.CustomerName }} ({{ item.CustomerContact }}/{{
item.CustomerTel
}})</span
......@@ -681,18 +681,22 @@
<div class="row-c justify-sb borderD pb5">
<span class="fz12 c9e">订单总金额</span>
<div class="ml">
<span class="fz12 ml">¥</span>
<span class="fz12 ml">
<!-- ¥ -->
</span>
<span class="fz15 fbold">{{ item.Money.toFixed(2) }}</span>
<span class="fz15">{{ item.CurrencyName }}</span>
</div>
</div>
<div
class="row-c justify-sb borderD py5"
v-if="(item.CustomerPayType == 1 || item.CustomerPayType == 3)&&!pagesTitle"
v-if="(item.CustomerPayType == 1 || item.CustomerPayType == 3)&&pagesTitle!='销售'"
>
<span class="fz12 c9e">到店自付</span>
<div class="ml">
<span class="fz10 ml">¥</span>
<span class="fz10 ml">
<!-- ¥ -->
</span>
<span class="fz14">{{ item.SelfPayMoney.toFixed(2) }}</span>
<span class="fz14">{{ item.CurrencyName }}</span>
</div>
......@@ -703,7 +707,9 @@
>
<span class="fz12 c9e">出发前付款</span>
<div class="ml">
<span class="fz10 ml">¥</span>
<span class="fz10 ml">
<!-- ¥ -->
</span>
<span class="fz14">{{ item.BeforeMoney.toFixed(2) }}</span>
<span class="fz14">{{ item.CurrencyName }}</span>
</div>
......@@ -1007,6 +1013,8 @@ export default {
name: path,
query: {
id: obj.OrderId,
pagesTitle: this.pagesTitle,
blank: "y",
tab: title
}
});
......@@ -1016,8 +1024,8 @@ export default {
// 0取消订单 1确认订单
if (type == 0) {
if (!this.loading0) {
this.cancelOrderDialog = true;
this.cancelOrderId = item.OrderId
this.cancelOrderDialog = true;
}
} else if (type == 1) {
if (!this.loading1) {
......@@ -1052,6 +1060,8 @@ export default {
}
if (this.loading0) return;
this.loading0 = true
// 地接 销售 OP
if(this.pagesTitle!='销售'){
this.apipost(
"dict_post_CancelAdminCustomerOrder",
{
......@@ -1074,6 +1084,38 @@ export default {
this.loading0 = false;
}
);
}else{
this.cancelOrder()
}
},
// 销售 OP 取消订单
cancelOrder() {
let that = this
that.$confirm(`是否确定取消订单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost("dict_post_CancelSaleCustomerOrder", {
OrderId: this.cancelOrderId,
CancelRemark: this.cancelRemark
},
res => {
this.loading0= false
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.$emit("success");
} else {
this.Error(res.data.message);
}
}).catch(err=>{
this.Error(err.message)
this.loading0= false
})
}).catch(()=>{
this.loading0 = false
})
},
saveUpdate() {
this.$confirm("是否确认设置收损?", "提示", {
......
......@@ -47,7 +47,7 @@
<span>
<em>酒店</em>
<el-select v-model="msg.HotelChooseArray" :placeholder="$t('pub.pleaseSel')" class="multiple_input w300"
filterable multiple :multiple-limit="3">
filterable multiple collapse-tags :multiple-limit="3">
<el-option v-for="item in HotelList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</span>
......@@ -697,6 +697,7 @@
let newCars = []
let states = true
oldCars = JSON.parse(localStorage.getItem("cars"))
if(oldCars){
oldCars.forEach(item=>{
if(item.Date<this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd"))){
states = false
......@@ -711,6 +712,8 @@
localStorage.removeItem('HotelLength')
localStorage.setItem('HotelLength',JSON.stringify(this.HotelLength))
}
}
this.HotelLength = localStorage.getItem("HotelLength")?localStorage.getItem("HotelLength"):0
......
......@@ -61,7 +61,7 @@
flex-direction: column;
background: #ffffff;
border-radius: 5px;
margin-right: 15px;
margin: 0 10px 10px 0;
overflow: hidden;
}
.content-header{
......@@ -93,11 +93,10 @@
font-size: 14px;
font-weight: 400;
color: #009EF7;
padding: 0 5px;
padding: 0 5px 5px 5px;
display: flex;
justify-content: space-between;
border-bottom: 1px dashed rgba(96, 125, 139, 0.2);
margin-bottom: 5px;
}
.content-Car-title span{
width: 80%;
......@@ -110,17 +109,24 @@
cursor: pointer;
display: none;
}
.content-Car-title:hover .content-Car-title i{
.content-Car-title:hover i{
display: block;
}
.content-Car-num{
padding: 7px 5px;
align-items: center;
}
.content-Car-num>div:last-child .num-roomtype{
padding: 0;
}
.num-roomtype{
padding: 0 0 15px 0;
color: #181C32;
}
.num-roomtype span{
color: #6F8A96;
padding: 5px 0 0 0;
display: block;
padding: 3px 0 0 0;
}
.num-roomnum{
color: #9E9E9E;
......@@ -157,7 +163,7 @@
font-weight: bold;
}
.content-picker-text{
height: 240px;
height: 183px;
display: flex;
flex-direction: column;
justify-content: center;
......@@ -181,7 +187,7 @@
height: 30px;
}
/deep/.content-Car .el-input-number{
width: 106px;
width: 100%;
line-height: 30px;
}
/deep/.content-Car .el-input-number__increase{
......@@ -201,49 +207,49 @@
<template>
<div>
<div class="ModifyHotelOrder-OrderId">
<div class="ModifyHotelOrder-OrderId" v-if="order">
<div>
订单编号
订单编号 {{ order.OrderNo }}
</div>
<div>本次行程<span>5</span>天,入住<span>5</span>个酒店</div>
<div>订单总金额:<span>¥</span><b>175.000</b></div>
<div>本次行程<span 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>
<button class="hollowFixedBtn">取消订单</button>
<button class="normalBtn">保存订单</button>
<button class="hollowFixedBtn" @click="cancelOrder">取消订单</button>
<button class="normalBtn" @click="saveOrderHandler">保存订单</button>
</div>
</div>
<div class="ModifyHotelOrder-OrderInfor">
<p>订单信息</p>
<div>
<el-form label-width="60px" :model="parameters" :rules="rules" ref="parameters">
<el-form label-width="60px" :model="order" :rules="rules" ref="order">
<el-row :gutter="20">
<el-col :span="4">
<el-form-item label="类型" prop="OrderType">
<el-select v-model="parameters.OrderType">
<el-select v-model="order.OrderType">
<el-option v-for="item in cacheHotels" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</el-form-item>
</el-col>
<template v-if="parameters.OrderType==1">
<template v-if="order.OrderType==1">
<el-col :span="4">
<el-form-item label="姓名" prop="ContactName">
<el-input v-model="parameters.ContactName"></el-input>
<el-input v-model="order.ContactName"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="电话" prop="ContactNumber">
<el-input v-model="parameters.ContactNumber"></el-input>
<el-input v-model="order.ContactNumber"></el-input>
</el-form-item>
</el-col>
</template>
<el-col :span="4" v-else>
<el-form-item label="团号" prop="TCNum">
<el-input v-model="parameters.TCNum"></el-input>
<el-input v-model="order.TCNum"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="">
<el-input placeholder="请输入备注" v-model="parameters.Remark"></el-input>
<el-input placeholder="请输入备注" v-model="order.Remark"></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -251,44 +257,53 @@
</div>
</div>
<div class="ModifyHotelOrder-content">
<div>
<div class="content-box">
<div style="display: flex;flex-wrap: wrap;align-items: flex-start;">
<div class="content-box" v-for="(x, xi) in order.DetailList">
<div class="content-header">
<span>日期</span>
<span>{{ x.key }}</span>
<div>
<i class="el-icon-plus"></i>
<i class="el-icon-delete-solid"></i>
<i class="el-icon-delete-solid" @click="removeHotelHandler(xi, -1)"></i>
</div>
</div>
<div>
<div class="content-Car" v-for="item in 3">
<div class="content-Car" v-for="(y, yi) in x.data">
<p class="content-Car-title">
<span>酒店名称</span>
<i class="el-icon-delete-solid"></i>
<span>{{ y.HotelName }}</span>
<i class="el-icon-delete-solid" @click="removeHotelHandler(xi, yi)"></i>
</p>
<div class="content-Car-num">
<div v-for="(z, i) in y.RoomList">
<el-row :gutter="20" style="display: flex;align-items: center;justify-content: space-between;">
<el-col :span="7">
<el-col :span="8">
<div class="num-roomtype">
<p>标间</p>
<span>785/人</span>
<p>{{ z.RoomInfo.TypeName }}</p>
<span>{{ moneyFormat(z.Unit_Price) }}/人</span>
</div>
</el-col>
<el-col :span="7">
<p class="num-roomnum">预计<span>1</span>间房</p>
<p class="num-roomnum">预计<span>{{ z.Number }}</span>间房</p>
</el-col>
<el-col :span="10">
<el-input-number v-model="num" :min="0" :step="1" step-strictly></el-input-number>
<el-col :span="9">
<el-input-number v-model="z.PeopleNumber" :min="0" :step="1" step-strictly @change="calcPeople"></el-input-number>
</el-col>
</el-row>
</div>
<div class="noroomtype">无其他可用房型</div>
</div>
<div class="noroomtype">
<template v-if="!y.HaveOtherRoom">
无其他可用房型
</template>
<template v-else>
使用其他房型
</template>
</div>
<div class="content-Car-shui">
<span>城市税: 0/人</span>
<span>入汤税: 0/人</span>
<span>城市税: {{ moneyFormat(y.TaxesPrice) }}/人</span>
<span>入汤税: {{ moneyFormat(y.PriceInTangTax) }}/人</span>
</div>
<div class="content-Car-heji">
<span>合计:<span>¥185255</span></span>
<span>合计:<span><!-- ¥ -->円{{ moneyFormat(y.HotelMoeny) }}</span></span>
</div>
</div>
</div>
......@@ -300,22 +315,54 @@
<div class="content-header">
<span>新日期预定</span>
<div>
<el-date-picker class="w150" v-model="dates" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期"></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 class="content-Car content-picker-text">
<div>
<span>选择酒店</span>
<span @click="showChoose">选择酒店</span>
</div>
<div>
<div v-if="!newDate">
<span>*<span>请先选择需要预定的日期</span></span>
</div>
</div>
</div>
</div>
<el-dialog custom-class="w800" title="酒店检索" :visible.sync="showChosenHotel" center>
<ChosenHotel @close="close"></ChosenHotel>
<el-dialog v-show="showChosenHotel" custom-class="w800" title="酒店检索" :visible.sync="showChosenHotel" center>
<ChosenHotel :newDate="newDate" @finish="finishHanler"></ChosenHotel>
</el-dialog>
<el-dialog
custom-class="w600"
title="取消订单"
:visible.sync="cancelOrderDialog"
>
<div style="padding-bottom:20px">
<el-input
type="textarea"
autofocus
rows="5"
placeholder="请填写取消订单的缘由"
clear="w300"
v-model="cancelRemark"
></el-input>
<el-row :gutter="20" style="margin-top: 20px;">
<el-col :span="24" style="text-align: right;">
<input
type="button"
class="normalBtn"
value="取消订单"
@click="cancelOrderHandler"
/>
<input
type="button"
class="hollowFixedBtn"
value="关闭"
@click="cancelOrderDialog = false"
/>
</el-col>
</el-row>
</div>
</el-dialog>
</div>
</template>
......@@ -325,18 +372,17 @@
components: { ChosenHotel },
data() {
return {
dates: new Date(),
num:0,
showChosenHotel: true,
parameters:{
Money: 0,
DetailList: [],
Remark: '',
OrderType: 1, //订单类型 1散客 2团队
TCNum: '', //=团队时 传递 组团号
ContactName: '', //=散客时 传递 联系人
ContactNumber: '', //=散客时 传递 联系人电话
OrderId: 0
newDate: this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd")),
orderId: 0,
order: {},//下单信息
loading: false,
status: this.getHotelOrderStatus(),//状态
rooms: this.getHotelRoomType(),//房型
limitGuestNum: [2, 1, 1, 3, 1],
showChosenHotel: false,
tempHotels: {
key: '',
data: []
},
cacheHotels: [
{ Name: '散客', ID: 1 },
......@@ -365,19 +411,406 @@
message: '请输入团号',
trigger: 'blur'
}],
},
beforeCheck: {
disabledDate: time => {
let endTime = new Date(this.getBeforeDate(-19,new Date().Format("yyyy-MM-dd")));
return time && endTime.getTime() >= time.getTime();
}
},
pagesTitle:'',
cancelRemark: '',
cancelOrderDialog: false
};
},
methods: {
close(){
// 确定下单
submit() {
this.$refs['order'].validate((valid) => {
if (valid) {
this.saveOrderHandler()
} else {
return false;
}
});
},
// 保存订单
saveOrderHandler(){
if(this.loading) return
let detailList=[]
this.order.DetailList.forEach((x)=>{
detailList.push(...x.data)
})
detailList.forEach((x)=>{
x.RoomList = x.RoomList.filter((y)=>y.Number>0)
})
detailList = detailList.filter((x)=>x.RoomList.length>0)
let parameter = JSON.parse(JSON.stringify(this.order))
parameter.DetailList = detailList
this.loading = true
this.apipost("dict_post_SetSaleCustomerOrder", parameter,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.Success('保存成功');
let path = ''
if(this.pagesTitle=='销售'){
path = 'singleProductHotelOrder'
}if(this.pagesTitle=='OP'){
path = 'singleProductHotelOrderOP'
}
if(!this.pagesTitle) return
this.$router.push({
name: path
});
} else {
this.Error('下单失败')
}
},
err => {
this.Error(err.message)
this.loading = false
}
);
},
removeHotelHandler(x, y) {
let cando = false
if (y > -1) {
cando = this.order.DetailList.length > 1 || this.order.DetailList[0].data.length > 1
} else {
cando = this.order.DetailList.length > 1
}
if (cando) {
this.deleteHotelsHandler(x, y)
} else {
if(this.loading) return
this.loading = true
this.cancelOrder()
}
},
cancelOrderHandler() {
if (this.cancelRemark == "") {
this.Error("请填写取消订单的缘由");
return;
}
if (this.loading) return;
this.loading = true
let that = this
that.$confirm(`是否确定取消订单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if(this.pagesTitle!='销售'){
this.apipost(
"dict_post_CancelAdminCustomerOrder",
{
OrderId: this.cancelOrderId,
CancelRemark: this.cancelRemark
},res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
let path = 'singleProductHotelOrderOP'
if(!this.pagesTitle) return
this.$router.push({
name: path
});
} else {
this.Error(res.data.message);
}
this.loading0 = false;
},
err => {
this.loading0 = false;
});
}else{
this.apipost("dict_post_CancelSaleCustomerOrder", {
OrderId: this.orderId
},res => {
this.loading= false
if (res.data.resultCode == 1) {
this.Success(res.data.message);
let path = 'singleProductHotelOrder'
if(!this.pagesTitle) return
this.$router.push({
name: path
});
} else {
this.Error(res.data.message);
}
}).catch(err=>{
this.Error(err.message)
this.loading= false
})
}
}).catch(()=>{
this.loading = false
})
},
// 取消订单
cancelOrder() {
this.cancelOrderDialog = true
},
//删除酒店
deleteHotelsHandler(x, y) {
let that = this
that.$confirm(`是否确定删除${this.order.DetailList[x].key}${y > -1 ? this.order.DetailList[x].data[y].HotelName : ''}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (y > -1) {
this.order.DetailList[x].data.splice(y, 1)
if (this.order.DetailList[x].data.length == 0) {
this.order.DetailList.splice(x, 1)
}
} else {
this.order.DetailList.splice(x, 1)
}
this.cancelHotelCount()
}).catch(() => {
});
},
mounted() {
finishHanler(h) {
this.showChosenHotel = false
let hp = h.subList[0].PriceList[0]
//#region 組裝對象
let hotel = {
ContractUrl: null,
CurrencyId: hp.CurrencyId,
CurrencyName: '日元',
CustomerPayType: 0,
Date: h.subList[0].DateStr.replace(/-/g, '/'),
Destription: null,
HaveOtherRoom: false,
HotelId: h.HotelId,
HotelMoeny: 0.0,
HotelName: h.HotelName,
HotelStatus: 1,
HotelStatusName: '暂定',
Id: 0,
ImageList: h.ImageList,
PeopleNum: 0,
PriceInTangTax: hp.PriceInTangTax,
ReserveRoomNo: null,
RoomList: [],
TaxesPrice: hp.TaxesPrice
}
this.rooms.forEach((x) => {
if (hp[x.Field? x.Field:''] > 0) {
hotel.RoomList.push({
Destription: '',
IsSelf: true,
Money: 0,
PeopleNumber: 0,
Number: 0,
RoomInfo: x,
RoomType: x.TypeId,
RoomName: x.TypeName,
Unit_Price: hp[x.Field ? x.Field:'']
})
}
})
//#endregion
let i = this.order.DetailList.findIndex((x) => x.key == hotel.Date)
if (i == -1) {
this.order.DetailList.push({
key: hotel.Date,
data: [hotel]
})
this.order.DetailList.sort((x, y) => {
return new Date(x.key).getTime() - new Date(y.key).getTime()
})
} else {
let y = this.order.DetailList[i].data.findIndex((x) => x.HotelId == hotel.HotelId)
if (y == -1) this.order.DetailList[i].data.push(hotel)
}
if (hotel.Date == this.tempHotels.key) {
this.tempHotels.key = ''
this.tempHotels.data = []
}
this.cancelHotelCount()
},
showChoose(){
if(!this.newDate) return this.Error('请先选择日期')
this.showChosenHotel = true
},
// 计算房间
calcPeople(hotel) {
this.order.DetailList.forEach(x=>{
x.data.forEach(y=>{
y.RoomList.forEach(z=>{
let t = z
t.Number = Math.ceil(t.PeopleNumber / this.limitGuestNum[t.RoomType - 1])
t.Money = t.PeopleNumber * t.Number
this.calcMoney(y)
})
})
})
},
calcMoney(hotel) {
let money = 0.0
let peoples = 0
hotel.RoomList.forEach((x) => {
money += x.Unit_Price * x.PeopleNumber
peoples += x.PeopleNumber
})
money += peoples * (hotel.TaxesPrice + hotel.PriceInTangTax)
hotel.PeopleNum = peoples
hotel.HotelMoeny = money
this.cancelHotelCount()
},
cancelHotelCount() {
this.order.HotelCount = 0
this.order.Money = 0
this.order.DetailList.forEach((x) => {
this.order.HotelCount += x.data.length
x.data.forEach((y)=>{
this.order.Money+=y.HotelMoeny
})
})
},
initOrderDetails() {
this.apipost("dict_post_GetMySaleCustomerOrderInfo", {
OrderId: this.orderId
},
r => {
this.loading = false;
if (r.data.resultCode == 1) {
this.order = r.data.data
this.order.typeInfo = this.status.find(y => y.StatusId == this.order.OrderStatus)? this.status[1] : {}
this.order.DetailList.forEach((y) => {
let PeopleNum = 0
y.RoomList.forEach((z) => {
z.RoomInfo = this.rooms.find(r => r.TypeId == z.RoomType) ? this.rooms[0] : {}
PeopleNum += z.PeopleNumber
z.IsSelf = true
})
y.PeopleNum = PeopleNum
// this.loadOtherRoom(y)
})
this.order.HotelCount = this.order.DetailList.length
this.order.DetailList = this.groupBy(this.order.DetailList, (x) => {
return x.Date
})
} else {
this.Error(r.data.message);
}
},
err => {}
);
},
groupBy(array, f){
const groups= {}
array.forEach((item) => {
const group = JSON.stringify(f(item));
groups[group] = groups[group] || [];
groups[group].push(item);
});
return Object.keys(groups).map((group) => {
return {
key:group.replace(/\"/g,""),
data:groups[group]
};
});
},
loadOtherRoom(hotel) {
let searchObj = {
HotelChooseArray: [hotel.HotelId],
StartDate: hotel.Date,
EndDate: hotel.Date,
Country: '651',
Province: 0,
City: 0,
OutBranchId: -1,
Star: 0,
PriceLevel: 0,
Supplier: 0,
MaxPrice: 0,
MinPrice: 0,
pageIndex: 1,
pageSize: 10,
pageCount: 0
}
this.apipost("dict_post_HotelOffer_GetClientHotelStatics", searchObj,
r => {
if (r.data.resultCode == 1) {
if (r.data.data.pageData.length > 0) {
let temp = r.data.data.pageData[0].subList[0].PriceList[0]
this.rooms.forEach((x) => {
if (hotel.RoomList.findIndex((y) => y.RoomType == x.TypeId) == -1 && temp[x.Field ? x.Field:''] > 0) {
hotel.RoomList.push({
Description: '',
Money: 0,
PeopleNumber: 0,
RoomType: x.TypeId,
RoomTypeName: x.TypeName,
Unit_Price: temp[x.Field ? x.Field:''],
RoomInfo: x,
IsSelf: false
})
hotel.HaveOtherRoom = true
}
})
}
} else {
this.Error(r.data.message);
}
})
},
// 房型
getHotelRoomType(getNormal){
let rooms = []
if(getNormal){
rooms.push({
TypeId:0,
TypeName:'全部房型'
})
}
let roomLangs=['标准','大床房','自然单间','三人间','司机间']
let fileds = ['CostPrice', 'BidroomPrice', 'SingleroomPrice', 'AddBedPrice', 'GuideRoomPrice']
roomLangs.forEach((x,i)=>{
rooms.push({
TypeId:(i+1),
TypeName:x,
Field:fileds[i]
})
})
return rooms
},
// 状态
getHotelOrderStatus(){
let status=[]
let text = ['全部订单','待确认','已确认','已取消','收损订单']
let color = ['','positive','dark','orange','negative']
let icons = ['','update','done','offline_bolt','cached']
text.forEach((x,i)=>{
status.push({
StatusId:i,
StatusName:x,
Icon:icons[i],
Color:`text-${color[i]}`
})
})
return status
},
},
mounted() {
this.pagesTitle = this.$route.query.pagesTitle
this.orderId = this.$route.query.id
this.initOrderDetails()
},
};
......
......@@ -17,10 +17,9 @@
</span>
</li>
<li><span><em>日期</em>
<el-date-picker class="w140" v-model='msg.StartDate' value-format="yyyy-MM-dd" type="date"
:picker-options="beforeCheck">
<el-date-picker disabled style="width: 135px;" v-model='msg.StartDate' value-format="yyyy-MM-dd" type="date">
</el-date-picker>
<el-date-picker class="w140" v-model='msg.EndDate' value-format="yyyy-MM-dd" type="date" :picker-options="afterCheck">
<el-date-picker disabled style="width: 135px;" v-model='msg.EndDate' value-format="yyyy-MM-dd" type="date">
</el-date-picker>
</span>
</li>
......@@ -28,7 +27,7 @@
<span>
<em>酒店</em>
<el-select v-model="msg.HotelChooseArray" :placeholder="$t('pub.pleaseSel')" class="multiple_input HotelChooseArray"
filterable multiple :multiple-limit="3">
filterable multiple collapse-tags :multiple-limit="3">
<el-option v-for="item in HotelList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</span>
......@@ -47,9 +46,9 @@
<li>
<span>
<em>价格区间</em>
<el-input class="w80" type="Number" v-model="msg.MinPrice"></el-input>
<el-input class="w50" type="Number" v-model="msg.MinPrice"></el-input>
<span style="padding: 0 10px;">-</span>
<el-input class="w80" type="Number" v-model="msg.MaxPrice"></el-input>
<el-input class="w50" type="Number" v-model="msg.MaxPrice"></el-input>
</span>
</li>
......@@ -74,10 +73,8 @@
:height="tableHeight">
<el-table-column fixed label="酒店名称" min-width="180">
<template slot-scope="scope">
<!-- @click="GotoHotel(scope.row.HotelId)" -->
<div style="text-decoration: underline;cursor:pointer" @click="showHotelDetailHandler(scope.row.HotelId)">
<div>
{{scope.row.HotelName}}</div>
<div>{{scope.row.TotalInventory}}</div>
</template>
</el-table-column>
<el-table-column label="价格&库存" fixed min-width="120">
......@@ -91,7 +88,7 @@
<el-table-column v-for='(item,index) in dataList[0].subList' :label="getDateList(item.DateStr)" :key='index'
min-width="120">
<template slot-scope="scope">
<div @click="showOrderSubmitHandler(scope.row,0,index)">
<div>
<div class="Hotel_kong Com_hoteldiv">
<template v-if="scope.row.subList[index].PriceList.length>0">
<template v-for="childItem in scope.row.subList[index].PriceList">
......@@ -132,6 +129,13 @@
</div>
</template>
</el-table-column>
<el-table-column label="酒店名称" min-width="100">
<template slot-scope="scope">
<div class="choose-hotel">
<span @click="finishHanler(scope.row)">选择</span>
</div>
</template>
</el-table-column>
</el-table>
<div class="noDataNotice" v-else>
<i class="iconfont icon-kong"></i>
......@@ -150,30 +154,18 @@
import ListCar from './ListCar'
import hotelDetails from './hotelDetails'
export default {
components: { SamplePriceList,TableOperation,ListCar,hotelDetails },
components: { SamplePriceList, },
props:['newDate'],
data() {
return {
showHotelDetails: false,
HotelDetailId: 0,
editorType:0,
rightCarOpen: false,
HotelLength: 0,
orderSubmitItemObj: {},
orderSubmitObj: {},
showOrderPreview: false,
total:0,
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
}
},
msg: {
pageIndex: 1,
pageSize: 10,
//酒店选择数组
HotelChooseArray: [],
StartDate: this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd")),
EndDate: this.getBeforeDate(-30,this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd"))),
StartDate: '',
EndDate: '',
//只查询日本
Country: "651",
Province: 0,
......@@ -189,30 +181,8 @@
MinPrice: 0
},
tableHeight: 0,
beforeCheck: {
disabledDate: time => {
if (this.msg.StartDate) {
let endTime = new Date(this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd")));
return time && endTime.getTime() >= time.getTime();
} else {
return false;
}
}
},
afterCheck: {
disabledDate: time => {
if (this.msg.StartDate) {
let startTime = new Date(this.msg.StartDate);
//可以选择当天
return time && time.getTime() < startTime.getTime() - 1 * 24 * 60 * 60 * 1000;
} else {
return false;
}
}
},
//分公司列表
companyList: [],
defaultSelectValue: 0,
//国家 省市 区
provinceList: [],
cityList: [],
......@@ -235,127 +205,30 @@
showHQinfo: false,
//酒店温馨提示列表
HotelTipList: [],
//供应商列表
SupplierList: [],
HotelList: [],
dataList: [],
isShow: false,
loading: false,
showNotice: false,
pickerBeginDateBefore: {
disabledDate: time => {
let endTime = new Date(this.queryMsg.QStartDate)
return endTime.getTime() < time.getTime()
}
},
pickerBeginDateAfter: {
disabledDate: time => {
let startTime = new Date(this.queryMsg.QEndDate)
return startTime.getTime() >= time.getTime()
}
},
editorOption: {
placeholder: '请输入内容',
modules: {
toolbar: [
['bold', 'italic', 'underline', 'strike'], // toggled buttons
['blockquote', 'code-block', 'align']
]
}
},
HOTEL_memorandum: false
};
},
methods: {
removeEditor(){
localStorage.removeItem('editor')
},
// 酒店信息详情
showHotelDetailHandler(hotelId){
this.HotelDetailId = hotelId
this.showHotelDetails = true
},
// 编辑购物车
editor(x){
this.dataList.forEach((item,index) => {
if(item.HotelId==x.HotelId){
item.subList.forEach(xs=>{
if(xs.DateStr==x.Date){
this.rightCarOpen = false
this.showOrderSubmitHandler(item,index,1)
}
})
}
})
},
// 提交预约成功
success(){
this.close()
watch: {
newDate: {
handler(newValue,onldValue) {
if(newValue!=onldValue){
this.getList()
},
// 取消
close(){
this.HotelLength = localStorage.getItem("HotelLength")?localStorage.getItem("HotelLength"):0
this.showOrderPreview = false
this.rightCarOpen = false
this.showHotelDetails = false
localStorage.removeItem("editor")
},
// 加入购物车
showOrderSubmitHandler(row,type,index){
this.orderSubmitObj = row
this.orderSubmitItemObj = row.subList[index]
this.showOrderPreview = true
this.editorType = type?type:0
},
goUrl(name, id) {
this.$router.push({
name: name,
query: {
blank: "y",
tab: "备忘录"
}
});
},
// 获取供应商
initSupplier() {
this.apipost("supplier_post_GetAllList", {
Type: 1
}, res => {
if (res.data.resultCode === 1) {
this.SupplierList = res.data.data;
}
}, err => {});
},
GotoHotel(HotelId) {
this.$router.push({
path: "HotelManagement",
query: {
ID: HotelId,
tab: "酒店查询",
blank: 'y',
}
});
immediate: true
},
GotoUrl(item, subIndex, UseInventory) {
if (UseInventory > 0) {
this.$router.push({
path: "TravelControlList",
query: {
HotelId: item.HotelId,
HotelUseTime: item.subList[subIndex].DateStr,
IsUnionCked: 0,
blank: 'y',
tab: "团控查询",
}
});
}
},
methods: {
finishHanler(hotel){
this.$emit('finish',hotel)
},
com_onresize() {
//clientHeight的值由DIV内容的实际高度和CSS中的padding值决定,
var contentsHeight = document.body.clientHeight;
var h = contentsHeight - 50 - 180 - 100;
var h = contentsHeight - 50 - 180 - 350;
if (h < 110) {
return;
}
......@@ -364,12 +237,9 @@
},
getList() {
this.loading = true;
if (this.msg.StartDate == null) {
this.msg.StartDate = this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd"));
}
if (this.msg.EndDate == null) {
this.msg.EndDate = this.getBeforeDate(-30,this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd")));
}
this.msg.StartDate = this.newDate;
this.msg.EndDate = this.newDate;
if(!this.msg.StartDate) return
this.apipost("dict_post_HotelOffer_GetClientHotelStatics", this.msg,
res => {
this.loading = false;
......@@ -399,17 +269,6 @@
err => {}
);
},
setEdate() {
return this.addMoth(new Date().Format("yyyy-MM-dd"), 1)
},
addMoth(d, m) {
let ds = d.split('-'),
_d = ds[2] - 0;
let nextM = new Date(ds[0], ds[1] - 1 + m + 1, 0);
let max = nextM.getDate();
d = new Date(ds[0], ds[1] - 1 + m, _d > max ? max : _d);
return d.toLocaleDateString().match(/\d+/g).join('-')
},
//格式化返回显示日期
getDateList(dateStr) {
var str = dateStr.split('-');
......@@ -473,41 +332,6 @@
err => {}
);
},
SaveHotelTip() {
this.apipost(
"hoteltip_post_SetHotelTip", this.postMsg,
res => {
if (res.data.resultCode == 1) {
this.Success("保存成功!");
this.postMsg.Id = 0;
this.postMsg.TipContent = "";
this.GetHotelTipList();
} else {
this.Error("保存失败!");
}
},
err => {}
);
},
RemoveHotelTip(Id) {
var that = this;
this.Confirm('是否要删除此数据?', function () {
that.apipost(
"hoteltip_post_RemoveHotelTip", {
ID: Id
},
res => {
if (res.data.resultCode == 1) {
that.Success("删除成功!");
that.GetHotelTipList();
} else {
that.Error("删除失败!");
}
},
err => {}
);
})
},
GetHotelTip(Id) {
this.apipost(
"hoteltip_get_GetHotelTip", {
......@@ -562,49 +386,8 @@
}
}, err => {})
},
//Excel下载
DownLoadHotelQuery() {
this.loading = true;
let qMsg = {
queryMsg: this.msg,
uid: this.getLocalStorage().EmployeeId
};
let fileName = "酒店查询统计" + this.$commonUtils.getCurrentDate() + ".xls";
this.GetLocalFile("hotel_get_downloadHotelQuery", qMsg, fileName,
res => {
this.loading = false;
});
},
},
mounted() {
// 当前日期小于20天更新数据
let oldCars = []
let newCars = []
let states = true
oldCars = JSON.parse(localStorage.getItem("cars"))
oldCars.forEach(item=>{
if(item.Date<this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd"))){
states = false
}else{
newCars.push(item)
}
})
if(!states){
this.HotelLength = newCars.length
localStorage.removeItem("cars")
localStorage.setItem("cars",JSON.stringify(newCars))
localStorage.removeItem('HotelLength')
localStorage.setItem('HotelLength',JSON.stringify(this.HotelLength))
}
this.HotelLength = localStorage.getItem("HotelLength")?localStorage.getItem("HotelLength"):0
let userinfo = this.getLocalStorage();
let ActionMenuCode = userinfo.ActionMenuCode;
if (ActionMenuCode.indexOf("HOTEL_memorandum") != -1) {
this.HOTEL_memorandum = true;
}
this.initSupplier();
this.getBranchList();
this.getProvinceList("651", 1);
this.GetHotelList();
......@@ -669,9 +452,9 @@
.Hotel_kong {
width: 100%;
height: 35px;
height: 25px;
text-align: center;
line-height: 35px;
line-height: 25px;
border-bottom: 1px solid #d1d1d1;
}
......@@ -681,7 +464,7 @@
.HouseTypeList tr th {
background: #e6e6e6;
height: 35px;
height: 25px;
font-size: 12px;
color: #333;
}
......@@ -689,7 +472,7 @@
.HouseTypeList tr {
background: #fff;
text-align: center;
height: 35px;
height: 25px;
}
.HouseTypeList tr td {
......@@ -763,11 +546,33 @@
width: 120px !important;
}
/deep/.query-box .HotelChooseArray .el-input{
width: 120px !important;
width: 200px !important;
}
/deep/.query-box .Star .el-input{
width: 100px !important;
}
/deep/.el-table td{
padding: 0;
}
/deep/.el-table .cell{
padding-left: 0;
padding-right: 0;
}
.choose-hotel{
display: flex;
align-items: center;
justify-content: center;
padding: 10px 0;
}
.choose-hotel span{
padding: 0 15px;
border-radius: 5px;
border: 1px solid #009EF7;
color: #009EF7;
font-size: 12px;
cursor: pointer;
}
</style>
......@@ -105,7 +105,7 @@
<div>
<span class="coloref1416c fz12">订单总金额:</span>
<span class="coloref1416c fbold">
<span class="fz13">¥</span>
<span class="fz13"><!-- ¥ --></span>
<span class="fz18">{{parameters.Money}}</span>
</span>
</div>
......
......@@ -37,7 +37,7 @@
{{ item.RoomName }}
</el-col>
<el-col :span="9">
<span class="fz10 colorf44336">¥</span>
<span class="fz10 colorf44336"><!-- ¥ --></span>
<span class="din colorf44336">{{ item.UPriceFormat }}</span>
<span class="text-dark" style="font-size: 12px">/人</span>
</el-col>
......
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