瀏覽代碼

修改后台订单管理

jun 3 月之前
父節點
當前提交
db30cf2243
共有 2 個文件被更改,包括 8 次插入1 次删除
  1. 2 0
      app/Http/Controllers/Admin/Orders.php
  2. 6 1
      resources/views/admin/orders/index.blade.php

+ 2 - 0
app/Http/Controllers/Admin/Orders.php

@@ -43,6 +43,7 @@ class Orders extends Auth{
     public function index(Model $Model,OrdersProduct $OrdersProduct,Product $Product,Custom $Custom){
 		// 接受参数
 		$code					= request('order_code','');
+		$snowflake_id					= request('snowflake_id','');
 		$orders_other			= request('orders_other',0);
 		$productCode			= request('product_code','');
 		$phone					= request('phone','');
@@ -62,6 +63,7 @@ class Orders extends Auth{
 		$map 					= [];
 		// 编码ID
 		if( $id )				$map[] = ['orders.id','=',$id];
+		if( $snowflake_id )		$map[] = ['orders.snowflake_id','=',$snowflake_id];
 		// 编码ID
 		if( $orders_other )		$map[] = $orders_other == 1 ? ['orders_product.product_id','>',0] : ['orders_product.product_id','=',0];
 		if( $uid )				$map[] = ['custom.uid','=',$uid];

+ 6 - 1
resources/views/admin/orders/index.blade.php

@@ -17,7 +17,10 @@ style="margin: 0 auto;width: 96%;padding: 30px 0px;"
 
 <form action="" method="get" name="thisform" class="form-horizontal form-line">
 	<div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
-		<input type="text" class="form-control" name="order_code" value="{{request('order_code','')}}" maxlength="13" placeholder="请输入订单编号查询" />
+		<input type="text" class="form-control" name="order_code" value="{{request('order_code','')}}" maxlength="13" placeholder="请输入订单ID查询" />
+	</div>
+	<div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
+		<input type="text" class="form-control" name="snowflake_id" value="{{request('snowflake_id','')}}" maxlength="20" placeholder="请输入订单编号查询" />
 	</div>
 	<div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
 		<input type="text" class="form-control" name="custom_code" value="{{request('custom_code','')}}" placeholder="请输入客户编码查询" />
@@ -75,6 +78,7 @@ style="margin: 0 auto;width: 96%;padding: 30px 0px;"
 			<table class="table table-striped table-bordered table-hover">
 				<thead>
 					<tr>
+						<th>订单ID</th>
 						<th>订单编号</th>
 						<th>下单用户</th>
 						<th>产品</th>
@@ -95,6 +99,7 @@ style="margin: 0 auto;width: 96%;padding: 30px 0px;"
 					@foreach ($list as $a)
 					<tr>
 					    <td>{{$a['is_rebate']?'【赠品】':''}}{{$a['order_code']}}</td>
+					    <td>{{$a['snowflake_id']}}</td>
 						<td><a href="{{url('admin/custom/index?'.http_build_query(['custom_code'=>$a['custom_code']]))}}">{{$a['custom_name']}}</a></td>
 						<td>@foreach($a['product'] as $product)
 								{{$product['product_name'].'*'.$product['buy_num']}}<br/>