87,917
社区成员
发帖
与我相关
我的任务
分享
$("#tab_tj tr").each(function() {
var type = $(this).attr("type");
var zdzslx= $(this).attr("zdzslx");
var value = $("td", $(this)).eq(4).find(":first-child").val();
var guanlianzd=$(this).attr("guanlianzd");
if(guanlianzd=='null'){guanlianzd="";}
var xuzd=$("td", $(this)).eq(2).attr("xmemc") ;
var czlx=$("td", $(this)).eq(3).find("select").val();
if(type=='3' && guanlianzd=="" )
{
value = $("td", $(this)).eq(4).find("select option:selected").text();
}
if(guanlianzd!="" )
{
xuzd=guanlianzd;
}
if(type=="4" && zdzslx!="DATE"){
xuzd="to_date(" + xuzd +",'yyyy-mm-dd')";
}
var ljf = $("td", $(this)).eq(1).find("select").val();
if (value != "" || czlx=="7" || czlx=="9") {
if (ljf == "1") {
tj += "并且" + Getsmtj($(this), type,czlx);
sql += " and " + xuzd + Getczf(czlx, value,type);
}
else {
tj2 += "或者" + Getsmtj($(this), type,czlx);
sql2 += " or (" + xuzd+ Getczf(czlx, value,type) + ")";
}
}
});