商丘12345 前端

CallRecord.html 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  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. <script src="../Script/Common/huayi.load.js"></script>
  10. <script src="../Script/Common/huayi.config.js"></script>
  11. <script src="../My97DatePicker/WdatePicker.js"></script>
  12. <script src="../css/laydate/laydate.js"></script>
  13. <style>
  14. body {
  15. font-family: "微软雅黑";
  16. font-size: 14px;
  17. }
  18. ul li {
  19. list-style: none;
  20. float: left;
  21. }
  22. .fr {
  23. float: right;
  24. }
  25. .fl {
  26. float: left;
  27. }
  28. /*标头*/
  29. .th-box {
  30. width: 100%;
  31. padding: 5px;
  32. border-bottom: 1px solid #e7eaec;
  33. }
  34. .th-bar {
  35. height: 80px;
  36. }
  37. .sc_btn {
  38. color: #fff;
  39. font-size: 12px;
  40. margin-left: 15px;
  41. box-sizing: border-box;
  42. background: #00a1cb;
  43. padding: 6px 10px;
  44. outline: none;
  45. border-width: 0px;
  46. border-style: initial;
  47. border-color: initial;
  48. border-image: initial;
  49. border-radius: 3px;
  50. margin-top: 5px;
  51. }
  52. .seach-box ul {
  53. overflow: hidden;
  54. }
  55. .seach-box ul li {
  56. margin-right: 50px;
  57. }
  58. .photo {
  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. .selects {
  67. background-color: #FFF;
  68. background-image: none;
  69. border: 1px solid #e5e6e7;
  70. border-radius: 1px;
  71. color: inherit;
  72. padding: 6px 12px;
  73. }
  74. #Select:focus {
  75. outline: none;
  76. border-color: #00BFFF;
  77. }
  78. input:focus {
  79. outline: none;
  80. border-color: #00BFFF;
  81. }
  82. .spiner-example {
  83. position: absolute;
  84. top: 50%;
  85. left: 50%;
  86. z-index: 111;
  87. margin-left: -85px;
  88. margin-top: -100px;
  89. display: none;
  90. }
  91. .sk-spinner-three-bounce {
  92. width: 170px !important;
  93. }
  94. .sk-spinner p {
  95. display: inline-block;
  96. font-size: 18px;
  97. margin-left: 10px;
  98. }
  99. .gjsu ul {
  100. overflow: hidden;
  101. }
  102. .gjsu ul li {
  103. width: 50%;
  104. margin-bottom: 5px;
  105. padding-top: 10px;
  106. }
  107. .selects {
  108. width: 100px;
  109. }
  110. .tc {
  111. margin-top: 30px;
  112. text-align: center;
  113. }
  114. .seach-box ul {
  115. padding-left: 0;
  116. }
  117. .seach-box ul li {
  118. margin-bottom: 5px;
  119. }
  120. /*.seach-box input{
  121. width: 122px;
  122. }*/
  123. </style>
  124. </head>
  125. <body class="gray-bg">
  126. <div class="wrapper wrapper-content animated fadeInRight">
  127. <div class="daoHang clearfix">
  128. <div class="dhLeft">
  129. <sapn><i class="syIcon"></i>位置:
  130. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  131. <a href="javaScript:;">话务管理</a>&gt;
  132. <a href="" class="nowPosition">通话记录查询</a>
  133. </sapn>
  134. </div>
  135. <div class="dhRight">
  136. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  137. </div>
  138. </div>
  139. <div class="th-box">
  140. <div class="th-bar">
  141. <!--<a class="sc_btn btn-info" id="moves">批量删除</a>-->
  142. <div class="seach-box fl">
  143. <ul>
  144. <li>时间:<input id="start" class="photo x-color laydate-icon" type="text" />-<input id="end" class="photo x-color laydate-icon" type="text" /></li>
  145. <li>电话号码:<input id="tel" class="photo x-color" type="text" /></li>
  146. <li>
  147. 呼叫状态:
  148. <select id="ss_hjzt" class="selects callstate">
  149. <option value="">全部</option>
  150. <option value="0">未接通</option>
  151. <option value="1">已接通</option>
  152. <option value="2">黑名单拒接</option>
  153. <option value="3">主动放弃</option>
  154. </select>
  155. </li>
  156. <li>
  157. 通话类型:
  158. <select id="callType" class="selects callstate">
  159. <option value="">全部</option>
  160. </select>
  161. </li>
  162. <li>
  163. 呼出方向:
  164. <select id="ss_hcfx" class=" selects calltype">
  165. <option value="">全部</option>
  166. <option value="0">呼入</option>
  167. <option value="1">呼出</option>
  168. </select>
  169. </li>
  170. <li>
  171. 呼叫类型:
  172. <select id="ss_HJLX" class=" selects calltype">
  173. <option value="">全部</option>
  174. <option value="1">正常通话</option>
  175. <option value="2">转移</option>
  176. <option value="3">三方通话</option>
  177. <option value="4">转接</option>
  178. </select>
  179. </li>
  180. <li>
  181. 是否回访:
  182. <select id="sf_hf" class=" selects calltype">
  183. <option value="">全部</option>
  184. <option value="2">是</option>
  185. <option value="0">否</option>
  186. </select>
  187. </li>
  188. <li>
  189. 坐席:
  190. <select style="width: 100px;" class="x-color select usercode" id="seat">
  191. <option value="">全部</option>
  192. </select>
  193. </li>
  194. <li>
  195. 转接地:
  196. <select style="width: 100px;" class="x-color select usercode" id="transferplace">
  197. <option value="">全部</option>
  198. <option value="永城">永城</option>
  199. <option value="柘城">柘城</option>
  200. <option value="睢县">睢县</option>
  201. <option value="夏邑">夏邑</option>
  202. <option value="宁陵">宁陵</option>
  203. <option value="民权">民权</option>
  204. <option value="虞城">虞城</option>
  205. </select>
  206. </li>
  207. <li>分机号:<input id="extnumber" class="photo x-color" type="text" /></li>
  208. <li>
  209. <a class="sc_btn Ss Block">搜索</a>
  210. </li>
  211. <!--<li>
  212. <a class="sc_btn Gj Block">高级搜索</a>
  213. </li>-->
  214. </ul>
  215. </div>
  216. </div>
  217. </div>
  218. <div style="width: 100%;padding: 10px;">
  219. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  220. <thead>
  221. <tr>
  222. <th data-field="CallNumber" data-align="center" data-formatter="Code">编号</th>
  223. <th data-field="CallNumber" data-align="center">电话号码</th>
  224. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  225. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  226. <!--<th data-field="DealType" data-formatter="dealType" data-align="center">是否回访</th>-->
  227. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  228. <th data-field="ActionType" data-formatter="ActionType" data-align="center">呼叫类型</th>
  229. <th data-field="TypeName" data-align="center">通话类型</th>
  230. <th data-field="City" data-align="center">转接地</th>
  231. <th data-field="MYD" data-align="center" data-formatter="MYD">满意度</th>
  232. <th data-field="UserCode" data-align="center">坐席工号</th>
  233. <th data-field="UserName" data-align="center">坐席姓名</th>
  234. <th data-field="ExtNumber" data-align="center">分机号</th>
  235. <th data-field="BeginTime" data-align="center">开始时间</th>
  236. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  237. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  238. <th data-field="TalkLongTime" data-align="center" data-formatter="ftime">通话时长</th>
  239. <th data-field="RingLongTime" data-align="center" data-formatter="ftime">振铃时长</th>
  240. <th data-field="LongTime" data-align="center" data-formatter="ftime">总时长</th>
  241. <th data-field="WorkOrderId" data-align="center" data-formatter="formatWorkOrderNum">工单号</th>
  242. </tr>
  243. </thead>
  244. </table>
  245. <!--高级搜索框-->
  246. </div>
  247. </div>
  248. <!--下载框-->
  249. <div class="t-shade">
  250. <div class="shade_k">
  251. <div class="shade_title">
  252. <span>录音播放<srong class="cknum"></srong></span>
  253. <span class="setwin"><a>x</a></span>
  254. </div>
  255. <div class="shade_content">
  256. <div class="Ly_box audiojs">
  257. </div>
  258. <div class="boxCon LY_box">
  259. </div>
  260. </div>
  261. </div>
  262. </div>
  263. <script>
  264. var stype = 1;
  265. var seatlist = [];
  266. $(document).ready(function() {
  267. laydate.skin('blue');
  268. laydate({
  269. elem: '#start',
  270. event: 'focus',
  271. istime: true,
  272. format: 'YYYY-MM-DD hh:mm:ss'
  273. });
  274. laydate({
  275. elem: '#end',
  276. event: 'focus',
  277. istime: true,
  278. format: 'YYYY-MM-DD hh:mm:ss'
  279. });
  280. /*获取选中行对象*/
  281. $('#list').on("click-row.bs.table", function(e, row, ele) {
  282. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  283. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  284. });
  285. $(".setwin").click(function() {
  286. $(".t-shade").removeClass("cx");
  287. $('audio')[0].pause();
  288. });
  289. //获取通话类型
  290. GetCallTypeList();
  291. //获取坐席
  292. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  293. token: $.cookie("token")
  294. }, function(result) {
  295. if(result.state.toLowerCase() == "success") {
  296. seatlist = result.data;
  297. bindseat($("#seat"));
  298. }
  299. });
  300. //搜索
  301. $(".Ss").click(function() {
  302. stype = 1;
  303. initTable();
  304. });
  305. //高级搜索s
  306. $(".Gj").click(function() {
  307. var a = "WdatePicker()";
  308. layer.open({
  309. type: 1,
  310. title: '高级搜索',
  311. area: ['50%', '55%'], //宽高
  312. content: ' <div class="gjsu"><ul class="nav nav-tabs">' +
  313. '<li class="active"><a href="#">参数信息</a></li> ' +
  314. '</ul>' +
  315. '<ul>' +
  316. '<li>' +
  317. '<label for="">电话号码:</label>' +
  318. '<input type="text" id="ss_tel" class="photo"/>' +
  319. '</li>' +
  320. '<li>' +
  321. '<label for="">坐席工号:</label>' +
  322. '<select name="" id="ss_seat" class="selects usercode"></select>' +
  323. '</li>' +
  324. '<li>' +
  325. '<label for="">开始时间:</label>' +
  326. ' <input type="text" id="ss_kssj" class="photo"onClick="' + a + '"/>' +
  327. '</li>' +
  328. '<li>' +
  329. '<label for="">呼叫状态:</label>' +
  330. '<select id="ss_hjzt" class="selects callstate">' +
  331. '<option value="">全部</option>' +
  332. '<option value="0">未接通</option>' +
  333. '<option value="1">已接通</option>' +
  334. '<option value="2">黑名单拒接</option>' +
  335. '</select>' +
  336. '</li>' +
  337. '<li>' +
  338. '<label for="">结束时间:</label>' +
  339. '<input type="text" id="ss_jssj" class="photo" onClick="' + a + '"/>' +
  340. '</li>' +
  341. '<li>' +
  342. '<label for="">呼出方向:</label>' +
  343. '<select id="ss_hcfx" class=" selects calltype">' +
  344. '<option value="">全部</option>' +
  345. '<option value="0">呼入</option>' +
  346. '<option value="1">呼出</option>' +
  347. '</select>' +
  348. '</li>' +
  349. '</ul>' +
  350. '<div class=" add_time tc">' +
  351. '<button type="button" class="btn sc_btn Block " id="tc">保&nbsp;&nbsp;存</button>' +
  352. '</div>' +
  353. '</div>'
  354. });
  355. bindseat($("#ss_seat"));
  356. //获取通话记录列表
  357. $("#tc").click(function() {
  358. stype = 2;
  359. initTable();
  360. var index = layer.index; //获取当前弹层的索引号
  361. layer.close(index); //关闭当前弹层
  362. });
  363. });
  364. initTable();
  365. })
  366. function bindseat(obj) {
  367. obj.empty();
  368. obj.append('<option value="">全部</option>');
  369. $(seatlist).each(function(i, n) {
  370. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  371. })
  372. }
  373. function initTable() {
  374. //先销毁表格
  375. $('#list').bootstrapTable('destroy');
  376. //初始化表格,动态从服务器加载数据
  377. $("#list").bootstrapTable({
  378. method: "get", //使用get请求到服务器获取数据
  379. url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
  380. contentType: "application/x-www-form-urlencoded",
  381. striped: true, //表格显示条纹
  382. pagination: true, //启动分页
  383. pageSize: 10, //每页显示的记录数
  384. pageNumber: 1, //当前第几页
  385. pageList: [10, 20, 50, 100], //记录数可选列表
  386. search: false, //是否启用查询
  387. showColumns: false, //显示下拉框勾选要显示的列
  388. showRefresh: false, //显示刷新按钮
  389. sidePagination: "server", //表示服务端请求
  390. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  391. //设置为limit可以获取limit, offset, search, sort, order
  392. queryParamsType: "undefined",
  393. queryParams: function queryParams(params) { //设置查询参数
  394. var param = {
  395. page: params.pageNumber,
  396. pagesize: params.pageSize,
  397. token: $.cookie("token")
  398. };
  399. if(stype == '1') {
  400. param.usercode = $("#seat").val();
  401. param.phone = $("#tel").val();
  402. param.starttime = $("#start").val();
  403. param.endtime = $("#end").val();
  404. param.callstate = $("#ss_hjzt").val();
  405. param.calltype = $("#ss_hcfx").val();
  406. param.type = $("#callType").val(); //type=通话类型
  407. param.actiontype = $("#ss_HJLX").val(); //呼叫类型
  408. param.tasktype = $("#sf_hf").val(); //呼叫类型
  409. param.extnumber = $("#extnumber").val();
  410. param.city = $("#transferplace").val();
  411. } else if(stype == '2') {
  412. param.usercode = $("#ss_seat").val();
  413. param.tel = $("#ss_tel").val();
  414. param.callstate = $("#ss_hjzt").val();
  415. param.calltype = $("#ss_hcfx").val();
  416. param.starttime = $("#ss_kssj").val();
  417. param.endtime = $("#ss_jssj").val();
  418. param.type = $("#callType").val(); //type=通话类型
  419. param.actiontype = $("#ss_HJLX").val(); //呼叫类型
  420. param.tasktype = $("#sf_hf").val(); //呼叫类型
  421. param.extnumber = $("#extnumber").val();
  422. param.city = $("#transferplace").val();
  423. }
  424. return param;
  425. },
  426. onLoadSuccess: function() { //加载成功时执行
  427. //layer.msg("加载成功");
  428. },
  429. onLoadError: function() { //加载失败时执行
  430. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  431. }
  432. });
  433. }
  434. //音频
  435. function setCode(val) {
  436. if(val) {
  437. return '<div class="imgs">' +
  438. '<img src="../img/vice.png" alt="" onclick="helper.luyin.view(this)" item="' + val + '" />' +
  439. '</div>';
  440. } else {
  441. return '';
  442. }
  443. }
  444. //编号
  445. function Code(val, row, index) {
  446. return index + 1;
  447. }
  448. //方向呼出
  449. function callType(val) {
  450. if(val == 0) {
  451. return '<div class="imgs">呼入</div>';
  452. } else {
  453. return '<div class="imgs">呼出</div>';
  454. }
  455. }
  456. //满意度
  457. function MYD(val, row) {
  458. var html = '';
  459. switch(val + '') {
  460. case '0':
  461. html = '未评价';
  462. break;
  463. case '1':
  464. html = '满意';
  465. if(row.CallState == 0) {
  466. html = '';
  467. }
  468. break;
  469. case '2':
  470. html = '一般';
  471. break;
  472. case '3':
  473. html = '不满意';
  474. break;
  475. }
  476. return html;
  477. }
  478. function states(val) {
  479. if(val == 0) {
  480. return '<div class="imgs">未接通</div>';
  481. } else if(val == 1) {
  482. return '<div class="imgs">已接通</div>';
  483. } else if(val == 2) {
  484. return '<div class="imgs">黑名单拒接</div>';
  485. }
  486. }
  487. function ActionType(val) {
  488. if(val == 2) {
  489. return '<div class="imgs">转移</div>';
  490. } else if(val == 3) {
  491. return '<div class="imgs">三方通话</div>';
  492. } else if(val == 4){
  493. return '<div class="imgs">转接</div>';
  494. }else {
  495. return '<div class="imgs">正常通话</div>';
  496. }
  497. }
  498. ////回访
  499. //function dealType(val) {
  500. // if (val == 1) {
  501. // return '<div >已回访</div>';
  502. // } else {
  503. // return '';
  504. // }
  505. //}
  506. //处理
  507. function isDeal(val) {
  508. if(val == 0) {
  509. return '<div >未处理</div>';
  510. } else {
  511. return '<div >已处理</div>';
  512. }
  513. }
  514. function ftime(val) {
  515. if(val) {
  516. return helper.DateFormat.getFormatTime(val);
  517. } else {
  518. return '';
  519. }
  520. }
  521. //格式化工单号
  522. function formatWorkOrderNum(val, row) {
  523. if(val == null) {
  524. val = '-'
  525. } else {
  526. return '<a class="xg" onclick="ckxq(\'' + val + '\')" title="点击查看工单详情">' + val + '</a>';
  527. }
  528. }
  529. //获取通话类型
  530. function GetCallTypeList() {
  531. $.getJSON(huayi.config.callcenter_url + 'Dictionary/GetDicValueListById', {
  532. id: 45,
  533. token: $.cookie("token")
  534. }, function(result) {
  535. if(result.state.toLowerCase() == "success") {
  536. var callTypeList = result.data;
  537. $('#callType').empty();
  538. $('#callType').append('<option value="">全部</option>');
  539. $(callTypeList).each(function(i, n) {
  540. $('#callType').append('<option value="' + n.F_ValueId + '">' + n.F_Value + '</option>');
  541. })
  542. }
  543. })
  544. }
  545. //查看工单详情
  546. function ckxq(str) {
  547. if(str) {
  548. layer.open({
  549. type: 2,
  550. content: "../CommonHtml/WorkDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
  551. title: '工单详情',
  552. area: ['87%', '80%'], //宽高
  553. });
  554. }
  555. }
  556. </script>
  557. </body>
  558. </html>