12345市长热线标准版-前端

Back.html 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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 >
  16. 联系号码:
  17. <td><input type="text" readonly="readonly" /></td>
  18. </th>
  19. </tr>-->
  20. <tr>
  21. <th class="Importent">
  22. 回访人:
  23. <td><input type="text" id="visituser"/></td>
  24. </th>
  25. <th>
  26. 回访方式:
  27. <td>
  28. <select class="select_" id="type">
  29. <option value="0">电话</option>
  30. <option value="1">微信</option>
  31. </select>
  32. </td>
  33. </th>
  34. </tr>
  35. <tr>
  36. <th class="Importent">回访结果:</th>
  37. <td>
  38. <select class="select_" id='issatisfie'>
  39. <option value="0">不满意</option>
  40. <option value="1">满意</option>
  41. </select>
  42. </td>
  43. </tr>
  44. <tr>
  45. <th class="Importent">回访内容:</th>
  46. <td colspan="7"><textarea id="result" name="" rows="" cols=""></textarea></td>
  47. </tr>
  48. </table>
  49. <div class="btn_box">
  50. <button class="btns BC">保存</button>
  51. <button class="btns Submit">保存并提交回访</button>
  52. </div>
  53. </div>
  54. <script>
  55. var wid = helper.request.queryString("wid");
  56. var State;
  57. var a=$("#ID").val()
  58. Detail();
  59. $(document).ready(function() {
  60. $('.BC').click(function() {
  61. State = 0;
  62. JA();
  63. })
  64. $('.Submit').click(function() {
  65. State = 1;
  66. JA();
  67. })
  68. });
  69. //回访
  70. function JA() {
  71. $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
  72. workorderid: wid,
  73. visituser:$("#visituser").val(),//回访人
  74. result:$("#result").val(),//回访内容
  75. type:$("#type").val(),
  76. issatisfie:$("#issatisfie").val(),
  77. state: State,
  78. visitid:a,
  79. token: $.cookie("token")
  80. }, function(result) {
  81. result = JSON.parse(result);
  82. if(result.state.toLowerCase() == "success") {
  83. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  84. console.log(index);
  85. parent.layer.close(index); //再执行关闭
  86. parent.load();
  87. parent.layer.msg("操作成功");
  88. }
  89. })
  90. }
  91. //草稿详情
  92. function Detail() {
  93. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  94. workorderid: wid,
  95. type: 3,
  96. token: $.cookie("token")
  97. }, function(result) {
  98. if(result.state.toLowerCase() == "success") {
  99. if(result.data.length>0){
  100. $("#visituser").val(result.data[0].F_VisitUser);
  101. $("#issatisfie").val(result.data[0].F_IsSatisfie);
  102. $("#type").val(result.data[0].F_Type);
  103. $("#result").val(result.data[0].F_Result);
  104. }
  105. console.log(result);
  106. }
  107. })
  108. }
  109. </script>
  110. </body>
  111. </html>