No Description

CallRecord.html 22KB

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