123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- //加载
- $(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));
- }
|