Geen omschrijving

myphonelist.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <script src="../Script/Common/huayi.load.js"></script>
  6. <script src="../Script/Common/huayi.config.js"></script>
  7. <link rel="stylesheet" href="../css/init.css" />
  8. <title>我的任务</title>
  9. <style type="text/css">
  10. body {
  11. color: #000;
  12. font-family: 'Open Sans';
  13. font-size: 13px;
  14. }
  15. .m-kuang {
  16. width: 134px;
  17. background-color: #ffffff;
  18. background-image: none !important;
  19. filter: none !important;
  20. border: 1px solid #e5e5e5;
  21. outline: none;
  22. height: 34px !important;
  23. line-height: 30px;
  24. padding: 4px 6px;
  25. }
  26. .zt, .cz {
  27. display: block;
  28. height: 20px;
  29. width: 20px;
  30. margin: 0 auto;
  31. }
  32. .zt {
  33. background: url(../img/bf1.png) no-repeat;
  34. }
  35. .cz {
  36. background: url(../img/sz1.png) no-repeat;
  37. }
  38. .jia {
  39. display: inline-block;
  40. height: 16px;
  41. width: 16px;
  42. background: url(../img/jia.png) no-repeat;
  43. vertical-align: sub;
  44. margin-right: 3px;
  45. }
  46. .tool {
  47. margin: 20px 0;
  48. }
  49. .searchbox input {
  50. width: 99%;
  51. height: 98%;
  52. border: 0;
  53. outline: none;
  54. padding-left: 10px;
  55. }
  56. .secon {
  57. width: 100%;
  58. height: 34px;
  59. }
  60. .secl {
  61. width: 84%;
  62. display: inline-block;
  63. height: 100%;
  64. margin: 0;
  65. border: 1px solid #eee;
  66. }
  67. .stb {
  68. display: block;
  69. width: 10%;
  70. background-color: #1ab394;
  71. background-image: url(../img/sear1.png);
  72. background-position: center center;
  73. background-repeat: no-repeat;
  74. height: 100%;
  75. float: left;
  76. border: 0;
  77. border-top-right-radius: 3px;
  78. border-bottom-right-radius: 3px;
  79. }
  80. .cz_down {
  81. position: absolute;
  82. top: 130%;
  83. left: -42px;
  84. z-index: 9999;
  85. display: none;
  86. float: left;
  87. list-style: none;
  88. text-shadow: none;
  89. margin: 0px;
  90. background: #fff;
  91. border: 1px solid #e5e5e5;
  92. text-align: left;
  93. padding: 5px;
  94. }
  95. .cz_down li > a {
  96. padding: 6px 0 6px 13px;
  97. color: #333;
  98. text-decoration: none;
  99. display: block;
  100. clear: both;
  101. font-weight: normal;
  102. line-height: 18px;
  103. white-space: nowrap;
  104. }
  105. .cz_down li:hover {
  106. background: #eee;
  107. }
  108. .cz_down .divider {
  109. height: 1px;
  110. margin: 9px 1px;
  111. overflow: hidden;
  112. background-color: #e5e5e5;
  113. border-bottom: 1px solid #e5e5e5;
  114. }
  115. .ztColor {
  116. padding: 2px;
  117. color: #fff;
  118. }
  119. .taskName {
  120. cursor: pointer;
  121. }
  122. .ztc {
  123. background: #fcb322;
  124. }
  125. .clw {
  126. background: #3cc051;
  127. }
  128. .clz {
  129. background: #57b5e3;
  130. }
  131. .dzx {
  132. background: #ed4e2a;
  133. }
  134. .ysc {
  135. background: #ef2e18;
  136. }
  137. </style>
  138. </head>
  139. <body>
  140. <div class="container-fluid">
  141. <div class="daoHang clearfix">
  142. <div class="dhLeft">
  143. <sapn>
  144. <i class="syIcon"></i>位置:
  145. <a id="ReIndex" href="javaScript:;">首页</a>&gt;
  146. <a href="javaScript:;">外呼管理</a>&gt;
  147. <a href="javaScript:;">点击外呼管理</a>&gt;
  148. <a href="javaScript:;" style="color: #000;">我的外呼任务</a>
  149. </sapn>
  150. </div>
  151. </div>
  152. <div class="tcon">
  153. <div class="tool clearfix">
  154. <div class="searchbox col-sm-2">
  155. <b>外呼任务</b>
  156. <select name="" id="" class="m-kuang taskselect"></select>
  157. </div>
  158. <div class="searchbox col-sm-2">
  159. <b>获取条数</b>
  160. <select name="" id="" class="m-kuang countselect">
  161. <option value="10">10</option>
  162. <option value="20">20</option>
  163. <option value="50">50</option>
  164. </select>
  165. </div>
  166. <div class="searchbox col-sm-2">
  167. <div class="secon">
  168. <b>号码</b>
  169. <p class="secl"><input type="text" placeholder="号码" class="phone" /></p>
  170. </div>
  171. </div>
  172. <!--<div class="searchbox col-sm-2">
  173. <b>是否分配</b>
  174. <select name="" id="" class="m-kuang allotselect">
  175. <option value="-1">全部</option>
  176. <option value="0">未分配</option>
  177. <option value="1">已分配</option>
  178. </select>
  179. </div>
  180. <div class="searchbox col-sm-2">
  181. <b>呼叫状态</b>
  182. <select name="" id="" class="m-kuang callselect">
  183. <option value="-1">全部</option>
  184. <option value="0">未呼叫</option>
  185. <option value="1">已呼叫</option>
  186. </select>
  187. </div>
  188. <div class="searchbox col-sm-2">
  189. <b>接通状态</b>
  190. <select name="" id="" class="m-kuang connectselect">
  191. <option value="-1">全部</option>
  192. <option value="0">未接通</option>
  193. <option value="1">已接通</option>
  194. </select>
  195. </div>-->
  196. </div>
  197. <div class="anniu" style="margin: 20px 0;">
  198. <button class="btns search"><i class="fa fa-search"></i>查询</button>
  199. <button class="btns allot"><i class="fa fa-sign-in"></i>获取号码</button>
  200. <!--<button class="btns"><i class="fa fa-sign-in"></i>导出</button>-->
  201. </div>
  202. <table id="table1" data-row-style="rowStyle" data-classes="table table-no-bordered" data-query-params="queryParams" data-height="600">
  203. <thead>
  204. <tr>
  205. <th data-field="phone" data-align="center" data-formatter="Code">序号</th>
  206. <th data-field="taskname" data-align="left">外呼计划</th>
  207. <th data-field="id" data-align="left">号码Id</th>
  208. <th data-field="phone" data-align="left" data-formatter="showDetail">号码</th>
  209. <th data-field="agent" data-align="left">分配坐席</th>
  210. <th data-field="iscalled" data-align="left">呼叫状态</th>
  211. <th data-field="isconnected" data-align="center">接通状态</th>
  212. <th data-field="createtime" data-align="center">导入时间</th>
  213. </tr>
  214. </thead>
  215. </table>
  216. </div>
  217. </div>
  218. <script>
  219. var sear;
  220. var token = $.cookie("token");
  221. var table = $('#table1');
  222. //搜索功能
  223. $('.search').click(function () {
  224. initTable();
  225. });
  226. $.ajax({
  227. type: "get",
  228. url: huayi.config.callcenter_url + "CallPlan/GetMyCallPlan",
  229. async: true,
  230. dataType: 'json',
  231. data: {
  232. token: token
  233. },
  234. success: function (data) {
  235. var con = data.data;
  236. $('.taskselect').append('<option value="-1">全部</option>');
  237. $(con).each(function (i, n) {
  238. $('.taskselect').append('<option value="' + n.id + '">' + n.name + '</option>');
  239. })
  240. }
  241. });
  242. $('.allot').click(function () {
  243. $.ajax({
  244. type: "get",
  245. url: huayi.config.callcenter_url + "CallPlan/AllotPhoneList",
  246. async: true,
  247. dataType: 'json',
  248. data: {
  249. token: token,
  250. id: $('.taskselect').val(),
  251. count: $('.countselect').val()
  252. },
  253. success: function (data) {
  254. if (data.state == 'success') {
  255. layer.msg(data.message);
  256. table.bootstrapTable('refresh');
  257. }
  258. }
  259. });
  260. });
  261. initTable()
  262. function initTable() {
  263. //先销毁表格
  264. table.bootstrapTable('destroy');
  265. //初始化表格,动态从服务器加载数据
  266. table.bootstrapTable({
  267. method: "get", //使用get请求到服务器获取数据
  268. url: huayi.config.callcenter_url + "CallPlan/GetMyPhoneList",
  269. contentType: "application/x-www-form-urlencoded", striped: true,
  270. striped: true, //表格显示条纹
  271. pagination: true, //启动分页
  272. pageSize: 25, //每页显示的记录数
  273. pageNumber: 1, //当前第几页
  274. pageList: [25, 50], //记录数可选列表
  275. search: false, //是否启用查询
  276. showColumns: false, //显示下拉框勾选要显示的列
  277. showRefresh: false, //显示刷新按钮
  278. sidePagination: "server", //表示服务端请求
  279. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  280. //设置为limit可以获取limit, offset, search, sort, order
  281. queryParamsType: "undefined",
  282. queryParams: function queryParams(params) { //设置查询参数
  283. var param = {
  284. pageindex: params.pageNumber,
  285. pagesize: params.pageSize,
  286. token: token,
  287. id: $('.taskselect').val(),
  288. phone: $(".phone").val(),
  289. //fpstate: $(".allotselect").val(),
  290. //hcstate: $(".callselect").val(),
  291. //yjstate: $(".connectselect").val(),
  292. userid: $(".agentselect").val(),
  293. requesttype: 1
  294. };
  295. return param;
  296. },
  297. onLoadSuccess: function () { //加载成功时执行
  298. //layer.msg("加载成功");
  299. },
  300. onLoadError: function () { //加载失败时执行
  301. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  302. }
  303. });
  304. }
  305. //编号
  306. function Code(val, row, index) {
  307. return index + 1;
  308. }
  309. //电话
  310. function showDetail(val, row) {
  311. return '<div class="imgs" onclick= detail(' + row.id + ',' + row.phone + ')>' +
  312. '<img src="../img/vice.png" />' + val + '' +
  313. '</div>';
  314. }
  315. function detail(id, phone) {
  316. layer.open({
  317. type: 2,
  318. content: "../clickcall/Details.html?wid=" + id + "&phone=" + phone, //iframe的url,no代表不显示滚动条
  319. title: '详情',
  320. area: ['45%', '80%'], //宽高
  321. cancel: function (index, layero) {
  322. initTable();
  323. }
  324. });
  325. }
  326. </script>
  327. </body>
  328. </html>