//汇总 //数据表格使用 var g; var gridArray=[]; // 公司名称数组--X轴数据 var compIds = ""; var series = ""; var gridData = ""; //单位ID var deptName = null; var role_ids = null; var sUtil = null; var yesNoData = {"list":[{"value":"是","key":"是"},{"value":"否","key":"否"}]}; var level = {"list":[{"value":"特级","key":"特级"},{"value":"一级","key":"一级"},{"value":"二级","key":"二级"},{"value":"三级","key":"三级"}]}; var voltage = {"list":[{"value":"10kV","key":"10kV"},{"value":"35kV","key":"35kV"},{"value":"110kV","key":"110kV"},{"value":"220kV","key":"220kV"},{"value":"380kV","key":"380kV"},{"value":"500kV","key":"500kV"}]}; $(function(){ /*sUtil = new SearchUtil(); deptName = sUtil.resolveUrl().dept_id;*/ }); //$(function(){ // var deptUrl = $.pathname() + "/ws/cockpit/CockpitService/selectTreeDept"; // $.post(deptUrl, {unitId:sUtil.resolveUrl().dept_id }, function(data) { // console.log(JSON.stringify(data)) // }); //}); /*//总体情况 var oneCols = [ { display:'特级', columns:[{ display:'户数', name:'tjcustomerNum', minWidth:60, width:70, render:showMsg }] }, { display:'一级', columns:[{ display:'户数', name:'yjcustomerNum', minWidth:60, width:70, render:showMsg }] }, { display:'二级', columns:[{ display:'户数', name:'ejcustomerNum', minWidth:60, width:70, render:showMsg }] }, { display:'合计', columns:[{ display:'户数', name:'hejiSum', minWidth:60, width:70, render:showMsg }] }]; //供电电源配置符合要求情况 var twoCols = [ { display:'特级', columns:[{ display:'户数', name:'tjgdmzcustomerNum', minWidth:60, width:70, render:showMsg }, { display:'合格率(%)', name:'tjgdbfbcustomerNum', minWidth:60, width:90 }] }, { display:'一级', columns:[{ display:'户数', name:'yjgdmzcustomerNum', minWidth:60, width:70, render:showMsg }, { display:'合格率(%)', name:'yjgdmzbfbcustomerNum', minWidth:60, width:90 }] }, { display:'二级', columns: [{ display:'户数', name:'ejgdmzcustomerNum', minWidth:60, width:70, render:showMsg }, { display:'合格率(%)', name:'ejgdmzbfbcustomerNum', minWidth:60, width:90 }] }, { display:'合计', columns:[{ display:'户数', name:'hejidmSum', minWidth:60, width:70, render:showMsg }, { display:'合格率(%)', name:'hejidmbfbSum', minWidth:60, width:90 }] }]; //自备应急电源配置符合要求情况 var threeCols = [ { display:'特级', columns:[{ display:'户数', name:'tjzbmzcustomerNum', minWidth:60, width:70, render:showMsg }, { display:'合格率(%)', name:'tjzbmzbfbcustomerNum', minWidth:60,width:90 }] }, { display:'一级', columns:[{ display:'户数', name:'yjzbmzcustomerNum', minWidth:60, width:70, render:showMsg }, { display:'合格率(%)', name:'yjzbmzbfbcustomerNum', minWidth:60, width:90 }] }, { display:'二级', columns:[{ display:'户数', name:'ejzbmzcustomerNum', minWidth:60, width:70, render:showMsg }, { display:'合格率(%)', name:'ejzbmzbfbcustomerNum', minWidth:60,width:90 }] }, { display:'合计', columns:[{ display:'户数', name:'hejizbSum', minWidth:60, width:70, render:showMsg }, { display:'合格率(%)', name:'hejizbbfbSum', minWidth:60, width:90 }] }]; //“双不满足”基本情况 var fourCols = [ { display:'特级', columns:[{ display:'户数', name:'tjsfcustomerNum', minWidth:60, width:70, render:showMsg }] }, { display:'一级', columns:[{ display:'户数', name:'yjsfcustomerNum', minWidth:60, width:70, render:showMsg }] }, { display:'二级', columns:[{ display:'户数', name:'ejsfcustomerNum', minWidth:60, width:70 ,render:showMsg }] }, { display:'合计', columns:[{ display:'总户数', name:'hejisfSum', minWidth:60, width:70, render:showMsg }] }]; */ var oneCols1= [{display : '客户编号', name : 'MRID_308', width : "200",valign : 'center',isPrimaryKey:true,isSort:false, editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' }}, {display : '客户类别', name : 'KIND_308', width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}, {display : '供电单位', name : 'OWNER_STATION_308', width : "200",align : 'center',showTitle:true,editor: { type: 'test',maxlength:64 },isSort:false}, {display : '重要等级', name : 'IMPORT_LEVEL_308', width : "200",align : 'center',showTitle:true,editor: { type: 'select',data:level,selWidth:200 },isSort:false}, {display : '电压等级', name : 'VOLTAGE_CODE_308', width : "200",align : 'center',showTitle:true,editor: { type: 'select',data:voltage,selWidth:200 },isSort:false}, {display : '装见容量(kVA)',name : 'AGREEMENT_CAPACITY_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}, {display : '保安负荷(kW)' ,name : 'SECUIRITY_LOAD_308', width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false} ]; var oneCols2= [ {display : '供电电源1', columns : [{display : '供电线路',name : 'POWER1_LINE_NAME_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}, {display : '上级变电站',name : 'POWER1_SUBSTATION_NAME_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}]}, {display : '供电电源2', columns : [{display : '供电线路',name : 'POWER2_LINE_NAME_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}, {display : '上级变电站',name : 'POWER2_SUBSTATION_NAME_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}]}, {display : '供电电源3', columns : [{display : '供电线路',name : 'POWER3_LINE_NAME_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}, {display : '上级变电站',name : 'POWER3_SUBSTATION_NAME_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}]}, {display : '供电电源4', columns : [{display : '供电线路',name : 'POWER4_LINE_NAME_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}, {display : '上级变电站',name : 'POWER4_SUBSTATION_NAME_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}]}, {display : '供电电源5', columns : [{display : '供电线路',name : 'POWER5_LINE_NAME_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}, {display : '上级变电站',name : 'POWER5_SUBSTATION_NAME_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}]}, {display : '供电电源6', columns : [{display : '供电线路',name : 'POWER6_LINE_NAME_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}, {display : '上级变电站',name : 'POWER6_SUBSTATION_NAME_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' },isSort:false}]}, {display : '供电电源是否满足标准',name : 'IS_MEET_OF_SUPPLY_308',width : "200" ,showTitle:true,editor: { type: 'select',data:yesNoData,selWidth:200 },isSort:false} ]; var oneCols3 =[{display : '自备应急电源容量(kW)', name : 'OWNED_SOURCE_CAPACITY_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入数字' },isSort:false}, {display : '自备应急电源配比(%)', name : 'ONESELF_EMERGENCIES_RATIO_308',width : "200",align : 'center',showTitle:true,editor: { type: 'text',maxlength:64,tip:'请输入数字' },isSort:false, render:function(rowdata,rowindex,value,column){ if(value==null || $.trim(value)==""||value==undefined){ return value; }else{ return value+"%"; }; } }, {display : '自备应急电源是否满足标准',name : 'IS_MEET_OF_SELF_PROVIDE_308',width : "200",align : 'center',showTitle:true,editor: { type: 'select',data:yesNoData,selWidth:200 },isSort:false} ]; function showMsg(rowdata ,rowindex,value,column){ if("总计"==rowdata.name){ return value; }else{ return ''+value+''; } }; function addStatus(rowdata, rowindex, value, column) { if (value == '总计') { return "
" + value + "
"; } else { return "
" + value + "
"; } } // 表格的初始化 function initComplete() {//gridData sUtil = new SearchUtil(); deptName = sUtil.resolveUrl().dept_id; role_ids = sUtil.resolveUrl().role_id; $("body").eq(0).showLoading(); g = $("#maingrid").quiGrid({ columns:[{ display: '重要客户基本信息' , columns : oneCols1 , width: "", align:'center' }, { display: '供电电源情况' , columns : oneCols2 , width: "", align:'center' }, { display: '自备应急电源情况' , columns : oneCols3 , width: "", align:'center' }, { display: '备注', name: '', align: 'center' , width: "200" ,isSort:false}, { display: '操作',id:"caozuo", isAllowHide:false, width : "220",align : 'center',frozen:true, render:function(rowdata,rowindex,value,column){ var h = '
 '; if (rowdata._editing){ h += ' ' + ' ' + '
