Bez popisu

Back.html 12KB

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