Нет описания

skulist.blade.php 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. <a style="text-decoration:none" class="ml-5" onClick="admin_delete(this, '{{$a['id']}}')" href="javascript:;" title="删除"><span class="btn btn-danger radius">删除</span></a>
  51. </td>
  52. </tr>
  53. @endforeach
  54. @endif
  55. </tbody>
  56. </table>
  57. </div>
  58. </div>
  59. <!--_footer 作为公共模版分离出去-->
  60. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  61. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  62. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  63. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  64. <!--/_footer 作为公共模版分离出去-->
  65. <!--/_footer 作为公共模版分离出去-->
  66. <script type="text/javascript">
  67. $(function(){
  68. setTimeout("$('#info').hide()",3000);
  69. });
  70. /*添加*/
  71. function admin_add(title){
  72. location.href = '/admin/goods/skucreate?goods_id={{$goods_id}}';
  73. }
  74. /*编辑*/
  75. function admin_edit(title,id,goods_id){
  76. location.href = "/admin/goods/skuedit/"+id+'?goods_id='+goods_id;
  77. }
  78. /*禁用*/
  79. function admin_del(obj,id){
  80. layer.confirm('确认要禁用吗?',function(index){
  81. $.ajax({
  82. type: 'GET',
  83. url: '/admin/goods/skudelete/'+id,
  84. dataType: 'json',
  85. success: function(data){
  86. if(data == 1){
  87. location.reload();
  88. }
  89. }
  90. });
  91. });
  92. }
  93. /*删除*/
  94. function admin_delete(obj,id){
  95. layer.confirm('确认要删除吗?',function(index){
  96. $.ajax({
  97. type: 'GET',
  98. url: '/admin/goods/skudelete2/'+id,
  99. dataType: 'json',
  100. success: function(data){
  101. if(data == 1){
  102. location.reload();
  103. }
  104. }
  105. });
  106. });
  107. }
  108. /*启用*/
  109. function admin_up(obj,id){
  110. layer.confirm('确认要启用吗?',function(index){
  111. $.ajax({
  112. type: 'GET',
  113. url: '/admin/goods/skuup/'+id,
  114. dataType: 'json',
  115. success: function(data){
  116. if(data == 1){
  117. location.reload();
  118. }
  119. }
  120. });
  121. });
  122. }
  123. </script>
  124. </body>
  125. @endsection