'; }else{ h += ' ' + '' ; h += ' ' + ' ' + ' ' + ' '; }; return h; } }, { display:'客户名称', name:'NAME_308', width:"200", align:'center', showTitle:true, editor: { type: 'text',maxlength:64,tip:'请输入英文或数字' }, isSort:false, frozen:true, render : function(rowdata, rowindex, value, column) { var c = "none"; if(rowdata.COLOR_LEVEL_308=="1"){ c = "#ff0000"; }else if(rowdata.COLOR_LEVEL_308=="2"){ c = "#dcdc22"; }else if(rowdata.COLOR_LEVEL_308=="3"){ c = "#4bfb4b"; }else if(rowdata.COLOR_LEVEL_308=="4"){ c = "none"; }; return "
" + value + "
"; } }], url : $.pathname() + '/ws/crud/CRUDService/queryQui', params:{"listId":'308', "condition":"IS_DEL='0'"}, rownumbers : true, usePager : true, width : "100%", height:"570", pageSize : 10, sortName : "COLOR_LEVEL", sortOrder:"ASC", autoCheckChildren : true, tree : { columnId : 'name' }, toolbar:{items:[{text: '新增' , click: addRow , iconClass: 'icon_add'}, {line : true }, {text: '单位排序', click: orderUnit , iconClass: 'order_icon'}, {line : true }, {text: '等级排序', click: orderName , iconClass: 'order_icon'}, {line : true }, {text: '颜色排序', click: orderColor, iconClass: 'order_icon'}, {line : true }, {text: '同步系统重要用户', click: synchronizationSysUser, iconClass: 'synchronization_icing'}, {line : true }, {text: '查看统计', click: statisticsSystem , iconClass: 'import_tem'} ]}, enabledEdit: true, alternatingRow:false, rowAttrRender: function(rowdata, rowindex, rowid){ return rowdata["__index"] % 2 == 0 ? "style='background-color:#f5f5f5;'" : "" ; }, clickToEdit: false, onDblClickRow:function(rowdata, rowindex){ g.beginEdit(rowindex); }, onBeforeEdit: onBeforeEdit, onBeforeSubmitEdit: onBeforeSubmitEdit, onAfterSubmitEdit: onAfterSubmitEdit, onAfterShowData:function(){ if(role_ids.indexOf("R002105430335")>-1){ g.toggleCol("caozuo",true); }else{ g.toggleCol("caozuo",false); } } }); /* $.ajax({ // url : $.pathname()+ "/ws/customerHuiZong/customerHuiZongService/getZYCustomerInfo", // url : $.pathname()+ "/ws/customerHuiZong/customerHuiZongService/getCustomerModel", url : $.pathname() + '/ws/crud/CRUDService/queryQui', type : 'post', timeout : 60000, // data : {id : deptName}, data : {"listId":'308', "condition":"IS_DEL='0' ORDER BY UPDATEDATE DESC"}, dataType : 'json', success : function(data){ g = $("#maingrid").quiGrid({ // columns : [{ display:'供电单位', "name":'name', id:'name', width:130, dept_id:'dept_id', frozen:true, align:'left', render:addStatus}, // { display:'总体情况', columns:oneCols, width:"", align:'center' }, // { display:'供电电源配置符合要求情况', columns:twoCols, width:"", align:'center' }, // { display:'自备应急电源配置符合要求情况', columns:threeCols, width:"", align:'center' }, // { display:'“双不满足”基本情况', columns:fourCols, width:"", align:'center' }], columns: [{ display: '重要客户基本信息' , columns : oneCols1 , width: "", align:'center' }, { display: '供电电源情况' , columns : oneCols2 , width: "", align:'center' }, { display: '自备应急电源情况' , columns : oneCols3 , width: "", align:'center' }, { display: '备注', name: '', align: 'center' , width: "200" ,isSort:false}, { display: '操作', isAllowHide:false, width : "100",align : 'left',frozen:true, render:function(rowdata,rowindex,value,column){ var h = '
 '; if (rowdata._editing){ h += ' ' + ' ' + '
