ScoreParameterCollegeSetting.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. function reload() {
  2. $("#dgScoreParameterCollegeSettingList").cmsXDataTable("load", $.getDataGridParams("dgScoreParameterCollegeSettingList"));
  3. }
  4. var mnu = "";
  5. $(function () {
  6. mnu = $.SystemGeneral.getUrlParam("MNU");
  7. })
  8. //获取选中的数据
  9. function validChoose() {
  10. var d = [];
  11. $.each($("#dgScoreParameterCollegeSettingList").cmsXDataTable("getSelections"), function (index) {
  12. d.push(this.ScoreParameterCollegeSettingID);
  13. });
  14. return d;
  15. }
  16. function showDetail(rowindex, rowdata) {
  17. var url = CMS_SystemConfig.VirtualDirectoryPath + "/ScoreParameterCollegeSetting/Edit?action=view&MNU=" + mnu;
  18. url += "&scoreParameterCollegeSettingID=" + rowdata.ScoreParameterCollegeSettingID;
  19. $.popupTopWindow('详细公式设置', url, window.screen.availWidth, window.screen.availHeight - 60);
  20. }
  21. function ScoreParameterCollegeSetting_Add() {
  22. var url = CMS_SystemConfig.VirtualDirectoryPath + "/ScoreParameterCollegeSetting/Edit?action=edit&MNU=" + mnu;
  23. $.popupTopWindow('详细公式设置', url, window.screen.availWidth, window.screen.availHeight - 60, reload);
  24. }
  25. function ScoreParameterCollegeSetting_Edit() {
  26. var url = CMS_SystemConfig.VirtualDirectoryPath + "/ScoreParameterCollegeSetting/Edit?action=edit&MNU=" + mnu;
  27. var selectedIDs = validChoose();
  28. if (selectedIDs.length == 0) {
  29. $.messager.alert("系统提示", "请选择您要修改的设置。");
  30. return;
  31. }
  32. else if (selectedIDs.length > 1) {
  33. $.messager.alert("系统提示", "只能对单个信息进行修改。");
  34. return;
  35. }
  36. url += "&scoreParameterCollegeSettingID=" + selectedIDs[0];
  37. $.popupTopWindow('详细公式设置', url, window.screen.availWidth, window.screen.availHeight - 60, reload);
  38. }
  39. function ScoreParameterCollegeSetting_Delete() {
  40. var url = CMS_SystemConfig.VirtualDirectoryPath + "/ScoreParameterCollegeSetting/Delete";
  41. var selectedIDs = validChoose();
  42. if (selectedIDs.length == 0) {
  43. $.messager.alert("系统提示", "请选择您要删除的设置。");
  44. return;
  45. }
  46. $.messager.confirm("系统提示", "您确定要删除该设置?", function (r) {
  47. if (r) {
  48. $.postWithLoading(url, { scoreParameterCollegeSettingIDString: selectedIDs.join(',') }, function (data) {
  49. $.messager.alert("系统提示", data.Message);
  50. if (data.IsSuccess) {
  51. reload();
  52. }
  53. });
  54. }
  55. });
  56. }