<%@ Page Language="C#" AutoEventWireup="true" Inherits="WebPage_Project_XinjianXiangmu" Codebehind="Project_XinjianXiangmu.aspx.cs" %>
<%@ Register Src="../UserControls/HeaderControl.ascx" TagName="HeaderControl" TagPrefix="uc2" %>
<%@ Register src="../UserControls/FooterControl.ascx" tagname="FooterControl" tagprefix="uc3" %>
<%@ Register src="UserControls/Project.ascx" tagname="Project" tagprefix="uc1" %>
<!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">
	<meta http-equiv="content-type" content="text/html" charset="UTF-8"/>
</head>

    <script type="text/javascript" language="javascript">

        function setTimeTxt()
         {
            var type = document.getElementById("projectType").value;

            if (type == "seconds") {
             
                var begin = document.getElementById("begintime").value + " 00:00:00";
                var end = document.getElementById("endtime").value + " 00:00:00";
                if (begin.length > 19)
                {
                    begin = begin.substring(0, 19);
                 
                }
                if (end.length > 19) 
                {
                    end = end.substring(0, 19);
                }
                document.getElementById("begintime").value = begin;
                document.getElementById("endtime").value = end;
                jQuery("#begintime").attr("datatype", "datetime");
                jQuery("#endtime").attr("datatype", "datetime");
                
            }
            else {
               
                var begin = document.getElementById("begintime").value;
                var end = document.getElementById("endtime").value;
                if (begin.length > 10) 
                {
                    
                    begin = begin.substring(0, 10);
                }
                document.getElementById("begintime").value = begin;
             
                if (end.length > 10) 
                {
                    end = end.substring(0, 10);
                }

                document.getElementById("endtime").value = end;
                jQuery("#begintime").attr("datatype", "date");
                jQuery("#endtime").attr("datatype", "date");
            }
        }


        jQuery(function () {
//            jQuery($("#projectType")).change(function () {
//               

//                if ($("#projectType option:selected").val() == "goods") {
//                    $("#field_city").hide();
//                    $("#field_limit").hide();
//                }
//                else {
//                    $("#field_city").show();
//                    $("#field_limit").show();
//                }
//            });
            $("input[type=radio]").click(function () {


                if ($("input[type=radio]:checked").val() == "coupon") {

                    $("#express_zone_express").hide();
                    $("#express_zone_coupon").show();
                }
                else {
                    $("#express_zone_coupon").hide();
                    $("#express_zone_express").show();
                }
            });

        });
       
       
    </script>
<body class="newbie">
    <form id="form1" runat="server">
