説明なし

CallRecord.html 26KB

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