Edit.html 16.7 KB
<%include '../../../common/views/__ui/header'%>

<%include '../../../common/views/__partail/ListHeader'%>

<div class="contentpanel">
    <div class="row">
        <div class="col-md-12">
            <form id="basicForm" role="form" class="form-horizontal form-bordered" method="post" action="<%action%>">
                
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">基本信息</h4>
                    </div>
                    <div class="panel-body" id="basicInfo">
                        
                    </div>

                    <div class="panel-heading">
                        <h4 class="panel-title">销售属性</h4>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="form-group">
                                 <label class="col-sm-2 control-label">颜色分类 <span class="red">*</span></label>
                                 <p>
                                    <%if list%>
	                                    <%each list as item%>
	                                    <button type="button" class="btn btn-default sortadd btn-xs" data-id="<%item.id%>"><%item.colorName%></button>
	                                    <%/each%>
                                	<%/if%>
                                </p>
                            </div>
                            <div id="basicTable"></div>
                            
                        </div>
                    </div>


                    <div class="panel-footer">
                          <div class="row">
                            <div class="col-sm-8 col-sm-offset-2">
                                <a class="btn btn-default" href="/product/base/index">取消</a>
                                <button type="submit" class="btn btn-success mr5" data-loading-text="保存中..." id="btnReview">提交审核</button>
                            </div>
                          </div>
                    </div>
                 </div>
                
             </form>
         </div>
    </div>
</div>

<script type="text/template" id="template">
[[each goodsSizeList as item __index]]
        <div class="form-group">
        <!-- <label class="col-sm-1 red">*</label> -->
        <div class="col-sm-2">
            <select class="form-control btn-sort-chima" data-index=[[index]] data-eq=[[__index]] value='[[item.sizeId]]' required placeholder="尺码">
                <option value="[[item.sizeId||'-1']]">[[item.sizeName||'选择尺码']]</option>
            </select>
        </div>
        <div class="col-sm-2">
            <input class="form-control btn-sort-xiaoshou" value="[[item.salePrice]]" placeholder="默认销售价" data-index=[[index]] data-eq=[[__index]] required match="numbers" type="text"></input>
        </div>
        <div class="col-sm-2">
            <input class="form-control btn-sort-tiaoma" value="[[item.factoryCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input>
        </div>
        <div class="col-sm-2">
            <select class="form-control btn-sort-kebu" value="[[item.isSuppled||'N']]" data-index=[[index]] data-eq=[[__index]]>
                <option value="N">不可补货</option>
                <option value="Y">可补货</option>
            </select>
        </div>
       
        <div class="col-sm-2">
        [[if __index==goodsSizeList.length-1]]
            <button type="button" class="btn btn-info btn-xs btn-sort-add" data-index=[[index]]>+</button>
        [[/if]]
        [[if __index!=0]]
            <button type="button" class="btn btn-info btn-xs btn-sort-remove" data-index=[[index]] data-eq=[[__index]]>-</button>
        [[/if]]
        </div>
        
        </div>
[[/each]]
</script>

