12345市长热线标准版-前端

VoiceMail.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  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. <script src="../Script/Common/huayi.load.js"></script>
  9. <script src="../Script/Common/huayi.config.js"></script>
  10. <link href="../css/Table/table1.css" rel="stylesheet" />
  11. <script src="../css/laydate/laydate.js"></script>
  12. </head>
  13. <body class="gray-bg">
  14. <div class="wrapper wrapper-content animated fadeInRight">
  15. <div class="daoHang clearfix">
  16. <div class="dhLeft">
  17. <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>&gt;<a href="javaScript:;">话务管理</a>&gt;<a href="" class="nowPosition">语音信箱</a></sapn>
  18. </div>
  19. <div class="dhRight"><a href="" title="刷新"><i class="fa fa-refresh"></i></a></div>
  20. </div>
  21. <div class="th-box">
  22. <div class="th-bar">
  23. <!--<a class="sc_btn deal max-right">处理</a>-->
  24. <a class="sc_btn remove">删除</a>
  25. <div class="seach-box fr">
  26. <ul>
  27. <li>电话号码:<input class="photo x-color" type="text" id="tel" /></li>
  28. <li>留言时间:<input class="photo x-color laydate-icon" type="text" id="lysj" /></li>
  29. <li>处理时间:<input class="laydate-icon photo x-color " type="text" id="clsj" /></li>
  30. <li>
  31. 处理结果:
  32. <select name="" id="cljg" class="x-color select">
  33. <option value="-1">全部</option>
  34. <option value="0">未处理</option>
  35. <option value="1">已处理</option>
  36. </select>
  37. </li>
  38. <li>
  39. <a class="sc_btn seach">搜索</a>
  40. </li>
  41. </ul>
  42. </div>
  43. </div>
  44. </div>
  45. <div style="width: 100%;padding: 10px;">
  46. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  47. <thead>
  48. <tr>
  49. <th data-field="state" data-checkbox="true"></th>
  50. <!--<th data-field="F_CallId" data-formatter="Code" data-align="center">编号</th>-->
  51. <th data-field="F_Phone" data-align="center">来电号码</th>
  52. <th data-field="F_RecFileUrl" data-align="center" data-formatter="setCode" data-align="center">留言</th>
  53. <th data-field="F_StartTime" data-align="center">开始时间</th>
  54. <th data-field="F_EndTime" data-align="center">结束时间</th>
  55. <th data-field="F_LongTime" data-align="center" data-formatter="ftime">时长</th>
  56. <!--<th data-field="F_LeaveTime" data-align="center">留言时间</th>-->
  57. <!--<th data-field="F_UserName" data-align="center">处理人</th>-->
  58. <th data-field="F_UserCode" data-align="center">处理人</th>
  59. <th data-field="F_Status" data-align="center" data-formatter="clzt">处理状态</th>
  60. <th data-field="F_DealTime" data-align="center">处理时间</th>
  61. <th data-field="WorkOrderId" data-align="center" data-formatter="djbh">登记编号</th>
  62. <th data-field="F_Id" data-formatter="add">操作</th>
  63. </tr>
  64. </thead>
  65. </table>
  66. </div>
  67. </div>
  68. <!--下载框-->
  69. <div class="t-shade">
  70. <div class="shade_k">
  71. <div class="shade_title">
  72. <span>录音播放与下载<srong class="cknum"></srong></span>
  73. <span class="setwin"><a>x</a></span>
  74. </div>
  75. <div class="shade_content">
  76. <div class="Ly_box audiojs">
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. <script>
  82. $(document).ready(function () {
  83. //返回首页
  84. $('#ReIndex').click(function(){
  85. top.home_index();
  86. })
  87. /*日期选择*/
  88. laydate.skin('blue');
  89. //留言时间
  90. laydate({
  91. elem: '#lysj',
  92. event: 'focus',
  93. festival: true, //显示节日
  94. });
  95. //处理时间
  96. laydate({
  97. elem: '#clsj',
  98. festival: true, //显示节日
  99. event: 'focus'
  100. });
  101. /*查询*/
  102. $(".seach").click(function () {
  103. initTable();
  104. });
  105. $(".setwin").click(function () {
  106. $(".t-shade").removeClass("cx");
  107. $('audio')[0].pause();
  108. });
  109. /*删除内容*/
  110. $(".remove").click(function () {
  111. var ids = $.map($('#list').bootstrapTable('getSelections'),
  112. function (row) {
  113. return row.F_Id;
  114. });
  115. /*判断长度*/
  116. if (ids.length <= 0) {
  117. layer.confirm('没有可删除的选项?', {
  118. btn: ['确定'] //按钮
  119. });
  120. return;
  121. }
  122. remove();
  123. });
  124. /*处理内容*/
  125. $(".deal").click(function () {
  126. var ids = $.map($('#list').bootstrapTable('getSelections'),
  127. function (row) {
  128. return row.F_Id;
  129. });
  130. /*判断长度*/
  131. if (ids.length <= 0) {
  132. layer.confirm('没有可处理的选项?', {
  133. btn: ['确定'] //按钮
  134. });
  135. return;
  136. }
  137. deal();
  138. });
  139. initTable();
  140. })
  141. function initTable() {
  142. //先销毁表格
  143. $('#list').bootstrapTable('destroy');
  144. //初始化表格,动态从服务器加载数据
  145. $("#list").bootstrapTable({
  146. method: "get", //使用get请求到服务器获取数据
  147. url: huayi.config.callcenter_url + "Callleave/GetList", //获取数据的Servlet地址
  148. contentType: "application/x-www-form-urlencoded",striped: true, //表格显示条纹
  149. pagination: true, //启动分页
  150. pageSize: 10, //每页显示的记录数
  151. pageNumber: 1, //当前第几页
  152. pageList: [10, 20, 50, 100], //记录数可选列表
  153. search: false, //是否启用查询
  154. showColumns: false, //显示下拉框勾选要显示的列
  155. showRefresh: false, //显示刷新按钮
  156. sidePagination: "server", //表示服务端请求
  157. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  158. //设置为limit可以获取limit, offset, search, sort, order
  159. queryParamsType: "undefined",
  160. queryParams: function queryParams(params) { //设置查询参数
  161. var param = {
  162. page: params.pageNumber,
  163. pagesize: params.pageSize,
  164. tel: $("#tel").val(),
  165. settime: $("#lysj").val(),
  166. removetime: $("#clsj").val(),
  167. status: $("#cljg").val(),
  168. token: $.cookie("token")
  169. };
  170. return param;
  171. },
  172. onLoadSuccess: function () { //加载成功时执行
  173. //layer.msg("加载成功");
  174. },
  175. onLoadError: function () { //加载失败时执行
  176. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  177. }
  178. });
  179. }
  180. function clzt(val) {
  181. var str = '';
  182. switch (val + '') {
  183. case '0': str = "未处理"; break;
  184. case '1': str = "已处理"; break;
  185. case '2': str = "注销"; break;
  186. }
  187. return str;
  188. }
  189. //音频
  190. function setCode(val) {
  191. if (val) {
  192. return '<div class="imgs">' +
  193. '<img src="../img/vice.png" alt="" onclick= ck(this) item="' + val + '" />' +
  194. '</div>';
  195. }
  196. else {
  197. return '';
  198. }
  199. }
  200. //编号
  201. function Code(val, row, index) {
  202. return index + 1;
  203. }
  204. //录音
  205. function ck(val) {
  206. var path = $(val).attr("item");
  207. $(".t-shade").addClass("cx");
  208. $(".Ly_box").empty();
  209. $('<audio class=" " src="' + path + '" loop="loop" controls="controls"></audio>').appendTo(".Ly_box");
  210. }
  211. /*删除提示*/
  212. function remove() {
  213. layer.confirm('确定删除当前记录?', {
  214. btn: ['是', '否'] //按钮
  215. }, function () {
  216. /*执行删除*/
  217. var ids = $.map($('#list').bootstrapTable('getSelections'),
  218. function (row) {
  219. return row.F_Id;
  220. });
  221. /*发送请求*/
  222. $.post(huayi.config.callcenter_url + "Callleave/DelLeaveRecord", { ids: ids, token: $.cookie("token") }, function (result) {
  223. result = JSON.parse(result);
  224. if (result.state.toLowerCase() == "success") {
  225. layer.msg("删除成功");
  226. initTable();
  227. }
  228. })
  229. });
  230. }
  231. /*处理提示*/
  232. function deal() {
  233. layer.confirm('确定处理当前记录?', {
  234. btn: ['是', '否'] //按钮
  235. }, function () {
  236. /*执行删除*/
  237. var ids = $.map($('#list').bootstrapTable('getSelections'),
  238. function (row) {
  239. return row.F_Id;
  240. });
  241. /*发送请求*/
  242. $.post(huayi.config.callcenter_url + "Callleave/OptLeaveRecord", { ids: ids, token: $.cookie("token") }, function (result) {
  243. result = JSON.parse(result);
  244. if (result.state.toLowerCase() == "success") {
  245. layer.msg("处理成功");
  246. initTable();
  247. }
  248. })
  249. });
  250. }
  251. //查看
  252. function djbh(val, row) {
  253. if (row.F_Status == "1") {
  254. return '<div class="imgs">' +
  255. '<a class="xg" onclick="ckxq(' + val + ')"> ' + val + ' </a>' +
  256. '</div>';
  257. }
  258. else {
  259. return '';
  260. }
  261. }
  262. //查看详情
  263. function ckxq(str) {
  264. layer.open({
  265. type: 2,
  266. content: "../WorkOrder/WorkOrderDetail.html?wid=" + str, //iframe的url,no代表不显示滚动条
  267. title: '工单详情',
  268. area: ['85%', '80%'], //宽高
  269. });
  270. }
  271. //操作
  272. function add(val, row) {
  273. if (row.F_Status == "0") {
  274. return '<div class="imgs">' +
  275. '<a class="xg" onclick="AddOrder(' + val + ')"> 新增工单 </a>' +
  276. '</div>';
  277. }
  278. else {
  279. return '';
  280. }
  281. }
  282. //新增工单
  283. function AddOrder(stg) {
  284. layer.open({
  285. type: 2,
  286. content: "AddOrder.html?lyid=" + stg, //iframe的url,no代表不显示滚动条
  287. title: '新增工单',
  288. area: ['85%', '80%'], //宽高
  289. });
  290. }
  291. function ftime(val) {
  292. if (val) {
  293. return helper.DateFormat.getFormatTime(val);
  294. }
  295. else {
  296. return '-';
  297. }
  298. }
  299. </script>
  300. </body>
  301. </html>