var confirmCreateLw = function (data, configUrl, sflw) {
    var xzwh = "";
    var examineInfo = "";
    var wiid = data.wiid;
    if (data.hasOwnProperty("xzwh")) {
        xzwh = data.xzwh;
    }
    if (data.hasOwnProperty("examineInfo")) {
        examineInfo = data.examineInfo;
    }
    if (sflw == "true") {
        showConfirmDialog("提示信息", "" + data.checkMsg + "," + "是否创建例外", "createLw", "'" + wiid + "','" + xzwh + "','" + examineInfo + "','" + configUrl + "'", "closeBlockUI", "");
    } else {
        tipInfo(data.checkMsg);
        closeBlockUI();
    }
};

function tipInfo(msg) {
    bootbox.dialog({
        message: "<h3><b>" + msg + "</b></h3>",
        title: "",
        buttons: {
            main: {
                label: "关闭",
                className: "btn-primary",
            }
        }
    });
}

var createLw = function (wiid, xzwh, examineInfo, configUrl) {
    $.ajax({
        url: configUrl + '/examine/creatWiid',
        type: 'post',
        dataType: 'json',
        data: {xzwh: xzwh, wiid: wiid, examineInfo: examineInfo},
        success: function (data) {
            if (data.hasOwnProperty("lwsqUrl")) {
                var lwsqUrl = data.lwsqUrl;
                window.parent.parent.$('#handleModel').modal('hide');
                window.parent.parent.showDynamicModel('exceptionModel', lwsqUrl, "增加例外")
            }
        },
        error: function (data) {

        }
    });
};

var closeBlockUI = function () {
    setTimeout($.unblockUI, 10);
};