Browse Source

台账列表再处理部分字段

wufeng 2 years ago
parent
commit
69f0f956ee
1 changed files with 19 additions and 0 deletions
  1. 19 0
      app/admin/controller/StandingBook.php

+ 19 - 0
app/admin/controller/StandingBook.php

@@ -54,6 +54,25 @@ class StandingBook extends Base
             ->where($where)
             ->order('addtime', 'desc')
             ->page($param['page'], $param['size'])
+            ->withAttr('outCode', function ($val) {
+                //有可能第一个是,开头
+                return trim($val, ',');
+            })
+            ->withAttr('returnCode', function ($val) {
+                return trim($val, ',');
+            })
+            ->withAttr('thNo', function ($val) {
+                return trim($val, ',');
+            })
+            ->withAttr('returnGoodCode', function ($val) {
+                return trim($val, ',');
+            })
+            ->withAttr('wsm_in_code', function ($val) {
+                return trim($val, ',');
+            })
+            ->withAttr('cgdReturnCode', function ($val) {
+                return trim($val, ',');
+            })
             ->select()
             ->toArray();