Brak opisu

CallRecord.html 14KB

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