webpackJsonp([41],{405:function(t,e,s){function i(t){s(596)}var a=s(1)(s(498),s(653),i,null,null);t.exports=a.exports},498:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s(15),a=s.n(i),r=s(10),o=s(18),l=s(236),c=s(237),n=s(57);e.default={data:function(){return{active:null,items:[],noDataMsg:"您还没有挂单"}},created:function(){this.$hotKey.setScenes("取单"),this.items=this.tempOrders.items,this.active=this.items.length?0:null},computed:a()({},s.i(r.a)({tempOrders:function(t){return t.tempOrders}})),methods:a()({},s.i(r.b)([l.d,l.b,c.a,n.c]),{prev:function(){this.active--},next:function(){this.active++},getTempOrder:function(){var t=this;this.POS_CART_REMOVE();for(var e=s.i(o.a)(this.tempOrders),i=e.items[this.active].items,a=0,r=i.length;a<r;a++)this.POS_CART_INSERT(i[a]);var l=e.items[this.active].memberMobile;l?this.$http.get(this.$appConfig.api.member.get+"?mobile="+l).then(function(e){if(200!==e.data.code)throw new Error(e.data.message);var s=e.data.data;s&&t.MEMBER_UPDATE(s)}).catch(function(e){t.$toast({type:"danger",content:e.message})}).finally(function(s){e.items.splice(t.active,1),t.TEMP_ORDERS_UPDATE(e),t.$hotKey.history=[],t.$hotKey.setScenes("收银台"),t.$router.replace({path:"/cashier"})}):(e.items.splice(this.active,1),this.TEMP_ORDERS_UPDATE(e),this.$hotKey.history=[],this.$hotKey.setScenes("收银台"),this.$router.replace({path:"/cashier"}))},selectOneOrder:function(t,e,s){this.active=s,this.getTempOrder()}})}},540:function(t,e,s){e=t.exports=s(378)(!1),e.push([t.i,".page-order-temp{position:relative;background-color:#fff}.page-order-temp .order-temp-left{overflow:hidden;overflow-y:auto;height:calc(100vh - 52px)}.page-order-temp .order-temp-right{border-left:1px solid #c7c7c7}.page-order-temp .order-temp-right>div:first-child{border-bottom:1px solid #ddd}.page-order-temp .order-temp-right .goods-list{overflow:hidden;overflow-y:auto;height:calc(100vh - 90px)}.page-order-temp .order-temp-right .goods-list .no-gutters{border-bottom:1px dashed #c3c3c3}.page-order-temp .order-temp-right .goods-list .no-gutters:last-child{border:none}",""])},596:function(t,e,s){var i=s(540);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);s(379)("3bbe6f4b",i,!0)},653:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"page-order-temp",on:{hotKey_prev:t.prev,hotKey_next:t.next,"hotKey_确定":t.getTempOrder}},[s("v-header"),t._v(" "),s("div",{staticClass:"row no-gutters"},[s("div",{staticClass:"col-5 grey lighten-2 p-2 order-temp-left"},[s("v-dataTable",{attrs:{headHeight:"33px",data:t.items,noDataMsg:t.noDataMsg},scopedSlots:t._u([{key:"tbody",fn:function(e){return[s("td",[s("div",{staticClass:"d-flex w-100 justify-content-between"},[s("h5",{staticClass:"mb-1"},[t._v("#"+t._s(e.index)+"号，共￥"+t._s(e.cell.total))]),t._v(" "),s("small",[t._v(t._s(e.cell.createTime))])]),t._v(" "),s("p",{staticClass:"mb-1"},[t._v(t._s(e.cell.title))]),t._v(" "),s("small",[t._v("挂单人："+t._s(e.cell.posUserName))])]),t._v(" "),s("td",[s("button",{staticClass:"btn btn-primary",staticStyle:{height:"120%","margin-right":"-5px"},on:{click:function(s){s.stopPropagation(),t.selectOneOrder(s,"add",e.index)}}},[t._v("选择")])])]}}]),model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[s("template",{attrs:{slot:"thead"},slot:"thead"},[s("th",[t._v("单据列表")])])],2)],1),t._v(" "),s("div",{staticClass:"order-temp-right col-7"},[s("v-dataTable",{attrs:{headHeight:"33px",data:t.items.length?t.items[t.active].items:[],noDataMsg:t.noDataMsg},scopedSlots:t._u([{key:"tbody",fn:function(e){return[s("td",{staticClass:"text-left "},[t._v(t._s(e.cell.name))]),t._v(" "),s("td",{staticClass:"text-right"},[t._v(t._s(e.cell.subtotal))]),t._v(" "),s("td",{staticClass:"text-right"},[t._v(t._s(e.cell.quantity))])]}}])},[s("template",{attrs:{slot:"colgroup"},slot:"colgroup"},[s("col",{staticStyle:{width:"66.666%"}}),t._v(" "),s("col",{staticStyle:{width:"16.666%"}}),t._v(" "),s("col",{staticStyle:{width:"16.666%"}})]),t._v(" "),s("template",{attrs:{slot:"thead"},slot:"thead"},[s("tr",[s("th",{staticClass:"text-left",staticStyle:{width:"66.666%"}},[t._v("品名")]),t._v(" "),s("th",{staticClass:"text-right",staticStyle:{width:"16.666%"}},[t._v("价格")]),t._v(" "),s("th",{staticClass:"text-right",staticStyle:{width:"16.666%"}},[t._v("数量")])])])],2)],1)])],1)},staticRenderFns:[]}}});