商丘12345 前端

CallRecord.html 22KB

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