安图前端代码

CallRecord.html 17KB

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