暂无描述

AnnDatil.html 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. <script src="../My97DatePicker/WdatePicker.js"></script>
  10. <title>详情</title>
  11. <style>
  12. .BiaoTi {
  13. width: 100%;
  14. border-color: #ccc;
  15. border: 1px solid #ccc;
  16. }
  17. textarea {
  18. border-color: #ccc;
  19. border: 1px solid #ccc;
  20. height: 100px;
  21. }
  22. .Common {
  23. width: 100%;
  24. background: #fff;
  25. text-align: center;
  26. padding: 10px 15px;
  27. height: auto;
  28. overflow-y: auto;
  29. }
  30. .Common table th {
  31. padding: 5px 8px 5px 0;
  32. text-align: right;
  33. width: 20%;
  34. }
  35. .Common table {
  36. width: 100%;
  37. }
  38. .Common table td textarea {
  39. width: 100%;
  40. vertical-align: middle;
  41. resize: none;
  42. outline: none;
  43. }
  44. .Common table td {
  45. padding: 6px 0 5px 10px;
  46. text-align: left;
  47. color: #717171;
  48. line-height: 200%;
  49. }
  50. .btn_box {
  51. margin-top: 30px;
  52. }
  53. .inps{
  54. width: 100%;
  55. }
  56. </style>
  57. </head>
  58. <body>
  59. <div class="Common">
  60. <table>
  61. <tr>
  62. <th><b class="text-red">*</b>标题:</th>
  63. <td>
  64. <input class="BiaoTi" id="title" type="text" style="" />
  65. </td>
  66. </tr>
  67. <tr>
  68. <th><b class="text-red">*</b>内容:</th>
  69. <td colspan="2">
  70. <textarea data-adaptheight id="content" name="" rows="" cols=""></textarea>
  71. </td>
  72. </tr>
  73. <!--<tr>
  74. <th><b class="text-red">*</b>开始时间:
  75. <td>
  76. <div class="inpBox">
  77. <input type="text" class="inps " onfocus="WdatePicker({lang:'zh-cn'})" id="starttime" />
  78. </div>
  79. </td>
  80. </th>
  81. </tr>
  82. <tr>
  83. <th><b class="text-red">*</b>结束时间:
  84. <td>
  85. <div class="inpBox">
  86. <input type="text" class="inps " onfocus="WdatePicker({lang:'zh-cn'})" id="endtime" />
  87. </div>
  88. </td>
  89. </th>
  90. </tr>-->
  91. </table>
  92. <div class="btn_box">
  93. <button class="btns">保存</button>
  94. </div>
  95. </div>
  96. <script>
  97. var wid = helper.request.queryString("wid");
  98. $(document).ready(function() {
  99. $(".btns").click(function() {
  100. if(!$("#title").val()) {
  101. layer.msg("输入标题");
  102. } else if(!$("#content").val()) {
  103. layer.msg("输入内容");
  104. }
  105. // if(!$('#starttime').val()){
  106. // layer.msg('输入开始时间');
  107. // return;
  108. // }
  109. // if(!$('#endtime').val()){
  110. // layer.msg('输入结束时间');
  111. // return;
  112. // }
  113. Add()
  114. })
  115. if(wid) {
  116. $.getJSON(huayi.config.callcenter_url + 'Notice/GetNotice', {
  117. noticeid: wid,
  118. "token": $.cookie("token")
  119. }, function(result) {
  120. if(result.state.toLowerCase() == "success") {
  121. $("#title").val(result.data.F_Title);
  122. $("#content").val(result.data.F_Content);
  123. console.log(result.data);
  124. }
  125. });
  126. }
  127. })
  128. function Add() {
  129. $.post(huayi.config.callcenter_url + "Notice/EditNotice", {
  130. nid: wid,
  131. title: $("#title").val(),
  132. content: $("#content").val(),
  133. // stime:$('#starttime').val(),
  134. // etime:$('#endtime').val(),
  135. token: $.cookie("token")
  136. }, function(result) {
  137. result = JSON.parse(result);
  138. if(result.state.toLowerCase() == "success") {
  139. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  140. parent.layer.close(index); //再执行关闭
  141. parent.initTable();
  142. parent.layer.msg("修改成功");
  143. }
  144. })
  145. }
  146. </script>
  147. </body>
  148. </html>