rabin 1 éve
szülő
commit
8f256c2240

+ 16 - 1
src/dai/seller/lib/Manage.php

@@ -251,6 +251,9 @@ class Manage extends Auth
         $total = $db->count($where);
 
         $zongjine = $db->find($where, array('col' => 'sum(cash) as cash'));
+        if (!$zongjine) {
+            $zongjine['cash'] = 0;
+        }
 
         $where['status'] = 10;
         $yes = $db->count($where);
@@ -262,6 +265,15 @@ 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'));
+        if (!$czongjine) {
+            $czongjine['cash'] = 0;
+        }
+        if (!$szongjine) {
+            $szongjine['cash'] = 0;
+        }
+        if (!$kzongjine) {
+            $kzongjine['cash'] = 0;
+        }
         $lirun = $szongjine['cash'] - $kzongjine['cash'];
         
         $where['status'] = array('<', 10);
@@ -269,6 +281,9 @@ class Manage extends Auth
 
         $where['status'] = 11;
         $shibaijine = $db->find($where, array('col' => 'sum(price) as cash'));
+        if (!$shibaijine) {
+            $shibaijine['cash'] = 0;
+        }
         $shibai = $db->count($where);
 
         return array
@@ -368,7 +383,7 @@ class Manage extends Auth
     {
         $seller = Dever::db('info', 'seller')->find($data['seller_id']);
         $channel = array();
-        if ($data['channel_id']) {
+        if (isset($data['channel_id']) && $data['channel_id']) {
             $channel = Dever::db('info', 'channel')->find($data['channel_id']);
         }
         $value = $this->showOrderStatus($data['status']);

+ 2 - 0
src/dai/seller/lib/Order.php

@@ -31,6 +31,8 @@ class Order
 
         # 开始下单
         $data = array();
+        $data['status'] = 1;
+        $data['finish'] = 2;
         $data['account'] = $account;
         $data['cate_id'] = $goods['cate_id'];
         $data['goods_id'] = $sku['info_id'];

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

@@ -76,7 +76,7 @@ return array
             (
                 'name' => '完成时间',
                 'type' => 'show',
-                'show' => '{finish_date} > 0 ? date("Y-m-d H:i", {finish_date}) : "-"',
+                'show' => '"{finish_date}" > 0 ? date("Y-m-d H:i", "{finish_date}") : "-"',
             ),
         ),
         'data_button' => array

+ 1 - 0
src/dai/seller/table/order.php

@@ -4,6 +4,7 @@ return array
     'name' => '商户订单表',
     'cdate' => 'mtime',//mtime保存为微秒,wtime保存为毫秒,默认是秒 暂时不支持,后续升级
     'order' => 'cdate desc',
+    //'store' => 'log1',
     'struct' => array
     (
         'order_num' => array