<template> <div class="hotelProductManage2"> <div class="hotelProductManage2_btnList"> <div class="btn_check" @click="getMonths()">{{$t('pub.searchBtn')}}</div> <div class="btn_check" @click="goEdit('1')">{{$t('ground.piliangbianji')}}</div> </div> <div class="hotelProductManage2_condition"> <div> <em>{{$t('ground.qishiyue')}}</em> <el-date-picker v-model="condition.month" type="month" value-format="yyyy-MM" :clearable="false" :placeholder="$t('ground.xuanzeyue')"></el-date-picker> </div> </div> <div class="hotelProductManage2_tableBox"> <table class="hotelProductManage2_table" border="0" cellspacing="0" cellpadding="0"> <thead> <tr> <th width="34%">{{$t('hotel.hotel_name')}}</th> <th width="33%">{{$t('ground.shengyuzongkucun')}}</th> <th width="33%">{{$t('ground.kucunyouxiaoqi')}}</th> </tr> </thead> <tbody> <tr> <td>{{hotelInfo.HotelName}}</td> <td>{{hotelInfo.TotalInventory}}</td> <td>{{hotelInfo.Validity}}</td> </tr> </tbody> </table> </div> <div class="hotelProductManage2_tableBox"> <span style="color:#000000;background-color: #ff3737;padding:2px 4px;border-radius:5px">{{$t('ground.hongri')}}</span> <span style="color:#000000;background-color: #ff99cc;padding:2px 4px;border-radius:5px">{{$t('ground.wangji')}}</span> <span style="color:#000000;background-color: #bcd6ee;padding:2px 4px;border-radius:5px">{{$t('ground.pingji')}}</span> <span style="color:#000000;background-color: #DDDDDD;padding:2px 4px;border-radius:5px">{{$t('ground.danji')}}</span> <span style="color:#000000;background-color: #02F78E;padding:2px 4px;border-radius:5px">{{$t('ground.tebiejia')}}</span> <span style="color:#000000;background-color: #808000;padding:2px 4px;border-radius:5px">行前日</span> </div> <div class="hotelProductManage2_calendar"> <div class="hotelProductManage2_calendarItem" v-for="(item, index) in dayList" :key="index"> <div class="calendarItem_month" :title="$t('ground.dianjichakanxq')" @click="calendarShow(item, index)"> {{item.date}}</div> <div class="hotelproductCkbox"> <el-checkbox v-model="item.isCked" @change="changeHotelStatus(item,index)">全选</el-checkbox> </div> <div class="calendarItem_week"> <div>{{$t('hotel.hotel_Sunday')}}</div> <div>{{$t('hotel.hotel_Monday')}}</div> <div>{{$t('hotel.hotel_Tuesday')}}</div> <div>{{$t('hotel.hotel_Wednesday')}}</div> <div>{{$t('hotel.hotel_Thursday')}}</div> <div>{{$t('hotel.hotel_Friday')}}</div> <div>{{$t('hotel.hotel_Saturday')}}</div> </div> <div class="calendarItem_day"> <div v-for="(subItem, index2) in item.days" :key="index2" :class="subItem.month===item.date?'nowMonth':'otherMonth'"> <div :class="stockColor(item,subItem)" :style="subItem.month===item.date&&msg2.DateList.indexOf(subItem.day)!==-1?'border-color: green':''" @click="calendarDayOn(item, subItem)"> <el-popover placement="bottom" :title="$t('ground.baojiaxinxi')" width="950" trigger="hover" v-if="subItem.data&&subItem.data.SubList && subItem.data.SubList[0]"> <template> <table style="margin-left:3px;padding-top:2px;min-width:530px;"> <tr> <th width="40" style="text-align:center">{{$t('ground.pici')}}</th> <th width="100" style="text-align:center">{{$t('Operation.Op_price')}}</th> <th width="40" style="text-align:center">散客价</th> <th width="40" style="text-align:center">税金</th> <th width="40" style="text-align:center">自然单间</th> <th width="40" style="text-align:center">不占床</th> <th width="40" style="text-align:center">三人间</th> <th width="40" style="text-align:center">大床</th> <th width="40" style="text-align:center">司导</th> <th width="40" style="text-align:center">入汤税</th> <th width="40" style="text-align:center">早餐</th> <th width="40" style="text-align:center">晚餐</th> <th width="50" style="text-align:center">{{$t('hotel.hotel_Inventory')}}</th> <th width="80" style="text-align:center">{{$t('ground.shengyukucun')}}</th> <th width="140" style="text-align:center">{{$t('hotel.hotel_Supplier')}}</th> <th width="140" style="text-align:center">是否压房</th> <th width="60" style="text-align:center">{{$t('hotel.table_operat')}}</th> <th width="60" style="text-align:center">{{$t('fnc.rizhi')}}</th> </tr> <tr v-for="(childItem,childIndex) in subItem.data.SubList"> <td style="text-align:center"> {{childItem.BatchNumber}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.CostPrice}} {{childItem.PriceTaxTypeStr}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.SanKePrice}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.TaxesPrice}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.SingleroomPrice}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.ChildNotBedPrice}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.AddBedPrice}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.BidroomPrice}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.GuideRoomPrice}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.PriceInTangTax}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.PriceIsBreakfast&&childItem.PriceIsBreakfast==1?"含":""}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.PriceIsDinner&&childItem.PriceIsDinner==1?"含":""}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.Inventory}} </td> <td style="text-align:center;white-space:nowrap; "> {{childItem.RemainingInventory}} </td> <td style="text-align:center"> {{childItem.SupplierName}} </td> <td style="text-align:center"> <span :style="childItem.IsMortgage ? 'color:red' :'color:green'">{{childItem.IsMortgage ? '是':'否'}}</span> </td> <td style="text-align:center"> <a style="text-decoration:underline;cursor:pointer;color:blue;" @click="goEdit('2', subItem.day,childItem.BatchNumber)">{{$t('pub.updateMsg')}}</a> </td> <td style="text-align:center"> <el-popover width="200" trigger="click" popper-class="Bus_HotelPop"> <commonHotelLog :ref="'comHotelLog'+index+index2+childIndex+''"> </commonHotelLog> <div slot="reference" class="w80" style="cursor:pointer;text-decoration:underline;color:red" @click="GetHotelLog(childItem,index,index2,childIndex)">{{$t('fnc.rizhi')}}</div> </el-popover> </td> </tr> </table> </template> <span slot="reference">{{subItem.date.getDate()}}</span> </el-popover> <template v-else> {{subItem.date.getDate()}} </template> </div> </div> </div> </div> <div class="hotelProductManage2_calendarBox" v-show="calendar.show"> <HotelProductCalendar ref="hotelProductCalendar" :calendar="calendar" @goEdit="goEdit"></HotelProductCalendar> </div> </div> <!-- 页面编辑 --> <div class="hotelProductManage2_edit2"> <div class="hotelProductManage2_edit2_header"> <div>{{$t('restaurant.res_bidManage')}}</div> <div> <input type="button" value="酒店折让" @click="goHotelDiscount('HotelDiscount')" class="hollowbtn" /> <input type="button" :value="$t('ground.piliangshanchu')" @click="delete2Reset()" class="hollowbtn" /> <input type="button" :value="$t('ground.chongzhi')" @click="edit2Reset()" class="hollowFixedBtn" /> <input type="button" :value="$t('pub.saveBtn')" @click="edit2Save()" class="normalBtn" /> </div> </div> <el-form :model="msg2" :rules="rules2" :inline="true" label-width="130px" ref="hotelProductForm2" class="hotelProductManage2_edit2_form"> <el-row> <el-col :span="24" class="HotelProductEdit_date"> <el-form-item :label="$t('ground.yixuanriqi')" prop="DateList"> <el-tag v-for="(item, key) in msg2.DateList" :key="key" type="info" style="margin: 0 5px 0 0;" closable @close="calendarDayOff(item)">{{item}}</el-tag> </el-form-item> </el-col> </el-row> <el-row style="padding: 20px 0 0 0;border-top: 1px dashed #ccc;"> <el-col :span="6"> <el-form-item :label="$t('ground.kucunleixing')" prop="InventoryType"> <el-select v-model="msg2.InventoryType" :placeholder="$t('pub.pleaseSel')"> <el-option :label="$t('ground.hongri')" value="1"></el-option> <el-option :label="$t('ground.wangji')" value="2"></el-option> <el-option :label="$t('ground.pingji')" value="3"></el-option> <el-option :label="$t('ground.danji')" value="4"></el-option> <el-option :label="$t('ground.tebiejia')" value="5"></el-option> <el-option label="行前日" value="6"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('hotel.hotel_Inventory')" prop="Inventory"> <el-input-number v-model="msg2.Inventory" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.pici')"> <el-select v-model="msg2.BatchNumber" :placeholder="$t('pub.pleaseSel')"> <el-option :label="$t('ground.diyipi')" :value="1"></el-option> <el-option :label="$t('ground.dierpi')" :value="2"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.tiqianhuanfangts')"> <el-input-number v-model="msg2.BeforeDay" :precision="2" :min="0" maxlength="10"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.mianjianshu')"> <el-input-number v-model="msg2.FreeRoomNum" :precision="2" :min="0" maxlength="10"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.biaozhunjiancb')"> <el-input-number v-model="msg2.CostPrice" :precision="2" :min="0" maxlength="10"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.sankejia')"> <el-input-number v-model="msg2.SanKePrice" :precision="2" :min="0" maxlength="10"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.shuijin')"> <el-input-number v-model="msg2.TaxesPrice" :precision="2" :min="0" maxlength="10"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.dachuanjcb')" prop="BidroomPrice"> <el-input-number v-model="msg2.BidroomPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.ziranjcb')" prop="SingleroomPrice"> <el-input-number v-model="msg2.SingleroomPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.buzhanccb')" prop="ChildNotBedPrice"> <el-input-number v-model="msg2.ChildNotBedPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.sanrenjcb')" prop="AddBedPrice"> <el-input-number v-model="msg2.AddBedPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6" style="display:none;"> <el-form-item :label="$t('ground.sijijcb')" prop="DriverRoomPrice"> <el-input-number v-model="msg2.DriverRoomPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.sidaojcb')" prop="GuideRoomPrice"> <el-input-number v-model="msg2.GuideRoomPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="入汤税"> <el-input-number v-model="msg2.PriceInTangTax" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="早餐"> <el-checkbox v-model="msg2.PriceIsBreakfast" :true-label="1" :false-label="0"></el-checkbox> </el-form-item> <el-form-item label="晚餐"> <el-checkbox v-model="msg2.PriceIsDinner" :true-label="1" :false-label="0"></el-checkbox> </el-form-item> </el-col> <el-col :span="6"> <el-form-item class="fontbold" label="是否压房"> <el-checkbox v-model="msg2.IsMortgage" :true-label="1" :false-label="0"></el-checkbox> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="6"> <el-form-item :label="$t('ground.chengbenbz')" prop="CurrencyId"> <el-select v-model="msg2.CurrencyId" :placeholder="$t('pub.pleaseSel')" style="width:100px;" @change="currency2Change"> <el-option :label="$t('pub.unlimitedSel')" value='0'></el-option> <el-option v-for="(item,index) in allCurrencyList" :key="index" :label="item.Name" :value="item.ID"> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('hotel.hotel_CurrentRate')" prop="CurrentRate"> <el-input v-model="msg2.CurrentRate" :placeholder="$t('hotel.hotel_CurrentRate')" style="width:80px;"> </el-input> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('fnc.fkfangshi')"> <el-select class='w135 sel' v-model='msg2.PayStyle' :placeholder="$t('pub.pleaseSel')"> <el-option :label='$t("pub.unlimitedSel")' :value='0'></el-option> <el-option :label='$t("ground.xianfu")' :value='1'></el-option> <el-option :label='$t("ground.qiandan")' :value='2'></el-option> <el-option :label='$t("ground.shiwudk")' :value='3'></el-option> <el-option :label='$t("ground.yufu")' :value='4'></el-option> <el-option :label='$t("ground.yufukuandk")' :value='5'></el-option> <el-option :label='$t("ground.gongsihetzf")' :value='6'></el-option> </el-select> </el-form-item> </el-col> </el-row> <el-row style="padding: 20px 0 0 0;border-top: 1px dashed #ccc;"> <el-col :span="6"> <el-form-item :label="$t('ground.zhoumojiajia')" prop="WeekendAddPrice"> <el-input-number v-model="msg2.WeekendAddPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.neibujiajia')" prop="InteriorAddPrice"> <el-input-number v-model="msg2.InteriorAddPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.b2bjiajia')" prop="B2BPrice"> <el-input-number v-model="msg2.B2BPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.b2cjiajia')" prop="B2CPrice"> <el-input-number v-model="msg2.B2CPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> </el-row> <el-row style="padding: 20px 0 0 0;border-top: 1px dashed #ccc;"> <el-col :span="6"> <el-form-item :label="$t('hotel.hotel_Supplier')" prop="Supplier"> <el-select v-model="msg2.Supplier" :placeholder="$t('pub.pleaseSel')"> <el-option :label="$t('pub.unlimitedSel')" value='0'></el-option> <el-option v-for="(item,index) in SupplierList" :key="index" :label="item.Name" :value="item.ID"> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.shurushubie')"> <el-select v-model="msg2.PriceTaxType" :placeholder="$t('pub.pleaseSel')"> <el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option> <el-option :key="1" :label="$t('ground.shuiruR0')" :value="1"></el-option> <el-option :key="2" :label="$t('ground.shuiruR10')" :value="2"></el-option> <el-option :key="3" :label="$t('ground.shuibieR0')" :value="3"></el-option> <el-option :key="4" :label="$t('ground.shuibieR10')" :value="4"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="结款方式" prop="CustomerPayType"> <el-select v-model="msg2.CustomerPayType" placeholder="结款方式"> <el-option :key="1" label="自付" :value="1"></el-option> <el-option :key="2" label="出发前结款" :value="2"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="msg2.CustomerPayType==1?'入住前几天传名单':'入住前几天交定金'" prop="PayLimitFirstDay"> <el-input-number v-model="msg2.PayLimitFirstDay" :min="1"></el-input-number> </el-form-item> </el-col> <el-col :span="6" v-if="msg2.CustomerPayType==2"> <el-form-item label="入住前几天付尾款" prop="PayLimitEndDay"> <el-input-number v-model="msg2.PayLimitEndDay" :min="1"></el-input-number> </el-form-item> </el-col> <el-col :span="18"> <el-form-item :label="$t('pub.pubRemark')" prop="Remark"> <el-input type="textarea" v-model="msg2.Remark" :rows="1" :placeholder="$t('ground.qingshurbznr')" style="width: 600px;"> </el-input> </el-form-item> </el-col> <el-col :span="18"> <el-form-item label="注意事项"> <el-input type="textarea" v-model="msg2.TipContent" :rows="1" :placeholder="$t('ground.qingshurbznr')" style="width: 600px;"> </el-input> </el-form-item> </el-col> </el-row> </el-form> </div> <!-- 弹出编辑 --> <div class="hotelProductManage2_edit" v-show="editShow"> <div class="hotelProductManage2_edit_header"> <div>{{$t('restaurant.res_bidManage')}}</div> <div> <div @click="editCanel()">{{$t('pub.cancelBtn')}}</div> <div @click="editSave()">{{$t('pub.saveBtn')}}</div> </div> </div> <el-form :model="msg" :rules="rules" :inline="true" label-width="130px" ref="hotelProductForm" class="hotelProductManage2_edit_form"> <el-row> <el-col :span="6"> <el-form-item :label="$t('ground.riqixuanzfs')" prop="DayType"> <el-select v-model="msg.DayType" :placeholder="$t('pub.pleaseSel')" @change="dayTypeChange"> <el-option :label="$t('ground.annian')" value="1"></el-option> <el-option :label="$t('ground.anyue')" value="2"></el-option> <el-option :label="$t('ground.anzhou')" value="3"></el-option> <el-option :label="$t('ground.zidingyi')" value="4"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="12" class="HotelProductEdit_date"> <div v-show="msg.DayType==='1'||msg.DayType==='3'"> <el-form-item :label="$t('pub.year')" prop="Year"> <el-date-picker v-model="msg.Year" type="year" value-format="yyyy" :placeholder="$t('pub.pleaseSel')"> </el-date-picker> </el-form-item> </div> <div v-show="msg.DayType==='2'"> <el-form-item :label="$t('pub.month')" prop="Month"> <el-date-picker v-model="msg.Month" type="month" value-format="yyyy-MM" :placeholder="$t('pub.pleaseSel')"> </el-date-picker> </el-form-item> </div> <div v-show="msg.DayType==='3'"> <el-form-item :label="$t('pub.month')" label-width="30px" prop="Month"> <el-select v-model="msg.Month" :placeholder="$t('pub.pleaseSel')"> <el-option :label="$t('ground.yuefen2[0]')" value="01"></el-option> <el-option :label="$t('ground.yuefen2[1]')" value="02"></el-option> <el-option :label="$t('ground.yuefen2[2]')" value="03"></el-option> <el-option :label="$t('ground.yuefen2[3]')" value="04"></el-option> <el-option :label="$t('ground.yuefen2[4]')" value="05"></el-option> <el-option :label="$t('ground.yuefen2[5]')" value="06"></el-option> <el-option :label="$t('ground.yuefen2[6]')" value="07"></el-option> <el-option :label="$t('ground.yuefen2[7]')" value="08"></el-option> <el-option :label="$t('ground.yuefen2[8]')" value="09"></el-option> <el-option :label="$t('ground.yuefen2[9]')" value="10"></el-option> <el-option :label="$t('ground.yuefen2[10]')" value="11"></el-option> <el-option :label="$t('ground.yuefen2[11]')" value="12"></el-option> </el-select> </el-form-item> </div> <div v-show="msg.DayType==='3'"> <el-form-item :label="$t('ground.zhou')" label-width="30px" prop="Week"> <el-select v-model="msg.Week" :placeholder="$t('pub.pleaseSel')"> <el-option :label="$t('ground.xingqiji[0]')" value="0"></el-option> <el-option :label="$t('ground.xingqiji[1]')" value="1"></el-option> <el-option :label="$t('ground.xingqiji[2]')" value="2"></el-option> <el-option :label="$t('ground.xingqiji[3]')" value="3"></el-option> <el-option :label="$t('ground.xingqiji[4]')" value="4"></el-option> <el-option :label="$t('ground.xingqiji[5]')" value="5"></el-option> <el-option :label="$t('ground.xingqiji[6]')" value="6"></el-option> </el-select> </el-form-item> </div> <div v-show="msg.DayType==='4'"> <el-form-item :label="$t('ground.zidingyi')" prop="StartDate"> <el-date-picker v-model="msg.StartDate" type="date" :placeholder="$t('ground.qingxuanzekssj')" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker> </el-form-item> <em>-</em> <el-form-item label="" prop="EndDate"> <el-date-picker v-model="msg.EndDate" type="date" :placeholder="$t('ground.qingxuanzejssj')" format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker> </el-form-item> </div> </el-col> </el-row> <el-row style="padding: 20px 0 0 0;border-top: 1px dashed #ccc;"> <el-col :span="6"> <el-form-item :label="$t('ground.kucunleixing')" prop="InventoryType"> <el-select v-model="msg.InventoryType" :placeholder="$t('pub.pleaseSel')"> <el-option :label="$t('ground.hongri')" value="1"></el-option> <el-option :label="$t('ground.wangji')" value="2"></el-option> <el-option :label="$t('ground.pingji')" value="3"></el-option> <el-option :label="$t('ground.danji')" value="4"></el-option> <el-option :label="$t('ground.tebiejia')" value="5"></el-option> <el-option label="行前日" value="6"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('hotel.hotel_Inventory')" prop="Inventory"> <el-input-number v-model="msg.Inventory" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.pici')"> <el-select v-model="msg.BatchNumber" :placeholder="$t('pub.pleaseSel')"> <el-option :label="$t('ground.diyipi')" :value="1"></el-option> <el-option :label="$t('ground.dierpi')" :value="2"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.tiqianhuanfangts')"> <el-input-number v-model="msg.BeforeDay" :precision="2" :min="0" maxlength="10"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.mianjianshu')"> <el-input-number v-model="msg.FreeRoomNum" :precision="2" :min="0" maxlength="10"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.biaozhunjiancb')"> <el-input-number v-model="msg.CostPrice" :precision="2" :min="0" maxlength="10"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.sankejia')"> <el-input-number v-model="msg.SanKePrice" :precision="2" :min="0" maxlength="10"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.shuijin')"> <el-input-number v-model="msg.TaxesPrice" :precision="2" :min="0" maxlength="10"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.dachuanjcb')" prop="BidroomPrice"> <el-input-number v-model="msg.BidroomPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.ziranjcb')" prop="SingleroomPrice"> <el-input-number v-model="msg.SingleroomPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.buzhanccb')" prop="ChildNotBedPrice"> <el-input-number v-model="msg.ChildNotBedPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.sanrenjcb')" prop="AddBedPrice"> <el-input-number v-model="msg.AddBedPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6" style="display:none;"> <el-form-item :label="$t('ground.sijijcb')" prop="DriverRoomPrice"> <el-input-number v-model="msg.DriverRoomPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.sidaojcb')" prop="GuideRoomPrice"> <el-input-number v-model="msg.GuideRoomPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="入汤税"> <el-input-number v-model="msg.PriceInTangTax" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="早餐"> <el-checkbox v-model="msg.PriceIsBreakfast" :true-label="1" :false-label="0"></el-checkbox> </el-form-item> <el-form-item label="晚餐"> <el-checkbox v-model="msg.PriceIsDinner" :true-label="1" :false-label="0"></el-checkbox> </el-form-item> </el-col> <el-col :span="6"> <el-form-item class="fontbold" label="是否压房"> <el-checkbox v-model="msg.IsMortgage" :true-label="1" :false-label="0"></el-checkbox> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="6"> <el-form-item :label="$t('ground.chengbenbz')" prop="CurrencyId"> <el-select v-model="msg.CurrencyId" :placeholder="$t('pub.pleaseSel')" style="width:100px;" @change="currencyChange"> <el-option :label="$t('pub.unlimitedSel')" value='0'></el-option> <el-option v-for="(item,index) in allCurrencyList" :key="index" :label="item.Name" :value="item.ID"> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('hotel.hotel_CurrentRate')" prop="CurrentRate"> <el-input v-model="msg.CurrentRate" placeholder="汇率" style="width:80px;"></el-input> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('fnc.fkfangshi')"> <el-select class='w135 sel' v-model='msg.PayStyle' :placeholder="$t('pub.pleaseSel')"> <el-option :label='$t("pub.unlimitedSel")' :value='0'></el-option> <el-option :label='$t("ground.xianfu")' :value='1'></el-option> <el-option :label='$t("ground.qiandan")' :value='2'></el-option> <el-option :label='$t("ground.shiwudk")' :value='3'></el-option> <el-option :label='$t("ground.yufu")' :value='4'></el-option> <el-option :label='$t("ground.yufukuandk")' :value='5'></el-option> <el-option :label='$t("ground.gongsihetzf")' :value='6'></el-option> </el-select> </el-form-item> </el-col> </el-row> <el-row style="padding: 20px 0 0 0;border-top: 1px dashed #ccc;"> <el-col :span="6"> <el-form-item :label="$t('ground.zhoumojiajia')" prop="WeekendAddPrice"> <el-input-number v-model="msg.WeekendAddPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.neibujiajia')" prop="InteriorAddPrice"> <el-input-number v-model="msg.InteriorAddPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.b2bjiajia')" prop="B2BPrice"> <el-input-number v-model="msg.B2BPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.b2cjiajia')" prop="B2CPrice"> <el-input-number v-model="msg.B2CPrice" :precision="2" :min="0"></el-input-number> </el-form-item> </el-col> </el-row> <el-row style="padding: 20px 0 0 0;border-top: 1px dashed #ccc;"> <el-col :span="6"> <el-form-item :label="$t('hotel.hotel_Supplier')" prop="Supplier"> <el-select v-model="msg.Supplier" :placeholder="$t('pub.pleaseSel')"> <el-option :label="$t('pub.unlimitedSel')" value='0'></el-option> <el-option v-for="(item,index) in SupplierList" :key="index" :label="item.Name" :value="item.ID"> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="$t('ground.shurushubie')"> <el-select v-model="msg.PriceTaxType" :placeholder="$t('pub.pleaseSel')"> <el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option> <el-option :key="1" :label="$t('ground.shuiruR0')" :value="1"></el-option> <el-option :key="2" :label="$t('ground.shuiruR10')" :value="2"></el-option> <el-option :key="3" :label="$t('ground.shuibieR0')" :value="3"></el-option> <el-option :key="4" :label="$t('ground.shuibieR10')" :value="4"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="结款方式" prop="CustomerPayType"> <el-select v-model="msg.CustomerPayType" placeholder="结款方式"> <el-option :key="1" label="自付" :value="1"></el-option> <el-option :key="2" label="出发前结款" :value="2"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item :label="msg.CustomerPayType==1?'入住前几天传名单':'入住前几天交定金'" prop="PayLimitFirstDay"> <el-input-number v-model="msg.PayLimitFirstDay" :min="1"></el-input-number> </el-form-item> </el-col> <el-col :span="6" v-if="msg.CustomerPayType==2"> <el-form-item label="入住前几天付尾款" prop="PayLimitEndDay"> <el-input-number v-model="msg.PayLimitEndDay" :min="1"></el-input-number> </el-form-item> </el-col> <el-col :span="18"> <el-form-item :label="$t('pub.pubRemark')" prop="Remark"> <el-input type="textarea" v-model="msg.Remark" :rows="1" :placeholder="$t('ground.qingshurbznr')" style="width: 600px;"> </el-input> </el-form-item> </el-col> <el-col :span="18"> <el-form-item label="注意事项"> <el-input type="textarea" v-model="msg.TipContent" :rows="1" :placeholder="$t('ground.qingshurbznr')" style="width: 600px;"> </el-input> </el-form-item> </el-col> </el-row> </el-form> </div> </div> </template> <script> import HotelProductCalendar from './HotelProductCalendar.vue'; import commonHotelLog from "../commonPage/commonHotelLog.vue"; export default { components: { HotelProductCalendar, //日志组件 commonHotelLog }, data() { var emptyJudge = (rule, value, callback) => { let regPos = /^\d+(\.\d+)?$/; if (!regPos.test(value)) { this.$message.error(rule.message) callback(new Error()) } else { callback() } } var arrJudge = (rule, value, callback) => { if (value.length === 0) { this.$message.error(rule.message) callback(new Error()) } else { callback() } } var dateJudge = (rule, value, callback) => { if (this.msg.Year === null) { this.msg.Year = '' } if (this.msg.Month === null) { this.msg.Month = '' } if (this.msg.DayType === '1') { if (this.msg.Year.toString().trim() === '' && rule.field === 'Year') { this.$message.error(this.$t('ground.qingxuanzn')) callback(new Error()) } else { callback() } } else if (this.msg.DayType === '2') { if (this.msg.Month.toString().trim() === '' && rule.field === 'Month') { this.$message.error(this.$t('ground.qingxuanzy')) callback(new Error()) } else { callback() } } else if (this.msg.DayType === '3') { if (this.msg.Year.toString().trim() === '' && rule.field === 'Year') { this.$message.error(this.$t('ground.qingxuanzn')) callback(new Error()) } else if (this.msg.Week.toString().trim() === '' && rule.field === 'Week') { this.$message.error(this.$t('ground.qingxuanzz')) callback(new Error()) } else { callback() } } else if (this.msg.DayType === '4') { if (this.msg.StartDate.toString().trim() === '' && rule.field === 'StartDate') { this.$message.error(this.$t('ground.qingxuanzekssj')) callback(new Error()) } else if (this.msg.EndDate.toString().trim() === '' && rule.field === 'EndDate') { this.$message.error(this.$t('ground.qingxuanzejssj')) callback(new Error()) } else { callback() } } } return { hotelId: '0', condition: { month: '' }, hotelInfo: { HotelName: '', TotalInventory: '', Validity: '' }, dayList: [], calendar: { num: 0, show: false, data: {} }, editShow: false, msg: { Hotel: '0', Supplier: 30, Inventory: '0', B2BPrice: '0', B2CPrice: '0', Remark: '', CostPrice: '0', CurrencyId: '', CurrentRate: '', StartDate: '', EndDate: '', InventoryType: '', BidroomPrice: '0', SingleroomPrice: '0', ChildNotBedPrice: '0', AddBedPrice: '0', DriverRoomPrice: '0', WeekendAddPrice: '0', InteriorAddPrice: '0', GuideRoomPrice: '0', DayType: '4', Year: '', Month: '', Week: '', DateList: [], SanKePrice: 0, //散客价 BatchNumber: 1, //批次号 TaxesPrice: 0, //税金 BeforeDay: 0, //提前还房天数 FreeRoomNum: 0, //免间数 PayStyle: 0, //付款方式 PriceTaxType: 0, //税入税别 PriceInTangTax: 0, //入汤税 PriceIsBreakfast: 1, //是否含早餐(1-含,0-不含) PriceIsDinner: 0, //是否含晚餐(1-含,0-不含) IsMortgage: 0, TipContent: "", //注意事项 CustomerPayType: 2, //结款方式 PayLimitFirstDay: 1, //入住前几天上传名单 PayLimitEndDay: 1, //入住前几天交尾款 }, msg2: { Hotel: '0', Supplier: 30, Inventory: '0', B2BPrice: '0', B2CPrice: '0', Remark: '', CostPrice: '0', CurrencyId: '', CurrentRate: '', StartDate: '', EndDate: '', InventoryType: '', BidroomPrice: '0', SingleroomPrice: '0', ChildNotBedPrice: '0', AddBedPrice: '0', DriverRoomPrice: '0', WeekendAddPrice: '0', InteriorAddPrice: '0', GuideRoomPrice: '0', DayType: '5', Year: '', Month: '', Week: '', DateList: [], SanKePrice: 0, //散客价 BatchNumber: 1, //批次号 TaxesPrice: 0, //税金 BeforeDay: 0, //提前还房天数 FreeRoomNum: 0, //免间数 PayStyle: 0, //付款方式 PriceTaxType: 0, //税入税别 PriceInTangTax: 0, //入汤税 PriceIsBreakfast: 1, //是否含早餐(1-含,0-不含) PriceIsDinner: 0, //是否含晚餐(1-含,0-不含) IsMortgage: 0, TipContent: "", //注意事项 CustomerPayType: 2, //结款方式 PayLimitFirstDay: 1, //入住前几天上传名单 PayLimitEndDay: 1, //入住前几天交尾款 }, rules: { InventoryType: { validator: emptyJudge, message: this.$t("ground.fromrule[0]"), trigger: 'change' }, DayType: { validator: emptyJudge, message: this.$t("ground.fromrule[1]"), trigger: 'blur' }, Year: { validator: dateJudge, message: this.$t("ground.fromrule[2]"), trigger: 'blur' }, Month: { validator: dateJudge, message: this.$t("ground.fromrule[3]"), trigger: 'blur' }, Week: { validator: dateJudge, message: this.$t("ground.fromrule[4]"), trigger: 'blur' }, StartDate: { validator: dateJudge, message: this.$t("ground.fromrule[5]"), trigger: 'blur' }, EndDate: { validator: dateJudge, message: this.$t("ground.fromrule[6]"), trigger: 'blur' }, Inventory: { validator: emptyJudge, message: this.$t("ground.fromrule[7]"), trigger: 'blur' }, CostPrice: { validator: emptyJudge, message: this.$t("ground.fromrule[8]"), trigger: 'blur' }, BidroomPrice: { validator: emptyJudge, message: this.$t("ground.fromrule[9]"), trigger: 'blur' }, SingleroomPrice: { validator: emptyJudge, message: this.$t("ground.fromrule[10]"), trigger: 'blur' }, ChildNotBedPrice: { validator: emptyJudge, message: this.$t("ground.fromrule[11]"), trigger: 'blur' }, AddBedPrice: { validator: emptyJudge, message: this.$t("ground.fromrule[12]"), trigger: 'blur' }, DriverRoomPrice: { validator: emptyJudge, message: this.$t("ground.fromrule[13]"), trigger: 'blur' }, GuideRoomPrice: { validator: emptyJudge, message: this.$t("ground.fromrule[14]"), trigger: 'blur' }, CurrencyId: { validator: emptyJudge, message: this.$t("ground.fromrule[15]"), trigger: 'change' }, CurrentRate: { validator: emptyJudge, message: this.$t("ground.fromrule[16]"), trigger: 'blur' }, WeekendAddPrice: { validator: emptyJudge, message: this.$t("ground.fromrule[17]"), trigger: 'blur' }, InteriorAddPrice: { validator: emptyJudge, message: this.$t("ground.fromrule[18]"), trigger: 'blur' }, B2BPrice: { validator: emptyJudge, message: this.$t("ground.fromrule[19]"), trigger: 'blur' }, B2CPrice: { validator: emptyJudge, message: this.$t("ground.fromrule[20]"), trigger: 'blur' }, }, rules2: { InventoryType: { validator: emptyJudge, message: this.$t("ground.fromrule2[0]"), trigger: 'blur' }, DateList: { validator: arrJudge, message: this.$t("ground.fromrule2[1]"), trigger: 'blur' }, Inventory: { validator: emptyJudge, message: this.$t("ground.fromrule2[2]"), trigger: 'blur' }, CostPrice: { validator: emptyJudge, message: this.$t("ground.fromrule2[3]"), trigger: 'blur' }, BidroomPrice: { validator: emptyJudge, message: this.$t("ground.fromrule2[4]"), trigger: 'blur' }, SingleroomPrice: { validator: emptyJudge, message: this.$t("ground.fromrule2[5]"), trigger: 'blur' }, ChildNotBedPrice: { validator: emptyJudge, message: this.$t("ground.fromrule2[6]"), trigger: 'blur' }, AddBedPrice: { validator: emptyJudge, message: this.$t("ground.fromrule2[7]"), trigger: 'blur' }, DriverRoomPrice: { validator: emptyJudge, message: this.$t("ground.fromrule2[8]"), trigger: 'blur' }, GuideRoomPrice: { validator: emptyJudge, message: this.$t("ground.fromrule2[9]"), trigger: 'blur' }, CurrencyId: { validator: emptyJudge, message: this.$t("ground.fromrule2[10]"), trigger: 'blur' }, CurrentRate: { validator: emptyJudge, message: this.$t("ground.fromrule2[11]"), trigger: 'blur' }, WeekendAddPrice: { validator: emptyJudge, message: this.$t("ground.fromrule2[12]"), trigger: 'blur' }, InteriorAddPrice: { validator: emptyJudge, message: this.$t("ground.fromrule2[13]"), trigger: 'blur' }, B2BPrice: { validator: emptyJudge, message: this.$t("ground.fromrule2[14]"), trigger: 'blur' }, B2CPrice: { validator: emptyJudge, message: this.$t("ground.fromrule2[15]"), trigger: 'blur' }, }, allCurrencyList: [], //供应商数组 SupplierList: [] } }, methods: { //调用子组件获取日志方法 GetHotelLog(subItem, index, index2, childIndex) { let str = `comHotelLog${index}${index2}${childIndex}` this.$refs[str][0].getHotelLogsList(0, subItem.HotelId, subItem.DayStr); }, goHotelDiscount(path) { this.$router.push({ name: path, query: { blank: "y", NewHotelID: this.hotelId, } }); }, //库存类型 stockColor: function (item, item2, childItem) { if (item.date === item2.month && item2.hasOwnProperty('data')) { let type = item2.data.SubList[0].InventoryType; if (type === 1) { return 'hasStock_1'; } else if (type === 2) { return 'hasStock_2'; } else if (type === 3) { return 'hasStock_3'; } else if (type === 4) { return 'hasStock_4'; } else if (type === 5) { return 'hasStock_5'; } else if (type === 6) { return 'hasStock_6'; } } else { return; } }, //日历点击事件 calendarDayOn: function (item, item2) { if (item.date === item2.month) { let dayIndex = this.msg2.DateList.indexOf(item2.day) if (dayIndex === -1) { this.msg2.DateList.push(item2.day) this.msg2.DateList.sort() } else { this.msg2.DateList.splice(dayIndex, 1) } } }, calendarDayOff: function (item) { let dayIndex = this.msg2.DateList.indexOf(item) this.msg2.DateList.splice(dayIndex, 1) }, getData: function (date, key) { this.apipost('hotelreport_get_GetHotelPriceMonthStatistics', { HotelId: this.hotelId, Year: date.split('-')[0], Month: date.split('-')[1] }, res => { if (res.data.resultCode === 1) { let json = res.data.data; this.hotelInfo.HotelName = json.HotelName; this.hotelInfo.TotalInventory = json.TotalInventory; this.hotelInfo.Validity = json.Validity; for (let i = 0; i < this.dayList[key].days.length; i++) { for (let j = 0; j < json.list.length; j++) { if (this.dayList[key].days[i].day === json.list[j].DayStr) { this.dayList[key].days[i]['data'] = json.list[j] } } } if (key === this.calendar.num) { this.$set(this.calendar, 'data', this.dayList[this.calendar.num]) } this.$forceUpdate(); } }) }, getCalendarDays: function (date, key) { let month = new Date(date).Format('yyyy-MM') let tempMonth = this.$calendarUtils.createCalendar_V2(date).DayArray; let days = []; for (let i = 0; i < tempMonth.length; i++) { let month = tempMonth[i].day.Format('yyyy-MM'); let day = tempMonth[i].day.Format('yyyy-MM-dd'); days.push({ date: tempMonth[i].day, month: month, day: day }); }; this.dayList[key] = { date: month, days: days, isCked: false }; this.getData(date, key); }, getMonths: function () { let month = this.condition.month + '-1' for (let i = 0; i < 12; i++) { if (i !== 0) { let newDate = new Date(month).setDate(32); month = new Date(newDate).Format('yyyy-MM') + '-1'; } this.getCalendarDays(month, i); } }, calendarShow: function (item, index) { this.calendar.num = index; this.calendar.data = item; this.calendar.show = true; }, // 获取详情 getDetail: function (date, BatchNumber) { this.apipost('dict_post_HotelOffer_GetHotelPriceInfo', { HotelId: this.msg.Hotel, Time: date, BatchNumber: BatchNumber }, res => { if (res.data.resultCode === 1) { let data = res.data.data; this.msg.Supplier = data.Supplier === 0 ? 30 : data.Supplier this.msg.Inventory = data.Inventory this.msg.B2BPrice = data.B2BPrice this.msg.B2CPrice = data.B2CPrice this.msg.Remark = data.Remark this.msg.CostPrice = data.CostPrice this.msg.CurrencyId = data.CurrencyId this.msg.CurrentRate = data.CurrentRate this.msg.StartDate = data.Date this.msg.EndDate = data.Date this.msg.InventoryType = data.InventoryType.toString() this.msg.BidroomPrice = data.BidroomPrice this.msg.SingleroomPrice = data.SingleroomPrice this.msg.ChildNotBedPrice = data.ChildNotBedPrice this.msg.AddBedPrice = data.AddBedPrice this.msg.DriverRoomPrice = data.DriverRoomPrice this.msg.WeekendAddPrice = data.WeekendAddPrice this.msg.InteriorAddPrice = data.InteriorAddPrice this.msg.GuideRoomPrice = data.GuideRoomPrice; this.msg.SanKePrice = data.SanKePrice; this.msg.BatchNumber = data.BatchNumber; this.msg.TaxesPrice = data.TaxesPrice; this.msg.BeforeDay = data.BeforeDay; this.msg.FreeRoomNum = data.FreeRoomNum; this.msg.PayStyle = data.PayStyle; this.msg.PriceTaxType = data.PriceTaxType; this.msg.PriceInTangTax = data.PriceInTangTax; this.msg.PriceIsBreakfast = data.PriceIsBreakfast; this.msg.PriceIsDinner = data.PriceIsDinner; this.msg.IsMortgage = data.IsMortgage; this.msg.TipContent = data.TipContent; this.msg.CustomerPayType = data.CustomerPayType?data.CustomerPayType:2; this.msg.PayLimitFirstDay = data.PayLimitFirstDay?data.PayLimitFirstDay:1; this.msg.PayLimitEndDay = data.PayLimitEndDay?data.PayLimitEndDay:1; } }) }, // 日期类型切换 dayTypeChange: function (val) { this.msg.Year = '' this.msg.Month = '' this.msg.Week = '' this.msg.StartDate = '' this.msg.EndDate = '' }, //获取所有币种 getAllCurrency() { this.apipost("financeinfo_post_GetList", {}, res => { if (res.data.resultCode === 1) { this.allCurrencyList = res.data.data; } }, err => {}); }, // 币种切换 currencyChange: function (val) { this.msg.CurrentRate = 0 for (let i = 0; i < this.allCurrencyList.length; i++) { if (val === this.allCurrencyList[i].ID) { this.msg.CurrentRate = this.allCurrencyList[i].CurrentRate; } } }, // 币种切换 currency2Change: function (val) { this.msg2.CurrentRate = 0 for (let i = 0; i < this.allCurrencyList.length; i++) { if (val === this.allCurrencyList[i].ID) { this.msg2.CurrentRate = this.allCurrencyList[i].CurrentRate; } } }, // 获取供应商 initSupplier() { this.apipost("supplier_post_GetAllList", { Type: 1, Country: 651 }, res => { if (res.data.resultCode === 1) { this.SupplierList = res.data.data; } }, err => {}); }, // 打开编辑窗口 goEdit: function (type, date, BatchNumber) { let nowDate = new Date().Format('yyyy-MM-dd'); this.msg.StartDate = date === undefined ? nowDate : date; this.msg.EndDate = date === undefined ? nowDate : date; if (type === '2' && date) { this.getDetail(date, BatchNumber); } this.editShow = true; }, // 取消按钮 editCanel: function () { this.editShow = false; this.$refs['hotelProductForm'].resetFields(); this.msg.CostPrice = 0; this.msg.SanKePrice = 0; }, // 保存按钮 editSave: function () { this.$refs['hotelProductForm'].validate((valid) => { if (valid) { this.apipost('dict_post_HotelOffer_SetNewHotelPrice', this.msg, res => { if (res.data.resultCode === 1) { this.Success(this.$t('ground.bianjichenggong')) this.getMonths() this.editShow = false this.$refs['hotelProductForm'].resetFields(); this.msg.CostPrice = 0; this.msg.SanKePrice = 0; this.msg.BatchNumber = 1; this.msg.TaxesPrice = 0; this.msg.BeforeDay = 0; this.msg.FreeRoomNum = 0; this.msg.PayStyle = 0; this.msg.PriceTaxType = 0; this.msg.PriceInTangTax = 0; this.msg.PriceIsBreakfast = 1; this.msg.PriceIsDinner = 0; this.msg.IsMortgage = 0; this.msg.TipContent = ""; this.msg.CustomerPayType = 2; this.msg.PayLimitFirstDay = 1; this.msg.PayLimitEndDay = 1; } else { this.Error(res.data.message) } }) } else { return false; } }); }, // 页面编辑重置 edit2Reset: function () { this.$refs['hotelProductForm2'].resetFields(); this.msg2.CostPrice = 0; this.msg2.SanKePrice = 0; this.msg2.BatchNumber = 1; this.msg2.TaxesPrice = 0; this.msg2.BeforeDay = 0; this.msg2.FreeRoomNum = 0; this.msg2.PayStyle = 0; this.msg2.PriceTaxType = 0; this.msg2.PriceTaxType = 0; this.msg2.PriceInTangTax = 0; this.msg2.PriceIsBreakfast = 1; this.msg2.PriceIsDinner = 0; this.msg2.IsMortgage = 0; this.msg2.TipContent = ""; }, //批量删除 delete2Reset: function () { var that = this; this.Confirm(this.$t('tips.shifoushanchu'), function () { that.apipost('dict_post_HotelOffer_RemoveNewHotelPrice', that.msg2, res => { if (res.data.resultCode == 1) { that.Success(res.data.message) that.getMonths(); that.$refs['hotelProductForm2'].resetFields(); that.msg2.CostPrice = 0; that.msg2.SanKePrice = 0; that.msg2.BatchNumber = 1; that.msg2.TaxesPrice = 0; that.msg2.BeforeDay = 0; that.msg2.FreeRoomNum = 0; that.msg2.PayStyle = 0; that.msg2.PriceTaxType = 0; that.msg2.PriceInTangTax = 0; that.msg2.PriceIsBreakfast = 1; that.msg2.PriceIsDinner = 0; that.msg2.IsMortgage = 0; that.msg2.TipContent = ""; } else { that.Error(res.data.message) } }, err => {}) }); }, // 页面编辑保存 edit2Save: function () { this.$refs['hotelProductForm2'].validate((valid) => { if (valid) { this.apipost('dict_post_HotelOffer_SetNewHotelPrice', this.msg2, res => { if (res.data.resultCode === 1) { this.Success(this.$t('ground.bianjichenggong')) this.getMonths(); this.$refs['hotelProductForm2'].resetFields(); this.msg2.CostPrice = 0; this.msg2.SanKePrice = 0; this.msg2.BatchNumber = 1; this.msg2.TaxesPrice = 0; this.msg2.BeforeDay = 0; this.msg2.FreeRoomNum = 0; this.msg2.PayStyle = 0; this.msg2.PriceTaxType = 0; this.msg2.CustomerPayType = 2; this.msg2.PayLimitFirstDay = 1; this.msg2.PayLimitEndDay = 1; } else { this.Error(res.data.message) } }) } else { return false; } }); }, //增加全选 changeHotelStatus(item, index) { if (item.isCked) { item.days.forEach(x => { if (x.month == item.date) { if (this.msg2.DateList.indexOf(x.day) == -1) { this.msg2.DateList.push(x.day); } } }) } else { item.days.forEach(x => { this.msg2.DateList.forEach((y, index) => { if (x.day == y) { this.msg2.DateList.splice(index, 1) } }) }) } } }, created: function () { this.hotelId = this.$route.query.id === undefined ? '0' : this.$route.query.id; this.msg.Hotel = this.$route.query.id === undefined ? '0' : this.$route.query.id; this.msg2.Hotel = this.$route.query.id === undefined ? '0' : this.$route.query.id; this.condition.month = new Date().Format('yyyy-MM'); let nowDate = new Date().Format('yyyy-MM-dd'); this.msg.DayType = '4'; this.msg.StartDate = nowDate; this.msg.EndDate = nowDate; }, mounted: function () { this.getMonths(); this.getAllCurrency(); this.initSupplier(); } } </script> <style> .fontbold > .el-form-item__label { font-size: 18px; font-weight: bold; color: red; } .hotelProductManage2 { padding: 20px 0; } .hotelproductCkbox { /* width: 10%; */ height: 30px; float: right; margin: 5px 20px 0 0; position: absolute; top: 0; right: 0; } .hotelProductManage2>.hotelProductManage2_btnList { position: fixed; top: 36px; right: 20px; text-align: right; margin: 20px 0 0 0; } .hotelProductManage2_btnList>.btn_check { display: inline-block; margin: 0 0 0 10px; padding: 0 15px; height: 30px; line-height: 28px; font-size: 14px; color: #E95252; background: #fff; border: 1px solid #E95252; border-radius: 15px; cursor: pointer; } .hotelProductManage2_condition { padding: 0 0 0 0; text-align: right; } .hotelProductManage2_condition>div { display: inline-block; text-align: left; } .hotelProductManage2_condition>div>em { margin: 0 5px 0 0; font-size: 14px; color: #666666; } .hotelProductManage2_tableBox { padding: 20px 0; } .hotelProductManage2_table { width: 100%; color: #333; border-bottom: 1px solid #cccccc; border-right: 1px solid #cccccc; } .hotelProductManage2_table tr { background: #fff; } .hotelProductManage2_table tr th { background: #e6e6e6; height: 40px; font-size: 12px; text-align: center; border-top: 1px solid #cccccc; border-left: 1px solid #cccccc; } .hotelProductManage2_table tr td { height: 40px; font-size: 12px; text-align: center; border-top: 1px solid #cccccc; border-left: 1px solid #cccccc; } .hotelProductManage2_calendar { position: relative; padding: 20px 0; width: 100%; border-top: 1px solid #E5E5E5; border-bottom: 1px solid #E5E5E5; display: flex; flex-wrap: wrap; } .hotelProductManage2_calendarBox { position: absolute; z-index: 2; left: 0px; top: 0px; padding: 20px 0; width: 100%; } .hotelProductManage2_calendarItem { display: inline-block; margin: 5px; width: 24%; /* width:438px; */ background-color: #fff; border: 1px solid #d1d1d1; border-radius: 4px; font-size: 0px; position: relative; } .hotelProductManage2_calendarItem:hover { box-shadow: 0px 0px 5px 5px #E5E5E5; } .hotelProductManage2_calendarItem>.calendarItem_month { width: 100%; height: 30px; float: left; /* margin-left: 110px; */ line-height: 30px; text-align: center; font-size: 14px; cursor: pointer; text-decoration: underline; } .hotelProductManage2_calendarItem>.calendarItem_week { display: flex; justify-content: space-around; padding: 10px 0; width: 100%; height: 36px; } .hotelProductManage2_calendarItem>.calendarItem_week>div { display: inline-block; width: 14.2%; height: 16px; line-height: 16px; text-align: center; font-size: 14px; color: #999999; } .hotelProductManage2_calendarItem>.calendarItem_day { display: flex; justify-content: space-around; flex-wrap: wrap; padding-bottom: 20px; } .hotelProductManage2_calendarItem>.calendarItem_day>div { display: inline-block; padding: 15px 0; width: 14.2%; position: relative; } .hotelProductManage2_calendarItem>.calendarItem_day>div>div { margin: auto; width: 30px; height: 30px; text-align: center; line-height: 26px; font-size: 14px; border: 2px solid transparent; border-radius: 50%; } .hotelProductManage2_calendarItem>.calendarItem_day>.nowMonth>div { color: #000000; cursor: pointer; } .hotelProductManage2_calendarItem>.calendarItem_day>.otherMonth>div { color: gainsboro; } .hotelProductManage2_calendarItem>.calendarItem_day>div>.hasStock_1 { background-color: #ff6363; } .hotelProductManage2_calendarItem>.calendarItem_day>div>.hasStock_2 { background-color: #ff99cc; } .hotelProductManage2_calendarItem>.calendarItem_day>div>.hasStock_3 { background-color: #bcd6ee; } .hotelProductManage2_calendarItem>.calendarItem_day>div>.hasStock_4 { background-color: #DDDDDD; } .hotelProductManage2_calendarItem>.calendarItem_day>div>.hasStock_5 { background-color: #02F78E; } .hotelProductManage2_calendarItem>.calendarItem_day>div>.hasStock_6 { background-color: #808000; } /* 页面编辑 */ .hotelProductManage2_edit2 { margin: 20px 0 0 0; padding: 10px 10px 0; width: 100%; border-radius: 4px; border: 1px solid #E5E5E5; background-color: #FFFFFF; overflow: auto; } .hotelProductManage2_edit2>.hotelProductManage2_edit2_header { position: relative; width: 100%; height: 30px; } .hotelProductManage2_edit2_header>div:nth-child(1) { display: inline-block; padding: 0 20px; width: 200px; height: 30px; line-height: 30px; font-size: 16px; border-left: 3px solid #E95252; } .hotelProductManage2_edit2_header>div:nth-child(2) { position: absolute; top: 0px; right: 0px; height: 30px; } .hotelProductManage2_edit2_header>div:nth-child(2)>div:nth-child(1) { display: inline-block; margin: 0 5px; padding: 0 15px; height: 30px; line-height: 28px; font-size: 14px; color: #E95252; background: #fff; border: 1px solid #E95252; border-radius: 15px; vertical-align: top; cursor: pointer; } .hotelProductManage2_edit2_header>div:nth-child(2)>div:nth-child(2) { display: inline-block; padding: 0 15px; height: 30px; line-height: 28px; font-size: 14px; color: #fff; background: #E95252; border: 1px solid #E95252; border-radius: 15px; vertical-align: top; cursor: pointer; } .hotelProductManage2_edit2>.hotelProductManage2_edit2_form { padding: 10px 0; } .hotelProductManage2_edit2_form .el-input { width: 160px; } .hotelProductManage2_edit2_form .el-input-number { width: 160px; } .hotelProductManage2_edit2_form .el-input__inner { width: 160px; } .hotelProductManage2_edit2_form .el-textarea__inner { resize: none; } .hotelProductManage2_edit2_form .HotelProductEdit_date .el-form-item__content { width: 1000px; min-height: 9px; } /* 弹出编辑 */ .hotelProductManage2_edit { position: fixed; z-index: 50; bottom: 0; left: 50px; padding: 10px 10px 0; min-width: 1316px; /* height: 640px; */ border-top: 3px solid #38425d; background-color: #FFFFFF; overflow: auto; } .hotelProductManage2_edit>.hotelProductManage2_edit_header { position: relative; width: 100%; height: 30px; } .hotelProductManage2_edit_header>div:nth-child(1) { display: inline-block; padding: 0 20px; width: 200px; height: 30px; line-height: 30px; font-size: 16px; border-left: 3px solid #E95252; } .hotelProductManage2_edit_header>div:nth-child(2) { position: absolute; top: 0px; right: 0px; height: 30px; } .hotelProductManage2_edit_header>div:nth-child(2)>div:nth-child(1) { display: inline-block; margin: 0 5px; padding: 0 15px; height: 30px; line-height: 28px; font-size: 14px; color: #E95252; background: #fff; border: 1px solid #E95252; border-radius: 15px; vertical-align: top; cursor: pointer; } .hotelProductManage2_edit_header>div:nth-child(2)>div:nth-child(2) { display: inline-block; padding: 0 15px; height: 30px; line-height: 28px; font-size: 14px; color: #fff; background: #E95252; border: 1px solid #E95252; border-radius: 15px; vertical-align: top; cursor: pointer; } .hotelProductManage2_edit>.hotelProductManage2_edit_form { padding: 10px 0; } .hotelProductManage2_edit_form .el-input { width: 180px; } .hotelProductManage2_edit_form .el-input__inner { width: 180px; } .hotelProductManage2_edit_form .el-textarea__inner { resize: none; } .hotelProductManage2_edit_form .HotelProductEdit_date>div { display: inline-block; vertical-align: middle; } .hotelProductManage2_edit_form .HotelProductEdit_date>div>em { display: inline-block; margin: 7px 10px 0 0; padding: 0 0 0 0; } .hotelProductManage2 .RabateDiv { margin-left: 25px; } .hotelProductManage2 .RebateCount { height: 34px; border-radius: 17px; float: left; } .hotelProductManage2 .reOne, .hotelProductManage2 .reTwo, .hotelProductManage2.dayNum { position: relative; } .hotelProductManage2 .leftPnum { float: left; background-color: #f5f7fa; height: 40px; line-height: 40px; text-align: center; border-right: 1px solid #cccccc; position: absolute; left: 1px; top: 1px; font-size: 14px; padding: 0 10px; color: #606266; } .hotelProductManage2 .toolInput { height: 42px; padding-left: 5px; border: none; } .hotelProductManage2 .inpuOne { width: 225px; padding-left: 120px; border: 1px solid #d1d1d1; border-right: none; } .hotelProductManage2 .inpuTwo { width: 166px; padding: 0 45px 0 77px; border: 1px solid #d1d1d1; } .hotelProductManage2 .fanNum { float: left; background-color: #f5f7fa; height: 40px; line-height: 40px; text-align: center; border-right: 1px solid #cccccc; position: absolute; left: 1px; top: 1px; padding: 0 10px; color: #606266; font-size: 14px; } .popList { font-size: 12px; line-height: 15px; text-align: left; } .hotelProductManage2_calendarItem>.calendarItem_day>.nowMonth:hover .detailInfo { display: block; } .hotelProductManage2 .detailInfo { display: none; position: absolute; left: -145px; top: 50px; z-index: 999; } .hotelProductManage2 .triangle_border_up { width: 0; height: 0; border-width: 0 175px 30px; border-style: solid; opacity: 0.75; border-color: transparent transparent rgba(233, 82, 82, 1); /*透明 透明 灰*/ } .hotelProductManage2 .detailInfo .popContent { width: 350px; min-height: 80px; background-color: #e95252; text-align: left; color: #fff; font-size: 12px; margin-top: -2px; overflow: auto; padding-bottom: 10px; } .hotelProductManage2 .popList label:first-child { display: inline-block; width: 40%; margin: 10px 0 0 10px; text-align: left; } .hotelProductManage2 .popList label:last-child { display: inline-block; width: 40%; margin: 10px 10px 0 0; text-align: right; } .hotelProductManage2 .Htupbtn { padding: 0 10px; height: 25px; margin: 10px 0 0 75px; } </style>