- 注册时间
- 2013-6-8
- 最后登录
- 2017-5-15
- 阅读权限
- 10
- 积分
- 374
- 精华
- 0
- 帖子
- 99
|
<input name="BelongToDeptName" class="mini-buttonedit" textname="BelongToDeptName"
style="width: 90%" onbuttonclick="onmultideptselect" data-options="{DeptId:'BelongToDeptID',DeptName:'BelongToDeptName'}"
selectonfocus="true" allowinput="false" />
此控件弹出其它页面选择数据后返回当前页时( mini.open其它页面并返回数据后),会有卡的过程,此时表单上其它控件,鼠标点击无法获得焦点。 过一会后才会获取到焦点。
onbuttonclick="onmultideptselect" 代码如下
function onmultideptselect(sender) {
var btnEdit = this;
mini.open({
url: "/Portal_New/Pop/MultiDeptSelect",
title: "部门多选",
width: 250,
height: 500,
onload: function () {
var iframe = this.getIFrameEl();
if (iframe.contentWindow.setData)
iframe.contentWindow.setData(data);
},
ondestroy: function (action) {
if (action != null && action.Action == "ok") {
var data = action.Rows;
var ids = "";
var names = "";
if (data) {
for (var i = 0; i < data.length; i++) {
if (i == data.length - 1) {
ids += data[i]["FullId"];
names += data[i]["FullName"];
}
else {
ids += data[i]["FullId"] + ",";
names += data[i]["FullName"] + ",";
}
}
}
if (btnEdit.DeptId)
setPopCtrlValue(btnEdit.DeptId, ids)
if (btnEdit.DeptName)
setPopCtrlValue(btnEdit.DeptName, names)
}
}
});
}
|
|