dever 3 years ago
parent
commit
63dc2ba28a

+ 4 - 0
app/goods/lib/Set.php

@@ -10,11 +10,15 @@ class Set
     public function getGoodsList($id, $type, $table)
     {
         $where['status'] = 1;
+
         $data = Dever::db('goods/info')->select($where);
 
         $result = array();
         if ($data) {
             foreach ($data as $k => $v) {
+                if ($type != 'factory_id' && $v['price_type'] == 4) {
+                    continue;
+                }
                 $sku = Dever::db('goods/info_sku')->select(array('info_id' => $v['id']));
 
                 if ($sku) {

+ 1 - 1
app/mshop/src/Goods.php

@@ -14,10 +14,10 @@ class Goods extends Core
     	$this->data['search']['total'] = array
     	(
     		array('name' => '全部', 'value' => ''),
+            array('name' => '无库存', 'value' => '1'),
     		array('name' => '库存<3件', 'value' => '3'),
     		array('name' => '库存<5件', 'value' => '5'),
     		array('name' => '库存<10件', 'value' => '10'),
-    		array('name' => '无库存', 'value' => '1'),
     	);
         $this->data['data'] = Dever::load('shop/lib/info')->getGoodsSku($this->shop_id);
 

+ 1 - 1
app/mshop/src/Out.php

@@ -10,7 +10,7 @@ class Out extends Core
     # 获取所有商品列表
     public function getGoods()
     {
-        $this->data['data'] = Dever::load('shop/lib/info')->getGoods($this->shop_id);
+        $this->data['data'] = Dever::load('shop/lib/info')->getGoods($this->shop_id, false, '1,2,3');
 
         return $this->data;
     }

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

@@ -312,6 +312,7 @@ return array
                 'hot' => array('yes-t_2.hot'),
                 'top' => array('yes-t_2.top'),
                 //'youhui' => array('yes-t_2.youhui'),
+                'price_type' => array('yes', 'in'),
                 'name' => array('yes-t_2.name', 'like'),
                 'column' => array('yes-t_2.column_id', 'like'),
                 'category' => array('yes-t_2.category', 'like'),

+ 3 - 3
app/shop/database/info.php

@@ -596,10 +596,10 @@ return array
             'list1' => array('账号管理', '"member&search_option_shop_id={id}&oper_table=info"'),
             'list2' => array('打印机管理', '"print&search_option_shop_id={id}&oper_table=info"'),
 
-            'br3' => array('<br /><br />'),
+            //'br3' => array('<br /><br />'),
 
-            'list3' => array('销售订单', '"sell_order&search_option_shop_id={id}&oper_table=info"'),
-            'list4' => array('采购订单', '"buy_order&search_option_shop_id={id}&oper_table=info"'),
+            //'list3' => array('销售订单', '"sell_order&search_option_shop_id={id}&oper_table=info"'),
+            //'list4' => array('采购订单', '"buy_order&search_option_shop_id={id}&oper_table=info"'),
         ),
     ),
 

+ 5 - 1
app/shop/lib/Info.php

@@ -55,7 +55,7 @@ class Info
     }
 
     # 获取店铺的商品列表
-    public function getGoods($shop, $column = false)
+    public function getGoods($shop, $column = false, $price_type = false)
     {
         $table = 'shop/goods';
         $where['shop_id'] = isset($shop['id']) ? $shop['id'] : $shop;
@@ -70,6 +70,10 @@ class Info
         if ($name) {
             $where['name'] = $name;
         }
+
+        if ($price_type) {
+            $where['price_type'] = $price_type;
+        }
         
         $data = Dever::db($table)->$method($where);
 

+ 3 - 0
app/store/lib/Goods.php

@@ -99,6 +99,9 @@ class Goods
         if ($data) {
             foreach ($data as $k => $v) {
                 $data[$k] = Dever::load('goods/lib/info')->getPayInfo($v, $v['sku_id']);
+                if ($data[$k]['price_type'] == 4) {
+                    continue;
+                }
                 $data[$k]['total'] = $data[$k]['total'] ? $data[$k]['total'] : 0;
                 if ($data[$k]['total'] <= 0) {
                     continue;