| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- var g = null;
- function f_initGrid() {
- g = $("#maingrid").ligerGrid({
- columns:
- [{ display: '指标ID', name: 'target_id', type: 'text',isSort: false, hide: true,width:100},
- { display: '指标分类', name: 'class_name', type: 'text',isSort: false,width:200},
- { display: '指标名称', name: 'target_name', type: 'text',isSort: false,width:200},
- { display: '描述', name: 'description', type: 'text',isSort: false,width:450},
- { display: '分数上限', name: 'max_score', type: 'text',isSort: false,width:150,type:"int",editor:{type:"int"},render:function(item){
- if(!item.max_score){
- return "0";
- }
- return item.max_score;
- }}
- ],
- data:{Rows:[]},
- enabledEdit: true,
- checkbox : true,
- rownumbers:true,
- whenRClickToSelect:true,
- width :'99.8%',
- usePager: false,
- height : '95%'
- });
- }
-
-
- //添加考核指标
- function f_import(){
- var obj = window.top;
- if (obj != undefined && obj != null) {
- obj.$.ligerDialog.open({
- title : '添加考核指标',
- width : 1000,
- height : 400,
- url : 'hrPerformanceTargetAction.do?task=toDialogList',
- buttons : [ {
- text : '确定',
- onclick : f_importOK
- }, {
- text : '关闭',
- onclick : f_importCancel
- } ]
- });
- }
- }
-
- //选择存货确定
- function f_importOK(item, dialog){
- var rows = dialog.frame.f_select();
- for (var i = 0; i < rows.length; i++)
- {
- g.addRow(rows[i]);
- }
- dialog.close();
- }
-
- //取消选择
- function f_importCancel(item, dialog){
- dialog.close();
- }
-
- //删除选中行的信息
- function deleteRow() {
- g.deleteSelectedRow();
- }
-
|