Sin descripción

CallRecord.html 13KB

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