商丘12345 前端

CallRecord.html 22KB

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