sunhao 5 years ago
parent
commit
4c6a9b76fa

+ 1 - 1
app/Http/Controllers/Admin/GoodsController.php

@@ -126,7 +126,7 @@ class GoodsController extends Controller
126 126
             $img=$file['oss-request-url'];
127 127
             $goods['picUrl']=str_replace("kx-youhuiquan.oss-cn-beijing.aliyuncs.com","imgs.726p.com",$img);
128 128
         }
129
-        //$goods['picUrl'] = $request->input('picUrl');  
129
+        if( !isset($goods['picUrl']) ) $goods['picUrl'] = 'http://imgs.726p.com/tbk/upload/seafoodPic2019-10-14/151513/kx-5da4208175314.jpg'; 
130 130
         DB::beginTransaction();
131 131
         try{
132 132
             $res = DB::table('goods')->insertGetId($goods); 

+ 1 - 1
resources/views/goods/index.blade.php

@@ -36,7 +36,7 @@
36 36
                         <td class="text-c">{{$a['productCode']}}</td>
37 37
                         <td class="text-c">
38 38
                             @foreach($a['sku_list'] as $item)
39
-                                sku编码:{{$item['code']}}&nbsp;&nbsp;  规格:{{$item['propsName']}}&nbsp;&nbsp;  价格:{{$item['price']}}<br>
39
+                                规格:{{$item['propsName']}}&nbsp;&nbsp;  价格:{{$item['price']}} &nbsp;&nbsp; 库存:{{$item['quantity']}}  <br>
40 40
                             @endforeach
41 41
                         </td>
42 42
                         <td class="text-c">{{$a['description']}}</td>

+ 2 - 0
resources/views/goods/skulist.blade.php

@@ -19,6 +19,7 @@
19 19
                     <th width="10%">价格</th>
20 20
                     <th width="10%">吊牌价</th>
21 21
                     <th width="10%">参考成本</th>
22
+                    <th width="10%">库存</th>
22 23
                     <th width="10%">创建时间</th>
23 24
                     <th width="10%">操作</th>
24 25
                 </tr>
@@ -34,6 +35,7 @@
34 35
                         <td class="text-c">{{$a['price']}}</td>
35 36
                         <td class="text-c">{{$a['tagPrice']}}</td>
36 37
                         <td class="text-c">{{$a['referenceCost']}}</td>
38
+                        <td class="text-c">{{$a['quantity']}}</td>
37 39
                         <td class="text-c">{{$a['createTime']}}</td>
38 40
                         <td class="f-14 product-brand-manage"><a style="text-decoration:none" onClick='admin_edit("编辑","{{$a['id']}}","{{$a['goodsCode']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>
39 41
                          <a style="text-decoration:none" class="ml-5" onClick="admin_del(this, '{{$a['id']}}')" href="javascript:;" title="删除"><span class="btn btn-danger radius">删除</span></a></td>