Edit.html 17.6 KB
<%include '../../common/__ui/header'%>
<%include '../../common/__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-1 control-label">颜色分类 <span class="red">*</span></label>
                                <div class="col-sm-11">
                                    <%if list%>
	                                    <%each list as item%>
	                                    <button type="button" class="btn btn-default sortadd btn-xs" style="margin-bottom: 5px" data-id="<%item.id%>"><%item.colorName%></button>
	                                    <%/each%>
                                	<%/if%>
                                </div>
                            </div>
                            <div id="basicTable"></div>
                        </div>
                    </div>

                    <input type="hidden" id="isShenHe" value="<%isShenHe%>" />

                    <div class="panel-footer">
                        <div class="row">
                            <div class="col-sm-8 col-sm-offset-2">
                                <a class="btn btn-default" href="/supplier/baseproduct/index">取消</a>
                                <button type="submit" class="btn btn-success mr5" data-loading-text="保存中..." id="btnReview"><%btnText%></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 id="sizeName" 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-1">
            <select class="form-control btn-sort-kebu" value="[[item.isSuppled||'Y']]" data-index=[[index]] data-eq=[[__index]]>
                <option value="N">不可补货</option>
                <option value="Y">可补货</option>
            </select>
        </div>
        <div class="col-sm-2">
            <input class="form-control btn-sort-upmCode" value="[[item.upmCode]]" placeholder="UPM条码" data-index=[[index]] data-eq=[[__index]]></input>
        </div>
        <div class="col-sm-2">
            <input class="form-control" type="text" value="[[item.balanceTimeStr]]" readonly="readonly" data-index=[[index]] data-eq=[[__index]]>
        </div>
        <div class="col-sm-1">
            [[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 placeholder="品牌">
                    <option value="[[brandId||'-1']]">[[brandName||'品牌']]</option>
                </select>
            </div>

            <label class="col-sm-2 control-label">管理店铺 <span class="red">*</span></label>
            <div class="col-sm-2">
                <select id="shopId" class="form-control" required placeholder="管理店铺">
                    <option value="[[shopId||'-1']]">[[shopName||'店铺']]</option>
                </select>
            </div>

            <label class="col-sm-2 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-4">
                <div id="tree" style="width: 100%"></div>
            </div>
            <span class="showPlatform" style="display: none">
                <label class="col-sm-1 control-label">展示平台</label>
                <div class="col-sm-2 checkbox" style="margin-top: 3px">
                    <label><input disabled="true" type="checkbox" name="appType" value="1" [[appType==1?'checked':'']]>BLK</label>
                    <input type="hidden" id="appType" name="appType" value="[[appType||'0']]" for="checkbox"   />
                </div>
            </span>
            <label class="col-sm-1 control-label">厂家编号</label>
            <div class="col-sm-2">
                <input type="text" id="factoryCode" placeholder="厂家编号" 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-10">
                <input type="text" id="productName" class="form-control" value="[[productName]]" placeholder="品牌英文名+性别+最小类目" required/>
            </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-10">
                <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="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>

            <label class="col-sm-1 control-label">年龄层 <span class="red">*</span></label>
            <div class="col-sm-3">
                <label class="radio-inline" style="padding-left: 0">
                    <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>
                <label class="radio-inline">
                    <input type="checkbox" name="ageLevel" value="4">中童</label>
                <label class="radio-inline">
                    <input type="checkbox" name="ageLevel" value="5">幼童</label>
                <input type="hidden" id="ageLevel" name="ageLevel" value="[[ageLevel]]" for="checkbox" placeholder="年龄层" 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-4">
                <label class="radio-inline" style="padding-left: 0">
                    <input type="checkbox" name="seasons" value="spring"></label>
                <label class="radio-inline">
                    <input type="checkbox" name="seasons" value="summer"></label>
                <label class="radio-inline">
                    <input type="checkbox" name="seasons" value="autumn"></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="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" />


            [[if isAuditing==200]]
            <label class="col-sm-2 control-label">是否奥莱</label>
            <div class="col-sm-2">
                <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||'N']]" for="radio" />
            </div>
            [[/if]]
        </div>

        [[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]]

        [[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="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>
            <div class="col-sm-6"><span class="red" style="padding-top:3px;">定金预售商品取消预售标时需维护支付尾款时间</span></div>
        </div>
        <!-- 设置预计到货时间、预付定金 -->
        <div id="advanceSettings" style="display:none" class="form-group">
            <label class="col-sm-2 control-label" id="expectArrivalTimeStrTxt">预计到货时间 <span class="red">*</span></label>
            <div class="col-sm-2">
                <input type="text" style="background-color: #fff" id="expectArrivalTimeStr" jsaction="date" value="[[expectArrivalTimeStr]]" class="form-control" readonly="readonly" required placeholder="预计到货时间" />
            </div>

            <label class="col-sm-2 control-label">预付定金 </label>
            <div class="col-sm-2">
                <input type="text" id="deposit" style="background-color: #fff" value="[[deposit]]" class="form-control" placeholder="预付定金">
            </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>
</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>

<script type="text/template" id="colorSelect">
    <select class='form-control colorSelect' style='width: 150px' value="[[colorId]]" data-index="[[__index]]">
        <%if list%>
        <%each list as item%>
        <option value="<%item.id%>"><%item.colorName%></option>
        <%/each%>
        <%/if%>
        </option>
    </select>
    <div class='clearfix'></div>
</script>
<%include '../../common/__ui/footer'%>