123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- @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>
- <div>
- <a class="btn btn-primary radius" onclick="order_add('新增', 0)" href="javascript:;"><i class="Hui-iconfont"></i> 新增订单</a>
- <input class="input-text" style="width:5%;text-align:center" type="text" value="订单编号"/>
- <input id="order_id" type="text" class="input-text" style="width:6%;text-align:center" name="order_id" value="{{$order_id?$order_id:''}}">
- <input class="input-text" style="width:5%;text-align:center" type="text" value="收货人"/>
- <input id="receiverName" type="text" class="input-text" style="width:6%;text-align:center" name="receiverName" value="{{$receiverName?$receiverName:''}}">
- <input class="input-text" style="width:5%;text-align:center" type="text" value="手机号"/>
- <input id="receiverMobile" type="text" class="input-text" style="width:6%;text-align:center" name="receiverMobile" value="{{$receiverMobile?$receiverMobile:''}}">
- <input type="text" style="width:5%;text-align:center" class="input-text" value="订单类型"/>
- <select name="" id="service_type" class="input-text" style="width:5%;text-align:center" >
- <option value="0">请选择</option>
- <option value="1" @if($service_type == 1) selected @endif>退补</option>
- <option value="2" @if($service_type == 2) selected @endif>售后</option>
- </select>
- <div style="float:right">
- <a class="btn btn-primary radius" onclick="user_search()" href="javascript:;">搜索</a>
- </div>
- </div>
- </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="4%"><!--input type="checkbox" id="selected-all"-->订单编号</th>
- <th width="4%">收货人</th>
- <th width="4%">收货人手机号</th>
- <th width="5%">收货地址</th>
- {{--<th width="8%">商品信息</th>--}}
- <th width="5%">物流单号</th>
- <th width="4%">发货时间</th>
- <th width="4%">付款金额</th>
- <th width="4%">付款方式</th>
- <th width="4%">订单类型</th>
- <th width="5%">下单时间</th>
- <th width="5%">操作</th>
- </tr>
- </thead>
- <tbody>
- @if($result)
- @foreach($result as $a)
- <tr class="text-c" style=" text-align:center;">
- <td>{{$a['order_id']}}</td>
- <td>{{$a['receiverName']}}</td>
- <td>{{$a['receiverMobile']}}</td>
- <td>{{$a['receiverState']}}{{$a['receiverCity']}}{{$a['receiverDistrict']}}{{$a['receiverStreet']}}{{$a['receiverAddress']}}</td>
- <td>{{$a['logistics_id']}}</td>
- <td>{{$a['send_time']}}</td>
- <td>{{$a['receivedAmount']}}</td>
- <td>{{$a['payment_type']}}</td>
- <td>@if($a['service_type'] == 1) 退补 @elseif($a['service_type'] == 2) 售后 @endif</td>
- <td>{{$a['createTime']}}</td>
- <td>
- <a style="text-decoration:none" onClick='order_edit("编辑","{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>
- <a style="text-decoration:none" onClick='order_goods_info("查看商品","{{$a['id']}}")' href="javascript:;" title="查看商品"><span class="btn btn-primary radius">查看商品</span></a>
- </td>
- </tr>
- @endforeach
- @endif
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!--弹出层 推入分组-->
- <div id="modal-demo1" class="modal fade" tabnonautomatic_index="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content radius">
- <div class="modal-body" style="height:150px">
- <div id="fa2" style="margin: auto;">
- <p style="font-size:14px">请输入订单id</p>
- <input id='add_order_id' type='text' class="input-text" style="padding-left: 10px;" name='order_id' value=''/><br><br>
- <button class="btn btn-primary radius" onclick='order_create()' value=" 确定 "> 确定 </button>
- <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!--弹出层 推入分组-->
- <div id="modal-demo3" class="modal fade" tabnonautomatic_index="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content radius">
- <div class="modal-body">
- <table class="table table-border table-bordered table-bg table-hover table-sort">
- <thead>
- <tr class="text-c">
- <th width="4%">商品名称</th>
- <th width="4%">规格</th>
- <th width="4%">规格编码</th>
- <th width="4%">成本价</th>
- <th width="4%">初始数量</th>
- <th width="4%">现在数量</th>
- <th width="4%">修改数量</th>
- </tr>
- </thead>
- <tbody id="g_tr">
- </tbody>
- </table>
- <div id='g_total'></div>
- <div style="float:right">
- <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
- </div>
- <br>
- </div>
- </div>
- </div>
- </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>
- <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
- <!--/_footer 作为公共模版分离出去-->
- <!--/_footer 作为公共模版分离出去-->
- <script type="text/javascript">
- /*广告-编辑*/
- function order_edit(title,id){
- location.href="/admin/customerServiceAfterSale/edit?id="+id;
- }
- /*弹出层-填写原因*/
- function order_add() {
- $("#modal-demo1").modal("show");
- }
- function order_create(){
- var id = $("#add_order_id").val();
- location.href = '/admin/customerServiceAfterSale/create?order_id='+id;
- }
- function order_goods_info(text, id){
- $.ajax({
- url: '/admin/customerServiceAfterSale/order_goods_info?id='+id,
- type: 'get',
- dateType: 'json',
- success:function(data){
- if(data != '0'){
- data = eval("("+data+")");
- var old_total = data.old_total;
- var new_total = data.new_total;
- data = data.data;
- var str = '';
- for (var i = 0, l = data.length; i < l; i++) {
- var item = data[i];
- str += '<tr>';
- str += '<td>'+ item.goods_name+'<\/td>';
- str += '<td>'+ item.properties_name+'<\/td>';
- str += '<td>'+ item.sku_code+'<\/td>';
- str += '<td>'+ item.cost+'<\/td>';
- str += '<td>'+ item.old_quantity+'<\/td>';
- str += '<td>'+ item.new_quantity+'<\/td>';
- str += '<td>'+ (item.new_quantity - item.old_quantity) +'<\/td>';
- str += '</tr>';
- }
- $("#g_tr").html(str);
- $("#g_total").html('原商品总计:'+old_total+'元,现商品总计:'+new_total+'元,需退补:'+(new_total-old_total)+'元');
- $("#modal-demo3").modal("show");
- }
- }
- });
- }
- function user_search(){
- var receiverName = $('#receiverName').val();
- var receiverMobile = $('#receiverMobile').val();
- var order_id = $('#order_id').val();
- var page = '{{$page}}';
- var service_type = $('#service_type').val();
- location.href = 'index?page='+page+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&order_id='+order_id+'&service_type='+service_type;
- }
- /*分页*/
- $("#page").paging({
- pageNo:{{$page}},
- totalPage: {{$pages}},
- totalSize: {{$count}},
- callback: function(num) {
- var receiverName = $('#receiverName').val();
- var receiverMobile = $('#receiverMobile').val();
- var order_id = $('#order_id').val();
- var service_type = $('#service_type').val();
- location.href = 'index?page='+num+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&order_id='+order_id+'&service_type='+service_type;
- }
- })
- </script>
- </body>
- @endsection
|