Нет описания

CallRecord.html 23KB

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