<%@ Page Title="" Language="C#" MasterPageFile="~/Dialog/DialogMaster.Master" AutoEventWireup="true"
    CodeBehind="SpecsValueEdit.aspx.cs" Inherits="OAWeb.crm.product.SpecsViewEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server" >
    <div class="form" style="width: 400px; padding: 10px;">
        <asp:Panel ID="pnlText" runat="server" Visible="false">
            <table cellpadding="0" cellspacing="0" border="0" class="table_form">
                <tr>
                    <td class="right">
                        <span class="red">*</span> 规格值：
                    </td>
                    <td>
                        <asp:TextBox ID="txtValueStr" runat="server" CssClass="text width200"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <input id="btnSave" type="button" value=" 保 存 " class="btn_77px" />
                        <input id="btnClose" type="button" value=" 返 回 " onclick="art.dialog.close();return false;"
                            class="btn_77px" />
                    </td>
                </tr>
            </table>
            <script type="text/javascript">
                $(document).ready(function () {
                    rulesValue = { '<%=txtValueStr.UniqueID %>': { required: true} };
                    messagesValue = { '<%=txtValueStr.UniqueID %>': { required: "请输入规格值名"} }
                    var form = jQuery.validator.ValidateForm($("#aspnetForm"), rulesValue, messagesValue);
                    $("#btnSave").click(function () {
                        if (form.form()) {
                            FormPostAjax("/crm/product/SpecsValueEdit.aspx?op=Save&Id=<%=Id %>&SpecId=<%=SpecId %>", "ok", CloseReload);
                        }
                        return false;
                    })
                });
            </script>
        </asp:Panel>
        <asp:Panel ID="pnlPic" runat="server" Visible="false">
            <table cellpadding="0" cellspacing="0" border="0" class="table_form">
                <tr>
                    <td class="right">
                        <span class="red">*</span> 图片地址：
                    </td>
                    <td>
                        <asp:FileUpload ID="FileUpload1" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="right">
                        <span class="red">*</span> 图片描述：
                    </td>
                    <td>
                        <asp:TextBox ID="txtDesc" runat="server" CssClass="text width200"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button ID="btnPicSave" runat="server" Text=" 保 存 " CssClass="btn_77px" />
                        <input id="Button2" type="button" value=" 返 回 " onclick="art.dialog.close();return false;"
                            class="btn_77px" />
                    </td>
                </tr>
            </table>
            <script type="text/javascript">
                $(document).ready(function () {
                    rulesValue = { '<%=txtDesc.UniqueID %>': { required: true} };
                    messagesValue = { '<%=txtDesc.UniqueID %>': { required: "请输入图片描述"} }
                    var form = jQuery.validator.ValidateForm($("#aspnetForm"), rulesValue, messagesValue);
                    $("#btnPicSave").click(function () {
                        if (form.form()) {
                            FormPostAjax("/crm/product/SpecsValueEdit.aspx?op=Save&Id=<%=Id %>&SpecId=<%=SpecId %>", "ok", CloseReload);
                        }
                        return false;
                    })
                });
            </script>
        </asp:Panel>
        <asp:HiddenField ID="hdfUseAttributeImage" runat="server" />
    </div>
</asp:Content>
