Keine Beschreibung

auditBack.html 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  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">退回重办</button>
  109. <button class="btns CB">提交重办</button>
  110. <button class="btns Transfer">已办未果</button>
  111. <button class="btns auditBtn" 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>
  121. var wid = helper.request.queryString("wid");
  122. var IsExamine = helper.request.queryString("IsExamine"); // 0待回访未审核、1待待回访已审核
  123. var State;
  124. var nexttype;
  125. var a = $("#ID").val()
  126. loadTEL();
  127. Detail();
  128. $(document).ready(function () {
  129. if (String(IsExamine) === "0") {
  130. $(".auditBtn").show();
  131. $(".Closure").hide();
  132. } else if (String(IsExamine) === "1") {
  133. $(".auditBtn").hide();
  134. $(".Closure").show();
  135. }
  136. $('.BC').click(function () {
  137. State = 0;
  138. JA();
  139. });
  140. $('.Closure').click(function () {
  141. State = 1;
  142. Closure();
  143. });
  144. $('.returnRedo').click(function () {
  145. nexttype = 2;
  146. CB();
  147. });
  148. $('.CB').click(function () {
  149. State = 1;
  150. nexttype = 1;
  151. CB();
  152. })
  153. $('.Transfer').click(function () {
  154. Transfer();
  155. })
  156. $('.Submit').click(function () {
  157. State = 1;
  158. JA();
  159. })
  160. $('.sendMessage').click(function () {
  161. sendMessage()
  162. })
  163. $(".CallOut").click(function (event) {
  164. if ($(".F_CusPhone").text()) {
  165. calloutopt($(".F_CusPhone").text());
  166. }
  167. });
  168. $(".CallOut1").click(function (event) {
  169. if ($(".F_ConPhone").text()) {
  170. calloutopt($(".F_ConPhone").text());
  171. }
  172. });
  173. if($.cookie("makeCallId")){
  174. top.$.cookie("makeCallId", "");
  175. }
  176. // 营商审核
  177. $(".auditBtn").click(function () {
  178. $.ajax({
  179. type: "post",
  180. url: huayi.config.callcenter_url +
  181. "WorkOrder/BusinessApproved",
  182. dataType: "json",
  183. async: false,
  184. data: {
  185. token: $.cookie("token"),
  186. workorderid: wid,
  187. },
  188. success: function (data) {
  189. if (data.state.toLowerCase() == "success") {
  190. var index = parent.layer.getFrameIndex(window
  191. .name); //先得到当前iframe层的索引
  192. parent.layer.close(index); //再执行关闭
  193. parent.$("#orderlist").bootstrapTable("refresh");
  194. parent.layer.msg("操作成功");
  195. }
  196. },
  197. });
  198. })
  199. });
  200. function intelligentOutboundCall(){
  201. layer.open({
  202. type: 2,
  203. content: "./auditBack/intelligentOutboundCallList.html?telephone="+$(".F_CusPhone").text()+"&wid="+wid, //
  204. title: "智能外呼列表",
  205. area: ["100%", "100%"], //宽高
  206. });
  207. }
  208. //重办
  209. function CB() {
  210. if ($('#replace').val() == '') {
  211. layer.msg("请输入重办原因");
  212. return;
  213. }
  214. $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
  215. workorderid: wid,
  216. visituser: $("#visituser").val(), //审核人
  217. result: $("#result").val(), //审核内容
  218. type: $("#type").val(),
  219. cbreason: $('#replace').val(), //重办原因
  220. issatisfie: $(' input[name="huifang"]:checked ').val(),
  221. state: State,
  222. nexttype: nexttype,
  223. visitid: a,
  224. token: $.cookie("token")
  225. }, function (result) {
  226. result = JSON.parse(result);
  227. if (result.state.toLowerCase() == "success") {
  228. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  229. parent.layer.close(index); //再执行关闭
  230. parent.$('#orderlist').bootstrapTable('refresh');
  231. parent.layer.msg("操作成功");
  232. }
  233. })
  234. }
  235. function Transfer() {
  236. $.post(huayi.config.callcenter_url + 'WorkOrder/Transfer', {
  237. workorderid: wid,
  238. token: $.cookie("token")
  239. }, function (result) {
  240. result = JSON.parse(result);
  241. if (result.state.toLowerCase() == "success") {
  242. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  243. parent.layer.close(index); //再执行关闭
  244. parent.$('#orderlist').bootstrapTable('refresh');
  245. parent.layer.msg("操作成功");
  246. }
  247. })
  248. }
  249. //审核
  250. function JA() {
  251. $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
  252. workorderid: wid,
  253. visituser: $("#visituser").val(), //审核人
  254. result: $("#result").val(), //审核内容
  255. type: $("#type").val(),
  256. issatisfie: $(' input[name="huifang"]:checked ').val(),
  257. state: State,
  258. visitid: a,
  259. token: $.cookie("token")
  260. }, function (result) {
  261. result = JSON.parse(result);
  262. if (result.state.toLowerCase() == "success") {
  263. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  264. parent.layer.close(index); //再执行关闭
  265. parent.$('#orderlist').bootstrapTable('refresh');
  266. parent.layer.msg("操作成功");
  267. }
  268. })
  269. }
  270. //发送短信
  271. $('.sendMsg').click(function () {
  272. if (!$('#msg4').val()) {
  273. layer.msg('请填写结果')
  274. return
  275. }
  276. if (!$('#phone').val()) {
  277. layer.msg('请填写通知号码')
  278. return
  279. }
  280. $.ajax({
  281. type: "post",
  282. url: huayi.config.callcenter_url + 'WorkOrder/SmsHand',
  283. async: true,
  284. data: {
  285. msg1: $('#msg1').val(),
  286. msg2: $('#msg2').val(),
  287. msg3: $('#msg3').val(),
  288. msg4: $('#msg4').val(),
  289. mobile: $('#phone').val(),
  290. token: $.cookie("token")
  291. },
  292. success: function (res) {
  293. res = JSON.parse(res)
  294. if (res.state.toLowerCase() == 'success') {
  295. layer.msg('短信发送成功')
  296. } else {
  297. layer.msg('短信发送失败')
  298. }
  299. }
  300. });
  301. })
  302. //结案
  303. function Closure() {
  304. $.post(huayi.config.callcenter_url + 'WorkOrder/VisitWorkOrder', {
  305. workorderid: wid,
  306. visituser: $("#visituser").val(), //审核人
  307. result: $("#result").val(), //审核内容
  308. type: $("#type").val(),
  309. issatisfie: $(' input[name="huifang"]:checked ').val(),
  310. state: State,
  311. visitid: a,
  312. callid: $.cookie("makeCallId"),
  313. token: $.cookie("token")
  314. }, function (result) {
  315. result = JSON.parse(result);
  316. if (result.state.toLowerCase() == "success") {
  317. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  318. parent.layer.close(index); //再执行关闭
  319. if(!$.cookie("makeCallId")){
  320. parent.layer.msg("操作成功,非站内拨打");
  321. }else{
  322. parent.layer.msg("操作成功");
  323. }
  324. parent.$('#orderlist').bootstrapTable('refresh');
  325. top.$.cookie("makeCallId", "");
  326. }
  327. })
  328. }
  329. // 发送短信
  330. function sendMessage() {
  331. $.ajax({
  332. type: "post",
  333. url: huayi.config.callcenter_url + 'WorkOrder/SendVisit',
  334. async: true,
  335. data: {
  336. workorderid: wid,
  337. phone: $(".F_CusPhone").text(),
  338. token: $.cookie("token")
  339. },
  340. success: function (res) {
  341. res = JSON.parse(res)
  342. if (res.state.toLowerCase() == 'success') {
  343. layer.msg('短信发送成功')
  344. } else {
  345. layer.msg('短信发送失败')
  346. }
  347. }
  348. });
  349. }
  350. //草稿详情
  351. function Detail() {
  352. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  353. workorderid: wid,
  354. type: 3,
  355. token: $.cookie("token")
  356. }, function (result) {
  357. if (result.state.toLowerCase() == "success") {
  358. if (result.data.length > 0) {
  359. $("#visituser").val(result.data[0].F_VisitUser);
  360. $("#issatisfie").val(result.data[0].F_IsSatisfie);
  361. $("#type").val(result.data[0].F_Type);
  362. $("#result").val(result.data[0].F_Result);
  363. }
  364. }
  365. })
  366. }
  367. //加载用户电话
  368. function loadTEL() {
  369. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrderNew', {
  370. workorderid: wid,
  371. type: 0,
  372. "token": $.cookie("token")
  373. }, function (result) {
  374. if (result.state.toLowerCase() == "success") {
  375. var Data = result.data.data;
  376. $('#msg3').val(Data[0].F_WorkOrderId)
  377. $('#msg1').val(Data[0].F_CreateTime)
  378. $('#msg2').text(Data[0].F_ComTitle)
  379. $('#msg4').val(result.data.bldata && result.data.bldata[result.data.bldata.length - 1]
  380. .F_Situation)
  381. if (Data[0].F_CusPhone) {
  382. $(".F_CusPhone").text(Data[0].F_CusPhone);
  383. $('.cupImg').css('display', 'inline-block')
  384. } else {
  385. $(".F_CusPhone").css('display', 'none');
  386. $('.cupImg').css('display', 'none');
  387. }
  388. if (Data[0].F_ConPhone) {
  389. $(".F_ConPhone").text(Data[0].F_ConPhone);
  390. $('.copImg').css('display', 'inline-block')
  391. } else {
  392. $(".F_ConPhone").css('display', 'none');
  393. $('.copImg').css('display', 'none');
  394. }
  395. if (String(Data[0].F_VisitType) === "1") {
  396. $(".visittype").text("无需回访")
  397. } else {
  398. $(".visittype").text("正常回访")
  399. }
  400. }
  401. })
  402. }
  403. function calloutopt(telphone) {
  404. $.getJSON(huayi.config.callcenter_url + 'UserAccount/GetNowUser', {
  405. "token": $.cookie("token")
  406. }, function (result) {
  407. if (result.state.toLowerCase() == "success") {
  408. if (result.data.user.F_SeatFlag) { //判断是否话务人员
  409. if ($.cookie("extno")) { //判断是否登录分机号
  410. event.stopPropagation();
  411. if (telphone) {
  412. $.ajax({
  413. type: "get",
  414. url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
  415. async: true,
  416. dataType: 'json',
  417. data: {
  418. token: $.cookie("token"),
  419. phone: telphone
  420. },
  421. success: function (result) {
  422. if (result.state.toLowerCase() == "success") {
  423. var guid = uuid();
  424. $("#F_guid").val(guid);
  425. top.obj.Type = "MakeCall";
  426. top.obj.DestinationNumber = result.data.phone;
  427. top.obj.Header = result.data.fix;
  428. top.obj.TaskType = "2"; //0:拨号外呼;1:未接来电外呼;2:审核外呼
  429. top.obj.TaskPhoneID = wid; //审核的工单ID
  430. top.obj.TaskID = guid; //审核记录编号
  431. top.Send();
  432. }
  433. }
  434. });
  435. }
  436. } else
  437. layer.msg("未绑定分机号,不能操作回拨");
  438. } else
  439. layer.msg("非话务人员登录,不能操作回拨");
  440. }
  441. });
  442. }
  443. </script>
  444. </body>
  445. </html>