michealwoo 2 rokov pred
rodič
commit
b02d935740

+ 18 - 9
app/Admin/Controllers/TakebackEntrustmentController.php

xqd
@@ -44,15 +44,24 @@ class TakebackEntrustmentController extends AdminController
     protected function detail($id)
     {
         return Show::make($id, new TakebackEntrustment(), function (Show $show) {
-            $show->field('id');
-            $show->field('student_id');
-            $show->field('entrust_time');
-            $show->field('take_back_person');
-            $show->field('take_back_desc');
-            $show->field('take_back_photos');
-            $show->field('sign');
-            $show->field('created_at');
-            $show->field('updated_at');
+            $show->row(function (Show\Row $show) {
+              $show->field('content','接回委托详情')
+                  ->width(8)
+                  ->unescape()
+                  ->as(function () {
+                  $html = '';
+                  $html .= '<div style="text-align:left">';
+                  $html .= '<div style="margin-top:5px">接回对象:' . config('map.students')[$this->student_id] . '</div>';
+                  $html .= '<div style="margin-top:5px">接回家长:' . config('map.parent_ids')[$this->take_back_person] . '</div>';
+                  $html .= '<div style="margin-top:5px">接回时间:' . $this->entrust_time . '</div>';
+                  $html .= '<div style="margin-top:5px">接回说明:' . $this->take_back_desc . '</div>';
+                  $html .= '<div style="margin-top:5px">接回照片:</div>';
+                  $html .= '<img data-action="preview-img" src="' . $this->photos . '" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
+                  $html .= '<div style="margin-top:5px">签名:' . $this->sign . '</div>';
+                  $html .= '</div>';
+                  return $html;
+              });
+          });
         });
     }