Нет описания

auditBack.html 17KB

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