永城市12345 (县级市)- 来源于虞城县12345 - 所有县级统一API

BackDatil.html 2.8KB

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