Bez popisu

Back.html 15KB

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