<%@ Page Title="" Language="C#" MasterPageFile="~/bps/basic.Master" AutoEventWireup="true" CodeBehind="copy_quote_1.aspx.cs" Inherits="bps.bps.copy_quote_1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">




    
    <div style="text-align:center; margin-top:50px;">
        <b>
         确定复制报价单吗？
            </b>

        <br /><br />

        
    新版本号：<input type="text" id="revision" value="<%=_revision %>"0" class="form-control" style="display:inline-block; width:120px;" />
         <br /><br />

        <span id="result"></span>
        <br />
        <br />
        <input type="button"   value="确定生成"  onclick="gen();" class="btn btn-primary btn-sm"/>
          <br />  <br />
        <span id="error" style="color:red"></span>



    </div>


    <script>


        function gen()
        {

            var _quoteid=<%=Request.QueryString["quoteid"] %>;
            var revision=$("#revision").val();

            if(revision=="")
            {
                alert("请输入版本号");
            }

            $.ajax({
                url: "ajax/copy_quote.aspx",
                data: { quoteid:_quoteid, revision:revision },
                type: "get",
                cache: false,
                async: false,
                success: function (_newid) {
                    if(_newid=="-1")
                    {
                        $("#error").html("版本号已经存在");
                    
                    }
                    else
                    {
                        $("#error").html('');
                        $("#result").html(" 生成成功 <a href=quote_edit.aspx?id="+_newid+" target=_blank>点击查看</a>");
                    } 
                
                }
            });

        }


    </script>



</asp:Content>
