You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

97 lines
3.9 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-08-11 09:51
  5. * 描 述:新生在线咨询回复
  6. */
  7. var refreshGirdData;
  8. var selectedRow;
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. page.initGird();
  14. page.bind();
  15. },
  16. bind: function () {
  17. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  18. page.search(queryJson);
  19. }, 220, 400);
  20. // 刷新
  21. $('#lr_refresh').on('click', function () {
  22. location.reload();
  23. });
  24. // 查看
  25. $('#lr_view').on('click', function () {
  26. var keyValue = $('#gridtable').jfGridValue('Id');
  27. selectedRow = $('#gridtable').jfGridGet('rowdata');
  28. if (learun.checkrow(keyValue)) {
  29. learun.layerForm({
  30. id: 'form',
  31. title: '查看',
  32. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFreshOnlineService/AnswerFormView?keyValue=' + keyValue,
  33. width: 600,
  34. height: 400,
  35. btn: null
  36. });
  37. }
  38. });
  39. //  回复
  40. $('#lr_answer').on('click', function () {
  41. var keyValue = $('#gridtable').jfGridValue('Id');
  42. selectedRow = $('#gridtable').jfGridGet('rowdata');
  43. if (learun.checkrow(keyValue)) {
  44. if (selectedRow.AnswerStatus == 1) {
  45. learun.alert.warning("当前咨询问题已回复!");
  46. return false;
  47. }
  48. learun.layerForm({
  49. id: 'form',
  50. title: '回复',
  51. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFreshOnlineService/AnswerForm?keyValue=' + keyValue,
  52. width: 600,
  53. height: 400,
  54. callBack: function (id) {
  55. return top[id].acceptClick(refreshGirdData);
  56. }
  57. });
  58. }
  59. });
  60. },
  61. // 初始化列表
  62. initGird: function () {
  63. $('#gridtable').lrAuthorizeJfGrid({
  64. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFreshOnlineService/GetPageList',
  65. headData: [
  66. { label: "咨询编号", name: "QuestionCode", width: 200, align: "left" },
  67. { label: "咨询主题", name: "QuestionTitle", width: 200, align: "left" },
  68. { label: "咨询时间", name: "QuestionSubmitTime", width: 130, align: "left" },
  69. { label: "咨询用户", name: "QuestionUserName", width: 100, align: "left" },
  70. {
  71. label: "回复状态", name: "AnswerStatus", width: 100, align: "left", formatter: function (value) {
  72. return value == 1 ? "<span class=\"label label-success\">已回复</span>" : "<span class=\"label label-warning\">未回复</span>";
  73. }
  74. },
  75. { label: "回复时间", name: "AnswerCreateTime", width: 130, align: "left" },
  76. ],
  77. mainId: 'Id',
  78. isPage: true,
  79. sidx: 'QuestionSubmitTime',
  80. sord: 'desc'
  81. });
  82. page.search();
  83. },
  84. search: function (param) {
  85. param = param || {};
  86. param.QuestionStatus = "1";//已提交
  87. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  88. }
  89. };
  90. refreshGirdData = function () {
  91. page.search();
  92. };
  93. page.init();
  94. }