濮阳12345web

CallRecord.html 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>通话记录管理</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <link href="../css/init.css" rel="stylesheet" />
  8. <link href="../css/Table/table1.css" rel="stylesheet" />
  9. <script src="../Script/Common/huayi.load.js"></script>
  10. <script src="../Script/Common/huayi.config.js"></script>
  11. <script src="../My97DatePicker/WdatePicker.js"></script>
  12. <script src="../css/laydate/laydate.js"></script>
  13. <style>
  14. body {
  15. font-family: "微软雅黑";
  16. font-size: 14px;
  17. }
  18. ul li {
  19. list-style: none;
  20. float: left;
  21. }
  22. .fr {
  23. float: right;
  24. }
  25. /*标头*/
  26. .th-box {
  27. width: 100%;
  28. padding: 5px;
  29. border-bottom: 1px solid #e7eaec;
  30. }
  31. .th-bar {
  32. height: 40px;
  33. }
  34. .sc_btn {
  35. color: #fff;
  36. font-size: 12px;
  37. margin-left: 15px;
  38. box-sizing: border-box;
  39. background: #00a1cb;
  40. padding: 6px 10px;
  41. outline: none;
  42. border-width: 0px;
  43. border-style: initial;
  44. border-color: initial;
  45. border-image: initial;
  46. border-radius: 3px;
  47. }
  48. .seach-box ul {
  49. overflow: hidden;
  50. }
  51. .seach-box ul li {
  52. margin-right: 5px;
  53. }
  54. .photo {
  55. /*background-color: #FFF;
  56. background-image: none;*/
  57. border: 1px solid #e5e6e7;
  58. border-radius: 1px;
  59. color: inherit;
  60. padding: 6px 12px;
  61. }
  62. .selects {
  63. background-color: #FFF;
  64. background-image: none;
  65. border: 1px solid #e5e6e7;
  66. border-radius: 1px;
  67. color: inherit;
  68. padding: 6px 12px;
  69. }
  70. #Select:focus {
  71. outline: none;
  72. border-color: #00BFFF;
  73. }
  74. input:focus {
  75. outline: none;
  76. border-color: #00BFFF;
  77. }
  78. .spiner-example {
  79. position: absolute;
  80. top: 50%;
  81. left: 50%;
  82. z-index: 111;
  83. margin-left: -85px;
  84. margin-top: -100px;
  85. display: none;
  86. }
  87. .sk-spinner-three-bounce {
  88. width: 170px !important;
  89. }
  90. .sk-spinner p {
  91. display: inline-block;
  92. font-size: 18px;
  93. margin-left: 10px;
  94. }
  95. .gjsu ul {
  96. overflow: hidden;
  97. }
  98. .gjsu ul li {
  99. width: 50%;
  100. margin-bottom: 5px;
  101. padding-top: 10px;
  102. }
  103. .selects {
  104. width: 105px;
  105. }
  106. .tc {
  107. margin-top: 30px;
  108. text-align: center;
  109. }
  110. .seach-box ul{
  111. padding-left: 0;
  112. }
  113. .seach-box input{
  114. width: 122px;
  115. }
  116. </style>
  117. </head>
  118. <body class="gray-bg">
  119. <div class="wrapper wrapper-content animated fadeInRight">
  120. <div class="daoHang clearfix">
  121. <div class="dhLeft">
  122. <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>&gt;<a href="javaScript:;">话务管理</a>&gt;<a href="" class="nowPosition">通话记录查询</a></sapn>
  123. </div>
  124. <div class="dhRight">
  125. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  126. </div>
  127. </div>
  128. <div class="th-box">
  129. <div class="th-bar">
  130. <!--<a class="sc_btn btn-info" id="moves">批量删除</a>-->
  131. <div class="seach-box fr">
  132. <ul>
  133. <li>时间:<input id="start" class="photo x-color laydate-icon" type="text" />-<input id="end" class="photo x-color laydate-icon" type="text" /></li>
  134. <li>电话号码:<input id="tel" class="photo x-color" type="text" /></li>
  135. <li>
  136. 呼叫状态:
  137. <select id="ss_hjzt" class="selects callstate">
  138. <option value="">全部</option>
  139. <option value="0">未接通</option>
  140. <option value="1">已接通</option>
  141. <option value="2">黑名单拒接</option>
  142. <option value="3">主动放弃</option>
  143. </select>
  144. </li>
  145. <li>
  146. 通话类型:
  147. <select id="callType" class="selects callstate">
  148. <option value="">全部</option>
  149. </select>
  150. </li>
  151. <li>
  152. 呼出方向:
  153. <select id="ss_hcfx" class=" selects calltype">
  154. <option value="">全部</option>
  155. <option value="0">呼入</option>
  156. <option value="1">呼出</option>
  157. </select>
  158. </li>
  159. <li>
  160. 呼叫类型:
  161. <select id="ss_HJLX" class=" selects calltype">
  162. <option value="">全部</option>
  163. <option value="1">正常通话</option>
  164. <option value="2">转移</option>
  165. <option value="3">三方通话</option>
  166. </select>
  167. </li>
  168. <li>
  169. 坐席:
  170. <select style="width: 100px;" class="x-color select usercode" id="seat">
  171. <option value="">全部</option>
  172. </select>
  173. </li>
  174. <li>
  175. <a class="sc_btn Ss Block">搜索</a>
  176. </li>
  177. <!--<li>
  178. <a class="sc_btn Gj Block">高级搜索</a>
  179. </li>-->
  180. </ul>
  181. </div>
  182. </div>
  183. </div>
  184. <div style="width: 100%;padding: 10px;">
  185. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  186. <thead>
  187. <tr>
  188. <th data-field="CallNumber" data-align="center" data-formatter="Code">编号</th>
  189. <th data-field="CallNumber" data-align="center">电话号码</th>
  190. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  191. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  192. <!--<th data-field="DealType" data-formatter="dealType" data-align="center">是否回访</th>-->
  193. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  194. <th data-field="ActionType" data-formatter="ActionType" data-align="center">呼叫类型</th>
  195. <th data-field="TypeName" data-align="center">通话类型</th>
  196. <th data-field="UserCode" data-align="center">坐席工号</th>
  197. <th data-field="UserName" data-align="center">坐席姓名</th>
  198. <th data-field="BeginTime" data-align="center">开始时间</th>
  199. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  200. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  201. <th data-field="TalkLongTime" data-align="center" data-formatter="ftime">通话时长</th>
  202. <th data-field="RingLongTime" data-align="center" data-formatter="ftime">振铃时长</th>
  203. <th data-field="LongTime" data-align="center" data-formatter="ftime">总时长</th>
  204. <th data-field="WorkOrderId" data-align="center" data-formatter="formatWorkOrderNum">工单号</th>
  205. </tr>
  206. </thead>
  207. </table>
  208. <!--高级搜索框-->
  209. </div>
  210. </div>
  211. <!--下载框-->
  212. <div class="t-shade">
  213. <div class="shade_k">
  214. <div class="shade_title">
  215. <span>录音播放<srong class="cknum"></srong></span>
  216. <span class="setwin"><a>x</a></span>
  217. </div>
  218. <div class="shade_content">
  219. <div class="Ly_box audiojs">
  220. </div>
  221. <div class="boxCon LY_box">
  222. </div>
  223. </div>
  224. </div>
  225. </div>
  226. <script>
  227. var stype = 1;
  228. var seatlist = [];
  229. $(document).ready(function () {
  230. laydate.skin('blue');
  231. laydate({
  232. elem: '#start',
  233. event: 'focus'
  234. });
  235. laydate({
  236. elem: '#end',
  237. event: 'focus'
  238. });
  239. /*获取选中行对象*/
  240. $('#list').on("click-row.bs.table", function (e, row, ele) {
  241. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  242. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  243. });
  244. $(".setwin").click(function () {
  245. $(".t-shade").removeClass("cx");
  246. $('audio')[0].pause();
  247. });
  248. //获取通话类型
  249. GetCallTypeList();
  250. //获取坐席
  251. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", { token: $.cookie("token") }, function (result) {
  252. if (result.state.toLowerCase() == "success") {
  253. seatlist = result.data;
  254. bindseat($("#seat"));
  255. }
  256. });
  257. //搜索
  258. $(".Ss").click(function () {
  259. stype = 1;
  260. initTable();
  261. });
  262. //高级搜索s
  263. $(".Gj").click(function () {
  264. var a = "WdatePicker()";
  265. layer.open({
  266. type: 1,
  267. title: '高级搜索',
  268. area: ['50%', '55%'], //宽高
  269. content: ' <div class="gjsu"><ul class="nav nav-tabs">' +
  270. '<li class="active"><a href="#">参数信息</a></li> ' +
  271. '</ul>' +
  272. '<ul>' +
  273. '<li>' +
  274. '<label for="">电话号码:</label>' +
  275. '<input type="text" id="ss_tel" class="photo"/>' +
  276. '</li>' +
  277. '<li>' +
  278. '<label for="">坐席工号:</label>' +
  279. '<select name="" id="ss_seat" class="selects usercode"></select>' +
  280. '</li>' +
  281. '<li>' +
  282. '<label for="">开始时间:</label>' +
  283. ' <input type="text" id="ss_kssj" class="photo"onClick="' + a + '"/>' +
  284. '</li>' +
  285. '<li>' +
  286. '<label for="">呼叫状态:</label>' +
  287. '<select id="ss_hjzt" class="selects callstate">' +
  288. '<option value="">全部</option>' +
  289. '<option value="0">未接通</option>' +
  290. '<option value="1">已接通</option>' +
  291. '<option value="2">黑名单拒接</option>' +
  292. '</select>' +
  293. '</li>' +
  294. '<li>' +
  295. '<label for="">结束时间:</label>' +
  296. '<input type="text" id="ss_jssj" class="photo" onClick="' + a + '"/>' +
  297. '</li>' +
  298. '<li>' +
  299. '<label for="">呼出方向:</label>' +
  300. '<select id="ss_hcfx" class=" selects calltype">' +
  301. '<option value="">全部</option>' +
  302. '<option value="0">呼入</option>' +
  303. '<option value="1">呼出</option>' +
  304. '</select>' +
  305. '</li>' +
  306. '</ul>' +
  307. '<div class=" add_time tc">' +
  308. '<button type="button" class="btn sc_btn Block " id="tc">保&nbsp;&nbsp;存</button>' +
  309. '</div>' +
  310. '</div>'
  311. });
  312. bindseat($("#ss_seat"));
  313. //获取通话记录列表
  314. $("#tc").click(function () {
  315. stype = 2;
  316. initTable();
  317. var index = layer.index; //获取当前弹层的索引号
  318. layer.close(index); //关闭当前弹层
  319. });
  320. });
  321. initTable();
  322. })
  323. function bindseat(obj) {
  324. obj.empty();
  325. obj.append('<option value="">全部</option>');
  326. $(seatlist).each(function (i, n) {
  327. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  328. })
  329. }
  330. function initTable() {
  331. //先销毁表格
  332. $('#list').bootstrapTable('destroy');
  333. //初始化表格,动态从服务器加载数据
  334. $("#list").bootstrapTable({
  335. method: "get", //使用get请求到服务器获取数据
  336. url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
  337. contentType: "application/x-www-form-urlencoded",striped: true, //表格显示条纹
  338. pagination: true, //启动分页
  339. pageSize: 10, //每页显示的记录数
  340. pageNumber: 1, //当前第几页
  341. pageList: [10, 20, 50, 100], //记录数可选列表
  342. search: false, //是否启用查询
  343. showColumns: false, //显示下拉框勾选要显示的列
  344. showRefresh: false, //显示刷新按钮
  345. sidePagination: "server", //表示服务端请求
  346. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  347. //设置为limit可以获取limit, offset, search, sort, order
  348. queryParamsType: "undefined",
  349. queryParams: function queryParams(params) { //设置查询参数
  350. var param = {
  351. page: params.pageNumber,
  352. pagesize: params.pageSize,
  353. token: $.cookie("token")
  354. };
  355. if (stype == '1') {
  356. param.usercode = $("#seat").val();
  357. param.phone = $("#tel").val();
  358. param.starttime = $("#start").val();
  359. param.endtime = $("#end").val();
  360. param.callstate= $("#ss_hjzt").val();
  361. param.calltype= $("#ss_hcfx").val();
  362. param.type = $("#callType").val();//type=通话类型
  363. } else if (stype == '2') {
  364. param.usercode = $("#ss_seat").val();
  365. param.tel = $("#ss_tel").val();
  366. param.callstate = $("#ss_hjzt").val();
  367. param.calltype = $("#ss_hcfx").val();
  368. param.starttime = $("#ss_kssj").val();
  369. param.endtime = $("#ss_jssj").val();
  370. param.type = $("#callType").val();//type=通话类型
  371. }
  372. return param;
  373. },
  374. onLoadSuccess: function () { //加载成功时执行
  375. //layer.msg("加载成功");
  376. },
  377. onLoadError: function () { //加载失败时执行
  378. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  379. }
  380. });
  381. }
  382. //音频
  383. function setCode(val) {
  384. if (val) {
  385. return '<div class="imgs">' +
  386. '<img src="../img/vice.png" alt="" onclick= ck(this) item="'+val + '" />' +
  387. '</div>';
  388. }
  389. else {
  390. return '';
  391. }
  392. }
  393. //编号
  394. function Code(val,row,index){
  395. return index+1;
  396. }
  397. //方向呼出
  398. function callType(val) {
  399. if (val == 0) {
  400. return '<div class="imgs">呼入</div>';
  401. } else {
  402. return '<div class="imgs">呼出</div>';
  403. }
  404. }
  405. function states(val) {
  406. if (val == 0) {
  407. return '<div class="imgs">未接通</div>';
  408. } else if(val==1) {
  409. return '<div class="imgs">已接通</div>';
  410. }
  411. else if (val == 2) {
  412. return '<div class="imgs">黑名单拒接</div>';
  413. }
  414. }
  415. function ActionType(val) {
  416. if (val == 2) {
  417. return '<div class="imgs">转移</div>';
  418. }
  419. else if (val == 3) {
  420. return '<div class="imgs">三方通话</div>';
  421. }
  422. else {
  423. return '<div class="imgs">正常通话</div>';
  424. }
  425. }
  426. ////回访
  427. //function dealType(val) {
  428. // if (val == 1) {
  429. // return '<div >已回访</div>';
  430. // } else {
  431. // return '';
  432. // }
  433. //}
  434. //处理
  435. function isDeal(val) {
  436. if (val == 0) {
  437. return '<div >未处理</div>';
  438. } else {
  439. return '<div >已处理</div>';
  440. }
  441. }
  442. //录音
  443. function ck(val) {
  444. var path = $(val).attr("item");
  445. $(".t-shade").addClass("cx");
  446. $(".Ly_box").empty();
  447. $(".LY_box").empty();
  448. $('<audio style="width:100%;"class=" " src="' + path + '" loop="loop" controls="controls"></audio>').appendTo(".Ly_box");
  449. var rl = $('#RoleCode', top.document).val();
  450. if (rl == "GLY" || rl == "ZXBZ") {
  451. $('<a href="' + path + '" class="sc_btn LY "download="' + path + '">下载录音</a>').appendTo(".LY_box");
  452. }
  453. }
  454. function ftime(val) {
  455. if (val) {
  456. return helper.DateFormat.getFormatTime(val);
  457. }
  458. else {
  459. return '';
  460. }
  461. }
  462. //格式化工单号
  463. function formatWorkOrderNum(val,row){
  464. if(val==null){
  465. val = '-'
  466. }else{
  467. return '<a class="xg" onclick="ckxq('+ val +')" title="点击查看工单详情">'+ val +'</a>';
  468. }
  469. }
  470. //获取通话类型
  471. function GetCallTypeList() {
  472. $.getJSON(huayi.config.callcenter_url + 'Dictionary/GetDicValueListById', {
  473. id: 45,
  474. token: $.cookie("token")
  475. }, function(result) {
  476. if(result.state.toLowerCase() == "success") {
  477. var callTypeList = result.data;
  478. $('#callType').empty();
  479. $('#callType').append('<option value="">全部</option>');
  480. $(callTypeList).each(function (i, n) {
  481. $('#callType').append('<option value="' + n.F_ValueId + '">' + n.F_Value + '</option>');
  482. })
  483. }
  484. })
  485. }
  486. //查看工单详情
  487. function ckxq(str) {
  488. if(str){
  489. layer.open({
  490. type: 2,
  491. content: "../CommonHtml/WorkDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
  492. title: '工单详情',
  493. area: ['87%', '80%'], //宽高
  494. });
  495. }
  496. }
  497. </script>
  498. </body>
  499. </html>