if(len($as)=0||len($bs)=0||len($cs)=0,
""
,
"and ( "+IF($as="出生日期"||$as="入公司日期"||$as="入集团日期"||$as="参加工作时间",SWITCH($as,"出生日期","to_char("+ $as +",'YYYY-MM-DD') ","入公司日期","to_char("+ $as +",'YYYY-MM-DD') ","入集团日期","to_char("+ $as +",'YYYY-MM-DD') ","参加工作时间","to_char("+ $as +",'YYYY-MM-DD') "),"to_char("+ $as +") ")+
switch($bs,"等于"," = ","不等于"," ","大于或等于"," >= ","小于或等于"," <= ","小于"," < ","开头是"," like ","开头不是","not like ","结尾是"," like ","结尾不是"," not like ","包含"," like ","不包含"," not like ","包含于"," in ('","不包含于","not in ('")+
switch($bs,"等于","'"+trim($cs)+"' ",
"不等于","'"+trim($cs)+"' ",
"大于","'"+trim($cs)+"' "+" and length(to_char("+$as+")) = length('"+$cs+"')"+" or length(to_char("+$as+")) > length('"+$cs+"')",
"大于或等于","'"+trim($cs)+"' "+" and length(to_char("+$as+")) = length('"+$cs+"')"+" or length(to_char("+$as+")) > length('"+$cs+"')",
"小于或等于","'"+trim($cs)+"' "+" and length(to_char("+$as+")) = length('"+$cs+"')"+" or length(to_char("+$as+")) < length('"+$cs+"')",
"小于","'"+trim($cs)+"'"+" and length(to_char("+$as+")) = length('"+$cs+"')"+" or length(to_char("+$as+")) < length('"+$cs+"')",
"开头是","'"+trim($cs)+"%'",
"开头不是","'"+trim($cs)+"%'",
"结尾是","'%"+trim($cs)+"'",
"结尾不是","'%"+trim($cs)+"'",
"包含","'%"+trim($cs)+"%'",
"不包含","'%"+trim($cs)+"%'",
"包含于",REPLACE(trim($cs),",","','")+"')",
"不包含于",REPLACE(trim($cs),",","','")+"')")+")"
)
求大神将上边的帆软公式拼到js中用 FR.remoteEvaluate()执行
编辑于 2017-11-4 14:32