bljy.js 3.99 KB
$(function () {
    layui.use('element', function () {
        let element = layui.element;
    });
    addTabs('#wssq')
    // 业务
    layui.use(['form'], function () {
        var form = layui.form
        //自定义验证规则
        form.verify({
            title: function (value) {
                if (value.length == 0) {
                    return '权利人不能为空';
                } else if (value.length < 2) {
                    return '权利人至少得2个字符啊';
                }
            }
        });

        //监听提交
        form.on('submit(submit)', function (data) {
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });
    });
    // 进度条
    var data = {
        'progressList': [
            {
                stepName: "信息校验",
                stepState: 1 //0:未办理 1:正在办理 2:已办理
            },
            {
                stepName: "填报信息",
                stepState: 0
            },
            {
                stepName: "完税核税",
                stepState: 0
            },
            {
                stepName: "身份认证",
                stepState: 0
            },
            {
                stepName: "资料审核",
                stepState: 0
            },
            {
                stepName: "线上缴费",
                stepState: 0
            },
            {
                stepName: "生成电子证书",
                stepState: 0
            }
        ],
    }

    layui.use('laytpl', function () {
        laytpl = layui.laytpl;
        var getTpl = document.getElementById('progress').innerHTML
            , view = document.getElementById('app_progress');
        laytpl(getTpl).render(data, function (html) {
            view.innerHTML = html;
        });

        layui.use(['element'], function () {
            var element = layui.element;
            //初始化动态元素,一些动态生成的元素如果不设置初始化,将不会有默认的动态效果
            element.init();
        });
    });

    // 结果弹框
    $('.reset').click(function () {
        successResult()
        // seizureResult()
    })

})
function successResult() {
    layui.use('layer', function () {
        layer.open({
            title: '<p class="system_prompt successInfo">房屋状态:正常</p>',
            area: ['370px', '335px'],
            scrollbar: false,
            btn:['下一步'],
            yes : function() {
                window.location.href="./tbxx.html"; 
            },
            content:'<ul class="dialog_con">'
                + '<li><span>姓名:</span>任超</li>'
                + '<li><span>身份证号:</span>610124193335522</li>'
                + '<li><span>联系电话:</span>18740677386</li>'
                + '<li><span>产权证号:</span>89897987987987</li>'
                + '<li><span>坐落:</span>西安市雁塔区南二环西段</li>'
                + '<li><span>面积:</span>2000</li>'
                + '<li><span>合同备案号:</span>9798798798798</li>'
                + '</ul>'
        });
    })

}

function seizureResult() {
    layui.use('layer', function () {
        layer.open({
            title: '<p class="system_prompt seizureInfo">房屋状态:正常</p>',
            area: ['370px', '335px'],
            scrollbar: false,
            btn:['下一步'],
            content:'<ul class="dialog_con">'
                + '<li><span>姓名:</span>任超</li>'
                + '<li><span>身份证号:</span>610124193335522</li>'
                + '<li><span>联系电话:</span>18740677386</li>'
                + '<li><span>产权证号:</span>89897987987987</li>'
                + '<li><span>坐落:</span>西安市雁塔区南二环西段</li>'
                + '<li><span>面积:</span>2000</li>'
                + '<li><span>合同备案号:</span>9798798798798</li>'
                + '</ul>'
        });
    })
}