jQuery MiniUI
标题:
lookup 按钮不能用鼠标设置焦点?
[打印本页]
作者:
haitao
时间:
2013-8-15 15:11:01
标题:
lookup 按钮不能用鼠标设置焦点?
我在grid控件中设置了lookUP按钮辅助录入,发现用鼠标点击之后,光标就消失了,不能直接录入数据。我的意思是可以直接录入,不清楚的时候可以选择查询之后录入。
<body>
<form id="form1" runat="server">
<h1>业余时间来院加班人员登记表
<asp:TextBox ID="TextBoxUser" runat="server" Width="0px" BorderStyle="None"
Enabled="False" EnableViewState="False" Height="0px"></asp:TextBox>
<asp:TextBox ID="TextBoxYuanqu" runat="server" Width="0px" BorderStyle="None"
Enabled="False" Height="0px" style="font-size: medium; color: #FF3300"></asp:TextBox>
</h1>
<div style="width:1150px;">
<div class="mini-toolbar" style="border-bottom:0;padding:0px;">
<table style="width:1150px;">
<tr>
<td style="width:100%;">
<a class="mini-button" iconCls="icon-addnew" plain="true">增加</a>
<span class="separator"></span>
<a class="mini-button" iconCls="icon-add" plain="true">复制新增</a>
<span class="separator"></span>
<a class="mini-button" iconCls="icon-remove" plain="true">删除</a>
<span class="separator"></span>
<a class="mini-button" iconCls="icon-save" plain="true">保存</a>
<span class="separator"></span>
</td>
<td style="white-space:nowrap;">
<input id="staff_name" class="mini-textbox" emptyText="请输入加班人员姓名" style="width:150px;" />
<a class="mini-button">查询</a>
</td>
</tr>
</table>
</div>
</div>
<div id="datagrid1" class="mini-datagrid" style="width:1150px;height:280px;"
url="StaffService.aspx?method=GetStaffByUser" idfileld="id" allowResize="false" pageSize="20"
allowCellEdit="true" allowCellSelect="true" multiSelect="false" allowRowSelect="true"
fitcolumns="false"
>
<div property="columns">
<div type="indexcolumn" width="30"></div>
<div field="staff_id" name = "staff_id" allowResize="false" width="80" headerAlign="center" allowSort="false">工号
<input property="editor" id="lookup2" class="mini-lookup" textField="staff_name" valueField="staff_id" popupWidth="auto"
popup="#gridPanel" grid="#datagrid2" multiSelect="true" />
</div>
<div field="staff_name" name="staff_name" align="center" allowResize="false" width="50" headerAlign="center" allowSort="false">姓名
<input property="editor" class="mini-textbox" />
</div>
<div field="dept" name="dept" allowResize="false" width="120" headerAlign="center" allowSort="true">科室
<input property="editor" class="mini-textbox" />
</div>
<div field="kind" name="kind" width="50" align="center" headerAlign="center" >身份
<input property="editor" class="mini-combobox" style="width:100%;" data="Genderskind"" />
</div>
<div field="oper_nurse" type="checkboxcolumn" turevalue="1" falsevalue="0" allowResize="false" width="60" headerAlign="center" allowSort="false">手术护士
</div>
<div field="grade" name="grade" width="50" align="center" headerAlign="center" >职称
<input property="editor" class="mini-combobox" data="Genders"" />
</div>
<div field="start_time" allowResize="false" width="140" dateFormat="yyyy-MM-dd HH:mm" headerAlign="center" allowSort="false">开始时间
<input property="editor" class="mini-datepicker" showtime="true" showTodayButton="false" showOkButton="true" showClearButton="false" format="yyyy-MM-dd HH:mm" />
</div>
<div field="end_time" allowResize="false" width="140" dateFormat="yyyy-MM-dd HH:mm" headerAlign="center" allowSort="false">开始时间
<input property="editor" class="mini-datepicker" showtime="true" showTodayButton="false" showOkButton="true" showClearButton="false" format="yyyy-MM-dd HH:mm" />
</div>
<div field="patient_id" name="patient_id" allowResize="false" width="60" headerAlign="center" allowSort="false">住院号
<input property="editor" class="mini-textbox" />
</div>
<div field="pat_name" name="pat_name" allowResize="false" width="50" headerAlign="center" allowSort="false">病人
<input property="editor" class="mini-textbox" />
</div>
<div field="diagnosis" name="diagnosis" allowResize="false" width="100" headerAlign="center" allowSort="false">诊断
<input property="editor" class="mini-textbox" />
</div>
<div field="taxi" type="checkboxcolumn" turevalue="1" falsevalue="0" allowResize="false" width="50" headerAlign="center" allowSort="false">出租
</div>
<div field="create_user" allowResize="false" width="50" align="center" headerAlign="center" allowSort="false">值班
<input property="editor" class="mini-textbox" />
</div>
<div field="create_time" allowResize="false" width="110" dateFormat="yyyy-MM-dd HH:mm" headerAlign="center" allowSort="true">记录时间
<input property="editor" class="mini-datepicker" showtime="true" format="yyyy-MM-dd HH:mm:ss" />
</div>
<%-- <div field="yuanqu" width="40" align="center" headerAlign="center" >院区
<input property="editor" class="mini-combobox" data="GendersYuanqu"" />
</div>--%>
</div>
</div>
<!--选择面板-->
<div id="gridPanel" class="mini-panel" title="工号查询" iconCls="icon-search" style="width:450px;height:250px;" visible="false"
showToolbar="true" showCloseButton="true" showHeader="true" bodyStyle="padding:0" borderStyle="border:0"
>
<div property="toolbar" style="padding:5px;padding-left:8px;text-align:center;">
<span>姓名:</span>
<input id="keyText" class="mini-textbox" style="width:160px;"/>
<a class="mini-button">查询</a>
</div>
<div id="Div1" class="mini-datagrid" style="width:100%;height:100%;"
borderStyle="border:0" showPageSize="false" showPageIndex="false"
url="StaffService.aspx?method=GetStaffInfoByName"
>
<div property="columns">
<div type="checkcolumn" >#</div>
<div field="staff_name" width="120" headerAlign="center" allowSort="false">姓名</div>
<div field="staff_id" width="120" headerAlign="center" allowSort="false">工号</div>
<div field="dept" width="120" headerAlign="center" allowSort="false">科室</div>
</div>
</div>
</div>
<script type="text/javascript">
var Genders = [{ id: '高级', text: '高级' }, { id: '中级', text: '中级' }, { id: '初级', text: '初级'}];
var GendersYuanqu = [{ id: '东院', text: '东院' }, { id: '西院', text: '西院'}];
var GendersTaxi = [{ id: '是', text: '是' }, { id: '否', text: '否'}];
var Genderskind = [{ id: '医疗', text: '医疗' }, { id: '护理', text: '护理' }, { id: '行管', text: '行管' }, { id: '其他', text: '其他'}];
mini.parse();
var txtUser = document.all.TextBoxUser.value;
var txtYuanqu = document.all.TextBoxYuanqu.value;
var grid = mini.get("datagrid1");
grid.load({key:txtUser});
var staff_grid = mini.get("datagrid2");
var win = mini.get("selectWindow");
//////////////////////////////////////////////////////
function onShowPopup(e) {
staff_grid.load();
}
function onSearchClick(e) {
staff_grid.load({
key: keyText.value
});
}
function addRow() {
var newRow = { name: "New Row" };
grid.addRow(newRow, 0);
grid.setCurrentCell([0, 1]);
grid.beginEditCell();
}
</script>
<div class="description">
</div>
</form>
</body>
</html>
作者:
factory
时间:
2013-8-15 15:25:39
lookup本身的输入框是不给录入的。
你要查询的话,可以在下拉里面放个查询,去下拉的表格内查找数据
http://www.miniui.com/demo/#src=lookup/lookup.html
这个就是了,下拉查询
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2