rabin 3 年之前
父节点
当前提交
9ca42a3fbf
共有 2 个文件被更改,包括 28 次插入0 次删除
  1. 3 0
      service/mail/database/area_stat.php
  2. 25 0
      service/mail/lib/Manage.php

+ 3 - 0
service/mail/database/area_stat.php

@@ -230,6 +230,9 @@ return array
             'default'   => '',
             'desc'      => '明细数据',
             'match'     => 'is_string',
+            'list_name' => '查看详情',
+            'modal'     => '查看详情',
+            'list'      => 'Dever::load("mail/lib/manage.area_stat_view", {id})',
         ),
 
         'state'     => array

+ 25 - 0
service/mail/lib/Manage.php

@@ -1171,4 +1171,29 @@ class Manage
             }
         }
     }
+
+    public function area_stat_view($id)
+    {
+        $info = Dever::db('mail/area_stat')->find($id);
+
+        if ($info['data']) {
+            $info['data'] = Dever::json_decode($info['data']);
+            if ($info['data']) {
+                $table['head'] = array('门店名称', '门店编号', '收益(元)');
+                foreach ($info['data'] as $k => $v) {
+                    $shop = Dever::db('shop/info')->one($k);
+                    $table['body'][] = array($shop['name'], $shop['sid'], $v);
+                }
+
+                $result[] = array
+                (
+                    'type' => 'table',
+                    'content' => $table,
+                );
+                return Dever::show('', $result);
+            }
+        }
+        return '';
+
+    }
 }