12345市长热线标准版-前端

Back.html 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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 rel="stylesheet" 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. </th>
  18. <td><a class="CallOut" id="CallOut"><span class="F_CusPhone">123456</span><img style="vertical-align: text-bottom;margin-left: 5px;" src="../img/Phones.png" /></a></td>
  19. <th>
  20. 联系号码:
  21. </th>
  22. <td><a class="CallOut1" id="CallOut1"><span class="F_ConPhone">123456</span><img style="vertical-align: text-bottom;margin-left: 5px;" src="../img/Phones.png" /></a></td>
  23. </tr>
  24. <tr>
  25. <th class="Importent">
  26. 回访人:
  27. </th>
  28. <td><input type="text" id="visituser"/></td>
  29. <th>
  30. 回访方式:
  31. </th>
  32. <td>
  33. <select class="select_" id="type">
  34. <option value="0">电话</option>
  35. <option value="1">微信</option>
  36. </select>
  37. </td>
  38. </tr>
  39. <tr>
  40. <th class="Importent">回访结果:</th>
  41. <td>
  42. <select class="select_" id='issatisfie'>
  43. <option value="0">不满意</option>
  44. <option value="1">满意</option>
  45. </select>
  46. </td>
  47. </tr>
  48. <tr>
  49. <th class="Importent">回访内容:</th>
  50. <td colspan="7"><textarea data-adaptheight id="result" name="" rows="" cols=""></textarea></td>
  51. </tr>
  52. </table>
  53. <div class="btn_box">
  54. <input type="hidden" id="F_guid" value="" />
  55. <button class="btns BC">保存</button>
  56. <button class="btns Submit">保存并提交回访</button>
  57. </div>
  58. </div>
  59. <!--<script src="../js/main.js?v=1.5"></script>-->
  60. <script src="../js/adjustHeight.js"></script>
  61. <script src="../js/guid.js"></script>
  62. <script>
  63. var wid = helper.request.queryString("wid");
  64. var State;
  65. var a=$("#ID").val()
  66. Detail();
  67. $(document).ready(function() {
  68. $('.BC').click(function() {
  69. State = 0;
  70. JA();
  71. })
  72. $('.Submit').click(function() {
  73. State = 1;
  74. JA();
  75. })
  76. $(".CallOut").click(function (event) {
  77. if ($(".F_CusPhone").text()) {
  78. calloutopt($(".F_CusPhone").text());
  79. }
  80. });
  81. $(".CallOut1").click(function (event) {
  82. if ($(".F_ConPhone").text()) {
  83. calloutopt($(".F_ConPhone").text());
  84. }
  85. });
  86. });
  87. //回访
  88. function JA() {
  89. $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
  90. workorderid: wid,
  91. visituser:$("#visituser").val(),//回访人
  92. result:$("#result").val(),//回访内容
  93. type:$("#type").val(),
  94. issatisfie:$("#issatisfie").val(),
  95. state: State,
  96. visitid:a,
  97. token: $.cookie("token")
  98. }, function(result) {
  99. result = JSON.parse(result);
  100. if(result.state.toLowerCase() == "success") {
  101. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  102. console.log(index);
  103. parent.layer.close(index); //再执行关闭
  104. parent.load();
  105. parent.layer.msg("操作成功");
  106. }
  107. })
  108. }
  109. //草稿详情
  110. function Detail() {
  111. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  112. workorderid: wid,
  113. type: 3,
  114. token: $.cookie("token")
  115. }, function(result) {
  116. if(result.state.toLowerCase() == "success") {
  117. if(result.data.length>0){
  118. $("#visituser").val(result.data[0].F_VisitUser);
  119. $("#issatisfie").val(result.data[0].F_IsSatisfie);
  120. $("#type").val(result.data[0].F_Type);
  121. $("#result").val(result.data[0].F_Result);
  122. }
  123. console.log(result);
  124. }
  125. })
  126. }
  127. function calloutopt(telphone)
  128. {
  129. event.stopPropagation();
  130. if (telphone) {
  131. $.ajax({
  132. type: "get",
  133. url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
  134. async: true,
  135. dataType: 'json',
  136. data: {
  137. token: $.cookie("token"),
  138. phone: $(".CusTelphone").text()
  139. },
  140. success: function (result) {
  141. if (result.state.toLowerCase() == "success") {
  142. var guid = uuid();
  143. $("#F_guid").val(guid);
  144. top.obj.Type = "MakeCall";
  145. top.obj.DestinationNumber = result.data.phone;
  146. top.obj.Header = result.data.fix;
  147. top.obj.TaskType = "2"; //0:拨号外呼;1:未接来电外呼;2:回访外呼
  148. top.obj.TaskPhoneID = wid; //回访的工单ID
  149. top.obj.TaskID = guid; //回访记录编号
  150. top.Send();
  151. }
  152. }
  153. });
  154. }
  155. }
  156. </script>
  157. </body>
  158. </html>