rabin 1 gadu atpakaļ
vecāks
revīzija
7001047c0f

+ 2 - 2
src/dai/seller/api/Manage.php

@@ -195,7 +195,7 @@ class Manage extends Auth
 
         $order = Dever::db('order', 'seller')->select($id);
         $data = Dever::load('manage', 'seller')->outKm(array('body' => $order));
-
-        Dever::load('export', 'excel')->act($data['body'], $data['head'], '导出卡密');
+        
+        Dever::load('export', 'excel')->act($data['body'], $data['head'], '导出卡密', 0, '', false, false, $code);
     }
 }

+ 12 - 2
src/dai/seller/lib/Manage.php

@@ -260,11 +260,14 @@ class Manage extends Auth
         }
         $czongjine = $db->find($where, array('col' => 'sum(cash) as cash'));
         $szongjine = $db->find($where, array('col' => 'sum(price) as cash'));
+        $kzongjine = $db->find($where, array('col' => 'sum(buy_price) as cash'));
+        $lirun = $szongjine['cash'] - $kzongjine['cash'];
         
         $where['status'] = array('<', 10);
         $chu = $db->count($where);
 
         $where['status'] = 11;
+        $shibaijine = $db->find($where, array('col' => 'sum(cash) as cash'));
         $shibai = $db->count($where);
 
         return array
@@ -313,11 +316,18 @@ class Manage extends Auth
                 'name' => '成功金额',
                 'value' => $czongjine['cash'] ?? 0,
             ),
+            /*
             array
             (
                 'span' => '3',
-                'name' => '实际成功金额',
-                'value' => $szongjine['cash'] ?? 0,
+                'name' => '失败金额',
+                'value' => $shibaijine['cash'] ?? 0,
+            ),*/
+            array
+            (
+                'span' => '3',
+                'name' => '利润',
+                'value' => $lirun ?? 0,
             ),
         );
     }

+ 11 - 1
src/dai/seller/table/manage/order_list.php

@@ -35,12 +35,22 @@ return array
                 'width' => '60',
                 'name' => '面值',
             ),
+            'buy_price' => array
+            (
+                'width' => '60',
+                'name' => '成本',
+            ),
+            'price' => array
+            (
+                'width' => '60',
+                'name' => '售价',
+            ),
             'num' => array
             (
                 'width' => '60',
                 'name' => '数量',
             ),
-            //'price',
+
             //'channel_id',
             'status' => array
             (

+ 10 - 0
src/dai/seller/table/manage/order_log_list.php

@@ -35,6 +35,16 @@ return array
                 'width' => '60',
                 'name' => '面值',
             ),
+            'buy_price' => array
+            (
+                'width' => '60',
+                'name' => '成本',
+            ),
+            'price' => array
+            (
+                'width' => '60',
+                'name' => '售价',
+            ),
             'num' => array
             (
                 'width' => '60',