xieruidong 2 years ago
parent
commit
995a7bc3d9
2 changed files with 10 additions and 4 deletions
  1. 6 0
      application/admin/view/goods/add.html
  2. 4 4
      application/common/model/Refund.php

+ 6 - 0
application/admin/view/goods/add.html

@@ -54,6 +54,12 @@
         </div>
     </div>
     <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">是否维修费商品:</label>
+        <div class="col-xs-12 col-sm-8">
+            {:build_radios('row[is_fix]',[0=>'否',1=>'是'],$row['is_fix']??0)}
+        </div>
+    </div>
+    <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Logo')}:</label>
         <div class="col-xs-12 col-sm-8">
             <div class="input-group">

+ 4 - 4
application/common/model/Refund.php

@@ -152,7 +152,7 @@ class Refund Extends Model
             ];
             $refundConfig['reason']=array_values(Refund::getReasons());
             $refundConfig['req_amount']=1;
-            $refundConfig['req_order']=0;
+            $refundConfig['req_order']=null;
         }
         #已发货
         elseif(in_array($order['status'],[$order::S_WAIT_REC,$order::S_OVER])){
@@ -166,12 +166,12 @@ class Refund Extends Model
                 ];
                 $refundConfig['reason']=array_values(Refund::getReasons());
                 $refundConfig['req_amount']=1;
-                $refundConfig['req_order']=0;
+                $refundConfig['req_order']=null;
             }else{
                 $refundConfig['refund_type']=[
                     self::REFUND_TYPE_HHBX=>'换货保修',
                 ];
-                $refundConfig['req_order']=0;
+                $refundConfig['req_order']=null;
                 #一年内
                 if(time()<strtotime('+1year',$order['send_time'])){
                     $refundConfig['type']=[
@@ -181,7 +181,7 @@ class Refund Extends Model
                     $refundConfig['type']=[
                         self::TH_TYPE_SELF_FEE=>'拍维修费',
                     ];
-                    $refundConfig['req_order']=1;
+                    $refundConfig['req_order']=;
                 }
                 $refundConfig['reason']=array_values(Refund::getReasons());
                 $refundConfig['req_amount']=0;