Aucune description

CallRecord.html 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  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. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  11. <script src="../Script/Common/huayi.load.js"></script>
  12. <script src="../Script/Common/huayi.config.js"></script>
  13. <script src="../My97DatePicker/WdatePicker.js"></script>
  14. <script src="../js/zTree/jquery.ztree.core.js"></script>
  15. <script src="../css/laydate/laydate.js"></script>
  16. <style>
  17. body {
  18. font-family: "微软雅黑";
  19. font-size: 14px;
  20. }
  21. ul li {
  22. list-style: none;
  23. float: left;
  24. }
  25. .fr {
  26. float: right;
  27. }
  28. /*标头*/
  29. .th-box {
  30. width: 100%;
  31. padding: 5px;
  32. border-bottom: none;
  33. }
  34. .sc_btn {
  35. color: rgb(255, 255, 255);
  36. font-size: 12px;
  37. margin-left: 15px;
  38. box-sizing: border-box;
  39. background: rgb(26, 179, 148);
  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 li {
  49. margin-right: 5px;
  50. }
  51. .photo {
  52. background-color: #FFF;
  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. }
  69. .spiner-example {
  70. position: absolute;
  71. top: 50%;
  72. left: 50%;
  73. z-index: 111;
  74. margin-left: -85px;
  75. margin-top: -100px;
  76. display: none;
  77. }
  78. .sk-spinner-three-bounce {
  79. width: 170px !important;
  80. }
  81. .sk-spinner p {
  82. display: inline-block;
  83. font-size: 18px;
  84. margin-left: 10px;
  85. }
  86. .gjsu ul {
  87. overflow: hidden;
  88. }
  89. .gjsu ul li {
  90. width: 50%;
  91. margin-bottom: 5px;
  92. padding-top: 10px;
  93. }
  94. .selects {
  95. width: 130px;
  96. }
  97. .tc {
  98. margin-top: 30px;
  99. text-align: center;
  100. }
  101. .select2-container--default .select2-selection--single {
  102. border: 1px solid #e5e6e7;
  103. }
  104. .select2-dropdown {
  105. border: 1px solid #e5e6e7;
  106. width: 200px;
  107. }
  108. .layui-layer-shade {
  109. z-index: 100!important;
  110. }
  111. .layui-layer-page {
  112. z-index: 200!important;
  113. }
  114. .select2-container .select2-selection--single {
  115. height: 34px;
  116. }
  117. .select2-container {
  118. width: 130px!important;
  119. }
  120. .select2-selection__rendered {
  121. line-height: 34px;
  122. }
  123. .HJFX_ {
  124. width: 100%!important;
  125. }
  126. .photo {
  127. width: 130px;
  128. }
  129. .seach-box ul {
  130. padding-left: 0;
  131. }
  132. .seach-box li {
  133. width: 24%;
  134. margin-bottom: 5px;
  135. }
  136. .seach-box {
  137. width: 100%;
  138. margin-bottom: 10px;
  139. }
  140. label {
  141. width: 100px;
  142. text-align: right;
  143. }
  144. .LY:hover {
  145. color: #fff;
  146. }
  147. .LY:active {
  148. color: #fff!important;
  149. }
  150. .xl {
  151. display: inline-block;
  152. background: url(../img/dropDown.png) no-repeat;
  153. height: 100%;
  154. background-position: center center;
  155. width: 20px;
  156. position: absolute;
  157. right: 0;
  158. top: 0px;
  159. background-color: #e6e6e6;
  160. cursor: pointer;
  161. }
  162. #menuContent {
  163. background: #fff;
  164. position: absolute;
  165. width: 100%;
  166. border: 1px solid darkgrey;
  167. right: 0;
  168. top: 21px;
  169. z-index: 10;
  170. display: none;
  171. overflow-y: auto;
  172. }
  173. #organizer {
  174. height: 25px;
  175. width: 170px;
  176. display: inline-block;
  177. position: relative;
  178. }
  179. #treeDemo li {
  180. width: 100%;
  181. }
  182. #citySel{
  183. border: none;
  184. }
  185. </style>
  186. </head>
  187. <body class="gray-bg">
  188. <div class="wrapper wrapper-content animated fadeInRight">
  189. <div class="daoHang clearfix">
  190. <div class="dhLeft">
  191. <sapn><i class="syIcon"></i>位置:
  192. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  193. <a href="javaScript:;">话务管理</a>&gt;
  194. <a href="" class="nowPosition">通话记录</a>
  195. </sapn>
  196. </div>
  197. <div class="dhRight">
  198. <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
  199. </div>
  200. </div>
  201. <div class="th-box">
  202. <div class="th-bar clearfix">
  203. <!--<a class="sc_btn btn-info" id="moves">批量删除</a>-->
  204. <div class="seach-box fr">
  205. <ul>
  206. <li>
  207. <label for="">开始时间:</label>
  208. <input type="text" id="ss_kssj" class="photo laydate-icon" />
  209. </li>
  210. <li>
  211. <label for="">结束时间:</label>
  212. <input type="text" id="ss_jssj" class="photo laydate-icon" />
  213. </li>
  214. <li>
  215. <label for="">呼叫状态:</label>
  216. <select id="ss_hjzt" class="selects callstate">
  217. <option value="">全部</option>
  218. <option value="0">未接通</option>
  219. <option value="1">已接通</option>
  220. </select>
  221. </li>
  222. <li>
  223. <label for="">呼出方向:</label>
  224. <select id="ss_hcfx" class=" selects calltype">
  225. <option value="">全部</option>
  226. <option value="0">呼入</option>
  227. <option value="1">呼出</option>
  228. </select>
  229. </li>
  230. <li class='BMs' style="position: relative;">
  231. <div class="company">
  232. <label for="">部门:</label>
  233. <div class="inpBox" id="organizer">
  234. <input id="citySel" class="inps" />
  235. <input type="hidden" id="OPID" />
  236. <i class="xl xl_one" id="xl_one"></i>
  237. <div id="menuContent" class="menuContent">
  238. <ul id="treeDemo" class="ztree"></ul>
  239. </div>
  240. </div>
  241. </div>
  242. </li>
  243. <li>
  244. <label for="">电话号码:</label>
  245. <input id="tel" class="photo x-color" type="text" /></li>
  246. <li class="ZXs">
  247. <label for="">坐席:</label>
  248. <select style="width: 130px;" class="x-color select usercode" id="seat">
  249. <option value="">全部</option>
  250. </select>
  251. </li>
  252. <li>
  253. <div class="clearfix btn_boxs " style="float: right;">
  254. <a class="sc_btn Ss Block fl">搜索</a>
  255. <a class="sc_btn export Block" style="display: inline-box;display: -webkit-inline-box;">导出</a>
  256. </div>
  257. </li>
  258. </ul>
  259. </div>
  260. </div>
  261. </div>
  262. <div style="width: 100%;padding: 10px;">
  263. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  264. <thead>
  265. <tr>
  266. <th data-field="CallNumber" data-align="center" data-formatter="Code">编号</th>
  267. <th data-field="CallNumber" data-align="center">电话号码</th>
  268. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  269. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  270. <th data-field="F_DeptName" data-align="center">部门</th>
  271. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  272. <th data-field="DealType" data-formatter="dealType" data-align="center">未接通状态</th>
  273. <!--<th data-field="IsDeal" data-formatter="isDeal" data-align="center">是否处理</th>-->
  274. <th data-field="UserCode" data-align="center">坐席工号</th>
  275. <th data-field="UserName" data-align="center">坐席姓名</th>
  276. <th data-field="BeginTime" data-align="center">开始时间</th>
  277. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  278. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  279. <th data-field="TalkLongTime" data-align="center">通话时长(S)</th>
  280. <!--<th data-field="BusinessType" data-align="center">按键</th>-->
  281. </tr>
  282. </thead>
  283. </table>
  284. <!--高级搜索框-->
  285. </div>
  286. </div>
  287. <!--下载框-->
  288. <div class="t-shade">
  289. <div class="shade_k">
  290. <div class="shade_title">
  291. <span>录音播放与下载<srong class="cknum"></srong></span>
  292. <span class="setwin"><a>x</a></span>
  293. </div>
  294. <div class="shade_content">
  295. <div class="Ly_box audiojs">
  296. </div>
  297. <div class="boxCon LY_box">
  298. </div>
  299. </div>
  300. </div>
  301. </div>
  302. <script>
  303. var stype = 1;
  304. var seatlist = [];
  305. var RoleId;
  306. var saveArrs = [];
  307. var IDs;
  308. var Names;
  309. $(document).ready(function() {
  310. laydate.skin('molv');
  311. //留言时间
  312. laydate({
  313. elem: '#ss_kssj',
  314. event: 'focus',
  315. festival: true, //显示节日
  316. });
  317. //处理时间
  318. laydate({
  319. elem: '#ss_jssj',
  320. festival: true, //显示节日
  321. event: 'focus'
  322. });
  323. $.getJSON(huayi.config.callcenter_url + 'UserAccount/GetNowUser', {
  324. "token": $.cookie("token")
  325. }, function(result) {
  326. if(result.state.toLowerCase() == "success") {
  327. RoleId = result.data.role.F_RoleId
  328. if(RoleId != "17") { //非系统管理员显示
  329. $('.BMs').hide();
  330. $('.SZBN').hide();
  331. }
  332. }
  333. })
  334. /*获取选中行对象*/
  335. $('#list').on("click-row.bs.table", function(e, row, ele) {
  336. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  337. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  338. });
  339. $(".setwin").click(function() {
  340. $(".t-shade").removeClass("cx");
  341. $('audio')[0].pause();
  342. });
  343. //坐席
  344. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  345. token: $.cookie("token")
  346. }, function(result) {
  347. if(result.state.toLowerCase() == "success") {
  348. seatlist = result.data;
  349. bindseat($("#seat"));
  350. }
  351. });
  352. //搜索
  353. $(".Ss").click(function() {
  354. stype = 1;
  355. initTable();
  356. });
  357. initTable();
  358. //部门
  359. tree()
  360. function tree() {
  361. $.get(huayi.config.callcenter_url + "Department/GetDeptList", {
  362. "token": $.cookie("token"),
  363. // "pid": pid
  364. }, function(result) {
  365. result = $.parseJSON(result);
  366. $.fn.zTree.init($("#treeDemo"), setting2, result.data); //实例化树形图
  367. });
  368. }
  369. var setting2 = {
  370. data: {
  371. key: {
  372. name: "text"
  373. },
  374. simpleData: {
  375. enable: true,
  376. idKey: "id",
  377. rootPId: 0
  378. }
  379. },
  380. callback: {
  381. onClick: addTreeClick
  382. }
  383. }
  384. function addTreeClick(event, treeId, treeNode) {
  385. IDs = treeNode.id;
  386. Names = treeNode.text;
  387. $('#citySel').val(Names);
  388. };
  389. $(".xl").click(function() {
  390. if($(this).parent().find(".menuContent").is(":hidden")) {
  391. $(this).parent().find(".menuContent").show();
  392. } else {
  393. $(this).parent().find(".menuContent").hide();
  394. }
  395. });
  396. });
  397. function bindseat(obj) {
  398. obj.empty();
  399. obj.append('<option value="">全部</option>');
  400. $(seatlist).each(function(i, n) {
  401. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  402. })
  403. }
  404. function initTable() {
  405. //先销毁表格
  406. $('#list').bootstrapTable('destroy');
  407. //初始化表格,动态从服务器加载数据
  408. $("#list").bootstrapTable({
  409. method: "get", //使用get请求到服务器获取数据
  410. url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
  411. striped: true, //表格显示条纹
  412. pagination: true, //启动分页
  413. pageSize: 10, //每页显示的记录数
  414. pageNumber: 1, //当前第几页
  415. pageList: [10, 20, 50, 100], //记录数可选列表
  416. search: false, //是否启用查询
  417. showColumns: false, //显示下拉框勾选要显示的列
  418. showRefresh: false, //显示刷新按钮
  419. sidePagination: "server", //表示服务端请求
  420. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  421. //设置为limit可以获取limit, offset, search, sort, order
  422. queryParamsType: "undefined",
  423. queryParams: function queryParams(params) { //设置查询参数
  424. var param = {
  425. page: params.pageNumber,
  426. pagesize: params.pageSize,
  427. usercode: $("#seat").val(),
  428. phone: $("#tel").val(),
  429. dept: IDs,
  430. callstate: $("#ss_hjzt").val(),
  431. calltype: $("#ss_hcfx").val(),
  432. starttime: $("#ss_kssj").val(),
  433. endtime: $("#ss_jssj").val(),
  434. token: $.cookie("token")
  435. };
  436. return param;
  437. },
  438. onLoadSuccess: function() { //加载成功时执行
  439. //layer.msg("加载成功");
  440. },
  441. onLoadError: function() { //加载失败时执行
  442. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  443. }
  444. });
  445. }
  446. //音频
  447. function setCode(val) {
  448. if(val) {
  449. return '<div class="imgs">' +
  450. '<img src="../img/vice.png" alt="" onclick= ck(this) item="' + val + '" />' +
  451. '</div>';
  452. } else {
  453. return '';
  454. }
  455. }
  456. //编号
  457. function Code(val, row, index) {
  458. return index + 1;
  459. }
  460. //方向呼出
  461. function callType(val) {
  462. if(val == 0) {
  463. return '<div class="imgs">呼入</div>';
  464. } else {
  465. return '<div class="imgs">呼出</div>';
  466. }
  467. }
  468. function states(val) {
  469. if(val == 0) {
  470. return '<div class="imgs">未接通</div>';
  471. } else {
  472. return '<div class="imgs">已接通</div>';
  473. }
  474. }
  475. function states(val) {
  476. if(val == 0) {
  477. return '<div class="imgs">未接通</div>';
  478. } else {
  479. return '<div class="imgs">已接通</div>';
  480. }
  481. }
  482. //回访
  483. function dealType(val,row) {
  484. if(row.CallState==1){
  485. return '<div class="imgs">-</div>';
  486. }else if(row.CallState==0){
  487. if(val == 1) {
  488. return '<div >黑名单挂断</div>';
  489. } else if(val == 5) {
  490. return '<div >转坐席挂断</div>';
  491. }else if(val == 6) {
  492. return '<div >人工处理</div>';
  493. }else if(val == 7) {
  494. return '<div >非工作日</div>';
  495. }else{
  496. return '<div >-</div>';
  497. }
  498. }
  499. }
  500. //处理
  501. function isDeal(val) {
  502. if(val == 0) {
  503. return '<div >未处理</div>';
  504. } else {
  505. return '<div >已处理</div>';
  506. }
  507. }
  508. //录音
  509. function ck(val) {
  510. var path = $(val).attr("item");
  511. $(".t-shade").addClass("cx");
  512. $(".Ly_box").empty();
  513. $(".LY_box").empty();
  514. $('<audio style="width:100%;"class=" " src="' + path + '" loop="loop" controls="controls"></audio>').appendTo(".Ly_box");
  515. $('<a href="' + path + '" class="sc_btn LY "download="' + path + '">下载录音</a>').appendTo(".LY_box");
  516. }
  517. //导出
  518. $('.export').click(function() {
  519. dcexcel(this);
  520. })
  521. function dcexcel(obj) {
  522. var a = $("#bumen").val()
  523. if(a) {
  524. } else {
  525. a = '';
  526. }
  527. var url = huayi.config.callcenter_url + "Callrecords/GetListExpt?token=" + $.cookie("token");
  528. url += "&usercode=" + $("#seat").val() +
  529. "&phone=" + $("#tel").val() +
  530. "&callstate=" + $("#ss_hjzt").val() +
  531. "&calltype=" + $("#ss_hcfx").val() +
  532. "&starttime=" + $("#ss_kssj").val() +
  533. "&endtime=" + $("#ss_jssj").val() +
  534. "&dept=" + a;
  535. obj.href = url;
  536. console.log(url);
  537. }
  538. // 部门
  539. </script>
  540. </body>
  541. </html>