Browse Source

Merge branch 'dev_wf' of wugg/phpstock into version1.5

wufeng 2 years ago
parent
commit
49ff91fd54
2 changed files with 3 additions and 3 deletions
  1. 0 1
      app/abutment/controller/Filing.php
  2. 3 2
      app/abutment/logic/Filing.php

+ 0 - 1
app/abutment/controller/Filing.php

@@ -128,7 +128,6 @@ class Filing extends HomeBaseController
             'mobile|联系电话' => 'require|mobile',
             'addr_code|收货省市区编码' => 'require|array|length:3',
             'addr|详细地址' => 'require|max:255',
-            'arrive_time|预计到货时间'=>'require|date',
         ]);
 
 

+ 3 - 2
app/abutment/logic/Filing.php

@@ -102,9 +102,8 @@ class Filing
     {
         $rs = Db::name('filing')
             ->alias('a')
-            ->field('a.*,b.brand_name,c.cat_name,d.unit unit_name')
+            ->field('a.*,b.brand_name,d.unit unit_name,"" cat_info')
             ->leftJoin('brand b', 'b.id=a.brand_id')
-            ->leftJoin('cat c', 'c.id=a.cat_id')
             ->leftJoin('unit d', 'd.id=a.unit_id')
             ->where(['a.is_del' => 0, 'a.id' => $data['id']])
             ->withAttr('specinfo', function ($val) {
@@ -116,6 +115,8 @@ class Filing
                 return explode(',', $val);
             })->withAttr('delivery_place', function ($val) {
                 return explode(',', $val);
+            })->withAttr('cat_info', function ($val,$da) {
+                return made($da['cat_id']);
             })
             ->findOrEmpty();
         return json_show(0, '获取报备单详情成功', $rs);