| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link href="../css/initialize.css" rel="stylesheet" />
- <link href="../css/Table/table1.css" rel="stylesheet" />
- <script src="../js/jquery.min.js?v=2.1.4"></script>
- <script src="../js/plugins/layer/layer.min.js"></script>
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <title>外呼计划分配</title>
- <style>
- body {
- font-size: 14px;
- }
-
- .tools_box {
- padding: 10px;
- border: 1px solid #EDECFF;
- }
-
- .tools_box div {
- padding-left: 1px;
- font-weight: bold;
- }
-
- .red {
- color: #E43926;
- }
-
- .tools_box span {
- margin-left: 10px;
- }
-
- .tools_box li {
- margin-right: 10px;
- }
-
- #xtable th {
- /*width: 100px;
- padding: 5px 8px 5px 10px;*/
- color: #333;
- font-weight: 700;
- text-align: right;
- background: #f9f9f9;
- border-right: 1px dotted #cccccc;
- border-top: 1px dotted #cccccc;
- border-left: 1px dotted #cccccc;
- width: 100px;
- }
-
- #xtable td {
- padding: 6px 0 5px 10px;
- /*text-align: left;*/
- color: #717171;
- line-height: 200%;
- border-right: 1px dotted #cccccc;
- border-top: 1px dotted #cccccc;
- border-left: 1px dotted #cccccc;
- }
-
- .Num_input {
- width: 50px;
- padding: 5px;
- border-color: #CCCCCC;
- }
-
- .clearfix:after {
- content: "";
- display: block;
- clear: both;
- }
-
- #Submit {
- padding: 0 10px;
- height: 28px;
- line-height: 28px;
- background: #1ab394;
- font-weight: bold;
- color: #fff;
- border-radius: 3px;
- border: 1px solid #AED0EA;
- }
-
- .outline {
- border: 1px solid #21b9bb !important;
- }
-
- .whjh {
- position: absolute;
- top: 43px;
- z-index: 600;
- }
-
- .fixed-table-pagination {
- background: #F9F9F9;
- }
-
- #table1 thead {
- background: #f9f9f9;
- }
-
- #tbodys tr {
- background: #f9f9f9;
- }
-
- .hidens {
- display: none;
- }
-
- #GetWFPList td {
- padding: 8px;
- }
-
- .readOnly {
- background: #CCCCCC;
- color: red;
- }
-
- .daoHang {
- padding: 15px;
- }
-
- .daoHang .dhLeft a {
- font-size: 14px;
- color: #999;
- }
-
- .btns {
- background: #1ab394;
- color: #fff;
- padding: 6px 10px;
- outline: none;
- font-size: 12px;
- margin-left: 15px;
- border: 0;
- border-radius: 3px;
- box-sizing: border-box;
- }
-
- .inputs {
- border: 1px solid #e5e6e7;
- width: 150px;
- padding: 6px 12px;
- }
- .fixed-table-pagination{
- text-align: center;
- }
- </style>
- </head>
- <body>
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn><i class="syIcon"></i>位置:
- <a href="javaScript:;" id="ReIndex">首页</a>>
- <a href="javaScript:;">外呼管理</a>>
- <a href="" style="color: #000;">外呼分配</a>
- </sapn>
- </div>
- </div>
- <!--整体table-->
- <div class="row">
- <div class="col-sm-4">
- <table border="0" cellspacing="3" cellpadding="3" class="clearfix" style="width: 100%;">
- <tr>
- <!--左边-->
- <td style="padding: 0px 2px 5px 2px; float: left; ">
- <!--头部-->
- <div class="tools_box">
- <div>
- <span class="color">外呼分配</span>
- </div>
- </div>
- <div>
- <!--小table-->
- <table id="xtable" border="0" cellspacing="" cellpadding="" style="width: 100%;">
- <tr>
- <th>当前未分配:</th>
- <td>
- <input type="text" class="Num_input" id="Fp_total" readonly="readonly" /> 条
- </td>
- </tr>
- <tr>
- <th>分配坐席:</th>
- <td style="padding: 0;">
- <!--table2-->
- <div style="width: 100%;">
- <table id="zxTab" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
- <thead>
- <tr>
- <th data-checkbox="true" data-align="center"></th>
- <th data-field="UserCode" data-align="center">坐席工号</th>
- <th data-field="UserName" data-align="center">坐席名称</th>
- <th data-field="WWCCount" data-align="center">未执行任务</th>
- </tr>
- </thead>
- <tbody id="tbody">
- </tbody>
- </table>
- </div>
- </td>
- </tr>
- <tr>
- <th>分配策略:</th>
- <td>
- <div>
- <label for="">按数量平均分配</label>
- <input type="text" class="Num_input Pjfp_input" />条
- </div>
- <div>
- (为选择的坐席分配录入数量的任务)
- </div>
- </td>
- </tr>
- <tr style="border-bottom: 1px dotted #cccccc;text-align: center;">
- <td>
- </td>
- <td style="text-align: center;">
- <input type="button" name="" id="Submit" value="执行分配" />
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- </table>
- </div>
- <!--右边-->
- <div class="col-sm-8" style="float: right;">
- <div class="tools_box">
- <div>
- <span>外呼号码</span>
- <span> 关键字:<input class=" inputs" type="text" id="KeyWords" /></span>
- <button class="btns searchGo size-14"> <i class="fa fa-search size-14"></i> 搜索</button>
- </div>
- </div>
- <div>
- <table id="GetWFPList" class="table table-hover table-striped" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true" style="width:100%">
- <thead>
- <tr>
- <th data-checkbox="true" data-align="center"></th>
- <th data-field="F_Phone" data-align="center">号码</th>
- <th data-field="F_CusName" data-align="center">名称</th>
- </tr>
- </thead>
- <tbody id="tbody">
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <input type="hidden" id="zxNum" />
- </div>
- <script>
- var Arruser; //分配坐席
- var Fpvalue; //分配数量
- var Counts;
- var token = $.cookie("token");
- $(document).ready(function() {
- GetSeatList(); //坐席列表
- GetWFPList(); //右边分配
- $(".searchGo").click(function() {
- GetWFPList();
- })
- });
- //分配坐席
- function GetSeatList() {
- var $tableLeft1 = $('#zxTab');
- $tableLeft1.bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $tableLeft1.bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "CallOutPlan/GetSeatList",
- striped: true, //表格显示条纹
- pagination: true, //启动分页
- pageSize: 5, //每页显示的记录数
- pageNumber: 1, //当前第几页
- pageList: [5, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- var param = {
- pageindex: params.pageNumber,
- pagesize: params.pageSize,
- token:token
- };
- return param;
- },
- onLoadSuccess: function(data) { //加载成功时执行
- // layer.msg("加载成功");
- },
- onLoadError: function() { //加载失败时执行
- //layer.msg("加载数据失败", { time: 1500, icon: 2 });
- }
- });
- }
- //提交分配
- $("#Submit").click(function() {
- if(!$('.Pjfp_input').val()) {
- layer.confirm('请输入分配数量', {
- btn: ['确定'] //按钮
- });
- return;
- }
- Arruser = $.map($('#zxTab').bootstrapTable('getSelections'),
- function(row) {
- console.log(row.UserCod);
- return row.UserCode;
- });
- Fpvalue = $('.Pjfp_input').val();
- VisitFPSet(Fpvalue, Arruser);
- //刷新表格
- GetWFPList();
- GetSeatList();
- });
- ///未分配列表
- function GetWFPList() {
- var $tableLeft = $('#GetWFPList');
- $tableLeft.bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $tableLeft.bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "CallOutPlan/GetTaskWPF",
- striped: true, //表格显示条纹
- pagination: true, //启动分页
- pageSize: 10, //每页显示的记录数
- pageNumber: 1, //当前第几页
- pageList: [5, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- var param = {
- pageindex: params.pageNumber,
- pagesize: params.pageSize,
- key: $("#KeyWords").val(),
- token: token
- };
- return param;
- },
- onLoadSuccess: function(data) { //加载成功时执行
- Counts = data.total;
- if(Counts == 0) {
- $("#Fp_total").attr("readOnly", "true").addClass("readOnly");
- } else {
- $("#Fp_total").attr("readOnly", false).removeClass("readOnly");
- }
- $("#Fp_total").val(Counts);
- $('.Pjfp_input').val('');
- },
- onLoadError: function() { //加载失败时执行
- //layer.msg("加载数据失败", { time: 1500, icon: 2 });
- }
- });
- }
- //限制字符串长度
- function cutContent(val) {
- if(val) {
- var str = '<div '
- if(val.length > 5) {
- str = str + ' title="' + val + '" ';
- val = val.substr(0, 4) + "...";
- }
- return str + '>' + val + '</div>';
- } else {
- return '';
- }
- }
- //分配 请求
- function VisitFPSet(Fpvalue, Arruser) {
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + "CallOutPlan/fpdata",
- dataType: 'json',
- data: {
- fpvalue: Fpvalue,
- arruser: Arruser,
- token: token
- },
- async: true,
- success: function(data) {
- if(data.state == "success") {
- GetSeatList();
- GetWFPList();
- layer.msg("分配成功");
- } else {
- layer.msg("分配失败");
- }
- }
- });
- }
- </script>
- </body>
- </html>
|