Nessuna descrizione

CallRecord.html 20KB

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