Nav apraksta

auditBack.html 12KB

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