新乡民调(来自息县民调) - 主标

OutboundAllo.html 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <link href="../css/initialize.css" rel="stylesheet" />
  7. <link href="../css/Table/table1.css" rel="stylesheet" />
  8. <script src="../js/jquery.min.js?v=2.1.4"></script>
  9. <script src="../js/plugins/layer/layer.min.js"></script>
  10. <script src="../Script/Common/huayi.load.js"></script>
  11. <script src="../Script/Common/huayi.config.js"></script>
  12. <title>外呼计划分配</title>
  13. <style>
  14. body {
  15. font-size: 14px;
  16. }
  17. .tools_box {
  18. padding: 10px;
  19. border: 1px solid #EDECFF;
  20. }
  21. .tools_box div {
  22. padding-left: 1px;
  23. font-weight: bold;
  24. }
  25. .red {
  26. color: #E43926;
  27. }
  28. .tools_box span {
  29. margin-left: 10px;
  30. }
  31. .tools_box li {
  32. margin-right: 10px;
  33. }
  34. #xtable th {
  35. /*width: 100px;
  36. padding: 5px 8px 5px 10px;*/
  37. color: #333;
  38. font-weight: 700;
  39. text-align: right;
  40. background: #f9f9f9;
  41. border-right: 1px dotted #cccccc;
  42. border-top: 1px dotted #cccccc;
  43. border-left: 1px dotted #cccccc;
  44. width: 100px;
  45. }
  46. #xtable td {
  47. /*padding: 6px 0 5px 10px;*/
  48. /*text-align: left;*/
  49. color: #717171;
  50. line-height: 200%;
  51. border-right: 1px dotted #cccccc;
  52. border-top: 1px dotted #cccccc;
  53. border-left: 1px dotted #cccccc;
  54. }
  55. .Num_input {
  56. width: 50px;
  57. padding: 5px;
  58. border-color: #CCCCCC;
  59. }
  60. .clearfix:after {
  61. content: "";
  62. display: block;
  63. clear: both;
  64. }
  65. #Submit {
  66. padding: 0 10px;
  67. height: 28px;
  68. line-height: 28px;
  69. background: #1ab394;
  70. font-weight: bold;
  71. color: #fff;
  72. border-radius: 3px;
  73. border: 1px solid #AED0EA;
  74. }
  75. .outline {
  76. border: 1px solid #21b9bb !important;
  77. }
  78. .whjh {
  79. position: absolute;
  80. top: 43px;
  81. z-index: 600;
  82. }
  83. .fixed-table-pagination {
  84. background: #F9F9F9;
  85. }
  86. #table1 thead {
  87. background: #f9f9f9;
  88. }
  89. #tbodys tr {
  90. background: #f9f9f9;
  91. }
  92. .hidens {
  93. display: none;
  94. }
  95. #GetWFPList td {
  96. padding: 8px;
  97. }
  98. .readOnly {
  99. background: #CCCCCC;
  100. color: red;
  101. }
  102. .daoHang {
  103. padding: 15px;
  104. }
  105. .daoHang .dhLeft a {
  106. font-size: 14px;
  107. color: #999;
  108. }
  109. .btns {
  110. background: #1ab394;
  111. color: #fff;
  112. padding: 6px 10px;
  113. outline: none;
  114. font-size: 12px;
  115. margin-left: 15px;
  116. border: 0;
  117. border-radius: 3px;
  118. box-sizing: border-box;
  119. }
  120. .inputs {
  121. border: 1px solid #e5e6e7;
  122. width: 150px;
  123. padding: 6px 12px;
  124. }
  125. .fixed-table-pagination {
  126. text-align: center;
  127. }
  128. </style>
  129. </head>
  130. <body>
  131. <div class="wrapper wrapper-content animated fadeInRight">
  132. <div class="daoHang clearfix">
  133. <div class="dhLeft">
  134. <sapn><i class="syIcon"></i>位置:
  135. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  136. <a href="javaScript:;">外呼管理</a>&gt;
  137. <a href="" style="color: #000;">外呼分配</a>
  138. </sapn>
  139. </div>
  140. </div>
  141. <!--整体table-->
  142. <div class="row">
  143. <div class="col-sm-4">
  144. <table border="0" cellspacing="3" cellpadding="3" class="clearfix" style="width: 100%;">
  145. <tr>
  146. <!--左边-->
  147. <td style="padding: 0px 2px 5px 2px; float: left; ">
  148. <!--头部-->
  149. <div>
  150. <!--小table-->
  151. <table id="xtable" border="0" cellspacing="" cellpadding="" style="width: 100%;">
  152. <tr>
  153. <th>当前未分配:</th>
  154. <td>
  155. <input type="text" class="Num_input" id="Fp_total" readonly="readonly" disabled="disabled"/> 条
  156. </td>
  157. </tr>
  158. <tr>
  159. <th>分配坐席:</th>
  160. <td style="padding: 0;">
  161. <!--table2-->
  162. <div style="width: 100%;">
  163. <table id="zxTab" data-click-to-select="true" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  164. <thead>
  165. <tr>
  166. <th data-checkbox="true" data-align="center"></th>
  167. <th data-field="UserCode" data-align="center">坐席工号</th>
  168. <th data-field="UserName" data-align="center">坐席名称</th>
  169. <th data-field="WWCCount" data-align="center">未执行任务</th>
  170. </tr>
  171. </thead>
  172. <tbody id="tbody">
  173. </tbody>
  174. </table>
  175. </div>
  176. </td>
  177. </tr>
  178. <tr>
  179. <th>分配策略:</th>
  180. <td>
  181. <div>
  182. <label for="">按数量平均分配</label>
  183. <input type="text" class="Num_input Pjfp_input" />条
  184. </div>
  185. <div>
  186. (为选择的坐席分配录入数量的任务)
  187. </div>
  188. </td>
  189. </tr>
  190. <tr style="border-bottom: 1px dotted #cccccc;text-align: center;">
  191. <td>
  192. </td>
  193. <td style="text-align: center;">
  194. <input type="button" name="" id="Submit" value="执行分配" />
  195. </td>
  196. </tr>
  197. </table>
  198. </div>
  199. </td>
  200. </tr>
  201. </table>
  202. </div>
  203. <!--右边-->
  204. <div class="col-sm-8" style="float: right;">
  205. <div class="tools_box">
  206. <div>
  207. <span>&nbsp;号码:<input class=" inputs" type="text" id="KeyWords" placeholder="输入号码" style="font-weight: normal;" /></span>
  208. <button class="btns searchGo size-14"> <i class="fa fa-search size-14"></i>&nbsp;搜索</button>
  209. </div>
  210. </div>
  211. <div>
  212. <table id="GetWFPList" class="table table-hover table-striped" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true" style="width:100%">
  213. <thead>
  214. <tr>
  215. <th data-field="F_Phone" data-align="center">号码</th>
  216. <th data-field="F_CusName" data-align="center">名称</th>
  217. </tr>
  218. </thead>
  219. <tbody id="tbody">
  220. </tbody>
  221. </table>
  222. </div>
  223. </div>
  224. </div>
  225. <input type="hidden" id="zxNum" />
  226. </div>
  227. <script>
  228. var Arruser; //分配坐席
  229. var Fpvalue; //分配数量
  230. var Counts;
  231. var token = $.cookie("token");
  232. $(document).ready(function() {
  233. GetSeatList(); //坐席列表
  234. GetWFPList(); //右边分配
  235. //回车搜索
  236. $('.inputs').on('keypress',function(e){
  237. if(e.keyCode == 13){
  238. GetWFPList();
  239. }
  240. });
  241. $(".searchGo").click(function() {
  242. GetWFPList();
  243. })
  244. });
  245. //分配坐席
  246. function GetSeatList() {
  247. var $tableLeft1 = $('#zxTab');
  248. $tableLeft1.bootstrapTable('destroy');
  249. //初始化表格,动态从服务器加载数据
  250. $tableLeft1.bootstrapTable({
  251. method: "get", //使用get请求到服务器获取数据
  252. url: huayi.config.callcenter_url + "CallOutPlan/GetSeatList",
  253. striped: true, //表格显示条纹
  254. pagination: true, //启动分页
  255. pageSize: 5, //每页显示的记录数
  256. pageNumber: 1, //当前第几页
  257. pageList: [5, 10, 50, 100], //记录数可选列表
  258. contentType: 'application/x-www-form-urlencoded',
  259. search: false, //是否启用查询
  260. showColumns: false, //显示下拉框勾选要显示的列
  261. showRefresh: false, //显示刷新按钮
  262. sidePagination: "server", //表示服务端请求
  263. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  264. //设置为limit可以获取limit, offset, search, sort, order
  265. queryParamsType: "undefined",
  266. queryParams: function queryParams(params) { //设置查询参数
  267. var param = {
  268. pageindex: params.pageNumber,
  269. pagesize: params.pageSize,
  270. token: token
  271. };
  272. return param;
  273. },
  274. onLoadSuccess: function(data) { //加载成功时执行
  275. // layer.msg("加载成功");
  276. },
  277. onLoadError: function() { //加载失败时执行
  278. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  279. }
  280. });
  281. }
  282. //提交分配
  283. $("#Submit").click(function() {
  284. if(!$('.Pjfp_input').val()) {
  285. layer.confirm('请输入分配数量', {
  286. btn: ['确定'] //按钮
  287. });
  288. return;
  289. }
  290. Arruser = $.map($('#zxTab').bootstrapTable('getSelections'),
  291. function(row) {
  292. console.log(row.UserCod);
  293. return row.UserCode;
  294. });
  295. Fpvalue = $('.Pjfp_input').val();
  296. VisitFPSet(Fpvalue, Arruser);
  297. //刷新表格
  298. GetWFPList();
  299. GetSeatList();
  300. });
  301. ///未分配列表
  302. function GetWFPList() {
  303. var $tableLeft = $('#GetWFPList');
  304. $tableLeft.bootstrapTable('destroy');
  305. //初始化表格,动态从服务器加载数据
  306. $tableLeft.bootstrapTable({
  307. method: "get", //使用get请求到服务器获取数据
  308. url: huayi.config.callcenter_url + "CallOutPlan/GetTaskWPF",
  309. striped: true, //表格显示条纹
  310. pagination: true, //启动分页
  311. pageSize: 10, //每页显示的记录数
  312. pageNumber: 1, //当前第几页
  313. pageList: [10, 20, 50, 100], //记录数可选列表
  314. contentType: 'application/x-www-form-urlencoded',
  315. search: false, //是否启用查询
  316. showColumns: false, //显示下拉框勾选要显示的列
  317. showRefresh: false, //显示刷新按钮
  318. sidePagination: "server", //表示服务端请求
  319. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  320. //设置为limit可以获取limit, offset, search, sort, order
  321. queryParamsType: "undefined",
  322. queryParams: function queryParams(params) { //设置查询参数
  323. var param = {
  324. pageindex: params.pageNumber,
  325. pagesize: params.pageSize,
  326. key: $("#KeyWords").val().trim(),
  327. token: token
  328. };
  329. return param;
  330. },
  331. onLoadSuccess: function(data) { //加载成功时执行
  332. Counts = data.total;
  333. if(Counts == 0) {
  334. $("#Fp_total").attr("readOnly", "true").addClass("readOnly");
  335. } else {
  336. $("#Fp_total").attr("readOnly", false).removeClass("readOnly");
  337. }
  338. $("#Fp_total").val(Counts);
  339. $('.Pjfp_input').val('');
  340. },
  341. onLoadError: function() { //加载失败时执行
  342. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  343. }
  344. });
  345. }
  346. //限制字符串长度
  347. function cutContent(val) {
  348. if(val) {
  349. var str = '<div '
  350. if(val.length > 5) {
  351. str = str + ' title="' + val + '" ';
  352. val = val.substr(0, 4) + "...";
  353. }
  354. return str + '>' + val + '</div>';
  355. } else {
  356. return '';
  357. }
  358. }
  359. //分配 请求
  360. function VisitFPSet(Fpvalue, Arruser) {
  361. $.ajax({
  362. type: "post",
  363. url: huayi.config.callcenter_url + "CallOutPlan/fpdata",
  364. dataType: 'json',
  365. data: {
  366. fpvalue: Fpvalue,
  367. arruser: Arruser,
  368. token: token
  369. },
  370. async: true,
  371. success: function(data) {
  372. if(data.state == "success") {
  373. GetSeatList();
  374. GetWFPList();
  375. layer.msg("分配成功");
  376. } else {
  377. layer.msg("分配失败");
  378. }
  379. }
  380. });
  381. }
  382. </script>
  383. </body>
  384. </html>