12345市长热线标准版-前端

Back.html 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. <title>工单回访</title>
  10. </head>
  11. <body>
  12. <div class="Common">
  13. <table >
  14. <!--<tr>
  15. <th >
  16. 联系号码:
  17. <td><input type="text" readonly="readonly" /></td>
  18. </th>
  19. </tr>-->
  20. <tr>
  21. <th class="Importent">
  22. 回访人:
  23. <td><input type="text" id="visituser"/></td>
  24. </th>
  25. <th>
  26. 回访方式:
  27. <td>
  28. <select class="select_" id="type">
  29. <option value="0">电话</option>
  30. <option value="1">微信</option>
  31. </select>
  32. </td>
  33. </th>
  34. </tr>
  35. <tr>
  36. <th class="Importent">回访结果:</th>
  37. <td>
  38. <select class="select_" id='issatisfie'>
  39. <option value="0">不满意</option>
  40. <option value="1">满意</option>
  41. </select>
  42. </td>
  43. </tr>
  44. <tr>
  45. <th class="Importent">回访内容:</th>
  46. <td colspan="7"><textarea data-adaptheight id="result" name="" rows="" cols=""></textarea></td>
  47. </tr>
  48. </table>
  49. <div class="btn_box">
  50. <button class="btns BC">保存</button>
  51. <button class="btns Submit">保存并提交回访</button>
  52. </div>
  53. </div>
  54. <script src="../js/adjustHeight.js"></script>
  55. <script>
  56. var wid = helper.request.queryString("wid");
  57. var State;
  58. var a=$("#ID").val()
  59. Detail();
  60. $(document).ready(function() {
  61. $('.BC').click(function() {
  62. State = 0;
  63. JA();
  64. })
  65. $('.Submit').click(function() {
  66. State = 1;
  67. JA();
  68. })
  69. });
  70. //回访
  71. function JA() {
  72. $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
  73. workorderid: wid,
  74. visituser:$("#visituser").val(),//回访人
  75. result:$("#result").val(),//回访内容
  76. type:$("#type").val(),
  77. issatisfie:$("#issatisfie").val(),
  78. state: State,
  79. visitid:a,
  80. token: $.cookie("token")
  81. }, function(result) {
  82. result = JSON.parse(result);
  83. if(result.state.toLowerCase() == "success") {
  84. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  85. console.log(index);
  86. parent.layer.close(index); //再执行关闭
  87. parent.load();
  88. parent.layer.msg("操作成功");
  89. }
  90. })
  91. }
  92. //草稿详情
  93. function Detail() {
  94. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  95. workorderid: wid,
  96. type: 3,
  97. token: $.cookie("token")
  98. }, function(result) {
  99. if(result.state.toLowerCase() == "success") {
  100. if(result.data.length>0){
  101. $("#visituser").val(result.data[0].F_VisitUser);
  102. $("#issatisfie").val(result.data[0].F_IsSatisfie);
  103. $("#type").val(result.data[0].F_Type);
  104. $("#result").val(result.data[0].F_Result);
  105. }
  106. console.log(result);
  107. }
  108. })
  109. }
  110. </script>
  111. </body>
  112. </html>