| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- var g_to_people = null;
- var g_by_people =null;
- function f_initToGrid() {
- var weight_type=$("#weight_type").val();
- var columns=[
- { display: '考核人ID', name: 'to_people_id', type: 'text',isSort: false, hide: true,width:10,
- render:function(item){
- return item.uid;
- }
- },
- { display: '考核人', name: 'user_name', type: 'text',isSort: false,width:100},
- { display: '部门', name: 'groupname', type: 'text',isSort: false,width:200},
- { display: '职位', name: 'posname', type: 'text',isSort: false,width:200}
- ];
- if(weight_type=="2"){
- columns.push({ display: '权重%', name: 'weightiness', type: 'int',isSort: false,width:250,editor:{type:"int"}});
- }
- columns.push({ display: '评分次序', name: 'priority', type: 'int',isSort: false,width:200,editor:{type:"int"}});
- columns.push({ display: '操作', width:150,render:function(item,rowindex){
-
- return "<a href='javascript:to_deleteRow("+rowindex+","+item.universalid+")'>删除</a>";
- }});
- g_to_people = $("#maingrid_to_people").ligerGrid({
- columns:columns,
- url:'pfmAssessGroupAction.do?task=to_pagelist&group_id='+$("#group_id").val(),
- pageSize : 20,
- pageParmName : 'p',
- pagesizeParmName : 'pSize',
- enabledEdit: true,
- rownumbers:true,
- width :'99.8%',
- height : '300'
- });
- }
- function f_initByGrid() {
- g_by_people = $("#maingrid_by_people").ligerGrid({
- columns:
- [
- { display: '被考核人ID', name: 'uid', type: 'text',isSort: false, hide: true,width:10,
- render:function(item){
- return item.uid;
- }
- },
- { display: '被考核人', name: 'user_name', type: 'text',isSort: false,width:200},
- { display: '部门', name: 'groupname', type: 'text',isSort: false,width:200},
- { display: '职位', name: 'posname', type: 'text',isSort: false,width:200},
- { display: '考核方案', name: 'scheme_id', type: 'select',isSort: false,width:350,
- editor: { type: 'select', data: scheme, valueField: 'universalid', textField: 'scheme_name' },
- render : function(item, rowindex, value) {;
- for (var i = 0; i < scheme.length; i++)
- {
- if (scheme[i]['universalid'] == item.scheme_id)
- return scheme[i]['scheme_name'];
- }
- return "方案已停用";
- }
- },
- { display: '操作',width:150,render:function(item,rowindex){
-
- return "<a href='javascript:by_deleteRow("+rowindex+","+item.universalid+")'>删除</a>";
- }}
- ],
- url:'pfmAssessGroupAction.do?task=by_pagelist&group_id='+$("#group_id").val(),
- pageSize : 20,
- pageParmName : 'p',
- pagesizeParmName : 'pSize',
- enabledEdit: true,
- rownumbers:true,
- width :'99.8%',
- height : '300'
- });
- }
- function to_deleteRow(rowindex,universalid){
- g_to_people.deleteRow(rowindex);
- }
- function by_deleteRow(rowindex,universalid){
- g_by_people.deleteRow(rowindex);
-
- }
-
|