説明なし

CallRecord.html 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  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. <link rel="stylesheet" type="text/css" href="../js/bootstrap-treeview/bootstrap-treeview.min.css" />
  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 li {
  141. width: 24%;
  142. margin-bottom: 5px;
  143. }
  144. .seach-box {
  145. width: 100%;
  146. margin-bottom: 10px;
  147. }
  148. label {
  149. width: 100px;
  150. text-align: right;
  151. }
  152. li.select2-results__option {
  153. width: 100%;
  154. }
  155. .LY:hover {
  156. color: #fff;
  157. }
  158. .LY:active {
  159. color: #fff !important;
  160. }
  161. audio::-webkit-media-controls {
  162. overflow: hidden !important;
  163. }
  164. audio::-webkit-media-controls-enclosure {
  165. width: calc(100% + 32px);
  166. margin-left: auto;
  167. }
  168. .caret {
  169. margin-left: -20px;
  170. }
  171. #deptTreeView {
  172. width: 300px;
  173. max-height: 256px;
  174. overflow-y: auto;
  175. position: absolute;
  176. z-index: 2;
  177. top: 160px;
  178. left: 128px;
  179. background-color: #fff;
  180. }
  181. #deptTreeView li {
  182. float: none;
  183. width: 100%;
  184. margin: 0;
  185. }
  186. </style>
  187. </head>
  188. <body class="gray-bg">
  189. <div class="wrapper wrapper-content animated fadeInRight">
  190. <div class="daoHang clearfix">
  191. <div class="dhLeft">
  192. <sapn>
  193. <i class="syIcon"></i>位置:
  194. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  195. <a href="javaScript:;">话务管理</a>&gt;
  196. <a href="" style="color: #000;">通话记录</a>
  197. </sapn>
  198. </div>
  199. </div>
  200. <div class="th-box">
  201. <div class="th-bar clearfix">
  202. <!--<a class="sc_btn btn-info" id="moves">批量删除</a>-->
  203. <div class="seach-box fr">
  204. <ul class="clearfix">
  205. <li>
  206. <label for="">开始时间:</label>
  207. <input type="text" id="ss_kssj" class="photo laydate-icon" />
  208. </li>
  209. <li>
  210. <label for="">结束时间:</label>
  211. <input type="text" id="ss_jssj" class="photo laydate-icon" />
  212. </li>
  213. <li>
  214. <label for="">呼叫状态:</label>
  215. <select id="ss_hjzt" class="selects callstate">
  216. <option value="">全部</option>
  217. <option value="0">未接通</option>
  218. <option value="1">已接通</option>
  219. </select>
  220. </li>
  221. <li>
  222. <label for="">呼出方向:</label>
  223. <select id="ss_hcfx" class=" selects calltype">
  224. <option value="">全部</option>
  225. <option value="0">呼入</option>
  226. <option value="1">呼出</option>
  227. </select>
  228. </li>
  229. <li class="BMs">
  230. <label for="department">部门:</label>
  231. <input type="text" class="selects" id="department" data-id="-1" placeholder="请选择部门" />
  232. <span class="caret"></span>
  233. <div id="deptTreeView" class="hidden"></div>
  234. </li>
  235. <li>
  236. <label for="">电话号码:</label>
  237. <input id="tel" class="photo x-color" type="text" />
  238. </li>
  239. <li class="ZXs">
  240. <label for="">坐席:</label>
  241. <select style="width: 130px;" class="x-color select usercode" id="seat"></select>
  242. </li>
  243. <li>
  244. <label for="">坐席姓名:</label>
  245. <input type="text" id="ss_zxxm" class="photo x-color" />
  246. </li>
  247. <li class="fr">
  248. <div class="clearfix btn_boxs fr">
  249. <a class="sc_btn Ss Block fl">搜索</a>
  250. <a class="sc_btn export Block" style="display: inline-box;display: -webkit-inline-box;">导出</a>
  251. </div>
  252. </li>
  253. </ul>
  254. </div>
  255. </div>
  256. </div>
  257. <div style="width: 100%;padding: 10px;">
  258. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  259. <thead>
  260. <tr>
  261. <th data-field="CallNumber" data-align="center" data-formatter="Code">编号</th>
  262. <th data-field="CallNumber" data-align="center">电话号码</th>
  263. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  264. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  265. <!--<th data-field="DealType" data-formatter="dealType" data-align="center">是否回访</th>-->
  266. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  267. <!--<th data-field="IsDeal" data-formatter="isDeal" data-align="center">是否处理</th>-->
  268. <th data-field="UserCode" data-align="center">坐席工号</th>
  269. <th data-field="UserName" data-align="center">坐席姓名</th>
  270. <th data-field="CompanyName" data-align="center">所属公司</th>
  271. <th data-field="CategoryName" data-align="center">分类</th>
  272. <th data-field="ChannelName" data-align="center">渠道名称</th>
  273. <th data-field="BeginTime" data-align="center">开始时间</th>
  274. <th data-field="RingStartTime" data-align="center">振铃开始时间</th>
  275. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  276. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  277. <th data-field="RingLongTime" data-align="center">振铃时长(S)</th>
  278. <th data-field="TalkLongTime" data-align="center">通话时长(S)</th>
  279. <!--<th data-field="BusinessType" data-align="center">按键</th>-->
  280. </tr>
  281. </thead>
  282. </table>
  283. <!--高级搜索框-->
  284. </div>
  285. </div>
  286. <!--下载框-->
  287. <div class="t-shade">
  288. <div class="shade_k">
  289. <div class="shade_title">
  290. <span>录音播放与下载<srong class="cknum"></srong></span>
  291. <span class="setwin"><a>x</a></span>
  292. </div>
  293. <div class="shade_content">
  294. <div class="Ly_box audiojs">
  295. </div>
  296. <div class="boxCon LY_box">
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. <script src="../js/select2/js/zh-CN.js"></script>
  302. <script src="../js/bootstrap-treeview/bootstrap-treeview.min.js"></script>
  303. <script>
  304. var stype = 1;
  305. var seatlist = [];
  306. var RoleId;
  307. $(document).ready(function () {
  308. laydate.skin('molv');
  309. //留言时间
  310. laydate({
  311. elem: '#ss_kssj',
  312. event: 'focus',
  313. festival: true, //显示节日
  314. });
  315. //处理时间
  316. laydate({
  317. elem: '#ss_jssj',
  318. festival: true, //显示节日
  319. event: 'focus'
  320. });
  321. $("#ss_kssj").val(laydate.now(0, 'YYYY-MM-DD'));
  322. $("#ss_jssj").val(laydate.now(0, 'YYYY-MM-DD'));
  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" && RoleId != '50') { //非系统管理员和市公司业务支撑中心显示
  329. $('.BMs').hide();
  330. $('.SZBN').hide();
  331. }
  332. }
  333. })
  334. //部门下拉数据
  335. getDeptLists();
  336. $('#department').on('focus click', function () {
  337. $('#deptTreeView').removeClass('hidden').addClass('show');
  338. });
  339. $('#department').on('keyup', function () {
  340. if ($(this).val() == '') {
  341. $('deptTreeView').treeview('uncheckAll', { silent: true });
  342. $(this).attr('data-id', '-1');
  343. }
  344. });
  345. $('#department + .caret').on('click', function () {
  346. $('#deptTreeView').removeClass('hidden').addClass('show');
  347. });
  348. $('#deptTreeView').mouseleave(function () {
  349. $(this).removeClass('show').addClass('hidden');
  350. });
  351. /*获取选中行对象*/
  352. $('#list').on("click-row.bs.table", function (e, row, ele) {
  353. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  354. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  355. });
  356. $(".setwin").click(function () {
  357. $(".t-shade").removeClass("cx");
  358. $('audio')[0].pause();
  359. });
  360. //坐席
  361. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  362. token: $.cookie("token")
  363. }, function (result) {
  364. if (result.state.toLowerCase() == "success") {
  365. seatlist = result.data;
  366. bindseat($("#seat"));
  367. }
  368. });
  369. //坐席下拉
  370. $("#seat").select2({
  371. language: 'zh-CN'
  372. });
  373. //搜索
  374. $(".Ss").click(function () {
  375. stype = 1;
  376. initTable();
  377. });
  378. initTable();
  379. })
  380. //获取部门
  381. function getDeptLists() {
  382. $.getJSON(huayi.config.callcenter_url + 'Department/GetDeptListForReport', {
  383. token: $.cookie("token")
  384. }, function (result) {
  385. //debugger;
  386. if (result.state.toLowerCase() == "success") {
  387. var defaultDatas = result.data;
  388. var $sTree = $('#deptTreeView').treeview({
  389. color: "#428bca",
  390. expandIcon: 'glyphicon glyphicon-chevron-right',
  391. collapseIcon: 'glyphicon glyphicon-chevron-down',
  392. nodeIcon: 'glyphicon glyphicon-bookmark',
  393. data: defaultDatas,
  394. onNodeSelected: function (event, node) {
  395. $sTree.treeview('clearSearch');
  396. $('#department').val(node.text);
  397. $('#department').attr('data-id', node.id);
  398. $('#deptTreeView').removeClass('show').addClass('hidden');
  399. },
  400. onNodeUnselected: function (event, node) {
  401. $('#department').val('');
  402. $('#department').attr('data-id', '-1');
  403. }
  404. });
  405. var findSNodes = function () {
  406. return $sTree.treeview('search', [$('#department').val(), {
  407. ignoreCase: false,
  408. exactMatch: false
  409. }]);
  410. };
  411. $('#department').on('keyup', function (e) {
  412. var selectableNodes = findSNodes();
  413. });
  414. }
  415. })
  416. }
  417. function bindseat(obj) {
  418. obj.empty();
  419. obj.append('<option value="">全部</option>');
  420. $(seatlist).each(function (i, n) {
  421. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  422. })
  423. }
  424. function initTable() {
  425. //先销毁表格
  426. $('#list').bootstrapTable('destroy');
  427. //初始化表格,动态从服务器加载数据
  428. $("#list").bootstrapTable({
  429. method: "get", //使用get请求到服务器获取数据
  430. url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
  431. striped: true, //表格显示条纹
  432. pagination: true, //启动分页
  433. pageSize: 10, //每页显示的记录数
  434. pageNumber: 1, //当前第几页
  435. pageList: [10, 20, 50, 100], //记录数可选列表
  436. search: false, //是否启用查询
  437. showColumns: false, //显示下拉框勾选要显示的列
  438. showRefresh: false, //显示刷新按钮
  439. sidePagination: "server", //表示服务端请求
  440. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  441. //设置为limit可以获取limit, offset, search, sort, order
  442. queryParamsType: "undefined",
  443. queryParams: function queryParams(params) { //设置查询参数
  444. var param = {
  445. page: params.pageNumber,
  446. pagesize: params.pageSize,
  447. usercode: $("#seat").val(),
  448. phone: $("#tel").val(),
  449. dept: $("#department").attr('data-id'),
  450. callstate: $("#ss_hjzt").val(),
  451. calltype: $("#ss_hcfx").val(),
  452. starttime: $("#ss_kssj").val(),
  453. endtime: $("#ss_jssj").val(),
  454. username: $("#ss_zxxm").val(),
  455. token: $.cookie("token")
  456. };
  457. return param;
  458. },
  459. onLoadSuccess: function () { //加载成功时执行
  460. //layer.msg("加载成功");
  461. },
  462. onLoadError: function () { //加载失败时执行
  463. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  464. }
  465. });
  466. }
  467. //音频
  468. function setCode(val, row, index) {
  469. var callId = row.CallId;
  470. if (val) {
  471. return '<div class="imgs">' +
  472. '<img src="../img/vice.png" alt="" onclick= ck(this) item="' + val + '" callid="' + callId + '" />' +
  473. '</div>';
  474. } else {
  475. return '';
  476. }
  477. }
  478. //编号
  479. function Code(val, row, index) {
  480. return index + 1;
  481. }
  482. //方向呼出
  483. function callType(val) {
  484. if (val == 0) {
  485. return '<div class="imgs">呼入</div>';
  486. } else {
  487. return '<div class="imgs">呼出</div>';
  488. }
  489. }
  490. function states(val) {
  491. if (val == 0) {
  492. return '<div class="imgs">未接通</div>';
  493. } else {
  494. return '<div class="imgs">已接通</div>';
  495. }
  496. }
  497. //回访
  498. function dealType(val) {
  499. if (val == 1) {
  500. return '<div >已回访</div>';
  501. } else {
  502. return '';
  503. }
  504. }
  505. //处理
  506. function isDeal(val) {
  507. if (val == 0) {
  508. return '<div >未处理</div>';
  509. } else {
  510. return '<div >已处理</div>';
  511. }
  512. }
  513. //录音
  514. function ck(val) {
  515. var path = $(val).attr("item");
  516. var callId = $(val).attr("callId");
  517. $(".t-shade").addClass("cx");
  518. $(".Ly_box").empty();
  519. $(".LY_box").empty();
  520. if (RoleId != 17) {
  521. if (RoleId == 36 || RoleId == 41) {
  522. $('<audio style="width:100%;"class=" " src="' + path + '" loop="loop" controls="controls"></audio>').appendTo(".Ly_box");
  523. $('<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");
  524. } else {
  525. $('<audio style="width:100%;"class=" " src="' + path + '" loop="loop" controls="controls" controlsList="nodownload" oncontextmenu="return false"></audio>').appendTo(".Ly_box");
  526. }
  527. } else {
  528. $('<audio style="width:100%;"class=" " src="' + path + '" loop="loop" controls="controls"></audio>').appendTo(".Ly_box");
  529. $('<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");
  530. }
  531. }
  532. //导出
  533. $('.export').click(function () {
  534. dcexcel(this);
  535. })
  536. function dcexcel(obj) {
  537. var a = $("#department").attr('data-id');
  538. if (a) {
  539. } else {
  540. a = '';
  541. }
  542. var url = huayi.config.callcenter_url + "Callrecords/GetListExpt?token=" + $.cookie("token");
  543. url += "&usercode=" + $("#seat").val() +
  544. "&phone=" + $("#tel").val() +
  545. "&callstate=" + $("#ss_hjzt").val() +
  546. "&calltype=" + $("#ss_hcfx").val() +
  547. "&starttime=" + $("#ss_kssj").val() +
  548. "&endtime=" + $("#ss_jssj").val() +
  549. "&dept=" + a +
  550. "&username=" + $("#ss_zxxm").val();
  551. obj.href = url;
  552. console.log(url);
  553. }
  554. //function downloadrecord(path) {
  555. // $.ajax({
  556. // url: huayi.config.callcenter_url + "Callrecords/GetListExpt?token=" + $.cookie("token"),
  557. // type: "get",
  558. // datatype: "json",
  559. // data: { filePath: path },
  560. // success: function (res) {
  561. // }
  562. // });
  563. //}
  564. </script>
  565. </body>
  566. </html>