require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/order_confirm/index"],{"5fb0":function(t,i,e){"use strict";e.r(i);var s=e("caa7"),n=e("d04e");for(var a in n)["default"].indexOf(a)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(a);e("8585");var o=e("828b"),r=Object(o["a"])(n["default"],s["b"],s["c"],!1,null,"d79ca4fc",null,!1,s["a"],void 0);i["default"]=r.exports},8585:function(t,i,e){"use strict";var s=e("fedb"),n=e.n(s);n.a},caa7:function(t,i,e){"use strict";e.d(i,"b",(function(){return s})),e.d(i,"c",(function(){return n})),e.d(i,"a",(function(){}));var s=function(){var t=this,i=t.$createElement,e=(t._self._c,t.virtual_type||t.is_gift&&2!=t.is_gift||!t.store_self_mention||!t.is_shipping?null:t.$t("快递配送")),s=t.virtual_type||t.is_gift&&2!=t.is_gift||!t.store_self_mention||!t.is_shipping?null:t.$t("到店自提"),n=t.virtual_type||t.is_gift&&2!=t.is_gift||t.store_self_mention&&t.is_shipping||0!=t.shippingType?null:t.$t("由平台为您提供配送服务"),a=t.virtual_type||t.is_gift&&2!=t.is_gift||t.store_self_mention&&t.is_shipping||1!=t.shippingType?null:t.$t("线上下单,到店自提"),o=t.virtual_type||t.is_gift&&2!=t.is_gift||t.store_self_mention&&t.is_shipping||0!=t.shippingType?null:t.$t("切换地址"),r=t.virtual_type||t.is_gift&&2!=t.is_gift||t.store_self_mention&&t.is_shipping||0==t.shippingType?null:t.$t("切换门店"),c=t.virtual_type||t.is_gift&&2!=t.is_gift||0!=t.shippingType||!t.addressInfo.real_name||!t.addressInfo.is_default?null:t.$t("默认"),d=t.virtual_type||t.is_gift&&2!=t.is_gift||0!=t.shippingType||t.addressInfo.real_name?null:t.$t("设置收货地址"),u=t.virtual_type||t.is_gift&&2!=t.is_gift||0==t.shippingType?null:t.storeList.length,l=t.virtual_type||t.is_gift&&2!=t.is_gift||0==t.shippingType||u>0?null:t.$t("暂无门店信息"),p=t.virtual_type||t.is_gift&&2!=t.is_gift||0==t.shippingType?null:t.storeList.length,f=1==t.is_gift?t.$t("好友留言"):null,g=1==t.is_gift?t.$t("填写好友留言,最多40字"):null,h=t.is_gift||2!=t.is_gift||1!=t.shippingType?null:t.$t("用户姓名"),_=t.is_gift||2!=t.is_gift||1!=t.shippingType?null:t.$t("请输入姓名"),m=t.is_gift||2!=t.is_gift||1!=t.shippingType?null:t.$t("联系电话"),I=t.is_gift||2!=t.is_gift||1!=t.shippingType?null:t.$t("请输入手机号"),v=t.is_gift&&1!=t.is_gift||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.noCoupon||t.discountId||t.advanceId?null:t.$t("优惠券"),$=t.is_gift&&1!=t.is_gift||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.advanceId||!t.integral_open?null:t.$t("积分抵扣"),y=t.is_gift&&1!=t.is_gift||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.advanceId||!t.integral_open||!t.useIntegral?null:t.$t("剩余积分"),T=t.is_gift&&1!=t.is_gift||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.advanceId||!t.integral_open||t.useIntegral?null:t.$t("当前积分"),b=t.is_gift&&1!=t.is_gift||!t.invoice_func&&!t.special_invoice?null:t.$t("开具发票"),k=t.is_gift&&1!=t.is_gift||1!=t.shippingType?null:t.$t("用户姓名"),P=t.is_gift&&1!=t.is_gift||1!=t.shippingType?null:t.$t("请输入姓名"),w=t.is_gift&&1!=t.is_gift||1!=t.shippingType?null:t.$t("联系电话"),C=t.is_gift&&1!=t.is_gift||1!=t.shippingType?null:t.$t("请输入手机号"),L=t.is_gift&&1!=t.is_gift||!t.textareaStatus?null:t.$t("备注说明"),S=t.is_gift&&1!=t.is_gift||!t.textareaStatus||t.coupon.coupon||t.inputTrip?null:t.mark||t.$t("填写备注信息,100字以内"),x=t.is_gift&&1!=t.is_gift||!t.textareaStatus||t.coupon.coupon||!t.inputTrip?null:t.$t("填写备注信息,100字以内"),G=t.confirm.length&&(!t.is_gift||1==t.is_gift),A=G?t.__map(t.confirm,(function(i,e){var s=t.__get_orig(i),n="text"==i.label?t.$t("请填写"+i.title):null,a="number"==i.label?t.$t("请填写"+i.title):null,o="email"==i.label?t.$t("请填写"+i.title):null,r="id"==i.label?t.$t("请填写"):null,c="phone"==i.label?t.$t("请填写"):null,d="img"==i.label?i.value.length:null,u="img"==i.label&&d<8?t.$t("上传图片"):null;return{$orig:s,m27:n,m28:a,m29:o,m30:r,m31:c,g3:d,m32:u}})):null,D=t.is_gift&&1!=t.is_gift?null:t.$t("商品总价"),F=t.is_gift&&1!=t.is_gift?null:t.$t("¥"),B=(!t.is_gift||1==t.is_gift)&&t.is_gift&&t.priceGroup.giftPrice>0?t.$t("礼品附加费"):null,O=(!t.is_gift||1==t.is_gift)&&t.is_gift&&t.priceGroup.giftPrice>0?t.$t("¥"):null,W=(!t.is_gift||1==t.is_gift)&&t.is_gift&&t.priceGroup.giftPrice>0?parseFloat(t.priceGroup.giftPrice):null,N=t.is_gift&&1!=t.is_gift||!(t.priceGroup.storePostage>0||t.priceGroup.storePostageDiscount>0)?null:t.$t("配送运费"),z=t.is_gift&&1!=t.is_gift||!(t.priceGroup.storePostage>0||t.priceGroup.storePostageDiscount>0)?null:t.$t("¥"),K=t.is_gift&&1!=t.is_gift||!(t.priceGroup.storePostage>0||t.priceGroup.storePostageDiscount>0)?null:(parseFloat(t.priceGroup.storePostage)+parseFloat(t.priceGroup.storePostageDiscount)).toFixed(2),E=t.is_gift&&1!=t.is_gift||!(t.priceGroup.levelPrice>0)||!t.userInfo.vip||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:t.$t("用户等级优惠"),M=t.is_gift&&1!=t.is_gift||!(t.priceGroup.levelPrice>0)||!t.userInfo.vip||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:t.$t("¥"),j=t.is_gift&&1!=t.is_gift||!(t.priceGroup.levelPrice>0)||!t.userInfo.vip||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:parseFloat(t.priceGroup.levelPrice).toFixed(2),H=t.is_gift&&1!=t.is_gift||!(t.priceGroup.memberPrice>0)||!t.userInfo.vip||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:t.$t("付费会员优惠"),R=t.is_gift&&1!=t.is_gift||!(t.priceGroup.memberPrice>0)||!t.userInfo.vip||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:t.$t("¥"),U=t.is_gift&&1!=t.is_gift||!(t.priceGroup.memberPrice>0)||!t.userInfo.vip||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:parseFloat(t.priceGroup.memberPrice).toFixed(2),J=(!t.is_gift||1==t.is_gift)&&t.priceGroup.storePostageDiscount>0?t.$t("会员运费优惠"):null,Q=(!t.is_gift||1==t.is_gift)&&t.priceGroup.storePostageDiscount>0?t.$t("¥"):null,q=(!t.is_gift||1==t.is_gift)&&t.priceGroup.storePostageDiscount>0?parseFloat(t.priceGroup.storePostageDiscount).toFixed(2):null,Y=(!t.is_gift||1==t.is_gift)&&t.coupon_price>0?t.$t("优惠券抵扣"):null,V=(!t.is_gift||1==t.is_gift)&&t.coupon_price>0?t.$t("¥"):null,X=(!t.is_gift||1==t.is_gift)&&t.coupon_price>0?parseFloat(t.coupon_price).toFixed(2):null,Z=(!t.is_gift||1==t.is_gift)&&t.integral_price>0?t.$t("积分抵扣"):null,tt=(!t.is_gift||1==t.is_gift)&&t.integral_price>0?t.$t("¥"):null,it=(!t.is_gift||1==t.is_gift)&&t.integral_price>0?parseFloat(t.integral_price).toFixed(2):null,et=t.is_gift&&1!=t.is_gift?null:t.$t("合计"),st=t.is_gift&&1!=t.is_gift?null:t.$t("¥"),nt=t.is_gift&&1!=t.is_gift?null:t.valid_count>0&&!t.discount_id||t.valid_count==t.cartInfo.length&&t.discount_id,at=t.is_gift&&1!=t.is_gift||!nt?null:t.$t("提交订单"),ot=t.is_gift&&1!=t.is_gift||nt?null:t.$t("提交订单");t._isMounted||(t.e0=function(i){t.inputTrip=!1},t.e1=function(i){i.stopPropagation(),t.Debounce(t.SubOrder())}),t.$mp.data=Object.assign({},{$root:{m0:e,m1:s,m2:n,m3:a,m4:o,m5:r,m6:c,m7:d,g0:u,m8:l,g1:p,m9:f,m10:g,m11:h,m12:_,m13:m,m14:I,m15:v,m16:$,m17:y,m18:T,m19:b,m20:k,m21:P,m22:w,m23:C,m24:L,m25:S,m26:x,g2:G,l0:A,m33:D,m34:F,m35:B,m36:O,m37:W,m38:N,m39:z,g4:K,m40:E,m41:M,g5:j,m42:H,m43:R,g6:U,m44:J,m45:Q,g7:q,m46:Y,m47:V,g8:X,m48:Z,m49:tt,g9:it,m50:et,m51:st,g10:nt,m52:at,m53:ot}})},n=[]},d04e:function(t,i,e){"use strict";e.r(i);var s=e("e458"),n=e.n(s);for(var a in s)["default"].indexOf(a)<0&&function(t){e.d(i,t,(function(){return s[t]}))}(a);i["default"]=n.a},e458:function(t,i,e){"use strict";(function(t){var s=e("47a9");Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n=e("1a5b"),a=e("a05e"),o=e("0729"),r=e("c302"),c=(e("3b12"),e("d7f8")),d=e("8f59"),u=s(e("0cf0")),l=s(e("95e5")),p={components:{payment:function(){Promise.all([e.e("common/vendor"),e.e("components/payment/index")]).then(function(){return resolve(e("4e69"))}.bind(null,e)).catch(e.oe)},invoicePicker:function(){e.e("pages/goods/components/invoicePicker/index").then(function(){return resolve(e("e4d4"))}.bind(null,e)).catch(e.oe)},couponListWindow:function(){Promise.all([e.e("common/vendor"),e.e("components/couponListWindow/index")]).then(function(){return resolve(e("aba3"))}.bind(null,e)).catch(e.oe)},addressWindow:function(){e.e("components/addressWindow/index").then(function(){return resolve(e("1c6d"))}.bind(null,e)).catch(e.oe)},orderGoods:function(){e.e("components/orderGoods/index").then(function(){return resolve(e("a51a"))}.bind(null,e)).catch(e.oe)},home:function(){Promise.all([e.e("common/vendor"),e.e("components/home/index")]).then(function(){return resolve(e("05b1"))}.bind(null,e)).catch(e.oe)},authorize:function(){e.e("components/Authorize").then(function(){return resolve(e("636c"))}.bind(null,e)).catch(e.oe)}},mixins:[u.default,l.default],data:function(){this.getDate({format:!0});return{confirm:"",date:this.$t("请选择"),time:this.$t("请选择"),canvasWidth:"",canvasHeight:"",canvasStatus:!1,newImg:[],textareaStatus:!0,cartArr:[{name:this.$t("微信支付"),icon:"icon-weixin2",value:"weixin",title:this.$t("使用微信快捷支付"),payStatus:1},{name:this.$t("支付宝支付"),icon:"icon-zhifubao",value:"alipay",title:this.$t("使用支付宝支付"),payStatus:1},{name:this.$t("余额支付"),icon:"icon-yuezhifu",value:"yue",title:this.$t("可用余额"),payStatus:1},{name:this.$t("线下支付"),icon:"icon-yuezhifu1",value:"offline",title:this.$t("使用线下付款"),payStatus:2},{name:this.$t("好友代付"),icon:"icon-haoyoudaizhifu",value:"friend",title:this.$t("找微信好友支付"),payStatus:1}],virtual_type:0,allPrice:0,formContent:"",payType:"",openType:1,active:0,coupon:{coupon:!1,list:[],statusTile:this.$t("立即使用")},address:{address:!1},addressInfo:{},pinkId:0,addressId:0,couponId:0,cartId:"",orderId:"",BargainId:0,combinationId:0,seckillId:0,discountId:0,userInfo:{},mark:"",couponTitle:this.$t("请选择"),coupon_price:0,useIntegral:!1,integral_price:0,integral:0,usable_integral:0,ChangePrice:0,formIds:[],status:0,is_address:!1,toPay:!1,shippingType:0,system_store:{},storePostage:0,advanceId:0,gift_mark:"这是送您的一份礼物~",contacts:"",contactsTel:"",mydata:{},storeList:[],store_self_mention:0,cartInfo:[],priceGroup:{},animated:!1,totalPrice:0,integralRatio:"0",pagesUrl:"",orderKey:"",offlinePostage:"",isAuto:!1,isShowAuth:!1,from:"",news:1,invTitle:this.$t("不开发票"),special_invoice:!1,invoice_func:!1,header_type:"",invShow:!1,invList:[],invChecked:"",urlQuery:"",pay_close:!1,noCoupon:0,valid_count:0,discount_id:0,is_shipping:!0,inputTrip:!1,focus:!0,integral_open:!1,jumpData:{},is_gift:0,giftData:null}},computed:(0,d.mapGetters)(["isLogin"]),onLoad:function(t){if(this.from="routine",!t.cartId&&!t.order_id)return this.$util.Tips({title:this.$t("请选择要购买的商品")},{tab:3,url:1});if(t.is_gift&&(this.is_gift=Number(t.is_gift)),this.couponId=t.couponId||0,this.noCoupon=Number(t.noCoupon)||0,this.pinkId=t.pinkId?parseInt(t.pinkId):0,this.addressId=t.addressId||0,this.cartId=t.cartId,this.orderId=t.order_id||0,this.is_address=!!t.is_address,this.news=t.new&&"0"!==t.new?1:0,this.invChecked=t.invoice_id||"",this.header_type=t.header_type||"1",this.couponTitle=t.couponTitle||this.$t("请选择"),t.invoice_id){var i="";i+=1==t.header_type?this.$t("个人"):this.$t("企业"),i+=1==t.invoice_type?this.$t("普通"):this.$t("专用"),i+=this.$t("发票"),this.invTitle=i}this.textareaStatus=!0,!this.isLogin||0!=this.toPay||0!=this.is_gift&&1!=this.is_gift?this.is_gift&&this.isLogin?this.getOrderDetail():(0,c.toLogin)():this.checkShipping()},onShow:function(){var i=this;t.$on("handClick",(function(e){e&&(i.system_store=e.address),t.$off("handClick")}))},methods:{checkShipping:function(){var i=this,e=this;(0,n.checkShipping)(e.cartId,e.news).then((function(t){0==t.data.type?(e.is_shipping=!0,e.shippingType=0,i.getaddressInfo(),i.getConfirm(),i.$nextTick((function(){this.$refs.addressWindow.getAddressList()}))):1==t.data.type?(e.is_shipping=!1,e.shippingType=0,i.getaddressInfo(),i.getConfirm(),i.$nextTick((function(){this.$refs.addressWindow.getAddressList()}))):2==t.data.type&&(e.is_shipping=!1,e.shippingType=1,i.addressType(1),i.getConfirm(),i.getList())})).catch((function(i){t.showToast({title:i,icon:"none"})}))},invCancel:function(){this.invChecked="",this.invTitle=this.$t("不开发票"),this.invShow=!1},invChange:function(t){var i="";this.invChecked=t,this.invShow=!1;var e=this.invList.find((function(i){return i.id===t}));i+=1===e.header_type?this.$t("个人"):this.$t("企业"),i+=1===e.type?this.$t("普通"):this.$t("专用"),i+=this.$t("发票"),this.invTitle=i},openList:function(){0==this.shippingType?this.onAddress():this.showStoreList()},invClose:function(){this.invShow=!1,this.getInvoiceList()},getInvoiceList:function(){var i=this;t.showLoading({title:this.$t("正在加载中")}),(0,a.invoiceList)().then((function(e){t.hideLoading(),i.invList=e.data.map((function(t){return t.id=t.id.toString(),t}));var s=i.invList.find((function(t){return t.id==i.invChecked}));if(s){var n="";n+=1===s.header_type?i.$t("个人"):i.$t("企业"),n+=1===s.type?i.$t("普通"):i.$t("专用"),n+=i.$t("发票"),i.invTitle=n}})).catch((function(i){t.showToast({title:i,icon:"none"})}))},goInvoice:function(){this.getInvoiceList(),this.invShow=!0,this.urlQuery="new=".concat(this.news,"&cartId=").concat(this.cartId,"&pinkId=").concat(this.pinkId,"&couponId=").concat(this.couponId,"&addressId=").concat(this.addressId,"&specialInvoice=").concat(this.special_invoice,"&couponTitle=").concat(this.couponTitle)},onLoadFun:function(){this.getaddressInfo(),this.getConfirm()},onChangeFun:function(t){var i=t,e=i.action||null,s=void 0!=i.value?i.value:null;e&&this[e]&&this[e](s)},payClose:function(){this.pay_close=!1},goPay:function(){this.pay_close=!0},payCheck:function(t){this.payType=t,this.SubOrder()},getList:function(){var i=this,e=t.getStorageSync("user_longitude")||"",s=t.getStorageSync("user_latitude")||"",n={latitude:s,longitude:e,page:1,limit:10};(0,r.storeListApi)(n).then((function(t){var e=t.data.list.list||[];i.$set(i,"storeList",e),i.$set(i,"system_store",e[0])})).catch((function(t){}))},changeClose:function(){this.$set(this.address,"address",!1)},showStoreList:function(){this.storeList.length>0&&t.navigateTo({url:"/pages/goods/goods_details_store/index"})},changePayType:function(t){this.payType=t,this.computedPrice()},computedPrice:function(){var t=this,i=this.shippingType,e={addressId:this.addressId,useIntegral:this.useIntegral?1:0,couponId:this.couponId,shipping_type:parseInt(i)+1,payType:this.payType};this.is_gift&&(e.is_gift=this.is_gift),(0,n.postOrderComputed)(this.orderKey,e).then((function(e){var s=e.data.result;s&&(t.totalPrice=s.pay_price,t.integral_price=s.deduction_price,t.coupon_price=s.coupon_price,t.integral=t.useIntegral?s.SurplusIntegral:t.usable_integral,t.$set(t.priceGroup,"storePostage",1==i?0:s.pay_postage),t.$set(t.priceGroup,"storePostageDiscount",s.storePostageDiscount))}))},addressType:function(i){var e=this,s=i;this.shippingType!=parseInt(s)&&(this.shippingType=parseInt(s),1==s&&t.getLocation({type:"wgs84",success:function(i){t.setStorageSync("user_latitude",i.latitude),t.setStorageSync("user_longitude",i.longitude)},complete:function(){e.getList()}}),this.$nextTick((function(t){e.is_gift||(e.getConfirm(),e.computedPrice())})))},bindPickerChange:function(t){var i=t.detail.value;this.shippingType=i,this.computedPrice()},ChangCouponsClone:function(){this.$set(this.coupon,"coupon",!1)},changeTextareaStatus:function(){for(var t=0,i=this.coupon.list.length;t9?s:"0"+s,n=n>9?n:"0"+n,"".concat(e,"-").concat(s,"-").concat(n)},uploadpic:function(t,i){var e=this;this.canvasStatus=!0,this.$util.uploadImageChange("upload/image",(function(t){i.value.push(t.data.url)}),(function(t){e.canvasStatus=!1}),(function(t){e.canvasWidth=t.w,e.canvasHeight=t.h}))},DelPic:function(t,i){this.confirm[t].value;this.confirm[t].value.splice(i,1)},inputTripClick:function(){this.inputTrip=!0},showMaoLocation:function(i){t.openLocation({latitude:Number(i.latitude),longitude:Number(i.longitude),name:i.name,address:"".concat(i.address,"-").concat(i.detailed_address),success:function(){}})},call:function(i){t.makePhoneCall({phoneNumber:i})}}};i.default=p}).call(this,e("df3c")["default"])},fa57:function(t,i,e){"use strict";(function(t,i){var s=e("47a9");e("2ea2");s(e("3240"));var n=s(e("5fb0"));t.__webpack_require_UNI_MP_PLUGIN__=e,i(n.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])},fedb:function(t,i,e){}},[["fa57","common/runtime","common/vendor","pages/goods/common/vendor"]]]);