spec_many.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!-- 商品规格属性模板 -->
  2. <script id="tpl_spec_attr" type="text/template">
  3. {{ each spec_attr }}
  4. <div class="spec-group-item" data-index="{{ $index }}" data-group-id="{{ $value.group_id }}">
  5. <div class="spec-group-name">
  6. <span>{{ $value.group_name }}</span>
  7. <i class="spec-group-delete iconfont icon-shanchu1" title="点击删除"></i>
  8. </div>
  9. <div class="spec-list am-cf">
  10. {{ each $value.spec_items item key }}
  11. <div class="spec-item am-fl" data-item-index="{{ key }}">
  12. <span>{{ item.spec_value }}</span>
  13. <i class="spec-item-delete iconfont icon-shanchu1" title="点击删除"></i>
  14. </div>
  15. {{ /each }}
  16. <div class="spec-item-add am-cf am-fl">
  17. <input type="text" class="ipt-specItem am-fl am-field-valid">
  18. <button type="button" class="btn-addSpecItem am-btn am-fl">添加</button>
  19. </div>
  20. </div>
  21. </div>
  22. {{ /each }}
  23. </script>
  24. <!-- 商品规格table模板 -->
  25. <script id="tpl_spec_table" type="text/template">
  26. <tbody>
  27. <tr>
  28. {{ each spec_attr }}
  29. <th>{{ $value.group_name }}</th>
  30. {{ /each }}
  31. <th>规格图片</th>
  32. <th>商家编码</th>
  33. <th>销售价</th>
  34. <th>划线价</th>
  35. <th>库存</th>
  36. <th>重量(kg)</th>
  37. </tr>
  38. {{ each spec_list item }}
  39. <tr data-index="{{ $index }}" data-sku-id="{{ item.spec_sku_id }}">
  40. {{ each item.rows td itemKey }}
  41. <td class="td-spec-value am-text-middle" rowspan="{{ td.rowspan }}">
  42. {{ td.spec_value }}
  43. </td>
  44. {{ /each }}
  45. <td class="am-text-middle spec-image">
  46. <div class="upload-image">
  47. <i class="iconfont icon-add"></i>
  48. </div>
  49. </td>
  50. <td>
  51. <input type="text" name="goods_no" value="{{ item.form.goods_no }}" class="ipt-goods-no am-field-valid">
  52. </td>
  53. <td>
  54. <input type="number" name="goods_price" value="{{ item.form.goods_price }}" class="am-field-valid ipt-w80"
  55. required>
  56. </td>
  57. <td>
  58. <input type="number" name="line_price" value="{{ item.form.line_price }}" class="am-field-valid ipt-w80">
  59. </td>
  60. <td>
  61. <input type="number" name="stock_num" value="{{ item.form.stock_num }}" class="am-field-valid ipt-w80"
  62. required>
  63. </td>
  64. <td>
  65. <input type="number" name="goods_weight" value="{{ item.form.goods_weight }}" class="am-field-valid ipt-w80"
  66. required>
  67. </td>
  68. </tr>
  69. {{ /each }}
  70. </tbody>
  71. </script>