onlinePayment.js 2.91 KB
layui.use('element', function () {
    let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
});
$(function () {
    addTabs('#wssq');
    setAcceptFlow(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
    if (business.sqfs=='1') {
        $('#sqfs').text('单方申请')
    }else {
        $('#sqfs').text('双方申请')
    }
    _getSfxx(GetQueryString('bsm_slsq'));
    list = getApplyRecord(GetQueryString('bsm_slsq'),GetQueryString('businessno'));
    if(list.ajzt !='4' || list.ajzt !='5') {
        $('#submitButton').append('<button type="button" class="layui-btn layui-btn-normal">下一步</button>')
    }
})
// layui.use('layer', function () {
//     layer.open({
//         type: 1,
//         title: false,
//         closeBtn: 0,
//         shade:0,
//         shadeClose: true,
//         skin: 'paymentSuccess',
//         btn: ['下一步'],
//         yes : function() {
//             skipNextPage(GetQueryString('bsm_slsq'),GetQueryString('businessno'));
//         },
//         content: '<ul>'
//             + '<li><img src="../../staticImages/xuanzhong.png"></li>'
//             + '<li>支付成功</li>'
//             + '<li class="info"><span>支付流水号:</span><p>9898989989</p></li>'
//             + '<li class="info"><span>支付时间:</span><p>2023255-102-13</p></li>'
//             + '<li class="info"><span>支付金额:</span><p>600元</p></li>'
//             + '</ul>'
//     });
// })
$('.payment_channel_con li').click(function () {
    $('.payment_channel_con li').removeClass()
    $(this).addClass('payActive')
})
$('.payment_channel_con li').click(function () {
    $('.payment_channel_con li').removeClass('payActive');
    $(this).addClass('payActive');
    let index = $(this).index()
    $('.codeShowImg').show()
    if (index == 0) {
        $('.codeShowImg').attr('src', '../../staticImages/weixinShow.png')
        $('.paymentText').text('打开手机微信')
    } else {
        $('.codeShowImg').attr('src', '../../staticImages/alipayShow.png')
        $('.paymentText').text('打开手机支付宝')
    }
})
$(document).on("click", ".submitButton button", function (e) {
    skipNextPage(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
})
// 获取缴费信息
function _getSfxx(bsm_slsq) {
    $.ajax({
        type: "get",  //提交方式  
        url: portal.api_url + "/portal/hlwSfxx/getSfxx",//路径  
        dataType: "json",
        data: {
            "bsmSlsq": bsm_slsq,
        },
        //数据,这里使用的是Json格式进行传输  
        success: function (result) {//返回数据根据结果进行相应的处理
            if (result.code == 200 && result.data != null) {
                for (var i = 0; i < result.data.length; i++) {
                    $('.paymentDetails').append('<h6>' + result.data[i].sfkm + '' + result.data[i].ysje + '元 </h6>');
                }
            }
        }
    });
}