Commit 26a6bcde authored by 王悦's avatar 王悦
parents d3dfaa9d d25219fe
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<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>
...@@ -43,25 +43,25 @@ ...@@ -43,25 +43,25 @@
</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;"
v-for="subItem in item.DiningSummaryList" class="link pHouseStyle"
@click="goUrlR('restaurantList',subItem.DiningID,'餐厅列表')">{{subItem.DiningName}}</p>
</div> </div>
</td> </td>
<td> <td>
<div class="w200"> <div class="w200">
<p style="height: 84px; padding-left: 10px; display:flex; align-items:center;" class="pHouseStyle" v-for="subItem in item.DiningSummaryList"> <p style="height: 84px; padding-left: 10px; display:flex; align-items:center;" class="pHouseStyle"
<el-select class='w160 sel' v-model='subItem.NewDiningID' filterable :placeholder="$t('pub.pleaseSel')" @visible-change='getDingList(item)' @change='sendValue(subItem,item)'> v-for="subItem in item.DiningSummaryList">
<el-option <el-select class='w160 sel' v-model='subItem.NewDiningID' filterable :placeholder="$t('pub.pleaseSel')"
v-for='itemHotel in item.DinnerList' @visible-change='getDingList(item)' @change='sendValue(subItem,item)'>
:label='itemHotel.Name' <el-option v-for='itemHotel in item.DinnerList' :label='itemHotel.Name' :value='itemHotel.ID'
:value='itemHotel.ID' :key='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>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</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)}}
...@@ -104,7 +104,8 @@ ...@@ -104,7 +104,8 @@
<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('RestaurantPackage',subItem,'套餐查询')">设置</span> <span class="spanlink" v-if='childItem.PeoplePrice==0'
@click="goUrl('RestaurantPackage',subItem,'套餐查询')">设置</span>
<span v-if='childItem.PeoplePrice!=0'>{{childItem.PeoplePrice}}</span> <span v-if='childItem.PeoplePrice!=0'>{{childItem.PeoplePrice}}</span>
</p> </p>
</div> </div>
...@@ -114,7 +115,8 @@ ...@@ -114,7 +115,8 @@
<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">
<el-input class='w50 tcenter' @input='calculationPrice(subItem)' maxlength='2' v-model='childItem.Discount' @keyup.native="checkInteger(childItem,'Discount')"></el-input> <el-input class='w50 tcenter' @input='calculationPrice(subItem)' maxlength='2'
v-model='childItem.Discount' @keyup.native="checkInteger(childItem,'Discount')"></el-input>
</p> </p>
</div> </div>
</div> </div>
...@@ -132,9 +134,8 @@ ...@@ -132,9 +134,8 @@
<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> <el-input class='w50 tcenter' @input='calculationPrice(subItem)' v-model='childItem.DiscountPrice'
<span v-if='childItem.PeoplePrice!=0'>{{o.PeoplePrice}}%</span>--> @keyup.native="checkInteger(childItem,'DiscountPrice')"></el-input>%
<el-input class='w50 tcenter' @input='calculationPrice(subItem)' v-model='childItem.DiscountPrice' @keyup.native="checkInteger(childItem,'DiscountPrice')"></el-input>%
</p> </p>
</div> </div>
</div> </div>
...@@ -150,11 +151,11 @@ ...@@ -150,11 +151,11 @@
<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 class='w100 sel' v-model='subItem.PayStyle' :placeholder="$t('pub.pleaseSel')"> <el-select class='w100 sel' v-model='subItem.PayStyle' :placeholder="$t('pub.pleaseSel')">
<el-option label='请选择' value='0' ></el-option> <el-option label='请选择' value='0'></el-option>
<el-option label='现付' value='1' ></el-option> <el-option label='现付' value='1'></el-option>
<el-option label='签单' value='2' ></el-option> <el-option label='签单' value='2'></el-option>
<el-option label='实物抵扣' value='3' ></el-option> <el-option label='实物抵扣' value='3'></el-option>
<el-option label='预付' value='4' ></el-option> <el-option label='预付' value='4'></el-option>
</el-select> </el-select>
</p> </p>
</div> </div>
...@@ -163,9 +164,9 @@ ...@@ -163,9 +164,9 @@
<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')"> <el-select v-model='subItem.DiningReserveType' class='w100 sel' :placeholder="$t('pub.pleaseSel')">
<el-option label='请选择' value='0' ></el-option> <el-option label='请选择' value='0'></el-option>
<el-option label='公司预订' value='1' ></el-option> <el-option label='公司预订' value='1'></el-option>
<el-option label='导游预订' value='2' ></el-option> <el-option label='导游预订' value='2'></el-option>
</el-select> </el-select>
</p> </p>
</div> </div>
...@@ -179,7 +180,8 @@ ...@@ -179,7 +180,8 @@
</td> </td>
<td> <td>
<div class="w300"> <div class="w300">
<p style="height: 84px; padding-left: 10px; display:flex; align-items:center;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle"> <p style="height: 84px; padding-left: 10px; display:flex; align-items:center;"
v-for="subItem in item.DiningSummaryList" class="pHouseStyle">
{{subItem.Address}} {{subItem.Address}}
</p> </p>
</div> </div>
...@@ -193,7 +195,8 @@ ...@@ -193,7 +195,8 @@
</td> </td>
<td> <td>
<div class="w150"> <div class="w150">
<p style="height: 84px; display:flex; align-items:center; padding-left: 15px;" v-for="subItem in item.DiningSummaryList" class="pHouseStyle"> <p style="height: 84px; display:flex; align-items:center; padding-left: 15px;"
v-for="subItem in item.DiningSummaryList" class="pHouseStyle">
<el-input type='textarea' class='w120' v-model='subItem.Remarks'></el-input> <el-input type='textarea' class='w120' v-model='subItem.Remarks'></el-input>
</p> </p>
</div> </div>
...@@ -205,10 +208,10 @@ ...@@ -205,10 +208,10 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
defaultSelectValue:0, defaultSelectValue: 0,
list: [], list: [],
roomList: [], roomList: [],
TCNUM: "", TCNUM: "",
...@@ -218,12 +221,26 @@ export default { ...@@ -218,12 +221,26 @@ export default {
}, },
methods: { methods: {
//页面跳转[大写] //页面跳转[大写]
goUrlR(path, obj,title) { goUrlR(path, obj, title) {
this.$router.push({ name: path, query: { ID: obj ,blank:'y',tab:title} }); this.$router.push({
name: path,
query: {
ID: obj,
blank: 'y',
tab: title
}
});
}, },
//页面跳转[小写] //页面跳转[小写]
goUrlT(path, obj,title) { goUrlT(path, obj, title) {
this.$router.push({ name: path, query: { id: obj ,blank:'y',tab:title} }); this.$router.push({
name: path,
query: {
id: obj,
blank: 'y',
tab: title
}
});
}, },
goUrl(path, obj, name) { goUrl(path, obj, name) {
this.$router.push({ this.$router.push({
...@@ -235,33 +252,34 @@ export default { ...@@ -235,33 +252,34 @@ export default {
} }
}); });
}, },
personStrToWord(str){ personStrToWord(str) {
if(str==1) if (str == 1)
return '大人' return '大人'
if(str==2) if (str == 2)
return '儿童' return '儿童'
if(str==3) if (str == 3)
return '婴儿' return '婴儿'
}, },
getList() { getList() {
this.apipost( this.apipost(
"dmcstatistics_get_GetDinnerStaticsDetail", "dmcstatistics_get_GetDinnerStaticsDetail", {
{ TCIDs: this.$route.query.id }, TCIDs: this.$route.query.id
},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.list = res.data.data; this.list = res.data.data;
this.list.forEach(item=>{ this.list.forEach(item => {
item.DinnerList=[]; item.DinnerList = [];
item.DiningSummaryList.forEach(x=>{ item.DiningSummaryList.forEach(x => {
x.PayStyle=x.PayStyle.toString() x.PayStyle = x.PayStyle.toString();
x.DiningReserveType=x.DiningReserveType.toString() x.DiningReserveType = x.DiningReserveType.toString();
this.calculationPrice(x) this.calculationPrice(x);
item.DinnerList.push({ item.DinnerList.push({
Name:x.NewDiningName, Name: x.NewDiningName,
ID:x.NewDiningID ID: x.NewDiningID
}) })
if(x.ReserveNo==''||x.ReserveNo==null){ if (x.ReserveNo == '' || x.ReserveNo == null) {
x.ReserveNo = this.$route.query.NewCombinationNum; x.ReserveNo = this.$route.query.NewCombinationNum;;
} }
}) })
}) })
...@@ -272,54 +290,54 @@ export default { ...@@ -272,54 +290,54 @@ export default {
err => {} err => {}
); );
}, },
calculationPrice(obj){ calculationPrice(obj) {
let totalPrice=0 let totalPrice = 0;
obj.DiningPriceList.forEach(item=>{ obj.DiningPriceList.forEach(item => {
totalPrice+=item.PeoplePrice*(item.PeopleNum-item.Discount)*(1-item.DiscountPrice/100) totalPrice += item.PeoplePrice * (item.PeopleNum - item.Discount) * (1 - item.DiscountPrice / 100);
}) })
obj.TotalPrice=totalPrice.toFixed(2) obj.TotalPrice = totalPrice.toFixed(2);
}, },
saveList(type){ saveList(type) {
if(type==0){ if (type == 0) {
this.list.forEach(item=>{ this.list.forEach(item => {
item.DiningSummaryList.forEach(insideItem=>{ item.DiningSummaryList.forEach(insideItem => {
insideItem.OrderState=0 insideItem.OrderState = 0;
}) })
}) })
} }
if(type==1){ if (type == 1) {
this.list.forEach(item=>{ this.list.forEach(item => {
item.DiningSummaryList.forEach(insideItem=>{ item.DiningSummaryList.forEach(insideItem => {
insideItem.OrderState=1 insideItem.OrderState = 1;
}) })
}) })
} }
this.apipost('dmcstatistics_get_SetDiningOrder',this.list,res=>{ this.apipost('dmcstatistics_get_SetDiningOrder', this.list, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.$message.success(res.data.message) this.$message.success(res.data.message);
}else{ } else {
this.$message.error(res.data.message) this.$message.error(res.data.message);
} }
},err=>{}) }, err => {})
}, },
//获取餐厅下拉 //获取餐厅下拉
getDingList(item){ getDingList(item) {
let msg = { let msg = {
QCity:item.DiningSummaryList[0].QCity QCity: item.DiningSummaryList[0].QCity
} }
this.apipost('dining_post_GetLineDinnerList',msg,res=>{ this.apipost('dining_post_GetLineDinnerList', msg, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
item.DinnerList = res.data.data; item.DinnerList = res.data.data;
this.$forceUpdate(); this.$forceUpdate();
}else{ } else {
this.Error(res.data.message) this.Error(res.data.message)
} }
},err=>{}) }, err => {})
}, },
//重置电话地址 //重置电话地址
sendValue(subItem,item){ sendValue(subItem, item) {
item.DinnerList.forEach(x=>{ item.DinnerList.forEach(x => {
if(subItem.NewDiningID == x.ID){ if (subItem.NewDiningID == x.ID) {
subItem.Address = x.Address; subItem.Address = x.Address;
subItem.Tel = x.Tel; subItem.Tel = x.Tel;
} }
...@@ -328,60 +346,93 @@ export default { ...@@ -328,60 +346,93 @@ export default {
}, },
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 {
.bookDinnerStatisticsTalbe tr th {
background: #e6e6e6; background: #e6e6e6;
height: 40px; height: 40px;
font-size: 12px; font-size: 12px;
color: #333; color: #333;
} }
.bookDinnerStatisticsTalbe tr {
.bookDinnerStatisticsTalbe tr {
background: #fff; background: #fff;
text-align: center; text-align: center;
height: 40px; height: 40px;
} }
.bookDinnerStatisticsTalbe tr td {
.bookDinnerStatisticsTalbe tr td {
font-size: 12px; font-size: 12px;
} }
.bookDinnerStatisticsTalbe tr td input{
height:20px!important; .bookDinnerStatisticsTalbe tr td input {
height: 20px !important;
padding: 0; padding: 0;
text-align: center; text-align: center;
} }
.bookDinnerStatisticsTalbe tr td .sel input{
height:34px!important; .bookDinnerStatisticsTalbe tr td .sel input {
} height: 34px !important;
.bookDinnerStatisticsTalbe tr td .pHouseStyle { }
.bookDinnerStatisticsTalbe tr td .pHouseStyle {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
height: 28px; height: 28px;
line-height: 28px; line-height: 28px;
} }
.bookDinnerStatisticsTalbe tr td .pHouseStyle:last-child {
.bookDinnerStatisticsTalbe tr td .pHouseStyle:last-child {
border-bottom: none; border-bottom: none;
} }
.bookDinnerStatisticsTalbe tr td .DivStyle {
.bookDinnerStatisticsTalbe tr td .DivStyle {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
height: 84px; height: 84px;
line-height: 28px; line-height: 28px;
box-sizing: border-box; box-sizing: border-box;
} }
.bookDinnerStatisticsTalbe tr td .DivStyle p{border-bottom: 1px solid #ccc;}
.bookDinnerStatisticsTalbe tr td .DivStyle p:last-child{border-bottom: none;} .bookDinnerStatisticsTalbe tr td .DivStyle p {
.bookDinnerStatisticsTalbe tr td .DivStyle:last-child { border-bottom: 1px solid #ccc;
}
.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; 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 {
.bookDinnerStatisticsTalbe tr td .link:hover{text-decoration: underline; cursor: pointer;} text-decoration: underline;
.bookDinnerStatisticsTalbe .Book_span{margin-right:3px;} cursor: pointer;
.bookDinnerStatisticsTalbe tr td .spanlink:hover{text-decoration: underline; cursor: pointer;} }
.bookDinnerStatisticsTalbe .Book_span {
margin-right: 3px;
}
.bookDinnerStatisticsTalbe tr td .spanlink:hover {
text-decoration: underline;
cursor: pointer;
}
</style> </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