12345市长热线标准版-前端

CallRecord.html 15KB

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