ZZDianXin_UI - 郑州电信 演示

CallRecord.html 22KB

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