Brak opisu

thjl.html 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  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/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
  8. <link href="./css/bootstrap.min.css" />
  9. <link rel="stylesheet" href="./css/boot/bootstrap-table.css" />
  10. <link href="./css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
  11. <link href="./css/animate.min.css" rel="stylesheet">
  12. <link href="./css/style.min862f.css?v=4.1.0" rel="stylesheet">
  13. <link href="./css/layer/need/layer.css" />
  14. <style>
  15. body {
  16. font-family: "微软雅黑";
  17. font-size: 14px;
  18. }
  19. ul li {
  20. list-style: none;
  21. float: left;
  22. }
  23. .fr {
  24. float: right;
  25. }
  26. /*标头*/
  27. .th-box {
  28. width: 100%;
  29. padding: 5px;
  30. border-bottom: 1px solid #e7eaec;
  31. }
  32. .th-bar {
  33. height: 40px;
  34. }
  35. .sc_btn {
  36. display: block;
  37. padding: 7px;
  38. color: #FFF;
  39. float: left;
  40. border-radius: 5px;
  41. }
  42. .seach-box ul {
  43. overflow: hidden;
  44. }
  45. .seach-box ul li {
  46. margin-right: 5px;
  47. }
  48. .photo {
  49. background-color: #FFF;
  50. background-image: none;
  51. border: 1px solid #e5e6e7;
  52. border-radius: 1px;
  53. color: inherit;
  54. padding: 6px 12px;
  55. }
  56. .selects {
  57. background-color: #FFF;
  58. background-image: none;
  59. border: 1px solid #e5e6e7;
  60. border-radius: 1px;
  61. color: inherit;
  62. padding: 6px 12px;
  63. }
  64. #Select:focus {
  65. outline: none;
  66. border-color: #00BFFF;
  67. }
  68. input:focus {
  69. outline: none;
  70. border-color: #00BFFF;
  71. }
  72. .spiner-example {
  73. position: absolute;
  74. top: 50%;
  75. left: 50%;
  76. z-index: 111;
  77. margin-left: -85px;
  78. margin-top: -100px;
  79. display: none;
  80. }
  81. .sk-spinner-three-bounce {
  82. width: 170px!important;
  83. }
  84. .sk-spinner p {
  85. display: inline-block;
  86. font-size: 18px;
  87. margin-left: 10px;
  88. }
  89. .gjsu ul {
  90. overflow: hidden;
  91. }
  92. .gjsu ul li {
  93. width: 50%;
  94. margin-bottom: 5px;
  95. padding-top: 10px;
  96. }
  97. .selects {
  98. width: 200px;
  99. }
  100. .tc {
  101. margin-top: 30px;
  102. text-align: center;
  103. }
  104. .t-shade {
  105. position: fixed;
  106. top: 0;
  107. left: 0;
  108. width: 100%;
  109. height: 100%;
  110. background: rgba(0, 0, 0, 0.48);
  111. z-index: 10004;
  112. display: none;
  113. }
  114. .shade_k {
  115. z-index: 10005;
  116. width: 40%;
  117. margin: 10% auto;
  118. background-color: #fff;
  119. box-shadow: 1px 1px 50px rgba(0, 0, 0, .3);
  120. border: 1px solid #23c6c8;
  121. }
  122. .shade_title {
  123. padding: 0 80px 0 20px;
  124. height: 42px;
  125. line-height: 42px;
  126. border-bottom: 1px solid #eee;
  127. font-size: 16px;
  128. color: #FFFFFF;
  129. overflow: hidden;
  130. background-color: #23c6c8;
  131. border-radius: 2px 2px 0 0;
  132. position: relative;
  133. }
  134. .setwin {
  135. position: absolute;
  136. right: 15px;
  137. top: 5px;
  138. font-size: 20px;
  139. line-height: initial;
  140. }
  141. .shade_content {
  142. overflow-y: auto;
  143. position: relative;
  144. padding-bottom: 50px;
  145. padding: 10px;
  146. }
  147. .wh_btn {
  148. width: 80%;
  149. text-align: center;
  150. padding-top: 20px;
  151. margin: 0 auto;
  152. margin-bottom: 20px;
  153. }
  154. .wh_btn input {
  155. padding: 7px 20px;
  156. color: #FFF;
  157. border-radius: 5px;
  158. margin-right: 30px;
  159. border: 1px solid #999;
  160. border-color: #23c6c8;
  161. }
  162. .cx {
  163. display: block;
  164. }
  165. #goods td {
  166. text-align: center;
  167. }
  168. .imgs {
  169. cursor: pointer;
  170. }
  171. .usercode {
  172. background-color: #FFF;
  173. background-image: none;
  174. border: 1px solid #e5e6e7;
  175. border-radius: 1px;
  176. color: inherit;
  177. padding: 6px 12px;
  178. }
  179. .audiojs {
  180. width: 100%;
  181. }
  182. </style>
  183. </head>
  184. <script src="./js/jquery.min.js"></script>
  185. <script src="./js/bootstrap.min.js"></script>
  186. <script src="./js/bootstrap-table.js"></script>
  187. <script src="./js/bootstrap-table-zh-CN.js"></script>
  188. <script src="./css/layer/layer.js"></script>
  189. <script src="./js/jquery.cookie.js"></script>
  190. <script src="My97DatePicker/WdatePicker.js"></script>
  191. <script src="./js/jquery.cookie.js"></script>
  192. <script src="Script/Common/huayi.load.js"></script>
  193. <script src="Script/Common/huayi.config.js"></script>
  194. <body class="gray-bg">
  195. <div class="wrapper wrapper-content animated fadeInRight">
  196. <div class="th-box">
  197. <div class="th-bar">
  198. <!--<a class="sc_btn btn-info" id="moves">批量删除</a>-->
  199. <div class="seach-box fr">
  200. <ul>
  201. <li>电话号码:<input class="photo x-color" type="text" /></li>
  202. <li>坐席:
  203. <select name="" id="Select" style="width: 100px;" class="x-color usercode select">
  204. <option value="">请选择</option>
  205. </select>
  206. </li>
  207. <li>
  208. <a class="sc_btn btn-info Ss">搜索</a>
  209. </li>
  210. <li>
  211. <a class="sc_btn btn-info Gj">高级搜索</a>
  212. </li>
  213. </ul>
  214. </div>
  215. </div>
  216. </div>
  217. <div style="width: 100%;padding: 10px;">
  218. <table id="goods" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  219. <thead>
  220. <tr>
  221. <!-- <th data-sortable="true" data-field="Ba" data-formatter="setName">回拨</th>-->
  222. <th data-field="CallNumber" data-align="center">电话号码</th>
  223. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  224. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  225. <th data-field="DealType" data-formatter="dealType" data-align="center">是否回访</th>
  226. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  227. <!--<th data-field="IsDeal" data-formatter="isDeal" data-align="center">是否处理</th>-->
  228. <th data-field="UserCode" data-align="center">坐席工号</th>
  229. <th data-field="UserName" data-align="center">坐席姓名</th>
  230. <th data-field="BeginTime" data-align="center">通话开始时间</th>
  231. <th data-field="EndTime" data-align="center">通话结束时间</th>
  232. <th data-field="TalkLongTime" data-align="center">通话时长(S)</th>
  233. <th data-field="BusinessType" data-align="center">按键</th>
  234. </tr>
  235. </thead>
  236. </table>
  237. <!--高级搜索框-->
  238. </div>
  239. </div>
  240. <!--下载框-->
  241. <div class="t-shade">
  242. <div class=" shade_k ">
  243. <div class="shade_title">
  244. <span>录音播放与下载<srong class="cknum"></srong></span>
  245. <span class="setwin"><a>x</a></span>
  246. </div>
  247. <div class="shade_content">
  248. <div class="Ly_box audiojs">
  249. </div>
  250. <div class="clearfix wh_btn">
  251. <input type="button" value="下载" class=" btn-info " />
  252. </div>
  253. </div>
  254. </div>
  255. </div>
  256. <script>
  257. /*下拉菜单 坐席*/
  258. $.ajax({
  259. type: "get",
  260. url: huayi.config.callcenter_url + "UserAccount/GetSeatList",
  261. dataType: 'json',
  262. async: true,
  263. data: {
  264. token: token
  265. },
  266. success: function(data) {
  267. var Count = data.data;
  268. $(".select").empty();
  269. $("<option value='0'>全部坐席</option>").appendTo($(".select"));
  270. for(var i = 0; i < Count.length; i++) {
  271. console.log(Count[i].F_UserName);
  272. $("<option value='" + Count[i].F_UserCode + "'>" + Count[i].F_UserName + "</option>").appendTo($(".select"));
  273. }
  274. }
  275. });
  276. var token = $.cookie("token");
  277. var Lys;
  278. var Ly;
  279. var $tableLeft = $('#goods');
  280. Finish();
  281. function Finish(phone, starttime, endtime, callstate, calltype, usercode) {
  282. //销毁表格
  283. $('#goods').bootstrapTable('destroy');
  284. //初始化表格,动态从服务器加载数据
  285. $("#goods").bootstrapTable({
  286. method: "get", //使用get请求到服务器获取数据
  287. // url: "http://192.168.1.88:9025/QCManage/GetYZJList", //获取数据的Servlet地址
  288. url: "thjl.json",
  289. striped: true, //表格显示条纹
  290. pagination: true, //启动分页
  291. pageSize: 5, //每页显示的记录数
  292. pageNumber: 1, //当前第几页
  293. pageList: [5, 20, 50, 100], //记录数可选列表
  294. search: false, //是否启用查询
  295. showColumns: false, //显示下拉框勾选要显示的列
  296. showRefresh: false, //显示刷新按钮
  297. sidePagination: "server", //表示服务端请求
  298. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  299. //设置为limit可以获取limit, offset, search, sort, order
  300. queryParamsType: "undefined",
  301. queryParams: function queryParams(params) { //设置查询参数
  302. var param = {
  303. page: params.pageNumber,
  304. pagesize: params.pageSize,
  305. phone: phone,
  306. usercode: usercode,
  307. calltype: calltype,
  308. starttime: starttime,
  309. endtime: endtime,
  310. };
  311. return param;
  312. },
  313. onLoadSuccess: function() { //加载成功时执行
  314. // layer.msg("加载成功");
  315. },
  316. onLoadError: function() { //加载失败时执行
  317. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  318. }
  319. });
  320. }
  321. //搜索
  322. $(".Ss").click(function() {
  323. var phone = $("#Phones").val();
  324. var usercode = $('#Select').val();
  325. Finish(phone, usercode);
  326. });
  327. //高级搜索s
  328. $(".Gj").click(function() {
  329. var a = "WdatePicker()";
  330. layer.open({
  331. type: 1,
  332. title: '高级搜索',
  333. area: ['50%', '55%'], //宽高
  334. content: ' <div class="gjsu"><ul class="nav nav-tabs">' +
  335. '<li class="active"><a href="#">参数信息</a></li> ' +
  336. '</ul>' +
  337. '<ul>' +
  338. '<li>' +
  339. '<label for="">电话号码:</label>' +
  340. '<input type="text" id="Phones" class="photo"/>' +
  341. '</li>' +
  342. '<li>' +
  343. '<label for="">坐席工号:</label>' +
  344. '<select name="" id="Select" class="selects usercode"></select>' +
  345. '</li>' +
  346. '<li>' +
  347. '<label for="">开始时间:</label>' +
  348. ' <input type="text" id="workstart" class="photo"onClick="' + a + '"/>' +
  349. '</li>' +
  350. '<li>' +
  351. '<label for="">呼叫状态:</label>' +
  352. '<select name="" class="selects callstate">' +
  353. '<option value="">全部</option>' +
  354. '<option value="0">未接通</option>' +
  355. '<option value="1">已接通</option>' +
  356. '</select>' +
  357. '</li>' +
  358. '<li>' +
  359. '<label for="">结束时间:</label>' +
  360. '<input type="text" id="workend" class="photo" onClick="' + a + '"/>' +
  361. '</li>' +
  362. '<li>' +
  363. '<label for="">呼出方向:</label>' +
  364. '<select name="" class=" selects calltype">' +
  365. '<option value="">全部</option>' +
  366. '<option value="0">呼入</option>' +
  367. '<option value="1">呼出</option>' +
  368. '</select>' +
  369. '</li>' +
  370. '</ul>' +
  371. '<div class=" add_time tc">' +
  372. '<button type="button" class="btn btn-info" id="tc">保&nbsp;&nbsp;存</button>' +
  373. '</div>' +
  374. '</div>'
  375. });
  376. $.ajax({
  377. type: "get",
  378. url: huayi.config.callcenter_url + "UserAccount/GetSeatList",
  379. dataType: 'json',
  380. async: true,
  381. success: function(data) {
  382. var Count = data.data;
  383. console.log(Count);
  384. $("<option value='0'>全部</option>").appendTo($(".usercode"));
  385. for(var i = 0; i < Count.length; i++) {
  386. console.log(Count[i].F_UserName);
  387. $("<option value='" + Count[i].F_UserCode + "'>" + Count[i].F_UserName + "</option>").appendTo($(".usercode"));
  388. }
  389. }
  390. });
  391. //获取通话记录列表
  392. $("#tc").click(function() {
  393. var phone = $("#Phones").val();
  394. var starttime = $("#workstart").val();
  395. var endtime = $("#workend").val();
  396. var callstate = $(".callstate").val();
  397. var calltype = $(".calltype").val();
  398. var usercode = $('#Select').val();
  399. Finish();
  400. var index = layer.index; //获取当前弹层的索引号
  401. layer.close(index); //关闭当前弹层
  402. });
  403. });
  404. //音频
  405. function setCode(val) {
  406. if(val == "") {
  407. return '<div class="imgs">' +
  408. '</div>';
  409. } else {
  410. return '<div class="imgs">' +
  411. '<img src="./img/vice.png" alt="" onclick= ck("' + val + '") />' +
  412. '</div>';
  413. }
  414. }
  415. //方向呼出
  416. function callType(val) {
  417. return '<div class="imgs">呼出' +
  418. '</div>';
  419. }
  420. function states(val) {
  421. if(val == 0) {
  422. return '<div class="imgs">未接通' +
  423. '</div>';
  424. } else {
  425. return '<div class="imgs">已接通' +
  426. '</div>';
  427. }
  428. }
  429. //回访
  430. function dealType(val) {
  431. if(val == 1) {
  432. return '<div >已回访' +
  433. '</div>';
  434. } else {
  435. return '<div >' +
  436. '</div>';
  437. }
  438. }
  439. //处理
  440. function isDeal(val) {
  441. if(val == 0) {
  442. return '<div >未处理' +
  443. '</div>';
  444. } else {
  445. return '<div >已处理' +
  446. '</div>';
  447. }
  448. }
  449. //录音
  450. function ck(val) {
  451. Ly = val;
  452. $(".t-shade").addClass("cx");
  453. Lys = Ly;
  454. $(".Ly_box").html("");
  455. $('<audio class=" " src="' + Lys + '" loop="loop"></audio>').appendTo(".Ly_box");
  456. audiojs.events.ready(function() {
  457. var as = audiojs.createAll();
  458. });
  459. }
  460. /*获取选中行对象*/
  461. $('#goods').on("click-row.bs.table", function(e, row, ele) {
  462. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  463. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  464. });
  465. $(".setwin").click(function() {
  466. $(".t-shade").removeClass("cx");
  467. });
  468. </script>
  469. </body>
  470. </html>