1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-41103e9e"],{"2ec6":function(t,e,o){var i=o("24fb");e=i(!1),e.push([t.i,".time_box[data-v-26c7887c]{display:inline}.time_box .fixed[data-v-26c7887c]{top:20%}.time_box .box[data-v-26c7887c]{margin-top:4.375rem}.time_box .title[data-v-26c7887c]{background:#fff;line-height:2.5rem;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.time_box .title h3[data-v-26c7887c]{width:100%;font-size:16px}.time_box .title i[data-v-26c7887c]{font-size:1rem;color:#999;position:absolute;right:.625rem;line-height:2.5rem}.time_box .week_box[data-v-26c7887c]{background:#f5f5f5}.time_box .week_box .week[data-v-26c7887c]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.time_box .week_box .week li[data-v-26c7887c]{width:3.3438rem;font-size:15px;line-height:1.875rem}.time_box .week_box .week li[data-v-26c7887c]:first-child,.time_box .week_box .week li[data-v-26c7887c]:last-child{color:#f15353}.time_box .month_box[data-v-26c7887c]{background:#fff;margin-bottom:.625rem}.time_box .month_box h4[data-v-26c7887c]{line-height:2.25rem;text-align:center;border-bottom:.0625rem solid #ebebeb;font-size:15px;font-weight:400}.time_box .month_box .month[data-v-26c7887c]{padding:.625rem 0}.time_box .month_box .month .row[data-v-26c7887c]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.time_box .month_box .month .row li[data-v-26c7887c]{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;width:3.3438rem;font-size:15px;height:2.5rem}.time_box .month_box .month .row .cur[data-v-26c7887c]{background:#53a1f1;border-radius:.25rem;color:#fff}.choose[data-v-26c7887c],.choose1[data-v-26c7887c]{background:#333;color:#fff}.cur_choose[data-v-26c7887c]{border:.0625rem solid #53a1f1;background:#eaf4fd}",""]),t.exports=e},53281:function(t,e,o){var i=o("2ec6");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=o("499e").default;n("44f8131c",i,!0,{sourceMap:!1,shadowMode:!1})},5368:function(t,e,o){var i=o("9454");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=o("499e").default;n("15eff0b9",i,!0,{sourceMap:!1,shadowMode:!1})},9454:function(t,e,o){var i=o("24fb");e=i(!1),e.push([t.i,"#hotel_goods[data-v-774ea6e2]{padding-bottom:60px}#hotel_goods #content[data-v-774ea6e2]{position:relative}#hotel_goods #content .scroll_banner[data-v-774ea6e2]{background:#f8f8f8;overflow:hidden;height:12.5rem}#hotel_goods #content .scroll_banner img[data-v-774ea6e2]{width:100%}#hotel_goods #content .banner_top[data-v-774ea6e2]{position:absolute;top:0}#hotel_goods #content .banner_top #hoid[data-v-774ea6e2]{padding:.3125rem;width:1.6rem;position:fixed;z-index:2}#hotel_goods #content .banner_top #cart[data-v-774ea6e2],#hotel_goods #content .banner_top #member[data-v-774ea6e2]{padding:.3125rem;width:1.6rem;position:fixed;z-index:2;-webkit-box-sizing:content-box;box-sizing:content-box}#hotel_goods #content .banner_top #cart[data-v-774ea6e2]{right:0}#hotel_goods #content .banner_top #member[data-v-774ea6e2]{right:2rem}#hotel_goods #content .banner_top #hoid.hoet[data-v-774ea6e2]{-webkit-transition:.1s;transition:.1s;background:rgba(0,0,0,.2);width:100%}#hotel_goods #content .banner_top #back[data-v-774ea6e2]{width:1.6rem;height:1.6rem;border-radius:100%;color:#fff;background-color:rgba(0,0,0,.4);text-indent:0;line-height:1.7rem;overflow:hidden}#hotel_goods #content .info_a[data-v-774ea6e2]{background:#fff;padding:.625rem .875rem}#hotel_goods #content .info_a .title-box[data-v-774ea6e2]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#hotel_goods #content .info_a .title-box h1[data-v-774ea6e2]{-webkit-box-flex:3;-webkit-flex:3;-ms-flex:3;flex:3;text-align:left;color:#333;font-size:16px;line-height:1.5rem;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-weight:700}#hotel_goods #content .info_a .title-box i[data-v-774ea6e2]{font-size:1.125rem;color:#666;margin-left:1rem;line-height:1.5rem}#hotel_goods #content .info_a .price li[data-v-774ea6e2]{font-size:14px;color:#8c8c8c;text-align:left;line-height:1.875rem;margin-top:.625rem}#hotel_goods #content .info_a .price li span[data-v-774ea6e2]{color:#f15353;margin-right:.625rem;font-weight:700}#hotel_goods #content .info_a .price li span font[data-v-774ea6e2]{font-size:20px}#hotel_goods #content .content_b[data-v-774ea6e2]{background:#fff;padding:.625rem 0;margin-top:.625rem}#hotel_goods #content .content_b h1[data-v-774ea6e2]{padding:0 .875rem;text-align:left;font-size:16px;line-height:2.5rem}#hotel_goods #content .content_b h1 span[data-v-774ea6e2]{color:#8c8c8c;font-size:14px;margin-left:.625rem;font-weight:400}#hotel_goods #content .content_b .time[data-v-774ea6e2]{width:21.5625rem;height:2.75rem;margin:0 auto;border-radius:.25rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#hotel_goods #content .content_b .time .time_a[data-v-774ea6e2],#hotel_goods #content .content_b .time .time_c[data-v-774ea6e2]{font-size:16px;font-weight:700}#hotel_goods #content .content_b .time .time_a span[data-v-774ea6e2],#hotel_goods #content .content_b .time .time_c span[data-v-774ea6e2]{font-size:12px;margin-left:.375rem;color:#8c8c8c;font-weight:400}#hotel_goods #content .content_b .time .time_b span[data-v-774ea6e2]{font-size:13px;border:.0625rem solid #ebebeb;border-radius:1rem;padding:.125rem .625rem}#hotel_goods #content .goods_foot[data-v-774ea6e2]{background:#fff;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:fixed;bottom:0;width:100%;height:3.0625rem}#hotel_goods #content .goods_foot .foot_a[data-v-774ea6e2]{width:25%}#hotel_goods #content .goods_foot .foot_a li[data-v-774ea6e2]{border-top:.0625rem solid #ebebeb}#hotel_goods #content .goods_foot .foot_a li i[data-v-774ea6e2]{font-size:1.375rem;color:#666}#hotel_goods #content .goods_foot .foot_a li .icon-collect-active[data-v-774ea6e2]{color:#f7ba2a}#hotel_goods #content .goods_foot .foot_a li span[data-v-774ea6e2]{display:block;font-size:12px;color:#666}#hotel_goods #content .goods_foot button[data-v-774ea6e2]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;background:#f15353;color:#fff;font-size:16px;border:none}",""]),t.exports=e},a2e7:function(t,e,o){"use strict";o.r(e);var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"hotel_goods"}},[o("c-title",{attrs:{hide:!1,text:"商品详情"}}),o("div",{attrs:{id:"content"}},[o("div",{staticClass:"scroll_banner"},[t.goods_info?o("van-swipe",{staticStyle:{width:"100%",height:"100%"},attrs:{autoplay:3e3,width:3==t.fun.getPhoneEnv()?375:t.clientWidths}},[o("van-swipe-item",[t.goods_info.room_type.image_1?o("img",{attrs:{src:t.goods_info.room_type.image_1}}):t._e()]),o("van-swipe-item",[t.goods_info.room_type.image_2?o("img",{attrs:{src:t.goods_info.room_type.image_2}}):t._e()]),o("van-swipe-item",[t.goods_info.room_type.image_3?o("img",{attrs:{src:t.goods_info.room_type.image_3}}):t._e()])],1):t._e()],1),o("div",{staticClass:"banner_top"},[o("div",{attrs:{id:"hoid"},on:{click:t.goBack}},[t._m(0)]),o("div",{attrs:{id:"cart"},on:{click:t.gotoHome}},[t._m(1)]),o("div",{attrs:{id:"member"},on:{click:t.gotoMember}},[t._m(2)])]),t.goods_info.room_type?o("div",{staticClass:"info_a"},[o("div",{staticClass:"title-box"},[o("h1",{staticStyle:{"-webkit-box-orient":"vertical"}},[t._v(" "+t._s(t.goods_info.room_type.name)+" ")])]),o("ul",{staticClass:"price"},[o("li",[o("span",[t._v(t._s(t.$i18n.t("money"))),o("font",[t._v(t._s(t.goods_info.minPrice))]),t._v("起")],1),t._v("房价以当天价格为准 ")])])]):t._e(),o("div",{staticClass:"content_b"},[t.goods_info.nextPriceArr&&t.goods_info.nextPriceArr.length>0?o("ul",{staticClass:"time"},[o("li",{staticClass:"time_a",on:{click:function(e){t.show1=!0}}},[t._v(" "+t._s(t.fun.isTextEmpty(t.start)?"请选择入住日期":t.start)),o("span",[t._v("入住")])]),t.fun.isTextEmpty(t.end)?t._e():o("li",{staticClass:"time_b"},[o("span",[t._v(t._s(t.night_day)+"晚")])]),o("li",{staticClass:"time_c",on:{click:function(e){t.show2=!0}}},[t._v(" "+t._s(t.fun.isTextEmpty(t.end)?"请选择离店日期":t.end)),o("span",[t._v("离开")])])]):t._e()]),t.goods_info.room_type?o("div",{staticClass:"info_c"},[o("van-tabs",{on:{click:t.itemClick}},[o("van-tab",{attrs:{label:"商品介绍"}},[t.goods_info.room_type.image_1?o("img",{staticStyle:{width:"100%"},attrs:{src:t.goods_info.room_type.image_1}}):t._e(),t.goods_info.room_type.image_2?o("img",{staticStyle:{width:"100%"},attrs:{src:t.goods_info.room_type.image_2}}):t._e(),t.goods_info.room_type.image_3?o("img",{staticStyle:{width:"100%"},attrs:{src:t.goods_info.room_type.image_3}}):t._e()])],1)],1):t._e(),t.goods_info.nextPriceArr?o("div",{staticClass:"goods_foot",style:{width:3==this.fun.getPhoneEnv()?"375px":""}},[o("ul",{staticClass:"foot_a"},[o("li",[o("i",{staticClass:"iconfont icon-goods_kefu",on:{click:t.gotoService}}),o("span",[t._v("客服")])])]),o("button",{attrs:{type:"button"},on:{click:t.ordertBtn}},[t._v("立即预定")])]):t._e()]),o("van-popup",{staticStyle:{position:"fixed",height:"80%"},attrs:{position:"bottom",overlay:!0},model:{value:t.show1,callback:function(e){t.show1=e},expression:"show1"}},[o("date-picker",{attrs:{type:"入住",top:!1,nextpricearr:t.goods_info.nextPriceArr},on:{timeChange:t.acceptTime,close:t.close}})],1),o("van-popup",{staticStyle:{position:"fixed",height:"80%"},attrs:{position:"bottom",overlay:!0},model:{value:t.show2,callback:function(e){t.show2=e},expression:"show2"}},[o("date-picker",{attrs:{type:"离店",top:!1,nextpricearr:t.goods_info.nextPriceArr},on:{timeChange:t.acceptTime,close:t.close}})],1)],1)},n=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"back"}},[o("i",{staticClass:"iconfont icon-member-left"})])},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"back"}},[o("i",{staticClass:"iconfont icon-ai-home"})])},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"back"}},[o("i",{staticClass:"iconfont icon-wode-wode"})])}],a=(o("e7e5"),o("d399")),s=(o("99af"),o("a15b"),o("ac1f"),o("1276"),o("4e82"),o("d3b7"),o("25f0"),o("159b"),o("e9c4"),o("6968")),r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"time_box"},[o("div",{class:{fixed:t.top},staticStyle:{position:"fixed",width:"100%"}},[o("div",{staticClass:"title"},[o("h3",[t._v("选择"+t._s(t.type)+"日期")]),o("i",{staticClass:"iconfont icon-close11",on:{click:t.close}})]),t._m(0)]),o("div",{staticClass:"box"},t._l(t.date_obj_arr,(function(e,i){return o("div",{key:i,staticClass:"month_box"},[o("h4",[t._v(t._s(e.full))]),o("div",{staticClass:"month"},[o("ul",{staticClass:"row"},[t._l(e.null,(function(t,e){return o("li",{key:e})})),t._l(e.day,(function(e,n){return o("div",{key:n},["0"==e.isOld?o("li",{key:n,class:{choose1:n==t.d_index&&i==t.m_index},on:{click:function(o){return t.chooseDate(i,n,e.all_date)}}},[o("span",[t._v(t._s(e.value))]),o("br"),o("span",[t._v(t._s(n==t.d_index&&i==t.m_index?t.type:""))]),e.is_manfang&&1==e.is_manfang?o("span",[t._v(t._s(n==t.d_index&&i==t.m_index?"":"满房"))]):t._e(),e.vprice&&1!=e.is_manfang?o("span",[t._v(t._s(n==t.d_index&&i==t.m_index?"":e.vprice))]):t._e()]):t._e(),"-1"==e.isOld?o("li",{staticStyle:{background:"#ccc"}},[t._v(" "+t._s(e.value)+" ")]):t._e(),"1"==e.isOld?o("li",{key:n,class:{choose:n==t.d_index&&i==t.m_index},on:{click:function(o){return t.chooseDate(i,n,e.all_date)}}},[o("span",[t._v(t._s(e.value))]),o("br"),o("span",[t._v(t._s(n==t.d_index&&i==t.m_index?t.type:""))]),e.is_manfang&&1==e.is_manfang?o("span",[t._v(t._s(n==t.d_index&&i==t.m_index?"":"满房"))]):t._e(),e.vprice&&1!=e.is_manfang?o("span",[t._v(t._s(n==t.d_index&&i==t.m_index?"":e.vprice))]):t._e()]):t._e()])}))],2)])])})),0)])},c=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"week_box"},[o("ul",{staticClass:"week"},[o("li",[t._v("日")]),o("li",[t._v("一")]),o("li",[t._v("二")]),o("li",[t._v("三")]),o("li",[t._v("四")]),o("li",[t._v("五")]),o("li",[t._v("六")])])])}],d={data:function(){return{dayArr:[],date_obj_arr:[],m_index:8888,d_index:9999}},props:{type:{default:""},start:{default:""},end:{default:""},top:{default:!0},nextpricearr:{default:[]}},methods:{getDay:function(){for(var t=[],e=1;e<13;e++){for(var o={},i=[],n=[],a=(new Date).getFullYear().toString(),s=(new Date).getDate(),r=new Date("".concat(a," ").concat(e)),c=r.getDay(),d=this.getMonthDay(a,e),l=(new Date).getMonth()+1,h=e,g=0;g<d;g++){var f={};f["value"]=s==g+1&&l==h?"今天":g+1,s>f.value&&l==h?f["isOld"]="-1":s<f.value&&l==h?f["isOld"]="1":f["isOld"]=l==h?"0":"1",l>h&&(f["isOld"]="-1"),f["all_date"]="".concat(a,"-").concat(h<10?"0".concat(h):"".concat(h),"-").concat(g+1<10?"0".concat(g+1):"".concat(g+1)),i.push(f)}o["day"]=i;for(var _=0;_<c;_++)n.push("null");o["null"]=n,t.push(o),o["date"]="".concat(a,"年").concat(e,"月")}this.date_obj_arr=t},getMonthDay:function(t,e){var o=new Date(t,e,0);return o.getDate()},chooseDate:function(t,e,o){this.toggle(t,e),this.$emit("timeChange",this.type,o)},toggle:function(t,e,o){this.m_index==t&&this.d_index==e||(this.m_index=t,this.d_index=e)},close:function(){this.$emit("close",this.type)},getMonthsArr:function(){var t=[],e=new Date,o=e.getFullYear(),i={};i.year=o.toString(),i.month=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1+"",i.full=i.year+"-"+i.month;for(var n=0;n<11;n++){e.setMonth(e.getMonth()+1);var a={};a.year=e.getFullYear().toString(),a.month=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1+"",a.full=a.year+"-"+a.month,t.push(a)}return t.unshift(i),t},getData:function(){var t=this,e=this.getMonthsArr(),o=(new Date).getMonth()+1<10?"0"+((new Date).getMonth()+1):(new Date).getMonth()+1+"",i=(new Date).getDate();e.forEach((function(e){for(var n=t.getMonthDay(e.year,e.month),a=[],s=[],r=new Date(e.full).getDay(),c=0;c<n;c++){var d={};d["all_date"]=e.full+"-".concat(c+1<10?"0".concat(c+1):"".concat(c+1)),i==c+1&&o==e.month?(d["value"]="今天",d["lastValue"]=c+1):d["value"]=c+1,i>d.value&&o==e.month?d["isOld"]="-1":i<d.value&&o==e.month?d["isOld"]="1":o==e.month?d["isOld"]="0":d["isOld"]="1",a.push(d)}for(var l=0;l<r;l++)s.push("null");for(var h=0;h<a.length;h++)a[h].isOld="-1";t.dayArr.forEach((function(o){if(o.month==e.month){for(var i=0;i<a.length;i++)t.getTomorrow(t.dayArr[t.dayArr.length-1].date)===a[i].all_date?a[i].isOld=1:a[i].vprice||(a[i].isOld=-1);for(var n=0;n<a.length;n++)(o.day==a[n].value||a[n].lastValue&&o.day==a[n].lastValue)&&(a[n].is_manfang=o.is_manfang,a[n].vprice=o.vprice,a[n].isOld=1)}})),e.null=s,e.day=a})),this.date_obj_arr=e},getYesterday:function(t){if(t){var e=new Date(t),o=new Date(e.getTime()-864e5);return o.getTime()}},getTomorrow:function(t){if(t){var e=new Date(t),o=new Date(e.getTime()+864e5);return"".concat(o.getFullYear(),"-").concat(o.getMonth()+1<10?"0".concat(o.getMonth()+1):"".concat(o.getMonth()+1),"-").concat(o.getDate()<10?"0".concat(o.getDate()):"".concat(o.getDate()))}}},mounted:function(){var t=[];this.nextpricearr.forEach((function(e){var o=e.date,i=new Date(o),n=i.getMonth()+1,a=i.getDate();t.push({date:o,month:n,day:a,is_manfang:e.is_manfang,vprice:e.vprice})})),this.dayArr=t,this.getData()}},l=d,h=(o("d6c0b"),o("2877")),g=Object(h["a"])(l,r,c,!1,null,"26c7887c",null),f=g.exports,_={data:function(){return{hotel_id:"",id:"",goods_info:"",end:"",start:"",night_day:"",show1:!1,show2:!1}},activated:function(){this.hotel_id=this.$route.params.hotel_id,this.id=this.$route.params.id,this.getData(),this.getInitTime()},created:function(){},mounted:function(){},methods:{getInitTime:function(){this.getTime()},getTime:function(){var t=new Date,e=new Date(t.getTime()+864e5);this.start="".concat(t.getFullYear(),"-").concat(t.getMonth()+1<10?"0".concat(t.getMonth()+1):"".concat(t.getMonth()+1),"-").concat(t.getDate()<10?"0".concat(t.getDate()):"".concat(t.getDate())),this.end="".concat(e.getFullYear(),"-").concat(e.getMonth()+1<10?"0".concat(e.getMonth()+1):"".concat(e.getMonth()+1),"-").concat(e.getDate()<10?"0".concat(e.getDate()):"".concat(e.getDate()))},goBack:function(){window.history.length<=1?this.$router.push(this.fun.getUrl("home",{})):this.$router.go(-1)},gotoService:function(){this.fun.isTextEmpty(this.goods_info.cservice)&&Object(a["a"])("请设置客服"),window.location.href=this.goods_info.cservice},gotoMember:function(){this.$router.push(this.fun.getUrl("member",{}))},gotoHome:function(){this.$router.push(this.fun.getUrl("home",{}))},dateInit:function(t){return t?t.split("/").reverse().join("-"):""},getData:function(){var t=this,e={hotel_id:this.hotel_id,sid:this.id};$http.post("plugin.hotel-supply.frontend.home.fang-xing",e).then((function(e){if(1==e.result){if(t.goods_info=e.data,t.goods_info&&t.goods_info.nextPrice){var o=[],i=t.goods_info.nextPrice;for(var n in i)o.push({id:i[n].id,sid:i[n].sid,cid:i[n].cid,is_manfang:i[n].is_manfang,vprice:i[n].vprice,date:t.dateInit(i[n].date)});if(t.goods_info.nextPriceArr=o.reverse(),t.goods_info.nextPriceArr&&t.goods_info.nextPriceArr.length>0){for(var a=t.goods_info.nextPriceArr[0].vprice,s=1;s<t.goods_info.nextPriceArr.length;s++){var r=t.goods_info.nextPriceArr[s].vprice;r<a&&(a=r)}t.goods_info.nextPriceArr.sort((function(t,e){return new Date(t.date)-new Date(e.date)})),t.start=t.goods_info.nextPriceArr[0].date,t.end=t.getTomorrow(t.goods_info.nextPriceArr[0].date),t.getDays(t.start,t.end),t.goods_info.minPrice=a}}}else t.$dialog.alert({message:e.msg})})).catch((function(t){}))},getTomorrow:function(t){if(t){var e=new Date(t),o=new Date(e.getTime()+864e5),i=o.getFullYear(),n=1==o.getMonth().toString().length?"0"+(o.getMonth()+1):o.getMonth()+1,a=1==o.getDate().toString().length?"0"+o.getDate():o.getDate();return i+"-"+n+"-"+a}},ordertBtn:function(){var t=!0,e=this.goods_info.nextPriceArr,o=this.start,i=this.end;if(i)if(e.forEach((function(e){o==e.date&&(t=!1)})),t)this.$dialog.alert({message:"入住日期没有住房,请重新选择入住日期"});else{var n=[o],a=this.getDate(o),s=this.getDate(i);while(s.getTime()-a.getTime()>=0){var r=a.getFullYear(),c=1==a.getMonth().toString().length?"0"+a.getMonth().toString():a.getMonth(),d=1==a.getDate().toString().length?"0"+a.getDate():a.getDate();r+"-"+c+"-"+d==o||n.push(r+"-"+c+"-"+d),a.setDate(a.getDate()+1)}n.pop();for(var l=[],h=0;h<n.length;h++){for(var g=n[h],f=!1,_="",m=0;m<e.length;m++)g==e[m].date&&(f=!0,_=m);if(!f)return void this.$dialog.alert({message:"入店至离店期间包含没有住房的日期,请重新选择日期"});if(1==e[_].is_manfang)return void this.$dialog.alert({message:"日期"+e[_].date+"已经满房,请重新选择日期"});l.push({date:e[_].date,price:e[_].vprice})}if(l.length>0){for(var p=l[0].price,u=0;u<l.length;u++)l[u].price<p&&(p=l[u].price);this.goods_info.minPrice=p}0!=l.length?this.$router.push(this.fun.getUrl("HotelSupplyGoodsOrder",{hotel_id:this.hotel_id,sid:this.id,date_price:JSON.stringify(l),start:this.start,end:this.end})):this.$dialog.alert({message:"请重新选择日期"})}else this.$dialog.alert({message:"请填写离店日期"})},itemClick:function(t){},acceptTime:function(t,e){"离店"==t?this.end=e:"入住"==t&&(this.start=e),this.checkDate(t)},checkDate:function(t){var e=new Date(this.start).getTime(),o=new Date(this.end).getTime();return this.fun.isTextEmpty(this.start)?(this.$notify({message:"请先选择入住日期",duration:1e3,background:"#1989fa"}),void(this.end="")):e==o?(this.$notify({message:"入住和离店日期不能为同一天",duration:1e3,background:"#1989fa"}),void(this.end="")):e>o?(this.$notify({message:"离店日期需要大于入店日期",duration:1e3,background:"#1989fa"}),void(this.end="")):void("离店"==t?(this.getDays(this.start,this.end),this.show2=!1):"入住"==t&&(this.getDays(this.start,this.end),this.show1=!1))},getDate:function(t){var e=t.split("-"),o=new Date(e[0],e[1],e[2]);return o},getDays:function(t,e){var o,i,n,a="-";o=t.split(a),i=e.split(a);var s=new Date(o[0],o[1]-1,o[2]),r=new Date(i[0],i[1]-1,i[2]);n=parseInt(Math.abs(s-r)/1e3/60/60/24),this.night_day=n},close:function(t){"离店"==t?this.show2=!1:"入住"==t&&(this.show1=!1)}},components:{cTitle:s["a"],datePicker:f}},m=_,p=m,u=(o("a83a"),Object(h["a"])(p,i,n,!1,null,"774ea6e2",null));e["default"]=u.exports},a83a:function(t,e,o){"use strict";o("5368")},d6c0b:function(t,e,o){"use strict";o("53281")}}]); |