市长热线演示版

callrecordlist.aspx 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="callrecordlist.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.telmanage.callrecordlist" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head id="Head1" runat="server">
  5. <title></title>
  6. <script src="../scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
  7. <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  8. <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  9. <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
  10. <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
  11. <link href="../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
  12. <link href="../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
  13. <script src="../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
  14. <script src="../scripts/CustomersData.js" type="text/javascript"></script>
  15. <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
  16. <link href="../images/style.css" rel="stylesheet" type="text/css" />
  17. <script type="text/javascript">
  18. var strWhere = "";
  19. function OpenWindowShow1(Url, Title, Width, Height) {
  20. $.ligerDialog.open({ title: Title,isHidden:false, url: Url, height: Height, width: Width, isResize: true, modal: true, buttons: [
  21. { text: '关闭', onclick: function (item, dialog) { dialog.close(); } }
  22. ], isResize: true
  23. });
  24. }
  25. function Player(path) {
  26. OpenWindowShow1('voiceplay.aspx?path='+path, '录音播放与下载', 600, 300);
  27. //voiceplay.aspx
  28. //var height = screen.availHeight / 2;
  29. //var width = screen.availWidth / 2 - 50;
  30. //window.showModalDialog(path, "Player", "dialogWidth:310px;dialogHeight:100px;dialogLeft:" + width + "px;dialogTop:" + height + "px;center:yes;help:no;resizable:no;status:no;scrollbars:no;");
  31. }
  32. function itemclick(item) {
  33. alert(item.text);
  34. }
  35. var gridlist;
  36. $(function () {
  37. LoadList();
  38. });
  39. function CallOut(phone) {
  40. parent.PhoneCallOut(1,phone);
  41. }
  42. function LoadList() {
  43. gridlist = $("#divDataList").ligerGrid({
  44. checkbox: true,
  45. height: '100%',
  46. columns: [
  47. { display: '回拨', name: '_callnumber', width: 40, frozen: true, render: function (rowdata, rowindex, value) {
  48. if (value == "") {
  49. return;
  50. }
  51. else {
  52. return "<img src=\"../images/phone3.png\" style=\"cursor:hand; width:24px;\" title=\"拨打" + value + "\" onclick=\"CallOut('" + encodeURI(value) + "');\" />";
  53. }
  54. }
  55. },
  56. { display: '电话号码', name: '_callnumber', width: 100, frozen: true },
  57. { display: '录音', name: '_filepath', width: 40, frozen: true, render: function (rowdata, rowindex, value) {
  58. if (value == "") {
  59. return;
  60. }
  61. else {
  62. return "<img src=\"../images/notice.png\" style=\"cursor:hand;\" onclick=\"Player('" + encodeURI(value) + "');\" />";
  63. }
  64. }
  65. },
  66. { display: '呼叫方向', name: '_calltype', width: 80, frozen: true, render: function (rowdata, rowindex, value) {
  67. if (value == "0")
  68. return "呼入";
  69. else
  70. return "呼出";
  71. }
  72. },
  73. { display: '是否回访', name: '_dealtype', width: 80, frozen: true, render: function (rowdata, rowindex, value) {
  74. if (value == "7")
  75. return "回访";
  76. else
  77. return "";
  78. }
  79. },
  80. { display: '呼叫状态', name: '_callstate', width: 80, frozen: true, render: function (rowdata, rowindex, value) {
  81. if (value == "0")
  82. return "未接通";
  83. else
  84. return "已接通";
  85. }
  86. },
  87. { display: '是否处理', name: '_isdeal', width: 80, render: function (rowdata, rowindex, value) {
  88. if (value == "0")
  89. return "未处理";
  90. else if (value == "1")
  91. return "已处理";
  92. else
  93. return "注销";
  94. }
  95. }, { display: '坐席工号', name: '_usercode', width: 80 },
  96. { display: '坐席姓名', name: '_username', width: 80 },
  97. // { display: 'IVR开始时间', name: '_ivrstarttime', width: 130, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
  98. // { display: 'IVR结束时间', name: '_ivrendtime', width: 130, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
  99. { display: '通话开始时间', name: '_talkstarttime', width: 130, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
  100. { display: '通话结束时间', name: '_talkendtime', width: 130, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
  101. { display: '通话时长(s)', name: '_talklongtime', width: 80 },
  102. { display: '按键', name: '_businesstype', width: 50}], url: 'ajax/telrecords.ashx?action=getlist' + strWhere, pageSize: 20, pageSizeOptions: [10, 20, 50], rownumbers: true
  103. });
  104. gridlist.changePage('first');
  105. $("#pageloading").hide();
  106. }
  107. function formatDateTime(value, rowData, rowIndex) {
  108. if (value != null) {
  109. var date = new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
  110. var result = date.getFullYear() + "-" + (date.getMonth() + 1 < 10 ? "0"
  111. + (date.getMonth() + 1) : date.getMonth() + 1) + "-"
  112. + (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " "
  113. + (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":"
  114. + (date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) + ":"
  115. + (date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds());
  116. return result;
  117. }
  118. return value;
  119. }
  120. function deleteRow() {
  121. g.deleteSelectedRow();
  122. }
  123. function Delete() {
  124. try {
  125. //获取选择的行
  126. var rows = gridlist.getSelectedRows();
  127. if (rows.length > 0) {
  128. $.ligerDialog.confirm('确定要批量删除选择的记录吗?', function (yes) {
  129. if (yes) {
  130. try {
  131. var arr = new Array();
  132. var i = 0;
  133. for (var i = 0; i < rows.length; i++) {
  134. arr[i] = rows[i]._callrecordsid;
  135. }
  136. $.post("ajax/telrecords.ashx?action=deletelist&arrid=" + arr.toString(), function (data) {
  137. if (data == "success") {
  138. $.ligerDialog.success('删除成功');
  139. LoadList();
  140. }
  141. else {
  142. $.ligerDialog.error('删除失败');
  143. }
  144. });
  145. }
  146. catch (e) {
  147. alert(e.Message);
  148. }
  149. }
  150. else {
  151. }
  152. });
  153. }
  154. else {
  155. $.ligerDialog.error('没有选择要删除的行');
  156. }
  157. }
  158. catch (e) {
  159. $.ligerDialog.error(e.Message);
  160. }
  161. }
  162. function cleartextbox() {
  163. document.getElementById("txtTelphone").value = "";
  164. document.getElementById("txtstate").value = "";
  165. document.getElementById("txtzuowei").value = "";
  166. document.getElementById("txtstarttime").value = "";
  167. document.getElementById("txtendtime").value = "";
  168. }
  169. function getparams(params) {
  170. strWhere = "";
  171. if (params != "") {
  172. strWhere += params;
  173. }
  174. LoadList();
  175. }
  176. function getsql() {
  177. strWhere = "";
  178. var phone = document.getElementById("txtTelphone").value;
  179. var account = document.getElementById("ddlAccount").value;
  180. if (phone != "") {
  181. strWhere += "&phone=" + phone + "";
  182. }
  183. if (account != "") {
  184. strWhere += "&usercode=" + account + "";
  185. }
  186. LoadList();
  187. }
  188. function HighSearch() {
  189. $.ligerDialog.open({
  190. url: 'recordhighsearch.aspx',
  191. title: '高级搜索',
  192. height: 300,
  193. width: 600,
  194. isResize: true
  195. });
  196. }
  197. document.onkeydown = function (event) {
  198. var e = event || window.event || arguments.callee.caller.arguments[0];
  199. if (e && e.keyCode == 13) {
  200. getsql();
  201. }
  202. };
  203. </script>
  204. </head>
  205. <body style="margin: 0px; padding: 0px; overflow: hidden;">
  206. <form id="form1" runat="server">
  207. <div class="l-loading" style="display: block" id="pageloading">
  208. </div>
  209. <div class="tools_box">
  210. <div class="tools_bar">
  211. <a class="tools_btn" href="#" onclick="Delete();"><span>
  212. <b class="delete">批量删除</b></span> </a>
  213. <div class="search_box">
  214. 电话号码:<asp:TextBox ID="txtTelphone" runat="server" CssClass="txtInput" Width="80px"></asp:TextBox>&nbsp;&nbsp;
  215. 坐席: <asp:DropDownList ID="ddlAccount" runat="server" CssClass="selectBox" Width="70px"> </asp:DropDownList>&nbsp;&nbsp;
  216. <input id="btnSearch" type="button" value="搜 索" class="btnSearch" onclick="getsql();" />&nbsp;&nbsp;
  217. <input id="btnHighSearch" type="button" value="高级搜索" class="btnSearch" onclick="HighSearch();" />
  218. </div>
  219. </div>
  220. </div>
  221. <div id="divDataList">
  222. </div>
  223. </form>
  224. </body>
  225. </html>