get_sku_html.blade.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <div class="form-group col-sm-12">
  2. <div class="table-responsive">
  3. <table class="table table-striped table-bordered table-hover">
  4. <thead>
  5. <tr>
  6. @foreach ($specAttr as $value)
  7. <th>{{$value['spec_name']}}</th>
  8. @endforeach
  9. <th>课程节数</th>
  10. <th>价格</th>
  11. <th>库存</th>
  12. <th>是否上架</th>
  13. <th>操作</th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17. @foreach ($skuList as $value)
  18. <tr>
  19. @foreach (explode(',',$value['attr_names']) as $v)
  20. <td>{{$v}}</td>
  21. @endforeach
  22. <td><input type="number" name="sku[{{$value['attr_names']}}][course_number]" placeholder="库存" value="{{$value['course_number']}}"></td>
  23. <td><input type="text" name="sku[{{$value['attr_names']}}][price]" placeholder="价格" value="{{$value['price']}}"></td>
  24. <td><input type="number" name="sku[{{$value['attr_names']}}][stock]" placeholder="库存" value="{{$value['stock']}}"></td>
  25. <td>
  26. <select name="sku[{{$value['attr_names']}}][status]" >
  27. <option value="0" @if( $value['status'] == 0) selected @endif >上架</option>
  28. <option value="1" @if( $value['status'] == 1) selected @endif >下架</option>
  29. </select>
  30. </td>
  31. <td><button type="button" class="btn btn-xs btn-danger remove_sku">删除 </button> </td>
  32. </tr>
  33. @endforeach
  34. </tbody>
  35. </table>
  36. </div>
  37. </div>