Browse Source

是否称重

sunhao 5 years ago
parent
commit
09a1d177a6

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

@@ -389,6 +389,7 @@ class GoodsController extends Controller
389 389
         $data['price'] = $request->input('price');
390 390
         $data['tagPrice'] = $request->input('tagPrice');
391 391
         $data['referenceCost'] = $request->input('referenceCost');
392
+        $data['is_weigh'] = (int)$request->input('is_weigh');
392 393
 
393 394
         //获取code
394 395
         //获取最大skucode
@@ -483,6 +484,7 @@ class GoodsController extends Controller
483 484
         $data['price'] = $request->input('price');
484 485
         $data['tagPrice'] = $request->input('tagPrice');
485 486
         $data['referenceCost'] = $request->input('referenceCost');       
487
+        $data['is_weigh'] = (int)$request->input('is_weigh');
486 488
        
487 489
         DB::beginTransaction();
488 490
         try{

+ 10 - 0
resources/views/goods/skucreate.blade.php

@@ -40,6 +40,16 @@
40 40
                     <input type="text" class="input-text" value="{{old('referenceCost')}}" placeholder="" name="referenceCost">
41 41
                 </div>
42 42
             </div>
43
+            <div class="row cl">
44
+                <label class="form-label col-xs-4 col-sm-2">
45
+                    是否称重:</label>
46
+                <div class="formControls col-xs-6 col-sm-6">
47
+                    <input type="radio" name="is_weigh"  value="0" @if(old('is_weigh')==='0') checked @else checked @endif>
48
+                    <label for="status-1" style="margin-right: 27px;">否</label>
49
+                    <input type="radio" name="is_weigh" value="1" @if(old('is_weigh')==='1') checked @endif>
50
+                    <label for="status-0">是</label>
51
+                </div>
52
+            </div>
43 53
 
44 54
             <div class="row cl">
45 55
                 <div class="col-9 col-offset-2">

+ 9 - 1
resources/views/goods/skuedit.blade.php

@@ -14,7 +14,6 @@
14 14
             <input type="hidden" name="id" value="{{$sku['id']}}" />
15 15
             <input type="hidden" name="goods_id" value="{{$goods_id}}" />
16 16
             <div class="row cl">
17
-                <div class="row cl">
18 17
                 <label class="form-label col-xs-4 col-sm-2">
19 18
                     规格属性:</label>
20 19
                 <div class="formControls col-xs-6 col-sm-6">
@@ -42,6 +41,15 @@
42 41
                     <input type="text" class="input-text" value="{{$sku['referenceCost']}}" placeholder="" name="referenceCost">
43 42
                 </div>
44 43
             </div>
44
+            <div class="row cl">
45
+                <label class="form-label col-xs-4 col-sm-2">
46
+                    是否称重:</label>
47
+                <div class="formControls col-xs-6 col-sm-6">
48
+                    <input type="radio" name="is_weigh"  value="0" @if($sku['is_weigh']=='0') checked @else checked @endif>
49
+                    <label for="status-1" style="margin-right: 27px;">否</label>
50
+                    <input type="radio" name="is_weigh" value="1" @if($sku['is_weigh']=='1') checked @endif>
51
+                    <label for="status-0">是</label>
52
+                </div>
45 53
             </div>
46 54
             
47 55
             <div class="row cl">

+ 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
                     <th width="10%">操作</th>
@@ -35,6 +36,7 @@
35 36
                         <td class="text-c">{{$a['price']}}</td>
36 37
                         <td class="text-c">{{$a['tagPrice']}}</td>
37 38
                         <td class="text-c">{{$a['referenceCost']}}</td>
39
+                        <td class="text-c">@if($a['is_weigh']==1) 是 @else 否@endif</td>
38 40
                         <td class="text-c">{{$a['quantity']}}</td>
39 41
                         <td class="text-c">{{$a['createTime']}}</td>
40 42
                         <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>