鑫苑新版本前端代码

CallRecord.html 19KB

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