Commit 26a6bcde authored by 王悦's avatar 王悦
parents d3dfaa9d d25219fe
<template> <template>
<div> <div>
<div class="query-box" style="border-bottom: none;"> <div class="query-box" style="border-bottom: none;">
<ul> <ul>
<li> <li>
<input type="button" class="fr normalBtn mb30" value="保存" @click="saveList(1)"/> <input type="button" class="fr normalBtn mb30" value="保存" @click="saveList(1)" />
<input type="button" class="fr normalBtn mb30" value="保存草稿" @click="saveList(0)"/> <input type="button" class="fr normalBtn mb30" value="保存草稿" @click="saveList(0)" />
</li> </li>
</ul> </ul>
</div> </div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="ownScrollbarStyle"> <div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="ownScrollbarStyle">
<table border="0" cellspacing="1" cellpadding="0" class="bookDinnerStatisticsTalbe"> <table border="0" cellspacing="1" cellpadding="0" class="bookDinnerStatisticsTalbe">
<tr> <tr>
<th width="120">公司团号</th> <th width="120">公司团号</th>
<th width="150">用餐时间</th> <th width="150">用餐时间</th>
<th width="200">餐厅名称</th> <th width="200">餐厅名称</th>
<th width="200">修改餐厅</th> <th width="200">修改餐厅</th>
<th width="80">类别</th> <th width="80">类别</th>
<th width="200">餐饮类型</th> <th width="200">餐饮类型</th>
<th width="80">总人数</th> <th width="80">总人数</th>
<th width="150">用餐人类型</th> <th width="150">用餐人类型</th>
<th width="80">用餐人数</th> <th width="80">用餐人数</th>
<th width="150">价格</th> <th width="150">价格</th>
<th width="150">免人数</th> <th width="150">免人数</th>
<th width="80">金额小计</th> <th width="80">金额小计</th>
<th width="150">返佣</th> <th width="150">返佣</th>
<th width="150">总金额</th> <th width="150">总金额</th>
<th width="80">付款方式</th> <th width="80">付款方式</th>
<th width="80">订餐方式</th> <th width="80">订餐方式</th>
<th width="80">联系电话</th> <th width="80">联系电话</th>
<th width="80">地址</th> <th width="80">地址</th>
<th width="80">订团号</th> <th width="80">订团号</th>
<th width="80">备注</th> <th width="80">备注</th>
</tr> </tr>
<tr v-for="(item,index) in list"> <tr v-for="(item,index) in list">
<td :rowspan="list.length" v-if="index==0"> <td :rowspan="list.length" v-if="index==0">
<div class="w120"> <div class="w120">
<p class="link" @click="goUrlT('productQuery',TCNUM,'产品查询')">{{TCNUM}}</p> <p class="link" @click="goUrlT('productQuery',TCNUM,'产品查询')">{{TCNUM}}</p>
</div> </div>
</td> </td>
<td> <td>
<div class="w120">{{item.UseTimeStr}}</div> <div class="w120">{{item.UseTimeStr}}</div>
</td> </td>
<td> <td>
<div class="w200"> <div class="w200">
<p style="height: 84px; padding-left: 10px; display:flex; align-items:center;" v-for="subItem in item.DiningSummaryList" class="link pHouseStyle" @click="goUrlR('restaurantList',subItem.DiningID,'餐厅列表')">{{subItem.DiningName}}</p> <p style="height: 84px; padding-left: 10px; display:flex; align-items:center;"
</div> v-for="subItem in item.DiningSummaryList" class="link pHouseStyle"
</td> @click="goUrlR('restaurantList',subItem.DiningID,'餐厅列表')">{{subItem.DiningName}}</p>
<td> </div>
<div class="w200"> </td>
<p style="height: 84px; padding-left: 10px; display:flex; align-items:center;" class="pHouseStyle" v-for="subItem in item.DiningSummaryList"> <td>
<el-select class='w160 sel' v-model='subItem.NewDiningID' filterable :placeholder="$t('pub.pleaseSel')" @visible-change='getDingList(item)' @change='sendValue(subItem,item)'> <div class="w200">
<el-option <p style="height: 84px; padding-left: 10px; display:flex; align-items:center;" class="pHouseStyle"
v-for='itemHotel in item.DinnerList' v-for="subItem in item.DiningSummaryList">
:label='itemHotel.Name' <el-select class='w160 sel' v-model='subItem.NewDiningID' filterable :placeholder="$t('pub.pleaseSel')"
:value='itemHotel.ID' @visible-change='getDingList(item)' @change='sendValue(subItem,item)'>
:key='itemHotel.ID' <el-option v-for='itemHotel in item.DinnerList' :label='itemHotel.Name' :value='itemHotel.ID'
></el-option> :key='itemHotel.ID'></el-option>
</el-select> </el-select>
</p> </p>
</div> </div>
</td> </td>
<td> <td>
<div class="w80" > <div class="w80">
<p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle"> <p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle">
{{subItem.UseDinnerTypeStr}} {{subItem.UseDinnerTypeStr}}
</p> </p>
</div> </div>
</td> </td>
<td> <td>
<div class="w120"> <div class="w120">
<p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle"> <p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle">
{{subItem.MealName}} {{subItem.MealName}}
</p> </p>
</div> </div>
</td> </td>
<td> <td>
<div class="w80"> <div class="w80">
<p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle"> <p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle">
{{GuestNum}} {{GuestNum}}
</p> </p>
</div> </div>
</td> </td>
<td> <td>
<div class="w180" > <div class="w180">
<div class="DivStyle" v-for="subItem in item.DiningSummaryList"> <div class="DivStyle" v-for="subItem in item.DiningSummaryList">
<p v-for="childItem in subItem.DiningPriceList"> <p v-for="childItem in subItem.DiningPriceList">
{{personStrToWord(childItem.PeopleType)}} {{personStrToWord(childItem.PeopleType)}}
</p> </p>
</div> </div>
</div> </div>
</td> </td>
<td> <td>
<div class="w80">
<div class="DivStyle" v-for="subItem in item.DiningSummaryList">
<p v-for="childItem in subItem.DiningPriceList">
{{childItem.PeopleNum}}
</p>
</div>
</div>
</td>
<td>
<div class="w80">
<div class="DivStyle" v-for="subItem in item.DiningSummaryList">
<p v-for="childItem in subItem.DiningPriceList">
<span class="spanlink" v-if='childItem.PeoplePrice==0' @click="goUrl('RestaurantPackage',subItem,'套餐查询')">设置</span>
<span v-if='childItem.PeoplePrice!=0'>{{childItem.PeoplePrice}}</span>
</p>
</div>
</div>
</td>
<td>
<div class="w80">
<div class="DivStyle" v-for="subItem in item.DiningSummaryList">
<p v-for="childItem in subItem.DiningPriceList">
<el-input class='w50 tcenter' @input='calculationPrice(subItem)' maxlength='2' v-model='childItem.Discount' @keyup.native="checkInteger(childItem,'Discount')"></el-input>
</p>
</div>
</div>
</td>
<td>
<div class="w80">
<div class="DivStyle" v-for="subItem in item.DiningSummaryList">
<p v-for="childItem in subItem.DiningPriceList">
{{(childItem.PeopleNum-childItem.Discount)*childItem.PeoplePrice}}
</p>
</div>
</div>
</td>
<td>
<div class="w80"> <div class="w80">
<div class="DivStyle" v-for="subItem in item.DiningSummaryList"> <div class="DivStyle" v-for="subItem in item.DiningSummaryList">
<p v-for="childItem in subItem.DiningPriceList"> <p v-for="childItem in subItem.DiningPriceList">
<!--<span class="spanlink" v-if='childItem.PeoplePrice==0' @click="goUrl('restaurantInfoManage',subItem,'餐厅列表')">设置</span> {{childItem.PeopleNum}}
<span v-if='childItem.PeoplePrice!=0'>{{o.PeoplePrice}}%</span>--> </p>
<el-input class='w50 tcenter' @input='calculationPrice(subItem)' v-model='childItem.DiscountPrice' @keyup.native="checkInteger(childItem,'DiscountPrice')"></el-input>% </div>
</p> </div>
</div> </td>
</div> <td>
</td> <div class="w80">
<td> <div class="DivStyle" v-for="subItem in item.DiningSummaryList">
<div class="w80"> <p v-for="childItem in subItem.DiningPriceList">
<p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle"> <span class="spanlink" v-if='childItem.PeoplePrice==0'
{{subItem.TotalPrice}} @click="goUrl('RestaurantPackage',subItem,'套餐查询')">设置</span>
</p> <span v-if='childItem.PeoplePrice!=0'>{{childItem.PeoplePrice}}</span>
</div> </p>
</td> </div>
<td> </div>
<div class="w150"> </td>
<p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle"> <td>
<el-select class='w100 sel' v-model='subItem.PayStyle' :placeholder="$t('pub.pleaseSel')"> <div class="w80">
<el-option label='请选择' value='0' ></el-option> <div class="DivStyle" v-for="subItem in item.DiningSummaryList">
<el-option label='现付' value='1' ></el-option> <p v-for="childItem in subItem.DiningPriceList">
<el-option label='签单' value='2' ></el-option> <el-input class='w50 tcenter' @input='calculationPrice(subItem)' maxlength='2'
<el-option label='实物抵扣' value='3' ></el-option> v-model='childItem.Discount' @keyup.native="checkInteger(childItem,'Discount')"></el-input>
<el-option label='预付' value='4' ></el-option> </p>
</el-select> </div>
</div>
</td>
<td>
<div class="w80">
<div class="DivStyle" v-for="subItem in item.DiningSummaryList">
<p v-for="childItem in subItem.DiningPriceList">
{{(childItem.PeopleNum-childItem.Discount)*childItem.PeoplePrice}}
</p>
</div>
</div>
</td>
<td>
<div class="w80">
<div class="DivStyle" v-for="subItem in item.DiningSummaryList">
<p v-for="childItem in subItem.DiningPriceList">
<el-input class='w50 tcenter' @input='calculationPrice(subItem)' v-model='childItem.DiscountPrice'
@keyup.native="checkInteger(childItem,'DiscountPrice')"></el-input>%
</p>
</div>
</div>
</td>
<td>
<div class="w80">
<p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle">
{{subItem.TotalPrice}}
</p>
</div>
</td>
<td>
<div class="w150">
<p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle">
<el-select class='w100 sel' v-model='subItem.PayStyle' :placeholder="$t('pub.pleaseSel')">
<el-option label='请选择' value='0'></el-option>
<el-option label='现付' value='1'></el-option>
<el-option label='签单' value='2'></el-option>
<el-option label='实物抵扣' value='3'></el-option>
<el-option label='预付' value='4'></el-option>
</el-select>
</p>
</div>
</td>
<td>
<div class="w150">
<p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle">
<el-select v-model='subItem.DiningReserveType' class='w100 sel' :placeholder="$t('pub.pleaseSel')">
<el-option label='请选择' value='0'></el-option>
<el-option label='公司预订' value='1'></el-option>
<el-option label='导游预订' value='2'></el-option>
</el-select>
</p> </p>
</div> </div>
</td> </td>
<td> <td>
<div class="w150"> <div class="w150">
<p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle"> <p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle">
<el-select v-model='subItem.DiningReserveType' class='w100 sel' :placeholder="$t('pub.pleaseSel')"> {{subItem.Tel}}
<el-option label='请选择' value='0' ></el-option>
<el-option label='公司预订' value='1' ></el-option>
<el-option label='导游预订' value='2' ></el-option>
</el-select>
</p> </p>
</div> </div>
</td> </td>
<td> <td>
<div class="w150"> <div class="w300">
<p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle"> <p style="height: 84px; padding-left: 10px; display:flex; align-items:center;"
{{subItem.Tel}} v-for="subItem in item.DiningSummaryList" class="pHouseStyle">
</p> {{subItem.Address}}
</div> </p>
</td> </div>
<td> </td>
<div class="w300"> <td>
<p style="height: 84px; padding-left: 10px; display:flex; align-items:center;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle"> <div class="w150">
{{subItem.Address}} <p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle">
</p> <el-input class='w120 tcenter' v-model='subItem.ReserveNo'></el-input>
</div> </p>
</td> </div>
<td> </td>
<div class="w150"> <td>
<p style="height: 84px; line-height: 84px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle"> <div class="w150">
<el-input class='w120 tcenter' v-model='subItem.ReserveNo'></el-input> <p style="height: 84px; display:flex; align-items:center; padding-left: 15px;"
</p> v-for="subItem in item.DiningSummaryList" class="pHouseStyle">
</div> <el-input type='textarea' class='w120' v-model='subItem.Remarks'></el-input>
</td> </p>
<td> </div>
<div class="w150"> </td>
<p style="height: 84px; display:flex; align-items:center; padding-left: 15px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle"> </tr>
<el-input type='textarea' class='w120' v-model='subItem.Remarks'></el-input> </table>
</p> </div>
</div>
</td>
</tr>
</table>
</div> </div>
</div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
defaultSelectValue:0, defaultSelectValue: 0,
list: [], list: [],
roomList: [], roomList: [],
TCNUM: "", TCNUM: "",
flightTotal: 0, flightTotal: 0,
GuestNum: 0, GuestNum: 0,
}; };
},
methods: {
//页面跳转[大写]
goUrlR(path, obj,title) {
this.$router.push({ name: path, query: { ID: obj ,blank:'y',tab:title} });
},
//页面跳转[小写]
goUrlT(path, obj,title) {
this.$router.push({ name: path, query: { id: obj ,blank:'y',tab:title} });
}, },
goUrl(path, obj, name) { methods: {
this.$router.push({ //页面跳转[大写]
path: path, goUrlR(path, obj, title) {
query: { this.$router.push({
id: obj.DiningID, name: path,
blank: "y", query: {
tab: name ID: obj,
} blank: 'y',
}); tab: title
}, }
personStrToWord(str){ });
if(str==1) },
return '大人' //页面跳转[小写]
if(str==2) goUrlT(path, obj, title) {
return '儿童' this.$router.push({
if(str==3) name: path,
return '婴儿' query: {
}, id: obj,
getList() { blank: 'y',
this.apipost( tab: title
"dmcstatistics_get_GetDinnerStaticsDetail", }
{ TCIDs: this.$route.query.id }, });
res => { },
if (res.data.resultCode == 1) { goUrl(path, obj, name) {
this.list = res.data.data; this.$router.push({
this.list.forEach(item=>{ path: path,
item.DinnerList=[]; query: {
item.DiningSummaryList.forEach(x=>{ id: obj.DiningID,
x.PayStyle=x.PayStyle.toString() blank: "y",
x.DiningReserveType=x.DiningReserveType.toString() tab: name
this.calculationPrice(x) }
item.DinnerList.push({ });
Name:x.NewDiningName, },
ID:x.NewDiningID personStrToWord(str) {
if (str == 1)
return '大人'
if (str == 2)
return '儿童'
if (str == 3)
return '婴儿'
},
getList() {
this.apipost(
"dmcstatistics_get_GetDinnerStaticsDetail", {
TCIDs: this.$route.query.id
},
res => {
if (res.data.resultCode == 1) {
this.list = res.data.data;
this.list.forEach(item => {
item.DinnerList = [];
item.DiningSummaryList.forEach(x => {
x.PayStyle = x.PayStyle.toString();
x.DiningReserveType = x.DiningReserveType.toString();
this.calculationPrice(x);
item.DinnerList.push({
Name: x.NewDiningName,
ID: x.NewDiningID
})
if (x.ReserveNo == '' || x.ReserveNo == null) {
x.ReserveNo = this.$route.query.NewCombinationNum;;
}
}) })
if(x.ReserveNo==''||x.ReserveNo==null){
x.ReserveNo = this.$route.query.NewCombinationNum;
}
}) })
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
calculationPrice(obj) {
let totalPrice = 0;
obj.DiningPriceList.forEach(item => {
totalPrice += item.PeoplePrice * (item.PeopleNum - item.Discount) * (1 - item.DiscountPrice / 100);
})
obj.TotalPrice = totalPrice.toFixed(2);
},
saveList(type) {
if (type == 0) {
this.list.forEach(item => {
item.DiningSummaryList.forEach(insideItem => {
insideItem.OrderState = 0;
}) })
})
}
if (type == 1) {
this.list.forEach(item => {
item.DiningSummaryList.forEach(insideItem => {
insideItem.OrderState = 1;
})
})
}
this.apipost('dmcstatistics_get_SetDiningOrder', this.list, res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
} else { } else {
this.Error(res.data.message); this.$message.error(res.data.message);
} }
}, }, err => {})
err => {} },
); //获取餐厅下拉
}, getDingList(item) {
calculationPrice(obj){ let msg = {
let totalPrice=0 QCity: item.DiningSummaryList[0].QCity
obj.DiningPriceList.forEach(item=>{
totalPrice+=item.PeoplePrice*(item.PeopleNum-item.Discount)*(1-item.DiscountPrice/100)
})
obj.TotalPrice=totalPrice.toFixed(2)
},
saveList(type){
if(type==0){
this.list.forEach(item=>{
item.DiningSummaryList.forEach(insideItem=>{
insideItem.OrderState=0
})
})
}
if(type==1){
this.list.forEach(item=>{
item.DiningSummaryList.forEach(insideItem=>{
insideItem.OrderState=1
})
})
}
this.apipost('dmcstatistics_get_SetDiningOrder',this.list,res=>{
if(res.data.resultCode==1){
this.$message.success(res.data.message)
}else{
this.$message.error(res.data.message)
}
},err=>{})
},
//获取餐厅下拉
getDingList(item){
let msg = {
QCity:item.DiningSummaryList[0].QCity
}
this.apipost('dining_post_GetLineDinnerList',msg,res=>{
if(res.data.resultCode==1){
item.DinnerList = res.data.data;
this.$forceUpdate();
}else{
this.Error(res.data.message)
} }
},err=>{}) this.apipost('dining_post_GetLineDinnerList', msg, res => {
}, if (res.data.resultCode == 1) {
//重置电话地址 item.DinnerList = res.data.data;
sendValue(subItem,item){ this.$forceUpdate();
item.DinnerList.forEach(x=>{ } else {
if(subItem.NewDiningID == x.ID){ this.Error(res.data.message)
}
}, err => {})
},
//重置电话地址
sendValue(subItem, item) {
item.DinnerList.forEach(x => {
if (subItem.NewDiningID == x.ID) {
subItem.Address = x.Address; subItem.Address = x.Address;
subItem.Tel = x.Tel; subItem.Tel = x.Tel;
} }
}) })
},
}, },
}, mounted() {
mounted() { this.TCNUM = this.$route.query.TCNUM;
this.TCNUM = this.$route.query.TCNUM; this.GuestNum = this.$route.query.GuestNum;
this.GuestNum= this.$route.query.GuestNum; this.getList();
this.getList(); }
} };
};
</script> </script>
<style> <style>
.bookDinnerStatisticsTalbe { .bookDinnerStatisticsTalbe {
background: #ccc; background: #ccc;
} }
.bookDinnerStatisticsTalbe tr th {
background: #e6e6e6; .bookDinnerStatisticsTalbe tr th {
height: 40px; background: #e6e6e6;
font-size: 12px; height: 40px;
color: #333; font-size: 12px;
} color: #333;
.bookDinnerStatisticsTalbe tr { }
background: #fff;
text-align: center; .bookDinnerStatisticsTalbe tr {
height: 40px; background: #fff;
} text-align: center;
.bookDinnerStatisticsTalbe tr td { height: 40px;
font-size: 12px; }
}
.bookDinnerStatisticsTalbe tr td input{ .bookDinnerStatisticsTalbe tr td {
height:20px!important; font-size: 12px;
padding: 0; }
text-align: center;
} .bookDinnerStatisticsTalbe tr td input {
.bookDinnerStatisticsTalbe tr td .sel input{ height: 20px !important;
height:34px!important; padding: 0;
} text-align: center;
.bookDinnerStatisticsTalbe tr td .pHouseStyle { }
border-bottom: 1px solid #ccc;
height: 28px; .bookDinnerStatisticsTalbe tr td .sel input {
line-height: 28px; height: 34px !important;
} }
.bookDinnerStatisticsTalbe tr td .pHouseStyle:last-child {
border-bottom: none; .bookDinnerStatisticsTalbe tr td .pHouseStyle {
} border-bottom: 1px solid #ccc;
.bookDinnerStatisticsTalbe tr td .DivStyle { height: 28px;
border-bottom: 1px solid #ccc; line-height: 28px;
height: 84px; }
line-height: 28px;
box-sizing: border-box; .bookDinnerStatisticsTalbe tr td .pHouseStyle:last-child {
} border-bottom: none;
.bookDinnerStatisticsTalbe tr td .DivStyle p{border-bottom: 1px solid #ccc;} }
.bookDinnerStatisticsTalbe tr td .DivStyle p:last-child{border-bottom: none;}
.bookDinnerStatisticsTalbe tr td .DivStyle:last-child { .bookDinnerStatisticsTalbe tr td .DivStyle {
border-bottom: none; border-bottom: 1px solid #ccc;
} height: 84px;
.bookDinnerStatisticsTalbe tr td .tdItemStyle{border-bottom: 1px solid #ccc;} line-height: 28px;
.bookDinnerStatisticsTalbe tr td .tdItemStyle:last-child{border-bottom: none;} box-sizing: border-box;
.bookDinnerStatisticsTalbe tr td .link:hover{text-decoration: underline; cursor: pointer;} }
.bookDinnerStatisticsTalbe .Book_span{margin-right:3px;}
.bookDinnerStatisticsTalbe tr td .spanlink:hover{text-decoration: underline; cursor: pointer;} .bookDinnerStatisticsTalbe tr td .DivStyle p {
</style> border-bottom: 1px solid #ccc;
\ No newline at end of file }
.bookDinnerStatisticsTalbe tr td .DivStyle p:last-child {
border-bottom: none;
}
.bookDinnerStatisticsTalbe tr td .DivStyle:last-child {
border-bottom: none;
}
.bookDinnerStatisticsTalbe tr td .tdItemStyle {
border-bottom: 1px solid #ccc;
}
.bookDinnerStatisticsTalbe tr td .tdItemStyle:last-child {
border-bottom: none;
}
.bookDinnerStatisticsTalbe tr td .link:hover {
text-decoration: underline;
cursor: pointer;
}
.bookDinnerStatisticsTalbe .Book_span {
margin-right: 3px;
}
.bookDinnerStatisticsTalbe tr td .spanlink:hover {
text-decoration: underline;
cursor: pointer;
}
</style>
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