$(function () {
var text = "";
var keywords = "";
GetInsuranceProlist(keywords, text);
$("#InsuranceProBtn2").click(function () {
keywords = $.trim($("#InsuranceProInput2").val()).replace(/[<>&"]/g, function (c) { return { '<': '<', '>': '>', '&': '&', '"': '"', '"': '"', "'": '′', "'": '′' }[c]; });
if (keywords == "产品名称") { keywords = ""; }
GetInsuranceProlist(keywords, text);
});
$("#InsuranceProInput2").unbind("focus").focus(function () {
$("#InsuranceProInput2").val("").css("color", "black");
});
$('.condition:first li:not(first-child)').click(function () {
$(this).addClass('active');
$(this).siblings().removeClass('active')
var html = $(this).html();
if (html == "人寿险") {
$("#ul3").html("
不限定期寿险两全保险终身寿险");
} else if (html == "健康险") {
$("#ul3").html("不限定期重疾险医疗费用补偿险终身重疾险住院费用补贴险");
}
else if (html == "意外险") {
$("#ul3").html("不限交通意外险旅行意外险人身意外伤害险");
}
else if (html == "投资型保险") {
$("#ul3").html("不限分红保险投资连结险万能保险");
} else {
$("#ul3").html("不限定期寿险两全保险终身寿险定期重疾险医疗费用补偿险终身重疾险住院费用补贴险交通意外险旅行意外险人身意外伤害险分红保险投资连结险万能保险");
}
$('.condition:last li:not(first-child)').on("click", function () {
$(this).addClass('active');
$(this).siblings().removeClass('active');
text = $(this).html();
if (text == "不限") {
text = "";
}
GetInsuranceProlist(keywords, text);
})
})
$('.condition:first li:first-child').click(function () {
$(this).addClass('active').siblings().removeClass('active');
GetInsuranceProlist(keywords, "");
})
$('.condition:last li:not(first-child)').click(function () {
$(this).addClass('active');
$(this).siblings().removeClass('active');
debugger;
text = $(this).html();
if (text == "不限") {
text = "";
}
GetInsuranceProlist(keywords,text);
})
$('.condition:last li:first-child').click(function () {
$(this).addClass('active').siblings().removeClass('active');
GetInsuranceProlist(keywords,"");
})
});
function GetInsuranceProlist(keywords, kind) {
pageHelper.Init({
url: "/Teacher/InsurancePro/GetInsuranceProlist",
type: "POST",
pageDiv: "#pages",
data:
{
keywords: keywords,
kind: kind
},
bind: function (data) {
var html = "";
if (data.Data.length > 0) {
$(data.Data).each(function (index, dom) {
//每行html
var trHtml = "";
trHtml += "";
trHtml += "{0}
";
trHtml += "
";
//拼接tbody
html += StringHelper.FormatStr(trHtml,
dom.Name,
dom.Features,
dom.Id
);
});
} else {
html = "- 未找到相关记录!
";
}
$("#product_list2").html(html);
}
});
}
function InsuranceDetail(id) {
location.href = "/Teacher/InsurancePro/Detail?Id=" + id;
}