济源12345的前端

CallRecordWJ.html 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  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. </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. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  120. </div>
  121. </div>
  122. <div class="th-box">
  123. <div class="th-bar">
  124. <div class="seach-box fr">
  125. <ul>
  126. <li>开始时间:<input id="start" class="photo x-color laydate-icon" type="text" /></li>
  127. <li>结束时间:<input id="end" class="photo x-color laydate-icon" type="text" /></li>
  128. <li>电话号码:<input id="tel" class="photo x-color" type="text" /></li>
  129. <li>
  130. 是否回复:
  131. <select id="ss_ishf" class="selects callstate">
  132. <option value="">全部</option>
  133. <option value="0">未回复</option>
  134. <option value="1">已回复</option>
  135. </select>
  136. </li>
  137. <li>
  138. 是否回复成功:
  139. <select id="ss_ishfsuc" class="selects calltype">
  140. <option value="">全部</option>
  141. <option value="0">未成功</option>
  142. <option value="1">已成功</option>
  143. </select>
  144. </li>
  145. <li>
  146. <a class="sc_btn Ss Block">搜索</a>
  147. </li>
  148. </ul>
  149. </div>
  150. </div>
  151. </div>
  152. <div style="width: 100%;padding: 10px;">
  153. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  154. <thead>
  155. <tr>
  156. <th data-field="CallNumber" data-align="center" data-formatter="Code">编号</th>
  157. <th data-field="BeginTime" data-align="center">呼叫时间</th>
  158. <th data-field="CallNumber" data-align="center">电话号码</th>
  159. <th data-field="LongTime" data-align="center" data-formatter="ftime">呼叫时长</th>
  160. <th data-field="UserCode" data-align="center" data-formatter="fusercode">坐席工号</th>
  161. <th data-field="F_wjishf" data-formatter="fishf" data-align="center">是否回复</th>
  162. <th data-field="F_wjishfSuccess" data-formatter="fishfsuc" data-align="center">是否成功</th>
  163. <th data-field="F_wjhfUser" data-align="center">回复人</th>
  164. <th data-field="F_wjhfRemark" data-align="center">备注</th>
  165. <th data-field="CallRecordsId" data-formatter="Dispose" data-align="center">操作</th>
  166. </tr>
  167. </thead>
  168. </table>
  169. </div>
  170. </div>
  171. <script src="../js/guid.js"></script>
  172. <script>
  173. var stype = 1;
  174. $(document).ready(function () {
  175. laydate.skin('blue');
  176. laydate({
  177. elem: '#start',
  178. event: 'focus'
  179. });
  180. laydate({
  181. elem: '#end',
  182. event: 'focus'
  183. });
  184. /*获取选中行对象*/
  185. $('#list').on("click-row.bs.table", function (e, row, ele) {
  186. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  187. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  188. });
  189. //搜索
  190. $(".Ss").click(function () {
  191. initTable();
  192. });
  193. initTable();
  194. })
  195. function initTable() {
  196. //先销毁表格
  197. $('#list').bootstrapTable('destroy');
  198. //初始化表格,动态从服务器加载数据
  199. $("#list").bootstrapTable({
  200. method: "get", //使用get请求到服务器获取数据
  201. url: huayi.config.callcenter_url + "Callrecords/GetListWJ", //获取数据的Servlet地址
  202. contentType: "application/x-www-form-urlencoded",striped: true, //表格显示条纹
  203. pagination: true, //启动分页
  204. pageSize: 10, //每页显示的记录数
  205. pageNumber: 1, //当前第几页
  206. pageList: [10, 20, 50, 100], //记录数可选列表
  207. search: false, //是否启用查询
  208. showColumns: false, //显示下拉框勾选要显示的列
  209. showRefresh: false, //显示刷新按钮
  210. sidePagination: "server", //表示服务端请求
  211. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  212. //设置为limit可以获取limit, offset, search, sort, order
  213. queryParamsType: "undefined",
  214. queryParams: function queryParams(params) { //设置查询参数
  215. var param = {
  216. page: params.pageNumber,
  217. pagesize: params.pageSize,
  218. token: $.cookie("token")
  219. };
  220. param.phone = $("#tel").val();
  221. param.starttime = $("#start").val();
  222. param.endtime = $("#end").val();
  223. param.ishf = $("#ss_ishf").val();
  224. param.ishfsuc = $("#ss_ishfsuc").val();
  225. return param;
  226. },
  227. onLoadSuccess: function () { //加载成功时执行
  228. //layer.msg("加载成功");
  229. },
  230. onLoadError: function () { //加载失败时执行
  231. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  232. }
  233. });
  234. }
  235. //编号
  236. function Code(val,row,index){
  237. return index+1;
  238. }
  239. //操作
  240. function Dispose(val, row) {
  241. if (val == 1)
  242. return '';
  243. else
  244. return "<a onclick='calloutopt(" + row.CallNumber + "," + row.CallRecordsId + ")' href='javascript:;'>回复</a>";
  245. }
  246. //是否回复
  247. function fishf(val)
  248. {
  249. if (val == 1) {
  250. return '<div class="imgs">已回复</div>';
  251. } else {
  252. return '<div class="imgs">未回复</div>';
  253. }
  254. }
  255. //是否回复成功
  256. function fishfsuc(val) {
  257. if (val == 1) {
  258. return '<div class="imgs">回复成功</div>';
  259. } else {
  260. return '';
  261. }
  262. }
  263. //被叫号码
  264. function fusercode(val)
  265. {
  266. if (val)
  267. return val;
  268. else
  269. return 'IVR';
  270. }
  271. //时间
  272. function ftime(val) {
  273. if (val) {
  274. return helper.DateFormat.getFormatTime(val);
  275. }
  276. else {
  277. return '';
  278. }
  279. }
  280. //外呼号码
  281. function calloutopt(telphone, cid) {
  282. $.getJSON(huayi.config.callcenter_url + 'UserAccount/GetNowUser', {
  283. "token": $.cookie("token")
  284. }, function (result) {
  285. if (result.state.toLowerCase() == "success") {
  286. if (result.data.user.F_SeatFlag) {//判断是否话务人员
  287. if ($.cookie("fj")) { //判断是否登录分机号
  288. event.stopPropagation();
  289. console.log(telphone);
  290. console.log(cid);
  291. if (telphone) {
  292. $.ajax({
  293. type: "get",
  294. url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
  295. async: true,
  296. dataType: 'json',
  297. data: {
  298. token: $.cookie("token"),
  299. phone: telphone
  300. },
  301. success: function (result) {
  302. if (result.state.toLowerCase() == "success") {
  303. var guid = uuid();
  304. top.obj.Type = "MakeCall";
  305. console.log(result.data.phone);
  306. top.obj.DestinationNumber = result.data.phone;
  307. top.obj.Header = result.data.fix;
  308. top.obj.TaskType = "1"; //0:拨号外呼;1:未接来电外呼;2:回访外呼
  309. top.obj.TaskPhoneID = cid; //回访的通话记录ID
  310. top.obj.TaskID = guid; //回访记录编号
  311. top.Send();
  312. }
  313. }
  314. });
  315. }
  316. }
  317. else
  318. layer.msg("未绑定分机号,不能操作回拨");
  319. }
  320. else
  321. layer.msg("非话务人员登录,不能操作回拨");
  322. }
  323. });
  324. }
  325. </script>
  326. </body>
  327. </html>