StaffStandard.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. function StaffStandard_Add() {
  7. $.popupTopWindow('教师标准课酬', CMS_SystemConfig.VirtualDirectoryPath + '/StaffStandard/Edit?MNU=' + mnu, 600, 210);
  8. }
  9. function StaffStandard_Update() {
  10. var d = validChoose();
  11. if (d.length == 0) {
  12. $.messager.alert("系统信息", "请选择您要修改的标准课酬。");
  13. return;
  14. }
  15. if (d.length > 1) {
  16. $.messager.alert("系统信息", "只能选择单个记录进行修改。");
  17. return;
  18. }
  19. $.popupTopWindow('标准课酬', CMS_SystemConfig.VirtualDirectoryPath + '/StaffStandard/Edit?MNU=' + mnu + "&StaffStandardID=" + d[0], 600, 210);
  20. }
  21. //删除
  22. function StaffStandard_Delete() {
  23. var d = validChoose();
  24. if (d.length == 0) {
  25. $.messager.alert("系统提示", "请选择您要删除的标准课酬。");
  26. return;
  27. }
  28. $.messager.confirm("系统提示", "您确定要删除该标准课酬?", function (r) {
  29. if (r) {
  30. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StaffStandard/Delete', { staffStandardIDs: d.join(',') }, function (data) {
  31. if (data.IsSuccess) {
  32. $.messager.alert("系统提示", "删除成功!");
  33. $("#dgStaffStandardList").cmsXDataTable('load');
  34. } else {
  35. $.messager.alert("系统提示", data.Message);
  36. }
  37. });
  38. }
  39. });
  40. }
  41. function reload() {
  42. $("#dgStaffStandardList").cmsXDataTable("load", $.getDataGridParams("dgStaffStandardList"));
  43. }
  44. //获取选中的数据
  45. function validChoose() {
  46. var d = [];
  47. $.each($("#dgStaffStandardList").cmsXDataTable("getSelections"), function (index) {
  48. d.push(this.StaffStandardID);
  49. });
  50. return d;
  51. }
  52. function queryDepartment() {
  53. var collegeID = $("#cgbCollege").combogridX("getValue");
  54. if (collegeID != nonSelect) {
  55. var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID + "|@|'})";
  56. $("#cgbDepartment").combogridX("reload", eval(jsonString));
  57. }
  58. reload();
  59. }
  60. function queryUser() {
  61. var departmentID = $("#cgbDepartment").combobox("getValue");
  62. if (departmentID != nonSelect) {
  63. var jsonString = "({'QueryParamsDatas':'DepartmentDropdown|*|" + departmentID + "|@|'})";
  64. $("#cgbUser").combogridX("reload", eval(jsonString));
  65. }
  66. reload();
  67. }