rabin 1 year ago
parent
commit
24aadb60aa

+ 35 - 0
src/dai/seller/lib/Manage.php

@@ -171,6 +171,41 @@ class Manage extends Auth
         }
     }
 
+    # 修改订单状态
+    public function editOrderLog1($id, $data)
+    {
+        if ($data['status'] != 11) {
+            Dever::error('请选择退款订单');
+        }
+        $newid = array();
+        $id = explode(',', $id);
+        foreach ($id as $k => $v) {
+            $info = Dever::db('order_log1', 'seller')->find($v);
+            if ($info['status'] == 10) {
+                $newid[] = $v;
+            }
+        }
+        if (!$newid) {
+            Dever::error('请选择成功订单');
+        }
+        $newid = implode(',', $newid);
+        return array($newid, $data);
+    }
+
+    public function upOrderLog1($id, $data)
+    {
+        if ($data['status'] != 11) {
+            Dever::error('请选择退款订单');
+        }
+        $id = explode(',', $id);
+        foreach ($id as $k => $v) {
+            $info = Dever::db('order_log1', 'seller')->find($v);
+            if ($info['status'] == 11) {
+                Dever::load('info', 'seller')->inc($info['seller_id'], $info['price']);
+            }
+        }
+    }
+
     # 后台充值、提现
     public function operCash($data)
     {

+ 28 - 1
src/dai/seller/table/manage/order_log2_list.php

@@ -1,8 +1,35 @@
 <?php
 # 失败历史订单
 $config = include('order_list.php');
+$config['source'] = 'seller/order_log2';
 unset($config['list']['stat']);
 unset($config['list']['button']);
-$config['source'] = 'seller/order_log2';
+$config['list']['button'] = array
+(
+    '更改订单状态' => array('oper', 'status'),
+);
 $config['list']['field']['status']['remote'] = 'seller/manage.showOrderLog2Expand';
+
+/*
+$config['update'] array
+(
+    'field'    => array
+    (
+        'status' => array
+        (
+            'desc' => '【只可以修改成功状态的订单】',
+            'type' => 'radio',
+            'option' => array
+            (
+                //10 => '成功',
+                11 => '退款',
+            ),
+        ),
+    ),
+);
+$config['oper'] = array
+(
+    'up_start' => 'seller/manage.editOrderLog2',
+    'up_end' => 'seller/manage.upOrderLog2',
+);*/
 return $config;

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

@@ -3,6 +3,32 @@
 $config = include('order_list.php');
 unset($config['list']['stat']);
 unset($config['list']['button']);
+$config['list']['button'] = array
+(
+    '更改订单状态' => array('oper', 'status'),
+);
 $config['source'] = 'seller/order_log1';
 $config['list']['field']['status']['remote'] = 'seller/manage.showOrderLogExpand';
+
+$config['update'] = array
+(
+    'field'    => array
+    (
+        'status' => array
+        (
+            'desc' => '【只可以修改成功状态的订单】',
+            'type' => 'radio',
+            'option' => array
+            (
+                //10 => '成功',
+                11 => '退款',
+            ),
+        ),
+    ),
+);
+$config['oper'] = array
+(
+    'up_start' => 'seller/manage.editOrderLog1',
+    'up_end' => 'seller/manage.upOrderLog1',
+);
 return $config;