wesley vor 6 Jahren
Ursprung
Commit
d8cfbbce54

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

xqd xqd xqd
@@ -1957,6 +1957,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 +1970,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 +1986,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>