123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- @extends('admin/master')
- @section('content')
- <body>
- @if(session('info'))
- <div class="Huialert Huialert-info" onclick="$(this).remove()" id="info">
- {{session('info')}}
- </div>
- @endif
- <div class="page-container">
- <div>
- <input class="input-text" style="width:5%;text-align:center" type="text" value="商品名称"/>
- <input id="name" type="text" class="input-text" style="width:8%;text-align:center" name="name" value="{{$name?$name:''}}">
- <input class="input-text" style="width:5%;text-align:center" type="text" value="商品分类"/>
- <select class="select-box" style="width:7%;text-align:center" name="cate_name" id='cate_name'>
- <option value="0" @if($cate_name=='') selected @endif>选择分类</option>
- @foreach($cates as $v)
- <option value="{{$v}}" @if($cate_name==$v) selected @endif>{{$v}}</option>
- @endforeach
- </select>
- <input class="input-text" style="width:5%;text-align:center" type="text" value="商品状态"/>
- <select class="select-box" style="width:7%;text-align:center" name="status" id='status'>
- <option value="-1" @if($status=='-1') selected @endif>选择状态</option>
- <option value="0" @if($status=='0') selected @endif>已上架</option>
- <option value="1" @if($status=='1') selected @endif>已下架</option>
- </select>
- <input class="input-text" style="width:7%;text-align:center" type="text" value="商品可用库存"/>
- <select class="select-box" style="width:7%;text-align:center" name="quantity" id='quantity'>
- <option value="-1" @if($quantity=='-1') selected @endif>选择库存</option>
- <option value="1" @if($quantity=='1') selected @endif>商品可用库存大于0</option>
- </select>
- <input class="input-text" style="width:6%;text-align:center" type="text" value="分销商价格"/>
- <select class="select-box" style="width:7%;text-align:center" name="outPrice" id='outPrice'>
- <option value="-1" @if($outPrice=='-1') selected @endif>选择价格</option>
- <option value="1" @if($outPrice=='1') selected @endif>分销商价格大于0</option>
- </select>
- <a class="btn btn-primary radius" onclick="user_search()" href="javascript:;">搜索</a>
- <a class="btn btn-primary radius" onclick="goods_export()" href="javascript:;">导出商品</a>
- </div>
- <div class="mt-20">
- <table class="table table-border table-bordered table-bg table-hover table-sort">
- <thead>
- <tr class="text-c">
- {{--<th width="25"><input type="checkbox" name="" value=""></th>--}}
- <th width="5%">商品分类</th>
- <th width="5%">商品名称</th>
- <th width="8%">商品规格</th>
- <th width="5%">规格编码</th>
- <th width="8%">建议零售价</th>
- <th width="5%">分销商价格</th>
- <th width="5%">上架状态</th>
- <th width="8%">上架时间</th>
- <th width="5%">可用库存</th>
- <th width="5%">总库存</th>
- <th width="5%">预占用库存</th>
- </tr>
- </thead>
- <tbody>
- @if($result)
- @foreach($result as $a)
- <tr class="text-c">
- {{--<td><input name="" type="checkbox" value=""></td>--}}
- <td class="text-c">{{$a['goodsCategoryName']}}</td>
- <td class="text-c">{{$a['name']}}</td>
- <td class="text-c">{{$a['propsName']}}{{$a['is_weigh'] == 1 ? '【按半斤称重】' : ''}}</td>
- <td class="text-c">{{$a['code']}}</td>
- <td class="text-c">{{$a['price']}}</td>
- <td class="text-c">{{$a['outPrice']}}</td>
- {{--<td class ="change_logistics_id">--}}
- {{--<p id="referenceCost_1{{$a['id']}}">{{$a['referenceCost']}}</p>--}}
- {{--<input id="referenceCost_2{{$a['id']}}" style="display: none" type='text' name='referenceCost' value="{{$a['referenceCost']}}" onblur="change_referenceCost({{$a['id']}})" />--}}
- {{--<span class="sort_icon" hidden onClick='change_referenceCost_click("{{$a['id']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>--}}
- {{--</td>--}}
- {{--<td class="text-c">{{$a['price']}}</td>--}}
- {{--<td class ="change_logistics_id">--}}
- {{--<p id="price_1{{$a['id']}}">{{$a['price']}}</p>--}}
- {{--<input id="price_2{{$a['id']}}" style="display: none" type='text' name='price' value="{{$a['price']}}" onblur="change_price({{$a['id']}})" />--}}
- {{--<span class="sort_icon" hidden onClick='change_price_click("{{$a['id']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>--}}
- {{--</td>--}}
- {{--<td class="text-c">{{$a['outPrice']}}</td>--}}
- {{--<td class ="change_logistics_id">--}}
- {{--<p id="outPrice_1{{$a['id']}}">{{$a['outPrice']}}</p>--}}
- {{--<input id="outPrice_2{{$a['id']}}" style="display: none" type='text' name='outPrice' value="{{$a['outPrice']}}" onblur="change_outPrice({{$a['id']}})" />--}}
- {{--<span class="sort_icon" hidden onClick='change_outPrice_click("{{$a['id']}}")' style="cursor:pointer"><i class="Hui-iconfont"></i></span>--}}
- {{--</td>--}}
- <td class="text-c">@if($a['is_del']==1) <span class="btn btn-danger radius">已下架</span> @else <span class="btn btn-success radius">已上架</span> @endif</td>
- <td class="text-c">{{$a['createTime']}}</td>
- <td class="text-c">{{$a['real_quantity']}}</td>
- <td class="text-c">{{$a['total_quantity']}}</td>
- <td class="text-c">{{$a['pre_quantity']}}</td>
- </tr>
- @endforeach
- @endif
- </tbody>
- </table>
- </div>
- <div id="page" class="page_div"></div>
- </div>
- <!--_footer 作为公共模版分离出去-->
- <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
- <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
- <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
- <!--/_footer 作为公共模版分离出去-->
- <!--/_footer 作为公共模版分离出去-->
- <script type="text/javascript">
- $(function(){
- setTimeout("$('#info').hide()",3000);
- });
- function user_search() {
- var name = $('#name').val();
- var cate_name = $('#cate_name').val();
- var status = $('#status').val();
- var quantity = $('#quantity').val();
- var outPrice = $('#outPrice').val();
- location.href = 'goodsindex?page=' + num + '&name=' + name + '&cate_name=' + cate_name + '&status=' + status + '&quantity=' + quantity + '&outPrice=' + outPrice;
- }
- function goods_export() {
- var name = $('#name').val();
- var cate_name = $('#cate_name').val();
- var status = $('#status').val();
- var quantity = $('#quantity').val();
- var outPrice = $('#outPrice').val();
- location.href = 'goodsindexexport?name=' + name + '&cate_name=' + cate_name + '&status=' + status + '&quantity=' + quantity + '&outPrice=' + outPrice;
- }
- $("#page").paging({
- pageNo:{{$page}},
- totalPage: {{$pages}},
- totalSize: {{$count}},
- callback: function(num) {
- var name = $('#name').val();
- var cate_name = $('#cate_name').val();
- var status = $('#status').val();
- var quantity = $('#quantity').val();
- var outPrice = $('#outPrice').val();
- location.href = 'goodsindex?page=' + num + '&name=' + name + '&cate_name=' + cate_name + '&status=' + status + '&quantity=' + quantity + '&outPrice=' + outPrice;
- }
- })
- // function change_outPrice_click(id){
- // $("#outPrice_1"+id).hide();
- // $("#outPrice_2"+id).show();
- // $("#outPrice_2"+id).focus();
- // }
- //
- // function change_outPrice(id){
- // var outPrice = $("#outPrice_2"+id).val();
- // $.ajax({
- // url: '/admin/goods/editGoodsSku?id='+id+'&outPrice='+outPrice,
- // type: 'get',
- // dateType: 'json',
- // success:function(msg){
- // $("#outPrice_1"+id).html(outPrice);
- // $("#outPrice_1"+id).show();
- // $("#outPrice_2"+id).hide();
- // }
- // });
- // }
- //
- // function change_price_click(id){
- // $("#price_1"+id).hide();
- // $("#price_2"+id).show();
- // $("#price_2"+id).focus();
- // }
- //
- // function change_price(id){
- // var price = $("#price_2"+id).val();
- // $.ajax({
- // url: '/admin/goods/editGoodsSku?id='+id+'&price='+price,
- // type: 'get',
- // dateType: 'json',
- // success:function(msg){
- // if(msg != 0){
- // console.log(msg);
- // }
- // $("#price_1"+id).html(price);
- // $("#price_1"+id).show();
- // $("#price_2"+id).hide();
- // }
- // });
- // }
- //
- // function change_referenceCost_click(id){
- // $("#referenceCost_1"+id).hide();
- // $("#referenceCost_2"+id).show();
- // $("#referenceCost_2"+id).focus();
- // }
- //
- // function change_referenceCost(id){
- // var referenceCost = $("#referenceCost_2"+id).val();
- // $.ajax({
- // url: '/admin/goods/editGoodsSku?id='+id+'&referenceCost='+referenceCost,
- // type: 'get',
- // dateType: 'json',
- // success:function(msg){
- // if(msg != 0){
- // console.log(msg);
- // }
- // $("#referenceCost_1"+id).html(referenceCost);
- // $("#referenceCost_1"+id).show();
- // $("#referenceCost_2"+id).hide();
- // }
- // });
- // }
- //
- // $(".change_logistics_id").mouseover(
- // function(){
- // $(this).children("span").show();
- // $(this).children("span").addClass('f-18 c-success');
- // $(this).mouseout(
- // function(){
- // $(this).children("span").hide();
- // }
- // );
- // }
- // );
- </script>
- </body>
- @endsection
|