canyin-project/ybcy/views/cashier/static/js/chunk-2ea19d1e.8a59daf6.js
2024-11-01 16:07:54 +08:00

1 line
34 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2ea19d1e"],{"15a4":function(e,t,r){},"187f":function(e,t,r){},"24ac":function(e,t,r){},"27e4":function(e,t,r){},"4bbc":function(e,t,r){"use strict";r("187f")},5770:function(e,t,r){"use strict";r("806b")},"5e9e":function(e,t,r){},"743e":function(e,t,r){"use strict";r("15a4")},"806b":function(e,t,r){},"92d1":function(e,t,r){"use strict";r("27e4")},c3cd:function(e,t,r){},d1fe:function(e,t,r){"use strict";r("c3cd")},df10:function(e,t,r){},e6b9:function(e,t,r){e.exports=r.p+"static/img/nogood.7773e23f.png"},ef53:function(e,t,r){"use strict";r("df10")},f25a:function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"flex-bet cashier_left heighthv flex-y-top"},[r("div",{staticClass:"bflex-4 flex-bet ba_f heighthv flex-y-top bor_rad20"},[r("div",{staticClass:"flex-g-1 bor_r2px heighthv"},[r("cashierLeft",{ref:"cashierLeft"})],1),r("div",{staticClass:"flex-g-0 heighthv flex-y-top bor_rad20"},[r("cashierTool",{ref:"cashierTool"})],1)]),r("div",{staticClass:"bflex-6 mar_l20 heighthv flex-y-top"},[r("cashierRigth",{ref:"cashierRigth"})],1)])},a=[],i=(r("96cf"),r("1da1")),n=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"cashieLeft heighthv flex-colbt"},[s("div",{staticClass:"flex-bet pad_tb20_lr10 cashie_top flex-g-0"},[s("div",{staticClass:"fon_16"},[e._v("收银员:"+e._s(e.userData.trueName))]),e.vipUserId?s("div",{staticClass:"fon_16 flex mar_r10"},[s("el-image",{staticClass:"viplogo",attrs:{src:e.vipUserIcon,fit:"cover"}}),s("div",{staticClass:"mar_l10"},[e._v(e._s(e.vipUserTel))])],1):e._e()]),s("div",{staticClass:"flex fon_16 mar_t10 pad_10"},[s("div",{},[e._v("消费方式")]),s("div",{staticClass:"flex mar_l10"},[s("el-radio",{attrs:{label:"1"},on:{change:function(t){return e.TypeIsout(e.isOut)}},model:{value:e.isOut,callback:function(t){e.isOut=t},expression:"isOut"}},[e._v("店内就餐")]),s("el-radio",{attrs:{label:"2"},on:{change:function(t){return e.TypeIsout(e.isOut)}},model:{value:e.isOut,callback:function(t){e.isOut=t},expression:"isOut"}},[e._v("打包带走")])],1)]),s("div",{staticClass:"cashie_search flex-g-0"},[s("el-input",{attrs:{placeholder:"货号/条码/助记码/价格","suffix-icon":"el-icon-search"},model:{value:e.searchInput,callback:function(t){e.searchInput=t},expression:"searchInput"}})],1),s("el-scrollbar",{staticClass:"flex-g-1 goods_list_wrap"},[s("div",{staticClass:"goods_list"},[e._l(e.goodList,(function(t,r){return s("div",{key:r,staticClass:"pad_10 bor_b2px fon_18 flex-bet",class:{is_hover:r==e.goodsListHover},on:{click:function(s){return e.clickGoodsList(t,r)}}},[s("div",{staticClass:"flex-g-0 pad_10 color_6 fon_20"},[e._v(e._s(r+1))]),s("div",{staticClass:"flex-g-1"},[s("div",{staticClass:"flex-bet"},[s("div",{staticClass:"overflowlnr"},[e._v(e._s(t.name))]),s("div",[s("el-input-number",{attrs:{size:"small",min:1,max:99999999999,label:"描述文字"},on:{change:function(r){return e.setGoodNum(t)}},model:{value:t.num,callback:function(r){e.$set(t,"num",r)},expression:"item.num"}})],1)]),s("div",{staticClass:"color_9 fon_12 t_l"},[t.groupName?s("span",[e._v("规格:"+e._s(t.groupName)+"")]):e._e(),t.attribute?s("span",[e._v("属性:"+e._s(t.attribute)+"")]):e._e(),t.materialName?s("span",[e._v("加料:"+e._s(t.materialName))]):e._e()]),s("div",{staticClass:"flex-bet"},[s("div",{staticClass:"flex-g-1 t_l color_9 fon_14"},[e._v("¥"+e._s(t.money)+"/"+e._s(t.unit))]),s("div",{staticClass:"flex-g-1 ttableId_r fon_14"},[e._v("¥"+e._s(t.totalMoney))])])])])})),e.goodList.length<=0?s("div",{staticClass:"goods_blank heighthv flex-center"},[s("div",{staticClass:"fon_16"},[s("img",{staticStyle:{width:"300px",height:"300px"},attrs:{src:r("e6b9"),alt:""}}),s("p",{staticClass:"color_3 mar_t10"},[e._v("你的购物车还是空的")]),s("p",{staticClass:"color_9 mar_t10"},[e._v("请从右侧添加商品加入购物车结账")])])]):e._e()],2)]),s("div",{staticClass:"flex-g-0 fon_16 dBHeight"},[s("div",{staticClass:"mar_r20"},[s("div",{staticClass:"flex flex-x-end bor_t_de4 dibuMoney mar_t5"},[s("div",{staticClass:"mar_l10 fon_14 wei color_6"},[e._v("应收:"),s("span",{},[e._v("¥"+e._s(e.detail&&e.detail.costPrice))]),e._v("元")])]),s("div",{staticClass:"flex flex-x-end mar_t5"},[s("div",{directives:[{name:"show",rawName:"v-show",value:"2"==e.isOut,expression:"isOut=='2'"}],staticClass:"fon_14 wei color_6 mar_r10"},[e._v("包装费:"),s("span",{staticClass:"fon_26 color_eR wei"},[e._v(e._s(e.boxMoney))]),e._v("元")]),s("div",{staticClass:"fon_14 wei color_6"},[e._v("优惠:"),s("span",{staticClass:"fon_26 color_eR wei"},[e._v(e._s(e.detail&&e.detail.discount))]),e._v("元")])]),s("div",{staticClass:"flex flex-x-end dibuMoney mar_t5"},[s("div",{staticClass:"mar_t5 fon_14 wei color_6"},[e._v("数量:"),s("span",{},[e._v(e._s(e.carCount))]),e._v("件")]),s("div",{staticClass:"mar_l10 fon_14 wei color_6"},[e._v("实收:"),s("span",{staticClass:"fon_26 color_eR wei"},[e._v("¥"+e._s(e.detail&&e.detail.money))]),e._v("元")])])]),s("div",{staticClass:"flex-bet pad_10 dbbutton"},[s("div",{staticClass:"xj_btn"},[s("el-button",{class:{noGood1:e.goodList.length<=0},attrs:{type:"danger",plain:""},on:{click:function(t){return e.delLine(2)}}},[e._v("整单取消")])],1),s("div",{staticClass:"sk_btn"},[s("el-button",{class:{noGood:e.goodList.length<=0},attrs:{type:"primary"},on:{click:function(t){return e.handleEdit(e.carMoney,e.outTradeNo)}}},[e._v("收款¥"+e._s(e.carMoney))])],1)])]),s("Collection",{ref:"collection"}),s("edit",{ref:"edit",on:{initMethod:e.collectionClick}})],1)},o=[],c=r("5530"),l=r("6fdd"),d=r("2f62"),u=r("89dc"),f=r("c935"),m={computed:Object(c["a"])(Object(c["a"])({},Object(d["c"])(["goodList","carMoney","carCount","outTradeNo","userData","currCarIetm","vipUserId","vipUserIcon","vipUserTel","SateIsOut","boxMoney","detail","cashierInfo"])),{},{isOut:{get:function(){return this.SateIsOut},set:function(e){sessionStorage.setItem("setIsOut",e),this.setIsOut(e)}}}),watch:{},created:function(){this.getCarList()},components:{Collection:u["a"],Edit:f["a"]},name:"about",data:function(){return{searchInput:"",num:"",goodsListHover:0,goodsList:[],showVipInfo:""}},methods:Object(c["a"])(Object(c["a"])({},Object(d["b"])(["setGoodList","setCurrCarIetm","setIsOut"])),{},{clickGoodsList:function(e,t){this.goodsListHover=t,this.setCurrCarIetm(e)},handleEdit:function(e,t){var r=this;this.goodList.length&&(2==this.cashierInfo.vipTips||this.vipUserId?this.$refs["collection"].showEdit(e,t):this.$baseConfirm2("订单未绑定会员,是否需要绑定会员进行结算?",null,"会员登录","跳过",Object(i["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:r.$refs["edit"].showEdit(),r.$refs["edit"].showGoBtn("1");case 2:case"end":return e.stop()}}),e)}))),Object(i["a"])(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:r.$refs["collection"].showEdit(e,t);case 1:case"end":return s.stop()}}),s)})))))},collectionClick:function(){this.$refs["collection"].showEdit(this.carMoney,this.outTradeNo)},setGoodNum:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){var s;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return s={num:e.num,id:e.id,price:e.price,storeId:t.userData.storeId},r.next=3,Object(l["k"])(s).then((function(){t.getCarList()})).catch((function(){t.getCarList()}));case 3:case"end":return r.stop()}}),r)})))()},getCarList:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r={storeId:e.userData.storeId,operatorId:"",isOut:e.SateIsOut},t.next=3,Object(l["c"])(r);case 3:s=t.sent,e.setGoodList(s),s.data&&e.setCurrCarIetm(s.data[0]);case 6:case"end":return t.stop()}}),t)})))()},delLine:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:t.goodList.length&&t.$baseConfirm("您确定要取消此订单吗?",null,Object(i["a"])(regeneratorRuntime.mark((function r(){var s,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return s={id:t.currCarIetm.id,type:e,storeId:t.userData.storeId},r.next=3,Object(l["b"])(s);case 3:a=r.sent,t.getCarList(a);case 5:case"end":return r.stop()}}),r)}))));case 1:case"end":return r.stop()}}),r)})))()},TypeIsout:function(e){sessionStorage.setItem("setIsOut",e),this.setIsOut(e),this.goodList.length&&this.getCarList()}})},p=m,v=(r("743e"),r("0c7c")),h=Object(v["a"])(p,n,o,!1,null,null,null),b=h.exports,_=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"heighthv bor_rad5"},[r("div",{staticClass:"tooltip heighthv bor_rad5"},[r("div",[r("el-button",{attrs:{type:"primary",plain:""},on:{click:e.editvip}},[e._v("查询会员")])],1),r("div",{staticClass:"mar_t30"},[r("el-button",{attrs:{type:"primary",plain:""},on:{click:e.setGoodPrice}},[e._v("商品改价")])],1),r("div",{staticClass:"mar_t30"},[r("el-button",{attrs:{type:"primary",plain:""},on:{click:function(t){return e.delLine(1)}}},[e._v("商品删行")])],1),r("div",{staticClass:"mar_t30"},[r("el-button",{attrs:{type:"primary",plain:""},on:{click:function(t){return e.delLine(2)}}},[e._v("整单取消")])],1),r("div",{staticClass:"mar_t30"},[e.orderCount>0?r("el-badge",{staticClass:"item",attrs:{value:e.orderCount}},[r("el-button",{attrs:{type:"primary",plain:""},on:{click:e.takeOrder}},[e._v("取单")])],1):r("el-button",{attrs:{type:"primary",plain:""}},[e._v("取单")])],1),r("div",{staticClass:"mar_t30"},[r("el-button",{attrs:{type:"primary",plain:""},on:{click:e.putOrder}},[e._v("挂单")])],1),r("div",{staticClass:"mar_t30"},[r("el-button",{attrs:{type:"primary",plain:""},on:{click:e.changeMoney}},[e._v("折扣/抹零")])],1),r("edit",{ref:"edit"}),r("editGoodPrice",{ref:"editgoodprice"}),r("editTakeOrder",{ref:"editTakeOrder"})],1),r("el-dialog",{staticClass:"tishidialog2",attrs:{title:"折扣抹零",visible:e.dialogTableVisible3,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(t){e.dialogTableVisible3=t}}},[r("div",{staticClass:"t_c"},[r("el-form",{ref:"form3",attrs:{model:e.form3,"label-width":"90px"}},[r("el-form-item",{attrs:{label:"原价"}},[r("div",{staticClass:"t_l color-green wei fon_24"},[e._v(e._s(e.detail&&e.detail.costPrice))])]),r("el-form-item",{attrs:{label:"优惠类型"}},[r("div",{staticClass:"t_l"},[r("el-radio-group",{model:{value:e.form3.type,callback:function(t){e.$set(e.form3,"type",t)},expression:"form3.type"}},[r("el-radio",{attrs:{label:"1"}},[e._v("改价")]),r("el-radio",{attrs:{label:"2"}},[e._v("折扣")]),r("el-radio",{attrs:{label:"3"}},[e._v("抹零")])],1)],1)]),"1"==e.form3.type?r("el-form-item",{staticClass:"flex",attrs:{label:"实付价格",prop:"price"}},[r("el-input",{staticClass:"mar_l5",attrs:{placeholder:"请输入实付价格",min:0},model:{value:e.form3.price,callback:function(t){e.$set(e.form3,"price",t)},expression:"form3.price"}},[r("template",{slot:"append"},[e._v("元")])],2)],1):e._e(),"2"==e.form3.type?r("el-form-item",{staticClass:"flex",attrs:{label:"优惠折扣"}},[r("div",{staticClass:"flex"},[r("el-input-number",{attrs:{precision:2,"controls-position":"right",min:1,max:99999999},model:{value:e.form3.money,callback:function(t){e.$set(e.form3,"money",t)},expression:"form3.money"}}),r("span",{staticClass:"mar_l10"},[e._v("折")])],1)]):e._e(),"3"==e.form3.type?r("el-form-item",{staticClass:"flex",attrs:{label:"抹零方式"}},[r("el-radio-group",{model:{value:e.form3.discountType,callback:function(t){e.$set(e.form3,"discountType",t)},expression:"form3.discountType"}},[r("el-radio",{attrs:{label:1}},[e._v("抹分")]),r("el-radio",{attrs:{label:2}},[e._v("抹角")]),r("el-radio",{attrs:{label:3}},[e._v("四舍五入到角")]),r("el-radio",{attrs:{label:4}},[e._v("四舍五入到元")])],1)],1):e._e()],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{size:"medium"},on:{click:function(t){e.dialogTableVisible3=!1}}},[e._v("取 消")]),r("el-button",{attrs:{size:"medium",type:"primary"},on:{click:e.foem3save}},[e._v("确 定")])],1)])],1)},g=[],C=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{},[r("el-dialog",{attrs:{title:e.title,visible:e.dialogFormVisible,width:"700px","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.close}},[r("div",{staticClass:"editgoodprice"},[r("el-form",{ref:"form",staticClass:"mar_t20 t_l priceck",attrs:{model:e.form,"label-width":"180"}},[r("el-form-item",{attrs:{label:"当前价格:"}},[r("div",{staticClass:"fon_18 wei subjectcolor4"},[e._v(e._s(e.dqPrice))])]),r("el-form-item",{staticClass:"flex",attrs:{label:"本次售价:",prop:"price",required:""}},[r("el-input",{staticClass:"inputVip",attrs:{placeholder:"请输入本次售价"},model:{value:e.form.price,callback:function(t){e.$set(e.form,"price",t)},expression:"form.price"}},[r("template",{slot:"append"},[e._v("元")])],2)],1)],1),r("div",[r("keyboard",{on:{confirmEvent:e._confirmEvent,queding:e.save}})],1)],1)])],1)},x=[],w=r("a685"),I={computed:Object(c["a"])({},Object(d["c"])(["currCarIetm","userData"])),components:{keyboard:w["a"]},name:"editvip",created:function(){},data:function(){return{form:{storeId:"",price:""},dqPrice:"",dqId:"",input1:"",title:"",dialogFormVisible:!1}},methods:Object(c["a"])(Object(c["a"])({},Object(d["b"])(["setGoodList"])),{},{showEdit:function(e){e?(this.title="会员详情",this.form=Object.assign({},e)):(this.title="修改价格",this.dqPrice=this.currCarIetm.money,this.dqId=this.currCarIetm.id),this.dialogFormVisible=!0},close:function(){this.dialogFormVisible=!1},_confirmEvent:function(e){this.form.price=e},save:function(){var e=this;this.$refs["form"].validate(function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(r){var s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=8;break}return s={id:e.dqId,price:e.form.price,storeId:e.userData.storeId},t.next=4,Object(l["k"])(s);case 4:e.getCarList(),e.close(),t.next=9;break;case 8:return t.abrupt("return",!1);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},getCarList:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r={storeId:e.userData.storeId,operatorId:""},t.next=3,Object(l["c"])(r);case 3:s=t.sent,e.setGoodList(s);case 5:case"end":return t.stop()}}),t)})))()}})},k=I,O=(r("ef53"),Object(v["a"])(k,C,x,!1,null,null,null)),y=O.exports,j=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"editTake"},[r("el-dialog",{attrs:{title:e.title,visible:e.dialogFormVisible,width:"1000px","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.close}},[r("div",{staticClass:"takeorderlist"},[r("el-scrollbar",{staticClass:"heighthv"},[r("div",{staticClass:"list_wrap"},e._l(e.takeOrderLists,(function(t,s){return r("div",{key:s,staticClass:"pad_20 t_l listBody bor_rad10"},[r("div",{staticClass:"wei fon_16"},[e._v("订单总价:"),r("span",{staticClass:"color-red"},[e._v("¥"+e._s(t.money))])]),r("div",{staticClass:"fon_12 color_9"},[e._v("挂单时间:"),r("span",{staticClass:"color_9"},[e._v(e._s(t.createdAt))])]),r("div",{staticClass:"wid flex mar_t10 flex-wrap rel goodbox"},e._l(e.takeOrderLists[s].goodsData,(function(t,s){return r("div",{key:s,staticClass:"wid25 ba_f8 pad_10 mar_r10 mar_b10",staticStyle:{width:"150px"}},[r("div",{staticClass:"overflowlnr color_3"},[e._v(e._s(t.name))]),r("div",{staticClass:"flex-bet color_9"},[r("div",{},[e._v("¥"+e._s(t.money))]),r("div",{},[e._v("x"+e._s(t.num))])])])})),0),r("div",{staticClass:"flex-bet mar_t10"},[r("div"),r("div",[r("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(r){return e.takeOrder(t,2)}}},[e._v("删除")]),r("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(r){return e.takeOrder(t,1)}}},[e._v("取单")])],1)])])})),0)])],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{size:"medium"},on:{click:e.close}},[e._v("取 消")]),r("el-button",{attrs:{size:"medium",type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)])],1)},L=[],R={computed:Object(c["a"])({},Object(d["c"])(["userData"])),name:"takeorder",created:function(){},data:function(){return{form:{storeId:"",phone:""},input1:"",title:"",takeOrderLists:[],dialogFormVisible:!1}},methods:Object(c["a"])(Object(c["a"])({},Object(d["b"])(["setGoodList","setCurrCarIetm"])),{},{showEdit:function(e){e?(this.title="挂单列表",this.form=Object.assign({},e)):(this.title="挂单列表",this.takeOrderList()),this.dialogFormVisible=!0},takeOrderList:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(l["m"])({storeId:e.userData.storeId});case 2:r=t.sent,s=r.data,e.takeOrderLists=s;case 5:case"end":return t.stop()}}),t)})))()},takeOrder:function(e,t){var r=this;return Object(i["a"])(regeneratorRuntime.mark((function s(){var a;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:if("2"!=t){s.next=4;break}r.$baseConfirm("您确定要删除此订单吗?",null,Object(i["a"])(regeneratorRuntime.mark((function s(){var a;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return a={outTradeNo:e.outTradeNo,orderId:e.orderId,type:t,storeId:r.userData.storeId},s.next=3,Object(l["l"])(a);case 3:s.sent,r.getCarList(),r.close();case 6:case"end":return s.stop()}}),s)})))),s.next=11;break;case 4:if("1"!=t){s.next=11;break}return a={outTradeNo:e.outTradeNo,orderId:e.orderId,type:t,storeId:r.userData.storeId},s.next=8,Object(l["l"])(a);case 8:s.sent,r.getCarList(),r.close();case 11:case"end":return s.stop()}}),s)})))()},getCarList:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r={storeId:e.userData.storeId,operatorId:""},t.next=3,Object(l["c"])(r);case 3:s=t.sent,e.setGoodList(s),s.data&&e.setCurrCarIetm(s.data[0]);case 6:case"end":return t.stop()}}),t)})))()},close:function(){this.dialogFormVisible=!1},_confirmEvent:function(e){this.form.phone=e},save:function(){var e=this;this.$refs["form"].validate(function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(r){var s,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=10;break}return e.form.storeId=e.userData.storeId,t.next=4,Object(l["g"])(e.form);case 4:s=t.sent,a=s.msg,e.$baseMessage(a,"success"),e.close(),t.next=11;break;case 10:return t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}})},D=R,T=(r("f784"),Object(v["a"])(D,j,L,!1,null,null,null)),$=T.exports,E=r("294d"),H={components:{Edit:f["a"],editTakeOrder:$,editGoodPrice:y},computed:Object(c["a"])({},Object(d["c"])(["currCarIetm","goodList","userData","vipUserId","orderCount","cashierInfo","detail"])),name:"cashierTool",data:function(){return{carList:[],form3:{type:"1",money:"",orderId:"",discountType:1},dialogTableVisible3:!1}},methods:Object(c["a"])(Object(c["a"])({},Object(d["b"])(["setGoodList","setCurrCarIetm"])),{},{editvip:function(){this.vipUserId?this.$refs["edit"].showEdit(this.vipUserId):this.$refs["edit"].showEdit()},setGoodPrice:function(){this.getCarList(),this.goodList.length&&this.$refs["editgoodprice"].showEdit()},putOrder:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(e.goodList),!e.goodList.length){t.next=8;break}return t.next=4,Object(l["i"])({storeId:e.userData.storeId});case 4:r=t.sent,s=r.msg,e.$baseMessage(s,"success"),e.getCarList();case 8:case"end":return t.stop()}}),t)})))()},changeMoney:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:console.log(123,e.goodList.length),e.goodList.length&&(e.dialogTableVisible3=!0,e.$set(e.form3,"price",e.detail.money));case 2:case"end":return t.stop()}}),t)})))()},foem3save:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,s,a,i,n,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if("1"!=e.form3.type){t.next=18;break}if(!e.form3.price){t.next=15;break}if(!(+e.form3.price>+e.detail.costPrice)){t.next=6;break}e.$baseMessage("修改价格应小于原价","error"),t.next=13;break;case 6:return t.next=8,Object(E["b"])({storeId:e.userData.storeId,type:"changePrice",money:e.form3.price});case 8:r=t.sent,s=r.msg,e.$baseMessage(s,"success"),e.getCarList(),e.dialogTableVisible3=!1;case 13:t.next=16;break;case 15:e.$baseMessage("请输入修改价格","error");case 16:t.next=40;break;case 18:if("2"!=e.form3.type){t.next=32;break}if(!e.form3.money){t.next=29;break}return t.next=22,Object(E["b"])({storeId:e.userData.storeId,type:"discount",fracture:e.form3.money});case 22:a=t.sent,i=a.msg,e.$baseMessage(i,"success"),e.getCarList(),e.dialogTableVisible3=!1,t.next=30;break;case 29:e.$baseMessage("请输入折扣","error");case 30:t.next=40;break;case 32:if("3"!=e.form3.type){t.next=40;break}return t.next=35,Object(E["b"])({storeId:e.userData.storeId,type:"goZero",discountType:e.form3.discountType});case 35:n=t.sent,o=n.msg,e.$baseMessage(o,"success"),e.getCarList(),e.dialogTableVisible3=!1;case 40:case"end":return t.stop()}}),t)})))()},takeOrder:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs["editTakeOrder"].showEdit();case 1:case"end":return t.stop()}}),t)})))()},delLine:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:"2"==e?t.$baseConfirm("您确定要取消此订单吗?",null,Object(i["a"])(regeneratorRuntime.mark((function r(){var s,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return s={id:t.currCarIetm.id,type:e,storeId:t.userData.storeId},r.next=3,Object(l["b"])(s);case 3:a=r.sent,t.getCarList(a);case 5:case"end":return r.stop()}}),r)})))):"1"==e&&t.$baseConfirm("您确定要全部删除此商品吗?",null,Object(i["a"])(regeneratorRuntime.mark((function r(){var s,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return s={id:t.currCarIetm.id,type:e,storeId:t.userData.storeId},r.next=3,Object(l["b"])(s);case 3:a=r.sent,t.getCarList(a);case 5:case"end":return r.stop()}}),r)}))));case 1:case"end":return r.stop()}}),r)})))()},getCarList:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r={storeId:e.userData.storeId,operatorId:""},t.next=3,Object(l["c"])(r);case 3:s=t.sent,e.setGoodList(s),s.data&&e.setCurrCarIetm(s.data[0]),e.carList=s.data;case 7:case"end":return t.stop()}}),t)})))()}})},G=H,S=(r("5770"),r("92d1"),Object(v["a"])(G,_,g,!1,null,"6e27a5de",null)),V=S.exports,M=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"flex-bet heighthv wid cashierRight"},[s("el-scrollbar",{staticClass:"flex-g-1 heighthv"},[s("div",{staticClass:"mar_r20 pad_tb_20"},[s("el-input",{attrs:{placeholder:"请输入商品名称搜索","prefix-icon":"el-icon-search"},on:{input:e.serachGoods},model:{value:e.searchgoods,callback:function(t){e.searchgoods=t},expression:"searchgoods"}})],1),s("div",{staticClass:"flex-g-1 flex-wrap flex-y-top heighthv goos_wrap curs"},e._l(e.goods,(function(t,r){return s("div",{key:r,staticClass:"bor_rad5 ba_f pad_10 mar_r10 t_l goods",on:{click:function(r){return e.handleEdit(t)}}},[s("div",{staticClass:"flex-center"},[s("el-image",{staticClass:"goodimg",attrs:{src:t.icon,fit:"cover"}})],1),s("div",{staticClass:"fon_16 mar_t5 overflowlnr",attrs:{title:t.name}},[e._v(e._s(t.name))]),s("div",{staticClass:"color_9 mar_t10 fon_14 price_color flex-bet"},[s("div",[e._v("¥"+e._s(t.price))]),s("div",{staticClass:"color_9"},[e._v(e._s(t.stock))])])])})),0),e.goods.length<=0?s("div",{staticClass:"goods_blank heighthv flex-center"},[s("div",{staticClass:"fon_16 heighthv"},[s("img",{staticStyle:{width:"200px",height:"200px"},attrs:{src:r("2b5e"),alt:""}}),s("p",{staticClass:"color_9 mar_t10"},[e._v("你的商品库还是空的")])])]):e._e()]),s("el-scrollbar",{staticClass:"flex-g-0 heighthv ct_scrollbar bor_rad20"},[s("div",{staticClass:"flex-g-0 heighthv ba_f bor_rad20 ct_wrap fon_16"},e._l(e.goodsType,(function(t,r){return s("div",{key:r,staticClass:"ct pad_20 curs",class:{ct_is_active:r==e.typeHover},on:{click:function(s){return e.selectType(t,r)}}},[e._v(" "+e._s(t.name)+" ")])})),0)]),s("edit",{ref:"edit"})],1)},N=[],F=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"editgoodswoapr"},[s("el-dialog",{attrs:{title:e.title,visible:e.dialogFormVisible,width:"700px","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.close}},[s("div",{staticClass:"editgoods"},[s("div",{staticClass:"flex-bet"},[s("div",{staticClass:"flex-g-0"},[s("div",{staticClass:"flex-center"},[s("el-image",{staticClass:"editgoodimg border",attrs:{src:e.form.icon?e.form.icon:""+r("21a2"),fit:"cover"}})],1)]),s("div",{staticClass:"flex-g-1 t_l pad_20"},[s("div",{},[s("div",{staticClass:"fon_18 wei color_3"},[e._v(e._s(e.form.name))]),s("div",[e._v("单价:¥"+e._s(e.form.price)),s("span",{staticClass:"mar_l20"},[e._v("单位:"+e._s(e.form.unit))])])])])]),e.specData.length?s("div",{staticClass:"mar_t20"},[s("p",{staticClass:"t_l mar_b10 wei"},[e._v("规格")]),s("div",{staticClass:"flex flex-wrap"},e._l(e.specData,(function(t,r){return s("div",{key:r,staticClass:"specs bor_rad5 overflowlnr",class:{specs_hover:r==e.specsHover},on:{click:function(s){return e.clickSpecs(t,r)}}},[e._v(" "+e._s(t.specsName)+"¥"+e._s(t.SalesPrice)+" ")])})),0)]):e._e(),e.attributeHoverShow?e._l(e.attributeData,(function(t,r){return s("div",{key:r},[s("p",{staticClass:"t_l mar_b10"},[e._v(e._s(t.attrName))]),s("div",{staticClass:"flex flex-wrap"},[e._l(t.attrStr,(function(r,a){return[s("div",{directives:[{name:"show",rawName:"v-show",value:r.name,expression:"itemValue.name"}],key:a,staticClass:"specs bor_rad5 overflowlnr",class:{specs_hover:e.valib(t.id,r.a)},on:{click:function(s){return e.clickAttribute(r.a,t.id,r.name)}}},[e._v(" "+e._s(r.name)+" ")])]}))],2)])})):e._e(),e.feedingData.length?s("div",{staticClass:"mar_t20"},[s("p",{staticClass:"t_l mar_b10 wei"},[e._v("加料")]),s("div",{staticClass:"flex flex-wrap"},e._l(e.feedingData,(function(t,r){return s("div",{key:r,staticClass:"specs bor_rad5 overflowlnr ",class:t.isSelected?"specs_hover":"",on:{click:function(s){return e.clickFeeding(t,r)}}},[e._v(e._s(t.materialName)+"¥"+e._s(t.SalesPrice)+" ")])})),0)]):e._e()],2),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{size:"medium"},on:{click:e.close}},[e._v("取 消")]),s("el-button",{attrs:{size:"medium",type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)])],1)},P=[],U=(r("4de4"),r("4160"),r("a630"),r("c975"),r("b0c0"),r("d3b7"),r("6062"),r("3ca3"),r("159b"),r("ddb0"),{computed:Object(c["a"])({},Object(d["c"])(["userData","vipUserId"])),name:"editgoods",created:function(){},data:function(){return{form:{id:"",name:"",sort:"1",color:"#ed4014"},specsHover:0,attributeHover:{},attributeHoverShow:!0,feedingHover:0,specData:[],attributeData:[],feedingData:[],groupId:"",material:[],materialId:[],title:"",dialogFormVisible:!1}},components:{},methods:Object(c["a"])(Object(c["a"])({},Object(d["b"])(["setGoodList","setCurrCarIetm"])),{},{valib:function(e,t){return!!this.attributeHover[e]&&this.attributeHover[e].id==t},showEdit:function(e){var t=this;if(e){if(this.title="商品详情",this.specData=e.specsData,this.attributeData=e.attrData,this.feedingData=e.meterialData,this.specData)for(var r=0;r<this.specData.length;r++)r==this.specsHover&&(this.groupId=this.specData[r].id);this.feedingData&&this.feedingData.forEach((function(e){t.$set(e,"isSelected",!1)})),this.attributeData&&this.attributeData.forEach((function(e){e.attrStr.forEach((function(t,r){t.a=r+e.id}))})),this.attributeHover={}}else this.title="选择做法";this.dialogFormVisible=!0},goodInfo:function(e){this.form=Object.assign({},e)},close:function(){this.dialogFormVisible=!1},clickSpecs:function(e,t){this.specsHover=t,this.groupId=e.id},clickAttribute:function(e,t,r){this.attributeHoverShow=!1,this.attributeHover[t]?this.attributeHover[t].id==e?delete this.attributeHover[t]:this.attributeHover[t].id=e:this.attributeHover[t]={id:e,name:r},this.attributeHoverShow=!0},clickFeeding:function(e,t){this.feedingHover=t,e.isSelected=!e.isSelected},unique:function(e){return Array.from(new Set(e))},save:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,s,a,i,n,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.feedingData)for(r=0;r<e.feedingData.length;r++)1==e.feedingData[r].isSelected&&e.materialId.push(e.feedingData[r].id);for(a in s=[],e.attributeHover)s.push(e.attributeHover[a].name);return i=e.materialId,e.materialId=e.materialId.filter((function(t){return-1===e.materialId.indexOf(t)})),n={operatorId:"",userId:e.vipUserId,storeId:e.userData.storeId,groupId:e.groupId,type:"1",goodsId:e.form.id,materialId:i,attribute:s},t.next=8,Object(l["a"])(n);case 8:o=t.sent,o.msg,e.getCarList(),e.close();case 12:case"end":return t.stop()}}),t)})))()},getCarList:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r={storeId:e.userData.storeId,operatorId:""},t.next=3,Object(l["c"])(r);case 3:s=t.sent,e.setGoodList(s),s.data&&e.setCurrCarIetm(s.data[0]);case 6:case"end":return t.stop()}}),t)})))()}})}),z=U,q=(r("f6d7"),Object(v["a"])(z,F,P,!1,null,null,null)),A=q.exports,B={computed:Object(c["a"])({},Object(d["c"])(["goodList","userData","vipUserId","SateIsOut"])),components:{Edit:A},name:"cashierRight",created:function(){this.getGoodsCategory()},data:function(){return{goods:[],goodsType:[],typeHover:"",page:{total:0,size:10,currentPage:1},type:1,typeId:"",searchgoods:""}},methods:Object(c["a"])(Object(c["a"])({},Object(d["b"])(["setGoodList","setCurrCarIetm"])),{},{fetchData:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,s,a,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r={page:e.page.currentPage,storeId:e.userData.storeId,userId:e.vipUserId,id:e.typeId,keyword:e.searchgoods},t.next=3,Object(l["d"])(r);case 3:s=t.sent,a=s.data,i=s.count,e.goods=a,e.page.total=i;case 8:case"end":return t.stop()}}),t)})))()},getGoodsCategory:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,s,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r={storeId:e.userData.storeId},t.next=3,Object(l["f"])(r);case 3:s=t.sent,a=s.data,e.goodsType=a||[],e.typeId=a?a[0].id:"",e.fetchData(),e.goodsType.unshift({id:"",name:"全部"}),a&&a.length>0&&(e.typeHover=1);case 10:case"end":return t.stop()}}),t)})))()},handleEdit:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){var s,a,i,n,o;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if("1"!=e.isSpecs&&"1"!=e.isMaterial){r.next=10;break}return console.log("多规格",e),r.next=4,Object(l["e"])({id:e.id,storeId:t.userData.storeId});case 4:s=r.sent,a=s.data,i=s.code,1==i&&(t.$refs["edit"].showEdit(a),t.$refs["edit"].goodInfo(e)),r.next=18;break;case 10:return console.log("单规格",e,t.goodList),n={operatorId:"",userId:t.vipUserId,storeId:t.userData.storeId,groupId:"",type:"1",goodsId:e.id},r.next=14,Object(l["a"])(n);case 14:o=r.sent,o.data,t.getCarList(),t.fetchData();case 18:case"end":return r.stop()}}),r)})))()},getGoodOper:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){var s,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(l["e"])({id:e,storeId:t.userData.storeId});case 2:s=r.sent,a=s.data,console.log(a);case 5:case"end":return r.stop()}}),r)})))()},getCarList:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r={storeId:e.userData.storeId,operatorId:"",isOut:e.SateIsOut},t.next=3,Object(l["c"])(r);case 3:s=t.sent,s.data&&e.setCurrCarIetm(s.data[0]),e.setGoodList(s);case 6:case"end":return t.stop()}}),t)})))()},selectType:function(e,t){this.typeHover=t,this.typeId=e.id,this.fetchData()},serachGoods:function(){this.fetchData()}})},J=B,Z=(r("d1fe"),Object(v["a"])(J,M,N,!1,null,null,null)),K=Z.exports,Q={name:"cashier",created:function(){return Object(i["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},components:{cashierLeft:b,cashierTool:V,cashierRigth:K},data:function(){return{}},methods:{}},W=Q,X=(r("4bbc"),Object(v["a"])(W,s,a,!1,null,"1a8b7d9d",null));t["default"]=X.exports},f6d7:function(e,t,r){"use strict";r("24ac")},f784:function(e,t,r){"use strict";r("5e9e")}}]);