<script type="text/template" id="template2">
    <div class="row">

        <div class="form-group">
            <label class="col-sm-2 control-label">品牌 <span class="red">*</span></label>
            <div class="col-sm-2">
              <select id="brandId" class="form-control" required>
              <option value="[[brandId||'-1']]">[[brandName||'品牌']]</option>
              </select>
            </div>
           
           
            <label class="col-sm-1 control-label">JIT供应商</label>
            <div class="col-sm-2">
              <select id="supplierId" class="form-control">
                  <option value="[[supplierId||'-1']]">[[supplierName||'供应商']]</option>
              </select>
              <div class="col-sm-12 control-label red">JIT商品必须选择JIT供应商</div>
            </div>
            
        </div>
        <div class="form-group">
         <label class="col-sm-2 control-label">分类<span class="red">*</span></label>
          <div class="col-sm-5">
            <div id="tree"></div>
          </div>
          
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">商品名称<span class="red">*</span></label>
            <div class="col-sm-3">
              <input type="text" id="productName" class="form-control" value="[[productName]]" placeholder="品牌英文名+性别+最小类目" required/>
            </div>
            <label class="col-sm-1 control-label">厂家编号</label>
            <div class="col-sm-1">
              <input type="text" id="factoryCode" value="[[factoryCode]]" class="form-control" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">货品年<span class="red">*</span></label>
            <div class="col-sm-2">
               <select id="goodsYears" class="form-control" value="[[goodsYears||'2016']]">
               [[each ENUMYEAR as item index]]
                    <option value="[[item.YEAR]]">[[item.YEAR]]</option>
               [[/each]]
               </select>
            </div>
             <label class="col-sm-1 control-label">货品季<span class="red">*</span></label>
            <div class="col-sm-2">
              <select id="goodsSeason" class="form-control" value="[[goodsSeason]]">
                  <option value="1"></option>
                  <option value="2"></option>
                  <option value="3"></option>
                  <option value="4"></option>
                  <option value="5">春夏</option>
                  <option value="6">秋冬</option>
              </select>
            </div>
             <label class="col-sm-1 control-label">商品属性<span class="red">*</span></label>
            <div class="col-sm-2">
             <select id="attribute" class="form-control" value="[[attribute]]">
                <option value="1">普通商品</option>
                <option value="2">赠品</option>
                <option value="3">虚拟商品</option>
             </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">商品话题</label>
             <div class="col-sm-5">
              <input type="text" id="productTag" class="form-control" value="[[productTag]]" />
            </div>
        </div>
        <div class="form-group">
        <!-- 【年龄层】默认 成人 ,成人和大童小童互斥,如果是童装,年龄层必填,并且大童小童可以复选。 -->
            <label class="col-sm-2 control-label">年龄层<span class="red">*</span></label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="checkbox" name="ageLevel" value="1">成人</label>
                <label class="radio-inline">
                    <input type="checkbox" name="ageLevel" value="2">大童</label>
                <label class="radio-inline">
                    <input type="checkbox" name="ageLevel" value="3">小童</label>
                <input type="hidden" id="ageLevel" name="ageLevel" value="[[ageLevel||'1']]" for="checkbox" placeholder="年龄层" required />
            </div>
            <label class="col-sm-1 control-label">性别<span class="red">*</span></label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="radio" name="gender" value="1"></label>
                <label class="radio-inline">
                    <input type="radio" name="gender" value="2"></label>
                <label class="radio-inline">
                    <input type="radio" name="gender" value="3">通用</label>
                <input type="hidden" id="gender" name="gender" value="[[gender||'1']]" for="radio" required />
            </div>
        </div>
        <div class="form-group">
         <label class="col-sm-2 control-label">重点款<span class="red">*</span></label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="radio" name="grade" value="1"></label>
                <label class="radio-inline">
                    <input type="radio" name="grade" value="0"></label>
            </div>
            <input type="hidden" id="grade" value="[[grade||'0']]" for="radio" required/>

            <label class="col-sm-1 control-label">适销季<span class="red">*</span></label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="checkbox" name="seasons" value="summer"></label>
                <label class="radio-inline">
                    <input type="checkbox" name="seasons" value="winter"></label>
                <label class="radio-inline">
                    <input type="checkbox" name="seasons" value="seasons">四季</label>
                <input type="hidden" id="seasons" name="seasons" value="[[seasons||'seasons']]" for="checkbox" placeholder="年龄层" />
            </div>
            
            
        </div>

        <div class="form-group">
             <label class="col-sm-2 control-label">促销礼品</label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="radio" name="isPromotionalGifts" value="Y"></label>
                <label class="radio-inline">
                    <input type="radio" name="isPromotionalGifts" value="N"></label>
                    <input id="isPromotionalGifts" type="hidden" value="[[isPromotionalGifts||'N']]" for="radio" />
            </div>
             <label class="col-sm-1 control-label">限量款</label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="radio" name="isLimited" value="Y"></label>
                <label class="radio-inline">
                    <input type="radio" name="isLimited" value="N"></label>
            </div>
            <input id="isLimited" type="hidden" value="[[isLimited||'N']]" for="radio" />
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">是否限购</label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="radio" name="isLimitbuy" value="Y"></label>
                <label class="radio-inline">
                    <input type="radio" name="isLimitbuy" value="N"></label>
                     <input type="hidden" id="isLimitbuy" value="[[isLimitbuy||'N']]" for="radio" />
            </div>
            [[if isAuditing==200]]
           <label class="col-sm-1 control-label">是否预售</label>
           <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="radio" name="isAdvance" value="Y"></label>
                <label class="radio-inline">
                    <input type="radio" name="isAdvance" value="N"></label>
                <input type="hidden" id="isAdvance" value="[[isAdvance||'N']]" for="radio" />
            </div>
            [[/if]]
        </div>
         [[if isAuditing==200]]
        <div class="form-group">
            <label class="col-sm-2 control-label">是否奥莱</label>
            <div class="col-sm-2">
                <label class="radio-inline">
                    <input type="radio" name="isOutLets" value="B">品牌设置</label>
                <label class="radio-inline">
                    <input type="radio" name="isOutLets" value="Y"></label>
                <label class="radio-inline">
                    <input type="radio" name="isOutLets" value="N"></label>
                <input type="hidden" id="isOutLets" value="[[isOutLets||'B']]" for="radio" />
            </div>
           
          
        </div>
        [[/if]]

        [[if isAuditing==200]]
        <div class="form-group">
            <label class="col-sm-2 control-label">是否VIP</label>
            <div class="col-sm-2">
             <label class="radio-inline">
                    <input type="radio" name="isVip" value="B">品牌设置</label>
                <label class="radio-inline">
                    <input type="radio" name="isVip" value="Y">开启</label>
                <label class="radio-inline">
                    <input type="radio" name="isVip" value="N">关闭</label>
                <input type="hidden" id="isVip" value="[[isVip||'B']]" for="radio" />
            </div>
           
        </div>
        [[/if]]


        <div class="form-group">
            <label class="col-sm-2 control-label">吊牌价<span class="red">*</span></label>
            <div class="col-sm-2">
                <input type="text" id="retailPriceStr" class="form-control" required value="[[retailPriceStr]]" match="numbers" placeholder="吊牌价" />
            </div>
            <label class="col-sm-1 control-label">销售价<span class="red">*</span></label>
            <div class="col-sm-2">
                <input type="text" id="salesPriceStr" class="form-control" required value="[[salesPriceStr]]" match="numbers" placeholder="销售价" />
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">预计上架时间<span class="red">*</span></label>
            <div class="col-sm-2">
                <input type="text" id="expectShelfTimeStr" jsaction="time" value="[[expectShelfTimeStr]]" required class="form-control" readonly="readonly" placeholder="预计上架时间" />
            </div>
            [[if isAdvance=='Y']]
                <label class="col-sm-1 control-label" id="expectArrivalTimeStrTxt">预计到货时间<span class="red">*</span></label>
            <div class="col-sm-2">
                <input type="text" id="expectArrivalTimeStr" jsaction="time" value="[[expectArrivalTimeStr]]" class="form-control" readonly="readonly" required placeholder="预计到货时间" />
            </div>
            [[else]]
                <label class="col-sm-1 control-label" id="expectArrivalTimeStrTxt">预计到货时间</label>
            <div class="col-sm-2">
                <input type="text" id="expectArrivalTimeStr" jsaction="time" value="[[expectArrivalTimeStr]]" class="form-control" readonly="readonly" placeholder="预计到货时间" />
            </div>
            [[/if]]
            
        </div>

    </div>
