|
@@ -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);
|