商丘12345 前端

CallRecord.html 23KB

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