<div id="pagemasker"></div><div id="dialog"></div>
<div id="doc">
<uc2:HeaderControl ID="HeaderControl1" runat="server" />
<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="leader">
	<div class="dashboard" id="dashboard">
		<uc1:Project  ID="Project1" runat="server" />
	</div>
	<div id="content" class="clear mainwide">
        <div class="clear box">
            
            <div class="box-content">
                <div class="head"><h2>新建项目</h2></div>
                <div class="sect">
					<div class="wholetip clear"><h3>1、基本信息</h3></div>
					<div class="field">
						<label>项目类型</label>
                        <asp:DropDownList ID="projectType" name="projectType" runat="server" class="f-input" onchange="setTimeTxt()"  style="width:160px;">
                        </asp:DropDownList>
					</div>
					<div class="field" id="field_city"  style="height: 38px;">
						<label id="label1" runat="server">城市及分类</label>
                        <asp:DropDownList ID="city" name="city" class="f-input" runat="server" style="width:160px;">
                        </asp:DropDownList>
                        <asp:DropDownList ID="groupType" name="groupType" class="f-input" runat="server" style="width:160px;">
                        </asp:DropDownList></div>
					<div class="field" id="field_limit">
						<label>限制条件</label>
                        <asp:DropDownList ID="Conduse" runat="server" class="f-input" style="width:160px;">
                            <asp:ListItem Value="Y" Selected="True">以购买成功人数成团</asp:ListItem>
                            <asp:ListItem Value="N">以产品购买数量成团</asp:ListItem>
                        </asp:DropDownList>
                        
                        <asp:DropDownList ID="Buyonce" runat="server" class="f-input" style="width:160px;">
                            <asp:ListItem Value="Y" Selected="True">仅购买一次</asp:ListItem>
                            <asp:ListItem Value="N">可购买多次</asp:ListItem>
                        </asp:DropDownList>
					</div>
					<div class="field">
						<label>项目标题</label>
						<input type="text" size="30"  name="title" id="title"  class="f-input" group="g" require="true"  datatype="require" runat="server"/>
					</div>
					<div class="field">
						<label>市场价</label>
						<input type="text" size="10" name="market_price" id="market_price" class="number" value="1" datatype="money" group="g" require="true" runat="server" />
						<label>网站价</label>
						<input type="text" size="10" name="team_price" id="teamPrice" class="number" value="1" group="g" datatype="double" require="true" runat="server" />
					</div>
					<div class="field" id="field_num">
						<label>最低数量</label>
						<input type="text" size="10" name="min_number" id="minnumber" class="number" value="1" maxLength="6" datatype="number" group="g" require="true" runat="server" />
						<label>最高数量</label>
						<input type="text" size="10" name="max_number" id="maxnumber" class="number" value="0" maxLength="6" datatype="number" group="g" require="true" runat="server" />
						<label>每人限购</label>
						<input type="text" size="10" name="per_number" id="pernumber" class="number" value="1" maxLength="6" group="g" datatype="number" require="true" runat="server" />
						<span class="hint">最低数量必须大于0，最高数量/每人限购：0 表示没最高上限 （产品数|人数 由成团条件决定）</span>
					</div>
					<div class="field">
						<label>开始时间</label>
						<input type="text" name="begin_time" id="begintime"  group="g" require="true" datatype="date"  class="date" value=""    runat="server"   />
						<label>结束时间</label><input type="text"  name="end_time" id="endtime" group="g" require="true" datatype="date" class="date" runat="server" />
						
						<label>优惠券有效期</label>
						<input type="text" size="10" name="expire_time" id="expiretime" class="number"  maxLength="10" group="g" datatype="date"   runat="server" />
						<span class="hint" id="SPAN1" runat="server">时间格式：hh:ii:ss (例：14:05:58)，日期格式：YYYY-MM-DD （例：2010-06-10）</span>
					</div>
                    <div class="field">
                    <label>成团时间</label>
						<input type="text" size="10" name="Reach_time" id="Reach_time"  class="number"  maxLength="19" group="g" datatype="datetime"   runat="server" />
						<span class="hint" id="SPAN3" runat="server">日期格式:（例：2010-06-10 00:00:00）</span>
					</div>
					<div class="field">
						<label>本单简介</label>
						<div style="float:left;"><textarea cols="45" rows="5"  name="createsummary" id="createsummary" class="f-textarea"   group="g" require="true" datatype="require"  runat="server"></textarea></div>
					</div>
					<div class="field" id="field_notice">
						<label>特别提示</label>
						<div style="float:left;"><textarea cols="45" rows="5" name="notice" id="creatnotice" class="f-textarea xheditor {upImgUrl:'/upload.aspx?immediate=1'}" runat="server"></textarea></div>
						<span class="hint">关于本单项目的有效期及使用说明</span>
					</div>
					<!--kxx 增加-->
					<div class="field">
						<label>排序</label>
						<input type="text" size="10" name="sort_order" id="createsort_order" class="number" value="0" group="g" datatype="number" runat="server"/><span class="inputtip">请填写数字，数值大到小排序，主推团购应设置较大值</span>
					</div>
					<!--xxk-->
					<input type="hidden" name="guarantee" value="Y" id="Hidden1" runat="server" />
					<input type="hidden" name="system" value="Y" id="Hidden2" runat="server" />
					<div class="wholetip clear"><h3>2、项目信息</h3></div>
					<div class="field">
						<label>商户</label>
                        <asp:DropDownList ID="shanghu" runat="server" CssClass="f-input">
                        </asp:DropDownList>
                        <span class="inputtip">商户为可选项</span>
                       
					</div>
					<div class="field" id="field_card">
						<label>代金券使用</label>
						<input type="text" size="10" name="card" id="createcard" class="number" value="0" group="g" require="true" datatype="money" runat="server" />
						<span class="inputtip">可使用代金券最大面额</span>
					</div>
					<div class="field" id="Div1">
						<label>邀请返利</label>
						<input type="text" size="10" name="bonus" id="createbonus" class="number" require="true" datatype="number" runat="server" />
						<span class="inputtip">邀请好友参与本单商品购买时的返利金额</span>
					</div>
					<div class="field">
						<label>商品名称</label>
						<input type="text" size="30" name="product" id="createproduct" class="f-input" group="g"  datatype="require" require="true" runat="server" />
					</div>
					<div class="field">
						<label>商品图片</label>
                        <asp:FileUpload ID="Image"  name="Image" group="g" require="true"  Height="26px" Width="694px" runat="server" />
						<span class="hint">至少得上传一张商品图片</span>&nbsp;
                       
					</div>
					<div class="field">
						<label>商品图片1</label>
                        <asp:FileUpload ID="Image1"  runat="server" Height="27px" Width="694px" />&nbsp;
                       
					</div>
					<div class="field">
						<label>商品图片2</label>
                        <asp:FileUpload ID="Image2" runat="server" Height="25px" Width="693px" />&nbsp;
                        
					</div>
					<div class="field">
						<label>FLV视频短片</label>
						<input type="text" size="30" name="flv" id="createflv" class="f-input" runat="server" />
						<span class="hint" id="SPAN2" runat="server">形式如：http://.../video.flv</span>
					</div>
					<div class="field">
						<label>本单详情</label>
						<div style="float:left;"><textarea cols="45" rows="5" name="detail" id="createdetail" class="f-textarea xheditor {upImgUrl:'/upload.aspx?immediate=1'}"  runat="server"></textarea></div>
					</div>
					<div class="field" id="field_userreview">
						<label>网友点评</label>
						<div style="float:left;"><textarea cols="45" rows="5" name="userreview" id="createuserreview" class="f-textarea" runat="server"></textarea></div>
						<span class="hint">格式：“真好用|小兔|http://ww....|XXX网”，每行写一个点评</span>
					</div>
					<div class="field" id="field_systemreview">
						<label><%=ASSystemArr["abbreviation"] %>推广辞</label>
						<div style="float:left;"><textarea cols="45" rows="5" name="systemreview" id="creatsystemreview" class="f-textarea xheditor {upImgUrl:'/upload.aspx?immediate=1'}" runat="server"></textarea></div>
					</div>
					<div class="wholetip clear"><h3>3、配送信息</h3></div>
                    <div class="field">
						<label>递送方式</label>

						<div style="margin-top:5px;" id="Div2" >
                            <input id="zonediv1" type="radio" name="radio" value="coupon" checked="checked" />优惠券
                            <input id="zonediv2" type="radio" name="radio" value="express" />快递
                       </div>

					</div>
					<div id="express_zone_coupon" style=" display:block;">
						<div class="field" id="fanli">
							<label>消费返利</label>
							<input type="text" size="10" name="credit" id="createcredit" class="number" value="0" datatype="money" require="true" runat="server" />
							<span class="inputtip">消费优惠券时，获得账户余额返利，单位CNY元</span>
						</div>
					</div>
					<div id="express-zone-pickup" style="display:none;">
						<div class="field">
							<label>联系电话</label>
							<input type="text" size="10" name="mobile" id="createmobile" class="f-input" value="" runat="server" />
						</div>
						<div class="field">
							<label>自取地址</label>
							<input type="text" size="10" name="address" id="createaddress" class="f-input" value="" runat="server" />
						</div>
					</div>
					<div id="express_zone_express" style="display:none;">
						<div class="field">
							<label>快递费用</label>
							<input type="text" size="10" name="fare" id="createfare" class="number" value="5" maxLength="6" datatype="money" require="true" runat="server" />
							<label>免单数量</label>
							<input type="text" size="10" name="farefree" id="createfarefree" class="number" value="0" maxLength="6" datatype="money" require="true" runat="server" />
							<span class="hint">快递费用，免单数量：0表示不免运费，2表示，购买2件免运费</span>
						</div>
						<div class="field">
							<label>快递配送说明</label>
							<div style="float:left;"><textarea cols="45" rows="5" name="express" id="createexpress" class="f-textarea" runat="server"></textarea></div>
						</div>
                        <div><asp:HiddenField ID="HiddenField1" runat="server"  /></div>
					</div>

					<div class="act">
                              
                        <input id="leadesubmit" name="commit" type="submit" value="好了，提交" group="g" class="formbutton validator"  />
					
					</div>  
                   

				<!--</form>-->
                </div>
            </div>
            
        </div>
	</div>

</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<uc3:FooterControl ID="FooterControl1" runat="server" />

</div>

   </form>
</body>
</html>
