12345市长热线标准版-前端

BackDatil.html 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 class="Importent">退回原因:</th>
  16. <td colspan="7"><textarea id="result" name="" rows="" cols=""></textarea></td>
  17. </tr>
  18. </table>
  19. <div class="btn_box">
  20. <button class="btns BC">保存</button>
  21. </div>
  22. </div>
  23. <script>
  24. var wid = helper.request.queryString("wid");
  25. $(document).ready(function() {
  26. $('.BC').click(function() {
  27. if(!$("#result").val()){
  28. layer.msg("原因不能为空");
  29. }else{
  30. JA();
  31. }
  32. })
  33. });
  34. //回退
  35. function JA() {
  36. $.post(huayi.config.callcenter_url + 'WorkOrder/ReturnWorkOrder', {
  37. workorderid: wid,
  38. backreason:$("#result").val(),//回访内容
  39. token: $.cookie("token")
  40. }, function(result) {
  41. result = JSON.parse(result);
  42. if(result.state.toLowerCase() == "success") {
  43. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  44. console.log(index);
  45. parent.layer.close(index); //再执行关闭
  46. parent.load();
  47. parent.layer.msg("操作成功");
  48. }
  49. })
  50. }
  51. </script>
  52. </body>
  53. </html>