Porattr.html 7.74 KB
<%include '../../common/views/__ui/header'%>
<%include '../../common/views/__partail/ListHeader'%>
<div class="contentpanel">
    <div class="row">
        <div class="col-md-3">
            <div class="panel panel-default noborder pattrscroll">
                <div class="panel-body">
                    <div class="pannel-scroll">
                        <ul class="list-group">
                        <%if data%>
                        	<%each data as item%>
                            <li class="list-group-item level<%item.sortLevel%> <%if item.child%>hidden<%/if%>" data-parent="<%item.parentId%>" data-val="<%item.id%>" data-status="close">
                                <span class="icon expand-icon glyphicon glyphicon-plus"></span>
                                <%item.sortName%>
                            </li>
	                            <%/each%>
	                	<%/if%>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading noborder">
                    <button class="btn btn-success model-attr-btn" disabled data-toggle="modal" id="add-attri" data-target="#addAttr">
                        <i class="glyphicon-plus"></i>添加属性
                    </button>
                </div>
            </div>
            <div id="attr-table" class="table-responsive">
            </div>
        </div>
    </div>
</div>


<script type="text/template" id="template">
    <form id="add-attr-form" class="form-horizontal form-bordered" method="post" action="/product/attr/add" style="height: 400px;overflow: auto">
        <div class="form-group">
            <label class="col-md-3 control-label">
                属性名称<i class="red">*</i>
            </label>

            <div class="col-md-6">
                <input id="attributeName" value="{attributeName}" class="form-control width300" type="text" placeholder="属性名称" required="required">
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label">
                销售类型<i class="red">*</i>
            </label>

            <div class="col-md-6">
                <select id="saleType"  class="attr-select width300" data-placeholder="销售类型" value="{saleType}" required="required">
                    <option value="">请选择</option>
                    <option value="1">销售属性</option>
                    <option value="2">非销售属性</option>
                    <option value="3">扩展属性</option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label">
                输入类型<i class="red">*</i>
            </label>

            <div class="col-md-6">
                <select id="inputType" class="attr-select width300" data-placeholder="输入类型" value="{inputType}" required="required">
                    <option value="">请选择</option>
                    <option value="radio">单选按钮</option>
                    <option value="checkbox">复选框</option>
                    <option value="select">下拉列表</option>
                    <option value="text">单行文本框</option>
                    <option value="textarea">多行文本框</option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label">
                是否必选
            </label>

            <div class="col-md-6">
                <select id="isMust" value="{isMust}" class="attr-select width300" data-placeholder="是否必选">
                    <option value="">请选择</option>
                    <option value="Y"></option>
                    <option value="N"></option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label">
                启用搜索
            </label>

            <div class="col-md-6">
                <select id="isSearch" value="{isSearch}" class="attr-select width300" data-placeholder="启用搜索">
                    <option value="0">请选择</option>
                    <option value="Y"></option>
                    <option value="N"></option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label">
                最大输入值
            </label>

            <div class="col-md-6">
                <input id="maxValueLen" class="form-control width300" value="{maxValueLen}" type="text" placeholder="最大输入值">
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label">
                是否允许别名
            </label>

            <div class="col-md-6">
                <select id="isAllowAlias" value="{isAllowAlias}" class="attr-select width300" data-placeholder="是否允许别名">
                    <option value="">请选择</option>
                    <option value="Y"></option>
                    <option value="N"></option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label">
                排序
            </label>

            <div class="col-md-6">
                <input id="orderBy" class="form-control width300" type="text" value="{orderBy}" placeholder="排序">
            </div>
        </div>

        <div class="form-group" id="propValue">
            <label class="col-md-3 control-label">
                属性值<i class="red">*</i>
            </label>

            <div class="col-md-6" >
                <input id="attributeValues" value="{attributeValues}" class="form-control width300" type="text" placeholder="属性值" required="required">
                <div id="prop-value-table" class="table-responsive" >

                </div>
            </div>
        </div>

        <!--新增-->
        <div class="form-group">
            <label class="col-md-3 control-label">
                展示位置
            </label>

            <div class="col-md-6">
                <select id="displayPosition" value="{displayPosition}" class="attr-select width300" data-placeholder="展示位置">
                    <option value="">请选择</option>
                    <option value="1">基础商品-非销售属性</option>
                    <option value="2">网售信息-上架后补全信息</option>
                    <option value="3">网售信息-商品参数</option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-3 control-label">
                备注
            </label>

            <div class="col-md-6">
                <textarea id="remark" value="{remark}" class="form-control width300" rows="2" name="remark"></textarea>
            </div>
        </div>


        <div class="form-group hidden">
            <label class="col-md-3 control-label">
                ID<i>*</i>
            </label>

            <div class="col-md-6">
                <input id="categoryId" class="form-control width300" value="" type="text" placeholder="ID">
            </div>
        </div>
        <div class="form-group hidden">
            <label class="col-md-3 control-label">
                attributeId<i class="red">*</i>
            </label>

            <div class="col-md-6">
                <input id="attributeId" class="form-control width300" value="" type="text" placeholder="attributeId">
            </div>
        </div>
    </form>

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