Sin descripción

themeSortEdit.html 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>专题编辑</title>
  6. <script src="../../Script/Common/huayi.load.js"></script>
  7. <script src="../../Script/Common/huayi.config.js"></script>
  8. <link rel="stylesheet" href="../../js/zTree/zTreeStyle.css" />
  9. <link rel="stylesheet" href="../../css/init.css" />
  10. <script src="../../js/laydate/laydate.js"></script>
  11. <style>
  12. th {
  13. padding: 5px 8px 5px 0;
  14. text-align: right;
  15. }
  16. input {
  17. background-color: #FFF;
  18. background-image: none;
  19. border: 1px solid #ccc;
  20. border-radius: 1px;
  21. color: inherit;
  22. padding: 6px 12px;
  23. width: 200px;
  24. }
  25. td {
  26. padding: 6px 0 5px 10px;
  27. }
  28. .addts {
  29. background: #1ab394;
  30. color: #fff;
  31. padding: 6px 10px;
  32. outline: none;
  33. font-size: 12px;
  34. margin-left: 15px;
  35. border: 0;
  36. border-radius: 3px;
  37. box-sizing: border-box;
  38. }
  39. .time-box {
  40. display: inline-block;
  41. position: relative;
  42. }
  43. .tub {
  44. position: absolute;
  45. right: 8px;
  46. top: 10px;
  47. font-size: 18px;
  48. color: #00a0ca;
  49. }
  50. #layui-laydate3 .layui-laydate-header {
  51. height: 31px;
  52. padding: 5px;
  53. }
  54. .laydate-theme-molv .layui-laydate-header i,
  55. .laydate-theme-molv .layui-laydate-header span {
  56. top: 2px;
  57. }
  58. .layui-laydate-header {
  59. padding: 0;
  60. }
  61. .laydate-theme-molv .layui-laydate-content {
  62. height: 195px;
  63. overflow: hidden;
  64. }
  65. .laydate-month-list>li {
  66. margin: 10px 0;
  67. }
  68. .laydate-footer-btns span:hover {
  69. color: #00a1cb;
  70. }
  71. .select {
  72. width: 200px;
  73. background-color: #FFF;
  74. background-image: none;
  75. border: 1px solid #ccc;
  76. border-radius: 1px;
  77. height: 36px;
  78. }
  79. </style>
  80. </head>
  81. <body>
  82. <div style="padding: 10px;">
  83. <div style="padding: 10px;" class="clearFix">
  84. <div>
  85. <div class="box_content">
  86. <table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
  87. <tr>
  88. <th>单位名称:</th>
  89. <td>
  90. <input type="text" disabled="disabled" id="F_DeptName" style="margin-top: 5px;" />
  91. </td>
  92. </tr>
  93. <tr>
  94. <th>排序:</th>
  95. <td>
  96. <input type="number" id="sort">
  97. </td>
  98. </tr>
  99. <tr>
  100. <th></th>
  101. <td>
  102. <div class="bton" style="text-align: left;">
  103. <input class="addts" type="button" value="保存" style="margin-left: 0px;" />
  104. </div>
  105. </td>
  106. </tr>
  107. </table>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <script>
  113. var id = helper.request.queryString("id");
  114. var F_DeptName = decodeURIComponent(helper.request.queryString("F_DeptName"));
  115. $(document).ready(function() {
  116. if(id) {
  117. $("#F_DeptName").val(F_DeptName)
  118. // getDetail()
  119. }
  120. });
  121. $(".addts").click(function() {
  122. editThemSort()
  123. })
  124. function editThemSort() {
  125. if($("#sort").val()=='') {
  126. layer.confirm('请输入排序!', {
  127. btn: ['确定']
  128. });
  129. return;
  130. }
  131. $.ajax({
  132. type: "post",
  133. url: huayi.config.callcenter_url + "Theme/EditModel",
  134. async: true,
  135. dataType: 'json',
  136. data: {
  137. id:id,
  138. sort: $("#sort").val(),
  139. "token": $.cookie("token")
  140. },
  141. success: function(data) {
  142. if(data.state == "success") {
  143. layer.msg("操作成功");
  144. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  145. parent.layer.close(index); //再执行关闭
  146. }
  147. }
  148. });
  149. }
  150. function getDetail() {
  151. $.getJSON(huayi.config.callcenter_url + 'Theme/GetModel', {
  152. id: id,
  153. "token": $.cookie("token")
  154. }, function(result) {
  155. if(result.state.toLowerCase() == "success") {
  156. var content = result.data;
  157. info = content;
  158. $("#name").val(content.F_Name);
  159. // $("#types").val(content.F_TypesOf);
  160. $("#cycle").val(content.F_Cycle);
  161. $("#time").val(content.F_StatisticsBeginTime + ' - ' + content.F_StatisticsEndTime);
  162. if(content.F_IsDisplay) {
  163. $("#isdisplay").prop("checked", true)
  164. } else {
  165. $("#isdisplay").prop("checked", false)
  166. }
  167. }
  168. })
  169. }
  170. </script>
  171. </body>
  172. </html>