Brak opisu

ThreeXBBL.html 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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/AddWorkOrderOper', {
  65. workorderid: wid,
  66. remarks: $("#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. parent.layer.close(index); //再执行关闭
  73. parent.parent.$("#orderlist").bootstrapTable("refresh");
  74. parent.closePage();
  75. }
  76. })
  77. }
  78. function XQ() {
  79. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetInfoByAdmin', {
  80. id: wid,
  81. type: 5,
  82. token: $.cookie("token")
  83. }, function(result) {
  84. if(result.state.toLowerCase() == "success") {
  85. var type = result.data[0].F_Type;
  86. var Ltype = "";
  87. if(type == 1) {
  88. Ltype = "领导批示";
  89. } else if(type == 2) {
  90. Ltype = "市长指示";
  91. } else if(type == 3) {
  92. Ltype = "回退";
  93. }
  94. $("#result").val(result.data[0].F_SuperOpinion);
  95. console.log(result);
  96. }
  97. })
  98. }
  99. </script>
  100. </body>
  101. </html>