get_sku_html.blade.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. <th>限购数量</th>
  15. <th>是否上架</th>
  16. <th>操作</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. @foreach ($skuList as $key=>$value)
  21. <tr>
  22. @foreach (explode(',',$value['attr_names']) as $v)
  23. <td>{{$v}}</td>
  24. @endforeach
  25. <td>
  26. <div id="sku_thumb{{$key}}">
  27. <a id="sku_thumb-image{{$key}}" href="#" data-toggle="image" class="img-thumb">
  28. <img src="{{path_compat($value['sku_thumb']??'')}}" height="30" />
  29. </a>
  30. <input type="hidden" name="sku[{{$value['attr_names']}}][sku_thumb]" laceholder="缩略图" value="{{$value['sku_thumb']??''}}" id="input-sku_thumb{{$key}}" />
  31. </div>
  32. </td>
  33. <td><input type="text" name="sku[{{$value['attr_names']}}][market_price]" placeholder="原价" value="{{$value['market_price']}}"></td>
  34. <td><input type="text" name="sku[{{$value['attr_names']}}][price]" placeholder="折扣价" value="{{$value['price']}}"></td>
  35. <td><input type="number" name="sku[{{$value['attr_names']}}][stock]" placeholder="库存" value="{{$value['stock']}}"></td>
  36. <td><input type="number" name="sku[{{$value['attr_names']}}][min_quota]" placeholder="起购数量" value="{{$value['min_quota']}}"></td>
  37. <td><input type="number" name="sku[{{$value['attr_names']}}][quota]" placeholder="限购数量" value="{{$value['quota']}}"></td>
  38. <td>
  39. <select name="sku[{{$value['attr_names']}}][status]" >
  40. <option value="0" @if( $value['status'] == 0) selected @endif >上架</option>
  41. <option value="1" @if( $value['status'] == 1) selected @endif >下架</option>
  42. </select>
  43. </td>
  44. <td><button type="button" class="btn btn-xs btn-danger remove_sku">删除 </button> </td>
  45. </tr>
  46. @endforeach
  47. </tbody>
  48. </table>
  49. </div>
  50. </div>