FuWaiCallCenter_UI 阜外华中心血管病医院 - 最早演示版不用了

OutboundAllo.html 11KB

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