taxAssessment.js 3.13 KB
var dataList;
$(function () {
    layui.use('element', function () {
    });
    addTabs('#wssq')
    setAcceptFlow(GetQueryString('bsm_slsq'),GetQueryString('businessno'));
    // 获取页面信息
    _taxVerification(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
    if(business.sqrlb == '1') {
        $('.buyer_information h3').text('权利人信息');
    }else {
        $('.buyer_information h3').text('义务人信息');
    }
})
//下一步事件
function skipClick(){
    skipNextPage(GetQueryString('bsm_slsq'),GetQueryString('businessno'));
}

function _taxVerification(bsm_slsq, businessno) {
    var li, listItem;
    $.ajax({
        type: "get",  //提交方式  
        url: portal.api_url + "/portal/FillInformation/taxVerification",//路径  
        dataType: "json",
        data: {
            "bsmSlsq": bsm_slsq,
            "businessNo": businessno,
        },
        //数据,这里使用的是Json格式进行传输  
        success: function (result) {//返回数据根据结果进行相应的处理
            if (result.code == 200 && result.data != null) {
                let data = result.data
                $('#acceptanceUnit p').text(data.sldw)
                $('#paymentTime p').text(data.jfsj)
                $('#serialNumber p').text(data.sslsh)
                for (var i = 0; i < data.taxList.length; i++) {
                    li = '<li class="taxItem"><span>税费项目</span>:<p>'+data.taxList[i].sfxm+'</p></li>'
                    li += '<li class="taxItem"><span>税费</span>:<p>'+data.taxList[i].sf+'元</p></li>'
                    $('.paymentDetails').append(li);
                }
                // 买方信息
                let userInfo = [];
                userInfo.push(getCookie('myCookie'));
                if(data.sqrList && data.sqrList.length>0) {
                    for (var i = 0; i < data.sqrList.length; i++) {
                        listItem = '<li>'
                        listItem += '<p><span>姓名</span>:'+data.sqrList[i].sqrmc+'</p>'
                        if (data.sqrList[i].sqrzj == 1) {
                            listItem += '<p><span>证件类型</span>:身份证</p>'
                        }
                        listItem += '<p><span>证件号码</span>:'+data.sqrList[i].zjhm+'</p>'
                        listItem += '<p><span>联系电话</span>:'+data.sqrList[i].dhhm+'</p>'
                        $('#informationList').append(listItem)
                    }
                }else {
                    for (var i = 0; i < userInfo.length; i++) {
                        listItem = '<li>'
                        listItem += '<p><span>姓名</span>:'+userInfo[i].username+'</p>'
                        if (userInfo[i].zjzl == 1) {
                            listItem += '<p><span>证件类型</span>:身份证</p>'
                        }
                        listItem += '<p><span>证件号码</span>:'+userInfo[i].zjhm+'</p>'
                        listItem += '<p><span>联系电话</span>:'+userInfo[i].phone+'</p>'
                        $('#informationList').append(listItem)
                    }
                }

            }
        }
    });
}