Notice_win.aspx 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/View.master" AutoEventWireup="true" CodeFile="Notice_win.aspx.cs" Inherits="ENotice_Notice_win" %>
  2. <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
  3. <script type="text/javascript">
  4. var noticeData = null;
  5. var isTimeEnd = false;
  6. var noticeIds = "";
  7. function clickToRead() {
  8. if (!isTimeEnd) {
  9. mini.showTips({
  10. content: "查看通知不足1分钟",
  11. timeout: 3000
  12. });
  13. return;
  14. }
  15. postAjax("set_erp_readnotice", "ids=" + noticeIds, function (data) {
  16. closeFn();
  17. });
  18. }
  19. $(function () {
  20. if (noticeData != null && noticeData.length > 0) {
  21. console.log("noticedata", noticeData);
  22. var ahtml = "";
  23. var ids = "";
  24. ahtml += ("<a style=\"width:100px;height:30px;text-align:center;line-height:30px;margin-left:90%;margin-top:1px;\" class=\"mini-button mini-button-primary\" iconcls=\"icon-ok\" onclick=\"clickToRead()\">已读通知</a>");
  25. for (var item of noticeData) {
  26. ids += item.ID;
  27. ids += ",";
  28. ahtml += ("<div style=\"font-size:20px;color:#000000; margin-top:15px;line-height:25px; \">标题:" + item.Title +"<span style=\"color:red;\">(" +item.NoticeType + ")</span>"+"</div>");
  29. ahtml += ("<div style=\"font-size:10px;color:lightgray; margin-top:5px;line-height:15px; \">来自:" + item.senderName + " " + formatCommonDate(item.CreatedTime) + "</div>");
  30. var conStr = item.Con;
  31. conStr = decodeURIComponent(conStr);
  32. ahtml += ("<div style=\"font-size:14px;color:#3C3C3C; margin-top:5px;line-height:25px;overflow:hidden;word-break:break-all; \">内容:" + conStr + "</div>");
  33. }
  34. noticeIds = ids;
  35. $("#notice_con").html(ahtml);
  36. }
  37. isTimeEnd = false;
  38. setTimeout(function () {
  39. isTimeEnd = true;
  40. },60000)
  41. });
  42. </script>
  43. <style type="text/css">
  44. .win_tb {
  45. width: 96%;
  46. margin-left: auto;
  47. margin-right: auto;
  48. margin-top: 10px;
  49. background-color: #dedede;
  50. }
  51. .win_tb td {
  52. height: 36px;
  53. background-color: #fff;
  54. font-size: 14px;
  55. padding: 5px;
  56. }
  57. .win_tb input[type=text] {
  58. width: 90%;
  59. height: 24px;
  60. font-size: 14px;
  61. }
  62. .win_tb input[type=checkbox] {
  63. width: 18px;
  64. height: 18px;
  65. }
  66. .win_tb select {
  67. font-size: 14px;
  68. height: 30px;
  69. padding: 0px 5px;
  70. }
  71. .win_tb .td1 {
  72. color: #666;
  73. background-color: #F8F8F8;
  74. text-align: center;
  75. }
  76. .win_tb .td2 {
  77. }
  78. .word_tui {
  79. border-radius: 50%;
  80. background-color: red;
  81. color: white;
  82. font-size: 14px;
  83. text-align: center;
  84. padding: 3px;
  85. margin-left: 5px;
  86. }
  87. .word_shou {
  88. background-color: saddlebrown;
  89. }
  90. .word_green {
  91. background-color: forestgreen;
  92. }
  93. .state_word{
  94. width:50px;
  95. display:flex;
  96. flex-direction:row;
  97. padding:3px 6px 3px 6px;
  98. text-align:center;
  99. font-weight:bold;
  100. color:white;
  101. background-color:forestgreen;
  102. }
  103. .mini-grid-cell-nowrap {
  104. overflow: hidden;
  105. /* white-space: nowrap;
  106. text-overflow: ellipsis; */
  107. word-break: keep-all;
  108. word-wrap: break-word;
  109. white-space: normal;
  110. }
  111. /*.win_tb input{height:20px;}
  112. .win_tb .td1{height:35px;width:120px;font-size:12px;text-align:center;}
  113. .win_tb .td2{height:35px;width:280px;font-size:12pt;padding-left:5px;text-align:left;}*/
  114. </style>
  115. </asp:Content>
  116. <asp:Content ID="Content2" ContentPlaceHolderID="btn" runat="Server">
  117. <div id="notice_con" style="width:auto; display:flex;flex-direction:column;line-height:26px;padding:10px;">
  118. </div>
  119. </asp:Content>