商丘12345 前端

BackDatil.html 1.6KB

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