goods-params.html 4.48 KB
<div class="panel panel-default" id="taoyu1">
    <div class="panel-heading">
       <a class="netsale-position" href="javascript:;" name="position6"></a>
        <div class="panel-btns" style="display: none;">
            <a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>
        </div>
        <h2 class="panel-title">商品参数</h2>
    </div>
    <div class="panel-body">
        <div id="attributeTable" class="panel-body nopadding">
        </div>
        <div id="goodsParamWrap" class="panel-body nopadding">
        </div>
        <div id="goodsParamWrap2" class="panel-body nopadding">
        </div>
    </div>
    
    <div class="panel-footer" id="goodsParams-footer">
        <a href="javascript:;" class="btn btn-primary" id="propertySave">保存</a>
    </div>
</div>

<!-- <script type="text/template" id="material-params">
    <label class="col-sm-2 control-label">材质</label>
    <div class="col-sm-8 height40">
        [[each data as item index]]
            <label style="cursor: pointer;"><input type="checkbox" name="material" class="material" value=[[item.id]]>[[item.text]]</label>
        [[/each]]
    </div>
    <input type="hidden" id="material" value="{material}" for="checkbox">
            
</script>

<script type="text/template" id="washTip-params">
    <label class="col-sm-2 control-label">洗涤提示</label>
    <div class="col-sm-8 height40">
        [[each data as item index]]
            <label style="cursor: pointer;"><input type="checkbox" name="washTips" class="washTips" value=[[item.id]]>[[item.text]]</label>
        [[/each]]
    </div>
    <input type="hidden" id="washTips" value="{washTips}" for="checkbox">
</script> -->

<!-- <script type="text/template" id="goodsParamTemp">
    [[each data as b index]]
        [[if b.idNameList && b.idNameList.length>0]]
        <div class="goods-param-group form-group">
            <label>[[b.attributeName]]:</label>
            [[if b.inputType=='select']]
                <div style="display: inline-block;width: 280px;">
                    <select class="form-control" id="[[b.attributeId]]" value="[[b.selectedValues||'']]">
                        [[each b.idNameList as c index]]
                        <option value="[[c.id]]">[[c.text]]</option>
                        [[/each]]
                    </select>
                </div>
            [[else]]
                <span>
                [[each b.idNameList as c index]]
                <label style="cursor: pointer;"><input name="[[b.attributeId]]" type="[[b.inputType]]" value="[[c.id]]">[[c.text]]</label>
                [[/each]]
                </span>
                <input id="[[b.attributeId]]" type="hidden" for="[[b.inputType]]" value="[[b.selectedValues||'']]" placeholder="[[b.attributeName]]" required>
            [[/if]]
        </div>
        [[/if]]
    [[/each]]
</script> -->

<script type="text/template" id="template33">
<div class="form-group">
[[if inputType=='checkbox']]
    [[each idNameList as item index ]]
<label class="radio-inline">
    <input type="checkbox" name="[[__name]]_attr_[[__index]]" data-index=[[__index]] class="attr_checkobx_class" value="[[item.id]]">[[item.text]]</label>
    [[/each]]
    <input type="hidden" id="[[__name]]_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="[[__name]]_attr_[[__index]]" data-index=[[__index]] class="attr_input" value="[[item.id]]">[[item.text]]</label>
[[/each]]
<input type="hidden" id="[[__name]]_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>