Nessuna descrizione

skulist.blade.php 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. @extends('admin/master')
  2. @section('content')
  3. <body>
  4. @if(session('info'))
  5. <div class="Huialert Huialert-info" onclick="$(this).remove()" id="info">
  6. {{session('info')}}
  7. </div>
  8. @endif
  9. <div class="page-container">
  10. <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" onclick="admin_add('新增')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 新增规格</a></span> </div>
  11. <div class="mt-20">
  12. <table class="table table-border table-bordered table-bg table-hover table-sort">
  13. <thead>
  14. <tr class="text-c">
  15. {{--<th width="25"><input type="checkbox" name="" value=""></th>--}}
  16. <th width="10%">ID</th>
  17. <th width="10%">sku编码</th>
  18. <th width="10%">规格</th>
  19. <th width="10%">价格</th>
  20. <th width="10%">吊牌价</th>
  21. <th width="10%">参考成本</th>
  22. <th width="10%">是否称重</th>
  23. <th width="10%">库存</th>
  24. <th width="10%">创建时间</th>
  25. <th width="10%">操作</th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. @if($result)
  30. @foreach($result as $a)
  31. <tr class="text-c">
  32. {{--<td><input name="" type="checkbox" value=""></td>--}}
  33. <td class="text-c">{{$a['id']}}</td>
  34. <td class="text-c">{{$a['code']}}</td>
  35. <td class="text-c">{{$a['propsName']}}</td>
  36. <td class="text-c">{{$a['price']}}</td>
  37. <td class="text-c">{{$a['tagPrice']}}</td>
  38. <td class="text-c">{{$a['referenceCost']}}</td>
  39. <td class="text-c">@if($a['is_weigh']==1) 是 @else 否@endif</td>
  40. <td class="text-c">{{$a['quantity']}}</td>
  41. <td class="text-c">{{$a['createTime']}}</td>
  42. <td class="f-14 product-brand-manage"><a style="text-decoration:none" onClick='admin_edit("编辑","{{$a['id']}}","{{$a['goodsCode']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>
  43. <a style="text-decoration:none" class="ml-5" onClick="admin_del(this, '{{$a['id']}}')" href="javascript:;" title="删除"><span class="btn btn-danger radius">删除</span></a></td>
  44. </tr>
  45. @endforeach
  46. @endif
  47. </tbody>
  48. </table>
  49. </div>
  50. </div>
  51. <!--_footer 作为公共模版分离出去-->
  52. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  53. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  54. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  55. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  56. <!--/_footer 作为公共模版分离出去-->
  57. <!--/_footer 作为公共模版分离出去-->
  58. <script type="text/javascript">
  59. $(function(){
  60. setTimeout("$('#info').hide()",3000);
  61. });
  62. /*添加*/
  63. function admin_add(title){
  64. location.href = '/admin/goods/skucreate?goods_id={{$goods_id}}';
  65. }
  66. /*编辑*/
  67. function admin_edit(title,id,goods_id){
  68. location.href = "/admin/goods/skuedit/"+id+'?goods_id='+goods_id;
  69. }
  70. /*删除*/
  71. function admin_del(obj,id){
  72. layer.confirm('确认要删除吗?',function(index){
  73. $.ajax({
  74. type: 'GET',
  75. url: '/admin/goods/skudelete/'+id,
  76. dataType: 'json',
  77. success: function(data){
  78. if(data == 1){
  79. $(obj).parents("tr").remove();
  80. layer.msg('已删除!',{icon:1,time:1000});
  81. }
  82. }
  83. });
  84. });
  85. }
  86. </script>
  87. </body>
  88. @endsection