Sin descripción

AnnDatil.html 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <script src="../Script/Common/huayi.load.js"></script>
  6. <script src="../Script/Common/huayi.config.js"></script>
  7. <link href="../css/layer/need/layer.css" />
  8. <link rel="stylesheet" href="../css/init.css" />
  9. <title>详情</title>
  10. <style>
  11. .BiaoTi {
  12. width: 100%;
  13. border-color: #ccc;
  14. border: 1px solid #ccc;
  15. }
  16. textarea {
  17. border-color: #ccc;
  18. border: 1px solid #ccc;
  19. height: 100px;
  20. }
  21. .BiaoTi {
  22. width: 100%;
  23. text-align: center;
  24. border-color: #ccc;
  25. border: 1px solid #ccc;
  26. }
  27. textarea {
  28. border-color: #ccc;
  29. border: 1px solid #ccc;
  30. height: 100px;
  31. }
  32. .Common {
  33. width: 100%;
  34. background: #fff;
  35. text-align: center;
  36. padding: 10px 15px;
  37. height: auto;
  38. overflow-y: auto;
  39. }
  40. .Common table th {
  41. padding: 5px 8px 5px 0;
  42. text-align: right;
  43. width: 20%;
  44. }
  45. .Common table {
  46. width: 100%;
  47. }
  48. .Common table td textarea {
  49. width: 100%;
  50. vertical-align: middle;
  51. resize: none;
  52. outline: none;
  53. }
  54. .Common table td {
  55. padding: 6px 0 5px 10px;
  56. text-align: left;
  57. color: #717171;
  58. line-height: 200%;
  59. }
  60. .btn_box {
  61. margin-top: 30px;
  62. }
  63. </style>
  64. </head>
  65. <body>
  66. <div class="Common">
  67. <table>
  68. <tr>
  69. <th>标题:</th>
  70. <td>
  71. <input class="BiaoTi" id="title" type="text" style="" />
  72. </td>
  73. </tr>
  74. <tr>
  75. <th>内容:</th>
  76. <td colspan="2">
  77. <textarea data-adaptheight id="content" name="" rows="" cols=""></textarea>
  78. </td>
  79. </tr>
  80. </table>
  81. <div class="btn_box">
  82. <button class="btns">保存</button>
  83. </div>
  84. </div>
  85. <script>
  86. var wid = helper.request.queryString("wid");
  87. $(document).ready(function() {
  88. $(".btns").click(function() {
  89. if(!$("#title").val()) {
  90. layer.msg("输入标题");
  91. } else if(!$("#content").val()) {
  92. layer.msg("输入选择日期");
  93. }
  94. Add()
  95. })
  96. if(wid) {
  97. $.getJSON(huayi.config.callcenter_url + 'Notice/GetNotice', {
  98. noticeid: wid,
  99. "token": $.cookie("token")
  100. }, function(result) {
  101. if(result.state.toLowerCase() == "success") {
  102. $("#title").val(result.data.F_Title);
  103. $("#content").val(result.data.F_Content);
  104. console.log(result.data);
  105. }
  106. });
  107. }
  108. })
  109. function Add() {
  110. $.post(huayi.config.callcenter_url + "Notice/EditNotice", {
  111. nid: wid,
  112. title: $("#title").val(),
  113. content: $("#content").val(),
  114. token: $.cookie("token")
  115. }, function(result) {
  116. result = JSON.parse(result);
  117. if(result.state.toLowerCase() == "success") {
  118. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  119. parent.layer.close(index); //再执行关闭
  120. parent.initTable();
  121. parent.layer.msg("修改成功");
  122. }
  123. })
  124. }
  125. </script>
  126. </body>
  127. </html>