1 line
24 KiB
JavaScript
1 line
24 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7985e6d1"],{"3af1":function(e,t,o){var i=o("24fb");t=i(!1),t.push([e.i,'#goods_order[data-v-4d61ffe5]{padding-bottom:60px}#goods_order #content .detail_a[data-v-4d61ffe5]{background:#fff;padding:.625rem .875rem}#goods_order #content .detail_a li[data-v-4d61ffe5]{line-height:1.875rem;text-align:left}#goods_order #content .detail_a li[data-v-4d61ffe5]:first-child{font-size:16px;font-weight:700}#goods_order #content .detail_a li[data-v-4d61ffe5]:last-child{font-size:14px}#goods_order #content .info_message[data-v-4d61ffe5]{background:#fff;margin-top:.625rem;padding-left:.875rem}#goods_order #content .info_message li[data-v-4d61ffe5]{padding-right:.875rem;min-height:2.8125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-bottom:.0625rem solid #ebebeb;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#goods_order #content .info_message li .left[data-v-4d61ffe5]{line-height:2.8125rem;width:4.5rem;text-align:left;font-size:15px}#goods_order #content .info_message li .right[data-v-4d61ffe5]{text-align:left;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}#goods_order #content .detail_b[data-v-4d61ffe5]{background:#fff;margin-top:.625rem;padding-left:.875rem}#goods_order #content .detail_b li[data-v-4d61ffe5]{padding-right:.875rem;height:2.8125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-bottom:.0625rem solid #ebebeb;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#goods_order #content .detail_b li span[data-v-4d61ffe5]{line-height:2.8125rem;width:6.25rem;text-align:left;font-size:15px}#goods_order #content .detail_b li[data-v-4d61ffe5]:last-child,#goods_order #content .detail_b li input[data-v-4d61ffe5]{border:none}#goods_order #content .detail_b .b_room[data-v-4d61ffe5]{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#goods_order #content .detail_c[data-v-4d61ffe5]{background:#fff;margin-top:.625rem;padding-left:.875rem}#goods_order #content .detail_c li[data-v-4d61ffe5]{padding-right:.875rem;height:2.8125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-bottom:.0625rem solid #ebebeb;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#goods_order #content .detail_c li span[data-v-4d61ffe5]{font-size:15px}#goods_order #content .detail_c li[data-v-4d61ffe5]:last-child,#goods_order #content .detail_c li input[data-v-4d61ffe5]{border:none}#goods_order #content .detail_c .c_invoice[data-v-4d61ffe5]{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#goods_order #content .detail_c .c_type .van-checkbox[data-v-4d61ffe5]{width:30%;text-align:left}#goods_order #content .tbs[data-v-4d61ffe5]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;background:#fff;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;padding:.625rem .875rem;line-height:1.5rem;border-bottom:.0625rem solid #e8e8e8;font-size:14px}#goods_order #content .tbs .list[data-v-4d61ffe5]{width:100%;padding-bottom:.625rem}#goods_order #content .tbs .list[data-v-4d61ffe5]:last-child{padding-bottom:0}#goods_order #content .tbs .left[data-v-4d61ffe5]{text-align:left;float:left;color:#333}#goods_order #content .tbs .left span[data-v-4d61ffe5]{font-size:15px}#goods_order #content .tbs .right[data-v-4d61ffe5]{text-align:right;float:right}#goods_order #content .tbs.coupon-list[data-v-4d61ffe5]{margin-top:.625rem;margin-bottom:.625rem}#goods_order #content .detail_d[data-v-4d61ffe5]{background:#fff;margin-top:.625rem;padding:.625rem .875rem}#goods_order #content .detail_d li[data-v-4d61ffe5]{line-height:1.875rem;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;font-size:14px}#goods_order #content .explain[data-v-4d61ffe5]{padding:0 .875rem}#goods_order #content .explain h1[data-v-4d61ffe5]{font-size:12px;color:#8c8c8c;line-height:1.875rem;text-align:left;padding:0;font-weight:700}#goods_order #content .explain p[data-v-4d61ffe5]{font-size:12px;color:#8c8c8c;padding:0 .625rem;text-align:left}#goods_order #content .foot[data-v-4d61ffe5]{background:#fff;position:fixed;bottom:0;width:100%;height:3.0625rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;border-top:.0625rem solid #ebebeb}#goods_order #content .foot .foot_a li[data-v-4d61ffe5]{font-size:14px;line-height:3.0625rem;padding-right:.625rem}#goods_order #content .foot .foot_a li span[data-v-4d61ffe5]{color:#f15353}#goods_order #content .foot .foot_a li span font[data-v-4d61ffe5]{font-size:20px}#goods_order #content .foot button[data-v-4d61ffe5]{background:#f15353;color:#fff;font-size:16px;border:none;width:6.875rem}#goods_order .add-info[data-v-4d61ffe5]{overflow-y:scroll;width:100%;background:#fff;max-height:50vh;padding-top:.625rem}#goods_order .coupon-list-info[data-v-4d61ffe5]{width:99.5vw}#goods_order .checkList[data-v-4d61ffe5]{position:relative;top:1.875rem;left:.1875rem;-webkit-box-flex:1;-ms-flex:1;-webkit-flex:1;flex:1}#goods_order .coupon_voucher_main[data-v-4d61ffe5]{position:relative;padding-left:6.375rem;height:5rem;margin-left:2.25rem;margin-right:.625rem;margin-bottom:.625rem}#goods_order .coupon_voucher_main .coupon_voucher_left[data-v-4d61ffe5]{position:absolute;top:0;left:0;width:6.375rem;height:100%;color:#fff;border-radius:.25rem 0 0 .25rem;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background-color:#47c1c4}#goods_order .coupon_voucher_main .coupon_voucher_left .coupon_voucher_amount.type_large[data-v-4d61ffe5]{margin:0;font-size:22px}#goods_order .coupon_voucher_main .coupon_voucher_left .coupon_voucher_amount[data-v-4d61ffe5]{position:relative;font-size:36px;line-height:1}#goods_order .coupon_voucher_main .coupon_voucher_left .coupon_voucher_amount[data-v-4d61ffe5]:before{content:"¥";font-size:16px;display:inline-block;vertical-align:text-top;margin-right:.1875rem;line-height:1}#goods_order .coupon_voucher_main .coupon_voucher_left .coupon_voucher_limit[data-v-4d61ffe5]{font-size:12px;line-height:1;margin-top:.9375rem;margin-bottom:0}#goods_order .coupon_voucher_main .coupon_voucher_hr[data-v-4d61ffe5]{position:absolute;top:0;left:6.0625rem;width:.375rem;overflow:hidden;height:100%}#goods_order .coupon_voucher_main .coupon_voucher_hr[data-v-4d61ffe5]:after{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:-.1875rem;right:-.1875rem;bottom:0;content:"• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •";line-height:.625rem;width:.4375rem;color:#f8fbfb;font-size:18px;overflow:hidden;z-index:1}#goods_order .coupon_voucher_main .coupon_voucher_right[data-v-4d61ffe5]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:.9375rem .9375rem .9375rem .625rem;height:100%;border-radius:0 .25rem .25rem 0;background-color:#e5f3f3;color:#666}#goods_order .coupon_voucher_main .coupon_voucher_right .coupon_voucher_range[data-v-4d61ffe5]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;text-align:left;margin:0;padding:0;vertical-align:baseline}#goods_order .coupon_voucher_main .coupon_voucher_right .coupon_voucher_period[data-v-4d61ffe5]{color:#999;font-size:12px;position:absolute;bottom:0}#goods_order .coupon_voucher_gray[data-v-4d61ffe5]{position:relative;padding-left:6.375rem;height:5rem;margin-left:2.25rem;margin-right:.625rem;margin-bottom:.625rem}#goods_order .coupon_voucher_gray .coupon_voucher_left[data-v-4d61ffe5]{position:absolute;top:0;left:0;width:6.375rem;height:100%;color:#fff;border-radius:.25rem 0 0 .25rem;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background-color:#ccc}#goods_order .coupon_voucher_gray .coupon_voucher_left .coupon_voucher_amount.type_large[data-v-4d61ffe5]{margin:0;font-size:22px}#goods_order .coupon_voucher_gray .coupon_voucher_left .coupon_voucher_amount[data-v-4d61ffe5]{position:relative;font-size:36px;line-height:1}#goods_order .coupon_voucher_gray .coupon_voucher_left .coupon_voucher_amount[data-v-4d61ffe5]:before{content:"¥";font-size:16px;display:inline-block;vertical-align:text-top;margin-right:.1875rem;line-height:1}#goods_order .coupon_voucher_gray .coupon_voucher_left .coupon_voucher_limit[data-v-4d61ffe5]{font-size:12px;line-height:1;margin-top:.9375rem;margin-bottom:0}#goods_order .coupon_voucher_gray .coupon_voucher_hr[data-v-4d61ffe5]{position:absolute;top:0;left:6.0625rem;width:.375rem;overflow:hidden;height:100%}#goods_order .coupon_voucher_gray .coupon_voucher_hr[data-v-4d61ffe5]:after{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:-.1875rem;right:-.1875rem;bottom:0;content:"• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •";line-height:.625rem;width:.4375rem;color:#f8fbfb;font-size:18px;overflow:hidden;z-index:1}#goods_order .coupon_voucher_gray .coupon_voucher_right[data-v-4d61ffe5]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:.9375rem .9375rem .9375rem .625rem;height:100%;border-radius:0 .25rem .25rem 0;background-color:#eee;color:#666}#goods_order .coupon_voucher_gray .coupon_voucher_right .coupon_voucher_range[data-v-4d61ffe5]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;text-align:left;margin:0;padding:0;vertical-align:baseline}#goods_order .coupon_voucher_gray .coupon_voucher_right .coupon_voucher_period[data-v-4d61ffe5]{color:#999;font-size:12px;position:absolute;bottom:0}#goods_order .mint-popup-4[data-v-4d61ffe5]{width:100%}#goods_order .mint-popup-4 .sure[data-v-4d61ffe5]{background:#f15353;height:2.5rem;line-height:2.5rem;color:#fff;width:50%;border:0;float:left}#goods_order .mint-popup-4 .close[data-v-4d61ffe5]{background:#eee;height:2.5rem;line-height:2.5rem;color:#333;width:50%;border:0;float:left}',""]),e.exports=t},4538:function(e,t,o){"use strict";o("f721")},c04b:function(e,t,o){"use strict";o.r(t);var i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{attrs:{id:"goods_order"}},[o("c-title",{attrs:{hide:!1,text:"商品下单页"}}),o("div",{attrs:{id:"content"}},[o("ul",{staticClass:"detail_a"},[o("li",[e._v(e._s(e.title))]),o("li",[e._v(e._s(e.start_time)+"-"+e._s(e.end_time)+" 共"+e._s(e.night_day)+"晚")])]),o("ul",{staticClass:"info_message"},[o("li",[o("div",{staticClass:"left"},[e._v("酒店名称:")]),o("div",{staticClass:"right"},[e._v(e._s(e.hotelInfo.name))])]),o("li",[o("div",{staticClass:"left"},[e._v("酒店地址:")]),o("div",{staticClass:"right"},[e._v(e._s(e.hotelInfo.address))])])]),o("ul",{staticClass:"detail_b"},[o("li",{staticClass:"b_room"},[o("span",[e._v("房间数")]),o("van-stepper",{on:{change:e.addTotal},model:{value:e.total,callback:function(t){e.total=t},expression:"total"}})],1),o("li",[o("span",[e._v("入住人")]),o("input",{directives:[{name:"model",rawName:"v-model",value:e.name,expression:"name"}],attrs:{type:"text",placeholder:"请填写入住姓名"},domProps:{value:e.name},on:{input:function(t){t.target.composing||(e.name=t.target.value)}}})]),o("li",[o("span",[e._v("联系手机")]),o("input",{directives:[{name:"model",rawName:"v-model",value:e.mobil,expression:"mobil"}],attrs:{type:"text",placeholder:"请填写入住人电话"},domProps:{value:e.mobil},on:{input:function(t){t.target.composing||(e.mobil=t.target.value)}}})])]),o("ul",{staticClass:"detail_c"},[o("li",{staticClass:"c_invoice"},[o("span",[e._v("是否需要发票")]),o("van-checkbox",{attrs:{"checked-color":"#f15353",shape:"square"},on:{change:e.invoiceChange},model:{value:e.isInvoice,callback:function(t){e.isInvoice=t},expression:"isInvoice"}})],1),e.isInvoice?o("li",{staticClass:"c_type"},[o("van-radio-group",{on:{change:e.eInvoiceChange},model:{value:e.el_invoice,callback:function(t){e.el_invoice=t},expression:"el_invoice"}},[o("van-radio",{staticStyle:{float:"left"},attrs:{name:"1","checked-color":"#f15353"}},[e._v("电子发票")]),o("van-radio",{staticStyle:{float:"left","margin-left":"10px"},attrs:{name:"2","checked-color":"#f15353"}},[e._v("纸质发票")])],1)],1):e._e(),e.isInvoice?o("li",{staticClass:"c_type"},[o("van-radio-group",{on:{change:e.typeChange},model:{value:e.invoice_type,callback:function(t){e.invoice_type=t},expression:"invoice_type"}},[o("van-radio",{staticStyle:{float:"left"},attrs:{name:"1","checked-color":"#f15353"}},[e._v("个人")]),o("van-radio",{staticStyle:{float:"left","margin-left":"10px"},attrs:{name:"2","checked-color":"#f15353"}},[e._v("公司")])],1)],1):e._e(),e.isInvoice&&"1"==e.invoice_type?o("li",[o("input",{directives:[{name:"model",rawName:"v-model",value:e.fp_tt,expression:"fp_tt"}],attrs:{type:"text",placeholder:"输入发票抬头"},domProps:{value:e.fp_tt},on:{input:function(t){t.target.composing||(e.fp_tt=t.target.value)}}})]):e._e(),e.isInvoice&&"2"==e.invoice_type?o("li",[o("input",{directives:[{name:"model",rawName:"v-model",value:e.company_name,expression:"company_name"}],attrs:{type:"text",placeholder:"请填写单位名称"},domProps:{value:e.company_name},on:{input:function(t){t.target.composing||(e.company_name=t.target.value)}}})]):e._e(),e.isInvoice&&"2"==e.invoice_type?o("li",[o("input",{directives:[{name:"model",rawName:"v-model",value:e.sbxd,expression:"sbxd"}],attrs:{type:"text",placeholder:"请填写纳税人识别向导"},domProps:{value:e.sbxd},on:{input:function(t){t.target.composing||(e.sbxd=t.target.value)}}})]):e._e(),o("li",[o("input",{directives:[{name:"model",rawName:"v-model",value:e.bz,expression:"bz"}],attrs:{type:"text",placeholder:"买家备注"},domProps:{value:e.bz},on:{input:function(t){t.target.composing||(e.bz=t.target.value)}}})])]),o("div",{staticClass:"tbs coupon-list",on:{click:e.showCoupon}},[o("div",{staticClass:"list"},[o("div",{staticClass:"left "},[e._v(" 优惠券 "),o("font",[e._v(e._s(e.coupon_size)+"张可用")])],1),o("div",{staticClass:"right"},[o("font",{attrs:{color:"#E84E40"}},[o("span",[e._v(e._s(0==e.use_coupon_size?"未使用":"已使用"+e.use_coupon_size+"张"))])])],1)])]),o("ul",{staticClass:"detail_d"},e._l(e.order_info.amount_items,(function(t,i){return o("li",{key:i},[o("span",[e._v(e._s(t.name))]),o("span",[e._v(e._s(e.$i18n.t("money"))),"total_deduction_price"==t.code?o("span",[e._v("-")]):e._e(),e._v(e._s(t.amount))])])})),0),o("ul",{staticClass:"detail_d"},e._l(e.order_info.discount_amount_items,(function(t,i){return o("li",{key:i},[o("span",[e._v(e._s(t.name))]),o("span",[e._v("-"+e._s(e.$i18n.t("money"))+e._s(t.amount))])])})),0),e._e(),o("div",{staticClass:"foot",style:{width:3==this.fun.getPhoneEnv()?"375px":""}},[o("ul",{staticClass:"foot_a"},[o("li",[e._v("合计:"),o("span",[e._v(e._s(e.$i18n.t("money"))),o("font",[e._v(e._s(e.order_info.total_price))])],1)])]),o("button",{attrs:{type:"button"},on:{click:e.submit}},[e._v("提交订单")])])]),o("van-popup",{staticClass:"mint-popup-4",style:{overflow:"visible"},attrs:{position:"bottom",closeOnClickModal:"true"},model:{value:e.popupCouponSpecs,callback:function(t){e.popupCouponSpecs=t},expression:"popupCouponSpecs"}},[o("div",{staticClass:"add-info"},e._l(e.coupons,(function(t,i){return o("div",{key:i,staticClass:"coupon-list-info"},[e.cup_notice?o("div",{staticClass:"checkList",staticStyle:{float:"left"},on:{click:function(t){return t.stopPropagation(),e.chooseCoupon(i)}}},[o("van-checkbox",{attrs:{shape:"square",disabled:!t.valid,"checked-color":"#f15353",name:t},on:{change:function(o){return e.selectCoupon(o,t)}},model:{value:t.checked,callback:function(o){e.$set(t,"checked",o)},expression:"coupon.checked"}})],1):e._e(),o("div",{class:{coupon_voucher_main:t.valid,coupon_voucher_gray:!t.valid}},[o("div",{staticClass:"coupon_voucher_left"},[1==t.belongs_to_coupon.coupon_method?o("div",[o("p",{staticClass:"coupon_voucher_amount type_large"},[e._v(" "+e._s(t.belongs_to_coupon.deduct)+" ")]),o("p",{staticClass:"coupon_voucher_limit"},[e._v(" 满"+e._s(t.belongs_to_coupon.enough)+"立减 ")])]):o("div",[o("p",{staticClass:"coupon_voucher_amount type_large"},[e._v(" "+e._s(t.belongs_to_coupon.discount)+"折 ")]),o("p",{staticClass:"coupon_voucher_limit"},[e._v(" 满"+e._s(t.belongs_to_coupon.enough)+"立享 ")])])]),o("div",{staticClass:"coupon_voucher_hr"}),o("div",{staticClass:"coupon_voucher_right"},[o("p",{staticClass:"coupon_voucher_range"},[e._v(" "+e._s(t.belongs_to_coupon.name)+" ")]),o("p",{staticClass:"coupon_voucher_period"},[e._v(" "+e._s(t.time_start)+"-"+e._s(t.time_end)+" ")])])])])})),0),o("button",{staticClass:" sure",attrs:{type:"button"},on:{click:function(t){e.popupCouponSpecs=!1}}},[e._v(" 确认 ")]),o("button",{staticClass:"close",attrs:{type:"button"},on:{click:function(t){e.popupCouponSpecs=!1}}},[e._v(" 取消 ")])])],1)},n=[],a=(o("e7e5"),o("d399")),s=(o("d3b7"),o("159b"),o("a434"),o("ac1f"),o("1276"),o("99af"),o("b0c0"),o("e9c4"),o("6968")),r="plugin.hotel-supply.frontend.create.index",c={data:function(){return{start:"",end:"",total:1,order_info:{},start_time:"",end_time:"",night_day:"",name:"",mobil:"",isInvoice:!1,invoice_type:"1",el_invoice:"1",fp_tt:"",company_name:"",sbxd:"",bz:"",title:"",popupCouponSpecs:!1,coupon_size:0,checkCouponList:[],use_coupon_size:0,cup_notice:!0,hotelInfo:""}},activated:function(){this.initData(),this.fun.isTextEmpty(this.$route.params.sid)&&this.$router.push(this.fun.getUrl("home",{})),this.end=this.$route.params.end||"",this.start=this.$route.params.start||"",this.getOrerData(),this.getTime({enter_at:this.start,leave_at:this.end})},mounted:function(){},methods:{assembleCoupons:function(){for(var e=[],t=0;t<this.checkCouponList.length;t++)e.push(this.checkCouponList[t].id);return e},initCoupon:function(e){this.coupon_size=e.length,this.coupons=e},DefaultSelectCoupon:function(e){var t=this;this.coupon_size=e.length,this.coupons=e,this.checkCouponList=[],e.forEach((function(e,o){1==e.checked&&t.checkCouponList.push(e)})),this.use_coupon_size=this.checkCouponList.length},selectCoupon:function(e,t){this.screenCoupon(e,t),this.use_coupon_size=this.checkCouponList.length,this.getOrerData()},screenCoupon:function(e,t){var o=t;if(e)if(this.cup_notice=!1,this.checkCouponList.length>0){for(var i=0;i<this.checkCouponList.length;i++)this.checkCouponList[i].id==o.id&&this.checkCouponList.splice(i,1);this.checkCouponList.push(o)}else this.checkCouponList.push(o);else if(this.cup_notice=!0,this.checkCouponList.length>0)for(var n=0;n<this.checkCouponList.length;n++)this.checkCouponList[n].id==o.id&&this.checkCouponList.splice(n,1)},chooseCoupon:function(e){this.coupons[e].checked=!0},showCoupon:function(){0!=this.coupon_size?this.popupCouponSpecs=!0:Object(a["a"])("暂无优惠券使用")},getOrerData:function(){var e=this,t="plugin.hotel-supply.frontend.goods-buy.index",o={sid:this.$route.params.sid,hotel_id:this.$route.params.hotel_id,date_price:this.$route.params.date_price,nums:this.total,member_coupon_ids:this.assembleCoupons()};$http.get(t,o,"加载中").then((function(t){1===t.result?(e.order_info=t.data,e.title=t.data.orders[0].order_goods[0].title,t.data.orders[0].hotel_supply_order&&t.data.orders[0].hotel_supply_order.hotel&&(e.hotelInfo=t.data.orders[0].hotel_supply_order.hotel),e.initCoupon(t.data.discount.member_coupons),e.cup_notice=!0):(e.cup_notice=!0,Object(a["a"])(t.msg))})).catch((function(e){}))},getTime:function(e){var t=e.enter_at.split(" "),o=e.leave_at.split(" "),i=t[0].split("-"),n=o[0].split("-");this.start_time="".concat(i[1],"月").concat(i[2],"日"),this.end_time="".concat(n[1],"月").concat(n[2],"日"),this.getDays(t[0],o[0])},getDays:function(e,t){var o,i,n,a="-";o=e.split(a),i=t.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},addTotal:function(){this.total<1&&(this.total=1),this.getOrerData()},invoiceChange:function(e){this.isInvoice=e},eInvoiceChange:function(e){this.el_invoice=e},typeChange:function(e){this.invoice_type=e},submit:function(){var e=this,t=this;if(this.fun.isTextEmpty(this.name))Object(a["a"])("请填写入住人");else if(this.fun.isTextEmpty(this.mobil))Object(a["a"])("请填写电话号码");else{if(this.isInvoice){if("1"==this.invoice_type&&this.fun.isTextEmpty(this.fp_tt))return void Object(a["a"])("请输入发票抬头");if("2"==this.invoice_type){if(this.fun.isTextEmpty(this.company_name))return void Object(a["a"])("请填写单位名称");if(this.fun.isTextEmpty(this.sbxd))return void Object(a["a"])("请填写纳税人识别向导")}}var o={sid:this.$route.params.sid,hotel_id:this.$route.params.hotel_id,date_price:this.$route.params.date_price,nums:this.total,member_coupon_ids:JSON.stringify(this.assembleCoupons()),address:JSON.stringify({}),orders:JSON.stringify([{pre_id:this.order_info.orders[0].pre_id,deduction_ids:"",note:this.bz}]),tel:this.mobil,user_name:this.name,invoice_type:this.el_invoice,rise_type:this.invoice_type,call:"1"==this.invoice_type?this.fp_tt:this.company_name,ncompany_numberote:this.sbxd};this.isInvoice&&(o.total_price=this.order_info.total_price),this.$route.params.exchangeData&&(o.hotel_id=this.$route.params.hotel_id),$http.get(r,o,"提交中...").then((function(o){1==o.result?e.$router.push(e.fun.getUrl("orderpay",{status:"2",order_ids:o.data.order_ids})):t.$dialog.alert({message:o.msg})})).catch((function(e){}))}},initData:function(){this.start="",this.end="",this.total=1,this.order_info={},this.start_time="",this.end_time="",this.night_day="",this.name="",this.mobil="",this.isInvoice=!1,this.invoice_type="1",this.el_invoice="1",this.fp_tt="",this.company_name="",this.sbxd="",this.bz="",this.title="",this.popupCouponSpecs=!1,this.coupon_size=0,this.use_coupon_size=0,this.checkCouponList=[],this.coupons=[]}},components:{cTitle:s["a"]}},d=c,l=d,p=(o("4538"),o("2877")),f=Object(p["a"])(l,i,n,!1,null,"4d61ffe5",null);t["default"]=f.exports},f721:function(e,t,o){var i=o("3af1");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=o("499e").default;n("0cc2ec21",i,!0,{sourceMap:!1,shadowMode:!1})}}]); |