Prechádzať zdrojové kódy

合利宝支付接口联调

zhengjinyi 3 rokov pred
rodič
commit
aac8df65b9

+ 36 - 0
src/main/resources/static/js/common/serviceapi/pay.service.js

@@ -28,6 +28,30 @@ var PayApi = {
                 callback(res);
             });
         },
+        PayOrderShoporders: function (params, callback) {//根据主订单查询子订单信息
+            Http.AjaxService({
+                url:'/order/pay/shoporders',
+                type:'GET',
+                data:params,
+                json:true,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
+        PayOrderCheckoutShoporders: function (params, callback) {//根据主订单查询子订单信息 shopOrderId
+            Http.AjaxService({
+                url:'/order/pay/checkout/shoporders',
+                type:'GET',
+                data:params,
+                json:true,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
         PayOrderPcMallPay: function (params, callback) {// 米花正常订单网银支付
             Http.AjaxService({
                 url:'/order/pay/union',
@@ -247,6 +271,18 @@ var PayApi = {
                 callback(res);
             });
         },
+        PayCouponMiniScanAliPay: function(params, callback){ // 合利宝支付宝购买优惠券
+            Http.AjaxService({
+                url:'/order/pay/coupon/scan',
+                type:'POST',
+                data:params,
+                json:false,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
         PayCouponUnionPay: function(params, callback){ // 网银购买优惠券
             Http.AjaxService({
                 url:'/order/pay/coupon/union',

+ 109 - 152
src/main/resources/static/js/pay/caimei-hlbpay.js

@@ -8,8 +8,8 @@ var payContainer = new Vue({
         isSubMitStatus:false,
         payInfo:{
             payBankNum: 'ICBC_B2B', //支付类型
-            payOrderId: '',  //订单ID
-            payUnpaidaMount: '', //待支付金额
+            shopOrderId: '',  //订单ID
+            obligation: '', //待支付金额
             payAmount: 0,//本次支付金额
             payMobileUrl: '',//二维码生成链接
             payData:{},       //支付数据
@@ -18,7 +18,8 @@ var payContainer = new Vue({
         },
         iframe:'',
         couponInfo:{},
-        bankListData:[],
+        bankListB2BData:[],// 企业网银银行列表
+        bankListB2CData:[],// 个人网银银行列表
         methodTab:['线上支付','转账支付'],
         mobileData:[
             {imgUrl:'/img/pay/iconbank-ali@2x.png',bankName:'支付宝支付',bankNum:'ALIPAY'},
@@ -27,7 +28,7 @@ var payContainer = new Vue({
             {imgUrl:'/img/pay/iconbank-B2Cbank@2x.png',bankName:'个人网银',bankNum:'ICBC_B2C'}
         ],
         pageType:'',//页面跳转类型 1 二手支付
-        paidAmount:'',//订单待付金额
+        obligation:'',//订单待付金额
         payableAmount:'',//应付金额
         receiptAmount:'',//已支付金额
         balanceAmount:'',//应付剩余金额
@@ -46,8 +47,6 @@ var payContainer = new Vue({
         isPaySwitch:false,
         paySuccessCounter:'',
         bankPayLink_url:'',
-        orderIdentificationId:'',//订单标识
-        receiptStatus:'',
         invoiceStatus:false,
         isReceiptStatus:false,
         onlinePay:'',
@@ -93,30 +92,22 @@ var payContainer = new Vue({
                 }
             })
         },
-        infoPayOrderCheckoutCounter:function(){//初始化订单数据
+        infoPayOrderCheckoutCounter:function(){//初始化订单数据
             var _self = this;
-            PayApi.PayOrderCheckoutCounter({orderId:_self.payInfo.payOrderId},function(response){
+            PayApi.PayOrderCheckoutShoporders({shopOrderId:_self.payInfo.shopOrderId},function(response){
                 if(response.code == 0){
                     // console.log(response);
                     var data = response.data; //金额初始化
-                    _self.payInfo.payUnpaidaMount = (data.order.payableAmount - data.order.receiptAmount).toFixed(2);
-                    _self.payInfo.payAmount = (data.order.payableAmount-data.order.receiptAmount).toFixed(2);
-                    _self.discernReceiptList = data.discernReceipt;
-                    _self.paidAmount =  (data.order.payableAmount-data.order.receiptAmount).toFixed(2);
-                    _self.receiptAmount =  data.order.receiptAmount;
-                    _self.payableAmount=  data.order.payableAmount;
-                    _self.balanceAmount =  ( _self.payableAmount - _self.receiptAmount).toFixed(2) - _self.payInfo.payAmount;
-                    _self.payAmount =  (_self.payableAmount - _self.receiptAmount).toFixed(2);//本次支付金额
-                    _self.paySuccessCounter = data.order.paySuccessCounter;
-                    _self.receiptStatus =  data.order.receiptStatus;
+                    _self.payInfo.payAmount = (data.shopOrder.realPay - data.shopOrder.receiptAmount).toFixed(2);
+                    _self.discernReceiptList = data.discernReceipt;// 支付记录
+                    _self.payInfo.obligation = data.shopOrder.obligation;
+                    _self.obligation =  data.shopOrder.obligation;// 待付金额
+                    _self.payableAmount =  data.shopOrder.realPay;
+                    _self.receiptAmount =  data.shopOrder.receiptAmount;
+                    _self.balanceAmount =  ( _self.obligation - _self.receiptAmount).toFixed(2) - _self.payInfo.payAmount;
+                    _self.payAmount =  (_self.payableAmount - _self.receiptAmount).toFixed(2);
+                    _self.paySuccessCounter = data.shopOrder.paySuccessCounter;
                     _self.onlinePay = data.onlinePay;
-                    if(_self.receiptAmount>0){
-                        _self.payStatusText = '使用任何一种线上支付方式支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。若着急发货,可以选择使用线下转账进行付款。';
-                        _self.isReceiptStatus = false;
-                    }else{
-                        _self.payStatusText = '使用任何一种线上支付方式支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。若着急发货,可以选择使用线下转账进行付款。';
-                        _self.isReceiptStatus = true;
-                    }
                     _self.isRequest = true;
                     _self.PayOrderOnLineSwitch();
                 }else{
@@ -128,7 +119,8 @@ var payContainer = new Vue({
             var _self = this;
             PayApi.PayGetBankCode({},function(response){
                 if(response.code == 0){
-                    _self.bankListData = response.data.list;
+                    _self.bankListB2BData = response.data.B2B;
+                    _self.bankListB2CData = response.data.B2C;
                 }else{
                     console.log('获取网银支付银行列表异常')
                 }
@@ -145,7 +137,7 @@ var payContainer = new Vue({
                             return;
                         }
                         CAIMEI.Alert('线上支付功能正在维护中,请前往订单详情页面查看线下转账方式后进行付款','确定',true,function(){
-                            window.location.href='/user/order/detail.html?orderId='+_self.payInfo.payOrderId;
+                            window.location.href='/user/order/detail.html?orderId='+_self.payInfo.shopOrderId;
                         });
                     }
                 }else{
@@ -162,53 +154,49 @@ var payContainer = new Vue({
             if(_self.pageType === '3'){// 移动支付优惠券
                 _self.PayCouponMiniPayFn();
             }else{
-                if(_self.onlinePay == 2){
-                    _self.layerConfirm();
-                }else{
-                    if(_self.payInfo.payBankNum == ''){
-                        CAIMEI.dialog('请选择支付方式');
-                        return;
-                    }
-                    if(_self.payAmount == ''){
-                        CAIMEI.dialog('请输入本次支付金额');
-                        return;
-                    }
-                    if(_self.payAmount == 0){
-                        CAIMEI.dialog('本次支付金额不能为0');
-                        return;
-                    }
-                    if(_self.payAmount*100 < 2){
-                        CAIMEI.dialog('本次支付金额必须大于¥0.02');
-                        return;
+                if(_self.payInfo.payBankNum == ''){
+                    CAIMEI.dialog('请选择支付方式');
+                    return;
+                }
+                if(_self.payAmount == ''){
+                    CAIMEI.dialog('请输入本次支付金额');
+                    return;
+                }
+                if(_self.payAmount == 0){
+                    CAIMEI.dialog('本次支付金额不能为0');
+                    return;
+                }
+                if(_self.payAmount*100 < 2){
+                    CAIMEI.dialog('本次支付金额必须大于¥0.02');
+                    return;
+                }
+                if(_self.payAmount > _self.paymentIimit){
+                    switch (_self.payInfo.payBankNum) {
+                        case 'WEIXIN':
+                            _self.paymentIimitText = '本次支付金额已超出微信支付限额,请输入小于5千的金额进行支付';
+                            break;
+                        case 'ALIPAY':
+                            _self.paymentIimitText = '本次支付金额已超出支付宝限额,请输入小于5千的金额进行支付';
+                            break;
                     }
-                    if(_self.payAmount > _self.paymentIimit){
-                        switch (_self.payInfo.payBankNum) {
-                            case 'WEIXIN':
-                                _self.paymentIimitText = '本次支付金额已超出微信支付限额,请输入小于5千的金额进行支付';
-                                break;
-                            case 'ALIPAY':
-                                _self.paymentIimitText = '本次支付金额已超出支付宝限额,请输入小于5千的金额进行支付';
-                                break;
-                        }
-                        CAIMEI.Alert(_self.paymentIimitText,'知道了');
-                        return;
+                    CAIMEI.Alert(_self.paymentIimitText,'知道了');
+                    return;
+                }
+                if(_self.payInfo.payBankNum == "WEIXIN"){// 微信
+                    if(_self.pageType === '1'){ // 二手
+                        _self.hlb_PaySecondMiniWxPay();
+                    }else if(_self.pageType === '2'){ // 会员
+                        _self.hlb_PayVipMiniWxPay();
+                    }else{ // 正常订单
+                        _self.hlb_PayOrderMiniWxPay();
                     }
-                    if(_self.payInfo.payBankNum == "WEIXIN"){// 微信
-                        if(_self.pageType === '1'){ // 二手
-                            _self.hlb_PaySecondMiniWxPay();
-                        }else if(_self.pageType === '2'){ // 会员
-                            _self.hlb_PayVipMiniWxPay();
-                        }else{ // 正常订单
-                            _self.hlb_PayOrderMiniWxPay();
-                        }
-                    }else if(_self.payInfo.payBankNum == "ALIPAY"){// 支付宝
-                        if(_self.pageType === '1'){// 二手
-                            _self.hlb_PayOrdersecondScanAliPay();
-                        }else if(_self.pageType === '2'){ // 会员
-                            _self.hlb_PayVipScanAliPay();
-                        }else{// 正常订单
-                            _self.hlb_PayOrderPcScanAliPay();
-                        }
+                }else if(_self.payInfo.payBankNum == "ALIPAY"){// 支付宝
+                    if(_self.pageType === '1'){// 二手
+                        _self.hlb_PayOrdersecondScanAliPay();
+                    }else if(_self.pageType === '2'){ // 会员
+                        _self.hlb_PayVipScanAliPay();
+                    }else{// 正常订单
+                        _self.hlb_PayOrderPcScanAliPay();
                     }
                 }
             }
@@ -222,24 +210,20 @@ var payContainer = new Vue({
             if(_self.pageType === '3'){// 网银支付优惠券
                 _self.hlb_PayCouponUnionPayFn();
             }else{
-                if(_self.onlinePay == 2){
-                    _self.layerConfirm();
-                }else{
-                    if(_self.payInfo.payBankNum == ''){
-                        CAIMEI.dialog('请选择银行!');
-                        return;
-                    }
-                    if(_self.payAmount <= 10){
-                        CAIMEI.dialog('网银支付的金额必须大于¥10.00');
-                        return;
-                    }
-                    if(_self.pageType === '1'){// 二手
-                        _self.hlb_PayOrdersecondUnion();
-                    } else if (_self.pageType === '2') { // 会员
-                        _self.hlb_PayVipPcMallPay();
-                    } else {// 正常订单
-                        _self.hlb_PayOrderPcMallPay();
-                    }
+                if(_self.payInfo.payBankNum == ''){
+                    CAIMEI.dialog('请选择银行!');
+                    return;
+                }
+                if(_self.payAmount <= 10){
+                    CAIMEI.dialog('网银支付的金额必须大于¥10.00');
+                    return;
+                }
+                if(_self.pageType === '1'){// 二手
+                    _self.hlb_PayOrdersecondUnion();
+                } else if (_self.pageType === '2') { // 会员
+                    _self.hlb_PayVipPcMallPay();
+                } else {// 正常订单
+                    _self.hlb_PayOrderPcMallPay();
                 }
             }
         },
@@ -256,17 +240,17 @@ var payContainer = new Vue({
             var value = event.target.value;
             if(value == "" || value <0 ){//判断是否等于0 或者为空
                 _self.payAmount = '';
-                _self.payInfo.payAmount = _self.payInfo.payUnpaidaMount;
-                _self.balanceAmount = _self.toFixedFn(_self.payInfo.payUnpaidaMount);
+                _self.payInfo.payAmount = _self.payInfo.obligation;
+                _self.balanceAmount = _self.toFixedFn(_self.payInfo.obligation);
                 return;
-            }else if(Number(value) > _self.payInfo.payUnpaidaMount){//判断大于应付金额
-                _self.payAmount = _self.payInfo.payUnpaidaMount;
+            }else if(Number(value) > _self.payInfo.obligation){//判断大于应付金额
+                _self.payAmount = _self.payInfo.obligation;
                 _self.payInfo.payAmount =  _self.payAmount;
-                _self.balanceAmount = _self.toFixedFn(_self.payInfo.payUnpaidaMount-_self.payInfo.payAmount);
+                _self.balanceAmount = _self.toFixedFn(_self.payInfo.obligation-_self.payInfo.payAmount);
             }else{
                 _self.payAmount = value;
                 _self.payInfo.payAmount = _self.payAmount;
-                _self.balanceAmount = _self.toFixedFn(_self.payInfo.payUnpaidaMount-_self.payInfo.payAmount);
+                _self.balanceAmount = _self.toFixedFn(_self.payInfo.obligation-_self.payInfo.payAmount);
             }
         },
         changePayAmountBlur:function(event){//失去焦点设置金额
@@ -294,11 +278,13 @@ var payContainer = new Vue({
                     _self.bankTabIndex = 0
                     _self.payInfo.payType = '1';
                     _self.payInfo.payUserType = 'B2B';
+                    _self.payInfo.payBankNum = _self.bankListB2BData[0].b2B;
                     break;
                 case 3:// 个人网银
                     _self.bankTabIndex = 0
                     _self.payInfo.payType = '2';
                     _self.payInfo.payUserType = 'B2C';
+                    _self.payInfo.payBankNum = _self.bankListB2CData[0].b2C;
                     break;
             }
         },
@@ -320,47 +306,33 @@ var payContainer = new Vue({
                 CAIMEI.dialog('支付系统遇到点小问题,请稍后重试', false);
                 return;
             }
-            if(_self.onlinePay == 2){
-                _self.layerConfirm();
-            }else{
-                if(_self.payAmount == ''){
-                    CAIMEI.dialog('请输入本次支付金额');
-                    return;
-                }
-                if(_self.payAmount == 0){
-                    CAIMEI.dialog('本次支付金额不能为0');
-                    return;
-                }
-                if(_self.payAmount <= 10){
-                    CAIMEI.dialog('网银支付的金额必须大于¥12.00');
-                    return;
+            if(_self.payAmount == ''){
+                CAIMEI.dialog('请输入本次支付金额');
+                return;
+            }
+            if(_self.payAmount == 0){
+                CAIMEI.dialog('本次支付金额不能为0');
+                return;
+            }
+            if(_self.payAmount <= 10){
+                CAIMEI.dialog('网银支付的金额必须大于¥12.00');
+                return;
+            }
+            var params = {};
+            if(_self.pageType == 2){
+                params = {
+                    unpaidAmount:_self.payAmount,
+                    vipRecordId: _self.vipRecordId,
+                    payType:_self.payInfo.payType,
                 }
-                var params = {};
-                if(_self.pageType == 2){
-                    params = {
-                        unpaidAmount:_self.payAmount,
-                        vipRecordId: _self.vipRecordId,
-                        payType:_self.payInfo.payType,
-                    }
-                }else{
-                    params = {
-                        unpaidAmount:_self.payAmount,
-                        orderId:_self.payInfo.payOrderId,
-                        payType:_self.payInfo.payType
-                    }
+            }else{
+                params = {
+                    unpaidAmount:_self.payAmount,
+                    shopOrderId:_self.payInfo.shopOrderId,
+                    payType:_self.payInfo.payType
                 }
-                _self.hlb_CopyLinkPaySubmitFn(params)
             }
-        },
-        copyOrderBtnSubmitFn:function(){//复制订单标识
-            var _self = this;
-            var oInput = document.createElement("textarea");
-            oInput.value = _self.orderIdentificationId;
-            document.body.appendChild(oInput);
-            oInput.select(); // 选择对象
-            document.execCommand("Copy"); // 执行浏览器复制命令
-            document.body.removeChild(oInput);
-            CAIMEI.dialog('复制成功');
+            _self.hlb_CopyLinkPaySubmitFn(params)
         },
         hidePayAlert:function(){//隐藏已支付弹窗
             var _self = this;
@@ -388,7 +360,7 @@ var payContainer = new Vue({
                         }
                     });
                 }else{
-                    PayApi.PayOrderPayWhetherSuccess({orderId: _self.payInfo.payOrderId, paySuccessCounter:_self.paySuccessCounter},function(response){
+                    PayApi.PayOrderPayWhetherSuccess({orderId: _self.payInfo.shopOrderId, paySuccessCounter:_self.paySuccessCounter},function(response){
                         _self.isPayAlert = false;
                         if(response.code === 0){
                             _self.windowLocationHref('success');
@@ -420,7 +392,7 @@ var payContainer = new Vue({
                     },1000)
                 }else{
                     setTimeout(()=>{
-                        window.location.href = '/pay/success.html?pageType=unionPay&type=error&payAmount='+_self.payAmount+'&orderId='+_self.payInfo.payOrderId;
+                        window.location.href = '/pay/success.html?pageType=unionPay&type=error&payAmount='+_self.payAmount+'&orderId='+_self.payInfo.shopOrderId;
                     },1000)
                 }
             });
@@ -457,13 +429,6 @@ var payContainer = new Vue({
         toFixedFn:function(text){//处理小数点后两位数
             return Number(text).toFixed(2);
         },
-        layerConfirm:function(){
-            var _self = this;
-            CAIMEI.Alert('本次交易暂不支持线上支付,请使用线下转账方式付款。','知道了',true,function () {
-                _self.payStatusText = '使用任何一种线上支付方式支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。若着急发货,可以选择使用线下转账进行付款。';
-                _self.isReceiptStatus = true;
-            });
-        }
     },
     mounted: function () {
         var _self = this;
@@ -491,15 +456,7 @@ var payContainer = new Vue({
             this.PayOrderOnLineSwitch();
             this.getBankList();
         }else{
-            var HrefType = CAIMEI.getUrlParam('type');
-            if (HrefType == 'payfirm') {
-                this.payInfo.payOrderId = CAIMEI.getUrlParam('orderId');
-                this.orderIdentificationId = '#' + this.payInfo.payOrderId + '#';
-            } else {
-                var data = JSON.parse(localStorage.getItem("confirmOrderInfo"));
-                this.payInfo.payOrderId = data.data.orderId;
-                this.orderIdentificationId = '#' + this.payInfo.payOrderId + '#';
-            }
+            this.payInfo.shopOrderId = CAIMEI.getUrlParam('shopOrderId');
             // 获取银行列表
             this.getBankList();
             //正常订单初始化

+ 7 - 9
src/main/resources/static/js/pay/caimei-pay.js

@@ -10,7 +10,7 @@ var payContainer = new Vue({
         payInfo:{
             payBankNum:'ICBC_B2B',//银行网管信息
             payCode:'',//链接状态
-            payOrderId:'',//主订单ID
+            shopOrderId:'',//主订单ID
             payUnpaidAmount:0,//本次支付金额
             payTime:'',//链接失效时间
             payLinkLogo:'',
@@ -20,11 +20,10 @@ var payContainer = new Vue({
         },
         payAmount:0,
         iframe:'',
-        bankListData:[],// 银行列表
+        bankListB2BData:[],// 企业网银银行列表
+        bankListB2CData:[],// 个人网银银行列表
         userName :'',
         goodList:'',
-        freight :'',       //运费
-        discountFee:'',//经理折扣
         balancePayFee:'',//余额抵扣
         payTotalFee: '',   //合计
         payableAmount:'',//本次支付金额
@@ -81,7 +80,7 @@ var payContainer = new Vue({
                 if(response.code == 0){
                     var _data = response.data;
                     console.log(_data);
-                    _self.payInfo.payOrderId = _data.orderPayLink.orderId;
+                    _self.payInfo.shopOrderId = _data.orderPayLink.shopOrderId;
                     _self.payInfo.payUnpaidAmount = _self.payAmount = _data.orderPayLink.unpaidAmount;
                     _self.payInfo.payTime = decodeURI(_data.time);
                     _self.payInfo.payLinkType = _data.orderPayLink.payType;
@@ -140,15 +139,13 @@ var payContainer = new Vue({
         },
         infoPayOrderCheckoutCounter:function(){//初始化订单数据
             var _self = this;
-            PayApi.PayOrderCheckoutCounter({orderId:_self.payInfo.payOrderId},function(response){
+            PayApi.PayOrderCheckoutCounter({shopOrderId:_self.payInfo.shopOrderId},function(response){
                 console.log(response);
                 if(response.code == 0){
                     var data = response.data;
                     _self.discernReceiptList = data.discernReceipt;
                     _self.orderProductList = data.orderProductList;
                     _self.userName =  data.userName;
-                    _self.freight =  _self.freightText(data.order.freight);
-                    _self.discountFee =  data.order.discountFee;
                     _self.balancePayFee =  data.order.balancePayFee;
                     _self.payTotalFee =  data.order.payTotalFee;
                     _self.receiptAmount=  data.order.receiptAmount;
@@ -172,7 +169,8 @@ var payContainer = new Vue({
             var _self = this;
             PayApi.PayGetBankCode({},function(response){
                 if(response.code == 0){
-                    _self.bankListData = response.data.list;
+                    _self.bankListB2BData = response.data.B2B;
+                    _self.bankListB2CData = response.data.B2C;
                 }else{
                     console.log('获取网银支付银行列表异常')
                 }

+ 21 - 79
src/main/resources/static/js/pay/caimei-paylist.js

@@ -12,78 +12,7 @@ var payContainer = new Vue({
             payUnpaidAmount:0,//本次支付金额
             payMobileUrl:'',//URL
         },
-        list: [
-            {
-                shopName: '浙江瑞琪',
-                shopLogo: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png',
-                coupon: 20000,
-                paidAmount: 2000,
-                payAmount: 1000,
-                paystaut: 0,
-                cartList: [
-                    {
-                        name: '韩国恩盛进口氢洁气小气泡清韩国恩盛盛进口氢洁气小气泡清气小气泡清气小气泡清',
-                        unit: '10ml/盒',
-                        num: 1,
-                        price: 500000,
-                        productCode: 'SXSASDADA',
-                        image: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png'
-                    },
-                    {
-                        name: '韩国恩盛进口氢洁气小气泡清韩国恩盛盛进口氢洁气小气泡清气小气泡清气小气泡清',
-                        unit: '10ml/盒',
-                        num: 1,
-                        price: 500000,
-                        productCode: 'SXSASDADA',
-                        image: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png'
-                    }
-                ]
-            },
-            {
-                shopName: '华熙生物',
-                shopLogo: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png',
-                coupon: 20000,
-                paidAmount: 2000,
-                payAmount: 1000,
-                paystaut: 0,
-                cartList: [
-                    {
-                        name: '韩国恩盛进口氢洁气小气泡清韩国恩盛盛进口氢洁气小气泡清气小气泡清气小气泡清',
-                        unit: '10ml/盒',
-                        num: 1,
-                        price: 500000,
-                        productCode: 'SXSASDADA',
-                        image: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png'
-                    },
-                    {
-                        name: '韩国恩盛进口氢洁气小气泡清韩国恩盛盛进口氢洁气小气泡清气小气泡清气小气泡清',
-                        unit: '10ml/盒',
-                        num: 1,
-                        price: 500000,
-                        productCode: 'SXSASDADA',
-                        image: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png'
-                    }
-                ]
-            },
-            {
-                shopName: '采美快递物流商',
-                shopLogo: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png',
-                coupon: 0,
-                paidAmount: 0,
-                payAmount: 10,
-                paystaut: 1,
-                cartList: [
-                    {
-                        name: '运费',
-                        unit: '',
-                        num: 1,
-                        price: 10,
-                        image:
-                            'https://www.caimei365.com/uploadFile/product/2020-04-16/DV8ZXHKHIA20200416112227.jpg'
-                    }
-                ]
-            }
-        ],
+        list: [],
         isRequest:false,
         orderIdentificationId:'',
         orderId:0,
@@ -101,15 +30,13 @@ var payContainer = new Vue({
         }
     },
     methods: {
-        infoPayOrderCheckoutCounter:function(){//初始化订单数据
+        PayOrderShoporders:function(){//初始化订单数据
             var _self = this;
-            PayApi.PayOrderCheckoutCounter({orderId:_self.orderId},function(response){
+            PayApi.PayOrderShoporders({orderId:_self.orderId},function(response){
                 if(response.code == 0){
                     // console.log(response);
-                    var data = response.data;
-                    _self.orderNo = data.order.orderNo;
-                    _self.paySuccessCounter = data.order.paySuccessCounter;
-                    _self.payInfo.payAmount = data.order.payableAmount-data.order.receiptAmount;
+                    _self.list = response.data;
+                    _self.PayOrderCheckoutCounter();
                     _self.loginLoading = false;
                     _self.isRequest = true;
                 }else{
@@ -117,6 +44,21 @@ var payContainer = new Vue({
                 }
             })
         },
+        PayOrderCheckoutCounter:function(){//初始化订单数据
+            var _self = this;
+            PayApi.PayOrderCheckoutCounter({orderId:_self.orderId},function(response){
+                if(response.code == 0){
+                    // console.log(response);
+                    var data = response.data; //金额初始化
+                    _self.paidAmount =  (data.order.payableAmount-data.order.receiptAmount).toFixed(2);
+                }else{
+                    CAIMEI.Alert(response.msg,'确定',false);
+                }
+            })
+        },
+        handlePayOrder:function (shopOrderId) {
+            window.location.href = '/pay/caimei-hlbpay.html?shopOrderId='+shopOrderId;
+        },
         copyOrderBtnSubmitFn:function(){//复制订单标识
             var _self = this;
             var oInput = document.createElement("textarea");
@@ -142,6 +84,6 @@ var payContainer = new Vue({
         _self.orderId = CAIMEI.getUrlParam('orderId');
         _self.orderIdentificationId = '#'+ _self.orderId+'#';
         console.log(_self.payInfo.payType);
-        _self.infoPayOrderCheckoutCounter();
+        _self.PayOrderShoporders();
     }
 });

+ 26 - 15
src/main/resources/static/js/pay/caimei-paymobile.js

@@ -7,12 +7,13 @@ var payContainer = new Vue({
         loginLoading:true,
         payInfo:{
             payType:'',//支付类型 WEIXIN 微信支付  ALIPAY 支付宝支付
-            payOrderId:'', //订单ID
+            shopOrderId:'', //订单ID
             payAmount:0,
             payUnpaidAmount:0,//本次支付金额
             payMobileUrl:'',//URL
         },
         orderNo:'',//订单编号
+        shopName:'',// 收款方
         payableAmount:'',//应付金额
         receiptAmount:'',//已支付金额
         balanceAmount:'',//应付剩余金额
@@ -29,6 +30,7 @@ var payContainer = new Vue({
         productID:'',//商品ID
         duration: 0, // 购买的会员期限
         mbOrderId:0,
+        orderFlag:1,// 是否是订单  0非订单 1订单
         couponRecordId:0,
         vipId: null, // vip套餐id
         vipRecordId: undefined,
@@ -58,6 +60,7 @@ var payContainer = new Vue({
         infoPayOrderCheckoutCounter:function(){//初始化订单数据
             var _self = this;
             if( _self.pageType === '1' || _self.pageType === '2' || _self.pageType === '3'){
+                console.log('1111111111111')
                 setTimeout(function(){
                     switch (_self.payInfo.payType) {
                         case 'WEIXIN':
@@ -69,13 +72,15 @@ var payContainer = new Vue({
                     }
                 }, 2000);
             } else {
-                PayApi.PayOrderCheckoutCounter({orderId:_self.payInfo.payOrderId},function(response){
+                console.log('22222222222')
+                PayApi.PayOrderCheckoutShoporders({shopOrderId:_self.payInfo.shopOrderId},function(response){
                     if(response.code == 0){
                         // console.log(response);
                         var data = response.data;
-                        _self.orderNo = data.order.orderNo;
-                        _self.paySuccessCounter = data.order.paySuccessCounter;
-                        _self.payInfo.payAmount = data.order.payableAmount-data.order.receiptAmount;
+                        _self.orderNo = data.shopOrder.orderNo;
+                        _self.shopName = data.shopOrder.shopName;
+                        _self.paySuccessCounter = data.shopOrder.paySuccessCounter;
+                        _self.payInfo.payAmount = data.shopOrder.realPay - data.shopOrder.receiptAmount;
                         switch (_self.payInfo.payType) {
                             case 'WEIXIN':
                                 _self.getWrchatQrcodeShow();
@@ -142,7 +147,7 @@ var payContainer = new Vue({
             } else {
                 orderInfo = {//普通订单微信二维码参数
                     pageType:0,
-                    orderID:_self.payInfo.payOrderId,
+                    orderID:_self.payInfo.shopOrderId,
                     payAmount:_self.payAmount
                 };
             }
@@ -203,7 +208,7 @@ var payContainer = new Vue({
                     }
                 });
             }else{
-                PayApi.PayOrderPayWhetherSuccess({orderId: _self.payInfo.payOrderId, paySuccessCounter:_self.paySuccessCounter},function(response){
+                PayApi.PayOrderPayWhetherSuccess({orderId: _self.payInfo.shopOrderId, paySuccessCounter:_self.paySuccessCounter},function(response){
                     // console.log(response);
                     if(response.code === 0){
                         CAIMEI.dialog('支付成功');
@@ -223,9 +228,9 @@ var payContainer = new Vue({
         setTimerAliPay:function () {//定时任务查询支付宝支付结果
             var _self = this;
             var timer;
-            PayApi.PayOrderFindOrderStatus({mbOrderId:_self.mbOrderId},function(response){
-                var data = response.data.data;
-                if(data.status === '1'){
+            PayApi.PayOrderFindOrderStatus({mbOrderId:_self.mbOrderId,orderFlag:_self.orderFlag},function(response){
+                var data = response.data;
+                if(data.rt7_orderStatus === 'SUCCESS'){
                     CAIMEI.dialog('支付成功');
                     clearTimeout(timer); //清理定时任务
                     setTimeout(function(){
@@ -251,25 +256,30 @@ var payContainer = new Vue({
         var payData = JSON.parse(CAIMEI.Storage.getItem('payData'));
         _self.pageType = CAIMEI.getUrlParam('pageType');
         _self.duration = CAIMEI.getUrlParam('duration');
-        if( _self.pageType === '1'){
+        if( _self.pageType === '1'){//二手
             console.log('二手商品');
             _self.payInfo.payType = payData.type;
+            _self.orderFlag = 0;
             _self.productID = payData.productId;
             _self.payInfo.payMobileUrl = payData.url;
             _self.mbOrderId = payData.mbOrderId;
             _self.payAmount = _self.payableAmount = payData.amount;
-        }else if(_self.pageType === '2'){
+        }else if(_self.pageType === '2'){// 超级会员
             _self.payInfo.payType = payData.type;
+            _self.orderFlag = 0;
             _self.payAmount = _self.payableAmount = payData.amount;
+            _self.mbOrderId = payData.mbOrderId;
             _self.payInfo.payMobileUrl = payData.url;
             _self.vipId = payData.vipId;
             _self.vipRecordId = payData.vipRecordId;
             if(!_self.duration) { // 微信支付获取会员开通月份
                 _self.duration = payData.duration;
             }
-        }else if(_self.pageType === '3'){
+        }else if(_self.pageType === '3'){// 优惠券
             _self.payInfo.payType = payData.type;
+            _self.orderFlag = 0;
             _self.payAmount = _self.payableAmount = payData.amount;
+            _self.mbOrderId = payData.mbOrderId;
             _self.couponRecordId = payData.couponRecordId;
             _self.payInfo.payMobileUrl = payData.url;
             _self.couponId = payData.couponId;
@@ -277,10 +287,11 @@ var payContainer = new Vue({
         }else{
             console.log('订单支付');
             _self.payInfo.payType = payData.type;
-            _self.payInfo.payOrderId = payData.orderid;
+            _self.orderFlag = 1;
+            _self.mbOrderId = payData.mbOrderId;
+            _self.payInfo.shopOrderId = payData.shopOrderId;
             _self.payInfo.payUnpaidAmount = payData.amount;
             _self.payInfo.payMobileUrl = payData.url;
-            _self.mbOrderId = payData.mbOrderId;
             _self.payAmount =_self.payableAmount = _self.payInfo.payUnpaidAmount;
         }
         console.log(_self.payInfo.payType);

+ 6 - 6
src/main/resources/static/js/pay/caimei-wechatpay.js

@@ -6,7 +6,7 @@ var payContainer = new Vue({
     mixins: [mhWechatMixin,hlbWechatMixin],
     data: {
         paymentChannel:'HLB',
-        orderID:'',
+        shopOrderId:0,
         pageType:0,//页面跳转类型 0:订单 1:二手 2:超级会员 3:优惠券 4:认证通会员
         payAmount:0,//本次支付金额
         wechatcode:'',//微信code
@@ -25,10 +25,10 @@ var payContainer = new Vue({
     methods: {
         infoPayOrderCheckoutCounter:function(){//初始化订单数据
             var _this = this;
-            // _this.wechatcode = CAIMEI.getUrlParam('code');
-            // _this.state = JSON.parse(decodeURIComponent(CAIMEI.getUrlParam('state')));
-            // _this.payAmount = _this.state.payAmount;
-            // _this.pageType = _this.state.pageType;
+            _this.wechatcode = CAIMEI.getUrlParam('code');
+            _this.state = JSON.parse(decodeURIComponent(CAIMEI.getUrlParam('state')));
+            _this.payAmount = _this.state.payAmount;
+            _this.pageType = _this.state.pageType;
             _this.isRequest = true;
             if( _this.pageType == 1){
                 _this.productId = _this.state.productId;
@@ -40,7 +40,7 @@ var payContainer = new Vue({
                 _this.couponRecordId = _this.state.couponRecordId;
                 _this.userId = _this.state.userId;
             }else{
-                _this.orderID = _this.state.orderID;
+                _this.shopOrderId = _this.state.shopOrderId;
             }
         },
         WxPaySubmit:function(){

+ 48 - 31
src/main/resources/static/js/pay/mixin/hlb_payMixin.js

@@ -10,7 +10,7 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 					payAmount:_this.payAmount,
 					bankCode:_this.payInfo.payBankNum,
 					returnUrl:'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_this.payAmount,
-					orderId:_this.payInfo.payOrderId,
+					shopOrderId:_this.payInfo.shopOrderId,
 					userType:_this.payInfo.payUserType
 				};
 				_this.isSubMitStatus=true;
@@ -19,11 +19,14 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 					if(response.code == 0){
 						// _this.isPayAlert = true;
 						_this.iframe = response.data
-						setTimeout(function () {
+						_this.$nextTick(() => {
 							var onlineForm = document.getElementById('onlineForm');
+							onlineForm.setAttribute('target', '_blank')
+							_this.mbOrderId = onlineForm.P2_orderId.value
+							console.log('mbOrderId',_this.mbOrderId)
 							_this.isSubMitStatus=false;
 							onlineForm.submit();
-						},2000)
+						})
 					}else{
 						_this.isSubMitStatus=false;
 						CAIMEI.Alert(response.msg,'确定',false);
@@ -36,7 +39,7 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 					payType:'ZFBEWM',
 					payAmount:_this.payAmount,
 					returnUrl:'https://www.caimei365.com/',
-					orderId:_this.payInfo.payOrderId
+					shopOrderId:_this.payInfo.shopOrderId
 				};
 				_this.isSubMitStatus=true;
 				console.log('正常订单支付宝通道',params)
@@ -50,7 +53,7 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 						_this.payInfo.payData = {
 							mbOrderId:_this.mbOrderId,
 							type:_this.payInfo.payBankNum,
-							orderid:_this.payInfo.payOrderId,
+							shopOrderId:_this.payInfo.shopOrderId,
 							amount:_this.payAmount,
 							url:_this.payInfo.payMobileUrl
 						};
@@ -58,7 +61,7 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 						if(!isPC){
 							location.href = _this.payInfo.payMobileUrl;
 						}else{
-							window.open("/pay/caimei-paymobile.html?pageType=1");
+							window.open("/pay/caimei-paymobile.html?pageType=0");
 						}
 					}else{
 						CAIMEI.Alert(response.msg,'确定',false);
@@ -72,7 +75,7 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 				if(!isPC){
 					var orderInfo = {//正常订单微信二维码参数
 						pageType:0,
-						orderID:_this.payInfo.payOrderId,
+						shopOrderId:_this.payInfo.shopOrderId,
 						payAmount:_this.payAmount
 					};
 					_this.payInfo.payMobileUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx91c4152b60ca91a3&redirect_uri=https://www.caimei365.com/pay/wechatpay.html&response_type=code&scope=snsapi_base&state="+JSON.stringify(orderInfo)+"#wechat_redirect";
@@ -80,7 +83,7 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 				}else{
 					_this.payInfo.payData = {//正常订单
 						type:_this.payInfo.payBankNum,
-						orderid:_this.payInfo.payOrderId,
+						shopOrderId:_this.payInfo.shopOrderId,
 						amount:_this.payAmount,
 						url:_this.payInfo.payMobileUrl
 					};
@@ -93,20 +96,26 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 				console.log('网银支付购买优惠券');
 				var _this = this;
 				var params = {
+					source:2, //支付来源 1 小程序 2 WWW
+					payType:'YL',
+					userId:_this.userId,
+					couponId: _this.couponId,
+					couponRecordId:_this.couponRecordId,
 					bankCode: this.payInfo.payBankNum,
 					returnUrl: 'https://www.caimei365.com/pay/success.html?pageType=www&type=success&payAmount='+_this.couponInfo.moneyCouponPrice,
 					userType: _this.payInfo.payUserType,
-					couponId: _this.couponId,
-					couponRecordId:_this.couponRecordId,
-					userId:_this.userId,
-					source:2 //支付来源 1 小程序 2 WWW
 				};
 				PayApi.PayCouponUnionPay(params, function (response) {
 					if (response.code == 0) {
-						_this.isPayAlert = true;
-						_this.isSubMitStatus = false;
-						_this.mbOrderId = response.data.data.mbOrderId;
-						window.open(response.data.data.payUrl);
+						_this.iframe = response.data
+						_this.$nextTick(() => {
+							var onlineForm = document.getElementById('onlineForm');
+							onlineForm.setAttribute('target', '_blank')
+							_this.mbOrderId = onlineForm.P2_orderId.value
+							console.log('mbOrderId',_this.mbOrderId)
+							_this.isSubMitStatus=false;
+							onlineForm.submit();
+						})
 					} else {
 						_this.isSubMitStatus = false;
 						CAIMEI.Alert(response.msg, '确定', false);
@@ -143,18 +152,19 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 				var _this = this;
 				console.log('支付宝支付优惠券');
 				var params = {
-					returnUrl: 'https://www.caimei365.com/',
-					couponId: _this.couponInfo.couponId,
+					source:2, //支付来源 1 小程序 2 WWW
+					payType:'ZFBEWM',
 					userId:_this.userId,
+					couponId: _this.couponInfo.couponId,
 					couponRecordId:_this.couponRecordId,
-					source:2 //支付来源 1 小程序 2 WWW
+					returnUrl: 'https://www.caimei365.com/',
 				};
-				PayApi.PayCouponMiniAliPay(params, function(response){
+				PayApi.PayCouponMiniScanAliPay(params, function(response){
 					console.log(response);
 					if (response.code === 0) {
 						_this.isPayAlert = true;
-						_this.mbOrderId = response.data.data.mbOrderId;
-						_this.payInfo.payMobileUrl = response.data.data.payUrl;
+						_this.mbOrderId = response.data.rt5_orderId;
+						_this.payInfo.payMobileUrl = response.data.rt8_qrcode;
 						_this.payInfo.payData = {
 							type: _this.payInfo.payBankNum,
 							mbOrderId: _this.mbOrderId,
@@ -188,11 +198,14 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 				PayApi.PayVipPcMallPay(params, function (response) {
 					if (response.code == 0) {
 						_this.iframe = response.data
-						setTimeout(function () {
+						_this.$nextTick(() => {
 							var onlineForm = document.getElementById('onlineForm');
+							onlineForm.setAttribute('target', '_blank')
+							_this.mbOrderId = onlineForm.P2_orderId.value
+							console.log('mbOrderId',_this.mbOrderId)
 							_this.isSubMitStatus=false;
 							onlineForm.submit();
-						},2000)
+						})
 					} else {
 						_this.isSubMitStatus = false;
 						CAIMEI.Alert(response.msg, '确定', false);
@@ -202,10 +215,11 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 			hlb_PayVipScanAliPay: function(){ // 超级会员支付宝通道
 				var _this = this;
 				var params = {
+					payType:'ZFBEWM',
+					vipRecordId: _this.vipRecordId,
 					bankCode: _this.payInfo.payBankNum,
-					returnUrl: 'https://www.caimei365.com/',
 					userType: _this.payInfo.payUserType,
-					vipRecordId: _this.vipRecordId
+					returnUrl: 'https://www.caimei365.com/',
 				};
 				_this.isSubMitStatus = true;
 				PayApi.PayVipScanAliPay(params, function(response){
@@ -213,8 +227,8 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 					if (response.code === 0) {
 						_this.isPayAlert = true;
 						_this.isSubMitStatus = false;
-						_this.mbOrderId = response.data.data.mbOrderId;
-						_this.payInfo.payMobileUrl = response.data.data.payUrl;
+						_this.mbOrderId = response.data.rt5_orderId;
+						_this.payInfo.payMobileUrl = response.data.rt8_qrcode;
 						_this.payInfo.payData = {
 							mbOrderId: _this.mbOrderId,
 							type: _this.payInfo.payBankNum,
@@ -270,11 +284,14 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 				PayApi.PayOrdersecondUnion(params,function(response){
 					if(response.code == 0){
 						_this.iframe = response.data
-						setTimeout(function () {
+						_this.$nextTick(() => {
 							var onlineForm = document.getElementById('onlineForm');
+							onlineForm.setAttribute('target', '_blank')
+							_this.mbOrderId = onlineForm.P2_orderId.value
+							console.log('mbOrderId',_this.mbOrderId)
 							_this.isSubMitStatus=false;
 							onlineForm.submit();
-						},2000)
+						})
 					}else{
 						CAIMEI.Alert(response.msg,'确定',false);
 						_this.isSubMitStatus=false;
@@ -336,7 +353,7 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 				var _this = this;
 				console.log('合利宝支付链接');
 				PayApi.PayOrderPayLink(params,function(response){
-						_self.bankPayLink_url = response.data;
+						_this.bankPayLink_url = response.data;
 						var oInput = document.createElement("textarea");
 						oInput.value = _this.bankPayLink_url;
 						document.body.appendChild(oInput);

+ 1 - 1
src/main/resources/static/js/pay/mixin/hlb_wxMixin.js

@@ -10,7 +10,7 @@ var hlbWechatMixin = function () {
 					payAmount:Math.round(_this.payAmount*100),
 					code:_this.wechatcode,
 					state:_this.rand(1000,9999),
-					orderId:_this.orderID,
+					shopOrderId:_this.shopOrderId,
 					returnUrl:'https://www.caimei365.com/',
 				};
 				console.log('=========>普通订单合利宝公众号支付',params)

+ 1 - 1
src/main/resources/static/js/product/detail.js

@@ -740,7 +740,7 @@ var productDetail = new Vue({
             ProductApi.createCouponRecord({userId:_self.listQuery.userId, couponId:coupon.couponId}, function (response) {
                 if(response.code == 0){
                     let couponRecordId = response.data.couponRecordId
-                    window.location.href = '/pay/caimei-paycash.html?pageType=3&couponId='+coupon.couponId+'&couponRecordId='+couponRecordId;
+                    window.location.href = '/pay/caimei-hlbpay.html?pageType=3&couponId='+coupon.couponId+'&couponRecordId='+couponRecordId;
                 }else{
                     if(response.code == -1){//个人机构不能购买
                         CAIMEI.Alert('该优惠券仅限医美机构购买,请升级为医美机构后再次购买。', '去升级', true, function(){

+ 1 - 1
src/main/resources/static/js/shopping/cart.js

@@ -537,7 +537,7 @@ var shoppingCart = new Vue({
             ProductApi.createCouponRecord({userId:_self.userId, couponId:coupon.couponId}, function (response) {
                 if(response.code == 0){
                     let couponRecordId = response.data.couponRecordId
-                    window.location.href = '/pay/caimei-paycash.html?pageType=3&couponId='+coupon.couponId+'&couponRecordId='+couponRecordId;
+                    window.location.href = '/pay/caimei-hlbpay.html?pageType=3&couponId='+coupon.couponId+'&couponRecordId='+couponRecordId;
                 }else{
                     if(response.code == -1){//个人机构不能购买
                         CAIMEI.Alert('该优惠券仅限医美机构购买,请升级为医美机构后再次购买。', '去升级', true, function(){

+ 15 - 10
src/main/resources/static/js/shopping/confirm.js

@@ -724,7 +724,7 @@ var shoppingConfirm = new Vue({
                         productType:item.giftType
                     })
                 })
-                return {shopId:el.shopId,note:el.note?el.note:'',productInfo:productInfo}
+                return {splitCode:el.splitCode,shopId:el.shopId,note:el.note?el.note:'',productInfo:productInfo}
             });
             if(_self.orderInvoice.type!=0){
                 _self.orderInvoice.type = parseInt(_self.orderInvoice.type)
@@ -746,15 +746,20 @@ var shoppingConfirm = new Vue({
                         CAIMEI.Storage.setItem('confirmOrderInfo',JSON.stringify({data:Amount}));
                         window.location.href = '/pay/success.html?pageType=www&type=success&payAmount='+data.payTotalFee;
                     }else{//余额抵扣部分订单金额或者未支付的
-                        var order = {
-                            orderId:data.orderId,
-                            orderNo:data.orderNo,
-                            orderMark:data.orderMark,
-                            payableAmount:data.payableAmount
-                        };
-                        CAIMEI.Storage.removeItem('confirmOrderInfo');
-                        CAIMEI.Storage.setItem('confirmOrderInfo',JSON.stringify({data:order}));
-                        window.location.href = '/pay/caimei-paycash.html?type=confirm&orderId='+data.orderId;
+                        if(data.onlinePayFlag === 1){// 走线下支付
+                            window.location.href = '/pay/caimei-payunder.html?orderId='+data.orderId;
+                        }else{
+                            var order = {
+                                orderId:data.orderId,
+                                orderNo:data.orderNo,
+                                orderMark:data.orderMark,
+                                payableAmount:data.payableAmount
+                            };
+                            CAIMEI.Storage.removeItem('confirmOrderInfo');
+                            CAIMEI.Storage.setItem('confirmOrderInfo',JSON.stringify({data:order}));
+                            window.location.href = '/pay/caimei-paylist.html?orderId='+data.orderId;
+                        }
+
                     }
                 }else if(res.code === -3){
                     _self.isModelAlert = true;

+ 1 - 1
src/main/resources/static/js/user-center/account/coupon-collection.js

@@ -110,7 +110,7 @@ var orderPage = new Vue({
                 ProductApi.createCouponRecord({userId:_self.listQuery.userId, couponId:coupon.couponId}, function (response) {
                     if(response.code == 0){
                         let couponRecordId = response.data.couponRecordId
-                        window.location.href = '/pay/caimei-paycash.html?pageType=3&couponId='+coupon.couponId+'&couponRecordId='+couponRecordId;
+                        window.location.href = '/pay/caimei-hlbpay.html?pageType=3&couponId='+coupon.couponId+'&couponRecordId='+couponRecordId;
                     }else{
                         if(response.code == -1){//个人机构不能购买
                             CAIMEI.Alert('该优惠券仅限医美机构购买,请升级为医美机构后再次购买。', '去升级', true, function(){

+ 1 - 1
src/main/resources/static/js/user-center/member/memberPage.js

@@ -142,7 +142,7 @@ var memberPage = new Vue({
                     console.log(response);
                     //本地保存一下选中的会员套餐信息
                     window.localStorage.setItem('comboInfo', JSON.stringify(currentCombo));
-                    window.open('/pay/caimei-paycash.html?pageType=2&vipRecordId=' + response.data);
+                    window.open('/pay/caimei-hlbpay.html?pageType=2&vipRecordId=' + response.data);
                     _self.showRenewPopup = false;
                     _self.showMask = false;
                     // this.showConfirmPopup = true;

+ 3 - 3
src/main/resources/static/js/user-center/order/detail.js

@@ -206,7 +206,7 @@ var orderPage = new Vue({
                                 _self.modelType = 3;
                                 window.location.href = '/pay/caimei-payunder.html?orderId='+_self.orderId;
                             }else{
-                                window.location.href = '/pay/caimei-hlbpay.html?type=payfirm&orderId='+_self.orderId;
+                                window.location.href = '/pay/caimei-paylist.html?&orderId='+_self.orderId;
                             }
                     }
                 }else{
@@ -225,7 +225,7 @@ var orderPage = new Vue({
                             _self.modelType = 3;
                             window.location.href = '/pay/caimei-payunder.html?orderId='+_self.orderId;
                         } else {
-                            window.location.href = '/pay/caimei-hlbpay.html?type=payfirm&orderId='+_self.orderId;
+                            window.location.href = '/pay/caimei-paylist.html?orderId='+_self.orderId;
                         }
                     }
                 } else {
@@ -239,7 +239,7 @@ var orderPage = new Vue({
                 _self.modelType = 3;
                 window.location.href = '/pay/caimei-payunder.html?orderId='+_self.orderId;
             }else{
-                window.location.href = '/pay/caimei-hlbpay.html?type=payfirm&orderId='+_self.orderId;
+                window.location.href = '/pay/caimei-paylist.html?orderId='+_self.orderId;
             }
         },
         hidePaymentConfirm:function(){//隐藏弹窗

+ 4 - 4
src/main/resources/static/js/user-center/order/list.js

@@ -283,7 +283,7 @@ var orderPage = new Vue({
                                 _self.modelType = 3;
                                 window.location.href = '/pay/caimei-payunder.html?orderId='+orderId;
                             }else{
-                                window.location.href = '/pay/caimei-hlbpay.html?type=payfirm&orderId='+orderId;
+                                window.location.href = '/pay/caimei-paylist.html?orderId='+orderId;
                             }
                     }
                 }else{
@@ -302,7 +302,7 @@ var orderPage = new Vue({
                             _self.modelType = 3;
                             window.location.href = '/pay/caimei-payunder.html?orderId='+_self.hanldOrderData.orderId;
                         } else {
-                            window.location.href = '/pay/caimei-hlbpay.html?type=payfirm&orderId='+_self.hanldOrderData.orderId;
+                            window.location.href = '/pay/caimei-paylist.html?orderId='+_self.hanldOrderData.orderId;
                         }
                     }
                 } else {
@@ -312,11 +312,11 @@ var orderPage = new Vue({
         },
         hanldCancelConfirm:function(){//不使用余额抵扣直接跳转收银台
             var _self = this;
-            if(_self.hanldOrderData.onlinePayFlag == 2){
+            if(_self.hanldOrderData.onlinePayFlag == 1){
                 _self.modelType = 3;
                 window.location.href = '/pay/caimei-payunder.html?orderId='+_self.hanldOrderData.orderId;
             }else{
-                window.location.href = '/pay/caimei-hlbpay.html?type=payfirm&orderId='+_self.hanldOrderData.orderId;
+                window.location.href = '/pay/caimei-paylist.html?orderId='+_self.hanldOrderData.orderId;
             }
         },
         hidePaymentConfirm:function(){//隐藏弹窗

+ 3 - 3
src/main/resources/templates/pay/caimei-hlbpay.html

@@ -56,7 +56,7 @@
             <template v-else>
                 <div class="pay-title">
                     <div class="title-money big">
-                        <p class="pay-money-big">待付金额:<span class="red" id="paidAmount">¥{{paidAmount | NumFormat}}</span></p>
+                        <p class="pay-money-big">待付金额:<span class="red" id="obligation">¥{{obligation | NumFormat}}</span></p>
                     </div>
                     <div class="title-money">
                         <p>应付总额:<span id="payableAmount">¥{{payableAmount | NumFormat}}</span></p>
@@ -118,14 +118,14 @@
                         </div>
                         <div class="pay-bank"  v-if="mobileTabIndex === 2 && isPC">
                             <div class="bank-list mfw" id="bankContent">
-                                <a href="javascript:void(0);" v-if="item.b2B!=''" class="bank-b mIcon" v-for="(item, index) in bankListData" :key="index" :class="{ active: bankTabIndex === index }"  @click="checkBankPay(index,item)">
+                                <a href="javascript:void(0);" class="bank-b mIcon" v-for="(item, index) in bankListB2BData" :key="index" :class="{ active: bankTabIndex === index }"  @click="checkBankPay(index,item)">
                                     <img :src="item.bankLogo" :alt="item.bankName">
                                 </a>
                             </div>
                         </div>
                         <div class="pay-bank"  v-if="mobileTabIndex === 3 && isPC">
                             <div class="bank-list mfw" id="bankB2CContent">
-                                <a href="javascript:void(0);" v-if="item.b2C!=''" class="bank-b mIcon" v-for="(item, index) in bankListData" :key="index" :class="{ active: bankTabIndex === index }"  @click="checkBankPay(index,item)">
+                                <a href="javascript:void(0);" class="bank-b mIcon" v-for="(item, index) in bankListB2CData" :key="index" :class="{ active: bankTabIndex === index }"  @click="checkBankPay(index,item)">
                                     <img :src="item.bankLogo" :alt="item.bankName">
                                 </a>
                             </div>

+ 1 - 2
src/main/resources/templates/pay/caimei-pay.html

@@ -95,8 +95,7 @@
                     <div class="good-top">
                         <div class="good-top-inner">
                             <div class="bot-right">
-                                <div class="bot-num"><span>运费:</span><span class="p" id="freight">{{freight}}</span></div>
-                                <div class="bot-num"><span>经理折扣:</span><span class="p" id="discountFee">¥{{discountFee | NumFormat}}</span></div>
+                                <div class="bot-num"><span>优惠:</span><span class="p" id="discountFee">¥{{discountFee | NumFormat}}</span></div>
                                 <div class="bot-num"><span>余额抵扣:</span><span class="p" id="balancePayFee">¥{{balancePayFee | NumFormat}}</span></div>
                                 <div class="bot-num"><span>合计:</span><span class="red" id="payTotalFee">¥{{payTotalFee | NumFormat}}</span></div>
                             </div>

+ 10 - 10
src/main/resources/templates/pay/caimei-paylist.html

@@ -37,7 +37,7 @@
                     </div>
                     <div class="list-cell-name" v-text="list.shopName"></div>
                 </div>
-                <div class="list-cell-content clear" v-for="(pros, prosIndex) in list.cartList" :key="prosIndex">
+                <div class="list-cell-content clear" v-for="(pros, prosIndex) in list.orderProductList" :key="prosIndex">
                     <div class="list-cell-pros p1">
                         <div class="cell-pros-image">
                             <img :src="pros.image" alt="">
@@ -56,22 +56,22 @@
                     </div>
                     <div class="list-cell-pros p4">
                         <span v-if="!isPC">小计(元):</span>
-                        <p>¥{{pros.price | NumFormat}}</p>
+                        <p>¥{{pros.totalAmount | NumFormat}}</p>
                     </div>
                 </div>
                 <div class="list-cell-button">
                     <div class="list-cell-vleft btn">
-                        <div class="list-cell-btn" v-if="list.paystaut == 0">支付</div>
-                        <div class="list-cell-msg" v-if="list.paidAmount>0">
-                            待付:<span class="red">¥{{list.paidAmount | NumFormat}}</span>
+                        <div class="list-cell-btn" v-if="list.receiptStatus != 3" @click="handlePayOrder(list.shopOrderId)">支付</div>
+                        <div class="list-cell-msg" v-if="list.obligation>0">
+                            待付:<span class="red">¥{{list.obligation | NumFormat}}</span>
                         </div>
                     </div>
                     <div class="list-cell-vleft">
-                        <div class="list-cell-msg" v-if="list.payAmount>0">
-                            已付:<span>¥{{list.payAmount | NumFormat}}</span>
+                        <div class="list-cell-msg" v-if="list.receiptAmount>0">
+                            已付:<span>¥{{list.receiptAmount | NumFormat}}</span>
                         </div>
-                        <div class="list-cell-msg" v-if="list.coupon>0">
-                            优惠:<span>¥{{list.coupon | NumFormat}}</span>
+                        <div class="list-cell-msg" v-if="list.eachDiscount>0">
+                            优惠:<span>¥{{list.eachDiscount | NumFormat}}</span>
                         </div>
                     </div>
                 </div>
@@ -84,7 +84,7 @@
             <div class="content">
                 <div class="content-top">
                     <div class="content-viw">
-                        待付金额:<span class="red">¥1600.00</span>
+                        待付金额:<span class="red">¥{{ paidAmount | NumFormat }}</span>
                     </div>
                     <div class="content-viw">
                         开户行:<span>中信银行(深圳泰然支行)</span>

+ 8 - 2
src/main/resources/templates/pay/caimei-paymobile.html

@@ -26,7 +26,10 @@
                     <div class="pay-amount-text">
                         <p v-if="pageType == '2'">超级会员套餐:{{ duration }}个月 </p>
                         <p>交易金额: <span>¥{{payAmount | NumFormat}}</span> </p>
-                        <p>收款方: <span>深圳市采美信息技术有限公司</span> </p>
+                        <template>
+                            <p v-if="pageType == '2' || pageType == '3'">收款方: <span>深圳市采美信息技术有限公司</span> </p>
+                            <p v-else>收款方: <span>{{ shopName }}</span> </p>
+                        </template>
                         <p v-if="pageType!='1' && pageType!='2' && pageType!='3'">订单号: <span>{{orderNo}}</span> </p>
                     </div>
                     <div class="pay-amount-icon"><img src="/img/pay/icon-pay@2x.png" alt=""></div>
@@ -54,7 +57,10 @@
                     <div class="pay-amount-text">
                         <p v-if="pageType == '2'">超级会员套餐:{{ duration }}个月 </p>
                         <p>交易金额: <span>¥{{payAmount | NumFormat}}</span> </p>
-                        <p>收款方: <span>深圳市采美信息技术有限公司</span> </p>
+                        <template>
+                            <p v-if="pageType == '2' || pageType == '3'">收款方: <span>深圳市采美信息技术有限公司</span> </p>
+                            <p v-else>收款方: <span>{{ shopName }}</span> </p>
+                        </template>
                         <p v-if="pageType!='1' && pageType!='2' && pageType!='3'">订单号: <span>{{orderNo}}</span> </p>
                     </div>
                     <div class="pay-amount-icon"><img src="/img/pay/icon-pay@2x.png" alt=""></div>

+ 4 - 4
src/main/resources/templates/user-center/order/detail.html

@@ -153,11 +153,11 @@
                                 </div>
                                 <div class="shopinfo-bott clear">
                                     <p v-if="shop.totalAmount>0">商品总额:<span class="none" >{{shop.totalAmount }}</span> </p>
-                                    <p v-if="shop.totalAmount>0">优惠:<span class="none">¥{{shop.totalAmount | NumFormat}}</span> </p>
+                                    <p v-if="shop.totalAmount>0">优惠:<span class="none">¥{{shop.eachDiscount | NumFormat}}</span> </p>
                                     <p v-if="shop.totalAmount>0">余额抵扣:<span class="none">¥{{shop.totalAmount | NumFormat}}</span> </p>
-                                    <p v-if="shop.totalAmount>0">应付金额:<span class="none">¥{{shop.totalAmount | NumFormat}}</span> </p>
-                                    <p v-if="shop.totalAmount>0">已付金额:<span class="none">¥{{shop.totalAmount | NumFormat}}</span> </p>
-                                    <p v-if="shop.totalAmount>0">待付金额:<span class="red">¥{{shop.totalAmount | NumFormat}}</span> </p>
+                                    <p v-if="shop.totalAmount>0">应付金额:<span class="none">¥{{shop.realPay | NumFormat}}</span> </p>
+                                    <p v-if="shop.totalAmount>0">已付金额:<span class="none">¥{{shop.receiptAmount | NumFormat}}</span> </p>
+                                    <p v-if="shop.totalAmount>0">待付金额:<span class="red">¥{{shop.obligation | NumFormat}}</span> </p>
                                 </div>
                                 <div class="shopinfo-note" v-if="shop.note" >
                                     <p>备注:{{shop.note ? shop.note : '无'}}</p>