dever 3 năm trước cách đây
mục cha
commit
5b2b6830fc
3 tập tin đã thay đổi với 16 bổ sung1 xóa
  1. 1 1
      app/goods/database/info.php
  2. 9 0
      app/shop/database/goods.php
  3. 6 0
      app/shop/lib/Sell.php

+ 1 - 1
app/goods/database/info.php

@@ -464,7 +464,7 @@ $config = array
             //'css' => 'demo',
         ),
         //'insert' => false,
-        //'delete' => false,
+        'delete' => false,
         //'mul' => true,
         # 自定义快捷新增和编辑
         'button' => array

+ 9 - 0
app/shop/database/goods.php

@@ -116,6 +116,15 @@ return array
             //'list'      => true,
         ),
 
+        'price_type'        => array
+        (
+            'type'      => 'int-11',
+            'name'      => '价格类型',
+            'default'   => '1',
+            'desc'      => '价格类型',
+            'match'     => 'is_numeric',
+        ),
+
         'state'     => array
         (
             'type'      => 'tinyint-1',

+ 6 - 0
app/shop/lib/Sell.php

@@ -489,6 +489,9 @@ class Sell
                 $card_update['where_id'] = $data['id'];
                 $card_update['uid'] = $uid;
                 $card_update['status'] = 5;
+                if ($shop) {
+                    $card_update['shop_id'] = $shop['id'];
+                }
                 Dever::db('goods/card_code')->update($card_update);
                 Dever::alert('礼品卡已失效');
             } else {
@@ -497,6 +500,9 @@ class Sell
                 $card_update['status'] = 2;
                 $card_update['uid'] = $uid;
                 $card_update['ddate'] = time();
+                if ($shop) {
+                    $card_update['shop_id'] = $shop['id'];
+                }
                 Dever::db('goods/card_code')->update($card_update);
             }
         }