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

<!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 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 src="../scripts/ui/json2.js" type="text/javascript"></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>
    <script src="../scripts/CustomersData.js" type="text/javascript"></script>
    <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
    <link href="../images/style.css" rel="stylesheet" type="text/css" />
<script  type="text/javascript">
    //选择内部人员


    function SelectInnerPerson() {
        try {
            $.ligerDialog.open({ url: 'UserEdit.aspx', title: '导入发送短信的电话号码', height: 570, width: 800, isResize: true });
        }
        catch (e) { }
    }
    function OnInnerCallback(param) {
        if (param != "") {
            document.getElementById("txtTelephone").value = param;

        }
    }
    //获取短信内容
    function GetContent() {
        $.post("../smsmanage/ajax/smsSentAjax.ashx?action=getSendContext&TypeModelId=" + document.getElementById("ddlInfoType").value, function (data) {
            document.getElementById("txtContent").value = data;
        });
    }

    function CloseThis() {

    }


    function validate() {
        var i = 0;
        if (!validatelogin_name()) {
            i++;
        }
        if (!validatepruc_name()) {
            i++;
        }
        if (i > 0) {
            return false;
        }
        return true;
    }
    function validatelogin_name() {
        if ($("#txtTelephone").val() == "" || $("#txtTelephone").val() == undefined) {
            document.getElementById("lbtxtTelephone").innerHTML = "* 电话";
            document.getElementById("lbtxtTelephone").style.color = "red";
            return false;
        }
        else {
            document.getElementById("lbtxtTelephone").innerHTML = "*";
            document.getElementById("lbtxtTelephone").style.color = "#414141";
            return true;
        }
    }
    function validatepruc_name() {
        if ($("#txtContent").val() == "" || $("#txtContent").val() == undefined) {
            document.getElementById("lbtxtContent").innerHTML = "* 内容";
            document.getElementById("lbtxtContent").style.color = "red";
            return false;
        }
        else {
            document.getElementById("lbtxtContent").innerHTML = "* ";
            document.getElementById("lbtxtContent").style.color = "#414141";
            return true;
        }
    }
</script>

</head>
<body>
    <form id="form1" runat="server">
    <input name="sign" type="hidden" value="" />
    <input id="txtUserId" type="text" runat="server" value="0" style="display: none;" />
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td valign="top" style="padding: 10px;">
                <table width="100%" border="0" cellspacing="3" cellpadding="0">
                    <colgroup>
                        <col width="90px" align="right" />
                        <col width="550px" />
                        <col />
                    </colgroup>
                    <tbody>
                        
                        <tr id="trPhone">
                            <td style="height:30px">
                                <span style="color: #ff0000; font-family: Wingdings;">v</span>电话号码：
                            </td>
                            <td>
                                <textarea id="txtTelephone" runat="server" style="height: 55px; width: 500px;" class="txtInput normal"></textarea><label
                                id="lbtxtTelephone" for="txtTelephone"></label>
                            </td>
                            <td valign="top" style="border: 1px solid #999; padding: 8px; font-size: 12px; color: #990000;">
                                <span style="color: #ff0000; font-family: Wingdings;">v</span>&nbsp;&nbsp;&nbsp;&nbsp;发送号码之间请用英文逗号“,”隔开；</td>
                        </tr>
                        <tr>
                            <td style="height:30px">
                            </td>
                            <td colspan="2">
                                <div style="border: 1px solid #ffffff; width: 505px;" id="qunfa" runat="server">
                                    <input type="button" name="ss" id="rad1" onclick="SelectInnerPerson();" class="btnSubmit"
                                        value="导入内部人员号码" />&nbsp;&nbsp;&nbsp;
                                    <input type="radio" name="ss" id="rad2" onclick="SelectCums();" value="2"  style="display:none"/><label
                                        for="rad2" style="display:none">导入客户电话号码</label>
                                   <%-- <input type="radio" name="ss" id="rad3" onclick="SelectExcel();" value="3" /><label
                                        for="rad3">导入Excel</label>--%>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="height:30px">
                                <span style="color: #ff0000; font-family: Wingdings;">v</span>短信类型：
                            </td>
                            <td colspan="2">
                                <div style="float: left;">
                                    &nbsp;</div>
                                <asp:DropDownList ID="ddlInfoType" runat="server" Width="120px" CssClass="txtInput normal"
                                    onchange="GetContent()">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td style="height:30px">
                                <span style="color: #ff0000; font-family: Wingdings;">v</span>短信内容：
                            </td>
                            <td>
                                <textarea id="txtContent" runat="server" style="height: 75px; width: 500px;" class="txtInput normal" 
                                  ></textarea><label
                                id="lbtxtContent" for="txtContent"></label>
                            </td>
                           <%-- <td valign="top" style="border: 1px solid #999; padding: 8px; font-size: 12px; color: #990000;">
                                <span style="color: #ff0000; font-family: Wingdings;">v</span>&nbsp;&nbsp;&nbsp;&nbsp;目前一条短信支持<span
                                    id="spancountres" runat="server">70</span>个字，中文和全角符号算2个字符，超过<span id="spancountres1"
                                        runat="server">70</span>个字将拆分成多条短信发送
                            </td>--%>
                             <td valign="top" style="border: 1px solid #999; padding: 8px; font-size: 12px; color: #990000;">
                                <span style="color: #ff0000; font-family: Wingdings;">v</span>&nbsp;&nbsp;&nbsp;&nbsp;发送短信内容。
                            </td>
                        </tr>
                        <tr style="display:none">
                            <td style="height:30px">
                            </td>
                            <td colspan="2">
                                &nbsp; 当前共
                                <input name="tishi1" id="tishi1" type="text" runat="server" value="0" class="txtInput normal"
                                    style="width: 35px; color: Blue;" readonly="readonly" />
                                个字&nbsp;&nbsp;&nbsp;&nbsp;
                                <input name="tishi1" id="tishi2" type="text" runat="server" value="0" class="txtInput normal"
                                    style="width: 35px; color: Blue;" readonly="readonly" />
                                字符&nbsp;&nbsp;&nbsp;&nbsp;<span id="spanCount" style="color: Red"></span>
                            </td>
                        </tr>
                        
                        <tr style="display:none">
                            <td style="height:30px">
                                发送方式：
                            </td>
                            <td colspan="2">
                                <div style="float: left;">
                                    <input id="rbSendType_0" runat="server" type="radio" name="rbSendType" value="0"
                                        onclick="ChangeType()" checked /><label for="rbSendType_0">立即发送</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<input
                                            id="rbSendType_1" runat="server" type="radio" onclick="ChangeType()" name="rbSendType"
                                            value="1" /><label onclick="ChangeType()" for="rbSendType_1">定时发送</label></div>
                                <div id="trDate" style="float: left; display: none;">
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                   <%-- <input id="txtTime" type="text" style="width: 120px;" class="txt Wdate" onfocus="WdatePicker({startDate:'%y-%M-%d H%:m%',dateFmt:'yyyy-MM-dd HH:mm',alwaysUseStartDate:true})"
                                        runat="server" />--%>
                                         <input id="txtTime" type="text" style="width: 120px;" class="txtInput" onfocus="WdatePicker({skin:'whyGreen'})"
                                        runat="server" />
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        <tr>
            <td height="30px" align="center">
<%--                <button id="Button2" style="width: 75px;" onclick="validationGroup();" class="btnSubmit" onclick="return Button2_onclick()">
                    发送</button>--%>
                    <asp:Button ID="btnSercher" runat="server" Text="发送"  class="btnSubmit" Width="75px"
                  OnClientClick="return validate();"  onclick="Button1_Click"  />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
