民权县12345_前端

CallRecord.html 19KB

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