12345市长热线标准版-前端

CallRecord.html 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  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. /*标头*/
  26. .th-box {
  27. width: 100%;
  28. padding: 5px;
  29. border-bottom: 1px solid #e7eaec;
  30. }
  31. .th-bar {
  32. height: 40px;
  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="wrapper wrapper-content animated fadeInRight">
  120. <div class="daoHang clearfix">
  121. <div class="dhLeft">
  122. <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>&gt;<a href="javaScript:;">话务管理</a>&gt;<a href="" class="nowPosition">通话记录查询</a></sapn>
  123. </div>
  124. <div class="dhRight">
  125. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  126. </div>
  127. </div>
  128. <div class="th-box">
  129. <div class="th-bar">
  130. <!--<a class="sc_btn btn-info" id="moves">批量删除</a>-->
  131. <div class="seach-box fr">
  132. <ul>
  133. <li>时间:<input id="start" class="photo x-color laydate-icon" type="text" />-<input id="end" class="photo x-color laydate-icon" type="text" /></li>
  134. <li>电话号码:<input id="tel" class="photo x-color" type="text" /></li>
  135. <li>
  136. 呼叫状态:
  137. <select id="ss_hjzt" class="selects callstate">
  138. <option value="">全部</option>
  139. <option value="0">未接通</option>
  140. <option value="1">已接通</option>
  141. <option value="2">黑名单拒接</option>
  142. <option value="3">主动放弃</option>
  143. </select>
  144. </li>
  145. <li>
  146. 呼出方向:
  147. <select id="ss_hcfx" class=" selects calltype">
  148. <option value="">全部</option>
  149. <option value="0">呼入</option>
  150. <option value="1">呼出</option>
  151. </select>
  152. </li>
  153. <li>
  154. 坐席:
  155. <select style="width: 100px;" class="x-color select usercode" id="seat">
  156. <option value="">全部</option>
  157. </select>
  158. </li>
  159. <li>
  160. <a class="sc_btn Ss Block">搜索</a>
  161. </li>
  162. <!--<li>
  163. <a class="sc_btn Gj Block">高级搜索</a>
  164. </li>-->
  165. </ul>
  166. </div>
  167. </div>
  168. </div>
  169. <div style="width: 100%;padding: 10px;">
  170. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  171. <thead>
  172. <tr>
  173. <th data-field="CallNumber" data-align="center" data-formatter="Code">编号</th>
  174. <th data-field="CallNumber" data-align="center">电话号码</th>
  175. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  176. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  177. <!--<th data-field="DealType" data-formatter="dealType" data-align="center">是否回访</th>-->
  178. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  179. <th data-field="UserCode" data-align="center">坐席工号</th>
  180. <th data-field="UserName" data-align="center">坐席姓名</th>
  181. <th data-field="BeginTime" data-align="center">开始时间</th>
  182. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  183. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  184. <th data-field="TalkLongTime" data-align="center" data-formatter="ftime">通话时长</th>
  185. <th data-field="RingLongTime" data-align="center" data-formatter="ftime">振铃时长</th>
  186. <th data-field="LongTime" data-align="center" data-formatter="ftime">总时长</th>
  187. </tr>
  188. </thead>
  189. </table>
  190. <!--高级搜索框-->
  191. </div>
  192. </div>
  193. <!--下载框-->
  194. <div class="t-shade">
  195. <div class="shade_k">
  196. <div class="shade_title">
  197. <span>录音播放与下载<srong class="cknum"></srong></span>
  198. <span class="setwin"><a>x</a></span>
  199. </div>
  200. <div class="shade_content">
  201. <div class="Ly_box audiojs">
  202. </div>
  203. <div class="boxCon LY_box">
  204. </div>
  205. </div>
  206. </div>
  207. </div>
  208. <script>
  209. //返回首页
  210. $('#ReIndex').click(function(){
  211. top.home_index();
  212. })
  213. var stype = 1;
  214. var seatlist = [];
  215. $(document).ready(function () {
  216. laydate.skin('blue');
  217. laydate({
  218. elem: '#start',
  219. event: 'focus'
  220. });
  221. laydate({
  222. elem: '#end',
  223. event: 'focus'
  224. });
  225. /*获取选中行对象*/
  226. $('#list').on("click-row.bs.table", function (e, row, ele) {
  227. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  228. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  229. });
  230. $(".setwin").click(function () {
  231. $(".t-shade").removeClass("cx");
  232. $('audio')[0].pause();
  233. });
  234. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", { token: $.cookie("token") }, function (result) {
  235. if (result.state.toLowerCase() == "success") {
  236. seatlist = result.data;
  237. bindseat($("#seat"));
  238. }
  239. });
  240. //搜索
  241. $(".Ss").click(function () {
  242. stype = 1;
  243. initTable();
  244. });
  245. //高级搜索s
  246. $(".Gj").click(function () {
  247. var a = "WdatePicker()";
  248. layer.open({
  249. type: 1,
  250. title: '高级搜索',
  251. area: ['50%', '55%'], //宽高
  252. content: ' <div class="gjsu"><ul class="nav nav-tabs">' +
  253. '<li class="active"><a href="#">参数信息</a></li> ' +
  254. '</ul>' +
  255. '<ul>' +
  256. '<li>' +
  257. '<label for="">电话号码:</label>' +
  258. '<input type="text" id="ss_tel" class="photo"/>' +
  259. '</li>' +
  260. '<li>' +
  261. '<label for="">坐席工号:</label>' +
  262. '<select name="" id="ss_seat" class="selects usercode"></select>' +
  263. '</li>' +
  264. '<li>' +
  265. '<label for="">开始时间:</label>' +
  266. ' <input type="text" id="ss_kssj" class="photo"onClick="' + a + '"/>' +
  267. '</li>' +
  268. '<li>' +
  269. '<label for="">呼叫状态:</label>' +
  270. '<select id="ss_hjzt" class="selects callstate">' +
  271. '<option value="">全部</option>' +
  272. '<option value="0">未接通</option>' +
  273. '<option value="1">已接通</option>' +
  274. '<option value="2">黑名单拒接</option>' +
  275. '</select>' +
  276. '</li>' +
  277. '<li>' +
  278. '<label for="">结束时间:</label>' +
  279. '<input type="text" id="ss_jssj" class="photo" onClick="' + a + '"/>' +
  280. '</li>' +
  281. '<li>' +
  282. '<label for="">呼出方向:</label>' +
  283. '<select id="ss_hcfx" class=" selects calltype">' +
  284. '<option value="">全部</option>' +
  285. '<option value="0">呼入</option>' +
  286. '<option value="1">呼出</option>' +
  287. '</select>' +
  288. '</li>' +
  289. '</ul>' +
  290. '<div class=" add_time tc">' +
  291. '<button type="button" class="btn sc_btn Block " id="tc">保&nbsp;&nbsp;存</button>' +
  292. '</div>' +
  293. '</div>'
  294. });
  295. bindseat($("#ss_seat"));
  296. //获取通话记录列表
  297. $("#tc").click(function () {
  298. stype = 2;
  299. initTable();
  300. var index = layer.index; //获取当前弹层的索引号
  301. layer.close(index); //关闭当前弹层
  302. });
  303. });
  304. initTable();
  305. })
  306. function bindseat(obj) {
  307. obj.empty();
  308. obj.append('<option value="">全部</option>');
  309. $(seatlist).each(function (i, n) {
  310. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  311. })
  312. }
  313. function initTable() {
  314. //先销毁表格
  315. $('#list').bootstrapTable('destroy');
  316. //初始化表格,动态从服务器加载数据
  317. $("#list").bootstrapTable({
  318. method: "get", //使用get请求到服务器获取数据
  319. url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
  320. contentType: "application/x-www-form-urlencoded",striped: true, //表格显示条纹
  321. pagination: true, //启动分页
  322. pageSize: 10, //每页显示的记录数
  323. pageNumber: 1, //当前第几页
  324. pageList: [10, 20, 50, 100], //记录数可选列表
  325. search: false, //是否启用查询
  326. showColumns: false, //显示下拉框勾选要显示的列
  327. showRefresh: false, //显示刷新按钮
  328. sidePagination: "server", //表示服务端请求
  329. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  330. //设置为limit可以获取limit, offset, search, sort, order
  331. queryParamsType: "undefined",
  332. queryParams: function queryParams(params) { //设置查询参数
  333. var param = {
  334. page: params.pageNumber,
  335. pagesize: params.pageSize,
  336. token: $.cookie("token")
  337. };
  338. if (stype == '1') {
  339. param.usercode = $("#seat").val();
  340. param.phone = $("#tel").val();
  341. param.starttime = $("#start").val();
  342. param.endtime = $("#end").val();
  343. param.callstate= $("#ss_hjzt").val();
  344. param.calltype= $("#ss_hcfx").val();
  345. } else if (stype == '2') {
  346. param.usercode = $("#ss_seat").val();
  347. param.tel = $("#ss_tel").val();
  348. param.callstate = $("#ss_hjzt").val();
  349. param.calltype = $("#ss_hcfx").val();
  350. param.starttime = $("#ss_kssj").val();
  351. param.endtime = $("#ss_jssj").val();
  352. }
  353. return param;
  354. },
  355. onLoadSuccess: function () { //加载成功时执行
  356. //layer.msg("加载成功");
  357. },
  358. onLoadError: function () { //加载失败时执行
  359. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  360. }
  361. });
  362. }
  363. //音频
  364. function setCode(val) {
  365. if (val) {
  366. return '<div class="imgs">' +
  367. '<img src="../img/vice.png" alt="" onclick= ck(this) item="'+val + '" />' +
  368. '</div>';
  369. }
  370. else {
  371. return '';
  372. }
  373. }
  374. //编号
  375. function Code(val,row,index){
  376. return index+1;
  377. }
  378. //方向呼出
  379. function callType(val) {
  380. if (val == 0) {
  381. return '<div class="imgs">呼入</div>';
  382. } else {
  383. return '<div class="imgs">呼出</div>';
  384. }
  385. }
  386. function states(val) {
  387. if (val == 0) {
  388. return '<div class="imgs">未接通</div>';
  389. } else if(val==1) {
  390. return '<div class="imgs">已接通</div>';
  391. }
  392. else if (val == 2) {
  393. return '<div class="imgs">黑名单拒接</div>';
  394. }
  395. }
  396. ////回访
  397. //function dealType(val) {
  398. // if (val == 1) {
  399. // return '<div >已回访</div>';
  400. // } else {
  401. // return '';
  402. // }
  403. //}
  404. //处理
  405. function isDeal(val) {
  406. if (val == 0) {
  407. return '<div >未处理</div>';
  408. } else {
  409. return '<div >已处理</div>';
  410. }
  411. }
  412. //录音
  413. function ck(val) {
  414. var path = $(val).attr("item");
  415. $(".t-shade").addClass("cx");
  416. $(".Ly_box").empty();
  417. $(".LY_box").empty();
  418. $('<audio style="width:100%;"class=" " src="' + path + '" loop="loop" controls="controls"></audio>').appendTo(".Ly_box");
  419. var rl = $('#RoleCode', top.document).val();
  420. if (rl == "GLY" || rl == "ZXBZ") {
  421. $('<a href="' + path + '" class="sc_btn LY "download="' + path + '">下载录音</a>').appendTo(".LY_box");
  422. }
  423. }
  424. function ftime(val) {
  425. if (val) {
  426. return helper.DateFormat.getFormatTime(val);
  427. }
  428. else {
  429. return '';
  430. }
  431. }
  432. </script>
  433. </body>
  434. </html>