暂无描述

BackDatil.html 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. var tab = helper.request.queryString("tab");
  27. //alert(wid)
  28. $(document).ready(function() {
  29. $('.BC').click(function() {
  30. if(!$("#result").val()) {
  31. layer.msg("原因不能为空");
  32. } else if(tab) {
  33. editTh();
  34. } else {
  35. JA();
  36. }
  37. })
  38. });
  39. if(tab) {
  40. XQ();
  41. }
  42. //回退
  43. function editTh() {
  44. $.post(huayi.config.callcenter_url + 'WorkOrder/EditSuperInfoByAdmin', {
  45. id: wid,
  46. superopinion: $("#result").val(), //回访内容
  47. token: $.cookie("token")
  48. }, function(result) {
  49. result = JSON.parse(result);
  50. if(result.state.toLowerCase() == "success") {
  51. parent.parent.layer.closeAll();
  52. parent.parent.$('#orderlist').bootstrapTable('refresh');
  53. parent.parent.layer.msg("操作成功!");
  54. // var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  55. // console.log(index);
  56. // parent.layer.close(index); //再执行关闭
  57. // parent.load();
  58. // parent.layer.msg("操作成功");
  59. }
  60. })
  61. }
  62. //回退
  63. function JA() {
  64. $.post(huayi.config.callcenter_url + 'WorkOrder/ReturnWorkOrder', {
  65. workorderid: wid,
  66. backreason: $("#result").val(), //回访内容
  67. token: $.cookie("token")
  68. }, function(result) {
  69. result = JSON.parse(result);
  70. if(result.state.toLowerCase() == "success") {
  71. // var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  72. // console.log(index);
  73. // parent.layer.close(index); //再执行关闭
  74. // parent.$('#orderlist').bootstrapTable('refresh');
  75. // parent.layer.msg("操作成功");
  76. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  77. parent.layer.close(index); //再执行关闭
  78. parent.parent.$("#orderlist").bootstrapTable("refresh");
  79. parent.closePage();
  80. }
  81. })
  82. }
  83. function XQ() {
  84. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetInfoByAdmin', {
  85. id: wid,
  86. type: 5,
  87. token: $.cookie("token")
  88. }, function(result) {
  89. if(result.state.toLowerCase() == "success") {
  90. var type = result.data[0].F_Type;
  91. var Ltype = "";
  92. if(type == 1) {
  93. Ltype = "领导批示";
  94. } else if(type == 2) {
  95. Ltype = "市长指示";
  96. } else if(type == 3) {
  97. Ltype = "回退";
  98. }
  99. $("#result").val(result.data[0].F_SuperOpinion);
  100. console.log(result);
  101. }
  102. })
  103. }
  104. </script>
  105. </body>
  106. </html>