Bez popisu

CallRecord.html 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  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. <script src="../Script/Common/huayi.load.js"></script>
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <link rel="stylesheet" href="../css/bootstrap-select.css" />
  10. <link rel="stylesheet" href="../css/Table/table1.css" />
  11. <link rel="stylesheet" href="../css/init.css" />
  12. <style>
  13. body {
  14. font-family: "微软雅黑";
  15. font-size: 14px;
  16. }
  17. /* ul li {
  18. list-style: none;
  19. float: left;
  20. } */
  21. .fr {
  22. float: right;
  23. }
  24. .fl {
  25. float: right;
  26. }
  27. /*标头*/
  28. .th-box {
  29. width: 100%;
  30. padding: 5px;
  31. border-bottom: 1px solid #e7eaec;
  32. }
  33. .sc_btn {
  34. width: 100px;
  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. margin-top: 5px;
  48. text-align: center;
  49. }
  50. .photo {
  51. /*background-color: #FFF;
  52. background-image: none;*/
  53. border: 1px solid #e5e6e7;
  54. border-radius: 1px;
  55. color: inherit;
  56. padding: 6px 12px;
  57. }
  58. .selects {
  59. background-color: #FFF;
  60. background-image: none;
  61. border: 1px solid #e5e6e7;
  62. border-radius: 1px;
  63. color: inherit;
  64. padding: 6px 12px;
  65. }
  66. #Select:focus {
  67. outline: none;
  68. border-color: #00BFFF;
  69. }
  70. input:focus {
  71. outline: none;
  72. border-color: #00BFFF;
  73. }
  74. .spiner-example {
  75. position: absolute;
  76. top: 50%;
  77. left: 50%;
  78. z-index: 111;
  79. margin-left: -85px;
  80. margin-top: -100px;
  81. display: none;
  82. }
  83. .sk-spinner-three-bounce {
  84. width: 170px !important;
  85. }
  86. .sk-spinner p {
  87. display: inline-block;
  88. font-size: 18px;
  89. margin-left: 10px;
  90. }
  91. .gjsu ul {
  92. overflow: hidden;
  93. }
  94. .gjsu ul li {
  95. width: 50%;
  96. margin-bottom: 5px;
  97. padding-top: 10px;
  98. }
  99. .selects {
  100. width: 105px;
  101. }
  102. .tc {
  103. margin-top: 30px;
  104. text-align: center;
  105. }
  106. #sqzx th {
  107. padding: 5px 8px 5px 0;
  108. text-align: center;
  109. width: 6%;
  110. }
  111. #sqzx td {
  112. padding: 6px 0 5px 10px;
  113. width: 18%;
  114. }
  115. .nameJustified {
  116. width: 5em;
  117. display: inline-block;
  118. text-align: justify;
  119. text-align-last: justify;
  120. }
  121. .dropdown-menu li {
  122. width: 100%;
  123. }
  124. </style>
  125. </head>
  126. <body class="gray-bg">
  127. <div class="wrapper wrapper-content animated fadeInRight">
  128. <div class="daoHang clearfix">
  129. <div class="dhLeft">
  130. <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>&gt;<a
  131. href="javaScript:;">话务管理</a>&gt;<a href="" class="nowPosition">通话记录查询</a></sapn>
  132. </div>
  133. <div class="dhRight">
  134. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  135. </div>
  136. </div>
  137. <div class="th-box">
  138. <div class="box_content">
  139. <table id="sqzx" style="width: 100%" border="0">
  140. <tbody>
  141. <tr>
  142. <th>电话号码:</th>
  143. <td><input id="tel" class="form-control" type="text" /></td>
  144. <th>呼叫状态:</th>
  145. <td>
  146. <select id="ss_hjzt" class="callstate form-control">
  147. <option value="">全部</option>
  148. <option value="0">未接通</option>
  149. <option value="1">已接通</option>
  150. <option value="2">接通未达</option>
  151. <option value="3">主动放弃</option>
  152. </select>
  153. </td>
  154. <th><span class="nameJustified">分机号:</span></th>
  155. <td>
  156. <input id="extnumber" class="form-control" type="text" />
  157. </td>
  158. <th>呼出方向:</th>
  159. <td>
  160. <select id="ss_hcfx" class="form-control calltype">
  161. <option value="">全部</option>
  162. <option value="0">呼入</option>
  163. <option value="1">呼出</option>
  164. <option value="3">呼出回访</option>
  165. </select>
  166. </td>
  167. </tr>
  168. <tr>
  169. <th>呼叫类型:</th>
  170. <td>
  171. <select id="ss_HJLX" class="form-control calltype">
  172. <option value="">全部</option>
  173. <option value="1">正常通话</option>
  174. <option value="2">转移</option>
  175. <option value="3">三方通话</option>
  176. </select>
  177. </td>
  178. <th>是否回访:</th>
  179. <td>
  180. <select id="sf_hf" class="form-control calltype">
  181. <option value="">全部</option>
  182. <option value="2">是</option>
  183. <option value="0">否</option>
  184. </select>
  185. </td>
  186. <th>受话坐席:</th>
  187. <td>
  188. <select id="seat" class="selectpicker show-tick form-control" multiple data-live-search="true">
  189. <!-- <option value="">全部</option> -->
  190. </select>
  191. </td>
  192. <th>通话类型:</th>
  193. <td>
  194. <select id="callType" class="form-control callstate">
  195. <option value="">全部</option>
  196. </select>
  197. </td>
  198. </tr>
  199. <tr>
  200. <th>电话类别:</th>
  201. <td>
  202. <select class="form-control" id="phoneType">
  203. <option value="">请选择</option>
  204. </select>
  205. </td>
  206. <th>查询类型:</th>
  207. <td>
  208. <select id="islike" class="form-control" name="select">
  209. <option value="1">
  210. 模糊查询
  211. </option>
  212. <option value="0">
  213. 精确查询
  214. </option>
  215. </select>
  216. </td>
  217. <th><span class="nameJustified">时间:</span></th>
  218. <td colspan="3">
  219. <input id="start" class="photo x-color laydate-icon" type="text" autocomplete="off" /> - <input id="end" class="photo x-color laydate-icon" type="text" autocomplete="off" />
  220. <a class="sc_btn Ss">搜索</a>
  221. <a class="sc_btn exportFile">导出</a>
  222. </td>
  223. </tr>
  224. <tr>
  225. <th>坐席组:</th>
  226. <td>
  227. <select id="agentGroup" class="form-control" name="select">
  228. <option value="">
  229. 请选择
  230. </option>
  231. </select>
  232. </td>
  233. </tr>
  234. <!-- <tr>
  235. <td colspan="2">
  236. </td>
  237. </tr> -->
  238. </tbody>
  239. </table>
  240. </div>
  241. <!-- <ul> -->
  242. <!-- <a class="sc_btn Ss Block">搜索</a> -->
  243. <!--<li>
  244. <a class="sc_btn Gj Block">高级搜索</a>
  245. </li>-->
  246. <!-- </ul> -->
  247. </div>
  248. <div style="width: 100%;padding: 10px;">
  249. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  250. <thead>
  251. <tr>
  252. <th data-field="" data-align="center" data-formatter="Code">编号</th>
  253. <th data-field="CallNumber" data-align="center" data-formatter="formatterCallNum">电话号码</th>
  254. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  255. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  256. <!--<th data-field="DealType" data-formatter="dealType" data-align="center">是否回访</th>-->
  257. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  258. <th data-field="ActionType" data-formatter="ActionType" data-align="center">呼叫类型</th>
  259. <th data-field="TypeName" data-align="center">通话类型</th>
  260. <th data-field="MYD" data-align="center" data-formatter="MYD">满意度</th>
  261. <th data-field="UserCode" data-align="center">坐席工号</th>
  262. <th data-field="UserName1" data-align="center">坐席姓名</th>
  263. <th data-field="ExtNumber" data-align="center">分机号</th>
  264. <th data-field="BeginTime" data-align="center">开始时间</th>
  265. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  266. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  267. <th data-field="EndTime" data-align="center">结束时间</th>
  268. <th data-field="TalkLongTime" data-align="center" data-formatter="ftime">通话时长</th>
  269. <th data-field="RingLongTime" data-align="center" data-formatter="ftime">振铃时长</th>
  270. <th data-field="LongTime" data-align="center" data-formatter="ftime">总时长</th>
  271. <th data-field="PhoneType" data-align="center">电话类别</th>
  272. <th data-field="WorkOrderId" data-align="center" data-formatter="formatWorkOrderNum">工单号</th>
  273. </tr>
  274. </thead>
  275. </table>
  276. <!--高级搜索框-->
  277. </div>
  278. </div>
  279. <!--下载框-->
  280. <div class="t-shade">
  281. <div class="shade_k">
  282. <div class="shade_title">
  283. <span>录音播放<srong class="cknum"></srong></span>
  284. <span class="setwin"><a>x</a></span>
  285. </div>
  286. <div class="shade_content">
  287. <div class="Ly_box audiojs">
  288. </div>
  289. <div class="boxCon LY_box">
  290. </div>
  291. </div>
  292. </div>
  293. </div>
  294. <script src="../js/bootstrap-select.js"></script>
  295. <script src="../My97DatePicker/WdatePicker.js"></script>
  296. <script src="../css/laydate/laydate.js"></script>
  297. <script>
  298. var stype = 1;
  299. var seatlist = [];
  300. $(document).ready(function () {
  301. laydate.skin('blue');
  302. laydate({
  303. elem: '#start',
  304. event: 'focus',
  305. istime: true,
  306. format: 'YYYY-MM-DD hh:mm:ss'
  307. });
  308. laydate({
  309. elem: '#end',
  310. event: 'focus',
  311. istime: true,
  312. format: 'YYYY-MM-DD hh:mm:ss'
  313. });
  314. /*获取选中行对象*/
  315. $('#list').on("click-row.bs.table", function (e, row, ele) {
  316. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  317. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  318. });
  319. $(".setwin").click(function () {
  320. $(".t-shade").removeClass("cx");
  321. $('audio')[0].pause();
  322. });
  323. //获取通话类型
  324. GetCallTypeList();
  325. //获取坐席
  326. getAgentGroup($("#agentGroup"));
  327. //获取坐席
  328. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  329. token: $.cookie("token")
  330. }, function (result) {
  331. if (result.state.toLowerCase() == "success") {
  332. seatlist = result.data;
  333. bindseat($("#seat"));
  334. }
  335. });
  336. // 电话类别
  337. getPhoneType($("#phoneType"));
  338. //搜索
  339. $(".Ss").click(function () {
  340. stype = 1;
  341. initTable();
  342. });
  343. //高级搜索s
  344. $(".Gj").click(function () {
  345. var a = "WdatePicker()";
  346. layer.open({
  347. type: 1,
  348. title: '高级搜索',
  349. area: ['50%', '55%'], //宽高
  350. content: ' <div class="gjsu"><ul class="nav nav-tabs">' +
  351. '<li class="active"><a href="#">参数信息</a></li> ' +
  352. '</ul>' +
  353. '<ul>' +
  354. '<li>' +
  355. '<label for="">电话号码:</label>' +
  356. '<input type="text" id="ss_tel" class="photo"/>' +
  357. '</li>' +
  358. '<li>' +
  359. '<label for="">坐席工号:</label>' +
  360. '<select name="" id="ss_seat" class="selects usercode"></select>' +
  361. '</li>' +
  362. '<li>' +
  363. '<label for="">开始时间:</label>' +
  364. ' <input type="text" id="ss_kssj" class="photo"onClick="' + a + '"/>' +
  365. '</li>' +
  366. '<li>' +
  367. '<label for="">呼叫状态:</label>' +
  368. '<select id="ss_hjzt" class="selects callstate">' +
  369. '<option value="">全部</option>' +
  370. '<option value="0">未接通</option>' +
  371. '<option value="1">已接通</option>' +
  372. '<option value="2">黑名单拒接</option>' +
  373. '</select>' +
  374. '</li>' +
  375. '<li>' +
  376. '<label for="">结束时间:</label>' +
  377. '<input type="text" id="ss_jssj" class="photo" onClick="' + a + '"/>' +
  378. '</li>' +
  379. '<li>' +
  380. '<label for="">呼出方向:</label>' +
  381. '<select id="ss_hcfx" class=" selects calltype">' +
  382. '<option value="">全部</option>' +
  383. '<option value="0">呼入</option>' +
  384. '<option value="1">呼出</option>' +
  385. '</select>' +
  386. '</li>' +
  387. '</ul>' +
  388. '<div class=" add_time tc">' +
  389. '<button type="button" class="btn sc_btn Block " id="tc">保&nbsp;&nbsp;存</button>' +
  390. '</div>' +
  391. '</div>'
  392. });
  393. bindseat($("#ss_seat"));
  394. //获取通话记录列表
  395. $("#tc").click(function () {
  396. stype = 2;
  397. initTable();
  398. var index = layer.index; //获取当前弹层的索引号
  399. layer.close(index); //关闭当前弹层
  400. });
  401. });
  402. initTable();
  403. })
  404. function bindseat(obj) {
  405. obj.empty();
  406. obj.append('<option value="">全部</option>');
  407. $(seatlist).each(function (i, n) {
  408. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  409. obj.selectpicker({
  410. noneSelectedText: '请选择' //默认显示内容
  411. });
  412. obj.selectpicker('refresh');
  413. })
  414. }
  415. /*
  416. 监听坐席数据变化
  417. 选中全部时候,取消其他选项
  418. clickedIndex:索引
  419. isSelected:是否选中
  420. previousValue:选中前的值
  421. */
  422. $("#seat").on("changed.bs.select", function(event, clickedIndex, isSelected, previousValue) {
  423. if (previousValue.indexOf("全部") == -1) {
  424. if (clickedIndex == 0) {
  425. $("#seat").selectpicker("deselectAll");
  426. $("#seat").val ("");
  427. $("#seat").selectpicker('refresh');
  428. }
  429. } else {
  430. if (clickedIndex != 0) {
  431. $("#seat").selectpicker("deselectAll");
  432. $("#seat").val ("");
  433. $("#seat").selectpicker('refresh');
  434. }
  435. }
  436. })
  437. function initTable() {
  438. //先销毁表格
  439. $('#list').bootstrapTable('destroy');
  440. //初始化表格,动态从服务器加载数据
  441. $("#list").bootstrapTable({
  442. method: "get", //使用get请求到服务器获取数据
  443. url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
  444. contentType: "application/x-www-form-urlencoded",
  445. striped: true, //表格显示条纹
  446. pagination: true, //启动分页
  447. pageSize: 10, //每页显示的记录数
  448. pageNumber: 1, //当前第几页
  449. pageList: [10, 20, 50, 100], //记录数可选列表
  450. search: false, //是否启用查询
  451. showColumns: false, //显示下拉框勾选要显示的列
  452. showRefresh: false, //显示刷新按钮
  453. sidePagination: "server", //表示服务端请求
  454. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  455. //设置为limit可以获取limit, offset, search, sort, order
  456. queryParamsType: "undefined",
  457. queryParams: function queryParams(params) { //设置查询参数
  458. var param = {
  459. page: params.pageNumber,
  460. pagesize: params.pageSize,
  461. token: $.cookie("token")
  462. };
  463. var usercode_ = $("#seat").val(); //坐席
  464. var usercodeID = "";
  465. if (usercode_ != null) {
  466. $(usercode_).each(function (i, n) {
  467. var obj1 = "";
  468. obj1 = n + ",";
  469. usercodeID += obj1;
  470. });
  471. usercodeID = usercodeID.slice(0, -1);
  472. } else {
  473. usercodeID = "";
  474. }
  475. if (stype == '1') {
  476. param.usercode = usercodeID;
  477. param.phone = $("#tel").val().replace(/\s+/g, "");
  478. param.starttime = $("#start").val();
  479. param.endtime = $("#end").val();
  480. param.callstate = $("#ss_hjzt").val();
  481. param.calltype = $("#ss_hcfx").val();
  482. param.type = $("#callType").val(); //type=通话类型
  483. param.actiontype = $("#ss_HJLX").val(); //呼叫类型
  484. param.tasktype = $("#sf_hf").val(); //呼叫类型
  485. param.extnumber = $("#extnumber").val().replace(/\s+/g, "");
  486. param.phoneType = $("#phoneType").val();
  487. param.islike = $("#islike").val(); // 查询类型
  488. param.group = $("#agentGroup").val(); // 坐席组
  489. } else if (stype == '2') {
  490. param.usercode = $("#ss_seat").val();
  491. param.tel = $("#ss_tel").val();
  492. param.callstate = $("#ss_hjzt").val();
  493. param.calltype = $("#ss_hcfx").val();
  494. param.starttime = $("#ss_kssj").val();
  495. param.endtime = $("#ss_jssj").val();
  496. param.type = $("#callType").val(); //type=通话类型
  497. param.actiontype = $("#ss_HJLX").val(); //呼叫类型
  498. param.tasktype = $("#sf_hf").val(); //呼叫类型
  499. param.extnumber = $("#extnumber").val().replace(/\s+/g, "");
  500. param.phoneType = $("#phoneType").val();
  501. param.islike = $("#islike").val(); // 查询类型
  502. param.group = $("#agentGroup").val(); // 坐席组
  503. }
  504. return param;
  505. },
  506. onLoadSuccess: function () { //加载成功时执行
  507. //layer.msg("加载成功");
  508. },
  509. onLoadError: function () { //加载失败时执行
  510. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  511. }
  512. });
  513. }
  514. //音频
  515. function setCode(val) {
  516. if (val) {
  517. return '<div class="imgs">' +
  518. '<img src="../img/vice.png" alt="" onclick="helper.luyin.view(this)" item="' + val + '" />' +
  519. '</div>';
  520. } else {
  521. return '';
  522. }
  523. }
  524. //编号
  525. function Code(val, row, index) {
  526. return index + 1;
  527. }
  528. // 电话号码
  529. function formatterCallNum(val, row) {
  530. if (val.length === 12) {
  531. return val.slice(1)
  532. } else if (val.length === 13) {
  533. return val.slice(2)
  534. } else {
  535. return val
  536. }
  537. }
  538. //方向呼出
  539. function callType(val) {
  540. if (val == 0) {
  541. return '<div class="imgs">呼入</div>';
  542. } else {
  543. return '<div class="imgs">呼出</div>';
  544. }
  545. }
  546. //满意度
  547. function MYD(val, row) {
  548. var html = '';
  549. switch (val + '') {
  550. case '0':
  551. html = '未评价';
  552. break;
  553. case '1':
  554. html = '满意';
  555. if (row.CallState == 0) {
  556. html = '';
  557. }
  558. break;
  559. case '2':
  560. html = '一般';
  561. break;
  562. case '3':
  563. html = '不满意';
  564. break;
  565. }
  566. return html;
  567. }
  568. function states(val, row) {
  569. if (val == 0) {
  570. if (row.CallType == 0 && !row.UserCode) {
  571. return '<div class="imgs">主动放弃</div>';
  572. } else {
  573. return '<div class="imgs">未接通</div>';
  574. }
  575. } else if (val == 1) {
  576. return '<div class="imgs">已接通</div>';
  577. } else if (val == 2) {
  578. return '<div class="imgs">接通未达</div>';
  579. }
  580. }
  581. function ActionType(val) {
  582. if (val == 2) {
  583. return '<div class="imgs">转移</div>';
  584. } else if (val == 3) {
  585. return '<div class="imgs">三方通话</div>';
  586. } else {
  587. return '<div class="imgs">正常通话</div>';
  588. }
  589. }
  590. ////回访
  591. //function dealType(val) {
  592. // if (val == 1) {
  593. // return '<div >已回访</div>';
  594. // } else {
  595. // return '';
  596. // }
  597. //}
  598. //处理
  599. function isDeal(val) {
  600. if (val == 0) {
  601. return '<div >未处理</div>';
  602. } else {
  603. return '<div >已处理</div>';
  604. }
  605. }
  606. function ftime(val) {
  607. if (val) {
  608. return helper.DateFormat.getFormatTime(val);
  609. } else {
  610. return '';
  611. }
  612. }
  613. //格式化工单号
  614. function formatWorkOrderNum(val, row) {
  615. if (val == null) {
  616. val = '-'
  617. } else {
  618. return '<a class="xg" onclick="ckxq(\'' + val + '\')" title="点击查看工单详情">' + val + '</a>';
  619. }
  620. }
  621. //获取通话类型
  622. function GetCallTypeList() {
  623. $.getJSON(huayi.config.callcenter_url + 'Dictionary/GetDicValueListById', {
  624. id: 45,
  625. token: $.cookie("token")
  626. }, function (result) {
  627. if (result.state.toLowerCase() == "success") {
  628. var callTypeList = result.data;
  629. $('#callType').empty();
  630. $('#callType').append('<option value="">全部</option>');
  631. $(callTypeList).each(function (i, n) {
  632. $('#callType').append('<option value="' + n.F_ValueId + '">' + n.F_Value +
  633. '</option>');
  634. })
  635. }
  636. })
  637. }
  638. // 坐席
  639. function getAgentGroup(obj) {
  640. obj.empty();
  641. obj.append(
  642. '<option selected="selected" value="">请选择</option>'
  643. );
  644. $.getJSON(
  645. huayi.config.callcenter_url +
  646. "Dictionary/GetDicValueListById", {
  647. token: $.cookie("token"),
  648. id: 2522,
  649. },
  650. function (data) {
  651. if (data.state.toLowerCase() == "success") {
  652. var content = data.data;
  653. $(content).each(function (i, n) {
  654. $(
  655. "<option value='" +
  656. n.F_Value +
  657. "'>" +
  658. n.F_Value +
  659. "</option>"
  660. ).appendTo(obj);
  661. });
  662. }
  663. }
  664. );
  665. }
  666. //查看工单详情
  667. function ckxq(str) {
  668. if (str) {
  669. layer.open({
  670. type: 2,
  671. content: "../CommonHtml/WorkDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
  672. title: '工单详情',
  673. area: ['100%', '100%'], //宽高
  674. });
  675. }
  676. }
  677. //电话类别
  678. function getPhoneType(obj) {
  679. obj.empty();
  680. $("<option value=''>请选择</option>").appendTo(obj);
  681. $.ajax({
  682. type: "get",
  683. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
  684. dataType: "json",
  685. async: true,
  686. data: {
  687. "token": $.cookie("token"),
  688. id: 2498,
  689. },
  690. success: function (data) {
  691. if (data.state.toLowerCase() == "success") {
  692. var content = data.data;
  693. $(content).each(function (i, n) {
  694. $("<option value='" + n.F_Value + "'>" + n.F_Remark + "</option>")
  695. .appendTo(obj);
  696. })
  697. }
  698. }
  699. });
  700. }
  701. $(".exportFile").click(function () {
  702. var usercode_ = $("#seat").val(); //坐席
  703. var usercodeID = "";
  704. if (usercode_ != null) {
  705. $(usercode_).each(function (i, n) {
  706. var obj1 = "";
  707. obj1 = n + ",";
  708. usercodeID += obj1;
  709. });
  710. usercodeID = usercodeID.slice(0, -1);
  711. } else {
  712. usercodeID = "";
  713. }
  714. var usercode = usercodeID;
  715. var phone = $("#tel").val();
  716. var starttime = $("#start").val();
  717. var endtime = $("#end").val();
  718. var callstate = $("#ss_hjzt").val();
  719. var calltype = $("#ss_hcfx").val();
  720. var type = $("#callType").val(); //type=通话类型
  721. var actiontype = $("#ss_HJLX").val(); //呼叫类型
  722. var tasktype = $("#sf_hf").val(); //呼叫类型
  723. var extnumber = $("#extnumber").val();
  724. var phoneType = $("#phoneType").val();
  725. var islike = $("#islike").val(); // 查询类型
  726. var url = huayi.config.callcenter_url + "Callrecords/GetList?token=" + $.cookie("token") + "&isdc=1";
  727. url += "&usercode=" + usercode + "&phone=" + phone + "&starttime=" + starttime + "&endtime=" + endtime + "&callstate=" + callstate + "&calltype=" + calltype + "&type=" + type + "&actiontype=" + actiontype + "&tasktype=" + tasktype + "&extnumber=" + extnumber + "&phoneType=" + phoneType + "&islike=" + islike;
  728. window.location.href = url;
  729. })
  730. document.onkeydown = function (e) { // 回车提交表单
  731. var theEvent = window.event || e;
  732. var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
  733. if (code == 13) {
  734. initTable();
  735. }
  736. }
  737. </script>
  738. </body>
  739. </html>