var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids(); var g; var specialty={"list":[ {value:"1",key:"输电",suggest:"输电|shudian|sd"}, {value:"2",key:"变电(一次)",suggest:"变电(一次)|biandianyici|bdyc"}, {value:"3",key:"变电(二次)",suggest:"变电(二次)|biandianerci|bdec"}, {value:"4",key:"通信",suggest:"通信|tongxi|tx"}, {value:"5",key:"配电(中压)",suggest:"配电(中压)|peidianzhongya|pdzy"}, {value:"6",key:"配电(低压)",suggest:"配电(低压)|peidiandiya|pddy"}, {value:"7",key:"土建",suggest:"土建|tujian|tj"}, {value:"8",key:"机械",suggest:"机械|jixie|jx"}, {value:"9",key:"水工",suggest:"水工|shuigong|sg"}, {value:"10",key:"后勤",suggest:"后勤|houqin|hq"}, {value:"11",key:"医疗",suggest:"医疗|yiliao|yl"}, {value:"12",key:"其他",suggest:"其他|qita|qt"}]}; var changeType={"list":[ {value:"1",key:"新建",suggest:""}, {value:"2",key:"更新",suggest:""}]}; var sex={"list":[ {value:"1",key:"男",suggest:""}, {value:"0",key:"女",suggest:""}]}; var staff={"list":[ {value:"0",key:"是",suggest:""}, {value:"1",key:"否",suggest:""}]}; var zhicheng={"list":[ {value:"1",key:"高级工程师",suggest:""}, {value:"2",key:"中级工程师",suggest:""}, {value:"3",key:"初级工程师",suggest:""}]}; var zhiwu={"list":[ {value:"1",key:"主任",suggest:""}, {value:"2",key:"副主任",suggest:""}, {value:"3",key:"科长",suggest:""}, {value:"4",key:"副科长",suggest:""}]}; var xieli={"list":[ {value:"1",key:"大专",suggest:""}, {value:"2",key:"本科",suggest:""}, {value:"3",key:"硕士",suggest:""}, {value:"4",key:"博士",suggest:""}]}; var data; function initComplete(){ var data1 = $("#expert").val(); data = JSON.parse(decodeURI(data1)); g = $("#maingrid").quiGrid({ columns: [ { display: '序号', name: 'EXPERT_ID_260', align: 'center', width: "150px" ,editor: { type: 'text'}}, { display: '姓名', name: 'EXPERT_NAME_260', align: 'center', width: "150px" ,editor: { type: 'text'}}, { display: '性别', name: 'EXPERT_SEX_260', align: 'center', width: "150px", editor: { type: 'select',data:sex,selWidth:150 },render:function (item){ for (var i = 0; i < sex["list"].length; i++) { if (sex["list"][i]['value'] == item.EXPERT_SEX_260) return sex["list"][i]['key']; } return item.EXPERT_SEX_260; } }, { display: '出生年月', name: 'EXPERT_BIRTHDAY_260', align: 'center', width: "150px" ,editor: { type: 'date',dateFmt:'yyyy-MM-dd'}}, { display: '座机', name: 'EXPERT_TEL_260', align: 'center', width: "150px" ,editor: { type: 'text'}}, { display: '手机', name: 'EXPERT_CAL_260', align: 'center' , width: "150px" ,editor: { type: 'text'}}, { display: 'Email', name: 'EXPERT_EMAIL_260', align: 'center', width: "150px" ,editor: { type: 'text'}}, { display: '学历', name: 'EDUCATION_260', align: 'center', width: "150px" , editor: { type: 'select',data:xieli,selWidth:150 },render:function (item){ for (var i = 0; i < xieli["list"].length; i++) { if (xieli["list"][i]['value'] == item.EDUCATION_260) return xieli["list"][i]['key']; } return item.EDUCATION_260; } }, { display: '所属区域', name: 'EXPERT_AREA_260', align: 'center' , width: "150px" ,editor: { type: 'text'}}, // { display: '是否南网员工', name: 'IS_SNSTAFF_260', align: 'center', width: "150px" , // editor: { type: 'select',data:staff,selWidth:150 },render:function (item){ // for (var i = 0; i < staff["list"].length; i++) // { // if (staff["list"][i]['value'] == item.IS_SNSTAFF_260) // return staff["list"][i]['key']; // } // return item.IS_SNSTAFF_260; // } // }, { display: '参加工作时间', name: 'WORK_TIME_260', align: 'center', width: "150px" ,editor: { type: 'date',dateFmt:'yyyy-MM-dd'}}, { display: '职称', name: 'EXPERT_TYPE_260', align: 'center', width: "150px", editor: { type: 'select',data:zhicheng,selWidth:150 },render:function (item){ for (var i = 0; i < zhicheng["list"].length; i++) { if (zhicheng["list"][i]['value'] == item.EXPERT_TYPE_260) return zhicheng["list"][i]['key']; } return item.EXPERT_TYPE_260; } }, { display: '职务', name: 'EXPERT_POST_260', align: 'center', width: "150px", editor: { type: 'select',data:zhiwu,selWidth:150 },render:function (item){ for (var i = 0; i < zhiwu["list"].length; i++) { if (zhiwu["list"][i]['value'] == item.EXPERT_POST_260) return zhiwu["list"][i]['key']; } return item.EXPERT_POST_260; } }, { display: '住址', name: 'EXPERT_ADDRESS_260', align: 'center', width: "150px" ,editor: { type: 'text'}}, { display: '住址邮编', name: 'EXPERT_POSTALCODE_260', align: 'center', width: "150px",editor: { type: 'text'}}, { display: '专业特长', name: 'EXPERT_SPECIALTY_260', align: 'center', width: "150px" , editor: { type: 'select',data:specialty,selWidth:150 },render:function (item){ for (var i = 0; i < specialty["list"].length; i++) { if (specialty["list"][i]['value'] == item.EXPERT_SPECIALTY_260) return specialty["list"][i]['key']; } return item.EXPERT_SPECIALTY_260; } }, { display: '应急处置经验', name: 'EXPERT_EXP_260', align: 'center', width: "150px",editor: { type: 'text'}}, { display: '变更说明', name: 'CHANGE_DESCRIPTION_260', align: 'center', width: "150px",editor: { type: 'text'}}, // { display: '变更类型', name: 'CHANGE_TYPE_260', align: 'center', width: "150px", // editor: { type: 'select',data:changeType,selWidth:150 },render:function (item){ // for (var i = 0; i < changeType["list"].length; i++) // { // if (changeType["list"][i]['value'] == item.CHANGE_TYPE_260) // return changeType["list"][i]['key']; // } // return item.CHANGE_TYPE_260; // } // }, { display: '认定时间', name: 'IDENTIFICATION_TIME_260', align: 'center', width: "150px",editor: { type: 'date',dateFmt:'yyyy-MM-dd'}}, { display: '工作简历', name: 'EXPERT_RESUME_260', align: 'center', width: "150px",editor: { type: 'text'}} ], data:data, sortName : '', sortOrder : '', rownumbers:true, checkbox:true, height: '100%', width:"100%", pageSize: 10, enabledEdit: true, //编辑用 // onBeforeSubmitEdit: onBeforeSubmitEdit, percentWidthMode:true, //顶部图标按钮栏 toolbar:{ items:[ {text: '批量保存', click: saveAll, iconClass: 'icon_add'}, { line : true }, {text: '窗口', click: chuangkou, iconClass: 'icon_add'}, { line : true } ] } }); } function saveAll(){ var rows=g.getSelectedRows(); var rowsLength = rows.length; if (rowsLength == 0) { top.Dialog.alert("请选中要导入的信息!"); return; } var json=JSON.stringify(rows); var myobj=eval(json); for(var i=0;i WORK_TIME_260){ $.messager.alert('生日不能比参加工作时间晚'); return ; } if(WORK_TIME_260 > IDENTIFICATION_TIME_260){ $.messager.alert('参加工作时间不能比认证时间晚'); return ; } } var url = $.pathname() + "/ws/ExcelExpert/ReadExcelToDBTableTool/expertToDb2"; var params = { classId : '260', deptId:deptId, json:json }; $.ajax({ url : url, type : 'post', timeout : 15000, data : params, dataType : 'json', success : function(data) { $.messager.alert('保存成功', null, null); var url = "/nwyj/page/business/am/resource/expert/"+"expert-maintenance.jsp"; top.parent.document.getElementById("frmright").setAttribute("src", ""+encodeURI(url)); }, error : function(e) { $.messager.alert('系统提示信息', '访问服务失败!', 'error'); } }); } function chuangkou(){ var diag = new top.Dialog(); diag.Title = "应急组织"; diag.URL = $.pathname() +"/page/business/am/public/MsgNotes/YJMsgNotesPersion.jsp?expert"; diag.Width = 1260; diag.Height = 600; diag.Top = "80%"; diag.Left = "50%"; diag.ShowButtonRow=true; diag.ButtonAlign = 'center'; diag.OkButtonText="确 定"; diag.OKEvent = function(){ diag.innerFrame.contentWindow.addTeamInfo(); initComplete(); }; diag.show(); } //返回 function goBack() { var url = "/nwyj/page/business/am/resource/expert/"+"expert-maintenance.jsp"; top.parent.document.getElementById("frmright").setAttribute("src", ""+encodeURI(url)); } $.messager = top.Dialog;