Browse Source

Merge branch 'master' of ssh://git.9026.com:2212/wesley/furniture

dyjh 6 năm trước cách đây
mục cha
commit
9ebdbe3eac

+ 13 - 2
app/Http/Controllers/Api/V1/FurnitureController.php

xqd xqd xqd xqd
@@ -935,6 +935,9 @@ class FurnitureController extends Controller
         }
         $data['user_id'] = $user->id;
 
+
+        $user->phone = $data['customer_phone'];
+        $user->save();
         $res = AlbumOrderModel::create($data);
         if ($res) {
             $this->getQrcode(request('store_id'), $res->id);
@@ -1957,6 +1960,9 @@ class FurnitureController extends Controller
 //        $qrcodetext = $QrReader->text();
 
         $content = "";
+        $parts = AlbumPartsModel::where('store_id', request('store_id'))->where('order_id', request('order_id'))
+            ->get(['name', 'count']);
+
         if ($role == 2) {
             $content .= "--------------------------------<BR>";
             $content .= "<B>订单编号  #" . $order->sno . " </B><BR><BR>";
@@ -1967,6 +1973,12 @@ class FurnitureController extends Controller
             $content .= "<B>送货地点:" . $order->customer_address . "</B><BR><BR>";
             $content .= "<B>联系电话:" . $order->customer_phone . "</B><BR><BR>";
             $content .= "<B>联系人:" . $order->customer_name . "</B><BR><BR>";
+            if (count($parts)) {
+                $content .= "配件:";
+                foreach ($parts as $part) {
+                    $content .= "<C>".$part->name.'------'.$part->count . "</C><BR>";
+                };
+            }
         }
 
         if ($order->remark && $role == 2) {
@@ -1977,8 +1989,7 @@ class FurnitureController extends Controller
         }
 
         if ($role == 1) {
-            $parts = AlbumPartsModel::where('store_id', request('store_id'))->where('order_id', request('order_id'))
-                ->get(['name', 'count']);
+
             $content .= "客户姓名:" . $order->customer_name . "<BR>";
             $content .= "联系方式:" . $order->customer_phone . "<BR>";
             $content .= "联系地址:" . $order->customer_address . "<BR>";

+ 1 - 1
resources/views/admin/album/nav/edit.blade.php

xqd
@@ -126,7 +126,7 @@
                                             </select>
                                         </div>
 
-                                    </div>
+                                    </div>-+
 
                                     <div class="form-group re_xcx" style="display: none">
 

+ 4 - 0
resources/views/admin/album/order/index.blade.php

xqd
@@ -116,6 +116,10 @@
                                                         class="btn btn-primary ">查看详情
                                                 </button>
                                             @endif
+                                            @if(role('Album/Order/destroy'))
+                                              <a class="btn btn-danger" href="{{ U('Album/Order/destroy',['id'=>$item->id])}}"
+                                                       onclick="return confirm('你确定关闭该订单?');">关闭订单</a>
+                                            @endif
                                         </td>
                                     </tr>
                                     <tr>

+ 2 - 0
resources/views/admin/album/user/index.blade.php

xqd xqd
@@ -35,6 +35,7 @@
                                 <th class="sorting" data-sort="id">ID</th>
                                 <th class="sorting" data-sort="username"> 名称</th>
                                 <th class="sorting" data-sort="avatar"> 用户头像</th>
+                                <th class="sorting" data-sort="phone"> 电话</th>
                                 <th class="sorting" data-sort="is_dealer"> 用户类型</th>
                                 <th class="sorting" data-sort="created_at"> 加入时间</th>
                                 <th class="sorting" data-sort="role">角色</th>
@@ -49,6 +50,7 @@
                                         <td>{{ $item->id }}</td>
                                         <td>{{ $item->username }}</td>
                                         <td><img src="{{ $item->avatar }}"/></td>
+                                        <td>{{ $item->phone }}</td>
                                         @if($item['is_dealer'] == 1)
                                             <td>经销商</td>
                                         @else