EvaluationProject.js 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationProject/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //新增
  8. function EvaluationProject_Add() {
  9. redirectTo = url + '?MNU=' + mnu;
  10. $.popupTopWindow('评价项目新增', redirectTo, 700, 300, null, null);
  11. }
  12. function reload() {
  13. $("#dgEvaluationProjectList").cmsXDataTable("load", $.getDataGridParams("dgEvaluationProjectList"));
  14. }
  15. //获取选中的数据
  16. function validChoose() {
  17. var d = [];
  18. $.each($("#dgEvaluationProjectList").cmsXDataTable("getSelections"), function (index) {
  19. d.push(this.ProjectID);
  20. });
  21. return d;
  22. }
  23. //查看
  24. function edit(rowindex, rowdata) {
  25. redirectTo = url + "?projectID=" + rowdata.ProjectID + "&MNU=" + mnu + "&isView=1";
  26. $.popupTopWindow('评价项目信息', redirectTo, 700, 300, null, null);
  27. }
  28. //修改按钮
  29. function EvaluationProject_Update() {
  30. var d = validChoose();
  31. if (d.length == 0) {
  32. $.messager.alert("系统提示", "请选择您要修改的信息。");
  33. return;
  34. }
  35. if (d.length > 1) {
  36. $.messager.alert("系统信息", "只能选择单个记录进行修改。");
  37. return;
  38. }
  39. redirectTo = url + "?projectID=" + d + "&MNU=" + mnu;
  40. $.popupTopWindow('评价项目修改', redirectTo, 700, 300, null, null);
  41. }
  42. //删除
  43. function EvaluationProject_Delete() {
  44. var d = validChoose().join(',');
  45. if (d == "") {
  46. $.messager.alert("系统提示", "请选择您要删除的信息。");
  47. return;
  48. }
  49. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  50. if (r) {
  51. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationProject/Delete', { projectIDs: d }, function (data) {
  52. if (data == "删除成功。") {
  53. $.messager.alert("系统提示", data);
  54. $("#dgEvaluationProjectList").cmsXDataTable('load');
  55. } else {
  56. $.messager.alert("系统提示", data);
  57. }
  58. });
  59. }
  60. });
  61. }
  62. //Excel导出
  63. function EvaluationProject_Export() {
  64. $("#formQuery").submit();
  65. }
  66. function QueryEvaluationTableDropdownList(data) {
  67. if (data && $("#EvaluationTargetDropdown").length > 0 && $.data($("#EvaluationTargetDropdown")[0], "combobox")) {
  68. $("#EvaluationTargetDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationProject/EvaluationTargetDropdownBanid?bindType=0&tableID=" + $("#EvaluationTableDropdown").combobox("getValue") + "");
  69. }
  70. }
  71. function QueryEvaluationNormDropdownList(data) {
  72. reload();
  73. }
  74. function QueryEvaluationTargetDropdownList(data) {
  75. if ($("#dgEvaluationProjectList").length > 0 && $.data($("#dgEvaluationProjectList")[0], "cmsXDataTable")) {
  76. reload();
  77. }
  78. }