Nenhuma Descrição

addTask.html 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. </style>
  34. </head>
  35. <body>
  36. <div class="container add_edit_cus">
  37. <ul class="form-horizontal clearfix">
  38. <li class="form-group">
  39. <label for="t_mobile">任务名:</label>
  40. <input id="task" class="form-control" type="text" placeholder="请输入任务名" autocomplete="off" />
  41. </li>
  42. <li class="form-group">
  43. <label for="t_mobile">问题1:</label>
  44. <input id="question1" class="form-control" type="text" placeholder="请输入问题1" autocomplete="off" />
  45. </li>
  46. <li class="form-group">
  47. <label for="t_mobile">问题2 :</label>
  48. <input id="question2" class="form-control" type="text" placeholder="请输入问题2" autocomplete="off" />
  49. </li>
  50. <li class="form-group">
  51. <label for="t_mobile">问题3:</label>
  52. <input id="question3" class="form-control" type="text" placeholder="请输入问题3" autocomplete="off" />
  53. </li>
  54. </ul>
  55. <div class="form-group clearfix">
  56. <div class="text-center">
  57. <button class="btn btn-primary" id="btn_save" type="button">保存</button>
  58. </div>
  59. </div>
  60. </div>
  61. <script type="text/javascript">
  62. var id = helper.request.queryString("id");
  63. $('#btn_save').click(function() {
  64. if(id){
  65. save(id)
  66. }else{
  67. save(0)
  68. }
  69. })
  70. function save(id){
  71. $.ajax({
  72. type: "get",
  73. url: huayi.config.callcenter_url + "AutomaticCall/CreateOrUpdateTask",
  74. async: true,
  75. data: {
  76. id: Number(id),
  77. name: $('#task').val(),
  78. question1:$('#question1').val(),
  79. question2:$('#question2').val(),
  80. question3:$('#question3').val(),
  81. token:$.cookie('token')
  82. },
  83. success: function(res) {
  84. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  85. parent.layer.close(index); //再执行关闭
  86. layer.msg('创建成功');
  87. parent.initTable();
  88. }
  89. });
  90. }
  91. </script>
  92. </body>
  93. </html>