Aucune description

Add.html 3.6KB

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