<%@ page language="C#" autoeventwireup="true" inherits="Credit_Identify_company, WebApp_deploy" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Src="../UserControls/IdentifyProvinceCity.ascx" TagName="IdentifyProvinceCity"
    TagPrefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>企业认证申请</title>
    <script src="../Skin/CommStyle/js/jquery-1.8.3.min.js" type="text/javascript"></script>
    <link href="../Skin/CommStyle/main.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .maintable
        {
            border: 0 none;
            margin: auto;
            padding: 0;
        }
        .IdentityStyle
        {
            width: 98%;
            margin: 0 auto;
            border: solid 1px #D20;
            text-align: center;
            border-top: 0;
        }
        .IdentityStyle caption
        {
            background: #fff4f3;
            color: #DD2200;
            text-align: center;
            margin: 0 auto 0 auto;
            padding: 0;
            border: solid 1px #D20;
            border-bottom: 0; /*#BCCCE1;*/
            line-height: 25px;
        }
        .maintable th
        {
            background: #f7f7f7;
            color: Black;
            text-align: center;
            margin: 0 auto;
            line-height: 25px;
            text-align: right;
            width: 160px;
        }
        .maintable td
        {
            background: #f7f7f7;
            text-align: left;
            line-height: 20px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <hl:Top ID="Top1" runat="server" />
    <div id="main" class="main">
        <div class="content_style">
            <div id="content" style="margin: 0px auto; width: 760px; padding: 5px;">
                <img height="25" src="../images/member_title_auth_3.gif" width="760" alt="" /></div>
            <br />
            <table class="maintable">
                <tr>
                    <th>
                        商城会员名：
                    </th>
                    <td>
                        <asp:Literal ID="UserName" runat="server" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <b style="color: Red">*</b>公司名称：
                    </th>
                    <td>
                        <asp:TextBox ID="CompanyName" runat="server" Width="160px" MaxLength="50" CssClass="text p2" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="CompanyName"
                            ErrorMessage="必填项不能为空。" CssClass="tips_wrong" Display="Dynamic" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <b>*</b>公司类型：
                    </th>
                    <td>
                        <%-- <asp:RadioButtonList ID="CompanyType" runat="server" RepeatDirection="vertical" RepeatLayout="Flow">
                        </asp:RadioButtonList>--%>
                        <asp:RadioButtonList ID="CompanyType" runat="server" RepeatDirection="vertical" RepeatLayout="Flow">
                            <asp:ListItem Selected="True" Value="生产">生产</asp:ListItem>
                            <asp:ListItem Value="零售">零售</asp:ListItem>
                            <asp:ListItem Value="经销商、批发商、品牌代理商">经销商、批发商、品牌代理商</asp:ListItem>
                            <asp:ListItem Value="互联网BTOC网站">互联网BTOC网站</asp:ListItem>
                            <asp:ListItem Value="其他CTOC平台开店商户">其他CTOC平台开店商户</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <th>
                        <b>*</b>公司所在地：
                    </th>
                    <td>
                        <hl:HoWaveProvinceCity ID="HowaveProvinceCity1" runat="server" EnableViewState="true" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <b>*</b>详细地址：：
                    </th>
                    <td>
                        <div style="clear: both">
                            <!--详细地址：(不包含省市)-->
                            <asp:TextBox ID="CompanyAddrss" Width="300" runat="server" CssClass="text p2" />
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>
                        <b>*</b>营业执照名称：
                    </th>
                    <td>
                        <asp:TextBox ID="LienceName" runat="server" Width="160px" CssClass="text p2" />
                        <asp:RequiredFieldValidator ID="rfv7" runat="server" ControlToValidate="LienceName"
                            ErrorMessage="必填项不能为空。" CssClass="tips_wrong" Display="Dynamic" Style="display: inline;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <b>*</b>营业执照经营范围：
                    </th>
                    <td>
                        <asp:TextBox ID="CompanyRange" runat="server" TextMode="MultiLine" Height="100px"
                            CssClass="text p2" Width="95%" />
                        <asp:RequiredFieldValidator ID="rfv6" runat="server" ControlToValidate="CompanyRange"
                            ErrorMessage="必填项不能为空。" CssClass="tips_wrong" Display="Dynamic" Style="display: inline;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span>营业执照号码：
                    </th>
                    <td>
                        <asp:TextBox ID="LienceNum" runat="server" Width="160px" MaxLength="50" CssClass="text p2" />
                        <asp:RegularExpressionValidator ID="rfv2" runat="server" ErrorMessage="格式不对！" ControlToValidate="LienceNum"
                            ValidationExpression="^\d{15,15}$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <th>
                        <b>*</b>联系人姓名：
                    </th>
                    <td>
                        <asp:TextBox ID="ContacterName" runat="server" Width="160px" MaxLength="50" CssClass="text p2" />
                        <asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="ContacterName"
                            ErrorMessage="必填项不能为空。" CssClass="tips_wrong" Display="Dynamic" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <b>*</b>联系人身份证号：
                    </th>
                    <td>
                        <asp:TextBox ID="ContacterIDNum" runat="server" Width="160px" MaxLength="18" CssClass="text p2" />
                        <asp:RegularExpressionValidator ID="rev9" runat="server" ErrorMessage="身份证填写不正确"
                            ValidationExpression="\d{17}[\d|X]|\d{15}" ControlToValidate="ContacterIDNum"
                            CssClass="tips_wrong" Display="Dynamic" />
                        <asp:RequiredFieldValidator ID="rfv4" runat="server" ControlToValidate="ContacterIDNum"
                            ErrorMessage="必填项不能为空。" CssClass="tips_wrong" Display="Dynamic" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span>联系人固定电话：
                    </th>
                    <td>
                        <asp:TextBox ID="ContacterPhone" runat="server" Width="160px" MaxLength="20" CssClass="text p2" />
                        <asp:RequiredFieldValidator ID="rfv5" runat="server" ControlToValidate="ContacterPhone"
                            ErrorMessage="必填项不能为空。" CssClass="tips_wrong" Display="Dynamic" />
                        <asp:RegularExpressionValidator ID="rev10" runat="server" ErrorMessage="电话号码格式不正确"
                            ValidationExpression="\d{3,4}-\d{7,9}(-\d{1,5})?" ControlToValidate="ContacterPhone"
                            CssClass="tips_wrong" Display="Dynamic" />
                        <span>固定电话请按“区号-电话号码-分机号码”格式填写<br />
                            如：020-87512750 或 020-87512780-808 </span>
                    </td>
                </tr>
                <tr>
                    <th>
                        联系人手机号码：
                    </th>
                    <td>
                        <asp:TextBox ID="ContacterMobilePhone" runat="server" Width="160px" MaxLength="11"
                            CssClass="text p2" />
                        <asp:RegularExpressionValidator ID="rex1" runat="server" ControlToValidate="ContacterMobilePhone"
                            ErrorMessage="手机号码格式不对" ValidationExpression="^\d{11}$" CssClass="tips_wrong"
                            Display="Dynamic" />
                    </td>
                </tr>
                <tr>
                    <th>
                        联系人Email：
                    </th>
                    <td>
                        <asp:TextBox ID="Email" runat="server" Width="160px" CssClass="text p2" />
                        <asp:RegularExpressionValidator ID="EmailReq" ControlToValidate="Email" runat="server"
                            ErrorMessage="输入邮箱格式不正确" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                            Display="dynamic" CssClass="tips_wrong" />
                    </td>
                </tr>
                <tr>
                    <th>
                        公司传真：
                    </th>
                    <td>
                        <asp:TextBox ID="Fax" runat="server" Width="160px" CssClass="text p2" />
                        <asp:RegularExpressionValidator ID="faxText" runat="server" ControlToValidate="Fax"
                            ErrorMessage="传真号格式不对" ValidationExpression="^\d{3,4}-\d{7,8}$" CssClass="tips_wrong"
                            Display="Dynamic" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <b>*</b>上传营业执照：
                    </th>
                    <td>
                        <asp:Label ID="UploadPanel" runat="server">
                            <asp:FileUpload ID="FileUpload1" runat="server" CssClass="text p2" />
                            <asp:HiddenField ID="hfUploadPicPath" runat="server" />
                            &nbsp;
                            <asp:Button ID="UpLoadButton" runat="server" Text="上传" Visible="false" />&nbsp;
                            <asp:Label ID="UploadPicMsg" runat="server" Visible="false"></asp:Label>
                        </asp:Label>
                        <%--<div class="div_right">
                            <div style="float: left;">
                                <asp:Label ID="UploadPanel" runat="server">
                                    <asp:FileUpload ID="FileUpload1" runat="server" CssClass="text p2" />
                                    <asp:HiddenField ID="UploadPicPath" runat="server" />
                                    &nbsp;
                                    <asp:Button ID="UpLoadButton" runat="server" Text="上传" Visible="false" />&nbsp;
                                    <asp:Label ID="UploadPicMsg" runat="server" Visible="false"></asp:Label>
                                </asp:Label>
                                <table id="show" align="center" border="0" cellpadding="3" cellspacing="0">
                                    <tr>
                                        <td>
                                            <div id="file_Msg" class="message" style="margin-left: 0px">
                                                图片大小请控制在120K以内,上传真实有效的营业执照图片<br />
                                                (包括身份证数码照片，清晰的扫描件等等)</div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            必须提供您的营业执照，并在资料中注明以下信息：
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <img src="../Images/company_pic_identify.gif" alt="" width="351" height="150" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div style="float: right;">
                                <div id="previewImage" align="left">
                                    <div align="center">
                                        预览图</div>
                                    <div>
                                        <asp:Image ID="IDPhoto" ImageUrl="../images/show_nopic.gif" runat="server" Width="100"
                                            Height="90" /></div>
                                </div>
                            </div>
                        </div>--%>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Image ID="IDPhoto" ImageUrl="../images/show_nopic.gif" runat="server" Width="221"
                            Height="150" />
                        <div id="previewImage" align="left">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        必须提供您的营业执照，并在资料中注明以下信息：<br />
                        <img src="../Images/company_pic_identify.gif" alt="" width="351" height="150" />
                    </td>
                </tr>
            </table>
            <br />
            <div style="text-align: center; color: Red;">
                <asp:Label ID="err_tips" runat="server" Width="98%" /></div>
            <div style="text-align: center; padding: 5px;">
                <input type="button" id="goback" value="<<返回前页" onclick="javascript:history.back(-1)" />
                <asp:Button ID="SaveInfo" runat="server" Text="确认无误，将不可修改，提交>>" OnClientClick="return checkProvince()" OnClick="SaveInfo_Click" />
                <asp:Button ID="btnSavaImg" ValidationGroup="a" runat="server" Text="" Style="display: none"
                    OnClick="btnSavaImg_Click" />
            </div>
        </div>
    </div>
    <hl:Foot ID="Foot1" runat="server" />
    </form>
    <script type="text/javascript">
        function DisplayUserChoose(ctlname) {
            if (document.getElementById("ctl00_ContentPlaceHolder1_RadioU_UserType_1").checked) {
                document.getElementById('company_display').style.display = "";
            }
            else {
                document.getElementById('company_display').style.display = "none";
            }
        }

        var imageObject;
        function ResizeImage(obj, MaxW, MaxH) {
            if (obj != null) imageObject = obj;
            var state = imageObject.readyState;
            if (state != 'complete') {
                setTimeout("ResizeImage(null," + MaxW + "," + MaxH + ")", 50);
                return;
            }
            var oldImage = new Image();
            oldImage.src = imageObject.src;
            var dW = oldImage.width; var dH = oldImage.height;
            if (dW > MaxW || dH > MaxH) {
                a = dW / MaxW; b = dH / MaxH;
                if (b > a) a = b;
                dW = dW / a; dH = dH / a;
            }
            if (dW > 0 && dH > 0) {
                imageObject.width = dW;
                imageObject.height = dH;
            }
        }

        function ShowUpdatePic(file) {
            if (navigator.userAgent.indexOf("Mozilla/5.") > -1) {
                document.getElementById("previewImage").innerHTML = "预览<br/><img src='" + file.files[0].getAsDataURL() + "' width='100' height='100' borber=0>";
            }
            else {
                document.getElementById("previewImage").innerHTML = "预览<br/><img src='" + file.value + "' width=100 height=100 border=0>";
            }
        }
        function SavePic(id) {
            $('#' + id).click();
            return true;
        }
    </script>
    <script type="text/javascript">
        function checkProvince() {
            //获取用户控件中的dropdownlist的选择值 
            var hpc_Province = document.getElementById('<%=HowaveProvinceCity1.ClientID %>' + "_Province");
            var bojvalueProvince = "";
            for (i = 0; i < hpc_Province.options.length; i++) {
                if (hpc_Province.options[i].selected)
                    bojvalueProvince = hpc_Province.options[i].value;
            }
            if (bojvalueProvince.length == 0) {
                alert("请选择省份！");
                hpc_Province.focus();
                return false;
            }
            return true;
        }
    </script>
</body>
</html>
