bannerEdit.html 11 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%>" 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-1 control-label">名称</label>
                                <div class="col-sm-8">
                                    <input type="text" id="caption" name="caption" class="form-control"  placeholder="名称" required value="<%data.caption%>" maxlength="200"/>
                                    <input type="hidden" id="id" name="id" value="<%data.id%>"/>
                                    <input type="hidden" id="createTime" name="createTime" value="<%data.createTime%>"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">位置</label>
                                <div class="col-sm-4">
                                    <select id="positionId" class="form-control" required placeholder="位置" name="positionId">
                                        <option value="<%data.positionId%>"><%data.positionName%></option>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">样式</label>
                                <div class="col-sm-2">
                                    <select id="templetId" class="form-control" required placeholder="样式" name="templetId">
                                        <option value="<%data.templetId%>"><%data.templetName%></option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">分类</label>
                                <div class="col-sm-4">
                                    <div id="sortTree" style="width: 100%"></div>
                                </div>
                                <label class="col-sm-1 control-label">性别</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="<%data.gender%>" for="radio" required placeholder="性别"/>
                                </div>
                            </div>
                            <div class="form-group title_div">
                                <label class="col-sm-1 control-label">标题</label>
                                <div class="col-sm-8">
                                    <input type="text" id="data_title" name="data_title" class="form-control" value="<%data.bannerData.title%>" placeholder="标题" value="" maxlength="200"/>
                                </div>
                            </div>
                            <div class="form-group subtitle_div">
                                <label class="col-sm-1 control-label">副标题</label>
                                <div class="col-sm-8">
                                     <input type="text" id="data_subtitle" name="data_subtitle" class="form-control"  placeholder="副标题" value="<%data.bannerData.subtitle%>" maxlength="200"/>
                                </div>
                            </div>
                            <div class="form-group intro_div">
                                <label class="col-sm-1 control-label">内容</label>
                                <div class="col-sm-8">
                                    <textarea id="data_intro" name="data_intro" class="form-control" rows="10" value="<%data.bannerData.intro%>"><%data.bannerData.intro%></textarea> 
                                </div>
                            </div>

                            <div class="form-group" id="keywordDiv"> </div>

                            <div class="form-group logo_div">
                                <label class="col-sm-1 control-label">图片</label>
                                <div class="col-sm-8">
                                    <input type="file" id="logo" name="logo" value="<%data.bannerData.logo%>" />
                                </div>
                            </div>
                            <div class="form-group url_div">
                                <label class="col-sm-1 control-label">URL</label>
                                <div class="col-sm-8">
                                    <input id="data_url" name="data_url" class="form-control" value="<%data.bannerData.url%>" placeholder="URL(请加上http://)"/>
                                </div>
                            </div>
                      </div>
                    </div>
                </div>


                <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-1 control-label">价格</label>
                                <div class="col-sm-2">
                                    <input type="text" id="price" name="price" class="form-control"  placeholder="价格" value="<%data.price%>" maxlength="10"/>
                                </div>
                                <label class="col-sm-3 control-label">尺码</label>
                                <div class="col-sm-3">
                                    <select id="sizeId" class="form-control" placeholder="尺码" name="sizeId">
                                        <option value="<%data.sizeId%>"><%data.sizeName%></option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group" id="styleDiv"> </div>
                            <div class="form-group" id="colorDiv"> </div>
                            <div class="form-group" id="brandDiv"> </div>
                      </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_banner" 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="templateStyle">
    <label class="col-sm-1 control-label">风格</label>
    <div class="col-sm-8">
        [[each data as item index ]]
            <label class="radio-inline">
            <input type="checkbox" name="style" data-index="[[index]]" class="attr_checkobx_class" value="[[item.id]]">[[item.text]]</label>
        [[/each]]
        <input type="hidden" id="style" value="[[selectStyle||'']]" for="checkbox" />
    </div>
</script>

<script type="text/template" id="templateColor">
    <label class="col-sm-1 control-label">颜色</label>
    <div class="col-sm-8">
        [[each list as item index ]]
            <label class="radio-inline">
                <input type="radio" name="color" value="[[item.id]]">[[item.colorName]]</label>
        [[/each]]
        <input type="hidden" id="color" value="<%data.color%>" for="radio" name="color"/>
    </div>
</script>

<script type="text/template" id="templateKeyword">
    <label class="col-sm-1 control-label"><button class="btn delay-btn btn-addKeyword" style="background-color: #5cb85c">增加关键字</button></label>
    <div class="col-sm-8" id="keywordListId">
        <table style="width: 100%" id="templateKeywordTable">
        [[each keyword as item index ]]
            <tr style="width: 100%;">
            <td style="padding-bottom: 5px">
                <label class="col-sm-1 control-label" style="width: 20%">关键字</label>
                <div class="col-sm-2" style="width: 80%">
                    <input type="text" name="word" value="[[item.word]]" class="form-control"  placeholder="关键字"/>
                </div>
            </td>
            <td style="padding-bottom: 5px">
                <label class="col-sm-1 control-label" style="width: 20%">关键字URL</label>
                <div class="col-sm-6" style="width: 80%">
                    <input type="text" name="url" value="[[item.url]]" class="form-control"  placeholder="关键字URL"/>
                </div>
            </td>
            </tr>
        [[/each]]
        </table>
    </div>
</script>


<script type="text/template" id="templateKeywordItem">
    <tr style="width: 100%;">
        <td style="padding-bottom: 5px">
            <label class="col-sm-1 control-label" style="width: 20%">关键字</label>
            <div class="col-sm-2" style="width: 80%">
                <input type="text" name="word" value="" class="form-control"  placeholder="关键字"/>
            </div>
        </td>
        <td style="padding-bottom: 5px">
            <label class="col-sm-1 control-label" style="width: 20%">关键字URL</label>
            <div class="col-sm-6" style="width: 80%">
                <input type="text" name="url" value="" class="form-control"  placeholder="关键字URL(请加上http://)"/>
            </div>
        </td>
    </tr>
</script>

<script type="text/template" id="templateBrandItem">
    <div class="form-group">
        <label class="col-sm-1 control-label">品牌</label>
        <div class="col-sm-4">
            <select id="brand" size="20" class="form-control"  multiple="multiple">
            [[each data as item index ]]
                [[if item.text]]
                    <option value="[[item.id]]">[[item.text]]</option>
                [[/if]]
            [[/each]]
            </select>
        </div>
    </div>
</script>

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