xieruidong 2 years ago
parent
commit
0d2f86c77c

+ 1 - 1
application/admin/view/order_info_refund/audit.html

@@ -74,7 +74,7 @@
     <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[refund_status]',['1'=>'通过',2=>'驳回'])}
+            {:build_radios('row[refund_status]',['1'=>'通过',2=>'驳回'],$refund['is_pass']?1:2)}
         </div>
     </div>
     {if $refund['has_money']}

+ 8 - 0
application/common/model/Refund.php

@@ -42,6 +42,7 @@ class Refund Extends Model
         'refund_status_text',
         'need_rec',
         'need_tk',
+        'is_pass',
     ];
     const REFUND_ING=100;
     const REFUND_PASS=200;
@@ -443,6 +444,13 @@ class Refund Extends Model
         }
         return $arr;
     }
+    #是否已通过
+    public function getIsPassAttr($_,$model){
+        return in_array($model['refund_status'],[
+            self::REFUND_REJECT,
+            self::REFUND_CANCEL,
+        ]);
+    }
 
     public static function datetime($time){
         if($time){