説明なし

auditBack.html 18KB

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