徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
6.1 KiB

require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/cashier/index"],{2368:function(t,e,a){"use strict";(function(t,e){var r=a("47a9");a("7561");r(a("3240"));var i=r(a("cba9"));t.__webpack_require_UNI_MP_PLUGIN__=a,e(i.default)}).call(this,a("3223")["default"],a("df3c")["createPage"])},"23fe":function(t,e,a){},"67f5":function(t,e,a){"use strict";a.r(e);var r=a("df26"),i=a.n(r);for(var n in r)["default"].indexOf(n)<0&&function(t){a.d(e,t,(function(){return r[t]}))}(n);e["default"]=i.a},a604:function(t,e,a){"use strict";var r=a("23fe"),i=a.n(r);i.a},a946:function(t,e,a){"use strict";a.d(e,"b",(function(){return r})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){}));var r=function(){var t=this.$createElement;this._self._c},i=[]},cba9:function(t,e,a){"use strict";a.r(e);var r=a("a946"),i=a("67f5");for(var n in i)["default"].indexOf(n)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(n);a("a604");var o=a("828b"),c=Object(o["a"])(i["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);e["default"]=c.exports},df26:function(t,e,a){"use strict";(function(t){var r=a("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(a("7ca3")),n=a("8f59"),o=r(a("cef6")),c=a("152a"),s=a("77d7"),u=a("bad7");function p(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function f(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?p(Object(a),!0).forEach((function(e){(0,i.default)(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):p(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var d={data:function(){var t;return t={invalidTime:0,checked:!1,orderId:0,fromType:"",active:-1,payPrice:0,payPriceShow:0,now_money:"",payPostage:0,offlinePostage:!1},(0,i.default)(t,"invalidTime",0),(0,i.default)(t,"initIn",!1),(0,i.default)(t,"jumpData",{orderId:"",msg:""}),(0,i.default)(t,"formContent",""),(0,i.default)(t,"cartArr",[{name:"微信支付",icon:u.HTTP_REQUEST_URL+"/statics/images/order/wx_pay.png",value:"weixin",title:"使用微信快捷支付",payStatus:1},{name:"支付宝支付",icon:u.HTTP_REQUEST_URL+"/statics/images/order/alipay.png",value:"alipay",title:"使用线上支付宝支付",payStatus:1},{name:"余额支付",icon:u.HTTP_REQUEST_URL+"/statics/images/order/yue_pay.png",value:"yue",title:"可用余额:",payStatus:1},{name:"线下支付",icon:u.HTTP_REQUEST_URL+"/statics/images/order/xianxia_pay.png",value:"offline",title:"选择线下付款方式",payStatus:2}]),(0,i.default)(t,"paytype",""),t},mixins:[o.default],components:{countDown:function(){a.e("components/countDown/index").then(function(){return resolve(a("b347"))}.bind(null,a)).catch(a.oe)}},computed:f(f({},(0,n.mapGetters)(["cartNum"])),{},{payTypeList:function(){var t=[];return this.cartArr.forEach((function(e){1==e.payStatus&&t.push(e)})),t.length&&this.payType(t[0].value,0),t}}),onLoad:function(t){t.order_id&&(this.orderId=t.order_id),t.from_type&&(this.fromType=t.from_type),this.getCashierOrder()},methods:{payType:function(t,e){this.active=e,this.paytype=t,this.offlinePostage&&(this.payPriceShow="offline"==t?this.$util.$h.Sub(this.payPrice,this.payPostage):this.payPrice)},getCashierOrder:function(){var e=this;(0,c.getCashierOrder)(this.orderId,this.fromType).then((function(a){if("order"==e.fromType){t.$emit("newCartNum",a.data.cart_info);var r=0;a.data.cart_info.forEach((function(t){r+=t.cart_num}));var i=e.cartNum-r;e.$store.commit("indexData/setCartNum",i+"")}e.cartArr[0].payStatus=a.data.pay_weixin_open||0,e.cartArr[1].payStatus=0,e.cartArr[2].payStatus=a.data.yue_pay_status,e.now_money=a.data.now_money,1==a.data.offline_pay_status?e.cartArr[3].payStatus=1:e.cartArr[3].payStatus=0,e.payPrice=e.payPriceShow=a.data.pay_price,e.invalidTime=a.data.invalid_time,e.payPostage=a.data.pay_postage,e.getShowPay()})).catch((function(a){return t.hideLoading(),e.$util.Tips({title:a})}))},getShowPay:function(){var t=this.cartArr.every((function(t){return 0==t.payStatus||2==t.payStatus}));if(t&&["vip","recharge"].includes(this.fromType))return this.$util.Tips({title:"未开启线上支付,请联系管理员"},{tab:3})},goPay:function(){var e=this,a=this;if(-1==a.active)return a.$util.Tips({title:"请选择付款方式"});if(!a.orderId)return a.$util.Tips({title:"请选择要支付的订单"});if("yue"==a.paytype&&parseFloat(this.now_money)<parseFloat(a.payPriceShow))return a.$util.Tips({title:"余额不足"});t.showLoading({title:"支付中"});var r="";"order"==this.fromType?r=(0,c.orderPay)({uni:a.orderId,paytype:a.paytype,from:"routine"}):"recharge"==this.fromType?r=(0,s.rechargePayAPi)({uni:this.orderId,paytype:a.paytype,from:"routine"}):"vip"==this.fromType&&(r=(0,s.memberCardPayApi)({uni:this.orderId,paytype:this.paytype,from:"routine"})),r.then((function(a){var r=a.data.status,i=(a.data.result.order_id,a.data.result.jsConfig),n={order:"/pages/goods/order_pay_status/index?order_id="+e.orderId+"&msg="+a.msg+"&type=3&totalPrice="+e.payPriceShow,recharge:"/pages/users/user_payment/index",vip:"/pages/annex/vip_paid/index"},o=n[e.fromType];switch(r){case"ORDER_EXIST":case"EXTEND_ORDER":case"PAY_ERROR":e.pageReject(a.msg,o);break;case"SUCCESS":e.pageReject(a.msg,o);break;case"WECHAT_PAY":e.wechatPayFun(i,o);break;case"PAY_DEFICIENCY":t.hideLoading(),e.pageReject(a.msg,o);break;case"WECHAT_H5_PAY":t.hideLoading(),setTimeout((function(){location.href=a.data.result.jsConfig.mweb_url}),500);break;case"ALIPAY_PAY":break}})).catch((function(e){return t.hideLoading(),a.$util.Tips({title:e})}))},wechatPayFun:function(e,a){var r=this;t.requestPayment({timeStamp:e.timestamp,nonceStr:e.nonceStr,package:e.package,signType:e.signType,paySign:e.paySign,success:function(t){r.pageReject("支付成功",a)},fail:function(t){r.pageReject("支付失败",a)}})},pageReject:function(e,a){return t.hideLoading(),this.$util.Tips({title:e},{tab:5,url:a})}}};e.default=d}).call(this,a("df3c")["default"])}},[["2368","common/runtime","common/vendor"]]]);