| | |
| | | |
| | | // 商品点击 |
| | | $(document).on('click','.box-mat-item', function () { |
| | | var tagId = $(this).children('input').get(0).value; |
| | | parent.findBySelect($(this).children('input').get(0)) |
| | | }) |
| | | |
| | | // 展示归类 |
| | |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | if (res.data != null && res.data.length > 0) { |
| | | console.log(res.data) |
| | | var tplDom = $("#tagTpl"); |
| | | var tpl = tplDom.html(); |
| | | var template = Handlebars.compile(tpl); |
| | |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | if (res.data != null && res.data.length > 0) { |
| | | console.log(res.data) |
| | | var tplDom = $("#matTpl"); |
| | | var tpl = tplDom.html(); |
| | | var template = Handlebars.compile(tpl); |
| | |
| | | <script type="text/template" id="matTpl"> |
| | | {{#each data}} |
| | | <div class="box-mat-item"> |
| | | <input name="matId" type="hidden" value="{{this.id}}"> |
| | | <input name="matnr" type="hidden" value="{{this.matnr}}"> |
| | | <div class="box-mat-item-label">{{this.maktx}}</div> |
| | | </div> |
| | | {{/each}} |