信阳市12345演示系统-前端代码

BackDatil.html 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 editTh() {
  43. $.post(huayi.config.callcenter_url + 'WorkOrder/EditSuperInfoByAdmin', {
  44. id: wid,
  45. superopinion:$("#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 JA() {
  60. $.post(huayi.config.callcenter_url + 'WorkOrder/ReturnWorkOrder', {
  61. workorderid: wid,
  62. backreason:$("#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. function XQ(){
  76. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetInfoByAdmin', {
  77. id: wid,
  78. type:5,
  79. token: $.cookie("token")
  80. }, function(result) {
  81. if(result.state.toLowerCase() == "success") {
  82. var type=result.data[0].F_Type;
  83. var Ltype="";
  84. if(type==1){
  85. Ltype="领导批示";
  86. }else if(type==2){
  87. Ltype="市长指示";
  88. } else if(type==3){
  89. Ltype="回退";
  90. }
  91. $("#result").val(result.data[0].F_SuperOpinion);
  92. console.log(result);
  93. }
  94. })
  95. }
  96. </script>
  97. </body>
  98. </html>