bztang-admin/addons/yun_shop/static/app/js/chunk-80466518.89f7ecf5.js

1 line
18 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-80466518"],{"0968":function(e,t,a){var o=a("24fb");t=o(!1),t.push([e.i,"#balance_recharge .pay-box[data-v-6e41f902]{background:#fff;border-radius:.4375rem;margin:.5625rem 1rem}#balance_recharge .pay-box .account[data-v-6e41f902]{height:2.875rem;border-bottom:1px solid #f4f4f4;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:1rem .6875rem}#balance_recharge .pay-box .account .span-first[data-v-6e41f902]{color:#999;font-size:12px}#balance_recharge .pay-box .account .span-two[data-v-6e41f902]{color:#333;font-size:18px}#balance_recharge .pay-box .account .span-two .b[data-v-6e41f902]{display:inline-block;font-size:12px;color:#333}#balance_recharge .pay-box .pay-money[data-v-6e41f902]{padding-top:1.25rem;padding-bottom:1.25rem;margin:0 auto}#balance_recharge .pay-box .pay-money .top[data-v-6e41f902]{color:#999;font-size:12px}#balance_recharge .pay-box .pay-money .mid[data-v-6e41f902]{margin:1rem 0;color:#f76d6d;font-size:24px}#balance_recharge .pay-box .pay-money .mid .s[data-v-6e41f902]{display:inline-block;font-size:18px}#balance_recharge .pay-box .pay-money .bottom[data-v-6e41f902]{font-size:12px;color:#999}#payBtnList[data-v-6e41f902]{padding:.75rem 0;background-color:#fff;border-radius:.43rem;margin:0 1rem;margin-bottom:2.56rem;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}#payBtnList .title[data-v-6e41f902]{color:#f87070;font-size:14px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin-bottom:1rem}#payBtnList .title .line[data-v-6e41f902]{height:.875rem;width:.187rem;background-color:#f87070;display:inline-block;margin-right:.875rem}.sureBtn[data-v-6e41f902]{background:#ff5d5c;color:#fff;width:90%;margin:0 auto;padding:.5rem;border-radius:10px}.pay-psw-info[data-v-6e41f902]{overflow-y:scroll;width:100vw;height:auto;background:#fff;max-height:80vh;padding-top:.625rem}footer[data-v-6e41f902]{position:absolute;bottom:0;width:100vw;font-weight:600}.pay_btn[data-v-6e41f902]{border-top:.0625rem solid #ddd;width:100vw;height:auto}.pay_btn li[data-v-6e41f902]{width:33%;float:left;height:3rem;line-height:3rem;text-align:center;background:#fff;font-size:14px;border-right:.0625rem solid #ddd;border-bottom:.0625rem solid #ddd}.pay_btn li[data-v-6e41f902]:active{background:#c2c2c2}.b9[data-v-6e41f902]:active{background:#fff!important}.b9[data-v-6e41f902]{background:#c2c2c2!important}.pay_content[data-v-6e41f902]{height:3.125rem}.pay_content[data-v-6e41f902],.pay_content_title[data-v-6e41f902]{width:100vw;margin-bottom:.625rem}.pay_content_title[data-v-6e41f902]{height:1.875rem;line-height:1.875rem;font-size:18px}.pay_content_view[data-v-6e41f902]{width:100vw;height:3.125rem;border-bottom:.0625rem solid #ddd;border-top:.0625rem solid #ddd;border-right:.0625rem solid #ddd}.ipt_pay_p[data-v-6e41f902]{line-height:3.125rem;height:3.125rem;font-size:20px}.ipt_pay[data-v-6e41f902]{float:left;width:16.27%;height:3.125rem;text-align:center;border-left:.0625rem solid #ddd}.fa-angle-right[data-v-6e41f902]{-webkit-box-flex:0;-webkit-flex:0 0 1rem;-ms-flex:0 0 1rem;flex:0 0 1rem}",""]),e.exports=t},"23c3":function(e,t,a){"use strict";a("e4ee")},"737c":function(e,t,a){var o=a("24fb");t=o(!1),t.push([e.i,"#voucherPay .van-nav-bar[data-v-31f13e72],#voucherPay .van-popup[data-v-31f13e72]{background:#f2f2f2}#voucherPay .voucher-main[data-v-31f13e72]{padding:10px;height:17rem;overflow:scroll}#voucherPay .voucher-item[data-v-31f13e72]{margin-bottom:12px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#voucherPay .van-checkbox[data-v-31f13e72]{position:relative}#voucherPay .voucher-item[data-v-31f13e72]{text-align:left;padding:10px;font-size:10px;height:5.875rem;background:#fff;color:#666;border-radius:5px}#voucherPay .voucher-item .voucher-item-l[data-v-31f13e72]{width:6.25rem;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}#voucherPay .voucher-item .voucher-item-l small[data-v-31f13e72]{font-size:.8125rem;font-weight:700}#voucherPay .voucher-item .voucher-item-r[data-v-31f13e72]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}#voucherPay .voucher-item .voucher-item-c[data-v-31f13e72]{padding:5px 12px;position:relative}#voucherPay .voucher-item .voucher-item-c .line[data-v-31f13e72]{width:1px;height:59px;border-right:1px dashed #bcbcbc}#voucherPay .voucher-item .voucher-item-c .circle[data-v-31f13e72]{width:15px;height:15px;background:#f2f2f2;border-radius:50%;left:5px;position:absolute}#voucherPay .voucher-item .voucher-item-r[data-v-31f13e72]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:100%}#voucherPay .s-12[data-v-31f13e72]{font-size:.75rem}#voucherPay .s-10[data-v-31f13e72]{font-size:.625rem}#voucherPay .clamp-2[data-v-31f13e72]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;cursor:pointer;line-height:13px}#voucherPay .voucher-bottom[data-v-31f13e72]{height:50px;background:#fff;font-size:.9375rem;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;padding:.9375rem}#voucherPay .color-disabled *[data-v-31f13e72]{color:rgba(37,37,37,.4)!important}",""]),e.exports=t},"8cdd":function(e,t,a){"use strict";a("96ef")},9218:function(e,t,a){e.exports=a.p+"static/app/img/consume_packet.af6936ca.png"},"96ef":function(e,t,a){var o=a("737c");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=a("499e").default;i("fa1c520a",o,!0,{sourceMap:!1,shadowMode:!1})},e236:function(e,t,a){e.exports=a.p+"static/app/img/alipay-bg.64de79e8.png"},e4ee:function(e,t,a){var o=a("0968");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=a("499e").default;i("ea5a5618",o,!0,{sourceMap:!1,shadowMode:!1})},f912:function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"balance_recharge"}},[e.fun.isCPS()?e._e():a("c-title",{attrs:{hide:!1,text:"订单支付"}}),a("div",{staticClass:"pay-box"},[a("div",{staticClass:"pay-money"},[a("div",{staticClass:"top"},[e._v("支付金额:")]),a("div",{staticClass:"mid"},[a("span",{staticClass:"s"},[e._v(e._s(e.$i18n.t("money")))]),e._v(" "),a("span",[e._v(e._s(e.money))])]),a("div",{staticClass:"bottom"},[e._v(" 支付流水号:"),a("span",[e._v(e._s(e.order_sn))])])])]),a("div",{staticStyle:{height:"1.25rem"}}),a("div",{attrs:{id:"payBtnList"}},["0.00"==e.money?a("div",{staticClass:"sureBtn",on:{click:function(t){return e.confirm(54)}}},[e._v(e._s(e.confirmPayText))]):e._e(),e.money>0?a("div",{staticClass:"title"},[a("span",{staticClass:"line"}),a("span",[e._v("支付方式")])]):e._e(),e.money>0?[a("yz_pay",{attrs:{payType:e.buttons,typename:e.typename,popupSpecs:e.popupSpecs,showQR:e.showQR,qrcode:e.qrcode,showZFBQR:e.showZFBQR,isZFBQR:e.isZFBQR,alipayShow:e.alipayShow,showPacket:e.showPacket,balanceNum:e.balance,payTag:e.payTag,showCodeQRPay:e.showCodeQRPay,order_pay_id:e.order_pay_id},on:{submit:e.CheckTypeConfirm,closePacket:e.closePacket,changePopupSpecs:e.changePopupSpecs,balancePay:e.balancePay}})]:e._e()],2),a("voucher-pay",{attrs:{sum:e.money,oid:e.order_pay_id},model:{value:e.showVoucher,callback:function(t){e.showVoucher=t},expression:"showVoucher"}})],1)},i=[],r=(a("e7e5"),a("d399")),n=(a("b0c0"),a("14d9"),a("b64b"),a("c73d"),a("b680"),a("a9e3"),a("4de4"),a("d3b7"),a("caad"),a("ac1f"),a("5319"),a("d81d"),a("fa44")),s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"voucherPay"}},[a("van-popup",{style:{maxHeight:"70%"},attrs:{position:"bottom",round:"","close-on-click-overlay":!1},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[a("van-nav-bar",{attrs:{title:"代金券","right-text":"关闭"},on:{"click-right":e.onClickRight}}),a("div",{staticClass:"voucher-main"},[a("van-radio-group",{on:{change:e.onChangeRadio},model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[e._l(e.list,(function(t){return a("div",{key:t.id,staticClass:"voucher-item flex-a-c",class:{"color-disabled":Number(JSON.parse(t.coupons.useParams).balance)<e.sum},on:{click:function(a){return e.onClickRadio(t,t.coupons.useParams)}}},[a("div",{staticClass:"voucher-item-l flex-a-c"},[a("div",{staticClass:"flex-a-c",staticStyle:{"align-items":"baseline","margin-bottom":"6px",width:"100%"}},[e._v(" 代金券"),a("small",{staticStyle:{"font-size":"8px",color:"#252525"}},[e._v("¥")]),a("small",{staticStyle:{color:"#252525"}},[e._v(e._s(JSON.parse(t.coupons.useParams).cashTotal))])]),a("div",{staticClass:"flex-a-c",staticStyle:{"align-items":"baseline",width:"100%"}},[e._v(" 剩余值"),a("small",{staticStyle:{"font-size":"8px",color:"#f51d1d"}},[e._v("¥")]),a("small",{staticStyle:{color:"#f51d1d"}},[e._v(e._s(JSON.parse(t.coupons.useParams).balance))])])]),a("div",{staticClass:"voucher-item-c"},[a("div",{staticClass:"circle",staticStyle:{top:"-19px"}}),a("div",{staticClass:"circle",staticStyle:{bottom:"-19px"}}),a("div",{staticClass:"line"})]),a("div",{staticClass:"voucher-item-r flex-j-sb"},[a("div",{staticClass:"s-12 clamp-2",staticStyle:{color:"#252525"}},[e._v("ID:"+e._s(t.id)+" "+e._s(t.couponsName))]),a("div",{staticClass:"s-10"},[e._v("类型:"+e._s("4"==t.couponsType?"春节券":""))]),a("div",{staticClass:"s-10"},[e._v("有效期:"+e._s(t.startTime)+" 至 "+e._s(t.endTime))])]),a("van-radio",{ref:"checkboxes",refInFor:!0,attrs:{name:t,"checked-color":"#ee0a24",disabled:Number(JSON.parse(t.coupons.useParams).balance)<e.sum}})],1)})),this.$store.state.isloadding&&this.fun.isTextEmpty(e.list)?a("div",{staticStyle:{"margin-top":"40px",color:"#999"}},[e._v("正在加载中...")]):e._e(),!this.$store.state.isloadding&&this.fun.isTextEmpty(e.list)?a("div",{staticStyle:{"margin-top":"40px",color:"#999","font-weight":"bold"}},[e._v("暂无可使用的代金券 ~")]):e._e()],2)],1),a("div",{staticClass:"flex-a-c voucher-bottom"},[a("div",{staticClass:"flex"},[e._v(" 已选"+e._s(e.radio?"1":"0")+"张"),e.radio?[e._v(",预计可减 "),a("div",{staticStyle:{color:"#f51d1d"}},[a("small",{staticStyle:{"font-size":"10px"}},[e._v("¥")]),e._v(e._s(e.paySum))])]:e._e()],2),a("van-button",{staticStyle:{width:"64px","margin-left":"10px"},attrs:{round:"",type:"danger",size:"small"},on:{click:e.toPay}},[e._v("确定")])],1)],1)],1)},d=[],c=a("c7eb"),l=a("1da1"),u={data:function(){return{show:this.value,radio:0,list:[],paySum:null}},props:{value:{type:Boolean},sum:{type:[String,Number],value:0},oid:{type:[String,Number],value:0}},watch:{value:function(e){this.show=e,e&&(this.radio=0,this.paySum=null,this.getData())}},components:{},computed:{},methods:{getData:function(){var e=this;return Object(l["a"])(Object(c["a"])().mark((function t(){var a,o,i,r;return Object(c["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,$http.get("plugin.code-science-pay.frontend.coupon-member",{},".");case 2:if(a=t.sent,o=a.result,i=a.msg,r=a.data,0!=o){t.next=8;break}return t.abrupt("return",e.$toast(i));case 8:e.list=r||[];case 9:case"end":return t.stop()}}),t)})))()},onClickRadio:function(e,t){Number(JSON.parse(t).balance)<this.sum||(this.radio=e)},onClickRight:function(){this.show=!1,this.$emit("input",!1)},onChangeRadio:function(){var e=Number(this.sum),t=Number(JSON.parse(this.radio.coupons.useParams).balance);this.paySum=t>e?e:"---"},toPay:function(){var e=this;return Object(l["a"])(Object(c["a"])().mark((function t(){var a,o,i;return Object(c["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.radio){t.next=3;break}return e.onClickRight(),t.abrupt("return");case 3:return t.next=5,$http.get("order.merge-pay.codeSciencePayYu",{order_pay_id:e.oid,couponsId:e.radio.id},".");case 5:if(a=t.sent,o=a.result,i=a.msg,a.data,0!=o){t.next=11;break}return t.abrupt("return",e.$toast(i));case 11:e.$parent.checkoutConsumePacket();case 12:case"end":return t.stop()}}),t)})))()}}},p=u,h=(a("8cdd"),a("2877")),f=Object(h["a"])(p,s,d,!1,null,"31f13e72",null),m=f.exports,v=a("dca4"),g=null,y={mixins:[v["a"]],beforeRouteLeave:function(e,t,a){"HotelGoodsOrder"==e.name?this.$dialog.confirm({message:"您还没完成支付,确认离开?"}).then((function(){g.$router.push(g.fun.getUrl("home",{})),a()})).catch((function(){a(!1)})):a()},data:function(){return{balance:0,payParams:"",info_form:{},order_sn:"",money:"",buttons:[],typename:"",pay_sn:"订单编号",order_pay_id:"",uid:"",balanceLang:this.fun.getBalanceLang(),is_cps:!1,payTag:"",showVoucher:!1,radioCurrency:null}},methods:{onReadOrderPay:function(){if("auth"==this.$route.params.tag)return this.money=this.$route.params.price,void this.authPayButton();if("tourAround"==this.$route.query.tag)return this.order_sn=this.$route.query.ordersn,this.payTag=this.$route.query.tag,void this.tourAroundOrder(this.$route.query.api);this.$route.params.iscps&&(this.is_cps=!0),2==this.$route.params.status?this.order_ids=decodeURI(this.$route.params.order_ids):(this.order_ids=this.$route.params.order_ids,this.$route.params.route&&(this.pageUrl=this.$route.params.route)),g=this;var e=JSON.parse(window.localStorage.getItem("globalParameter"))||{};e&&"1"==e.is_open_shop_esign_v2?this.getShopSignV2():e&&"1"==e.is_open_shop_esign?this.getShopSign():this.getMultipleOrderInfo()},getMultipleOrderInfo:function(){var e=this;if(window.self!==window.top){var t=window.sessionStorage.getItem("isQRPay")||!1;t&&(this.isQRPay=!0)}var a="order.merge-pay";try{this.fun.isTextEmpty(this.$route.query.api)||"order.operation.pay"==this.$route.query.api||(a=this.$route.query.api)}catch(i){}var o={order_ids:this.order_ids,pid:this.$route.query.pid?this.$route.query.pid:this.uid};this.isQRPay&&(o.pc=1),this.fun.isCPS()&&this.fun.isCPSAPPI()&&(o.wechat_app_pay_type="cps"),this.$route.params.store_id&&(o.store_id=this.$route.params.store_id),"plugin.water-machine.frontend.consumer.no-card-goods.index"==a&&(o.device_no=this.$route.query.device_no),$http.get(a,o,"...").then((function(t){if(1==t.result){if(e.order_sn=t.data.order_pay.pay_sn,e.balance=Number(t.data.member.credit2).toFixed(2),e.money=Number(t.data.order_pay.amount).toFixed(2),e.uid=t.data.order_pay.uid,e.order_pay_id=t.data.order_pay.id,e.isQRPay){var a=[57,28,85,2,120];e.buttons=t.data.buttons.filter((function(e){return a.includes(e.value)}))}else e.buttons=t.data.buttons;e.typename=t.data.typename,t.data.buttons&&0==t.data.buttons.length&&e.$dialog.alert({message:"平台未开启任何支付方式,请联系客服!"})}else e.$dialog.confirm({message:t.msg}).then((function(){e.$router.replace(e.fun.getUrl("home"))})).catch((function(){}))}),(function(e){Object(r["a"])(e.msg)}))},tourAroundOrder:function(e){var t=this,a={order_sn:this.order_sn};$http.get(e,a,"...").then((function(e){if(1==e.result){var a,o,i,r,n=e.data;t.order_sn=null===n||void 0===n||null===(a=n.order)||void 0===a?void 0:a.order_sn,t.balance=Number(e.data.credit2).toFixed(2),t.money=Number(null===n||void 0===n||null===(o=n.order)||void 0===o?void 0:o.order_price).toFixed(2),t.uid=null===(i=n.order)||void 0===i?void 0:i.id,t.order_pay_id=null===(r=n.order)||void 0===r?void 0:r.id,t.buttons=n.buttons,t.typename=n.typename,e.data.buttons&&0==e.data.buttons.length&&t.$dialog.alert({message:"平台未开启任何支付方式,请联系客服!"})}else t.$dialog.confirm({message:e.msg}).then((function(){t.$router.replace(t.fun.getUrl("home"))})).catch((function(){}))}),(function(e){Object(r["a"])(e.msg)}))},CheckTypeConfirm:function(e){"tourAround"==this.$route.query.tag?e.need_password?this.rechargePay(e.value,this.order_sn,this.order_sn,"tourAroundPay",e):this.ordinary(this.order_sn,e.value,e):this.confirm(e)},ordinary:function(e,t,a){var o=this,i={order_sn:e,pay_type:t};$http.post("plugin.travel-around.frontend.payment.payment.pay",i,"...").then((function(i){1==i.result?o.rechargePay(t,i,e,"tourAroundPay",a):o.$dialog.alert({message:i.msg})}),(function(e){Object(r["a"])(e.msg)}))},getShopSign:function(){var e=this;$http.get("plugin.shop-esign.frontend.contract.get-order-contract",{order_ids:this.order_ids},"...").then((function(t){if(1===t.result){var a=!1;t.data.map((function(t){1===t.need_sign&&t.contract_id&&!a&&(a=!0,e.$dialog.alert({message:"您的订单(订单号:".concat(t.order_sn,")在支付前需要签署电子合同")}).then((function(){e.$router.push(e.fun.getUrl("signPagePlu",{id:t.contract_id},{fromOrder:1}))})).catch((function(){})))})),a||e.getMultipleOrderInfo()}else e.getMultipleOrderInfo()}))},getShopSignV2:function(){var e=this;$http.get("plugin.shop-esign-v2.frontend.controllers.index.needSign",{order_id:this.order_ids},"...").then((function(t){if(1===t.result){if(t.data.need_sign)return void e.$dialog.alert({message:"您的订单在支付前需要签署电子合同"}).then((function(){e.$router.push(e.fun.getUrl("shopSignIndexV2",{scene:1,order_id:e.order_ids}))})).catch((function(){}));e.getMultipleOrderInfo()}else e.getMultipleOrderInfo()}))},authPay:function(e){var t=this,a=this;$http.get("plugin.real-name-auth.frontend.pay.pay",{pay_id:e,pay_amount:this.money,pay_sn:this.order_sn},"...").then((function(o){if(1==o.result){if("54"==e)return void t.$router.go(-1);a.rechargePay(e,o,o.data.pay_sn)}else t.$dialog.alert({message:o.msg})}),(function(e){Object(r["a"])(e.msg)}))},authPayButton:function(){var e=this;$http.get("plugin.real-name-auth.frontend.pay.getPayButton",{},"...").then((function(t){1==t.result?(e.order_sn=t.data.pay_sn,e.order_pay_id=t.data.order_pay&&t.data.order_pay.id||0,e.buttons=t.data.buttons):e.$dialog.alert({message:t.msg})}),(function(e){Object(r["a"])(e.msg)}))}},activated:function(){this.onReadOrderPay()},components:{yz_pay:n["a"],voucherPay:m}},b=y,_=b,x=(a("23c3"),Object(h["a"])(_,o,i,!1,null,"6e41f902",null));t["default"]=x.exports}}]);