You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

70 lines
1.9 KiB

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/wdk/theme/je/module/public/common.jsp"%>
<title>弹出选择页面</title>
<script type="text/javascript">
//获取url参数
var _gridid = $.getUUID();
var strparam = $.urlparam_decode($.getURLParam('param'));
var jparam = $.str2json(strparam);
var _idField = jparam.idField?jparam.idField:'id';
var _textField = jparam.textField?jparam.textField:'text';
var _gridcode = 'wdk.module.public.inputpopselectgrid';
var _dataurl = $.decode(jparam.dataurl);
var _queryParams = jparam.queryParams?jparam.queryParams:{};
window.onload = function(){
$.grid({
id:_gridid,
containerid:'layout_grid',
gridcode:_gridcode,
url:_dataurl,
queryParams:_queryParams,
singleSelect:('false'==jparam.singleSelect)?false:true,
pagination:false,
idField:_idField,
onDblClickRow:function(rowIndex, rowData){
$.inputpop_event_submit();
return true;
},
onLoadSuccess:function(data){
var value_id = jparam.value_id;
$.grid_setSelect({
id:_gridid,
ids:value_id
});
}
});
};
function inputpop_getValue(){
var jres = jparam;
var rows = $.grid_getSelections({id:_gridid});
var idarr = [];
var textarr = [];
for(var i=0;i<rows.length;i++){
var row = rows[i];
var _id = eval('row.'+_idField);
var _text = eval('row.'+_textField);
idarr.push(_id);
textarr.push(_text);
}
jres.value_id = idarr.join(',');
jres.value_text = textarr.join(',');
jres.value_value = idarr.join(',');
jres.value_rows = rows;
return jres;
}
</script>
</head>
<body class="easyui-layout" style="padding:0px;margin:0px;background-color:#FFFFFF;">
<div id="layout_grid" data-options="region:'center'" style="padding:0px;overflow:hidden;">
</div>
</body>
</html>