Nenhuma Descrição

customerServiceAfterSaleList.blade.php 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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>
  11. <div>
  12. <a class="btn btn-primary radius" onclick="order_add('新增', 0)" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 新增订单</a>
  13. <input class="input-text" style="width:5%;text-align:center" type="text" value="订单编号"/>
  14. <input id="order_id" type="text" class="input-text" style="width:6%;text-align:center" name="order_id" value="{{$order_id?$order_id:''}}">
  15. <input class="input-text" style="width:5%;text-align:center" type="text" value="收货人"/>
  16. <input id="receiverName" type="text" class="input-text" style="width:6%;text-align:center" name="receiverName" value="{{$receiverName?$receiverName:''}}">
  17. <input class="input-text" style="width:5%;text-align:center" type="text" value="手机号"/>
  18. <input id="receiverMobile" type="text" class="input-text" style="width:6%;text-align:center" name="receiverMobile" value="{{$receiverMobile?$receiverMobile:''}}">
  19. <input type="text" style="width:5%;text-align:center" class="input-text" value="订单类型"/>
  20. <select name="" id="service_type" class="input-text" style="width:5%;text-align:center" >
  21. <option value="0">请选择</option>
  22. <option value="1" @if($service_type == 1) selected @endif>退补</option>
  23. <option value="2" @if($service_type == 2) selected @endif>售后</option>
  24. </select>
  25. <div style="float:right">
  26. <a class="btn btn-primary radius" onclick="user_search()" href="javascript:;">搜索</a>
  27. </div>
  28. </div>
  29. </div>
  30. <div class="mt-20">
  31. <table class="table table-border table-bordered table-bg table-hover table-sort">
  32. <thead>
  33. <tr class="text-c">
  34. <th width="4%"><!--input type="checkbox" id="selected-all"-->订单编号</th>
  35. <th width="4%">收货人</th>
  36. <th width="4%">收货人手机号</th>
  37. <th width="5%">收货地址</th>
  38. {{--<th width="8%">商品信息</th>--}}
  39. <th width="5%">物流单号</th>
  40. <th width="4%">发货时间</th>
  41. <th width="4%">付款金额</th>
  42. <th width="4%">付款方式</th>
  43. <th width="4%">订单类型</th>
  44. <th width="5%">下单时间</th>
  45. <th width="5%">操作</th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. @if($result)
  50. @foreach($result as $a)
  51. <tr class="text-c" style=" text-align:center;">
  52. <td>{{$a['order_id']}}</td>
  53. <td>{{$a['receiverName']}}</td>
  54. <td>{{$a['receiverMobile']}}</td>
  55. <td>{{$a['receiverState']}}{{$a['receiverCity']}}{{$a['receiverDistrict']}}{{$a['receiverStreet']}}{{$a['receiverAddress']}}</td>
  56. <td>{{$a['logistics_id']}}</td>
  57. <td>{{$a['send_time']}}</td>
  58. <td>{{$a['receivedAmount']}}</td>
  59. <td>{{$a['payment_type']}}</td>
  60. <td>@if($a['service_type'] == 1) 退补 @elseif($a['service_type'] == 2) 售后 @endif</td>
  61. <td>{{$a['createTime']}}</td>
  62. <td>
  63. <a style="text-decoration:none" onClick='order_edit("编辑","{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>
  64. <a style="text-decoration:none" onClick='order_goods_info("查看商品","{{$a['id']}}")' href="javascript:;" title="查看商品"><span class="btn btn-primary radius">查看商品</span></a>
  65. </td>
  66. </tr>
  67. @endforeach
  68. @endif
  69. </tbody>
  70. </table>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <!--弹出层 推入分组-->
  77. <div id="modal-demo1" class="modal fade" tabnonautomatic_index="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  78. <div class="modal-dialog">
  79. <div class="modal-content radius">
  80. <div class="modal-body" style="height:150px">
  81. <div id="fa2" style="margin: auto;">
  82. <p style="font-size:14px">请输入订单id</p>
  83. <input id='add_order_id' type='text' class="input-text" style="padding-left: 10px;" name='order_id' value=''/><br><br>
  84. <button class="btn btn-primary radius" onclick='order_create()' value="&nbsp;&nbsp;确定&nbsp;&nbsp;">&nbsp;&nbsp;确定&nbsp;&nbsp;</button>&nbsp;
  85. <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <!--弹出层 推入分组-->
  92. <div id="modal-demo3" class="modal fade" tabnonautomatic_index="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  93. <div class="modal-dialog">
  94. <div class="modal-content radius">
  95. <div class="modal-body">
  96. <table class="table table-border table-bordered table-bg table-hover table-sort">
  97. <thead>
  98. <tr class="text-c">
  99. <th width="4%">商品名称</th>
  100. <th width="4%">规格</th>
  101. <th width="4%">规格编码</th>
  102. <th width="4%">成本价</th>
  103. <th width="4%">初始数量</th>
  104. <th width="4%">现在数量</th>
  105. <th width="4%">修改数量</th>
  106. </tr>
  107. </thead>
  108. <tbody id="g_tr">
  109. </tbody>
  110. </table>
  111. <div id='g_total'></div>
  112. <div style="float:right">
  113. <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  114. </div>
  115. <br>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. <div id="page" class="page_div"></div>
  121. </div>
  122. <!--_footer 作为公共模版分离出去-->
  123. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  124. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  125. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  126. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  127. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  128. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  129. <!--/_footer 作为公共模版分离出去-->
  130. <!--/_footer 作为公共模版分离出去-->
  131. <script type="text/javascript">
  132. /*广告-编辑*/
  133. function order_edit(title,id){
  134. location.href="/admin/customerServiceAfterSale/edit?id="+id;
  135. }
  136. /*弹出层-填写原因*/
  137. function order_add() {
  138. $("#modal-demo1").modal("show");
  139. }
  140. function order_create(){
  141. var id = $("#add_order_id").val();
  142. location.href = '/admin/customerServiceAfterSale/create?order_id='+id;
  143. }
  144. function order_goods_info(text, id){
  145. $.ajax({
  146. url: '/admin/customerServiceAfterSale/order_goods_info?id='+id,
  147. type: 'get',
  148. dateType: 'json',
  149. success:function(data){
  150. if(data != '0'){
  151. data = eval("("+data+")");
  152. var old_total = data.old_total;
  153. var new_total = data.new_total;
  154. data = data.data;
  155. var str = '';
  156. for (var i = 0, l = data.length; i < l; i++) {
  157. var item = data[i];
  158. str += '<tr>';
  159. str += '<td>'+ item.goods_name+'<\/td>';
  160. str += '<td>'+ item.properties_name+'<\/td>';
  161. str += '<td>'+ item.sku_code+'<\/td>';
  162. str += '<td>'+ item.cost+'<\/td>';
  163. str += '<td>'+ item.old_quantity+'<\/td>';
  164. str += '<td>'+ item.new_quantity+'<\/td>';
  165. str += '<td>'+ (item.new_quantity - item.old_quantity) +'<\/td>';
  166. str += '</tr>';
  167. }
  168. $("#g_tr").html(str);
  169. $("#g_total").html('原商品总计:'+old_total+'元,现商品总计:'+new_total+'元,需退补:'+(new_total-old_total)+'元');
  170. $("#modal-demo3").modal("show");
  171. }
  172. }
  173. });
  174. }
  175. function user_search(){
  176. var receiverName = $('#receiverName').val();
  177. var receiverMobile = $('#receiverMobile').val();
  178. var order_id = $('#order_id').val();
  179. var page = '{{$page}}';
  180. var service_type = $('#service_type').val();
  181. location.href = 'index?page='+page+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&order_id='+order_id+'&service_type='+service_type;
  182. }
  183. /*分页*/
  184. $("#page").paging({
  185. pageNo:{{$page}},
  186. totalPage: {{$pages}},
  187. totalSize: {{$count}},
  188. callback: function(num) {
  189. var receiverName = $('#receiverName').val();
  190. var receiverMobile = $('#receiverMobile').val();
  191. var order_id = $('#order_id').val();
  192. var service_type = $('#service_type').val();
  193. location.href = 'index?page='+num+'&receiverName='+receiverName+'&receiverMobile='+receiverMobile+'&order_id='+order_id+'&service_type='+service_type;
  194. }
  195. })
  196. </script>
  197. </body>
  198. @endsection