No Description

skulist.blade.php 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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="5%">ID</th>
  17. <th width="7%">sku编码</th>
  18. <th width="10%">规格</th>
  19. <th width="7%">价格</th>
  20. <th width="7%">吊牌价</th>
  21. <th width="7%">参考成本</th>
  22. <th width="7%">是否称重</th>
  23. <th width="7%">库存</th>
  24. <th width="7%">是否启用</th>
  25. <th width="10%">创建时间</th>
  26. <th width="10%">操作</th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. @if($result)
  31. @foreach($result as $a)
  32. <tr class="text-c">
  33. {{--<td><input name="" type="checkbox" value=""></td>--}}
  34. <td class="text-c">{{$a['id']}}</td>
  35. <td class="text-c">{{$a['code']}}</td>
  36. <td class="text-c">{{$a['propsName']}}</td>
  37. <td class="text-c">{{$a['price']}}</td>
  38. <td class="text-c">{{$a['tagPrice']}}</td>
  39. <td class="text-c">{{$a['referenceCost']}}</td>
  40. <td class="text-c">@if($a['is_weigh']==1) 是 @else 否@endif</td>
  41. <td class="text-c">{{$a['quantity']}}</td>
  42. <td class="text-c">@if($a['is_del']==1) 已禁用 @else 已启用 @endif</td>
  43. <td class="text-c">{{$a['createTime']}}</td>
  44. <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>
  45. @if($a['is_del']==0)
  46. <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>
  47. @elseif($a['is_del']==1)
  48. <a style="text-decoration:none" class="ml-5" onClick="admin_up(this, '{{$a['id']}}')" href="javascript:;" title="启用"><span class="btn btn-success radius">启用</span></a>
  49. @endif
  50. </td>
  51. </tr>
  52. @endforeach
  53. @endif
  54. </tbody>
  55. </table>
  56. </div>
  57. </div>
  58. <!--_footer 作为公共模版分离出去-->
  59. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  60. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  61. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  62. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  63. <!--/_footer 作为公共模版分离出去-->
  64. <!--/_footer 作为公共模版分离出去-->
  65. <script type="text/javascript">
  66. $(function(){
  67. setTimeout("$('#info').hide()",3000);
  68. });
  69. /*添加*/
  70. function admin_add(title){
  71. location.href = '/admin/goods/skucreate?goods_id={{$goods_id}}';
  72. }
  73. /*编辑*/
  74. function admin_edit(title,id,goods_id){
  75. location.href = "/admin/goods/skuedit/"+id+'?goods_id='+goods_id;
  76. }
  77. /*删除*/
  78. function admin_del(obj,id){
  79. layer.confirm('确认要禁用吗?',function(index){
  80. $.ajax({
  81. type: 'GET',
  82. url: '/admin/goods/skudelete/'+id,
  83. dataType: 'json',
  84. success: function(data){
  85. if(data == 1){
  86. location.reload();
  87. }
  88. }
  89. });
  90. });
  91. }
  92. /*启用*/
  93. function admin_up(obj,id){
  94. layer.confirm('确认要启用吗?',function(index){
  95. $.ajax({
  96. type: 'GET',
  97. url: '/admin/goods/skuup/'+id,
  98. dataType: 'json',
  99. success: function(data){
  100. if(data == 1){
  101. location.reload();
  102. }
  103. }
  104. });
  105. });
  106. }
  107. </script>
  108. </body>
  109. @endsection