'; }else{ h += ' ' + '' + ''; }; return h; } }], data:data, rownumbers : false, width : "100%", usePager : false, pageSize : 10, sortName : "UPDATEDATE", // sortOrder: "asc", autoCheckChildren : true, tree : { columnId : 'name' }, toolbar:{items:[{text: '新增', click: addRow , iconClass: 'icon_add'}, {line : true }, {text: '汇总', click: addUnit, iconClass: 'icon_add'}, {line : true }, {text: '查看', click: onView , iconClass: 'view_tem'} ] }, enabledEdit: true, clickToEdit: false, onDblClickRow:function(rowdata, rowindex){ g.beginEdit(rowindex); }, onBeforeEdit: onBeforeEdit, onBeforeSubmitEdit: onBeforeSubmitEdit, onAfterSubmitEdit: onAfterSubmitEdit }); gridData=data; }, error : function(e){ $.messager.alert('系统提示信息', '访问服务失败!', 'error'); } }); */ $("body").eq(0).hideLoading(); } function changeColor(rowid, color){ var rowData = g.getRow(rowid); delete rowData.IS_DEL_308; delete rowData.UPDATEDATE_308; delete rowData.__id; delete rowData.__previd; delete rowData.__index; delete rowData.__pid; delete rowData.__level; delete rowData.__hasChildren; delete rowData.__status; delete rowData.rowPosition; rowData.COLOR_LEVEL_308 = color; $.post($.pathname() +'/ws/crud/CRUDService/update/',rowToBO(rowData, true),function(result){ if(result.Msg.sucsess){ top.Dialog.alert("调整成功"); } g.loadData();//刷新表格 },"json"); }; function orderUnit(){ g.setOptions({ sortName : "OWNER_STATION", sortOrder:"DESC" }); g.setNewPage(1);//页号重置为1 g.loadData();//加载数据 }; function orderName(){ g.setOptions({ sortName : "IMPORT_LEVEL", sortOrder:"DESC" }); g.setNewPage(1);//页号重置为1 g.loadData();//加载数据 }; function orderColor(){ g.setOptions({ sortName : "COLOR_LEVEL", sortOrder:"asc" }); g.setNewPage(1);//页号重置为1 g.loadData();//加载数据 }; /** * 同步系统重要用户数据 */ function synchronizationSysUser(){ top.Dialog.confirm("同步会将当前数据更换为日常管理模块中的重要用户,这将丢失现在的所有数据,确定吗?",function(){ //同步处理 $.post($.pathname() + '/ws/icingZmap/IcingZmapService/synchronizationSystem', {type:"user", dept_id:deptName}, function(result){ orderUnit(); },"json"); }); }; //编辑整行 function beginEdit(rowid) { g.beginEdit(rowid); } //编辑前事件 function onBeforeEdit(e){ } //编辑提交前事件 function onBeforeSubmitEdit(e){ // if(e.newdata.userName==""){ // // top.Dialog.alert("姓名不能为空!",null,null,null,2); // // return false; // // } // // else if (!validateInput(e.newdata.userName, "^[\u4e00-\u9fa5]+$")){ // // top.Dialog.alert("姓名需要是中文!",null,null,null,2); // // return false; // // } // // // // if(e.newdata.userLoginName==""){ // // top.Dialog.alert("用户名不能为空!",null,null,null,2); // // return false; // // } // // else if (!validateInput(e.newdata.userLoginName, "^[0-9a-zA-Z]+$")){ // // top.Dialog.alert("用户名需要是字母或数字!",null,null,null,2); // // return false; // // } // // // // if(e.newdata.userPassword==""){ // // top.Dialog.alert("密码不能为空!",null,null,null,2); // // return false; // // } // // else if (e.newdata.userPassword.length<6||e.newdata.userPassword.length>11){ // // top.Dialog.alert("密码需要是6-11位!",null,null,null,2); // // return false; // // } // // else if (!validateInput(e.newdata.userPassword, "^[0-9a-zA-Z]+$")){ // // top.Dialog.alert("密码需要是字母或数字!",null,null,null,2); // // return false; // // } } //编辑后事件 function onAfterSubmitEdit(e){ //在这里一律作修改处理 var rowData = e.newdata; rowData.FD_OBJECTID_308 = e.record.FD_OBJECTID_308; // {"MRID_308":"0","KIND_308":"0","OWNER_STATION_308":"0","IMPORT_LEVEL_308":"","VOLTAGE_CODE_308":"","AGREEMENT_CAPACITY_308":"0.00","SECUIRITY_LOAD_308":"0","POWER1_LINE_NAME_308":"0","POWER1_SUBSTATION_NAME_308":"0","POWER2_LINE_NAME_308":"0","POWER2_SUBSTATION_NAME_308":"0","POWER3_LINE_NAME_308":"0","POWER3_SUBSTATION_NAME_308":"0","POWER4_LINE_NAME_308":"0","POWER4_SUBSTATION_NAME_308":"0","POWER5_LINE_NAME_308":"0","POWER5_SUBSTATION_NAME_308":"0","POWER6_LINE_NAME_308":"0","POWER6_SUBSTATION_NAME_308":"0","IS_MEET_OF_SUPPLY_308":"","OWNED_SOURCE_CAPACITY_308":"0","ONESELF_EMERGENCIES_RATIO_308":"0","IS_MEET_OF_SELF_PROVIDE_308":"","NAME_308":"怎么会这样","FD_OBJECTID_308":"308148189415011100000025100000"} //ajax方式提交数据到数据库 $.post($.pathname() +'/ws/crud/CRUDService/update/',rowToBO(rowData, true),function(result){ if(result.Msg.sucsess){ top.Dialog.alert(result.Msg.info); } },"json"); }; //结束编辑 function endEdit(){ g.endEdit(); }; //全部取消修改 function cancelAllEdit(){ g.cancelEdit(); }; //新增 function addRow(){ var row = g.getRow(0); var rowData={ MRID_308:"", NAME_308:"", KIND_308:"", OWNER_STATION_308:"", IMPORT_LEVEL_308:"", VOLTAGE_CODE_308:"", AGREEMENT_CAPACITY_308:"", SECUIRITY_LOAD_308:"", POWER1_LINE_NAME_308:"", POWER1_SUBSTATION_NAME_308:"", POWER2_LINE_NAME_308:"", POWER2_SUBSTATION_NAME_308:"", POWER3_LINE_NAME_308:"", POWER3_SUBSTATION_NAME_308:"", POWER4_LINE_NAME_308:"", POWER4_SUBSTATION_NAME_308:"", POWER5_LINE_NAME_308:"", POWER5_SUBSTATION_NAME_308:"", POWER6_LINE_NAME_308:"", POWER6_SUBSTATION_NAME_308:"", IS_MEET_OF_SUPPLY_308:"", OWNED_SOURCE_CAPACITY_308:"", ONESELF_EMERGENCIES_RATIO_308:"", IS_MEET_OF_SELF_PROVIDE_308:""}; g.addEditRow(rowData, row, true); //在这里做新增处理 $.post($.pathname() + '/ws/crud/CRUDService/create',rowToBO(rowData, false),function(result){ if(result.Msg.sucsess){ g.getRow(0).FD_OBJECTID_308 = result.Msg.objectID; }; },"json"); }; //将row JSON对象转化为bo对象 function rowToBO(row, flag) { var params = row; params.classid = 308; if(flag){ params.FD_OBJECTID308 = row.FD_OBJECTID_308; }; var seri_params = $.param(params); return seri_params; }; //查看统计 function statisticsSystem(){ window.parent.window.openStatisticsSystemVipUser(); }; //删除 function onDelete(fd_id){ top.Dialog.confirm("确定要删除该记录吗?",function(){ var result = sUtil.getJsonData($.pathname() +"/ws/crud/CRUDService/delete", {objectIDs : fd_id, classid : 308}); // $.post($.pathname() +"/ws/crud/CRUDService/delete/", { objectIDs : [row.FD_OBJECTID_308], classid : 308 }, function(result){ // {"Msg":{"data":"","info":"删除成功","objectID":"","sucsess":true}} 308148188693307700000002100000 // //// handleResult(result); // },"json"); g.loadData();//刷新表格 }); }; //查询 function searchHandler(){ var tn = $.trim($("#NAME_308").val()); //去掉水印 if(tn!="" && tn=="请输入名称"){ $("#NAME_308").val(""); } g.setOptions({params:{ listId:'308', sortName : "COLOR_LEVEL", sortOrder:"ASC", condition:"IS_DEL= '0' and NAME LIKE '%"+ $.trim($("#NAME_308").val()) +"%'"}}); g.setNewPage(1);//页号重置为1 g.loadData();//加载数据 }; /* //清单 //单位ID var deptName = null; var deptId = null; var getUser_id = sUtil.resolveUrl().user_id; var loadParams = { "id" : deptName }; var g; var sUtil = null; $(function(){ sUtil = new SearchUtil(); deptName = sUtil.resolveUrl().dept_id; deptId = deptName; }); var oneCols1= [{display : '客户编号',name : 'FD_OBJECTID',width : "200",align : 'center',isPrimaryKey:true,isSort:false, render : function(rowdata, rowindex, value, column) { return "" + value + ""; } }, {display : '客户名称', name : 'CUSTOMER_NAME', width : "200",align : 'left', showTitle:true,isSort:false}, {display : '客户类别', name : 'CUSTOMER_KIND', width : "200",align : 'center',showTitle:true,isSort:false}, {display : '供电单位', name : 'OWNER_STATION', width : "200",align : 'center',showTitle:true,isSort:false}, {display : '重要等级', name : 'IMPORT_LEVEL', width : "200",align : 'center',showTitle:true,isSort:false}, {display : '电压等级', name : 'VOLTAGE_CODE', width : "200",align : 'center',showTitle:true,isSort:false}, {display : '装见容量(kVA)',name : 'AGREEMENT_CAPACITY',width : "200",align : 'center',showTitle:true,isSort:false}, {display : '保安负荷(kW)' ,name : 'SECUIRITY_LOAD', width : "200",align : 'center',showTitle:true,isSort:false} ]; var oneCols2= [{display : '供电电源1', columns : [{display : '供电线路',name : 'GDXL1',width : "200",align : 'center',showTitle:true,isSort:false}, {display : '上级变电站',name : 'SJBDZ1',width : "200",align : 'center',showTitle:true,isSort:false}]}, {display : '供电电源2', columns : [{display : '供电线路',name : 'GDXL2',width : "200",align : 'center',showTitle:true,isSort:false}, {display : '上级变电站',name : 'SJBDZ2',width : "200",align : 'center',showTitle:true,isSort:false}]}, {display : '供电电源3', columns : [{display : '供电线路',name : 'GDXL3',width : "200",align : 'center',showTitle:true,isSort:false}, {display : '上级变电站',name : 'SJBDZ3',width : "200",align : 'center',showTitle:true,isSort:false}]}, {display : '供电电源4', columns : [{display : '供电线路',name : 'GDXL4',width : "200",align : 'center',showTitle:true,isSort:false}, {display : '上级变电站',name : 'SJBDZ4',width : "200",align : 'center',showTitle:true,isSort:false}]}, {display : '供电电源5', columns : [{display : '供电线路',name : 'GDXL5',width : "200",align : 'center',showTitle:true,isSort:false}, {display : '上级变电站',name : 'SJBDZ5',width : "200",align : 'center',showTitle:true,isSort:false}]}, {display : '供电电源6', columns : [{display : '供电线路',name : 'GDXL6',width : "200",align : 'center',showTitle:true,isSort:false}, {display : '上级变电站',name : 'SJBDZ6',width : "200",align : 'center',showTitle:true,isSort:false}]}, {display : '供电电源是否满足标准',name : 'IS_MEET_OF_SUPPLY',width : "200" ,showTitle:true,isSort:false} ]; var oneCols3 =[{display : '自备应急电源容量(kW)', name : 'OWNED_SOURCE_CAPACITY',width : "200",align : 'center',showTitle:true,isSort:false}, {display : '自备应急电源配比(%)', name : '',width : "200",align : 'center',showTitle:true,isSort:false}, {display : '自备应急电源是否满足标准',name : 'IS_MEET_OF_SELF_PROVIDE',width : "200",align : 'center',showTitle:true,isSort:false} ]; function initComplete() {//gridData $("body").eq(0).showLoading(); $.ajax({ url : $.pathname()+ "/ws/customerHuiZong/customerHuiZongService/getCustomerModel", type : 'post', timeout : 60000, data : { "id" : deptName }, dataType : 'json', success : function(data){ g = $("#maingrid").quiGrid({ columns: [{ display: '重要客户基本信息' , columns : oneCols1 , width: "1600" }, { display: '供电电源情况' , columns : oneCols2 , width: "2600" }, { display: '自备应急电源情况' , columns : oneCols3 , width: "600" }, { display: '备注', name: '', align: 'center' , width: "200" ,isSort:false} ], data:data, // rownumbers : false, width : 960, pageSize : 10, percentWidthMode : true, usePager : false, autoCheckChildren : true, tree : { columnId : 'name' } }); $("body").eq(0).hideLoading(); gridData=data; }, error : function(e){ $.messager.alert('系统提示信息', '访问服务失败!', 'error'); } }); } function initCompleteX(){ *//** * 工具条 *//* var roleCons = roleButtonArr(); var toolBarOpt1 = { items:[ {text: '导出', click: "daochu", iconClass: 'export_tem',id:"10006"}, {text: '汇总', click: "huizong", iconClass: 'poll_tem',id:"10203"} ], roleCons:roleCons }; *//** * 树形列 *//* var grid_option1 = { columns: [ { display: '重要客户基本信息', columns : oneCols1 , width: "1600" }, { display: '供电电源情况', columns : oneCols2 , width: "2600" }, { display: '自备应急电源情况', columns : oneCols3 , width: "600" }, { display: '备注', name: '', align: 'center', width: "200" ,isSort:false} ], rownumbers : true, checkbox : true, pageSize : 10, percentWidthMode : true }; var options1={ url :'/nwyj/ws/customerHuiZong/customerHuiZongService/getCustomerModel', params:loadParams, width:960, gridOptions:grid_option1, singleRecodeOptions:{a:"aa"}, paperOpration:{showInput:"true"}, toolBarOptions:toolBarOpt1 }; g=gridAndSingleRecode=$("#maingrid").quickgridAndSingleRecode(options1); } //点击查看 function jumpPage(id){ window.location.href="customer-focusinfo.jsp?"+id; } //点击主键跳转详细信息页面 this.openDetail = function(rowindex) { var row = g.getRow(rowindex); var fd_id = row.FD_OBJECTID; $.indexOpenNextWindow("/nwyj/page/business/am/customer/customer-focusinfo2.jsp?"+fd_id); }; function showPrimaryKey(obj,index){ var fd_id = obj.FD_OBJECTID; $.indexOpenNextWindow("/nwyj/page/business/am/customer/customer-focusinfo2.jsp?"+fd_id); } $.messager=top.Dialog; function more() { $('#moreDiv').toggle(400,function(){ checkAndSetHeight();//changeFormat.js }); } */