UU跑腿标准版

callrecordlist.aspx 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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 callreason(callid)
  43. {
  44. OpenWindowShow1('callinreasonedit.aspx?callid=' + callid, '来电原因点选', 500, 800);
  45. }
  46. function LoadList() {
  47. gridlist = $("#divDataList").ligerGrid({
  48. checkbox: false,
  49. height: '100%',
  50. columns: [
  51. { display: '回拨', name: '_callnumber', width: 40, frozen: true, render: function (rowdata, rowindex, value) {
  52. if (value == "") {
  53. return;
  54. }
  55. else {
  56. return "<img src=\"../images/phone3.png\" style=\"cursor:hand; width:24px;\" title=\"拨打" + value + "\" onclick=\"CallOut('" + encodeURI(value) + "');\" />";
  57. }
  58. }
  59. },
  60. { display: '电话号码', name: '_callnumber', width: 100, frozen: true },
  61. { display: '录音', name: '_filepath', width: 40, frozen: true, render: function (rowdata, rowindex, value) {
  62. if (value == "") {
  63. return;
  64. }
  65. else {
  66. return "<img src=\"../images/notice.png\" style=\"cursor:hand;\" onclick=\"Player('" + encodeURI(value) + "');\" />";
  67. }
  68. }
  69. },
  70. { display: '呼叫方向', name: '_calltype', width: 80, frozen: true, render: function (rowdata, rowindex, value) {
  71. if (value == "0")
  72. return "呼入";
  73. else
  74. return "呼出";
  75. }
  76. },
  77. { display: '是否回访', name: '_dealtype', width: 80, frozen: true, render: function (rowdata, rowindex, value) {
  78. if (value == "7")
  79. return "回访";
  80. else
  81. return "";
  82. }
  83. },
  84. { display: '呼叫状态', name: '_callstate', width: 80, frozen: true, render: function (rowdata, rowindex, value) {
  85. if (value == "0")
  86. return "未接通";
  87. else
  88. return "已接通";
  89. }
  90. },
  91. { display: '是否处理', name: '_isdeal', width: 80, render: function (rowdata, rowindex, value) {
  92. if (value == "0")
  93. return "未处理";
  94. else if (value == "1")
  95. return "已处理";
  96. else
  97. return "注销";
  98. }
  99. }, { display: '坐席工号', name: '_usercode', width: 80 },
  100. { display: '坐席姓名', name: '_username', width: 80 },
  101. { display: '开始时间', name: '_begintime', width: 130, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
  102. // { display: 'IVR开始时间', name: '_ivrstarttime', width: 130, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
  103. // { display: 'IVR结束时间', name: '_ivrendtime', width: 130, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
  104. { display: '通话开始时间', name: '_talkstarttime', width: 130, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
  105. { display: '通话结束时间', name: '_talkendtime', width: 130, type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
  106. { display: '通话时长(s)', name: '_talklongtime', width: 80 },
  107. //{ display: '按键', name: '_businesstype', width: 50 },
  108. {
  109. display: '来电原因', name: '_f_zxreasonid', width: 80, render: function (rowdata, rowindex, value) {
  110. var h = ""
  111. if (!rowdata._editing) {
  112. if (rowdata._calltype == 0 && rowdata._callstate == 1) {
  113. if (comdate(rowdata._begintime)) {
  114. if (value > 0)
  115. h += "<a href='javascript:onclick=callreason(" + rowdata._callrecordsid + ")'>重新编辑</a> ";
  116. else
  117. h += "<a href='javascript:onclick=callreason(" + rowdata._callrecordsid + ")'>编辑</a> ";
  118. }
  119. }
  120. }
  121. return h;
  122. }
  123. }
  124. ], url: 'ajax/telrecords.ashx?action=getlist' + strWhere, pageSize: 20, pageSizeOptions: [10, 20, 50], rownumbers: true
  125. });
  126. gridlist.changePage('first');
  127. $("#pageloading").hide();
  128. }
  129. function comdate(value)
  130. {
  131. var date = new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
  132. var today = new Date();
  133. if (date.getFullYear() == today.getFullYear() && date.getMonth() == today.getMonth() && date.getDate() == today.getDate()) {
  134. return true;
  135. }
  136. else {
  137. return false;
  138. }
  139. }
  140. function formatDateTime(value) {
  141. if (value != null) {
  142. var date = new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
  143. var result = date.getFullYear() + "-" + (date.getMonth() + 1 < 10 ? "0"
  144. + (date.getMonth() + 1) : date.getMonth() + 1) + "-"
  145. + (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " "
  146. + (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":"
  147. + (date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) + ":"
  148. + (date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds());
  149. return result;
  150. }
  151. return value;
  152. }
  153. function deleteRow() {
  154. g.deleteSelectedRow();
  155. }
  156. function Delete() {
  157. try {
  158. //获取选择的行
  159. var rows = gridlist.getSelectedRows();
  160. if (rows.length > 0) {
  161. $.ligerDialog.confirm('确定要批量删除选择的记录吗?', function (yes) {
  162. if (yes) {
  163. try {
  164. var arr = new Array();
  165. var i = 0;
  166. for (var i = 0; i < rows.length; i++) {
  167. arr[i] = rows[i]._callrecordsid;
  168. }
  169. $.post("ajax/telrecords.ashx?action=deletelist&arrid=" + arr.toString(), function (data) {
  170. if (data == "success") {
  171. $.ligerDialog.success('删除成功');
  172. LoadList();
  173. }
  174. else {
  175. $.ligerDialog.error('删除失败');
  176. }
  177. });
  178. }
  179. catch (e) {
  180. alert(e.Message);
  181. }
  182. }
  183. else {
  184. }
  185. });
  186. }
  187. else {
  188. $.ligerDialog.error('没有选择要删除的行');
  189. }
  190. }
  191. catch (e) {
  192. $.ligerDialog.error(e.Message);
  193. }
  194. }
  195. function cleartextbox() {
  196. document.getElementById("txtTelphone").value = "";
  197. }
  198. function getparams(params) {
  199. strWhere = "";
  200. if (params != "") {
  201. strWhere += params;
  202. }
  203. LoadList();
  204. }
  205. function getsql() {
  206. strWhere = "";
  207. var phone = document.getElementById("txtTelphone").value;
  208. var account = document.getElementById("ddlAccount").value;
  209. if (phone != "") {
  210. strWhere += "&phone=" + phone + "";
  211. }
  212. if (account != "") {
  213. strWhere += "&usercode=" + account + "";
  214. }
  215. LoadList();
  216. }
  217. function HighSearch() {
  218. $.ligerDialog.open({
  219. url: 'recordhighsearch.aspx',
  220. title: '高级搜索',
  221. height: 300,
  222. width: 600,
  223. isResize: true
  224. });
  225. }
  226. document.onkeydown = function (event) {
  227. var e = event || window.event || arguments.callee.caller.arguments[0];
  228. if (e && e.keyCode == 13) {
  229. getsql();
  230. }
  231. };
  232. </script>
  233. </head>
  234. <body style="margin: 0px; padding: 0px; overflow: hidden;">
  235. <form id="form1" runat="server">
  236. <div class="l-loading" style="display: block" id="pageloading">
  237. </div>
  238. <div class="tools_box">
  239. <div class="tools_bar">
  240. <%--<a class="tools_btn" href="#" onclick="Delete();"><span>
  241. <b class="delete">批量删除</b></span> </a>--%>
  242. <div class="search_box">
  243. 电话号码:<asp:TextBox ID="txtTelphone" runat="server" CssClass="txtInput" Width="80px"></asp:TextBox>&nbsp;&nbsp;
  244. 坐席: <asp:DropDownList ID="ddlAccount" runat="server" CssClass="selectBox" Width="70px"> </asp:DropDownList>&nbsp;&nbsp;
  245. <input id="btnSearch" type="button" value="搜 索" class="btnSearch" onclick="getsql();" />&nbsp;&nbsp;
  246. <input id="btnHighSearch" type="button" value="高级搜索" class="btnSearch" onclick="HighSearch();" />
  247. </div>
  248. </div>
  249. </div>
  250. <div id="divDataList">
  251. </div>
  252. </form>
  253. </body>
  254. </html>