Brak opisu

CallRecord.html 22KB

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