StaffEdit.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. function Staff_Save() {
  2. var userID = $("#UserID").val();
  3. var code = $("#StaffCode").val();
  4. var CollegeID = $("#CollegeID").combogridX("getValue");
  5. var DepartmentID = $("#DepartmentID").combogridX("getValue");
  6. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Staff/Verification', { userID: userID, code: code, CollegeID: CollegeID, DepartmentID: DepartmentID }, function (data) {
  7. if (data == "成功。") {
  8. if ($("#CollegeDropdown").val() != CollegeID) {
  9. $.messager.confirm("系统提示", "修改教师的所属院系所会重置教师个人的数据范围,是否继续?", function (r) {
  10. if (r) {
  11. $(document.forms[0]).submit();
  12. }
  13. })
  14. } else {
  15. $(document.forms[0]).submit();
  16. }
  17. } else {
  18. $.messager.alert("系统提示", data);
  19. }
  20. });
  21. }
  22. function QueryCollegeComboGridList() {
  23. var collegeID = $("#CollegeID").combogridX("getValue");
  24. if (collegeID != nonSelect) {
  25. var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID + "|@|'})";
  26. $("#DepartmentID").combogridX("reload", eval(jsonString));
  27. }
  28. }
  29. function delPhoto() {
  30. var userID = $("#UserID").val();
  31. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Staff/DeletePhoto', { userID: userID }, function (data) {
  32. if (data.IsSuccess) {
  33. $("#imgPhoto").attr('src', '');
  34. } else {
  35. $.messager.alert("系统提示", data.Message);
  36. }
  37. });
  38. }