dever 4 年之前
父節點
當前提交
a694280f7f
共有 3 個文件被更改,包括 27 次插入6 次删除
  1. 23 3
      app/shop/database/sell_order.php
  2. 2 1
      app/shop/database/sell_order_goods.php
  3. 2 2
      app/shop/src/My.php

+ 23 - 3
app/shop/database/sell_order.php

@@ -37,12 +37,22 @@ $status = array
     3 => '配送中',
     4 => '已完成',
     5 => '已取消',
-    6 => '退货退款',
-    7 => '部分退款',
-    8 => '仅退款',
+    6 => '退款申请中',
+    7 => '退货退款',
+    8 => '部分退款',
+    9 => '仅退款',
     11 => '已过期',
 );
 
+$tk_status = array
+(
+    1 => '未申请退款',
+    2 => '申请全部退款',
+    3 => '申请部分退款',
+    11 => '审核通过',
+    12 => '审核未通过',
+);
+
 return array
 (
     # 表名
@@ -391,6 +401,16 @@ return array
             //'show'        => 'status=5',
         ),
 
+        'tk_status'        => array
+        (
+            'type'      => 'tinyint-1',
+            'name'      => '申请退款状态',
+            'default'   => '1',
+            'desc'      => '申请退款状态',
+            'match'     => 'is_numeric',
+            'option'    => $tk_status,
+        ),
+
         'status'        => array
         (
             'type'      => 'tinyint-1',

+ 2 - 1
app/shop/database/sell_order_goods.php

@@ -4,7 +4,8 @@ $status = array
 (
     1 => '正常',
     2 => '缺货',
-    3 => '退款',
+    3 => '申请退款',
+    4 => '已退款',
 );
 
 return array

+ 2 - 2
app/shop/src/My.php

@@ -214,7 +214,7 @@ class My extends Core
             Dever::alert('订单不存在');
         }
         if ($this->data['status'] == 2 || $this->data['status'] == 3) {
-            Dever::db('shop/sell_order')->update(array('where_id' => $id, 'status' => 6));
+            Dever::db('shop/sell_order')->update(array('where_id' => $id, 'status' => 6, 'tk_status' => 2));
 
             # 退款到原支付账户
             return 'ok';
@@ -234,7 +234,7 @@ class My extends Core
             Dever::alert('订单不存在');
         }
         if ($this->data['status'] == 2 || $this->data['status'] == 3) {
-            Dever::db('shop/sell_order')->update(array('where_id' => $id, 'status' => 7));
+            Dever::db('shop/sell_order')->update(array('where_id' => $id, 'status' => 6, 'tk_status' => 3));
 
             $goods_id = explode(',', $user_goods_id);