Keine Beschreibung

addQuestion.html 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <link href="../../css/init.css" rel="stylesheet" />
  7. <script src="../../Script/Common/huayi.load.js"></script>
  8. <script src="../../Script/Common/huayi.config.js"></script>
  9. <title>添加问题</title>
  10. <style>
  11. .add_edit_cus {
  12. margin: 20px;
  13. }
  14. .add_edit_cus ul {
  15. padding-left: 0;
  16. }
  17. .add_edit_cus li {
  18. list-style: none;
  19. }
  20. .add_edit_cus textarea {
  21. resize: none;
  22. width: 100%;
  23. }
  24. .text-red {
  25. color: red;
  26. vertical-align: middle;
  27. font-size: 20px;
  28. padding: 2px;
  29. }
  30. .btn {
  31. width: 200px;
  32. }
  33. #question {
  34. height: 200px;
  35. }
  36. body{
  37. overflow: hidden !important;
  38. }
  39. </style>
  40. </head>
  41. <body>
  42. <div class="container add_edit_cus">
  43. <ul class="form-horizontal clearfix">
  44. <li class="form-group">
  45. <label for="t_mobile">问题内容:</label>
  46. <textarea class="form-control" name="" rows="" cols="" id="question" placeholder="请输入问题内容(仅限100字)"></textarea>
  47. <!--<input id="question" class="form-control" type="text" placeholder="请输入问题内容" autocomplete="off" />-->
  48. </li>
  49. </ul>
  50. <div class="form-group clearfix">
  51. <div class="text-center">
  52. <button class="btn btn-primary" id="btn_save" type="button">保存</button>
  53. </div>
  54. </div>
  55. </div>
  56. <script type="text/javascript">
  57. var token = $.cookie("token");
  58. var taskId = helper.request.queryString("taskId");
  59. var id = helper.request.queryString("id");
  60. $('#btn_save').click(function() {
  61. if($('#question').val().length > 100) {
  62. layer.confirm('限于100字!', {
  63. btn: ['确定'] //按钮
  64. });
  65. }
  66. save(0)
  67. })
  68. function save(id){
  69. $.ajax({
  70. type: "get",
  71. url: huayi.config.callcenter_url + "AutoCall/CreateOrUpdateQuestion",
  72. async: true,
  73. data: {
  74. taskid: Number(taskId),
  75. // taskid: taskId,
  76. quesContent: $('#question').val(),
  77. questionId: id,
  78. token: $.cookie('token')
  79. },
  80. success: function(res) {
  81. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  82. parent.layer.close(index); //再执行关闭
  83. layer.msg('创建成功');
  84. parent.initTable();
  85. }
  86. });
  87. }
  88. </script>
  89. </body>
  90. </html>