NoticeList.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. var exData = null;
  2. var edit_id = "";
  3. var _memo_msg = "";
  4. _page_size = 15;
  5. function orderStatusRenderer(e) {
  6. var record = e.record;
  7. var statestr = getInitStatusstrByState(record.status);
  8. var html = "<div style=\"display:flex;flex-direction:column;\">";
  9. html += ("<div>" + statestr + "</div>");
  10. html += "</div>";
  11. return html;
  12. }
  13. function readStateRenderer(e) {
  14. var record = e.record;
  15. var html = "<div style=\"display:flex;flex-direction:column;\">";
  16. if (record.IsRead == 1) {
  17. html += ("<div style=\"color:green;\">已读</div>");
  18. }
  19. else {
  20. html += ("<div style=\"color:red;\">未读</div>");
  21. }
  22. html += "</div>";
  23. return html;
  24. }
  25. function conRenderer(e) {
  26. var record = e.record;
  27. var md = record.Con;
  28. md = decodeURIComponent(md);
  29. var html = "<div style=\"height:100px;display:flex;flex-direction:column;text-align:left;\">";
  30. html += ("<div onclick=\"checkDetailCon()\">" + md + "</div>");
  31. html += "</div>";
  32. return html;
  33. }
  34. function checkDetailCon() {
  35. var rec = grid.getSelected();
  36. mini.get("con_win").show();
  37. var md = rec.Con;
  38. md = decodeURIComponent(md);
  39. $("#id_win_con").html(md);
  40. }
  41. function noticeTimeRenderer(e) {
  42. var record = e.record;
  43. var html = "<div style=\"display:flex;flex-direction:column;\">";
  44. html += ("<div>" + formatCommonDate(record.NoticeTime) + "</div>");
  45. html += "</div>";
  46. return html;
  47. }
  48. function actionRenderer(e) {
  49. var grid = e.sender;
  50. var record = e.record;
  51. var id = record.ID;
  52. var rowIndex = e.rowIndex;
  53. var html = "";
  54. html += getGridBtn("edit", "标记已读", "readedFn('" + id + "')");
  55. //html += getGridBtn("edit", "重置", "resetFn('" + id + "')");
  56. return html;
  57. }
  58. function readedFn(id) {
  59. postAjax("set_erp_readnotice", "ids=" + id, function (data) {
  60. resultShow(data, "grid.reload();");
  61. });
  62. }
  63. //查询按钮
  64. function searchFn() {
  65. var form = new mini.Form("#ctl00_f_all");
  66. var data = form.getData(true, false);
  67. var s = data;
  68. //console.log("565656565", data);
  69. grid.load({
  70. title: s.title, date1: s.sign_date1, date2: s.sign_date2
  71. });
  72. }
  73. //清除查询内容
  74. function clearFn() {
  75. //$("#ctl00_f_all").find("input").val("");
  76. var form = new mini.Form("#ctl00_f_all");
  77. form.clear();
  78. }
  79. $(function () {
  80. });
  81. function view_search() {
  82. var key = "";
  83. if ($("#txtKey").length > 0) {
  84. key = $("#txtKey").val();
  85. }
  86. grid.load({ key: key, type: $("#txtSearchType").val() });
  87. }