Нет описания

addQuestionnaireInfo.html 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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/Table/table1.css" rel="stylesheet" />
  8. <link href="../css/init.css" rel="stylesheet" />
  9. <title>添加问卷信息</title>
  10. <style>
  11. table tr {
  12. margin-bottom: 20px;
  13. }
  14. table tr td {
  15. text-align: left;
  16. padding: 5px;
  17. }
  18. .Content {
  19. padding: 10px;
  20. }
  21. .btn {
  22. background: #1ab394;
  23. }
  24. .Btn_box {
  25. margin-top: 20px;
  26. color: #fff;
  27. }
  28. .inpBox select {
  29. width: 150px;
  30. padding: 3px 6px;
  31. }
  32. .F_Remark {
  33. width: 100%;
  34. }
  35. .tab {
  36. border-bottom: 1px solid #ccc;
  37. }
  38. .Check_box {
  39. display: none;
  40. }
  41. .Show {
  42. display: block;
  43. }
  44. #sqzx th {
  45. width: 100px;
  46. }
  47. .d {
  48. color: forestgreen;
  49. }
  50. .du {
  51. color: #0064B6;
  52. }
  53. .w {
  54. color: #e43926;
  55. }
  56. textarea{
  57. resize: none;
  58. }
  59. </style>
  60. </head>
  61. <body>
  62. <div>
  63. <div class="Content">
  64. <div class="tab">
  65. <table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
  66. <tr>
  67. <th>问卷名称:</th>
  68. <td colspan="5">
  69. <input type="text" class="Title" />
  70. </td>
  71. </tr>
  72. <tr>
  73. <th>问卷说明:</th>
  74. <td colspan="5">
  75. <textarea name="" rows="3" cols="20" class="F_Remark"></textarea>
  76. </td>
  77. </tr>
  78. </table>
  79. </div>
  80. <div style="text-align: center; margin-top: 50px;">
  81. <button class="btns add size-14">保存</button>
  82. </div>
  83. </div>
  84. </div>
  85. <script>
  86. $(document).ready(function() {
  87. //增加
  88. $(".add").click(function() {
  89. var CategoryId = $(".Title").val(); //问卷名称
  90. var Title = $(".F_Remark").val(); //问卷内容
  91. if(!CategoryId) {
  92. layer.msg("内容不能为空");
  93. } else if(!Title) {
  94. layer.msg("标题不能为空");
  95. }
  96. $.ajax({
  97. type: "post",
  98. url: huayi.config.callcenter_url + "/Questionnaire/CreateOrUpdatePager",
  99. async: true,
  100. dataType: "json",
  101. data: {
  102. Title: CategoryId,
  103. Remark: Title,
  104. token: $.cookie("token"),
  105. },
  106. success: function(data) {
  107. if(data.state.toLowerCase() == 'success') {
  108. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  109. parent.layer.close(index); //再执行关闭
  110. parent.IndexCategoryGe()
  111. parent.layer.msg(data.message);
  112. }
  113. }
  114. });
  115. })
  116. });
  117. </script>
  118. </body>
  119. </html>