//加载 $(function () { $("#profileExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none"); $("#profileExpander").attr("expanded", "1"); $("#otherExpander").closest("tr") .next().css("display", "") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "") .next().css("display", ""); $("#otherExpander").attr("expanded", "1"); }); //点击收缩(扩展信息) function swapProfile() { if ($("#profileExpander").attr("expanded") == "1") { $("#profileExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0"); $("#profileExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", ""); $("#profileExpander").attr("expanded", "0"); } else { $("#profileExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0"); $("#profileExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none"); $("#profileExpander").attr("expanded", "1"); } } //点击收缩(其它信息) function swapOther() { if ($("#otherExpander").attr("expanded") == "1") { $("#otherExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0"); $("#otherExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", ""); $("#otherExpander").attr("expanded", "0"); } else { $("#otherExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0"); $("#otherExpander").closest("tr") .next().css("display", "") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "") .next().css("display", ""); $("#otherExpander").attr("expanded", "1"); } } //保存 function Staff_Save() { var certificatesType = $("#CertificatesType").combobox("getValue"); var certificatesNum = $.trim($("#CertificatesNum").val()); if (certificatesNum != "") { if (certificatesType == "" || certificatesType == "-1" || certificatesType == null) { $.messager.alert("系统提示", "请选择对应的证件类型。"); return; } } var oldCollegeID = $("#CollegeDropdown").val(); var oldDepartmentID = $("#DepartmentDropdown").val(); var collegeID = $("#CollegeID").combogridX("getValue"); var departmentID = $("#DepartmentID").combogridX("getValue"); $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Staff/Verification', { collegeID: collegeID, departmentID: departmentID }, function (data) { if (data == true) { if (oldCollegeID == "" || oldCollegeID == "-1" || oldCollegeID == null) { //新增、复制新增 $(document.forms[0]).submit(); } else { //修改 if (collegeID == "" || collegeID == "-1" || collegeID == null) { //院系所为空 $(document.forms[0]).submit(); } else { if (collegeID != oldCollegeID) { //院系所变动 $.messager.confirm("系统提示", "修改教师的" + college + "会重置教师个人的数据范围(" + college + "、教研室),是否继续?", function (r) { if (r) { $(document.forms[0]).submit(); } }) } else { if (oldDepartmentID == "" || oldDepartmentID == "-1" || oldDepartmentID == null) { //教研室为空 if (departmentID == oldDepartmentID) { $(document.forms[0]).submit(); } else { $.messager.confirm("系统提示", "修改教师的教研室会重置教师个人的数据范围(教研室),是否继续?", function (r) { if (r) { $(document.forms[0]).submit(); } }) } } else { if (departmentID != oldDepartmentID) { $.messager.confirm("系统提示", "修改教师的教研室会重置教师个人的数据范围(教研室),是否继续?", function (r) { if (r) { $(document.forms[0]).submit(); } }) } else { $(document.forms[0]).submit(); } } } } } } else { $.messager.alert("系统提示", "所属教研室和" + college + "不匹配,请核查。"); } }); } //删除照片(单个删除) function delPhoto() { var userID = $("#UserID").val(); $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Staff/DeletePhoto', { userID: userID }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", data.Message); $("#imgPhoto").attr('src', ''); } else { $.messager.alert("系统提示", data.Message); } }); } //联动查询 function queryCollege(data) { var campusID = $("#CampusID").combogridX("getValue"); var collegeID = $("#CollegeID").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|"; jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})"; $("#DepartmentID").combogridX("setValue", "-1"); $("#DepartmentID").combogridX("reload", eval(jsonString)); } function queryDepartment(data) { var campusID = $("#CampusID").combogridX("getValue"); var collegeID = $("#CollegeID").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|"; jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})"; $("#DepartmentID").combogridX("reload", eval(jsonString)); }