</script>

<script type="text/template" id="template3">
<div class="form-group">
[[if inputType=='checkbox']]
    [[each idNameList as item index ]]
<label class="radio-inline">
    <input type="checkbox" name="attr_[[__index]]" data-index=[[__index]] class="attr_checkobx_class" value="[[item.id]]">[[item.text]]</label>
    [[/each]]
    <input type="hidden" id="attr_[[__index]]" value="[[__val||'']]"  [[required]] for="checkbox" placeholder="[[attributeName]]"/>
[[/if]]

[[if inputType=='radio']]
[[each idNameList as item index ]]
<label class="radio-inline">
    <input type="radio" name="attr_[[__index]]" data-index=[[__index]] class="attr_input" value="[[item.id]]">[[item.text]]</label>
[[/each]]
<input type="hidden" id="attr_[[__index]]" data-index='[[__index]]' value="[[__val||'']]" [[required]] for="radio" placeholder="[[attributeName]]" />
[[/if]]

[[if inputType=='select']]
<select class="form-control attr_input" style="width: 280px" data-index='[[__index]]' value="[[__val||'']]" [[required]]>
    <option value="">请选择[[attributeName]]</option>
[[each idNameList as item index ]]
    <option value="[[item.id]]">[[item.text]]</option>
[[/each]]
</select>
[[/if]]

[[if inputType=='text']]
<input type="text" class="form-control attr_input" style="width: 280px" data-index='[[__index]]' value="[[val||'']]" [[required]] maxlength='[[maxValueLen]]' placeholder="[[attributeName]]"/>
[[/if]]
[[if inputType=='textarea']]
<textarea class="form-control attr_input" data-index='[[__index]]' [[required]] maxlength='[[maxValueLen]]' placeholder="[[attributeName]]">[[val||'']]</textarea>
[[/if]]
</div>
</script>

<%include '../../../common/views/__ui/footer'%>