dever 3 jaren geleden
bovenliggende
commit
e998b5cc79
3 gewijzigde bestanden met toevoegingen van 39 en 1 verwijderingen
  1. 17 0
      app/shop/database/sell_order.php
  2. 8 0
      app/shop/lib/Refund.php
  3. 14 1
      app/shop/lib/Sell.php

+ 17 - 0
app/shop/database/sell_order.php

@@ -66,6 +66,12 @@ $shop = function()
     return $array;
 };
 
+$withdraw = array
+(
+    1 => '未提现',
+    2 => '已提现',
+);
+
 return array
 (
     # 表名
@@ -351,6 +357,17 @@ return array
             'update'    => 'textarea',
         ),
 
+        'withdraw'        => array
+        (
+            'type'      => 'tinyint-1',
+            'name'      => '是否提现',
+            'default'   => '1',
+            'desc'      => '是否提现',
+            'match'     => 'is_numeric',
+            'option'    => $withdraw,
+            //'search'    => 'select',
+        ),
+
         'status'        => array
         (
             'type'      => 'tinyint-1',

+ 8 - 0
app/shop/lib/Refund.php

@@ -111,6 +111,10 @@ class Refund
         }
 
         $data = Dever::load($this->lib)->set($type, 1)->getView($id, $order_id, false);
+
+        if (isset($data['withdraw']) && $data['withdraw'] == 2) {
+            Dever::alert('当前订单状态不允许退货退款');
+        }
         $auth = false;
         if ($this->type == 'sell' && $type == 1) {
             if ($data['status'] == 2) {
@@ -235,6 +239,10 @@ class Refund
             Dever::alert('您没有权限操作');
         }
 
+        if (isset($order['withdraw']) && $order['withdraw'] == 2) {
+            Dever::alert('当前订单状态不允许退货退款');
+        }
+
         $state = Dever::db($this->refund_table)->update(array('where_id' => $info['id'], 'process' => $process));
 
         if (!$state) {

+ 14 - 1
app/shop/lib/Sell.php

@@ -1304,6 +1304,19 @@ class Sell
         return $html;
     }
 
-    # 打印小票信息
+    # 第三方确认
+    public function tixian()
+    {
+        $param = array();
+
+        ksort($param);
+        $string = array();
+        foreach ($param as $k => $v) {
+            if (strstr($v, '&') || strstr($v, '@')) {
+                $v = urlencode($v);
+            }
+            $string[] = $k . '=' . $v;
+        }
+    }
     
 }