Нет описания

phoneresultlist.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  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. <link rel="stylesheet" type="text/css" href="../js/layui/css/layui.css" />
  9. <title>任务结果查询</title>
  10. <style type="text/css">
  11. body {
  12. color: #000;
  13. font-family: 'Open Sans';
  14. font-size: 13px;
  15. }
  16. .m-kuang {
  17. width: 134px;
  18. background-color: #ffffff;
  19. background-image: none !important;
  20. filter: none !important;
  21. border: 1px solid #e5e5e5;
  22. outline: none;
  23. height: 34px !important;
  24. line-height: 30px;
  25. padding: 4px 6px;
  26. }
  27. .zt, .cz {
  28. display: block;
  29. height: 20px;
  30. width: 20px;
  31. margin: 0 auto;
  32. }
  33. .zt {
  34. background: url(../img/bf1.png) no-repeat;
  35. }
  36. .cz {
  37. background: url(../img/sz1.png) no-repeat;
  38. }
  39. .jia {
  40. display: inline-block;
  41. height: 16px;
  42. width: 16px;
  43. background: url(../img/jia.png) no-repeat;
  44. vertical-align: sub;
  45. margin-right: 3px;
  46. }
  47. .tool {
  48. margin: 20px 0;
  49. }
  50. .searchbox input {
  51. width: 99%;
  52. height: 98%;
  53. border: 0;
  54. outline: none;
  55. padding-left: 10px;
  56. }
  57. .secon {
  58. width: 100%;
  59. height: 34px;
  60. }
  61. .secl {
  62. width: 84%;
  63. display: inline-block;
  64. height: 100%;
  65. margin: 0;
  66. border: 1px solid #eee;
  67. }
  68. .stb {
  69. display: block;
  70. width: 10%;
  71. background-color: #1ab394;
  72. background-image: url(../img/sear1.png);
  73. background-position: center center;
  74. background-repeat: no-repeat;
  75. height: 100%;
  76. float: left;
  77. border: 0;
  78. border-top-right-radius: 3px;
  79. border-bottom-right-radius: 3px;
  80. }
  81. .cz_down {
  82. position: absolute;
  83. top: 130%;
  84. left: -42px;
  85. z-index: 9999;
  86. display: none;
  87. float: left;
  88. list-style: none;
  89. text-shadow: none;
  90. margin: 0px;
  91. background: #fff;
  92. border: 1px solid #e5e5e5;
  93. text-align: left;
  94. padding: 5px;
  95. }
  96. .cz_down li > a {
  97. padding: 6px 0 6px 13px;
  98. color: #333;
  99. text-decoration: none;
  100. display: block;
  101. clear: both;
  102. font-weight: normal;
  103. line-height: 18px;
  104. white-space: nowrap;
  105. }
  106. .cz_down li:hover {
  107. background: #eee;
  108. }
  109. .cz_down .divider {
  110. height: 1px;
  111. margin: 9px 1px;
  112. overflow: hidden;
  113. background-color: #e5e5e5;
  114. border-bottom: 1px solid #e5e5e5;
  115. }
  116. .ztColor {
  117. padding: 2px;
  118. color: #fff;
  119. }
  120. .taskName {
  121. cursor: pointer;
  122. }
  123. .ztc {
  124. background: #fcb322;
  125. }
  126. .clw {
  127. background: #3cc051;
  128. }
  129. .clz {
  130. background: #57b5e3;
  131. }
  132. .dzx {
  133. background: #ed4e2a;
  134. }
  135. .ysc {
  136. background: #ef2e18;
  137. }
  138. </style>
  139. </head>
  140. <body>
  141. <div class="container-fluid">
  142. <div class="daoHang clearfix">
  143. <div class="dhLeft">
  144. <sapn>
  145. <i class="syIcon"></i>位置:
  146. <a id="ReIndex" href="javaScript:;">首页</a>&gt;
  147. <a href="javaScript:;">外呼管理</a>&gt;
  148. <a href="javaScript:;">点击外呼管理</a>&gt;
  149. <a href="javaScript:;" style="color: #000;">任务结果查询</a>
  150. </sapn>
  151. </div>
  152. </div>
  153. <div class="tcon">
  154. <div class="tool clearfix">
  155. <div class="searchbox col-sm-2">
  156. <b>外呼任务</b>
  157. <select name="" id="" class="m-kuang taskselect"></select>
  158. </div>
  159. <div class="searchbox col-sm-2">
  160. <div class="secon">
  161. <b>号码</b>
  162. <p class="secl"><input type="text" placeholder="号码" class="phone" /></p>
  163. </div>
  164. </div>
  165. <div class="searchbox col-sm-2">
  166. <b>是否分配</b>
  167. <select name="" id="" class="m-kuang allotselect">
  168. <option value="-1">全部</option>
  169. <option value="0">未分配</option>
  170. <option value="1">已分配</option>
  171. </select>
  172. </div>
  173. <div class="searchbox col-sm-2">
  174. <b>呼叫状态</b>
  175. <select name="" id="" class="m-kuang callselect">
  176. <option value="-1">全部</option>
  177. <option value="0">未呼叫</option>
  178. <option value="1">已呼叫</option>
  179. </select>
  180. </div>
  181. <div class="searchbox col-sm-2">
  182. <b>接通状态</b>
  183. <select name="" id="" class="m-kuang connectselect">
  184. <option value="-1">全部</option>
  185. <option value="0">未接通</option>
  186. <option value="1">已接通</option>
  187. </select>
  188. </div>
  189. <hr />
  190. <div class="searchbox col-sm-2">
  191. <b>呼叫结果</b>
  192. <select name="" id="" class="m-kuang hjjgselect"></select>
  193. </div>
  194. <div class="searchbox col-sm-2">
  195. <b>用户反馈</b>
  196. <select name="" id="" class="m-kuang yhfkselect"></select>
  197. </div>
  198. </div>
  199. <div class="anniu" style="margin: 20px 0;">
  200. <button class="btns search"><i class="fa fa-search"></i>查询</button>
  201. <!--<button class="btns"><i class="fa fa-sign-in"></i>导出</button>-->
  202. </div>
  203. <table class="layui-hide" id="table1"></table>
  204. </div>
  205. </div>
  206. <script src="../js/layui/layui.js"></script>
  207. <script>
  208. var sear;
  209. var token = $.cookie("token");
  210. //搜索功能
  211. $('.search').click(function () {
  212. initTable();
  213. });
  214. $.ajax({
  215. type: "get",
  216. url: huayi.config.callcenter_url + "CallPlan/GetMyCallPlan",
  217. async: true,
  218. dataType: 'json',
  219. data: {
  220. token: token
  221. },
  222. success: function (data) {
  223. var con = data.data;
  224. $('.taskselect').append('<option value="-1">全部</option>');
  225. $(con).each(function (i, n) {
  226. $('.taskselect').append('<option value="' + n.id + '">' + n.name + '</option>');
  227. })
  228. }
  229. });
  230. $.ajax({
  231. type: "post",
  232. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  233. async: true,
  234. dataType: 'json',
  235. data: {
  236. token: token,
  237. flag: 'HJJG',
  238. },
  239. success: function (data) {
  240. if (data.state.toLowerCase() == "success") {
  241. $('.hjjgselect').append('<option value="-1">全部</option>');
  242. $(data.data).each(function (i, n) {
  243. $('.hjjgselect').append('<option value="' + n.F_DictionaryValueId + '">' + n.F_Name + '</option>');
  244. })
  245. }
  246. }
  247. });
  248. $.ajax({
  249. type: "post",
  250. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  251. async: true,
  252. dataType: 'json',
  253. data: {
  254. token: token,
  255. flag: 'YHFK',
  256. },
  257. success: function (data) {
  258. if (data.state.toLowerCase() == "success") {
  259. $('.yhfkselect').append('<option value="-1">全部</option>');
  260. $(data.data).each(function (i, n) {
  261. $('.yhfkselect').append('<option value="' + n.F_DictionaryValueId + '">' + n.F_Name + '</option>');
  262. })
  263. }
  264. }
  265. });
  266. // initTable()
  267. function initTable() {
  268. var colsData = [];
  269. var arrData = [];
  270. $.ajax({
  271. url: huayi.config.callcenter_url + 'CallPlan/GetPhoneResult',
  272. type: 'get',
  273. data: {
  274. id: $('.taskselect').val(),
  275. //id: 14,
  276. phone: $(".phone").val(),
  277. fpstate: $(".allotselect").val(),
  278. hcstate: $(".callselect").val(),
  279. yjstate: $(".connectselect").val(),
  280. userid: $(".agentselect").val(),
  281. requesttype: 3,
  282. yhfkid: $(".yhfkselect").val(),
  283. hjjgid: $(".hjjgselect").val(),
  284. token: token,
  285. },
  286. dataType: "json",
  287. async: true,
  288. success: function (returnValue) {
  289. //异步获取数据
  290. if (returnValue.data) {
  291. var theadData = returnValue.data.headlist,
  292. theadDataLength = theadData.length,
  293. resultData1 = returnValue.data.datalist,
  294. resultData1Length = resultData1.length;
  295. recordCount = returnValue.data.recordcount;
  296. //加载头部
  297. for (var i = 0; i < theadDataLength; i++) {
  298. var obj1 = {};
  299. obj1['field'] = 'items' + i;
  300. obj1['title'] = theadData[i];
  301. colsData.push(obj1);
  302. }
  303. //console.log(colsData);
  304. for (var x = 0; x < resultData1Length; x++) {
  305. var temData = resultData1[x],
  306. temLength = resultData1[x].length,
  307. obj = {};
  308. for (var y = 0; y < temLength; y++) {
  309. obj['items' + y + ''] = temData[y];
  310. }
  311. arrData.push(obj);
  312. }
  313. //console.log(arrData);
  314. //debugger;
  315. layui.use('table', function () {
  316. var table = layui.table;
  317. var laypage = layui.laypage;
  318. //展示已知数据
  319. table.render({
  320. elem: '#table1',
  321. cols: [colsData],
  322. data: arrData,
  323. //skin: 'line', //表格风格
  324. even: true,
  325. page: true //是否显示分页
  326. , limits: [20]
  327. , limit: 20 //每页默认显示的数量
  328. , curr: 1
  329. });
  330. laypage.render({
  331. count: recordCount
  332. });
  333. });
  334. } else {
  335. //console.log(returnValue.message);
  336. }
  337. },
  338. });
  339. }
  340. </script>
  341. </body>
  342. </html>