<script language="javascript">
var idd = '';
function onSearch(idd){
	$.messager.progress();
	$("#searchFormBug"+idd).form('submit',{
		url:'__APP__?g=<?php echo GROUP_NAME; ?>&m=<?php echo MODULE_NAME; ?>&a=search&act=1',
		success:function(data){
			//alert($("#keys").val());
			$.messager.progress('close');
			$("#Bug").datagrid('reload');
			var sa = '{$TC.config.SEARCH_ACTION}';
			if(sa==1){
				$("#searchBug").dialog('close',true);
			}
		}
	});
}

$(function(){
	$("#keywordBug{$uniqid}").combobox({
		filter:function(q,r){
			var qs = $("#keywordBug{$uniqid}").combobox('getValues');
			$("#keyBug{$uniqid}").val(qs);
			var opts = $(this).combobox('options');
			var v = r[opts.textField];
			var vv = r[opts.valueField];
			var vp = ','+String(getPinYin(v));
			var qp = ','+q.toUpperCase();
			if(vp.indexOf(qp)>=0 || v.indexOf(q) == 0){
				return r[opts.textField];
			}
		},
		onSelect:function(c){
			var qs = $("#keywordBug{$uniqid}").combobox('getValues');
			//alert(qs);
			$("#keyBug{$uniqid}").val(qs);
		}
	});
	
	$("#isMultiple{$uniqid}").click(function(){
		var ck = $(this).attr("checked");
		var kw = $('#keywordBug{$uniqid}');
		if(isset(ck)){
			kw.combobox({
				multiple:true
			});
		}else{
			kw.combobox({
				multiple:false
			});
		}
	});
});
</script>
<div class="con-tb">
<form id="searchFormBug{$uniqid}" method="post">
 <table class="infobox" width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" height="41"><input name="field" type="hidden" value="<?php echo $field ?>" /><select class="easyui-combobox" name="mod" data-options="editable:false">  
        <option value="=">等于</option>  
        <option  value="like">包含</option>
        <option  value=">">大于</option>
        <option  value="<">小于</option>
        <option  value=">=">大于等于</option>
        <option  value="<=">小于等于</option> 
        <option  value="<>">不等于</option>  
        <option  value="not like">不包含</option>
    </select>&nbsp;<input name="keyword" id="keywordBug{$uniqid}" class="easyui-combobox relo" size="38" data-options="url:'__URL__/search/field/<?php echo $field ?>/json/1',editable:true,method:'get',valueField:'id',textField:'text'" /> 
    <input name="keybug" id="keyBug{$uniqid}" type="hidden" value="" />&nbsp;<a href="#" onclick="javascript:onSearch('{$uniqid}')" id="su" class="easyui-linkbutton">查询</a> <!--<input name="ismultiple" id="isMultiple{$uniqid}" type="checkbox" value="1" />多选--></td>
  </tr>
 </table>
</form>
</div>