<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" session="false"%>
<%@ include file="/common/jstlres.jsp"%>
<html>
<head>
<title>
选择分配人员SyzcdPerson.jsp
</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/common/nuires.jsp"%>
</head>
<body>
<div class="nui-fit">
<div id="datagrid1" dataField="data" class="nui-datagrid" style="width:100%;height:100%;" sortMode="client" allowUnselect="false"
url="<%= request.getContextPath() %>/staff/list.do" autoEscape="false">
<div property="columns">
<div type="checkcolumn" name="checkCloumn"></div>
<div headerAlign="center" type="indexcolumn"><fmt:message key="table.index"/></div>
<div field="yhbh" visible="false" headerAlign="center"><fmt:message key="staff.table.staffid"/></div>
<div field="yhmc" width="100" headerAlign="center" autoEscape="true" allowSort="true"><fmt:message key="staff.table.staffname"/></div>
<div field="yhdlm" width="100" headerAlign="center" autoEscape="true" allowSort="true"><fmt:message key="staff.table.loginname"/></div>
<div field="ssjgmc" width="160" headerAlign="center" allowSort="true"><fmt:message key="staff.table.unit"/></div>
<div field="notesid" width="100" headerAlign="center" allowSort="true"><fmt:message key="staff.table.notesid"/></div>
<div field="zt" width="100" headerAlign="center" allowSort="true" renderer="ztRenderer"><fmt:message key="staff.table.staffstate"/></div>
<%-- <div field="sdsj" width="120" headerAlign="center" allowSort="true" dataType="date" dateFormat="${_TIMESTAMPPATTERN}"><fmt:message key="staff.table.locktime"/></div>
--%>
</div>
</div>
</div>
<div class="nui-fit">
<form id="dataform1" method="post">
<div style="padding-bottom: 5px; padding-top: 5px;">
<input class="nui-hidden" id="projectid" name="projectid" />
<input class="nui-hidden" id="planitemid" name="planitemid" />
<input class="nui-hidden" id="notesid" name="notesid" />
</div>
</form>
</div>
<div class="nui-toolbar" style="text-align:center;padding-top:8px;padding-bottom:8px;"
borderStyle="border-left:0;border-bottom:0;border-right:0;">
<a class="nui-button" iconCls="icon-ok" id="onOk" onclick="onOk()">确定</a>
<span style="display:inline-block;width:25px;"></span>
<a class="nui-button" iconCls="icon-cancel" onclick="onCancel()">取消</a>
<span style="display:inline-block;width:25px;"></span>
</div>
</body>
</html>
<script type="text/javascript">
changeButtonPosition($('.nui-toolbar:last'));
$J.parse();
var grid = $J.get("datagrid1");
var projectid = "";
var planitemid = "";
grid.load({"zt":"9"});
<%-- 获取父页面传递来的json数据 --%>
function setData(data) {
<%-- 跨页面传递的数据对象,克隆后才可以安全使用 --%>
var infos = $J.clone(data);
projectid = infos.projectid;
planitemid = infos.planitemid;
$J.get("projectid").setValue(projectid);
$J.get("planitemid").setValue(planitemid);
}
function onOk(){
var rows = grid.getSelecteds();
/* var menu = $J.get("datagrid1");
var checkNodes = menu.getCheckedNodes(false);//获取Check选中的多个节点,不包括父节点 */
var notesid="";
if(rows!=null&&rows.length>1){
$J.cap4jAlert("只能分配给一位人员!", "提示");
return;
}else if(rows!=null&&rows.length==1){
notesid = rows[0].notesid;
$J.get("notesid").setValue(notesid);
}else if(rows!=null||rows.length==0){
$J.cap4jAlert("请选择一位分配人员!", "提示");
return;
}
//syzcdDksqxxb/getSyzcdDksqxxbVOById.do
var urlStr = "/syzcdDksqxxb/assignFlowByManual.do";
/* var ajaxConf = new Cap4jAjaxConf();
ajaxConf.setIsShowSuccMsg(false);
ajaxConf.setSuccessFunc(function(text){
$J.closemodaldialog("OK");
});
$J.postByAjax({projectid:projectid,planitemid:planitemid,notesid:notesid},urlStr,ajaxConf);
*/
var ajaxConf = new Cap4jAjaxConf();
ajaxConf.setIsShowSuccMsg(true);
ajaxConf.setSuccessFunc(CloseWindow);
$J.submitForm("dataform1", urlStr, ajaxConf);
}
//取消
function onCancel(){
$J.closemodaldialog("cancel");
}
<%-- 关闭窗口 --%>
function CloseWindow(action) {
if (action == "close" && form.isChanged()) {
if (confirm("数据被修改了,是否先保存?")) {
return false;
}
}
$J.closemodaldialog("OK");
}
</script>
普元nui:用户列表
猜你喜欢
转载自blog.csdn.net/qq_36750352/article/details/103029531
今日推荐
周排行