<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="callplanfpset.aspx.cs"
    Inherits="HySoft.BaseCallCenter.Web.calloutmanage.callplanfpset" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>外呼分配</title>
    <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
   <script src="/scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/scripts/jquery/jquery.form.js"></script>
    <script type="text/javascript" src="/scripts/jquery/jquery.validate.min.js"></script>
    <script type="text/javascript" src="/scripts/jquery/messages_cn.js"></script>
    <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
    <link href="../scripts/ui/skins/Tab/css/tab.css" rel="stylesheet" type="text/css" />
    <link href="../scripts/ui/skins/Tab/css/grid.css" rel="stylesheet" type="text/css" />
    <script src="../scripts/ui/js/plugins/ligerGrid.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/plugins/ligerLayout.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/plugins/ligerTree.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/plugins/ligerMenu.js" type="text/javascript"></script>
    <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
    <script src="../scripts/My97DatePicker/lang/zh-cn.js" type="text/javascript"></script>
    <link href="../images/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        var selectplan = "";
        var tellist;
        var userlist;
        var pagername = "";
        var planname = "";
        function BindData(taskid) {
            var timeno = new Date().getTime();
            if (taskid != "") {
                $("#dropFieldList").ligerComboBox({
                    url: 'ajax/callplanfpset.ashx?action=getfieldlist&taskid=' + taskid + "&timeno=" + timeno,
                    valueField: '_f_dbfieldlname',
                    textField: '_f_name',
                    width:90,
                    selectBoxWidth:90,
                    autocomplete: true,
                    onSelected: function (newvalue) {
                        $("#hiddFieldValue").val(newvalue);
                    }
                });
            }
        }
        function LoadUserList() {
            try {
                $.ajax({
                    type: 'get',
                    url: 'ajax/callplanfpset.ashx?action=getuserlist',
                    data: { userid: '' },
                    dataType: 'html',
                    async: false,
                    cache: false,
                    success: function (res) {
                        if (res != "") {
                            document.getElementById("divUserList").innerHTML = res;
                        }
                    }
                });
            }
            catch (e) {
                $.ligerDialog.error("加载失败，错误信息：" + e.Message);
            }
        }
        function LoadTelList() {
            var vwidth = document.body.clientWidth - 400;
            selectplan = document.getElementById("txtPlanId").value;
            var key = escape(document.getElementById("txtKeywords").value);
            var field = document.getElementById("hiddFieldValue").value;
            var timeno = new Date().getTime();
            tellist = $("#divTelList").ligerGrid({
                height: '97%',
                width: vwidth,
                checkbox: true,
                columns: [
                { display: '外呼计划', align: 'center', width: '130', name: '_taskname' },
                { display: '号码', width: '130', name: '_f_phone', render: function (rowdata, rowindex, value) {
                    return "<img src='../images/phone3.png' style='width:16px' />&nbsp;&nbsp;<font color='green'>" + value + "</font>";
                }
                },
                { display: '名称', align: 'left', width: '130', name: '_f_customer' },
                { display: '导入时间', align: 'center', width: '130', name: '_f_createtime', type: 'date', format: 'yyyy-MM-dd hh:mm:ss' },
                { display: '分配坐席', align: 'center', width: '70', name: '_f_username' },
                { display: '呼叫状态', align: 'center', width: '70', name: '_f_hcstate', render: function (rowdata, rowindex, value) {
                    if (value == 0) {
                        return "未呼叫";
                    }
                    else {
                        return "已呼叫";
                    }
                }
                },
                { display: '接通状态', align: 'center', width: '70', name: '_f_yjstate', render: function (rowdata, rowindex, value) {
                    if (value == 0) {
                        return "未接通";
                    }
                    else {
                        return "已接通";
                    }
                }
                }
                ],
            url: 'ajax/callplantelnum.ashx?action=getwfplist&taskid=' + selectplan + '&key=' + key + '&field=' + field + '&timeno=' + timeno, pageSize: 50, pageSizeOptions: [10, 20, 50, 100], rownumbers: true,
                isChecked: f_isChecked, onCheckRow: f_onCheckRow, onCheckAllRow: f_onCheckAllRow,
                onSelectRow: function (data, rowindex, rowobj) {
                },
                onSuccess: function (data, obj) {
                    document.getElementById("txtAllCount").value = data.Total;
                },
                onAfterShowData: function (data) {
                }
            });
            $("#pageloading").hide();
        }
        $(function () {
            selectplan = "0";
            LoadUserList();
            LoadTelList();
        });
        function Init() {
            selectplan = "0";
            LoadTelList();
        }
        document.onkeydown = function (event) {
            var e = event || window.event || arguments.callee.caller.arguments[0];
            if (e && e.keyCode == 13) {
                Init();
            }
        };
        var sflag = true;
        function SelectPlan() {
            sflag = true;
            document.getElementById("divShowPlanList").style.display = "block";
            LoadPlanList();
        }
        function ChangeFlag() {
            sflag = true;
        }
        function HideList() {
            document.getElementById("divShowPlanList").style.display = "none";
        }
        function ChangeKey() {
            if (sflag) {
                if (document.getElementById("txtPlanName").value == "") {
                    document.getElementById("txtPlanId").value = "0";
                    document.getElementById("divShowPlanList").style.display = "none";
                }
                else {
                    document.getElementById("divShowPlanList").style.display = "block";
                    LoadPlanList();
                }
            }
        }
        var planlist;
        function LoadPlanList() {
            var key = escape(document.getElementById("txtPlanName").value);
            planlist = $("#divPlanList").ligerGrid({
                height: 300,
                width: 300,
                columns: [
                { display: '计划名称', align: 'left', width: '130', name: '_taskname' },
                { display: '号码数量', align: 'center', width: '60', name: '_y_hmcount' }
                ],
                toolbar: {
                    items: [
                    { text: '关闭', click: itemclick1, icon: 'delete' }
                    ]
                },
                url: 'ajax/callplan.ashx?action=getlist&key=' + key, pageSize: 20, pageSizeOptions: [10, 20, 50], rownumbers: true,
                onDblClickRow: function (data, rowindex, rowobj) {
                    sflag = false;
                    var vid = "0";
                    var vname = "";
                    try {
                        vid = data._taskid;
                        vname = data._taskname;
                        document.getElementById("txtPlanId").value = vid;
                        document.getElementById("txtPlanName").value = vname;
                        document.getElementById("divField1").style.display = "block";
                        document.getElementById("divField2").style.display = "block";
                        BindData(vid);
                        LoadTelList();
                    }
                    catch (e) {
                    }
                    document.getElementById("divShowPlanList").style.display = "none";
                }
            });
        }
        function itemclick1(item) {
            switch (item.icon) {
                case "delete":
                    HideList();
                    break;
            }
        }
        function SelectAll() {
            var bl = document.getElementById("chkAll").checked;
            var chkList = document.getElementsByName("chkuser");
            for (var i = 0; i < chkList.length; i++) {
                chkList[i].checked = bl;
            }
        }
        function FpData() {
            $.ligerDialog.waitting('号码分配中,请稍后...');
            var fptype = "0";
            var fpvalue = "0";
            var txmsg = "";
            if (document.getElementById("fptype1").checked) {
                fptype = "0";
                fpvalue = document.getElementById("txtFPValue1").value;
                if (fpvalue == "0") {
                    $.ligerDialog.closeWaitting();
                    $.ligerDialog.error('分配数量不能为0');
                    return false;
                }
                txmsg = "确定按数量平均分配" + "【<font color=\"red\">" + fpvalue + "条</font>】" + "到坐席？";
            }
            if (document.getElementById("fptype2").checked) {
                fptype = "1";
                fpvalue = document.getElementById("txtFPValue2").value;
                if (fpvalue == "0") {
                    $.ligerDialog.closeWaitting();
                    $.ligerDialog.error('分配比例不能为0');
                    return false;
                }
                txmsg = "确定按比例分配计划内的" + "【<font color=\"red\">" + fpvalue + "%</font>】" + "到坐席？";
            }
            if (document.getElementById("fptype3").checked) {
                fptype = "2";
                fpvalue = document.getElementById("txtFPValue3").value;
                if (fpvalue == "0") {
                    $.ligerDialog.closeWaitting();
                    $.ligerDialog.error('没有选择要分配的号码');
                    return false;
                }
                txmsg = "确定按选择号码" + "【<font color=\"red\">" + fpvalue + "条</font>】" + "平均分配到坐席？";
            }

            var scount = 0;
            var arruser = "";
            var arrphone = "";
            var arrname = "";
            var sltList = document.getElementsByName("chkuser");
            for (var i = 0; i < sltList.length; i++) {
                if (sltList[i].checked) {
                    scount++;
                    var objid = sltList[i].id.replace("chkuserid_", "");
                    arruser += objid + ",";
                    var name = document.getElementById("spanuser_" + objid).innerHTML;
                    arrname += name + ",";
                }
            }
            if (scount == 0) {
                $.ligerDialog.closeWaitting();
                $.ligerDialog.error('没有选择要分配任务的坐席');
                return false;
            }
            document.getElementById("txtArrUser").value = arruser;
            document.getElementById("txtArrName").value = arrname;
            document.getElementById("txtArrPhone").value = checkedCustomer.join(',')

            var id = document.getElementById("txtPlanId").value;
            if (id == "0") {
                $.ligerDialog.closeWaitting();
                $.ligerDialog.error('没有选择要分配的外呼计划');
                return false;
            }
            var key = escape(document.getElementById("txtKeywords").value);
            $.ligerDialog.confirm(txmsg, function (yes) {
                if (yes) {
                    $("#form1").ajaxSubmit({
                        beforeSubmit: function (formData, jqForm, options) {
                        },
                        success: function (data, textStatus) {
                            if (data.msg == 1) {
                                LoadUserList();
                                LoadTelList();
                                document.getElementById("txtArrPhone").value = "";
                                document.getElementById("txtFPValue3").value = "0";
                                checkedCustomer.length = 0;
                                $.ligerDialog.success(data.info);
                                $.ligerDialog.closeWaitting();
                            } else {
                                $.ligerDialog.closeWaitting();
                                $.ligerDialog.error("分配失败：" + data.info);
                            }
                        },
                        error: function (data, status, e) {
                            $.ligerDialog.closeWaitting();
                            $.ligerDialog.error("分配失败，错误信息：" + e);
                        },
                        url: "ajax/callplanfpset.ashx?action=fpdata&taskid=" + id + "&fptypepara=" + fptype + "&fpvalue=" + fpvalue + "&key=" + key,
                        type: "post",
                        dataType: "json"
                    });
                }
                else {
                    $.ligerDialog.closeWaitting();
                }
            });
        }
        function f_onCheckAllRow(checked) {
            for (var rowid in this.records) {
                if (checked)
                    addCheckedCustomer(this.records[rowid]['_f_id']);
                else
                    removeCheckedCustomer(this.records[rowid]['_f_id']);
            }
            f_getChecked();
        }
        var checkedCustomer = [];
        function findCheckedCustomer(CustomerID) {
            for (var i = 0; i < checkedCustomer.length; i++) {
                if (checkedCustomer[i] == CustomerID) return i;
            }
            return -1;
        }
        function addCheckedCustomer(CustomerID) {
            if (findCheckedCustomer(CustomerID) == -1)
                checkedCustomer.push(CustomerID);
        }
        function removeCheckedCustomer(CustomerID) {
            var i = findCheckedCustomer(CustomerID);
            if (i == -1) return;
            checkedCustomer.splice(i, 1);
        }
        function f_isChecked(rowdata) {
            if (findCheckedCustomer(rowdata._f_id) == -1)
                return false;
            return true;
        }
        function f_onCheckRow(checked, data) {
            if (checked) addCheckedCustomer(data._f_id);
            else removeCheckedCustomer(data._f_id);
            f_getChecked();
        }
        function f_getChecked() {
            document.getElementById("txtFPValue3").value = checkedCustomer.length;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="txtArrUser" runat="server" Value="" />
    <asp:HiddenField ID="txtArrName" runat="server" Value="" />
    <asp:HiddenField ID="txtArrPhone" runat="server" Value="" />
    <div id="divShowPlanList" style="display: none; position: absolute; z-index: 9999;
        top: 68px; left: 397px; width: 470px; height: 230px;">
        <div id="divPlanList" style="width: 470px; height: 200px;">
        </div>
    </div>
    <table id="tableMessage" cellpadding="3" cellspacing="3" border="0" style="width: 100%;">
        <tr>
            <td valign="top" style="width: 399px; padding: 0px 2px 5px 2px;">
                <div class="tools_box" style="height: 30px;">
                    <div class="tools_bar">
                        <div style="float: left; padding-top: 6px; padding-left: 1px; font-weight: bold;
                            color: red;">
                            <img src="../images/icon_site.gif" />&nbsp;外呼分配</div>
                    </div>
                </div>
                <div id="divPlanInfo" style="background-color: White;">
                    <table id="tableFP" class="form_table" style="width: 100%; height: 100%;">
                        <colgroup>
                            <col width="90" />
                            <col />
                        </colgroup>
                        <tr>
                            <th style="border-right: 1px dotted #cccccc;">
                                <span>当前未分配：</span>
                            </th>
                            <td>
                                <input id="txtAllCount" type="text" runat="server" onkeyup="this.value=this.value.replace(/[^\d]/g,'');if(this.value.split('.').length>2){this.value=this.value.split('.')[0]+'.'+this.value.split('.')[1]}"
                                    class="txtInput normal" value="0" readonly style="background-color: #cccccc;
                                    width: 40px; color: Red;" />&nbsp;条
                            </td>
                        </tr>
                        <tr style="height: 200px;">
                            <th style="border-right: 1px dotted #cccccc; border-top: 1px dotted #cccccc;">
                                <span style="color: #ff0000; font-family: Wingdings;">v</span><span>分配坐席：</span>
                            </th>
                            <td style="border-top: 1px dotted #cccccc; padding: 0px;">
                                <div id="divUserList" style="height: 200px; width: 100%; overflow-y: auto; scrollbar-face-color: #DBEBFE;
                                    scrollbar-shadow-color: #B8D6FA; scrollbar-highlight-color: #FFFFFF; scrollbar-3dlight-color: #DBEBFE;
                                    scrollbar-darkshadow-color: #458CE4; scrollbar-track-color: #FFFFFF; scrollbar-arrow-color: #458CE4;">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" align='center'>
                                        <tr style="text-align: center;">
                                            <td style="height: 15px; width: 60px; background-color: #D5EDFE; border-left: 1px solid #CCCCCC;
                                                border-right: 1px solid #CCCCCC; border-top: 1px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                padding: 1px; text-align: center;">
                                                <input id="chkAll" type="checkbox" name="chkuser" /><label for="chkAll">全选</label>
                                            </td>
                                            <td style="height: 15px; width: 90px; background-color: #D5EDFE; border-left: 1px solid #CCCCCC;
                                                border-right: 1px solid #CCCCCC; border-top: 1px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                padding: 1px; text-align: center;">
                                                用户工号
                                            </td>
                                            <td style="height: 15px; width: 90px; background-color: #D5EDFE; border-left: 1px solid #CCCCCC;
                                                border-right: 1px solid #CCCCCC; border-top: 1px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                padding: 1px; text-align: center;">
                                                用户名称
                                            </td>
                                            <td style="height: 15px; width: 90px; background-color: #D5EDFE; border-left: 1px solid #CCCCCC;
                                                border-right: 1px solid #CCCCCC; border-top: 1px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                padding: 1px; text-align: center;">
                                                未执行任务
                                            </td>
                                        </tr>
                                        <tr align="center" valign="middle" onmouseover="this.style.backgroundColor='#F6F6F6'"
                                            onmouseout="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff">
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr align="center" valign="middle" onmouseover="this.style.backgroundColor='#F6F6F6'"
                                            onmouseout="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff">
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr align="center" valign="middle" onmouseover="this.style.backgroundColor='#F6F6F6'"
                                            onmouseout="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff">
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr align="center" valign="middle" onmouseover="this.style.backgroundColor='#F6F6F6'"
                                            onmouseout="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff">
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr align="center" valign="middle" onmouseover="this.style.backgroundColor='#F6F6F6'"
                                            onmouseout="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff">
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr align="center" valign="middle" onmouseover="this.style.backgroundColor='#F6F6F6'"
                                            onmouseout="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff">
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                            <td style="vertical-align: middle; border-top: 0px solid #CCCCCC; border-bottom: 1px solid #CCCCCC;
                                                border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; padding-left: 2px;
                                                height: 15px; padding-top: 1px; padding-bottom: 1px;">
                                                &nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th style="border-right: 1px dotted #cccccc; border-top: 1px dotted #cccccc;">
                                <span style="color: #ff0000; font-family: Wingdings;">v</span><span>分配策略：</span>
                            </th>
                            <td style="border-top: 1px dotted #cccccc; padding-left: 0px;">
                                <div style="padding: 2px;">
                                    <input id="fptype1" checked type="radio" name="fptype" /><label id="lbfptype1" for="fptype1">按数量平均分配</label>
                                    &nbsp;&nbsp;<input id="txtFPValue1" type="text" runat="server" onkeyup="this.value=this.value.replace(/[^\d]/g,'');if(this.value.split('.').length>2){this.value=this.value.split('.')[0]+'.'+this.value.split('.')[1]}"
                                        class="txtInput normal" value="0" style="width: 40px;" />&nbsp;条</div>
                                <div style="padding-left: 20px; color: blue; width: 100%; border-bottom: 1px dotted #cccccc;">
                                    (为选择的坐席分配录入数量的任务)
                                </div>
                                <div style="padding: 2px;">
                                    <input id="fptype2" type="radio" name="fptype" /><label id="lbfptype2" for="fptype2">按比例平均分配</label>
                                    &nbsp;&nbsp;<input id="txtFPValue2" type="text" runat="server" class="txtInput normal"
                                        value="100" onkeyup="this.value=this.value.replace(/[^\d]/g,'');if(this.value.split('.').length>2){this.value=this.value.split('.')[0]+'.'+this.value.split('.')[1]}"
                                        style="width: 40px;" />&nbsp;%</div>
                                <div style="padding-left: 20px; color: blue; width: 100%; border-bottom: 1px dotted #cccccc;">
                                    (为选择的坐席平均分配一定比例的任务)
                                </div>
                                <div style="padding: 2px;">
                                    <input id="fptype3" type="radio" name="fptype" /><label id="lbfptype3" for="fptype3">按选择任务分配</label>
                                    &nbsp;&nbsp;<input id="txtFPValue3" type="text" runat="server" onkeyup="this.value=this.value.replace(/[^\d]/g,'');if(this.value.split('.').length>2){this.value=this.value.split('.')[0]+'.'+this.value.split('.')[1]}"
                                        class="txtInput normal" value="0" readonly style="background-color: #cccccc;
                                        width: 40px; color:Red;" />&nbsp;条</div>
                                <div style="padding-left: 20px; color: blue;">
                                    (把选择的任务平均分配为选择的坐席)
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="border-top: 1px dotted #cccccc;">
                                &nbsp;
                            </td>
                            <td style="border-top: 1px dotted #cccccc;">
                                <input id="btnSubmit" type="button" class="btnSubmit" onclick="FpData();" value="执行分配" />
                            </td>
                        </tr>
                        <tr id="trnull">
                            <td colspan="2">
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
            <td valign="top" style="padding: 0px 2px 5px 2px;">
                <div class="tools_box" style="height: 30px;">
                    <div class="tools_bar">
                        <div style="float: left; padding-top: 6px; padding-left: 1px; font-weight: bold;
                            color: red;">
                            <img src="../images/phone.png" style="height: 20px;" />&nbsp;<span id="spanPlanInfo"></span>外呼号码</div>
                    </div>
                </div>
                <div class="tools_box">
                    <asp:HiddenField ID="hdF_FunctionId" runat="server" />
                    <asp:HiddenField ID="hdF_ModuleId" runat="server" />
                    <div class="tools_bar">
                        <div class="search_box" style="float: left;">
                            <div style="float:left;">外呼计划：
                            <asp:HiddenField ID="txtPlanId" runat="server" Value="0" />
                            <asp:TextBox ID="txtPlanName" runat="server" CssClass="txtInput normal" onclick="SelectPlan();"
                                onPropertyChange="ChangeKey();" Style="width: 100px;"></asp:TextBox>&nbsp;</div><div id="divField1" style="float:left; display:none;">过滤项：</div><div id="divField2" style="float:left; display:none;"><asp:TextBox
                                    ID="dropFieldList" runat="server" Style="width: 80px;"></asp:TextBox><asp:HiddenField
                                            ID="hiddFieldValue" runat="server" Value="" /></div><div style="float:left;">条件：<asp:TextBox
                                    ID="txtKeywords" runat="server" Style="width: 80px;" CssClass="txtInput"></asp:TextBox>&nbsp;
                            <input id="btnSearch" type="button" value="搜 索" class="btnSearch" onclick="Init();" /></div>
                        </div>
                    </div>
                </div>
                <div id="divTelList">
                </div>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
