暫無描述

auditBack.html 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  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/init.css" />
  8. <title>工单审核</title>
  9. <style type="text/css">
  10. #msg1,
  11. #msg2,
  12. #msg3,
  13. #phone {
  14. border: none;
  15. border-bottom: 1px solid #ccc;
  16. margin-bottom: 20px;
  17. background-color: #FFFFFF;
  18. color: #00a1cb;
  19. }
  20. #msg4 {
  21. width: 250px;
  22. height: 50px;
  23. border: none;
  24. border-bottom: 1px solid #ccc;
  25. margin-bottom: 20px;
  26. vertical-align: top;
  27. }
  28. #msg2 {
  29. vertical-align: top;
  30. height: 25px;
  31. }
  32. #msg1:focus,
  33. #msg2:focus,
  34. #msg3:focus,
  35. #msg4:focus,
  36. #phone:focus {
  37. outline: none;
  38. }
  39. </style>
  40. </head>
  41. <body>
  42. <div class="Common">
  43. <table>
  44. <tr>
  45. <th>
  46. 来电号码:
  47. </th>
  48. <td><a class="CallOut" id="CallOut"><span class="F_CusPhone"></span><img class="cupImg"
  49. style="vertical-align: text-bottom;margin-left: 5px;" src="../img/Phones.png" /></a></td>
  50. <!-- <th>
  51. 联系号码:
  52. </th>
  53. <td><a class="CallOut1" id="CallOut1"><span class="F_ConPhone"></span><img class="copImg"
  54. style="vertical-align: text-bottom;margin-left: 5px;" src="../img/Phones.png" /></a></td>
  55. -->
  56. </tr>
  57. <tr>
  58. <th class="Importent">
  59. 审核人:
  60. </th>
  61. <td><input type="text" id="visituser" /></td>
  62. <th>
  63. 审核方式:
  64. </th>
  65. <td>
  66. <select class="select_" id="type">
  67. <option value="0">电话</option>
  68. <option value="1">微信</option>
  69. <option value="2">APP</option>
  70. <option value="3">网站</option>
  71. <option value="4">微博</option>
  72. <option value="5">信箱</option>
  73. </select>
  74. </td>
  75. </tr>
  76. <tr>
  77. <th class="Importent">审核结果:</th>
  78. <td>
  79. <input checked="true" type="radio" value="1" name="huifang" />满意
  80. <input type="radio" value="0" name="huifang" />不满意
  81. </td>
  82. </tr>
  83. <tr>
  84. <th class="Importent">审核内容:</th>
  85. <td colspan="7"><textarea data-adaptheight id="result" name="" rows="" cols=""></textarea></td>
  86. </tr>
  87. <tr>
  88. <th class="Importent">重办原因:</th>
  89. <td colspan="7"><textarea data-adaptheight id="replace" name="" rows="" cols=""></textarea></td>
  90. </tr>
  91. </table>
  92. <!-- <div class="" style="margin: 20px 0 0 0;">
  93. 尊敬的市民,您于<input id="msg1" type="text" disabled />反映的<textarea id="msg2" type="text"></textarea>问题,工单号:<input
  94. id="msg3" type="text" disabled />,<br />
  95. 处理结果如下:<textarea id="msg4" type="text"></textarea>如有异议,请您再次致电12345,感谢您的支持。<br />
  96. 通知号码:<input id="phone" type="text" />
  97. <button class="btns sendMsg">发送短信</button>
  98. </div> -->
  99. <div class="btn_box">
  100. <input type="hidden" id="F_guid" value="" />
  101. <!-- <button class="btns BC">保存</button>
  102. <button class="btns Submit">保存并提交</button> -->
  103. <button class="btns CB">提交重办</button>
  104. <button class="btns Transfer">已办未果</button>
  105. <button class="btns Closure">结案</button>
  106. </div>
  107. </div>
  108. <!--<script src="../js/main.js?v=1.5"></script>-->
  109. <script src="../js/adjustHeight.js"></script>
  110. <script src="../js/guid.js"></script>
  111. <script>
  112. var wid = helper.request.queryString("wid");
  113. var State;
  114. var a = $("#ID").val()
  115. loadTEL();
  116. Detail();
  117. $(document).ready(function () {
  118. $('.BC').click(function () {
  119. State = 0;
  120. JA();
  121. });
  122. $('.Closure').click(function () {
  123. State = 1;
  124. Closure();
  125. });
  126. $('.CB').click(function () {
  127. State = 1;
  128. CB();
  129. })
  130. $('.Transfer').click(function () {
  131. Transfer();
  132. })
  133. $('.Submit').click(function () {
  134. State = 1;
  135. JA();
  136. })
  137. $(".CallOut").click(function (event) {
  138. if ($(".F_CusPhone").text()) {
  139. calloutopt($(".F_CusPhone").text());
  140. }
  141. });
  142. $(".CallOut1").click(function (event) {
  143. if ($(".F_ConPhone").text()) {
  144. calloutopt($(".F_ConPhone").text());
  145. }
  146. });
  147. });
  148. //重办
  149. function CB() {
  150. if ($('#replace').val() == '') {
  151. layer.msg("请输入重办原因");
  152. return;
  153. }
  154. $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
  155. workorderid: wid,
  156. visituser: $("#visituser").val(), //审核人
  157. nexttype: 1,
  158. result: $("#result").val(), //审核内容
  159. type: $("#type").val(),
  160. cbreason: $('#replace').val(), //重办原因
  161. issatisfie: $(' input[name="huifang"]:checked ').val(),
  162. state: State,
  163. visitid: a,
  164. token: $.cookie("token")
  165. }, function (result) {
  166. result = JSON.parse(result);
  167. if (result.state.toLowerCase() == "success") {
  168. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  169. console.log(index);
  170. parent.layer.close(index); //再执行关闭
  171. parent.$('#orderlist').bootstrapTable('refresh');
  172. parent.layer.msg("操作成功");
  173. }
  174. })
  175. }
  176. function Transfer() {
  177. $.post(huayi.config.callcenter_url + 'WorkOrder/Transfer', {
  178. workorderid: wid,
  179. token: $.cookie("token")
  180. }, function (result) {
  181. result = JSON.parse(result);
  182. if (result.state.toLowerCase() == "success") {
  183. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  184. console.log(index);
  185. parent.layer.close(index); //再执行关闭
  186. parent.$('#orderlist').bootstrapTable('refresh');
  187. parent.layer.msg("操作成功");
  188. }
  189. })
  190. }
  191. //审核
  192. function JA() {
  193. $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
  194. workorderid: wid,
  195. visituser: $("#visituser").val(), //审核人
  196. result: $("#result").val(), //审核内容
  197. type: $("#type").val(),
  198. issatisfie: $(' input[name="huifang"]:checked ').val(),
  199. state: State,
  200. visitid: a,
  201. token: $.cookie("token")
  202. }, function (result) {
  203. result = JSON.parse(result);
  204. if (result.state.toLowerCase() == "success") {
  205. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  206. console.log(index);
  207. parent.layer.close(index); //再执行关闭
  208. parent.$('#orderlist').bootstrapTable('refresh');
  209. parent.layer.msg("操作成功");
  210. }
  211. })
  212. }
  213. //发送短信
  214. $('.sendMsg').click(function () {
  215. if (!$('#msg4').val()) {
  216. layer.msg('请填写结果')
  217. return
  218. }
  219. if (!$('#phone').val()) {
  220. layer.msg('请填写通知号码')
  221. return
  222. }
  223. $.ajax({
  224. type: "post",
  225. url: huayi.config.callcenter_url + 'WorkOrder/SmsHand',
  226. async: true,
  227. data: {
  228. msg1: $('#msg1').val(),
  229. msg2: $('#msg2').val(),
  230. msg3: $('#msg3').val(),
  231. msg4: $('#msg4').val(),
  232. mobile: $('#phone').val(),
  233. token: $.cookie("token")
  234. },
  235. success: function (res) {
  236. res = JSON.parse(res)
  237. if (res.state.toLowerCase() == 'success') {
  238. layer.msg('短信发送成功')
  239. } else {
  240. layer.msg('短信发送失败')
  241. }
  242. }
  243. });
  244. })
  245. //结案
  246. function Closure() {
  247. $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
  248. workorderid: wid,
  249. visituser: $("#visituser").val(), //审核人
  250. result: $("#result").val(), //审核内容
  251. type: $("#type").val(),
  252. issatisfie: $(' input[name="huifang"]:checked ').val(),
  253. state: State,
  254. visitid: a,
  255. token: $.cookie("token")
  256. }, function (result) {
  257. result = JSON.parse(result);
  258. if (result.state.toLowerCase() == "success") {
  259. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  260. console.log(index);
  261. parent.layer.close(index); //再执行关闭
  262. parent.layer.msg("操作成功");
  263. parent.$('#orderlist').bootstrapTable('refresh');
  264. // parent.Lawsuit(wid);
  265. }
  266. })
  267. }
  268. //草稿详情
  269. function Detail() {
  270. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  271. workorderid: wid,
  272. type: 3,
  273. token: $.cookie("token")
  274. }, function (result) {
  275. if (result.state.toLowerCase() == "success") {
  276. if (result.data.length > 0) {
  277. $("#visituser").val(result.data[0].F_VisitUser);
  278. $("#issatisfie").val(result.data[0].F_IsSatisfie);
  279. $("#type").val(result.data[0].F_Type);
  280. $("#result").val(result.data[0].F_Result);
  281. }
  282. console.log(result);
  283. }
  284. })
  285. }
  286. //加载用户电话
  287. function loadTEL() {
  288. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder', {
  289. workorderid: wid,
  290. "token": $.cookie("token")
  291. }, function (result) {
  292. if (result.state.toLowerCase() == "success") {
  293. var Data = result.data.data;
  294. $('#msg3').val(Data[0].F_WorkOrderId)
  295. $('#msg1').val(Data[0].F_CreateTime)
  296. $('#msg2').text(Data[0].F_ComTitle)
  297. $('#msg4').val(result.data.bldata && result.data.bldata[result.data.bldata.length - 1]
  298. .F_Situation)
  299. if (Data[0].F_CusPhone) {
  300. $(".F_CusPhone").text(Data[0].F_CusPhone);
  301. $('.cupImg').css('display', 'inline-block')
  302. } else {
  303. $(".F_CusPhone").css('display', 'none');
  304. $('.cupImg').css('display', 'none');
  305. }
  306. if (Data[0].F_ConPhone) {
  307. $(".F_ConPhone").text(Data[0].F_ConPhone);
  308. $('.copImg').css('display', 'inline-block')
  309. } else {
  310. $(".F_ConPhone").css('display', 'none');
  311. $('.copImg').css('display', 'none');
  312. }
  313. }
  314. })
  315. }
  316. function calloutopt(telphone) {
  317. $.getJSON(huayi.config.callcenter_url + 'UserAccount/GetNowUser', {
  318. "token": $.cookie("token")
  319. }, function (result) {
  320. if (result.state.toLowerCase() == "success") {
  321. if (result.data.user.F_SeatFlag) { //判断是否话务人员
  322. if ($.cookie("extno")) { //判断是否登录分机号
  323. event.stopPropagation();
  324. if (telphone) {
  325. $.ajax({
  326. type: "get",
  327. url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
  328. async: true,
  329. dataType: 'json',
  330. data: {
  331. token: $.cookie("token"),
  332. phone: telphone
  333. },
  334. success: function (result) {
  335. if (result.state.toLowerCase() == "success") {
  336. var guid = uuid();
  337. $("#F_guid").val(guid);
  338. top.obj.Type = "MakeCall";
  339. top.obj.DestinationNumber = result.data.phone;
  340. top.obj.Header = result.data.fix;
  341. top.obj.TaskType = "2"; //0:拨号外呼;1:未接来电外呼;2:审核外呼
  342. top.obj.TaskPhoneID = wid; //审核的工单ID
  343. top.obj.TaskID = guid; //审核记录编号
  344. top.Send();
  345. }
  346. }
  347. });
  348. }
  349. } else
  350. layer.msg("未绑定分机号,不能操作回拨");
  351. } else
  352. layer.msg("非话务人员登录,不能操作回拨");
  353. }
  354. });
  355. }
  356. </script>
  357. </body>
  358. </html>