<%@ Page Title="" Language="C#" MasterPageFile="../BaseMaster.Master" CodeBehind="VouchCompanyDetail.aspx.cs" Inherits="WAP2P.Web.PC.Admin.Account.VouchCompanyDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="header" runat="server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <form class="auto" method="post" action="" onsuccess="parent.$.jPopupEdit.close(true);">
        <div class="m-editbar">
            <input type="submit" class="btn-larger c-priority iconfont" value="&#xe684; 保存" />
            <input type="button" class="btn-larger c-normal iconfont" value="&#xe634; 关闭" onclick="parent.$.jPopupEdit.close();" />
        </div>
        <div class="m-content m-editcontent">
            <table class="m-info" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <th>担保公司名称</th>
                    <td><input type="text" name="name" id="name" class="w250" maxlength="100" data-vtype="must" data-vmsg="请输入担保公司名称" value="<%= Model.Name.HtmlEncode() %>" /></td>
                </tr>
                <tr>
                    <th>营业执照号</th>
                    <td><input type="text" name="saleNumber" id="saleNumber" class="w250" maxlength="100" data-vtype="must" data-vmsg="请输入营业执照号" value="<%= Model.SaleNumber.HtmlEncode() %>" /></td>
                </tr>
                <tr>
                    <th>联系人</th>
                    <td><input type="text" name="contactName" class="w250" maxlength="100" value="<%=Model.ContactName.HtmlEncode() %>" data-vtype="must" data-vmsg="请输入联系人" /></td>
                </tr>
                <tr>
                    <th>联系电话</th>
                    <td><input type="text" name="contactPhone" class="w250" maxlength="50" value="<%=Model.ContactPhone.HtmlEncode() %>" data-vtype="must" data-vmsg="请输入联系电话" /></td>
                </tr>
                <tr>
                    <th>启用状态 </th>
                    <td><div class="ui-checkbox"><% =HtmlHelper.CheckBox("active", "启用", IsNew ? true : Model.Active) %></div></td>
                </tr>
                <tr>
                    <th>联系地址</th>
                    <td>
                        <span id="area"></span>
                        <p><input type="text" name="address" maxlength="100" class="w250" value="<%= Model.Address.HtmlEncode() %>" /></p>
                    </td>
                </tr>
                <tr>
                    <th>公司LOGO</th>
                    <td>
                        <div id="logoResult" class="mb10"><% = IsNew || string.IsNullOrEmpty(Model.Logo) ? string.Empty : string.Format("<img src=\"{0}\" alt=\"\">", Model.Logo) %></div>
                        <div class="pl136"><input type="hidden" name="logo" id="logo" value="<% =Model.Logo.HtmlEncode() %>" /></div>
                        <input type="file" id="logoFile" />
                         <em>请上传尺寸为 <i class="fcred-3">126 X 40 像素</i> 的LOGO图片</em>
                    </td>
                </tr>
                <tr>
                    <th>相关说明</th>
                    <td><textarea name="description"><%=Model.Description.HtmlEncode() %></textarea></td>
                </tr>
            </table>
        </div>
    </form>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
    <script src="<% =this.ImportJsCss("../../res/core/scripts/areadata.js") %>"></script>

    <script>
        //开户地区编辑
        $('#area').cascade({ data: areadata, names: ['provinceId', 'cityId', 'areaId'], emptyTip: '全部', values: [<% =Model.ProvinceId %>, <% =Model.CityId %>, <% =Model.AreaId %>] });

        setTimeout(function () {
            $('#logoFile').uploadify({
                width: 120,
                height: 32,
                multi: false,
                removeTimeout: 0,
                swf: '../res/uploadify/uploadify.swf?v=<% =CryptoHelper.Random(100000,999999) %>',
                uploader: '../res/uploadify/SwfUpload.aspx?type=image&width=126&height=40',
                buttonClass:'iconfont',
                buttonText: '&#xe629; 上传公司LOGO',
                fileTypeExts: '<% =WAP2P.Web.PC.Admin.Res.uploadify.SwfUpload.AllowImages %>',
                formData: {
                    <% =WAP2P.Web.Admin.Membership.CookieName %> : '<% =Request.Cookies[WAP2P.Web.Admin.Membership.CookieName].Value %>'
                },
                onUploadSuccess: function(res, data) {
                    eval('var d = ' + data);
                    if (d.Success) {
                        $('#logo').val(d.Message).trigger('blur');
                        $('#logoResult').html('<img src="' + d.Message + '" />');
                    } else {
                        $.jError(d.Message);
                    }
                }
            });
        }, 10);
    </script>   
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="list" runat="server">
</asp:Content>
