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

<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%>" novalidate="novalidate">
                <div class="panel panel-default">
                    <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>
                                <div class="col-sm-8">
                                    <input type="text" id="brandName" name="brandName" class="form-control" placeholder="品牌名称" required value="<%data.brandName%>">
                                    <label for='brandName' class='error' style="display: none;"></label>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">英文名称 <span class="red">*</span></label>
                                <div class="col-sm-8">
                                    <input type="text" id="brandNameEn" name="brandNameEn" class="form-control" placeholder="英文名称" required value="<%data.brandNameEn%>">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">二级域名 <span class="red">*</span></label>
                                <div class="col-sm-8">
                                    <div class="input-group col-sm-6">
                                        <input type="text" id="brandDomain" name="brandDomain" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" class="form-control" placeholder="二级域名" value="<%data.brandDomain%>" required>
                                        <span class="input-group-addon">.yohobuy.com</span>
                                    </div>
                                </div>
                            </div>                            

                            <div class="form-group" style="display:none">
                                <label class="col-sm-2 control-label">品牌Banner</label>
                                <div class="col-sm-8">
                                       <input type="file" id="brandBanner" name="brandBanner" value="<%data.brandBanner%>" placeholder="品牌Banner" bucket="brandBanner"/>
                                </div>                               
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">品牌级别 <span class="red">*</span></label>
                                <div class="col-sm-8">
                                    <label class="radio-inline">
                                        <input type="radio" name="brandLevel" value="KA"/>KA </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="brandLevel" value="A"/>A </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="brandLevel" value="B"/>B </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="brandLevel" value="C"/>C </label>
                                </div>
                                <input type="hidden" id="brandLevel" value="<%data.brandLevel%>" for="radio" required>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">品牌推广星级 <span class="red">*</span></label>
                                <div class="col-sm-8">
                                    <label class="radio-inline">
                                        <input type="radio" name="promotionLevel" value="1"/>一星 </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="promotionLevel" value="2"/>二星 </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="promotionLevel" value="3"/>三星 </label>
                                </div>
                                <input type="hidden" id="promotionLevel" value="<%data.promotionLevel%>" for="radio" required>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">主营类目 <span class="red">*</span></label>
                                <div class="col-sm-8">
                                    <label class="radio-inline">
                                        <input type="radio" name="mainCategory" value="1"/>男装 </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="mainCategory" value="2"/>女装 </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="mainCategory" value="3"/>混合 </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="mainCategory" value="4"/>童装 </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="mainCategory" value="5"/>创意生活 </label>
                                </div>
                                <input type="hidden" id="mainCategory" value="<%data.mainCategory%>" for="radio" required>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">发源地 <span class="red">*</span></label>
                                <div class="col-sm-10">
                                    <div class ="countryInfo">
                                    </div>
                                </div>
                                <input type="hidden" id="brandHeadstream" value="<%data.brandHeadstream%>" required for="radio">
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">品牌注册证书 <span class="red">*</span></label>
                                <div class="col-sm-8">
                                    <div><input type="file" id="registerCertUrl" name="registerCertUrl" value="<%data.registerCertUrl%>" required extend="gif,png,jpg,jpeg,pdf" placeholder="品牌注册证书" bucket="brandCertificate"/></div>
                                    <div style="padding-top: 5px; clear: both"><span style="color:#999">注:支持pdf文件上传</span></div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">品牌授权书 <span class="red">*</span></label>
                                <div id="authorizeCerts" class="cover-image-list col-sm-8"></div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">授权方 <span class="red">*</span></label>
                                <div class="col-sm-8">                                  
                                    <label style="cursor: pointer;"><input type="checkbox" name="certParty" value="1"> 品牌授权</label>&nbsp;&nbsp;
                                    <label style="cursor: pointer;"><input type="checkbox" name="certParty" value="2"> 有货授权</label>&nbsp;&nbsp;
                                    <label style="cursor: pointer;"><input type="checkbox" name="certParty" value="3"> 新与力授权</label>&nbsp;&nbsp;
                                    <label style="cursor: pointer;"><input type="checkbox" name="certParty" value="4"> 线下店授权</label>&nbsp;&nbsp;
                                    <label style="cursor: pointer;"><input type="checkbox" name="certParty" value="5"> BLK授权</label>&nbsp;&nbsp;
                                </div>
                                <input type="hidden" id="certParty" value="<%data.certParty%>" for="checkbox">
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">品牌类型</label>
                                <div class="col-sm-10" >
                                    <label class="radio-inline">
                                        <input type="radio" name="brandTypes" value="6">羊头
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="brandTypes" value="7">明星                                        
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" name="brandTypes" value="8">自主
                                    </label>        
                                </div>
                                <input type="hidden" id="brandTypes" value="<%data.brandTypes%>" for="radio">
                            </div>                            
                        
                            <div class="form-group">
                                <label class="col-sm-2 control-label">品牌网址</label>
                                <div class="col-sm-8">
                                    <input type="text" id="brandUrl" class="form-control" placeholder="品牌网址"  value="<%data.brandUrl%>">
                                </div>
                            </div>                            
                            <input type="hidden" id="id" value="<%data.id%>">
                      </div>
                    </div>
                    <div class="panel-footer">
                      <div class="row">
                        <div class="col-sm-8 col-sm-offset-2">
                            <a href="javascript:;" onclick="history.go(-1);" class="btn btn-default">取消</a>
                            <button id="save_brand" type="submit" data-loading-text="保存中..." class="btn delay-btn btn-success">保存</button>
                        </div>
                      </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/template" id="countryInfoList">
    [[each data as item _index]]
    <label class="radio-inline">
        [[if item.id == brandHeadstream]]
            <input checked="checked" type="radio" name="brandHeadstream" value=[[item.id]]>[[item.countryChName]]
        [[else]]
            <input type="radio" name="brandHeadstream" value=[[item.id]]>[[item.countryChName]]
        [[/if]]
    </label>
    [[/each]]
</script>
<!--图片列表-->
<script type="text/template" id="template2">
    <ul class="cover-image-list col-sm-10" id="addPic" style="padding: 0;margin: 0;">
        [[each pictureBoList as _item _index]]
        <li class="cover-image-item image-list" data-index=[[_index]]>
            <div class="goods-img" style="margin: 0; margin-bottom: 10px">
                [[if _item.type == "pdf"]]
                <a class="fileinput-button-icon" href="[[_item.src]]" target="_blank" style="display: block;text-align: center;font-size: 24px;color: #999">
                    pdf文档
                </a>
                [[else]]
                <a class="fileinput-button-icon" href="javascript:;">
                    <img src="[[_item.src]]?imageView/2/w/100/h/100">
                </a>
                [[/if]]
                <i class="remove-item-btn glyphicon glyphicon-remove-circle" data-index="[[_index]]"></i>
            </div>
        </li>
        [[/each]]
        <li class="cover-image-item fileinput-button">
            <div class="goods-img" style="margin: 0; margin-bottom: 10px">
                <a class="fileinput-button-icon" href="javascript:;">+</a>
                <input type="file" class="goods-img-upload picfile" name="picfile" id="picfile"
                       placeholder="品牌授权书">
            </div>
        </li>
    </ul>
    <div style="padding-top: 5px; clear: both"><span style="color:#999">注:支持pdf文件上传,最多上传10</span></div>
</script>

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