- jQuery(‘#user-grid‘).datagrid({
- url: basePath + ‘user-manager-list.html‘,
- width: 870,
- height: 338,
- fitColumns: true,
- pagination:true,
- rowIndex:‘login_name‘,
- singleSelect:true,
- toolbar:
- [
- {text:‘添加‘,iconCls :‘icon-add‘,handler:newUser} ,
- {text:‘编辑, iconCls:‘icon-edit‘, handler:editUser },
- {text:‘删除, iconCls:‘icon-remove‘,handler:removeUser }
- ],
- // 双击函数
- onDblClickRow:function() {
- editUser();
- },
- columns:[
- [
- {field:‘login_name‘,title:‘登录名称,width:120},
- {field:‘employ_id‘,title:‘员工号码,width:80},
- {field:‘email‘,title:‘邮件地址,width:200,align:‘right‘},
- {field:‘status‘,title:‘状态,width:200,align:‘center‘},
- {field:‘expiry_date‘,title:‘到期日期‘,width:160},
- {field:‘create_date‘,title:‘创建日期,width:160,align:‘center‘}
- ]
- ]
- });
- }
- </script>
- var customOBJ;
- $(‘#customobjList‘).datagrid({
- width:500,
- height:200,
- pageSize:5,
- pageList:[5,15,20,25,30,35,40],
- singleSelect:true,
- nowrap:false,
- url:‘${basePath}/marketPlat/addDataServlet?method=seachOwnCustomobj‘,
- onLoadSuccess:function(data){
- //alert(data.rows.length);
- },
- // 双击函数
- onDblClickRow:function(rowIndex, rowData){
- customOBJ=new Object();
- customOBJ.customobjId=rowData.customObjId;
- customOBJ.customobjName=rowData.name;
- setCustomobjName(customOBJ);
- //其中rowData.customObjId 对应后天的json数据
- show(customOBJ.customobjId);
- },
- columns:[[
- {field:‘name‘,title:‘客户单位全称‘,width:180,align:‘left‘,
- formatter:function(value,rowData,rowIndex){
- //alert(value);
- return value;
- }
- },
- {field:‘industry‘,title:‘所属行业‘,width:150,align:‘center‘},
- {field:‘regionType‘,title:‘客户类别‘,width:150,align:‘center‘}
- ]],
- pagination:true
- });
- function show(id)
- {
- var url=‘${basePath}/page/marketPlat2/addData/seachProduct_list.jsp?type=‘+id;
- var productWin=$(‘#product-window‘).window({
- href:url,
- title:‘选择产品‘,
- closed: true,
- minimizable:false,
- collapsible:false,
- maximizable:false,
- cache:false,
- shadow:false
- });
- productWin.window(‘open‘);
- }
时间: 2024-10-11 03:42:15