xxxrrrdddd il y a 3 ans
Parent
commit
d743524a66

+ 1 - 1
application/common/model/MobileOrderRefundLog.php

@@ -13,7 +13,7 @@ class MobileOrderRefundLog extends Model
     protected $autoWriteTimestamp=true;
     protected $updateTime=null;
 
-    public function rerunduser(){
+    public function refunduser(){
         return $this->morphTo('refunduser',[
             'admin'=>Admin::class,
             'user' =>User::class,

+ 7 - 1
application/sub/controller/Order.php

@@ -79,6 +79,12 @@ class Order extends SubCommon
     }
     #退款记录
     public function refund_log(){
-
+        $id=input('id',0);
+        $model=MobileOrder::where('s_id',$this->auth->id)->find($id);
+        $list=$model->refundLog()
+            ->with(['refunduser'])
+            ->paginate();
+        $this->assign('list',$list);
+        return view();
     }
 }

+ 1 - 1
application/sub/view/order/index.html

@@ -102,7 +102,7 @@
         $('.refund_log').click(function () {
             let id=$(this).data('id')
             let index = layui.layer.open({
-                title : "预占记录",
+                title : "退款记录",
                 type : 2,
                 area:['1000px','100%'],
                 content : '{:url("order/refund_log")}?id='+id,

+ 6 - 2
application/sub/view/order/refund_log.html

@@ -9,7 +9,9 @@
         <tr>
             <th width="20">ID</th>
             <th width="100">用户名</th>
+            <th>金额</th>
             <th>状态</th>
+            <th>理由</th>
             <th>时间</th>
         </tr>
         </thead>
@@ -17,8 +19,10 @@
         {foreach name="list" item="a"}
         <tr>
             <td>{$a.id}</td>
-            <td>{$a.holdable.nickname}</td>
-            <td>{:$a.is_hold?'开启':'关闭'}</td>
+            <td>{$a.amount_backend}</td>
+            <td>{$a.refunduser.nickname}</td>
+            <td>{:$a.pass?'同意':'驳回'}</td>
+            <td>{:$a.reason}</td>
             <td>
                 {:date('Y-m-d H:i:s',$a.create_time)}
             </td>