Нет описания

CallRecord.html 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  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. <link rel="stylesheet" href="../js/select2/css/select2.min.css" />
  10. <script src="../Script/Common/huayi.load.js"></script>
  11. <script src="../Script/Common/huayi.config.js"></script>
  12. <script src="../js/select2/js/select2.min.js"></script>
  13. <script src="../js/laydate/laydate.js"></script>
  14. <style>
  15. body {
  16. font-family: "微软雅黑";
  17. font-size: 14px;
  18. }
  19. .fr {
  20. float: right;
  21. }
  22. /*标头*/
  23. .th-box {
  24. width: 100%;
  25. padding: 5px;
  26. border-bottom: none;
  27. }
  28. .sc_btn {
  29. color: rgb(255, 255, 255);
  30. font-size: 12px;
  31. margin-left: 15px;
  32. box-sizing: border-box;
  33. background: #00479D;
  34. padding: 6px 10px;
  35. outline: none;
  36. border-width: 0px;
  37. border-style: initial;
  38. border-color: initial;
  39. border-image: initial;
  40. border-radius: 3px;
  41. }
  42. .seach-box ul {
  43. overflow: hidden;
  44. }
  45. .seach-box ul li {
  46. margin-right: 5px;
  47. }
  48. /*#ss_kssj {
  49. background-color: #FFF;
  50. background-image: none;
  51. border: 1px solid #e5e6e7;
  52. border-radius: 1px;
  53. color: inherit;
  54. padding: 6px 12px;
  55. line-height: 20px;
  56. width: 240px;
  57. }*/
  58. .photo {
  59. background-color: #FFF;
  60. border: 1px solid #e5e6e7;
  61. border-radius: 1px;
  62. color: inherit;
  63. padding: 6px 12px;
  64. }
  65. .selects {
  66. width: 220px;
  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. .tc {
  108. margin-top: 30px;
  109. text-align: center;
  110. }
  111. .select2-container--default .select2-selection--single {
  112. border: 1px solid #e5e6e7;
  113. }
  114. .select2-dropdown {
  115. border: 1px solid #e5e6e7;
  116. width: 200px;
  117. }
  118. .layui-layer-shade {
  119. z-index: 100!important;
  120. }
  121. .layui-layer-page {
  122. z-index: 200!important;
  123. }
  124. .select2-container .select2-selection--single {
  125. height: 34px;
  126. }
  127. .select2-container {
  128. width: 130px!important;
  129. }
  130. .select2-selection__rendered {
  131. line-height: 34px;
  132. }
  133. .HJFX_ {
  134. width: 100%!important;
  135. }
  136. .seach-box ul {
  137. padding-left: 0;
  138. }
  139. .seach-box {
  140. width: 100%;
  141. margin-bottom: 10px;
  142. }
  143. label {
  144. width: 95px;
  145. text-align: right;
  146. }
  147. .LY:hover {
  148. color: #fff;
  149. }
  150. .LY:active {
  151. color: #fff!important;
  152. }
  153. .laydate-icon {
  154. font-size: 14px;
  155. line-height: 20px;
  156. }
  157. #replayers{
  158. text-align: center;
  159. /* color: #EEEEEE; */
  160. }
  161. .rr-player.svelte-1wetjm2{
  162. margin: 0px auto;
  163. float: none;
  164. /* box-shadow: 0 24px 48px #000000; */
  165. }
  166. .shade_k{
  167. margin: 8% auto;
  168. overflow-y: scroll;
  169. width: 65%;
  170. min-width: 1040px;
  171. height: 200px;
  172. }
  173. .audiojs{
  174. margin-top: 30px !important;
  175. }
  176. </style>
  177. </head>
  178. <body class="gray-bg">
  179. <div class="wrapper wrapper-content animated fadeInRight">
  180. <div class="daoHang clearfix">
  181. <div class="dhLeft">
  182. <sapn><i class="syIcon"></i>位置:
  183. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  184. <a href="javaScript:;">话务管理</a>&gt;
  185. <a href="" style="color: #000;">通话记录</a>
  186. </sapn>
  187. </div>
  188. </div>
  189. <div class="th-box">
  190. <div class="th-bar clearfix">
  191. <div class="seach-box fr">
  192. <ul>
  193. <li style="position: relative;">
  194. <label for="ss_kssj">开始时间:</label>
  195. <i class="tub fa fa-calendar"></i>
  196. <input type="text" id="ss_kssj" class="laydate-icon selects" placeholder="请选择时间" />
  197. </li>
  198. <li>
  199. <label for="">呼叫状态:</label>
  200. <select id="ss_hjzt" class="selects callstate">
  201. <option value="">全部</option>
  202. <option value="0">未接通</option>
  203. <option value="1">已接通</option>
  204. </select>
  205. </li>
  206. <li>
  207. <label for="">呼叫方向:</label>
  208. <select id="ss_hcfx" class=" selects calltype">
  209. <option value="">全部</option>
  210. <option value="0">呼入</option>
  211. <option value="1">呼出</option>
  212. </select>
  213. </li>
  214. <li class='BMs'>
  215. <label for="">营业部:</label>
  216. <select name="" id="bumen" class="selects usercode">
  217. <option value="">请选择</option>
  218. </select>
  219. </li>
  220. <li class="ZXs">
  221. <label for="">坐席工号:</label>
  222. <select class="selects usercode" id="seat">
  223. <option value="">全部</option>
  224. </select>
  225. </li>
  226. <li>
  227. <label for="">电话号码:</label>
  228. <input id="tel" class="photo selects" type="text" /></li>
  229. </ul>
  230. <div class="clearfix btn_boxs fr">
  231. <a class="sc_btn Ss Block">搜索</a>
  232. <a class="sc_btn export Block">导出</a>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. <div style="width: 100%;padding: 10px;">
  238. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  239. <thead>
  240. <tr>
  241. <th data-field="CallNumber" data-align="center" data-formatter="Code">编号</th>
  242. <th data-field="CallNumber" data-align="center">电话号码</th>
  243. <!-- <th data-field="" data-align="center">营业部</th> -->
  244. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  245. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  246. <!--<th data-field="DealType" data-formatter="dealType" data-align="center">是否回访</th>-->
  247. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  248. <!--<th data-field="IsDeal" data-formatter="isDeal" data-align="center">是否处理</th>-->
  249. <th data-field="UserCode" data-align="center">坐席工号</th>
  250. <th data-field="UserName" data-align="center">坐席姓名</th>
  251. <th data-field="RingLongTime" data-formatter="setLongTime" data-align="center">响铃时长(S)</th>
  252. <th data-field="BeginTime" data-align="center">开始时间</th>
  253. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  254. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  255. <th data-field="EndTime" data-align="center">结束时间</th>
  256. <th data-field="TalkLongTime" data-align="center">通话时长(S)</th>
  257. <!--<th data-field="BusinessType" data-align="center">按键</th>-->
  258. </tr>
  259. </thead>
  260. </table>
  261. <!--高级搜索框-->
  262. </div>
  263. </div>
  264. <!--下载框-->
  265. <div class="t-shade">
  266. <div class="shade_k">
  267. <div class="shade_title">
  268. <span>录音播放与下载<srong class="cknum"></srong></span>
  269. <span class="setwin"><a>x</a></span>
  270. </div>
  271. <div class="shade_content">
  272. <div class="Ly_box audiojs "></div>
  273. <div class="boxCon LY_box"></div>
  274. <!--录屏播放-->
  275. <!-- <div id="replayers"></div> -->
  276. </div>
  277. </div>
  278. </div>
  279. <script>
  280. var stype = 1;
  281. var seatlist = [];
  282. var RoleId;
  283. $(document).ready(function() {
  284. laydate.render({
  285. elem: '#ss_kssj',
  286. range: '~',
  287. //type: 'datetime',
  288. //max : 31,
  289. //min: 0,
  290. calendar: true,
  291. theme: '#00479D',
  292. });
  293. $.getJSON(huayi.config.callcenter_url + 'UserAccount/GetNowUser', {
  294. "token": $.cookie("token")
  295. }, function(result) {
  296. if(result.state.toLowerCase() == "success") {
  297. RoleId = result.data.role.F_RoleId
  298. if(RoleId != "17") { //非系统管理员显示
  299. $('.BMs').hide();
  300. $('.SZBN').hide();
  301. }
  302. }
  303. })
  304. /*获取选中行对象*/
  305. $('#list').on("click-row.bs.table", function(e, row, ele) {
  306. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  307. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  308. });
  309. $(".setwin").click(function() {
  310. $(".t-shade").removeClass("cx");
  311. $('audio')[0].pause();
  312. });
  313. //坐席
  314. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  315. token: $.cookie("token")
  316. }, function(result) {
  317. if(result.state.toLowerCase() == "success") {
  318. seatlist = result.data;
  319. bindseat($("#seat"));
  320. }
  321. });
  322. //部门下拉数据
  323. $.getJSON(huayi.config.callcenter_url + 'CallOutPlan/GetDepartList', {
  324. "token": $.cookie("token")
  325. }, function(result) {
  326. if(result.state.toLowerCase() == "success") {
  327. let str='<option value="">请选择</option>'
  328. result.data.forEach(function(v, n) {
  329. str += '<option value="' + v.F_DeptId + '">' + v.F_DeptName + '</option>'
  330. })
  331. $("#bumen").html(str)
  332. }
  333. })
  334. // $("#bumen").select2({
  335. // width: 'resolve',
  336. // minimumResultsForSearch: -1,
  337. // ajax: {
  338. // type: "get",
  339. // url: huayi.config.callcenter_url + "Department/GetDeptList",
  340. // async: true,
  341. // dataType: "json",
  342. // data: function(params) {
  343. // return {
  344. // token: $.cookie("token"),
  345. // pid: params.id
  346. // }
  347. // },
  348. // processResults: function(data) {
  349. // return {
  350. // results: data.data
  351. // }
  352. // },
  353. // cache: true
  354. // },
  355. // placeholder: "请选择",
  356. // });
  357. //搜索
  358. $(".Ss").click(function() {
  359. stype = 1;
  360. initTable();
  361. });
  362. //回车搜索
  363. $('#tel').on('keypress',function(e){
  364. if(e.keyCode==13){
  365. initTable();
  366. }
  367. })
  368. initTable();
  369. })
  370. function bindseat(obj) {
  371. obj.empty();
  372. obj.append('<option value="">全部</option>');
  373. $(seatlist).each(function(i, n) {
  374. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  375. })
  376. }
  377. function initTable() {
  378. //先销毁表格
  379. $('#list').bootstrapTable('destroy');
  380. //初始化表格,动态从服务器加载数据
  381. $("#list").bootstrapTable({
  382. method: "get", //使用get请求到服务器获取数据
  383. url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
  384. contentType: 'application/x-www-form-urlencoded',
  385. striped: true, //表格显示条纹
  386. pagination: true, //启动分页
  387. pageSize: 10, //每页显示的记录数
  388. pageNumber: 1, //当前第几页
  389. pageList: [10, 20, 50, 100], //记录数可选列表
  390. search: false, //是否启用查询
  391. showColumns: false, //显示下拉框勾选要显示的列
  392. showRefresh: false, //显示刷新按钮
  393. sidePagination: "server", //表示服务端请求
  394. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  395. //设置为limit可以获取limit, offset, search, sort, order
  396. queryParamsType: "undefined",
  397. queryParams: function queryParams(params) { //设置查询参数
  398. var param = {
  399. page: params.pageNumber,
  400. pagesize: params.pageSize,
  401. usercode: $("#seat").val(),
  402. phone: $("#tel").val().trim(),
  403. dept: $("#bumen").val(),
  404. callstate: $("#ss_hjzt").val(),
  405. calltype: $("#ss_hcfx").val(),
  406. starttime: $('#ss_kssj').val() && $('#ss_kssj').val().split(' ~ ')[0],
  407. endtime: $('#ss_kssj').val() && $('#ss_kssj').val().split(' ~ ')[1],
  408. token: $.cookie("token")
  409. };
  410. return param;
  411. },
  412. onLoadSuccess: function() { //加载成功时执行
  413. //layer.msg("加载成功");
  414. },
  415. onLoadError: function() { //加载失败时执行
  416. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  417. }
  418. });
  419. }
  420. //音频
  421. function setCode(val, row) {
  422. if(val) {
  423. return '<div class="imgs">' +
  424. '<img src="../img/vice.png" alt="" onclick= ck(this,"' + row.CallId + '") item="' + val + '" />' +
  425. '</div>';
  426. } else {
  427. return '';
  428. }
  429. }
  430. function setLongTime(val,row){
  431. if(val==-1){
  432. return '-'
  433. }else{
  434. return row.RingLongTime
  435. }
  436. }
  437. //编号
  438. function Code(val, row, index) {
  439. return index + 1;
  440. }
  441. //方向呼出
  442. function callType(val) {
  443. if(val == 0) {
  444. return '<div class="imgs">呼入</div>';
  445. } else {
  446. return '<div class="imgs">呼出</div>';
  447. }
  448. }
  449. function states(val) {
  450. if(val == 0) {
  451. return '<div class="imgs">未接通</div>';
  452. } else {
  453. return '<div class="imgs">已接通</div>';
  454. }
  455. }
  456. //回访
  457. function dealType(val) {
  458. if(val == 1) {
  459. return '<div >已回访</div>';
  460. } else {
  461. return '';
  462. }
  463. }
  464. //处理
  465. function isDeal(val) {
  466. if(val == 0) {
  467. return '<div >未处理</div>';
  468. } else {
  469. return '<div >已处理</div>';
  470. }
  471. }
  472. //录音
  473. function ck(val, callId) {
  474. var path = $(val).attr("item");
  475. $(".t-shade").addClass("cx");
  476. $(".Ly_box").empty();
  477. $(".LY_box").empty();
  478. $('<audio style="width:100%;"class=" " type="audio/v3" src="' + path + '" loop="loop" controls="controls"></audio>').appendTo(".Ly_box");
  479. }
  480. //导出
  481. $('.export').click(function() {
  482. dcexcel(this);
  483. })
  484. function dcexcel(obj) {
  485. var url = huayi.config.callcenter_url + "Callrecords/GetListExpt?token=" + $.cookie("token");
  486. url += "&usercode=" + $("#seat").val() +
  487. "&phone=" + $("#tel").val() +
  488. "&callstate=" + $("#ss_hjzt").val() +
  489. "&calltype=" + $("#ss_hcfx").val() +
  490. "&starttime=" + ($('#ss_kssj').val() && $('#ss_kssj').val().split(' ~ ')[0]) +
  491. "&endtime=" + ($('#ss_kssj').val() && $('#ss_kssj').val().split(' ~ ')[1]) +
  492. "&dept=" + $("#bumen").val();
  493. obj.href = url;
  494. }
  495. $('#ReIndex').click(function() {
  496. top.$("iframe:visible")[0].src = "widgets.html";
  497. // top.home_index();
  498. })
  499. </script>
  500. </body>
  501. </html>