(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["order-page-submit-tangshi-order-index"],{1276:function(e,t,i){var a=i("c86c");t=a(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 下方引入的为Tuniao UI的集成样式文件,为scss预处理器,其中包含了一些"tn-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * Tuniao UI自定义的css类名和scss变量,均以"tn-"开头,不会造成冲突,请放心使用 \n */\n/* 顶部背景 start */.top-bg[data-v-511c63e9]{position:absolute;left:0;top:0;width:100%;height:%?300?%;background:linear-gradient(180deg,#ffca28,#ffca28 50%,rgba(255,202,40,0));z-index:1}\n/* 顶部背景 end */.wrapper[data-v-511c63e9]{position:relative;margin-top:%?30?%;min-height:calc(100vh - %?50?%);padding:%?0?% %?30?%;padding-bottom:%?180?%;z-index:2}\n/* 自取类型 start */.order-type[data-v-511c63e9]{margin-top:%?20?%;width:100%;display:flex;align-items:center;justify-content:space-between}.order-type .btn[data-v-511c63e9]{width:calc(100% / 2 - %?10?%);border-radius:%?20?%;background-color:#fff;display:flex;align-items:center;justify-content:flex-start;position:relative;padding:%?10?%;border:%?4?% solid #fff}.order-type .btn.select[data-v-511c63e9]{border-color:var(--theme-bg-color)}.order-type .btn.noselect[data-v-511c63e9]{background-color:#b0b0b0!important;color:#fff!important;border:1px solid #b0b0b0!important;border-color:#fff}.order-type .selectIcon[data-v-511c63e9]{border-radius:0 %?20?% 0 %?10?%;position:absolute;top:%?-2?%;right:%?-2?%;font-size:%?28?%;font-weight:700;padding:%?10?%;background-color:var(--theme-bg-color)}\n/* 自取类型 end */\n/* 表单类型 start */.submit-item[data-v-511c63e9]{position:relative;width:100%;margin-top:%?20?%;border-radius:%?15?%;background-color:#fff;padding:%?20?% %?30?%}.submit-item .title[data-v-511c63e9]{width:%?120?%}.submit-item .content[data-v-511c63e9]{flex:1;padding:%?10?% %?0?%;margin-left:%?10?%}.submit-item .authorize[data-v-511c63e9]{color:var(--theme-bg-color);border:1px solid var(--theme-bg-color);border-radius:88px;font-size:%?25?%;background-color:#fff;height:%?50?%;line-height:%?50?%}\n/* 表单类型 end */\n/* 商品价格信息 start */.product-price-info[data-v-511c63e9]{padding:%?30?%;margin-top:%?20?%;width:100%;border-radius:%?15?%;background:#fff\n /* 商品信息 start */\n /* 商品信息 end */\n /* 价格信息 start */\n /* 价格信息 end */\n /* 桌台信息 start */\n /* 桌台信息 end */\n /* 总计价格 start */\n /* 总计价格 end */}.product-price-info .product-info[data-v-511c63e9]{border-radius:%?15?% %?15?% 0 0;background:#fff\n /* 商品列表 start */\n /* 商品列表 end */}.product-price-info .product-info .store-name[data-v-511c63e9]{font-size:%?30?%}.product-price-info .product-info .product-list .product-item[data-v-511c63e9]{margin-top:%?20?%;border-radius:%?8?%;padding:%?20?%;display:flex}.product-price-info .product-info .product-list .product-item .item-image[data-v-511c63e9]{width:%?120?%;height:%?120?%;border-radius:%?8?%}.product-price-info .product-info .product-list .product-item .item-info[data-v-511c63e9]{flex:1;padding-left:%?20?%}.product-price-info .product-info .product-list .product-item .item-info .top .title[data-v-511c63e9]{width:100%;font-size:%?32?%}.product-price-info .product-info .product-list .product-item .item-info .top .price[data-v-511c63e9]{font-size:%?32?%;font-weight:500}.product-price-info .product-info .product-list .product-item .item-info .spec[data-v-511c63e9]{font-size:%?22?%;color:#aaa;margin-top:%?4?%}.product-price-info .price-info[data-v-511c63e9]{width:100%;padding-bottom:%?30?%;background-color:#fff}.product-price-info .price-info .item[data-v-511c63e9]{width:100%;display:flex;align-items:center;justify-content:space-between;padding:%?10?% %?0?%}.product-price-info .price-info .item .price[data-v-511c63e9]{font-weight:700}.product-price-info .table-info[data-v-511c63e9]{width:100%;padding:%?30?%;background:radial-gradient(circle at top left,transparent %?20?%,#fff 0,#fff 100%) 0 0/51% 100% no-repeat,radial-gradient(circle at top right,transparent %?20?%,#fff 0,#fff 100%) 100% 0/51% 100% no-repeat}.product-price-info .table-info .item[data-v-511c63e9]{width:100%;display:flex;align-items:center;justify-content:space-between;padding:%?10?% %?0?%}.product-price-info .table-info .item .data .icon[data-v-511c63e9]{color:#080808}.product-price-info .total-price[data-v-511c63e9]{width:100%;display:flex;align-items:center;justify-content:space-between;padding-top:%?30?%;border-radius:%?0?% %?0?% %?15?% %?15?%;background-color:#fff;border-top:1px solid #eee}.product-price-info .total-price .data[data-v-511c63e9]{display:flex;align-items:flex-end;font-size:%?26?%}.product-price-info .total-price .data .sum[data-v-511c63e9],\n.product-price-info .total-price .data .discount[data-v-511c63e9],\n.product-price-info .total-price .data .paid[data-v-511c63e9]{margin-left:%?16?%}.product-price-info .total-price .data .paid[data-v-511c63e9]{font-size:%?38?%}\n/* 商品价格信息 end */\n/* 附加费用 start */.surcharge-fee[data-v-511c63e9]{width:100%;margin-top:%?30?%;padding:%?30?%;background-color:#fff;border-radius:%?15?%}.surcharge-fee .item[data-v-511c63e9]{width:100%;padding:%?20?% %?0?%;display:flex;align-items:center;justify-content:space-between}.surcharge-fee .item .data[data-v-511c63e9]{display:flex;align-items:center}.surcharge-fee .item .data .select[data-v-511c63e9]{margin-left:%?10?%;width:%?40?%;height:%?40?%;border-radius:50%}.surcharge-fee .item .data .select .icon[data-v-511c63e9]{margin-top:%?2?%}\n/* 附加费用 end */\n/* 手机号码 start */.mobile[data-v-511c63e9]{width:100%;margin-top:%?30?%}.mobile .title[data-v-511c63e9]{font-weight:700;font-size:%?32?%}.mobile .data[data-v-511c63e9]{width:100%;height:%?80?%;margin-top:%?10?%;background-color:#fff;border-radius:%?15?%;padding:%?20?%}.mobile .data .textarea[data-v-511c63e9],\n.mobile .data .show-data[data-v-511c63e9]{width:100%;height:100%;padding:%?0?%}\n/* 手机号码 end */\n/* 备注 start */.note[data-v-511c63e9]{width:100%;margin-top:%?30?%}.note .title[data-v-511c63e9]{font-weight:700;font-size:%?32?%}.note .data[data-v-511c63e9]{width:100%;height:%?200?%;margin-top:%?10?%;background-color:#fff;border-radius:%?15?%;padding:%?20?%}.note .data .textarea[data-v-511c63e9],\n.note .data .show-data[data-v-511c63e9]{width:100%;height:100%;padding:%?0?%}\n/* 备注 end */\n/* 结算/提交订单操作栏 start */.settle-bar[data-v-511c63e9]{position:fixed;left:%?0?%;bottom:%?0?%;width:100%;background-color:#fff;display:flex;align-items:center;justify-content:space-between;z-index:999;transition:bottom ease .25s}.settle-bar.hidden[data-v-511c63e9]{bottom:%?-140?%}.settle-bar .price-info[data-v-511c63e9]{text-align:center;flex:1;padding:%?30?% %?50?%;margin:%?20?%;font-size:%?32?%;border-radius:88px;border:1px solid var(--theme-general-color);color:var(--theme-general-color)}.settle-bar .submit-btn[data-v-511c63e9]{text-align:center;flex:1;padding:%?30?% %?50?%;margin:%?20?%;font-size:%?32?%;border-radius:88px}\n/* 结算/提交订单操作栏 end */.goods_tab[data-v-511c63e9]{width:80%;height:%?80?%;position:relative;left:0;right:0;margin:auto;display:flex;justify-content:space-between;background-color:#f8f6f9;border-radius:%?50?%;margin-top:%?20?%}.goods_tab .goods_tab_item[data-v-511c63e9]{height:100%;text-align:center;width:25%;line-height:%?80?%;border-radius:%?50?%;flex:1}.goods_tab .active[data-v-511c63e9]{background-color:#ffca28;color:#000}.is-show-table-goods[data-v-511c63e9]{background-color:#f8f8f8;padding:%?20?%;display:flex;align-items:center;cursor:pointer;border-radius:8px;margin-bottom:%?16?%}.batchBtn[data-v-511c63e9]{display:flex;align-items:center;justify-content:space-between;color:#666}',""]),e.exports=t},"26bf":function(e,t,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.submitTangshiOrderApi=t.submitOrderApi=t.submitOneTouchOrderApi=t.getTuangouquanOrderAddApi=t.getTangshiOrderPreInfoApi=t.getTableShoppingCardApi=t.getRechargeFreChargeStatusApi=t.getOrderPreInfoApi=t.getOneTouchOrderPreInfoApi=t.getIngOrderApi=t.gemMealRedpacketBuildVirtual=t.addOrderApi=void 0;var o=a(i("7653"));t.gemMealRedpacketBuildVirtual=function(e){return o.default.get("api/user.mealRedpacket.meal_redpacket/mealRedpacket_build_virtual?sid="+e)};t.getOrderPreInfoApi=function(e){var t=e.sid,i=e.extra,a=e.fromzhitong,n=e.spellrice,r=e.addressId,s=e.spellrice_oid,d=e.spellrice_id,c=e.order_type,l=e.zitiType,u=e.is_api_shop,p=e.api_store_title,f=e.api_store_address,_=e.api_store_logo,v=e.storeCode,m=e.api_store_lat,h=e.api_store_lng,g=e.api_brand,b=e.table_id,y=e.predict_index,w=e.predictDayCn,x=e.use_tuangouquan_place_order_at_once_id,I=e.type,k=e.is_takeout;return o.default.post("api/user.order.orderCreate/index",{sid:t,extra:i||"",fromzhitong:a||0,spellrice:n||0,address_id:r||"",spellrice_oid:s||0,spellrice_id:d||0,order_type:c||1,zitiType:l||1,is_api_shop:u||"",api_store_title:p||"",api_store_address:f||"",api_store_logo:_||"",storeCode:v||"",api_store_lat:m||"",api_store_lng:h||"",api_brand:g||"",table_id:b||"",predict_index:y||0,predict_day_cn:w||"",type:I||"",use_tuangouquan_place_order_at_once_id:x||0,is_takeout:k>=0?k:-1})};t.getOneTouchOrderPreInfoApi=function(e){var t=e.sids,i=e.extra,a=e.fromzhitong,n=e.spellrice,r=e.addressId,s=e.spellrice_oid,d=e.spellrice_id,c=e.order_type,l=e.zitiType;return o.default.post("api/user.order.orderCreate/oneTouchIndex",{sids:t,extra:i||"",fromzhitong:a||0,spellrice:n||0,address_id:r||"",spellrice_oid:s||0,spellrice_id:d||0,order_type:c||1,zitiType:l||1})};t.submitOrderApi=function(e){var t=e.buy_add_mealredpacket_index,i=e.buy_mealredpacket,a=e.pre_mealredpacket_,n=e.buy_add_mealredpacket,r=e.pre_add_mealredpacket_,s=e.sid,d=e.note,c=e.fromzhitong,l=e.spellrice_oid,u=e.orderType,p=e.redpacketId,f=e.couponId,_=e.predictDayCn,v=e.predictIndex,m=e.addressId,h=e.memberChoice,g=e.zitiType,b=e.mobile,y=e.spellrice,w=e.spellrice_time,x=e.tuangouquan_id,I=e.cut_time_id,k=e.is_api_shop,C=e.api_store_title,S=e.api_store_address,P=e.api_store_logo,T=e.storeCode,A=e.api_store_lat,E=e.api_store_lng,z=e.api_brand,O=e.room_service_params,F=e.select_recharge_exemption_price,M=e.use_tuangouquan_place_order_at_once_id,B=e.type,D=e.is_clothes,N=e.send_address_id,U=e.imageSet,$=e.is_takeout;return o.default.post("api/user.order.orderCreate/submit",{buy_add_mealredpacket_index:t,buy_mealredpacket:i,pre_mealredpacket_:a,buy_add_mealredpacket:n,pre_add_mealredpacket_:r,sid:s,note:d||"",fromzhitong:c||"",spellrice_oid:l||0,order_type:u,redpacket_id:p||"",coupon_id:f||"",predict_day_cn:_||"",predict_index:v||0,address_id:m||"",type:B||"",member_choice:h||[],ziti_type:g||"",mobile:b||"",spellrice:y||0,spellrice_time:w||"",tuangouquan_id:x||0,cut_time_id:I||"",is_api_shop:k||"",api_store_title:C||"",api_store_address:S||"",api_store_logo:P||"",storeCode:T||"",api_store_lat:A||"",api_store_lng:E||"",api_brand:z||"",room_service_params:O||[],select_recharge_exemption_price:F||0,use_tuangouquan_place_order_at_once_id:M||0,is_clothes:D||0,send_address_id:N||0,imageSet:U||[],is_takeout:$>=0?$:-1})};t.submitOneTouchOrderApi=function(e){var t=e.buy_add_mealredpacket_index,i=e.buy_mealredpacket,a=e.pre_mealredpacket_,n=e.buy_add_mealredpacket,r=e.pre_add_mealredpacket_,s=e.sids,d=e.note,c=e.fromzhitong,l=e.spellrice_oid,u=e.orderType,p=e.predictDayCn,f=e.predictIndex,_=e.addressId,v=e.memberChoice,m=e.zitiType,h=e.mobile,g=e.spellrice,b=e.spellrice_time,y=e.coupons,w=e.redpackets,x=e.max_delivery_fee_sid;return o.default.post("api/user.order.orderCreate/oneTouchSubmit",{buy_add_mealredpacket_index:t,buy_mealredpacket:i,pre_mealredpacket_:a,buy_add_mealredpacket:n,pre_add_mealredpacket_:r,sids:s,note:d||"",fromzhitong:c||"",spellrice_oid:l||0,order_type:u,predict_day_cn:p||"",predict_index:f||0,address_id:_||"",member_choice:v||[],ziti_type:m||"",mobile:h||"",spellrice:g||0,spellrice_time:b||"",coupons:y||[],redpackets:w||[],max_delivery_fee_sid:x||0})};t.getTangshiOrderPreInfoApi=function(e){var t=e.sid,i=e.tableId;return o.default.post("api/user.store.table/create",{sid:t,table_id:i,coupon_id:0,redpacket_id:0,person_num:0,note:"",invoiceId:"invoiceId"})};t.getRechargeFreChargeStatusApi=function(e){var t=e.sid;return o.default.post("api/user.store.store/getRechargeFreChargeStatus",{sid:t})};t.submitTangshiOrderApi=function(e){var t=e.sid,i=e.tableId,a=e.couponId,n=e.redpacketId,r=e.personNum,s=e.note,d=e.isPindan,c=e.username,l=e.zitiType,u=e.mobile,p=e.tuangouquan_id;return o.default.post("api/user.store.table/submit",{sid:t,table_id:i,coupon_id:a||0,redpacket_id:n||0,person_num:r||0,note:s||"",invoiceId:"invoiceId",is_pindan:d||0,username:c||"",ziti_type:l,mobile:u||"",tuangouquan_id:p||0})};t.getTuangouquanOrderAddApi=function(e){var t=e.sid,i=e.id,a=e.num,n=e.finalPrice;return o.default.post("api/user.tuangouquan.order/submit",{sid:t,id:i,num:a||1,finalPrice:n})};t.getIngOrderApi=function(e){var t=e.sid,i=e.table_id;return o.default.post("api/user.store.table/getIngOrder",{sid:t,table_id:i})};t.addOrderApi=function(e){var t=e.sid,i=e.table_id;return o.default.post("api/user.store.table/addOrder",{sid:t,table_id:i})};t.getTableShoppingCardApi=function(e){return o.default.get("api/user.store.table/tableShoppingCard",e)}},3803:function(e,t,i){var a=i("1276");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var o=i("967d").default;o("194b80c8",a,!0,{sourceMap:!1,shadowMode:!1})},"420b":function(e,t,i){"use strict";i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return n})),i.d(t,"a",(function(){return a}));var a={loading:i("8c27").default},o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("custom-page",{attrs:{"custom-navbar":!0,"transparent-navbar":!0,"wrapper-bg-color":"#F3F2F7","navbar-title":"确认订单"}},[e.loadingShow?i("loading"):e._e(),i("v-uni-view",{staticClass:"wrapper",style:[{"--theme-bg-color":e.themeBgColor,"--theme-font-color":e.themeFontColor}]},[e.storeInfo.zitiStatus?i("v-uni-view",{staticClass:"order-type"},[i("v-uni-view",{staticClass:"btn tn-flex-center",class:[{select:1===e.zitiTypeIndex,noselect:1==e.storeInfo.selfpickup_type}],on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.switchInStoreModeEvent(1)}}},[i("v-uni-view",{staticStyle:{height:"88rpx",width:"88rpx",margin:"0 20rpx"}},[i("img",{staticStyle:{height:"88rpx",width:"88rpx"},attrs:{src:"http://qny.wdsp666.com/%E7%A6%8F%E8%A2%8B%E8%83%8C%E6%99%AF%E5%9B%BE/spshop/tangshi-2.png",alt:""}})]),i("v-uni-view",{staticStyle:{"flex-wrap":"1"}},[i("v-uni-view",{staticStyle:{"font-size":"30rpx"}},[e._v("堂食")]),i("v-uni-view",{staticStyle:{color:"#808080","font-size":"26rpx"}},[e._v("店内就餐")])],1),1===e.zitiTypeIndex?i("v-uni-view",{staticClass:"tn-icon-success selectIcon"}):e._e()],1),1==e.storeInfo.tangshi_setting.is_ziti?i("v-uni-view",{staticClass:"btn tn-flex-center",class:[{select:0===e.zitiTypeIndex,noselect:2==e.storeInfo.selfpickup_type}],on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.switchInStoreModeEvent(0)}}},[i("v-uni-view",{staticStyle:{height:"88rpx",width:"88rpx",margin:"0 20rpx",display:"flex","justify-content":"center","align-items":"center"}},[i("img",{staticStyle:{height:"60rpx",width:"60rpx"},attrs:{src:"http://qny.wdsp666.com/%E7%A6%8F%E8%A2%8B%E8%83%8C%E6%99%AF%E5%9B%BE/spshop/waimai-2.png",alt:""}})]),i("v-uni-view",{staticStyle:{"flex-wrap":"1"}},[i("v-uni-view",{staticStyle:{"font-size":"30rpx"}},[e._v("外带")]),i("v-uni-view",{staticStyle:{color:"#808080","font-size":"26rpx"}},[e._v("打包带走")])],1),0===e.zitiTypeIndex?i("v-uni-view",{staticClass:"tn-icon-success selectIcon"}):e._e()],1):e._e()],1):e._e(),i("v-uni-view",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"flex-end","margin-top":"20rpx"}},[i("v-uni-view",{staticStyle:{display:"flex","align-items":"center"}},[i("img",{staticStyle:{width:"47rpx",height:"47rpx",padding:"5rpx","background-color":"#fff","border-radius":"4px","margin-right":"10rpx"},attrs:{src:e.storeInfo.logo,alt:""}}),i("v-uni-view",{staticStyle:{"font-size":"30rpx",color:"#808080"}},[e._v(e._s(e.storeInfo.title))])],1),i("v-uni-view",{staticStyle:{display:"flex","align-items":"flex-end"}},[i("v-uni-view",[e._v("桌号:")]),i("v-uni-view",{staticStyle:{"font-size":"40rpx",color:"#ff0000","font-weight":"600"}},[e._v(e._s(e.storeInfo.table.title))])],1)],1),e.storeInfo.tangshi_setting.mobile_status?i("v-uni-view",{staticClass:"submit-item tn-flex-row-center"},[i("v-uni-view",{staticClass:"title"},[e._v("联系电话")]),i("v-uni-view",{staticClass:"content"},[i("v-uni-input",{staticClass:"input",staticStyle:{"font-size":"25rpx"},attrs:{placeholder:"请输入手机号,方便餐厅联系您"},model:{value:e.orderSubmitInfo.mobile,callback:function(t){e.$set(e.orderSubmitInfo,"mobile",t)},expression:"orderSubmitInfo.mobile"}})],1),i("v-uni-button",{staticClass:"authorize",attrs:{"open-type":"getPhoneNumber"},on:{getphonenumber:function(t){arguments[0]=t=e.$handleEvent(t),e.getPhoneNumberByWechat.apply(void 0,arguments)}}},[e._v("授权填写")])],1):e._e(),e.orderInfo&&e.orderInfo.products&&e.orderInfo.products.length>0?i("v-uni-view",{staticClass:"product-price-info"},[i("v-uni-view",{staticClass:"product-info"},[i("v-uni-view",{staticStyle:{color:"#666666","padding-bottom":"30rpx","border-bottom":"1px solid #EEEEEE"}},[e._v("本次加菜详情")]),e.is_add&&1!=e.goods_tab_item_activity_index?e._e():i("v-uni-view",{staticClass:"product-list"},e._l(e.orderInfo.products,(function(t,a){return i("v-uni-view",{key:a,staticClass:"product-item tn-color-black"},[i("v-uni-view",{staticClass:"item-image"},[i("v-uni-image",{staticClass:"image",attrs:{src:t.image,mode:"aspectFill"}})],1),i("v-uni-view",{staticClass:"item-info"},[i("v-uni-view",{staticClass:"top tn-flex-end-between"},[i("v-uni-view",{staticClass:"title tn-text-ellipsis-1"},[e._v(e._s(t.title))]),i("v-uni-view",{staticClass:"price tn-color-red"},[e._v(e._s(e.CurrencyUnit)+e._s(t.price))])],1),i("v-uni-view",{staticClass:"spec tn-text-ellipsis-1"},[e._v(e._s(t.spec))]),i("v-uni-view",{staticClass:"num"},[e._v("x"+e._s(t.num))])],1)],1)})),1)],1)],1):e._e(),e.tableBatch&&e.tableBatch.length>0?i("v-uni-view",{staticClass:"product-price-info"},[e.tableBatch&&e.tableBatch.length>0&&e.is_show_batch?i("v-uni-view",{staticClass:"product-info"},[i("v-uni-view",{staticStyle:{color:"#666666","padding-bottom":"30rpx","border-bottom":"1px solid #EEEEEE",display:"flex","align-items":"center","justify-content":"space-between"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openBatch.apply(void 0,arguments)}}},[i("v-uni-view",[e._v("已下单菜品")]),i("v-uni-view",[e._v("收起"),i("v-uni-text",{staticClass:"tn-icon-up"})],1)],1),i("v-uni-view",{staticClass:"product-list"},e._l(e.tableBatch,(function(t,a){return i("v-uni-view",{key:a,staticClass:"product-item",staticStyle:{"flex-direction":"column",padding:"20rpx 0"}},[i("v-uni-view",{staticClass:"is-show-table-goods"},[i("span",[e._v("第"+e._s(a+1)+"次下单菜品:")]),0==t.is_pay?i("span",{staticStyle:{color:"red"}},[e._v("未支付")]):e._e(),1==t.is_pay?i("span",{staticStyle:{color:"#00c600"}},[e._v("已支付")]):e._e(),2==t.is_pay?i("span",{staticStyle:{color:"#00c600"}},[e._v("已合并支付")]):e._e()]),e._l(t.goods,(function(t,a){return i("v-uni-view",{key:a,staticClass:"product-item tn-color-black tn-flex",staticStyle:{padding:"0"}},[i("v-uni-view",{staticClass:"item-image"},[i("v-uni-image",{staticClass:"image",attrs:{src:t.thumb,mode:"aspectFill"}})],1),i("v-uni-view",{staticClass:"item-info"},[i("v-uni-view",{staticClass:"top tn-flex-end-between"},[i("v-uni-view",{staticClass:"title tn-text-ellipsis-1"},[e._v(e._s(t.goods_title))]),i("v-uni-view",{staticClass:"price tn-color-red"},[e._v(e._s(e.CurrencyUnit)+e._s(t.goods_price))])],1),t.goods_options_title?i("v-uni-view",{staticClass:"spec tn-text-ellipsis-1"},[e._v(e._s(t.goods_options_title))]):e._e(),i("v-uni-view",{staticClass:"num"},[e._v("x"+e._s(t.goods_num))])],1)],1)}))],2)})),1)],1):e._e(),e.tableBatch&&e.tableBatch.length>0&&!e.is_show_batch?i("v-uni-view",{staticClass:"batchBtn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.openBatch.apply(void 0,arguments)}}},[i("v-uni-view",[e._v("已下单菜品")]),i("v-uni-view",[e._v("详情"),i("v-uni-text",{staticClass:"tn-icon-down"})],1)],1):e._e()],1):e._e(),e.orderInfo&&e.orderInfo.products&&e.orderInfo.products.length>0?i("v-uni-view",{staticClass:"product-price-info"},[i("v-uni-view",{staticClass:"price-info"},[i("v-uni-view",{staticClass:"item"},[i("v-uni-view",{staticClass:"title"},[e._v("服务费")]),i("v-uni-view",{staticClass:"price"},[e._v(e._s(e.CurrencyUnit)+e._s(e.formatPrice(e.orderInfo.serveFee)?e.formatPrice(e.orderInfo.serveFee):0))])],1),i("v-uni-view",{staticClass:"item"},[i("v-uni-view",{staticClass:"title"},[e._v("餐盒费")]),i("v-uni-view",{staticClass:"price"},[e._v(e._s(e.CurrencyUnit)+e._s(e.formatPrice(e.orderInfo.boxPrice)?e.formatPrice(e.orderInfo.boxPrice):0))])],1),i("v-uni-view",{staticClass:"item"},[i("v-uni-view",{staticClass:"title"},[e._v("打包费")]),i("v-uni-view",{staticClass:"price"},[e._v(e._s(e.CurrencyUnit)+e._s(e.formatPrice(e.orderInfo.packingPrice)?e.formatPrice(e.orderInfo.packingPrice):0))])],1),e.extraFee.length>0?e._l(e.extraFee,(function(t,a){return i("v-uni-view",{key:a,staticClass:"item"},[i("v-uni-view",{staticClass:"title"},[e._v("附加费("+e._s(t.title)+")")]),i("v-uni-view",{staticClass:"price"},[e._v(e._s(e.CurrencyUnit)+e._s(e.formatPrice(t.price)))])],1)})):e._e()],2),i("v-uni-view",{staticClass:"total-price"},[i("v-uni-view",{staticClass:"title"},[e._v("实付")]),i("v-uni-view",{staticClass:"data tn-color-gray"},[i("v-uni-view",{staticClass:"sum"},[e._v("合计"+e._s(e.CurrencyUnit)+e._s(e.totalFee))]),i("v-uni-view",{staticClass:"discount tn-color-red"},[e._v("已优惠"+e._s(e.CurrencyUnit)+e._s(e.formatPrice(e.orderInfo.discountFee)))]),i("v-uni-view",{staticClass:"paid tn-color-black"},[i("v-uni-text",{staticStyle:{"margin-left":"5rpx","font-size":"38rpx","font-weight":"bold"}},[e._v(e._s(e.CurrencyUnit)+e._s(e.finalFee))])],1)],1)],1)],1):e._e(),1==e.storeInfo.tangshi_setting.is_custom?i("v-uni-view",{staticClass:"mobile"},[i("v-uni-view",{staticClass:"title"},[e._v(e._s(e.storeInfo.tangshi_setting.custom_title))]),i("v-uni-view",{staticClass:"data"},[i("v-uni-input",{staticClass:"input",attrs:{placeholder:"请输入"},model:{value:e.orderSubmitInfo.custom_value,callback:function(t){e.$set(e.orderSubmitInfo,"custom_value",t)},expression:"orderSubmitInfo.custom_value"}})],1)],1):e._e(),1==e.storeInfo.tangshi_setting.order_note_show?i("v-uni-view",{staticClass:"note"},[i("v-uni-view",{staticClass:"title"},[e._v("备注")]),i("v-uni-view",{staticClass:"data"},[e.remarkInput?i("v-uni-textarea",{staticClass:"textarea",attrs:{focus:e.remarkFocus,placeholder:"请输入备注","placeholder-class":"tn-color-gray"},on:{blur:function(t){arguments[0]=t=e.$handleEvent(t),e.remarkTextareaBlurEvent.apply(void 0,arguments)}},model:{value:e.orderSubmitInfo.note,callback:function(t){e.$set(e.orderSubmitInfo,"note",t)},expression:"orderSubmitInfo.note"}}):i("v-uni-view",{staticClass:"show-data",class:[{"tn-color-gray":!e.orderInfo.note}],on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.startInputRemarkData.apply(void 0,arguments)}}},[e._v(e._s(e.orderInfo.note||"请输入备注"))])],1)],1):e._e()],1),i("v-uni-view",{staticClass:"settle-bar tn-safe-area-inset-bottom"},[i("v-uni-view",{staticClass:"price-info",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toBack.apply(void 0,arguments)}}},[e._v("继续点餐")]),e.orderInfo&&e.orderInfo.products&&e.orderInfo.products.length>0?i("v-uni-view",{staticClass:"submit-btn",class:[{"tn-bg-gray":!e.isSubmitOrder}],style:[e.themeBtnStyle],on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.submitOrder.apply(void 0,arguments)}}},[e._v("提交订单")]):i("v-uni-view",{staticClass:"submit-btn",class:[{"tn-bg-gray":!e.isSubmitOrder}],style:[e.themeBtnStyle],on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.submitOrder.apply(void 0,arguments)}}},[e._v("立即结算")])],1),i("pay-select-modal",{attrs:{"order-id":e.orderId,"order-type":"takeout"},on:{success:function(t){arguments[0]=t=e.$handleEvent(t),e.successPayEvent.apply(void 0,arguments)},fail:function(t){arguments[0]=t=e.$handleEvent(t),e.failPayEvent.apply(void 0,arguments)},cancel:function(t){arguments[0]=t=e.$handleEvent(t),e.cancelPayEvent.apply(void 0,arguments)}},model:{value:e.showSelectPayWayModal,callback:function(t){e.showSelectPayWayModal=t},expression:"showSelectPayWayModal"}})],1)},n=[]},"5dae":function(e,t,i){"use strict";var a=i("3803"),o=i.n(a);o.a},9897:function(e,t,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.getWxTemplateIdDataApi=t.getAlipayTemplateIdDataApi=void 0;var o=a(i("7653"));t.getWxTemplateIdDataApi=function(){return o.default.get("api/system.template.WxTemplate/templateList")};t.getAlipayTemplateIdDataApi=function(){return o.default.get("api/system.template.AliTemplate/templateList")}},"9a0a":function(e,t,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.wechatGetPhoneNumberApi=t.updateUserInfoApi=t.setContactApi=t.myAuthcode=t.getUserInfoApi=t.deleteAccountApi=t.currentCredit2Api=t.checkPwdSetApi=void 0;var o=a(i("7653"));t.getUserInfoApi=function(){return o.default.get("api/user.member.mine/index")};t.updateUserInfoApi=function(e){return o.default.post("api/user.member.account/completeInfo",e)};t.wechatGetPhoneNumberApi=function(e){return o.default.post("api/user.member.account/wechatGetPhoneNumber",e)};t.setContactApi=function(e){return o.default.post("api/user.member.mine/setContact",e)};t.deleteAccountApi=function(){return o.default.post("api/user.member.account/deleteAccount")};t.myAuthcode=function(e){return o.default.post("api/user.member.credit.credit_authcode/myAuthcode",e)};t.currentCredit2Api=function(e){return o.default.get("api/user.member.credit.credit_authcode/currentCredit2",e)};t.checkPwdSetApi=function(e){return o.default.post("api/user.member.account/checkPwdSet",e)}},"9c0a":function(e,t,i){"use strict";i.r(t);var a=i("420b"),o=i("bfc5");for(var n in o)["default"].indexOf(n)<0&&function(e){i.d(t,e,(function(){return o[e]}))}(n);i("5dae");var r=i("828b"),s=Object(r["a"])(o["default"],a["b"],a["c"],!1,null,"511c63e9",null,!1,a["a"],void 0);t["default"]=s.exports},ade3:function(e,t,i){"use strict";i("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.REFRESH_STORE_EVENT=void 0;t.REFRESH_STORE_EVENT="refresh_store"},bfc5:function(e,t,i){"use strict";i.r(t);var a=i("c891"),o=i.n(a);for(var n in a)["default"].indexOf(n)<0&&function(e){i.d(t,e,(function(){return a[e]}))}(n);t["default"]=o.a},c891:function(e,t,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("64aa"),i("c223"),i("fd3c"),i("473f"),i("bf0f"),i("8f71"),i("0c26");var o=a(i("dc1f")),n=a(i("34cae")),r=i("815c"),s=i("f9ce"),d=a(i("8c27")),c=i("9d0a"),l=i("419c"),u=a(i("cb6a")),p=i("ade3"),f=i("26bf"),_=i("9897"),v=i("9a0a"),m={components:{PaySelectModal:n.default,loading:d.default},mixins:[o.default],data:function(){return{optionsData:{sid:"",tableId:""},isLogin:!0,isLoadData:!1,zitiTypeIndex:0,remarkInput:!1,remarkFocus:!1,storeInfo:{title:"",logo:"",personNumStatus:0,mobileStatus:0,zitiStatus:0,table:{title:""},tangshi_setting:{}},orderInfo:{serveFee:0,packingPrice:0,boxPrice:0,totalFee:0,discountFee:0,finalFee:0,products:[]},extraFee:[],orderSubmitInfo:{personNum:0,note:"",isPindan:0,username:0,mobile:"",custom_value:""},showSelectPayWayModal:!1,orderId:0,isSubmit:!1,loadingShow:!1,is_finishMeal:!1,submit_text:"提交订单",goods_tab_item_activity_index:1,is_add:!1,has_placed_order_goods:[],has_placed_order:null,theme:uni.getStorageSync("theme")||"",openModal:!1,mobile:"",captcha:"",countDownTimer:null,countDownSecond:180,hasBind:0,isAuthPhone:0,mobileAuth:0,type:2,tableBatch:[],unpaid_amount:0,paid_amount:0,is_show_batch:!1}},computed:{isSubmitOrder:function(){return!0},totalFee:function(){var e=0;return 0==this.goods_tab_item_activity_index&&this.is_add?e=this.has_placed_order.total_fee:(e=this.orderInfo.totalFee,this.orderInfo.packingPrice&&1==this.storeInfo.tangshi_setting.is_ziti&&0==this.zitiTypeIndex&&(e+=this.orderInfo.packingPrice)),(0,r.formatPrice)(e)},finalFee:function(){var e=0;return 0==this.goods_tab_item_activity_index&&this.is_add?e=this.has_placed_order.final_fee:(e=this.orderInfo.finalFee,this.orderInfo.packingPrice&&1==this.storeInfo.tangshi_setting.is_ziti&&0==this.zitiTypeIndex&&(e+=this.orderInfo.packingPrice)),(0,r.formatPrice)(e)},computedStyle:function(){return 0===this.goods_tab_item_activity_index?"background-color: var(--theme-general-color);color: --general-color-text;":""},computedStyle2:function(){return 1===this.goods_tab_item_activity_index?"background-color: var(--theme-general-color);color: --general-color-text;":""}},watch:{goods_tab_item_activity_index:function(e){this.submit_text=0==e?"结算支付":"提交订单"}},onLoad:function(e){this.optionsData.sid=(null===e||void 0===e?void 0:e.sid)||"",this.optionsData.tableId=(null===e||void 0===e?void 0:e.table_id)||"",this.orderSubmitInfo.personNum=(null===e||void 0===e?void 0:e.personNum)||"",this.optionsData.sid&&this.optionsData.tableId?(this.getTableShoppingCard(),this.getPageData()):(0,c.showModal)({title:"提示",content:"缺少参数",callback:function(){(0,l.navBack)()}})},onShow:function(){var e=this;(0,s.checkUserIsLogin)().then((function(){e.isLogin&&!e.isLoadData||e.getPageData()})).catch((function(){(0,c.showToast)({title:"请先登录"})}))},methods:{getIngOrder:function(){var e=this;(0,f.getIngOrderApi)({sid:this.optionsData.sid,table_id:this.optionsData.tableId}).then((function(t){console.log("res",t),!1!==t.data&&(e.is_add=!0,e.has_placed_order=t,e.has_placed_order_goods=t.order_items),console.log("this.has_placed_order_goods",e.has_placed_order_goods)})).catch((function(e){console.error("[submit-order]获取订单预信息失败",e)}))},toBack:function(){(0,l.navBack)()},openBatch:function(){this.is_show_batch=!this.is_show_batch},getTableShoppingCard:function(){var e=this;(0,f.getTableShoppingCardApi)({sid:this.optionsData.sid,table_id:this.optionsData.tableId}).then((function(t){e.tableBatch=t.batch,e.unpaid_amount=Number(t.unpaid_amount),e.paid_amount=Number(t.paid_amount)}))},getPageData:function(){var e=this;this.loadingShow=!0,(0,f.getTangshiOrderPreInfoApi)({sid:this.optionsData.sid,tableId:this.optionsData.tableId}).then((function(t){var i,a,o,n,r,s,d,c;e.isLoadData=!0,console.log(t);var l=t.cart,u=t.order,p=t.store,f=t.table,_=t.tangshi_setting,v=t.is_finishMeal;e.storeInfo.title=p.title,e.storeInfo.logo=p.logo,e.storeInfo.personNumStatus=(null===p||void 0===p||null===(i=p.data)||void 0===i||null===(a=i.tangshi)||void 0===a?void 0:a.person_num_status)||0,e.storeInfo.mobileStatus=(null===p||void 0===p||null===(o=p.data)||void 0===o||null===(n=o.tangshi)||void 0===n?void 0:n.mobile_status)||0,e.storeInfo.zitiStatus=(null===p||void 0===p||null===(r=p.data)||void 0===r||null===(s=r.tangshi)||void 0===s?void 0:s.is_ziti)||0,e.is_finishMeal=v,e.is_finishMeal&&(e.submit_text="确认下单",e.getIngOrder()),console.log("store",p),e.storeInfo.selfpickup_type=p.selfpickup_type||0,2==e.storeInfo.selfpickup_type?e.zitiTypeIndex=1:1==e.storeInfo.selfpickup_type&&(e.zitiTypeIndex=0),e.storeInfo.table.title="".concat((null===f||void 0===f||null===(d=f.tablearea)||void 0===d?void 0:d.title)||"").concat((null===f||void 0===f?void 0:f.title)||""),e.orderInfo.serveFee=Number((null===u||void 0===u?void 0:u.serve_fee)||0),e.orderInfo.packingPrice=Number((null===u||void 0===u?void 0:u.packing_price)||0),e.orderInfo.boxPrice=Number((null===u||void 0===u?void 0:u.box_price)||0),e.orderInfo.totalFee=Number((null===u||void 0===u?void 0:u.total_fee)||0),e.orderInfo.discountFee=Number((null===u||void 0===u?void 0:u.discount_fee)||0),e.orderInfo.finalFee=Number((null===u||void 0===u?void 0:u.final_fee)||0),e.storeInfo.tangshi_setting=_||{},e.extraFee=((null===u||void 0===u||null===(c=u.data)||void 0===c?void 0:c.extra_fee)||[]).map((function(e){return{title:e.name,price:Number(e.fee)}})),l&&(e.orderInfo.products=l.data.reduce((function(e,t){return e.concat(t.filter((function(e){return e.price&&e.num})).map((function(e){return{title:e.title,image:e.thumb,spec:e.option_title,price:Number(e.price),num:Number(e.num)}})))}),[])),e.loadingShow=!1})).catch((function(t){e.isLoadData=!1,console.error("[submit-order]获取订单预信息失败",t),e.loadingShow=!1,(0,c.showModal)({title:"提示",content:t.msg||"获取订单预信息失败",callback:function(){(0,l.navBack)()}})}))},switchInStoreModeEvent:function(e){2==this.storeInfo.selfpickup_type&&0==e||1==this.storeInfo.selfpickup_type&&1==e?console.log("不能切换"):e!==this.zitiTypeIndex&&(this.zitiTypeIndex=e,console.log(this.zitiTypeIndex,"this.zitiTypeIndex"))},submitOrder:function(){var e=this;this.isSubmitOrder&&(0,_.getWxTemplateIdDataApi)().then((function(t){var i,a,o;console.log(t);var n=[(null===t||void 0===t||null===(i=t.tangshi)||void 0===i?void 0:i.pay)||"",(null===t||void 0===t||null===(a=t.tangshi)||void 0===a?void 0:a.end)||"",(null===t||void 0===t||null===(o=t.tangshi)||void 0===o?void 0:o.pickup_notice)||""].filter((function(e){return""!=e}));e._submitOrder(n)})).catch((function(t){console.error("[order-submit]获取消息模板失败",t),e._submitOrder([])}))},_submitOrder:function(e){var t=this;this.is_finishMeal&&1==this.goods_tab_item_activity_index&&this.is_add?this.addOrder():(0,u.default)(e).then((function(){if(t.loadingShow=!0,1==t.storeInfo.tangshi_setting.is_custom&&t.orderSubmitInfo.custom_value){var e=t.storeInfo.tangshi_setting.custom_title+":"+t.orderSubmitInfo.custom_value.trim();t.orderSubmitInfo.note=t.orderSubmitInfo.note+";"+e}(0,f.submitTangshiOrderApi)({sid:t.optionsData.sid,tableId:t.optionsData.tableId,note:t.orderSubmitInfo.note,zitiType:0===t.zitiTypeIndex?1:2,mobile:t.orderSubmitInfo.mobile}).then((function(e){t.orderId=e.order_id,setTimeout((function(){t.$nextTick((function(){t.is_finishMeal&&!t.has_placed_order&&uni.showModal({title:"提示",content:"下单成功",showCancel:!1,success:function(e){e.confirm&&(0,l.navPage)("/order-page/takeout-order-detail/index?id="+t.orderId,"redirect")}}),uni.$emit(p.REFRESH_STORE_EVENT),t.isSubmit=!0,t.loadingShow=!1,t.showSelectPayWayModal=!0}))}),150)})).catch((function(e){console.error("[submit-order]提交订单失败",e),(0,c.showToast)({title:e.msg}),t.loadingShow=!1}))}))},addOrder:function(){var e=this;(0,f.addOrderApi)({sid:this.optionsData.sid,table_id:this.optionsData.tableId}).then((function(e){console.log("res",e)})).catch((function(t){console.error("[submit-order]提交订单失败",t),(0,c.showToast)({title:t.msg}),e.loadingShow=!1}))},cancelPayEvent:function(){this._navOrderDetailPage()},successPayEvent:function(){this._navOrderDetailPage()},failPayEvent:function(){this._navOrderDetailPage()},_navOrderDetailPage:function(){this.showSelectPayWayModal=!1,(0,l.navPage)("/order-page/takeout-order-detail/index?id=".concat(this.orderId),"redirect")},startInputRemarkData:function(){this.remarkInput=!0,this.remarkFocus=!0},remarkTextareaBlurEvent:function(){this.remarkInput=!1,this.remarkFocus=!1},submitMobile:function(){if(console.log(this.mobileAuth,"mobileAuth"),1!==this.type||1!=this.mobileAuth||0!==this.isAuthPhone)if(this.mobile&&(this.captcha||2!==this.type)){var e=updateMobileApi;1===this.type&&(e=updateMobileByWechatAuthApi);var t=this;checkMobileAccountApi({mobile:this.mobile}).then((function(i){t.hasBind=i.data,t.hasBind>0?uni.showModal({title:"是否合并账号",content:"您的手机号码已绑定过账号,如果合并则会清空当前账号内所有信息,包含余额、订单等,请谨慎操作。",showCancel:!0,success:function(i){i.confirm?(console.log("用户点击确定"),e({mobile:t.mobile,code:t.captcha||""}).then((function(e){var i=e.data;-1==i?(clearCache(),(0,c.showToast)({title:"合并账号成功,请重新登录",callback:function(){(0,l.navPage)("/user-info-page/login/login","reLaunch")}})):((0,c.showToast)({title:"绑定成功"}),setUserInfoToCache({mobile:t.mobile}),t.bottomModalCloseEvent(),t.$emit("updated",t.mobile))})).catch((function(e){(0,c.showToast)({title:e.msg})}))):i.cancel&&console.log("用户点击取消")}}):e({mobile:t.mobile,code:t.captcha||""}).then((function(e){(0,c.showToast)({title:"绑定成功"}),setUserInfoToCache({mobile:t.mobile}),t.bottomModalCloseEvent(),t.$emit("updated",t.mobile)})).catch((function(e){(0,c.showToast)({title:e.msg})}))}))}else(0,c.showToast)({title:"手机号、验证码不能为空"});else(0,c.showToast)({title:"请授权手机号"})},getPhoneNumberByWechat:function(e){var t=this;console.log(e);var i=e.detail||{},a=i.code,o=void 0===a?"":a;o&&(0,v.wechatGetPhoneNumberApi)({code:o}).then((function(e){var i,a,o;null!==e&&void 0!==e&&null!==(i=e.data)&&void 0!==i&&i.phoneNumber&&(t.orderSubmitInfo.mobile=null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a.phoneNumber,t.mobile=null===e||void 0===e||null===(o=e.data)||void 0===o?void 0:o.phoneNumber,t.isAuthPhone=1,t.submitMobile())})).catch((function(e){(0,c.showToast)({title:e.msg})})),console.log("code",o)},formatPrice:r.formatPrice}};t.default=m},cb6a:function(e,t,i){"use strict";i("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return new Promise((function(t,i){e&&e.length||t()}))},i("bf0f");i("9d0a")},f9ce:function(e,t,i){"use strict";i("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.checkUserIsLogin=void 0,i("bf0f");var a=i("262c");t.checkUserIsLogin=function(){return new Promise((function(e,t){var i=(0,a.getTokenFromCache)();return i?e():t()}))}}}]);