No Description

CallRecord.html 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  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 class="ZXs">
  257. <label for="">坐席姓名:</label>
  258. <select class="x-color selects usercode" id="seat">
  259. <option value="">全部</option>
  260. </select>
  261. </li>
  262. <li class="ZXs">
  263. <label for="">处理方式:</label>
  264. <select class="x-color selects" id="dealtype">
  265. <option value="">全部</option>
  266. <option value="0">IVR处理</option>
  267. <option value="1">骚扰电话</option>
  268. <option value="2">自助服务</option>
  269. <option value="3">转值班电话</option>
  270. <option value="4">留言</option>
  271. <option value="5">呼损</option>
  272. <option value="6">人工处理</option>
  273. </select>
  274. </li>
  275. <li>
  276. <label for="">工单编号:</label>
  277. <input id="workordercode" class="photo x-color" type="text" />
  278. </li>
  279. <li>
  280. <label for="">电话号码:</label>
  281. <input id="tel" class="photo x-color" type="text" />
  282. </li>
  283. <div class="clearfix btn_boxs " style="float: right;">
  284. <a class="sc_btn Ss Block fl">搜索</a>
  285. <a class="sc_btn export Block" style="display: inline-box;display: -webkit-inline-box;">导出</a>
  286. </div>
  287. </ul>
  288. </div>
  289. </div>
  290. </div>
  291. <div style="width: 100%;padding: 10px;">
  292. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  293. <thead>
  294. <tr>
  295. <th data-field="CallNumber" data-align="center" data-formatter="Code">编号</th>
  296. <th data-field="CallNumber" data-align="center">电话号码</th>
  297. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  298. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  299. <th data-field="DealType" data-formatter="formatterDealType" data-align="center">处理方式</th>
  300. <th data-field="CusDepName" data-align="center">部门</th>
  301. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  302. <th data-field="UserCode" data-align="center">坐席工号</th>
  303. <th data-field="UserName" data-align="center">坐席姓名</th>
  304. <th data-field="BeginTime" data-align="center">开始时间</th>
  305. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  306. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  307. <th data-field="TalkLongTime" data-align="center">通话时长(S)</th>
  308. <th data-field="CallId" data-align="center" data-formatter="TX">操作</th>
  309. </tr>
  310. </thead>
  311. </table>
  312. <!--高级搜索框-->
  313. </div>
  314. </div>
  315. <!--下载框-->
  316. <div class="t-shade">
  317. <div class="shade_k">
  318. <div class="shade_title">
  319. <span>录音播放与下载<srong class="cknum"></srong></span>
  320. <span class="setwin"><a>x</a></span>
  321. </div>
  322. <div class="shade_content">
  323. <div class="Ly_box audiojs">
  324. </div>
  325. <div class="boxCon LY_box">
  326. </div>
  327. </div>
  328. </div>
  329. </div>
  330. <script>
  331. var stype = 1;
  332. var seatlist = [];
  333. var RoleId;
  334. var saveArrs = [];
  335. var IDs;
  336. var Names;
  337. $(document).ready(function () {
  338. laydate.skin('molv');
  339. //留言时间
  340. laydate({
  341. elem: '#ss_kssj',
  342. event: 'focus',
  343. festival: true, //显示节日
  344. });
  345. //处理时间
  346. laydate({
  347. elem: '#ss_jssj',
  348. festival: true, //显示节日
  349. event: 'focus'
  350. });
  351. $('.clears').click(function () {
  352. $('#citySel').val('请选择部门');
  353. IDs = null;
  354. $('#menuContent').css('display', 'none');
  355. });
  356. $('#citySel').click(function () {
  357. $('#menuContent').css('display', 'block')
  358. });
  359. $('#menuContent').mouseleave(function () {
  360. $(this).css('display', 'none')
  361. });
  362. $.getJSON(huayi.config.callcenter_url + 'UserAccount/GetNowUser', {
  363. "token": $.cookie("token")
  364. }, function (result) {
  365. if (result.state.toLowerCase() == "success") {
  366. RoleId = result.data.role.F_RoleId
  367. if (RoleId != "17") { //非系统管理员显示
  368. $('.BMs').hide();
  369. $('.SZBN').hide();
  370. }
  371. }
  372. })
  373. /*获取选中行对象*/
  374. $('#list').on("click-row.bs.table", function (e, row, ele) {
  375. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  376. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  377. });
  378. $(".setwin").click(function () {
  379. $(".t-shade").removeClass("cx");
  380. $('audio')[0].pause();
  381. });
  382. //坐席
  383. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  384. token: $.cookie("token")
  385. }, function (result) {
  386. if (result.state.toLowerCase() == "success") {
  387. seatlist = result.data;
  388. bindseat($("#seat"));
  389. }
  390. });
  391. //搜索
  392. $(".Ss").click(function () {
  393. stype = 1;
  394. initTable();
  395. });
  396. document.onkeydown = function (e) { // 回车提交表单
  397. var theEvent = window.event || e;
  398. var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
  399. if (code == 13) {
  400. stype = 1;
  401. initTable();
  402. }
  403. }
  404. initTable();
  405. //部门
  406. //tree()
  407. function tree() {
  408. $.get(huayi.config.callcenter_url + "Department/GetDeptList", {
  409. "token": $.cookie("token"),
  410. // "pid": pid
  411. }, function (result) {
  412. result = $.parseJSON(result);
  413. $.fn.zTree.init($("#treeDemo"), setting2, result.data); //实例化树形图
  414. });
  415. }
  416. var setting2 = {
  417. data: {
  418. key: {
  419. name: "text"
  420. },
  421. simpleData: {
  422. enable: true,
  423. idKey: "id",
  424. rootPId: 0
  425. }
  426. },
  427. callback: {
  428. onClick: addTreeClick
  429. }
  430. }
  431. function addTreeClick(event, treeId, treeNode) {
  432. IDs = treeNode.id;
  433. Names = treeNode.text;
  434. $('#citySel').val(Names);
  435. };
  436. $(".xl").click(function () {
  437. if ($(this).parent().find(".menuContent").is(":hidden")) {
  438. $(this).parent().find(".menuContent").show();
  439. } else {
  440. $(this).parent().find(".menuContent").hide();
  441. }
  442. });
  443. });
  444. function bindseat(obj) {
  445. obj.empty();
  446. obj.append('<option value="">全部</option>');
  447. $(seatlist).each(function (i, n) {
  448. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  449. })
  450. }
  451. function initTable() {
  452. //先销毁表格
  453. $('#list').bootstrapTable('destroy');
  454. //初始化表格,动态从服务器加载数据
  455. $("#list").bootstrapTable({
  456. method: "get", //使用get请求到服务器获取数据
  457. url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
  458. contentType: 'application/x-www-form-urlencoded',
  459. striped: true, //表格显示条纹
  460. pagination: true, //启动分页
  461. pageSize: 10, //每页显示的记录数
  462. pageNumber: 1, //当前第几页
  463. pageList: [10, 20, 50, 100], //记录数可选列表
  464. search: false, //是否启用查询
  465. showColumns: false, //显示下拉框勾选要显示的列
  466. showRefresh: false, //显示刷新按钮
  467. sidePagination: "server", //表示服务端请求
  468. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  469. //设置为limit可以获取limit, offset, search, sort, order
  470. queryParamsType: "undefined",
  471. queryParams: function queryParams(params) { //设置查询参数
  472. var param = {
  473. page: params.pageNumber,
  474. pagesize: params.pageSize,
  475. usercode: $("#seat").val(),
  476. phone: $("#tel").val(),
  477. workordercode: $("#workordercode").val(), //工单编号
  478. //dept: IDs,
  479. callstate: $("#ss_hjzt").val(),
  480. calltype: $("#ss_hcfx").val(),
  481. starttime: $("#ss_kssj").val(),
  482. endtime: $("#ss_jssj").val(),
  483. DealType: $('#dealtype').val(),
  484. token: $.cookie("token")
  485. };
  486. return param;
  487. },
  488. onLoadSuccess: function () { //加载成功时执行
  489. //layer.msg("加载成功");
  490. },
  491. onLoadError: function () { //加载失败时执行
  492. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  493. }
  494. });
  495. }
  496. //格式化处理方式
  497. function formatterDealType(val, row) {
  498. //处理方式0:IVR处理1骚扰电话2自助服务3转值班电话4留言5呼损6人工处理
  499. var str = '-';
  500. switch (val) {
  501. case 0:
  502. str = 'IVR处理';
  503. break;
  504. case 1:
  505. str = '骚扰电话';
  506. break;
  507. case 2:
  508. str = '自助服务';
  509. break;
  510. case 3:
  511. str = '转值班电话';
  512. break;
  513. case 4:
  514. str = '留言';
  515. break;
  516. case 5:
  517. str = '呼损';
  518. break;
  519. case 6:
  520. str = '人工处理';
  521. break;
  522. }
  523. return str;
  524. }
  525. //音频
  526. function setCode(val) {
  527. if (val) {
  528. return '<div class="imgs">' +
  529. '<img src="../img/vice.png" alt="" onclick= ck(this) item="' + val + '" />' +
  530. '</div>';
  531. } else {
  532. return '';
  533. }
  534. }
  535. //编号
  536. function Code(val, row, index) {
  537. return index + 1;
  538. }
  539. //方向呼出
  540. function callType(val) {
  541. if (val == 0) {
  542. return '<div class="imgs">呼入</div>';
  543. } else {
  544. return '<div class="imgs">呼出</div>';
  545. }
  546. }
  547. function states(val) {
  548. if (val == 0) {
  549. return '<div class="imgs">未接通</div>';
  550. } else {
  551. return '<div class="imgs">已接通</div>';
  552. }
  553. }
  554. //回访
  555. function dealType(val) {
  556. if (val == 1) {
  557. return '<div >已回访</div>';
  558. } else {
  559. return '';
  560. }
  561. }
  562. //处理
  563. function isDeal(val) {
  564. if (val == 0) {
  565. return '<div >未处理</div>';
  566. } else {
  567. return '<div >已处理</div>';
  568. }
  569. }
  570. //录音
  571. function ck(val) {
  572. var path = $(val).attr("item");
  573. $(".t-shade").addClass("cx");
  574. $(".Ly_box").empty();
  575. $(".LY_box").empty();
  576. $('<audio style="width:100%;"class=" " src="' + path + '" loop="loop" type="audio/v3" controls="controls"></audio>').appendTo(".Ly_box");
  577. }
  578. //导出
  579. $('.export').click(function () {
  580. dcexcel(this);
  581. })
  582. function dcexcel(obj) {
  583. var url = huayi.config.callcenter_url + "Callrecords/GetListExpt?token=" + $.cookie("token");
  584. url += "&usercode=" + $("#seat").val() +
  585. "&phone=" + $("#tel").val() +
  586. "&callstate=" + $("#ss_hjzt").val() +
  587. "&calltype=" + $("#ss_hcfx").val() +
  588. "&starttime=" + $("#ss_kssj").val() +
  589. "&endtime=" + $("#ss_jssj").val() +
  590. "&DealType=" + $('#dealtype').val() ;
  591. //+"&dept=" + $("#bumen").val();
  592. obj.href = url;
  593. }
  594. // 部门
  595. function TX(val, row) {
  596. var html = '';
  597. if (row.IsWorkeorder <= 0) {
  598. return '<div class="warning" onclick="CL(\'' + row.CusName + '\',\'' + row.CallNumber + '\',\'' + val + '\',\'' + row.CallId + '\')"><a class="warning">添加工单</a></div>'
  599. } else if (row.IsWorkeorder > 0) {
  600. return '<div class="warning" onclick="viewWorkOrder(\'' + row.CusName + '\',\'' + row.CallNumber + '\',\'' + val + '\',\'' + row.CallId + '\',\'1\' )"><a class="warning">查看工单</a></div>'
  601. }
  602. }
  603. function CL(name, phone, id, CallId) {
  604. top.$("iframe:visible")[0].src = "./WorkOrder/AddWorkOrder.html?name=" + name + "&phone=" + phone + "&id=" + id + "&CallID=" + CallId;
  605. }
  606. function viewWorkOrder(name, phone, id, CallId, callRecordType) {
  607. layer.open({
  608. type: 2,
  609. title: '查看工单',
  610. maxmin: true, //开启最大化最小化按钮
  611. area: ['80%', '90%'],
  612. content: "../WorkOrder/Xga.html?CallId=" + CallId + "&callRecordType=" + callRecordType,
  613. });
  614. }
  615. </script>
  616. </body>
  617. </html>