zhengjinyi 2 سال پیش
والد
کامیت
8c97441d30
1فایلهای تغییر یافته به همراه36 افزوده شده و 28 حذف شده
  1. 36 28
      src/main/resources/static/js/pay/caimei-hlbpay.js

+ 36 - 28
src/main/resources/static/js/pay/caimei-hlbpay.js

@@ -50,6 +50,7 @@ var payContainer = new Vue({
         invoiceStatus:false,
         isReceiptStatus:false,
         onlinePay:'',
+        QuickPayFlag: false,//快捷支付开关
         B2BpayFlag: false,//企业网银支付开关
         is_Wechat_bowcr:false, // 是否是微信浏览器
         weChatFlag: false, // 微信支付开关
@@ -93,6 +94,9 @@ var payContainer = new Vue({
         },
         showB2BpayMode(){
             return this.B2BpayFlag || this.svipPayFlag
+        },
+        showQuickpayMode() {
+            return this.QuickPayFlag
         }
     },
     methods: {
@@ -142,8 +146,13 @@ var payContainer = new Vue({
             this.weChatFlag = range.indexOf('1') > -1
             this.aliPayFlag = range.indexOf('2') > -1
             this.B2BpayFlag = range.indexOf('4') > -1
+            this.QuickPayFlag = range.indexOf('5') > -1
             // 设置默认支付方式
-            this.mobileTabIndex = this.aliPayFlag ? 0 : this.weChatFlag ? 1 : this.B2BpayFlag ? 2 : 3
+            if(this.QuickPayFlag){
+                this.mobileTabIndex = 4
+            }else{
+                this.mobileTabIndex = this.aliPayFlag ? 0 : this.weChatFlag ? 1 : this.B2BpayFlag ? 2 : 3
+            }
         },
         getBankList () {// 获取网银支付银行列表
             const _self = this;
@@ -251,15 +260,15 @@ var payContainer = new Vue({
                     CAIMEI.dialog('网银支付的金额必须大于¥10.00');
                     return;
                 }
-                if( this.orderFlag == 1 && this.mobileTabIndex === 2){
-                    if(this.payAmount != this.payableAmount){
+                if( this.orderFlag === 1 && this.mobileTabIndex === 2){
+                    if(this.payAmount !== this.obligation){
                         CAIMEI.Alert('企业网银支付每次收取的手续费较高,建议一次性全额付款。','确定',false);
                         return;
                     }
                 }
                 if(this.pageType === '1'){// 二手
                     this.hlb_PayOrdersecondUnion();
-                } else if (_self.pageType === '2') { // 会员
+                } else if (this.pageType === '2') { // 会员
                     this.hlb_PayVipPcMallPay();
                 } else {// 正常订单
                     this.hlb_PayOrderPcMallPay();
@@ -280,34 +289,33 @@ var payContainer = new Vue({
         },
         PayCouponMiniPayFn () {  // 移动支付购买优惠券
             const _self = this;
-            if(_self.payInfo.payBankNum == "WEIXIN"){
-                _self.hlb_PayCouponMiniWxPay();
-            }else if(_self.payInfo.payBankNum == "ALIPAY"){//支付宝支付
-                _self.hlb_PayCouponAliPay();
+            if(this.payInfo.payBankNum == "WEIXIN"){
+                this.hlb_PayCouponMiniWxPay();
+            }else if(this.payInfo.payBankNum == "ALIPAY"){//支付宝支付
+                this.hlb_PayCouponAliPay();
             }
         },
         changePayAmount(event){//输入支付金额控制
-            var _self = this;
-            var value = event.target.value;
-            if(value == "" || value <0 ){//判断是否等于0 或者为空
-                _self.payAmount = '';
-                _self.payInfo.payAmount = _self.payInfo.obligation;
-                _self.balanceAmount = _self.toFixedFn(_self.payInfo.obligation);
-                return;
-            }else if(Number(value) > _self.payInfo.obligation){//判断大于应付金额
-                _self.payAmount = _self.payInfo.obligation;
-                _self.payInfo.payAmount =  _self.payAmount;
-                _self.balanceAmount = _self.toFixedFn(_self.payInfo.obligation-_self.payInfo.payAmount);
+            const _self = this;
+            const value = event.target.value;
+            if(value === "" || value <0 ){//判断是否等于0 或者为空
+                this.payAmount = '';
+                this.payInfo.payAmount = this.payInfo.obligation;
+                this.balanceAmount = this.toFixedFn(this.payInfo.obligation);
+            }else if(Number(value) > this.payInfo.obligation){//判断大于应付金额
+                this.payAmount = this.payInfo.obligation;
+                this.payInfo.payAmount =  this.payAmount;
+                this.balanceAmount = this.toFixedFn(this.payInfo.obligation-this.payInfo.payAmount);
             }else{
-                _self.payAmount = value;
-                _self.payInfo.payAmount = _self.payAmount;
-                _self.balanceAmount = _self.toFixedFn(_self.payInfo.obligation-_self.payInfo.payAmount);
+                this.payAmount = value;
+                this.payInfo.payAmount = this.payAmount;
+                this.balanceAmount = this.toFixedFn(this.payInfo.obligation-this.payInfo.payAmount);
             }
         },
         changePayAmountBlur(event){//失去焦点设置金额
             const _self = this;
-            _self.payAmount = _self.toFixedFn(event.target.value);
-            _self.payInfo.payAmount = _self.payAmount;
+            this.payAmount = this.toFixedFn(event.target.value);
+            this.payInfo.payAmount = this.payAmount;
         },
         changeTab(index,item){//选择支付方式切换
             this.tabIndex = index;
@@ -369,14 +377,14 @@ var payContainer = new Vue({
                 CAIMEI.dialog('网银支付的金额必须大于¥12.00');
                 return;
             }
-            if( _self.orderFlag == 1 && _self.mobileTabIndex === 2){
-                if(_self.payAmount != _self.payableAmount){
+            if( _self.orderFlag === 1 && _self.mobileTabIndex === 2){
+                if(_self.payAmount !== _self.payableAmount){
                     CAIMEI.Alert('企业网银支付每次收取的手续费较高,建议一次性全额付款。','确定',false);
                     return;
                 }
             }
-            var params = {};
-            if(_self.pageType == 2){
+            let params = {};
+            if(_self.pageType === 2){
                 params = {
                     unpaidAmount:_self.payAmount,
                     vipRecordId: _self.vipRecordId,