Нет описания

auditBack.html 16KB

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