pages-writeoff-writeoffitem-writeoffitem.5143ffa5.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-writeoff-writeoffitem-writeoffitem"],{"388f":function(t,e,i){"use strict";var a,o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"pages writeoffitem"},[i("v-uni-view",{staticClass:"writeoffitem-number"},[i("v-uni-view",{staticClass:"number"},[t._v("订单编号:"+t._s(t.resdata.ordersn))]),i("v-uni-view",{staticClass:"time"},[t._v("预订时间:"+t._s(t.resdata.addDate))])],1),i("v-uni-view",{staticClass:"wrap"},[2==t.hd_type?i("v-uni-view",{staticClass:"write-radius scan-hd"},[i("v-uni-view",{staticClass:"scan-hd-header"},[i("v-uni-view",{staticClass:"scan-hd-header-til"},[t._v("验证蝴蝶券 "+t._s(t.ticket.length)+"/"+t._s(t.resdata.hd_count))])],1),i("v-uni-view",{staticClass:"addhd"},[i("v-uni-input",{staticClass:"addhd-input",attrs:{placeholder:"请输入蝴蝶券号码",type:"text",value:""},model:{value:t.enterHDnumber,callback:function(e){t.enterHDnumber=e},expression:"enterHDnumber"}}),i("v-uni-button",{staticClass:"addhd-button",attrs:{type:"primary"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.enterHD.apply(void 0,arguments)}}},[t._v("添加")])],1),t._l(t.ticket,(function(e,a){return i("v-uni-view",{key:a,staticClass:"scan-hd-list"},[i("v-uni-view",{staticClass:"scan-hd-list-item"},[i("v-uni-view",{staticClass:"item-til"},[t._v("蝴蝶券"+t._s(a+1))]),i("v-uni-view",{staticClass:"item-con"},[i("v-uni-input",{attrs:{type:"text",value:e,disabled:!0}})],1)],1)],1)})),i("v-uni-view",{staticClass:"scan-hd-tip"},[t._v("还差"+t._s(t.resdata.hd_count-t.ticket.length)+"张蝴蝶券")])],2):t._e(),1==t.hd_type?i("v-uni-view",{staticClass:"write-radius consumer-code"},[i("v-uni-text",{staticClass:"consumer-code-text"},[t._v("消费码:")]),i("v-uni-input",{staticClass:"consumer-code-input",attrs:{type:"text",value:"",placeholder:"请填写订单消费码"},model:{value:t.eticketno,callback:function(e){t.eticketno=e},expression:"eticketno"}})],1):t._e(),i("v-uni-view",{staticClass:"write-radius hotel-info"},[i("v-uni-view",{staticClass:"hotel-info-room"},[i("v-uni-image",{staticClass:"room-image",attrs:{src:t.resdata.litpic,mode:"scaleToFill"}}),i("v-uni-view",{staticClass:"hotel-info-text"},[i("v-uni-view",{staticClass:"hotel-info-text-item hotel-info-text-hotel"},[t._v(t._s(t.hotelname))]),i("v-uni-view",{staticClass:"hotel-info-text-item hotel-info-text-room"},[t._v(t._s(t.roomname))]),i("v-uni-view",{staticClass:"hotel-info-text-item hotel-info-text-service"},[t.breakfirst?i("v-uni-text",{staticClass:"hotel-info-text-service-item"},[t._v(t._s(t.breakfirst))]):t._e(),t.roomwindow?i("v-uni-text",{staticClass:"hotel-info-text-service-item"},[t._v(t._s(t.roomwindow))]):t._e(),t.roomstyle?i("v-uni-text",{staticClass:"hotel-info-text-service-item"},[t._v(t._s(t.roomstyle))]):t._e()],1)],1)],1),i("v-uni-view",{staticClass:"room-detail"},[i("v-uni-view",{staticClass:"room-detail-item room-detail-time"},[i("v-uni-view",{staticClass:"room-detail-time-data"},[t._v("入住:"+t._s(t.resdata.usedate)+" 离店:"+t._s(t.resdata.departdate))]),i("v-uni-view",{staticClass:"room-detail-time-total"},[t._v("共"+t._s(t.havenight)+"晚")])],1)],1)],1),i("v-uni-view",{staticClass:"write-radius contact-info"},[i("v-uni-view",{staticClass:"contact-info-item contact-info-name"},[i("v-uni-view",{staticClass:"contact-info-item-til"},[t._v("联系人:")]),i("v-uni-view",{staticClass:"contact-info-item-con"},[t._v("蝴蝶旅居")])],1),i("v-uni-view",{staticClass:"contact-info-item contact-info-phone"},[i("v-uni-view",{staticClass:"contact-info-item-til"},[t._v("联系电话:")]),i("v-uni-view",{staticClass:"contact-info-item-con"},[t._v("13984111111")])],1)],1)],1),i("v-uni-view",{staticClass:"bottom-btn-wrap"},[i("v-uni-button",{staticClass:"bottom-btn",attrs:{type:"primary"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.writeoff.apply(void 0,arguments)}}},[t._v("核销")])],1)],1)},n=[];i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){return a}))},"642b":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.writeoffitem-number[data-v-4193b061]{margin-bottom:%?24?%;background-color:#fff;padding:%?24?%;color:#666;border-bottom-left-radius:%?14?%;border-bottom-right-radius:%?14?%}.consumer-code[data-v-4193b061]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;position:relative}.consumer-code[data-v-4193b061]::after{content:"*";position:absolute;right:%?45?%;top:%?40?%;color:red}.consumer-code-text[data-v-4193b061]{margin-right:%?10?%}.consumer-code-input[data-v-4193b061]{-webkit-box-flex:1;-webkit-flex:1;flex:1}.consumer-code-input[data-v-4193b061]{border:1px solid #007aff;padding:%?10?%;border-radius:%?10?%}.hotel-info-room[data-v-4193b061]{display:-webkit-box;display:-webkit-flex;display:flex;padding-bottom:%?20?%;border-bottom:1px dotted #ebebeb}.hotel-info-room .room-image[data-v-4193b061]{width:%?150?%;height:%?150?%;border-radius:%?14?%;margin-right:%?24?%}.hotel-info-room .hotel-info-text[data-v-4193b061]{-webkit-box-flex:1;-webkit-flex:1;flex:1}.hotel-info-text-item[data-v-4193b061]{margin-bottom:%?5?%}.hotel-info-text-room[data-v-4193b061]{font-size:%?32?%}.hotel-info-text-service[data-v-4193b061]{color:#666}.hotel-info-text-service .hotel-info-text-service-item[data-v-4193b061]{padding:%?4?% %?10?%;position:relative}.hotel-info-text-service .hotel-info-text-service-item + .hotel-info-text-service-item[data-v-4193b061]::before{content:"";width:1px;height:%?24?%;background-color:#666;position:absolute;left:0;top:50%;margin-top:%?-12?%}.room-detail-item[data-v-4193b061]{padding:%?20?% 0;border-bottom:1px dotted #ebebeb;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.room-list[data-v-4193b061]{width:100%;color:#666}.room-list-item[data-v-4193b061]{margin-bottom:%?10?%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.pay-total[data-v-4193b061]{margin-top:%?24?%}.pay-total-item[data-v-4193b061]{display:-webkit-box;display:-webkit-flex;display:flex;margin-bottom:%?15?%;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.pay-total-way[data-v-4193b061]{color:#666}.contact-info[data-v-4193b061]{margin-bottom:%?40?%}.contact-info-item[data-v-4193b061]{display:-webkit-box;display:-webkit-flex;display:flex;margin-bottom:%?10?%}.contact-info-item-til[data-v-4193b061]{min-width:%?150?%;text-align:right}.contact-info-item-con[data-v-4193b061]{color:#666}.scan-hd-header[data-v-4193b061]{display:-webkit-box;display:-webkit-flex;display:flex;margin-bottom:%?15?%;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.scan-hd-header-til[data-v-4193b061]{color:#4235b6}.scan-hd-header-btn[data-v-4193b061]{margin:unset;height:%?50?%;line-height:%?50?%;font-size:%?28?%;background:-webkit-linear-gradient(top,#5a52c5,#8257ed);background:linear-gradient(180deg,#5a52c5,#8257ed);color:#fff}.scan-hd-header-btn .iconfont[data-v-4193b061]{font-size:%?28?%;margin-right:%?5?%}.scan-hd-list-item[data-v-4193b061]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding-left:%?5?%;background:#ececec;margin-bottom:%?15?%}.scan-hd-list-item .item-til[data-v-4193b061]{padding-right:%?10?%}.scan-hd-list-item .item-con[data-v-4193b061]{-webkit-box-flex:1;-webkit-flex:1;flex:1}.scan-hd-tip[data-v-4193b061]{color:#999}.pay-way[data-v-4193b061]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.radio-select uni-radio-group[data-v-4193b061]{display:-webkit-box;display:-webkit-flex;display:flex}.radio-select .uni-list-cell[data-v-4193b061]{margin-right:%?50?%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}uni-button[type=primary][data-v-4193b061]{background:-webkit-linear-gradient(top,#5a52c5,#8257ed);background:linear-gradient(180deg,#5a52c5,#8257ed)}body[data-v-4193b061]{font-size:%?28?%}.wrap[data-v-4193b061]{margin:0 %?40?%}.full-img[data-v-4193b061]{width:100%;height:auto}.f-tac[data-v-4193b061]{text-align:center}.write-radius[data-v-4193b061]{background-color:#fff;border-radius:%?24?%;padding:%?24?%;margin-bottom:%?24?%}.bottom-btn-wrap[data-v-4193b061]{height:%?110?%}.bottom-btn[data-v-4193b061]{height:%?110?%;line-height:%?110?%;position:fixed;left:0;bottom:0;width:100%}.search-block[data-v-4193b061]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.search-input[data-v-4193b061]{border:1px solid #666;font-size:%?24?%;height:%?50?%;line-height:%?50?%;border-radius:%?12?%;padding-left:%?24?%}.search-input + .search-input[data-v-4193b061]{margin:0 %?10?%}.search-button[data-v-4193b061]{width:%?200?%;height:%?50?%;line-height:%?50?%;font-size:%?32?%}uni-page-body[data-v-4193b061]{background-color:#f8f8f8}.addhd[data-v-4193b061]{margin:%?40?% 0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.addhd-input[data-v-4193b061],\r\n.addhd-button[data-v-4193b061]{height:%?50?%;line-height:%?50?%;font-size:%?28?%}.addhd-button[data-v-4193b061]{margin:0}.addhd-input[data-v-4193b061]{border:1px solid #4235b6;border-radius:%?12?%;-webkit-box-flex:1;-webkit-flex:1;flex:1;margin-right:%?15?%;padding:0 %?12?%}body.?%PAGE?%[data-v-4193b061]{background-color:#f8f8f8}',""]),t.exports=e},"64d7":function(t,e,i){"use strict";var a=i("a71e"),o=i.n(a);o.a},7857:function(t,e,i){"use strict";i.r(e);var a=i("388f"),o=i("e6e6");for(var n in o)"default"!==n&&function(t){i.d(e,t,(function(){return o[t]}))}(n);i("64d7");var s,r=i("f0c5"),d=Object(r["a"])(o["default"],a["b"],a["c"],!1,null,"4193b061",null,!1,a["a"],s);e["default"]=d.exports},a71e:function(t,e,i){var a=i("642b");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=i("4f06").default;o("19750338",a,!0,{sourceMap:!1,shadowMode:!1})},c89b:function(t,e,i){"use strict";i("c975"),i("ac1f"),i("5319"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={components:{},props:{},data:function(){return{id:"",hd_type:"",hotelname:"",roomname:"",breakfirst:"",roomstyle:"",roomwindow:"",orderId:"",eticketno:"",ticket:[],enterHDnumber:"",writeoff_remark:"",resdata:{},params:{token:""},writeoffparams:{token:""},havenight:""}},onLoad:function(t){var e=this.checkLogin("pages/index/index","2");if(!e)return!1;this.params.token=e[0],this.id=t.id,this.params=Object.assign(this.params,{id:t.id}),this.getdetail()},methods:{getdetail:function(){var t=this;this.$api.http.post(this.config.apiBaseurl+"hotel/writeoff/detail",this.params,{header:{Accept:"application/json",Authorization:"Bearer "+this.params.token}}).then((function(e){"1001"==e.data.code&&uni.redirectTo({url:"/pages/login/login?backpage=/pages/writeoff/writeoffitem/writeoffitem?id=".concat(t.id,"&backtype=2")}),t.hd_type=e.data.hd_type,t.resdata=e.data,t.hotelname=e.data.hotel.title,t.roomname=e.data.room.roomname,t.breakfirst=e.data.room.breakfirst,t.roomstyle=e.data.room.roomstyle,t.roomwindow=e.data.room.roomwindow;var i=Date.parse(new Date(e.data.usedate.replace(/-/g,"/")))/1e3,a=Date.parse(new Date(e.data.departdate.replace(/-/g,"/")))/1e3;t.havenight=Math.abs((i-a)/86400)})).catch((function(t){}))},pushHD:function(t){var e=this;Array.prototype.pushNoRepeat=function(){for(var t=this,i=0;i<arguments.length;i++){var a=arguments[i];if(-1==this.indexOf(a)){var o={token:e.params.token,code:a};e.$api.http.post(e.config.apiBaseurl+"hotel/writeoff/verify",o,{header:{Accept:"application/json",Authorization:"Bearer "+e.params.token}}).then((function(e){"ok"==e.data.state?t.push(a):uni.showToast({icon:"none",title:e.data.message,duration:2e3}),console.log(e)})).catch((function(t){console.log(t)}))}else uni.showToast({icon:"none",title:"该券已经添加",duration:2e3})}},this.ticket.pushNoRepeat(t)},enterHD:function(){this.pushHD(this.enterHDnumber)},scanCode:function(){$wxApi.JSAPI().then((function(t){alert("555"+t)})),console.log("$wxApi",$wxApi),this.pushHD(res.resultStr),uni.showToast({icon:"none",title:"暂时无法使用3",duration:2e3})},writeoff:function(){if(console.log(this.hd_type),2==this.hd_type&&(this.orderId=this.id,this.writeoffparams.ticket.length<this.resdata.hd_count))return uni.showToast({icon:"none",title:"蝴蝶券不足",duration:2e3}),!1;this.writeoffparams.token=this.params.token,this.writeoffparams=Object.assign(this.writeoffparams,{orderId:this.orderId,eticketno:this.eticketno,ticket:this.ticket}),this.$api.http.post(this.config.apiBaseurl+"hotel/writeoff/inspection",this.writeoffparams,{header:{Accept:"application/json",Authorization:"Bearer "+this.params.token}}).then((function(t){uni.showToast({icon:"none",title:t.data.message,duration:2e3}),console.log(t)})).catch((function(t){console.log(t)}))}}};e.default=a},e6e6:function(t,e,i){"use strict";i.r(e);var a=i("c89b"),o=i.n(a);for(var n in a)"default"!==n&&function(t){i.d(e,t,(function(){return a[t]}))}(n);e["default"]=o.a}}]);