Nenhuma Descrição

auditBack.html 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  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>
  49. <a class="CallOut" id="CallOut">
  50. <span class="F_CusPhone"></span>
  51. <img class="cupImg" style="vertical-align: text-bottom;margin-left: 5px;" src="../img/Phones.png" />
  52. </a>
  53. </td>
  54. <th>回访方式:</th>
  55. <td><span class="visittype"></span></td>
  56. <!-- <th>
  57. 联系号码:
  58. </th>
  59. <td><a class="CallOut1" id="CallOut1"><span class="F_ConPhone"></span><img class="copImg"
  60. style="vertical-align: text-bottom;margin-left: 5px;" src="../img/Phones.png" /></a></td> -->
  61. </tr>
  62. <tr>
  63. <th class="Importent">
  64. 审核人:
  65. </th>
  66. <td><input type="text" id="visituser" /></td>
  67. <th>
  68. 审核方式:
  69. </th>
  70. <td>
  71. <select class="select_" id="type">
  72. <option value="0">电话</option>
  73. <option value="1">微信</option>
  74. <option value="2">APP</option>
  75. <option value="3">网站</option>
  76. <option value="4">微博</option>
  77. <option value="5">信箱</option>
  78. </select>
  79. </td>
  80. </tr>
  81. <tr>
  82. <th class="Importent">审核结果:</th>
  83. <td>
  84. <input checked="true" type="radio" value="1" name="huifang" />满意
  85. <input type="radio" value="0" name="huifang" />不满意
  86. </td>
  87. </tr>
  88. <tr>
  89. <th class="Importent">审核内容:</th>
  90. <td colspan="7"><textarea data-adaptheight id="result" name="" rows="" cols=""></textarea></td>
  91. </tr>
  92. <tr>
  93. <th class="Importent">重办原因:</th>
  94. <td colspan="7"><textarea data-adaptheight id="replace" name="" rows="" cols=""></textarea></td>
  95. </tr>
  96. </table>
  97. <!-- <div class="" style="margin: 20px 0 0 0;">
  98. 尊敬的市民,您于<input id="msg1" type="text" disabled />反映的<textarea id="msg2" type="text"></textarea>问题,工单号:<input
  99. id="msg3" type="text" disabled />,<br />
  100. 处理结果如下:<textarea id="msg4" type="text"></textarea>如有异议,请您再次致电12345,感谢您的支持。<br />
  101. 通知号码:<input id="phone" type="text" />
  102. <button class="btns sendMsg">发送短信</button>
  103. </div> -->
  104. <div class="btn_box">
  105. <input type="hidden" id="F_guid" value="" />
  106. <!-- <button class="btns BC">保存</button>
  107. <button class="btns Submit">保存并提交</button> -->
  108. <button class="btns returnRedo isShowbtn">退回重办</button>
  109. <button class="btns CB isShowbtn">提交重办</button>
  110. <button class="btns Transfer">已办未果</button>
  111. <button class="btns auditBtn isShowbtn" style="display: none;">审核</button>
  112. <button class="btns Closure">结案</button>
  113. <button class="btns sendMessage">发送短信</button>
  114. <button class="btns" onclick="intelligentOutboundCall()">智能外呼</button>
  115. </div>
  116. </div>
  117. <!--<script src="../js/main.js?v=1.5"></script>-->
  118. <script src="../js/adjustHeight.js"></script>
  119. <script src="../js/guid.js"></script>
  120. <script src="../js/sm2/sm2.js"></script>
  121. <script src="../js/sm2/decrypt.js"></script>
  122. <script>
  123. var wid = helper.request.queryString("wid");
  124. var IsExamine = helper.request.queryString("IsExamine"); // 0待回访未审核、1待待回访已审核
  125. var State;
  126. var nexttype;
  127. var ischange = 0;
  128. var a = $("#ID").val()
  129. loadTEL();
  130. loadHF();
  131. Detail();
  132. $(document).ready(function () {
  133. if (String(IsExamine) === "0") {
  134. $(".auditBtn").show();
  135. $(".Closure").hide();
  136. } else if (String(IsExamine) === "1") {
  137. $(".auditBtn").hide();
  138. $(".Closure").show();
  139. }
  140. $('.BC').click(function () {
  141. State = 0;
  142. JA();
  143. });
  144. $('.Closure').click(function () {
  145. State = 1;
  146. Closure();
  147. });
  148. $('.returnRedo').click(function () {
  149. nexttype = 2;
  150. CB();
  151. });
  152. $('.CB').click(function () {
  153. State = 1;
  154. nexttype = 1;
  155. CB();
  156. })
  157. $('.Transfer').click(function () {
  158. Transfer();
  159. })
  160. $('.Submit').click(function () {
  161. State = 1;
  162. JA();
  163. })
  164. $('.sendMessage').click(function () {
  165. sendMessage()
  166. })
  167. $(".CallOut").click(function (event) {
  168. if ($(".F_CusPhone").text()) {
  169. calloutopt($(".F_CusPhone").text());
  170. }
  171. });
  172. $(".CallOut1").click(function (event) {
  173. if ($(".F_ConPhone").text()) {
  174. calloutopt($(".F_ConPhone").text());
  175. }
  176. });
  177. if($.cookie("makeCallId")){
  178. top.$.cookie("makeCallId", "");
  179. }
  180. // if($.cookie("code") == 'ZXHWY'){
  181. // $(".CB").hide()
  182. // }else{
  183. // $(".CB").show()
  184. // }
  185. // 营商审核
  186. $(".auditBtn").click(function () {
  187. $.ajax({
  188. type: "post",
  189. url: huayi.config.callcenter_url +
  190. "WorkOrder/BusinessApproved",
  191. dataType: "json",
  192. async: false,
  193. data: {
  194. token: $.cookie("token"),
  195. workorderid: wid,
  196. },
  197. success: function (data) {
  198. if (data.state.toLowerCase() == "success") {
  199. var index = parent.layer.getFrameIndex(window
  200. .name); //先得到当前iframe层的索引
  201. parent.layer.close(index); //再执行关闭
  202. parent.$("#orderlist").bootstrapTable("refresh");
  203. parent.layer.msg("操作成功");
  204. }
  205. },
  206. });
  207. })
  208. });
  209. function intelligentOutboundCall(){
  210. layer.open({
  211. type: 2,
  212. content: "./auditBack/intelligentOutboundCallList.html?telephone="+$(".F_CusPhone").text()+"&wid="+wid, //
  213. title: "智能外呼列表",
  214. area: ["100%", "100%"], //宽高
  215. });
  216. }
  217. //重办
  218. function CB() {
  219. if ($('#replace').val() == '') {
  220. layer.msg("请输入重办原因");
  221. return;
  222. }
  223. $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
  224. workorderid: wid,
  225. visituser: $("#visituser").val(), //审核人
  226. result: $("#result").val(), //审核内容
  227. type: $("#type").val(),
  228. cbreason: $('#replace').val(), //重办原因
  229. issatisfie: $(' input[name="huifang"]:checked ').val(),
  230. state: State,
  231. nexttype: nexttype,
  232. visitid: a,
  233. token: $.cookie("token")
  234. }, function (result) {
  235. result = JSON.parse(result);
  236. if (result.state.toLowerCase() == "success") {
  237. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  238. parent.layer.close(index); //再执行关闭
  239. parent.$('#orderlist').bootstrapTable('refresh');
  240. parent.layer.msg("操作成功");
  241. }
  242. })
  243. }
  244. function Transfer() {
  245. $.post(huayi.config.callcenter_url + 'WorkOrder/Transfer', {
  246. workorderid: wid,
  247. token: $.cookie("token")
  248. }, function (result) {
  249. result = JSON.parse(result);
  250. if (result.state.toLowerCase() == "success") {
  251. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  252. parent.layer.close(index); //再执行关闭
  253. parent.$('#orderlist').bootstrapTable('refresh');
  254. parent.layer.msg("操作成功");
  255. }
  256. })
  257. }
  258. //审核
  259. function JA() {
  260. $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
  261. workorderid: wid,
  262. visituser: $("#visituser").val(), //审核人
  263. result: $("#result").val(), //审核内容
  264. type: $("#type").val(),
  265. issatisfie: $(' input[name="huifang"]:checked ').val(),
  266. state: State,
  267. visitid: a,
  268. token: $.cookie("token")
  269. }, function (result) {
  270. result = JSON.parse(result);
  271. if (result.state.toLowerCase() == "success") {
  272. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  273. parent.layer.close(index); //再执行关闭
  274. parent.$('#orderlist').bootstrapTable('refresh');
  275. parent.layer.msg("操作成功");
  276. }
  277. })
  278. }
  279. //发送短信
  280. $('.sendMsg').click(function () {
  281. if (!$('#msg4').val()) {
  282. layer.msg('请填写结果')
  283. return
  284. }
  285. if (!$('#phone').val()) {
  286. layer.msg('请填写通知号码')
  287. return
  288. }
  289. $.ajax({
  290. type: "post",
  291. url: huayi.config.callcenter_url + 'WorkOrder/SmsHand',
  292. async: true,
  293. data: {
  294. msg1: $('#msg1').val(),
  295. msg2: $('#msg2').val(),
  296. msg3: $('#msg3').val(),
  297. msg4: $('#msg4').val(),
  298. mobile: $('#phone').val(),
  299. token: $.cookie("token")
  300. },
  301. success: function (res) {
  302. res = JSON.parse(res)
  303. if (res.state.toLowerCase() == 'success') {
  304. layer.msg('短信发送成功')
  305. } else {
  306. layer.msg('短信发送失败')
  307. }
  308. }
  309. });
  310. })
  311. //结案
  312. function Closure() {
  313. $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
  314. workorderid: wid,
  315. visituser: $("#visituser").val(), //审核人
  316. result: $("#result").val(), //审核内容
  317. type: $("#type").val(),
  318. issatisfie: $(' input[name="huifang"]:checked ').val(),
  319. state: State,
  320. visitid: a,
  321. callid: $.cookie("makeCallId"),
  322. token: $.cookie("token")
  323. }, function (result) {
  324. result = JSON.parse(result);
  325. if (result.state.toLowerCase() == "success") {
  326. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  327. parent.layer.close(index); //再执行关闭
  328. if(!$.cookie("makeCallId")){
  329. parent.layer.msg("操作成功,非站内拨打");
  330. }else{
  331. parent.layer.msg("操作成功");
  332. }
  333. parent.$('#orderlist').bootstrapTable('refresh');
  334. top.$.cookie("makeCallId", "");
  335. }
  336. })
  337. }
  338. // 发送短信
  339. function sendMessage() {
  340. $.ajax({
  341. type: "post",
  342. url: huayi.config.callcenter_url + 'WorkOrder/SendVisit',
  343. async: true,
  344. data: {
  345. workorderid: wid,
  346. phone: $(".F_CusPhone").text(),
  347. token: $.cookie("token")
  348. },
  349. success: function (res) {
  350. res = JSON.parse(res)
  351. if (res.state.toLowerCase() == 'success') {
  352. layer.msg('短信发送成功')
  353. } else {
  354. layer.msg('短信发送失败')
  355. }
  356. }
  357. });
  358. }
  359. //草稿详情
  360. function Detail() {
  361. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  362. workorderid: wid,
  363. type: 3,
  364. token: $.cookie("token")
  365. }, function (result) {
  366. if (result.state.toLowerCase() == "success") {
  367. if (result.data.length > 0) {
  368. $("#visituser").val(result.data[0].F_VisitUser);
  369. $("#issatisfie").val(result.data[0].F_IsSatisfie);
  370. $("#type").val(result.data[0].F_Type);
  371. $("#result").val(result.data[0].F_Result);
  372. }
  373. }
  374. })
  375. }
  376. //加载用户电话
  377. function loadTEL() {
  378. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrderNew', {
  379. workorderid: wid,
  380. type: 0,
  381. "token": $.cookie("token")
  382. }, function (result) {
  383. if (result.state.toLowerCase() == "success") {
  384. var Data = result.data.data;
  385. $('#msg3').val(Data[0].F_WorkOrderId)
  386. $('#msg1').val(Data[0].F_CreateTime)
  387. $('#msg2').text(Data[0].F_ComTitle)
  388. $('#msg4').val(result.data.bldata && result.data.bldata[result.data.bldata.length - 1]
  389. .F_Situation)
  390. if (Data[0].F_CusPhone) {
  391. var cusPhone = decryptFn(Data[0].F_CusPhoneShow)
  392. $(".F_CusPhone").text(cusPhone);
  393. $('.cupImg').css('display', 'inline-block')
  394. } else {
  395. $(".F_CusPhone").css('display', 'none');
  396. $('.cupImg').css('display', 'none');
  397. }
  398. if (Data[0].F_ConPhone) {
  399. var conPhone = decryptFn(Data[0].F_CusPhoneShow)
  400. $(".F_ConPhone").text(conPhone);
  401. $('.copImg').css('display', 'inline-block')
  402. } else {
  403. $(".F_ConPhone").css('display', 'none');
  404. $('.copImg').css('display', 'none');
  405. }
  406. if (String(Data[0].F_VisitType) === "1") {
  407. $(".visittype").text("无需回访")
  408. } else {
  409. $(".visittype").text("正常回访")
  410. }
  411. }
  412. })
  413. }
  414. //回访
  415. function loadHF(){
  416. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrderNew', {
  417. workorderid: wid,
  418. type: 6,
  419. "token": $.cookie("token")
  420. }, function (result) {
  421. if (result.state.toLowerCase() == "success") {
  422. if(result.data.length>=1){
  423. ischange = 1
  424. if($(' input[name="huifang"]:checked ').val() == '1'){//满意
  425. $('.isShowbtn').hide()
  426. $('.sendMessage').show()
  427. }else{
  428. $('.isShowbtn').hide()
  429. $('.sendMessage').hide()
  430. }
  431. }
  432. }
  433. })
  434. }
  435. $('input:radio[name=huifang]').change(function() {
  436. if(ischange == 1 && this.value == '1'){
  437. $('.isShowbtn').hide()
  438. $('.sendMessage').show()
  439. }
  440. if(ischange == 1 && this.value == '0'){
  441. $('.isShowbtn').hide()
  442. $('.sendMessage').hide()
  443. }
  444. });
  445. function calloutopt(telphone) {
  446. $.getJSON(huayi.config.callcenter_url + 'UserAccount/GetNowUser', {
  447. "token": $.cookie("token")
  448. }, function (result) {
  449. if (result.state.toLowerCase() == "success") {
  450. if (result.data.user.F_SeatFlag) { //判断是否话务人员
  451. if ($.cookie("extno")) { //判断是否登录分机号
  452. event.stopPropagation();
  453. if (telphone) {
  454. $.ajax({
  455. type: "get",
  456. url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
  457. async: true,
  458. dataType: 'json',
  459. data: {
  460. token: $.cookie("token"),
  461. phone: telphone
  462. },
  463. success: function (result) {
  464. if (result.state.toLowerCase() == "success") {
  465. var guid = uuid();
  466. $("#F_guid").val(guid);
  467. top.obj.Type = "MakeCall";
  468. top.obj.DestinationNumber = result.data.phone;
  469. top.obj.Header = result.data.fix;
  470. top.obj.TaskType = "2"; //0:拨号外呼;1:未接来电外呼;2:审核外呼
  471. top.obj.TaskPhoneID = wid; //审核的工单ID
  472. top.obj.TaskID = guid; //审核记录编号
  473. top.Send();
  474. }
  475. }
  476. });
  477. }
  478. } else
  479. layer.msg("未绑定分机号,不能操作回拨");
  480. } else
  481. layer.msg("非话务人员登录,不能操作回拨");
  482. }
  483. });
  484. }
  485. </script>
  486. </body>
  487. </html>