easyui combogrid 自动完成功能

自动完成功能

	//初始化被请假人
	$("#{$namespace}employee").combogrid({
		url:'__URL__/userinfo',
		method:'get',
		idField:'id',
		textField:'name',
		mode:'remote',
		columns:[[
//			{field:'id',title:'ID',width:30},
			{field:'name',title:'姓名',width:50},
			{field:'dep',title:'部门',width:110},						
		]],
		onSelect:function(index, row){
			//console.log(row)
			$("#{$namespace}employee").combogrid('setText',row.name);
		}
	});
<tr style="display: none;">
    <th align="center" >
    请假人:
    </th>
    <td>
        <input id="{$namespace}employee" name="A_EmployID" type="text" class="easyui-        combogrid common" />
    </td>
</tr>

猜你喜欢

转载自blog.csdn.net/qq_38666502/article/details/81364671