Bladeren bron

送样人和样品信息

15168162575 2 jaren geleden
bovenliggende
commit
33a8bad7b0
2 gewijzigde bestanden met toevoegingen van 7 en 1 verwijderingen
  1. 5 0
      application/admin/controller/Res.php
  2. 2 1
      public/assets/js/backend/res.js

+ 5 - 0
application/admin/controller/Res.php

@@ -78,6 +78,11 @@ class Res extends Backend
                 ->order($sort, $order)
                 ->paginate($limit);
         }
+        foreach ($list->items() as $k=>$v){
+            $data = Db::name('entrust')->where('sample_no',$list->items()[$k]['sample_no'])->find();
+            $list->items()[$k]['sample_info'] = $data['sample_info'];
+            $list->items()[$k]['send_sample'] = $data['send_sample'];
+        }
         $result = ['total' => $list->total(), 'rows' => $list->items()];
         return json($result);
     }

+ 2 - 1
public/assets/js/backend/res.js

@@ -47,7 +47,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                     return '<span style="color: #f75444">' +value+ '</span>';
                                 }
                             }},
-                        // {field: 'entrust_id', title: __('Entrust_id')},
+                        {field: 'sample_info', title: '样品信息',operate: false},
+                        {field: 'send_sample', title: '送样人',operate: 'LIKE'},
                         {field: 'machine', title: __('Machine'), operate: 'LIKE'},
                         {field: 'sample_no', title: __('Sample_no'), operate: 'LIKE'},
                         // {field: 'standard_id', title: __('Standard_id')},