require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/order_confirm/index"],{"3f23":function(t,e,i){"use strict";i.r(e);var n=i("93de"),s=i("526a");for(var a in s)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return s[t]}))}(a);i("bd90");var o=i("f0c5"),r=Object(o["a"])(s["default"],n["b"],n["c"],!1,null,"04fdfa54",null,!1,n["a"],void 0);e["default"]=r.exports},"526a":function(t,e,i){"use strict";i.r(e);var n=i("dd5f"),s=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=s.a},"93de":function(t,e,i){"use strict";i.d(e,"b",(function(){return s})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){return n}));var n={uniDatetimePicker:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker")]).then(i.bind(null,"2f2d"))}},s=function(){var t=this,e=t.$createElement,i=(t._self._c,0!=t.product_type||t.tableId?null:(t.isDisplay.length>1||1==t.isDisplay.length&&1!=t.deliveryType)&&t.store_func_status&&9!=t.goodsType),n=0!=t.product_type||t.tableId||1==t.deliveryType||3==t.deliveryType?null:t.storeList.length,s=0!=t.product_type||t.tableId||1==t.deliveryType||3==t.deliveryType?null:t.storeList.length,a=t.confirm.length,o=a?t.__map(t.confirm,(function(e,i){var n=t.__get_orig(e),s="dateranges"==e.name?e.value.length:null,a="uploadPicture"==e.name?e.value.length:null;return{$orig:n,g4:s,g5:a}})):null,r=t.priceGroup.storePostage>0?(parseFloat(t.priceGroup.storePostage)+parseFloat(t.priceGroup.storePostageDiscount)).toFixed(2):null,d=!(t.priceGroup.vipPrice>0&&t.userInfo.vip)||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:parseFloat(t.priceGroup.vipPrice).toFixed(2),c=t.priceGroup.storePostageDiscount>0?parseFloat(t.priceGroup.storePostageDiscount).toFixed(2):null,u=t.coupon_price>0?parseFloat(t.coupon_price).toFixed(2):null,l=parseFloat(t.priceGroup.firstOrderPrice),p=l>0?parseFloat(t.priceGroup.firstOrderPrice).toFixed(2):null,h=t.integral_price>0?parseFloat(t.integral_price).toFixed(2):null,f=t.__map(t.promotions_detail,(function(e,i){var n=t.__get_orig(e),s=parseFloat(e.promotions_price),a=s?parseFloat(e.promotions_price).toFixed(2):null;return{$orig:n,m1:s,g12:a}})),g=t.valid_count>0&&!t.discount_id||t.valid_count==t.cartInfo.length&&t.discount_id||2==t.deliveryType&&!t.shippingType||3==t.deliveryType&&t.shippingType||0!=t.product_type,m=t.totalPrice.toString();t.$mp.data=Object.assign({},{$root:{g0:i,g1:n,g2:s,g3:a,l0:o,g6:r,g7:d,g8:c,g9:u,m0:l,g10:p,g11:h,l1:f,g13:g,g14:m}})},a=[]},a359:function(t,e,i){"use strict";(function(t,e){var n=i("4ea4");i("59a4");n(i("66fd"));var s=n(i("3f23"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(s.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},bd90:function(t,e,i){"use strict";var n=i("eccc"),s=i.n(n);s.a},dd5f:function(t,e,i){"use strict";(function(t){var n=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=n(i("448a")),a=n(i("6fc6")),o=i("bcf5"),r=i("4818"),d=i("5c29"),c=i("f8b7"),u=(i("401c"),i("8e8a")),l=i("26cb"),p=n(i("5c3b")),h={},f={components:{payment:function(){Promise.all([i.e("common/vendor"),i.e("components/payment/index")]).then(function(){return resolve(i("a3c7"))}.bind(null,i)).catch(i.oe)},invoicePicker:function(){i.e("pages/goods/components/invoicePicker/index").then(function(){return resolve(i("c979"))}.bind(null,i)).catch(i.oe)},couponListWindow:function(){Promise.all([i.e("common/vendor"),i.e("components/couponListWindow/index")]).then(function(){return resolve(i("3274"))}.bind(null,i)).catch(i.oe)},addressWindow:function(){i.e("components/addressWindow/index").then(function(){return resolve(i("a8a7"))}.bind(null,i)).catch(i.oe)},orderGoods:function(){Promise.all([i.e("common/vendor"),i.e("components/orderGoods/index")]).then(function(){return resolve(i("0dcd"))}.bind(null,i)).catch(i.oe)},home:function(){Promise.all([i.e("common/vendor"),i.e("components/home/index")]).then(function(){return resolve(i("377d"))}.bind(null,i)).catch(i.oe)},deliveryMethod:function(){i.e("pages/goods/components/deliveryMethod/index").then(function(){return resolve(i("f6e7"))}.bind(null,i)).catch(i.oe)},timeranges:function(){i.e("components/timeranges/index").then(function(){return resolve(i("655e"))}.bind(null,i)).catch(i.oe)},areaWindow:function(){Promise.all([i.e("common/vendor"),i.e("components/areaWindow/index")]).then(function(){return resolve(i("1b9e"))}.bind(null,i)).catch(i.oe)},groupGoodsList:function(){i.e("components/groupGoodsList/index").then(function(){return resolve(i("a294"))}.bind(null,i)).catch(i.oe)}},mixins:[p.default],data:function(){return{addressInfoArea:[],cityShow:2,display:!1,timeranges:[],isShow:!1,giveData:{give_integral:0,give_coupon:[]},giveCartInfo:[],confirm:[],id:0,isaddress:!1,textareaStatus:!0,cartArr:[{name:"微信支付",icon:"icon-weixin2",value:"weixin",title:"使用微信快捷支付",payStatus:1},{name:"支付宝支付",icon:"icon-zhifubao",value:"alipay",title:"使用线上支付宝支付",payStatus:1},{name:"余额支付",icon:"icon-yuezhifu",value:"yue",title:"可用余额:",payStatus:1},{name:"线下支付",icon:"icon-yuezhifu1",value:"offline",title:"选择线下付款方式",payStatus:2}],formContent:"",payType:"weixin",openType:1,active:0,coupon:{coupon:!1,list:[],statusTile:"立即使用"},address:{address:!1},addressInfo:{},pinkId:0,addressId:0,couponId:0,cartId:"",BargainId:0,combinationId:0,seckillId:0,discountId:0,userInfo:{},mark:"",couponTitle:"请选择",coupon_price:0,promotions_detail:[],useIntegral:!1,integral_price:0,integral:0,ChangePrice:0,formIds:[],status:0,is_address:!1,toPay:!1,shippingType:0,system_store:{},storePostage:0,contacts:"",contactsTel:"",mydata:{},storeList:[],store_self_mention:0,store_func_status:!1,cartInfo:[],priceGroup:{},animated:!1,totalPrice:0,integralRatio:"0",pagesUrl:"",orderKey:"",offlinePostage:"",isAuto:!1,isShowAuth:!1,from:"",news:1,invTitle:"不开发票",special_invoice:!1,invoice_func:!1,integral_ratio_status:1,header_type:"",invShow:!1,invList:[],invChecked:"",urlQuery:"",pay_close:!1,noCoupon:0,valid_count:0,discount_id:0,storeId:0,product_type:1,newImg:[],isDisplay:[],deliveryType:1,goodsType:0,product_id:0,selectIndex:0,timerangesIndex:0,collage_id:0,goodsList:[],tableId:0,codeData:{}}},computed:(0,l.mapGetters)(["isLogin"]),onLoad:function(e){if(this.from="routine",!e.cartId)return this.$util.Tips({title:"请选择要购买的商品"},{tab:3,url:1});switch(this.deliveryType=e.delivery_type||1,1!=this.deliveryType&&3!=this.deliveryType||(this.addressId=e.addressId||0,this.system_store.name=e.store_name),2!=this.deliveryType&&3!=this.deliveryType||(this.storeId=e.store_id||0,this.system_store.id=e.store_id||0),this.couponId=e.couponId||0,this.noCoupon=e.noCoupon||0,this.product_id=e.product_id||0,this.pinkId=e.pinkId?parseInt(e.pinkId):0,this.cartId=e.cartId,this.is_address=!!e.is_address,this.news=e.new&&"0"!==e.new?1:0,t.setStorageSync("news",this.news),this.invChecked=e.invoice_id||"",this.header_type=e.header_type||"1",this.couponTitle=e.couponTitle||"请选择",e.invoice_type){case"1":this.invTitle="增值税电子普通发票";break;case"2":this.invTitle="增值税电子专用发票";break}e.invoice_name&&(this.invTitle=e.invoice_name),this.textareaStatus=!0,this.isLogin&&0==this.toPay?this.getCheckShipping():(0,u.toLogin)(),this.collage_id=e.collage_id||0,this.collage_id&&this.getCollagePartake(),this.tableId=e.tableId||0,this.tableId&&this.getCodeData()},onShow:function(){t.removeStorageSync("form_type_cart");var e=this;t.$on("handClick",(function(i){i&&(e.system_store=i.address,e.storeId=e.system_store.id,e.cartId=i.cartId,e.news=i.new,e.pinkId=Number(i.pinkId),e.couponId=i.couponId,e.getConfirm()),t.$off("handClick")}));var i=(0,a.default)(new Date(Number((new Date).getTime()))).format("HH:mm").split(":"),n=i;n.push(0);var o=[];[].concat((0,s.default)(n),(0,s.default)(i)).forEach((function(t){o.push(Number(t))})),this.timeranges=o},methods:{getCodeData:function(){var t=this;(0,c.getCodeData)({tableId:this.tableId}).then((function(e){t.codeData=e.data}))},getCollagePartake:function(){var t=this;(0,c.getCollagePartake)({collage_id:this.collage_id}).then((function(e){t.goodsList=e.data}))},OnAreaAddress:function(t){var e="";e=4==t.length?t[0].label+"/"+t[1].label+"/"+t[2].label+"/"+t[3].label:3==t.length?t[0].label+"/"+t[1].label+"/"+t[2].label:2==t.length?t[0].label+"/"+t[1].label:t[0].label,this.confirm[this.timerangesIndex].value=e,h[this.timerangesIndex]=t},changeRegion:function(t){this.confirm[t].value||(this.addressInfoArea=[]),this.timerangesIndex=t,this.cityShow=Number(this.confirm[t].valConfig.tabVal)+1,this.display=!0,h[t]&&(this.addressInfoArea=h[t])},changeAddressClose:function(){this.display=!1},maskClick:function(t){},authColse:function(t){this.isShowAuth=t},showMaoLocation:function(e){t.openLocation({latitude:Number(e.latitude),longitude:Number(e.longitude),name:e.name,address:"".concat(e.address,"-").concat(e.detailed_address),success:function(){}})},call:function(e){t.makePhoneCall({phoneNumber:e})},deliveryFun:function(t,e){this.deliveryType=t,this.$refs.deliveryMethod.module=!1,2==t?this.storeId=e.id:(3==t&&(this.storeId=e.id,this.isDisplay.includes("2")&&this.isDisplay.includes("3")&&(this.getaddressInfo(),this.$nextTick((function(){this.$refs.addressWindow.getAddressList()})))),this.system_store=e),1==t||3==t?this.addressType(0,t):this.addressType(1,t)},onDelivery:function(){this.$refs.deliveryMethod.module=!0},storeFun:function(t){this.getList(1,t)},getCheckShipping:function(){var e=this,i={cartId:this.cartId,new:this.news};(0,o.checkShipping)(i).then((function(t){t.data.type.sort((function(t,e){return t-e})),e.isDisplay=t.data.type,(e.isDisplay.includes("2")&&1==e.isDisplay.length||2==e.deliveryType&&!e.tableId||3==e.deliveryType&&e.storeId>0&&!e.system_store.name)&&e.isDisplay.length?((2==e.deliveryType||3==e.deliveryType&&!e.isDisplay.includes("3"))&&e.isDisplay.includes("2")&&(e.deliveryType=2,e.addressType(1,e.deliveryType)),(3==e.deliveryType||2==e.deliveryType&&!e.isDisplay.includes("2"))&&e.isDisplay.includes("3")&&(e.deliveryType=3,e.addressType(0,e.deliveryType),e.getaddressInfo(),e.$nextTick((function(){this.$refs.addressWindow.getAddressList()})))):(e.getaddressInfo(),e.getConfirm(),e.$nextTick((function(){this.$refs.addressWindow.getAddressList()})))})).catch((function(e){t.showToast({title:e,icon:"none"})}))},DelPic:function(t,e){this.confirm[t].value;this.confirm[t].value.splice(e,1),this.$set(this.confirm[t],"value",this.confirm[t].value)},uploadpic:function(t){var e=this;this.$util.uploadImageOne("upload/image",(function(i){e.newImg.push(i.data.url),e.$set(e.confirm[t],"value",e.newImg)}))},invCancel:function(){this.invChecked="",this.invTitle="不开发票",this.invShow=!1},invChange:function(t){this.invChecked=t,this.invShow=!1;var e=this.invList.find((function(e){return e.id===t})),i="";i+=1===e.header_type?"个人":"企业",i+=1===e.type?"普通":"专用",i+="发票",this.invTitle=i},invClose:function(){this.invShow=!1,this.getInvoiceList()},getInvoiceList:function(){var e=this;t.showLoading({title:"正在加载…"}),(0,r.invoiceList)().then((function(i){t.hideLoading(),e.invList=i.data.map((function(t){return t.id=t.id.toString(),t}));var n=e.invList.find((function(t){return t.id==e.invChecked}));if(n){var s="";s+=1===n.header_type?"个人":"企业",s+=1===n.type?"普通":"专用",s+="发票",e.invTitle=s}})).catch((function(e){t.showToast({title:e,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,"&delivery_type=").concat(this.deliveryType,"&store_id=").concat(this.storeId,"&store_name=").concat(this.system_store.name,"&product_id=").concat(this.product_id)},onLoadFun:function(){this.getCheckShipping(),this.isShowAuth=!1},onChangeFun:function(t){var e=t,i=e.action||null,n=void 0!=e.value?e.value:null;i&&this[i]&&this[i](n)},payClose:function(){this.pay_close=!1},goPay:function(){this.formVerify()},payCheck:function(t){this.payType=t,this.SubOrder()},payAddress:function(){t.navigateTo({url:"/pages/users/user_address/index?id="+this.id+"&new="+this.news+"&cartId="+this.cartId+"&pinkId="+this.pinkId+"&couponId="+this.couponId+"&delivery_type="+this.deliveryType+"&addressId="+this.addressId+"&store_id="+this.storeId+"&store_name="+this.system_store.name+"&product_id="+this.product_id})},getList:function(e,i){var n=this,s=t.getStorageSync("user_longitude"),a=t.getStorageSync("user_latitude"),o={latitude:a,longitude:s,page:1,limit:100,type:this.seckillId>0?1:0,product_id:this.product_id,is_store:i};(0,c.storeListApi)(o).then((function(t){var i=t.data.list.list||[];n.$set(n,"storeList",i),n.$set(n,"storeId",0!=n.storeId?n.storeId:i[0].id),i.forEach((function(t){n.storeId==t.id&&n.$set(n,"system_store",t)})),1!=e&&n.getConfirm()})).catch((function(t){}))},changeClose:function(){this.$set(this.address,"address",!1)},showStoreList:function(){this.storeList.length>0&&t.navigateTo({url:"/pages/store/store_list/index?type=1&cartId=".concat(this.cartId,"&new=").concat(this.news,"&pinkId=").concat(this.pinkId,"&couponId=").concat(this.couponId)})},changePayType:function(t){this.payType=t,this.computedPrice()},computedPrice:function(){var t=this,e=this.shippingType;(0,o.postOrderComputed)(this.orderKey,{addressId:this.addressId,useIntegral:this.useIntegral?1:0,couponId:0==this.priceGroup.couponPrice?0:this.couponId,shipping_type:this.tableId?4:parseInt(e)+1,payType:this.payType}).then((function(i){var n=i.data.result;n&&(t.totalPrice=n.pay_price,t.integral_price=n.deduction_price,t.coupon_price=n.coupon_price,t.promotions_detail=n.promotions_detail,t.integral=t.useIntegral?n.SurplusIntegral:t.userInfo.integral,t.$set(t.priceGroup,"storePostage",1==e?0:n.pay_postage),t.$set(t.priceGroup,"storePostageDiscount",n.storePostageDiscount))})).catch((function(t){return that.$util.Tips({title:t})}))},addressType:function(t,e){var i=t;this.shippingType=parseInt(i),1==i?this.getList(0,e):this.getConfirm()},bindPickerChange:function(t){var e=t.detail.value;this.shippingType=e,this.computedPrice()},ChangCouponsClone:function(){this.$set(this.coupon,"coupon",!1)},changeTextareaStatus:function(){for(var t=0,e=this.coupon.list.length;t