dever 3 years ago
parent
commit
de131211ca
3 changed files with 39 additions and 12 deletions
  1. 31 8
      app/factory/database/goods_sku.php
  2. 1 1
      app/factory/lib/Manage.php
  3. 7 3
      app/store/database/goods_sku.php

+ 31 - 8
app/factory/database/goods_sku.php

@@ -22,13 +22,13 @@ $config = array
             //'list'        => true,
         ),
 
-        'store_id'      => array
+        'factory_id'      => array
         (
             'type'      => 'int-11',
-            'name'      => '所属仓库',
+            'name'      => '所属工厂',
             'default'   => '',
-            'desc'      => '所属仓库',
-            'list'      => 'Dever::load("store/info-find#name", {store_id})',
+            'desc'      => '所属工厂',
+            'list'      => 'Dever::load("factory/info-find#name", {factory_id})',
         ),
 
         'goods_id'      => array
@@ -41,13 +41,13 @@ $config = array
             'list'      => 'Dever::load("goods/info-find#name", {goods_id})',
         ),
 
-        'store_goods_id'      => array
+        'factory_goods_id'      => array
         (
             'type'      => 'int-11',
             'name'      => '商品名称',
             'default'   => '',
             'desc'      => '商品名称',
-            'value'     => Dever::input('search_option_fatory_goods_id'),
+            'value'     => Dever::input('search_option_factory_goods_id'),
             'update'    => 'hidden',
             'match'     => 'is_numeric',
         ),
@@ -125,12 +125,32 @@ $config = array
     # request 请求接口定义
     'request' => array
     (
+        # 列表
+        'getData' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'factory_id' => 'yes',
+                'sku_id' => 'yes',
+                'goods_id' => 'yes',
+                'factory_goods_id' => 'yes',
+                'state' => 1,
+            ),
+            'type' => 'all',
+            'order' => array('id' => 'desc'),
+            'col' => '*|sku_id',
+        ),
+
         'getMinOne' => array
         (
             # 匹配的正则或函数 选填项
             'option' => array
             (
-                'info_id' => 'yes',
+                'factory_id' => 'yes',
+                'sku_id' => 'yes',
+                'goods_id' => 'yes',
+                'factory_goods_id' => 'yes',
                 'state' => 1,
             ),
             'type' => 'one',
@@ -143,7 +163,10 @@ $config = array
             # 匹配的正则或函数 选填项
             'option' => array
             (
-                'info_id' => 'yes',
+                'factory_id' => 'yes',
+                'sku_id' => 'yes',
+                'goods_id' => 'yes',
+                'factory_goods_id' => 'yes',
                 'state' => 1,
             ),
             'type' => 'one',

+ 1 - 1
app/factory/lib/Manage.php

@@ -118,7 +118,7 @@ class Manage
                     $option[$k] = $v['option_sku'];
                 }
             }
-            $head .= '<th>库存</th>';
+            $head .= '<th>出厂价</th>';
             $head .= '</tr></thead>';
 
             if ($option) {

+ 7 - 3
app/store/database/goods_sku.php

@@ -143,12 +143,15 @@ $config = array
             # 匹配的正则或函数 选填项
             'option' => array
             (
-                'info_id' => 'yes',
+                'store_id' => 'yes',
+                'sku_id' => 'yes',
+                'goods_id' => 'yes',
+                'store_goods_id' => 'yes',
                 'state' => 1,
             ),
             'type' => 'all',
             'order' => array('id' => 'desc'),
-            'col' => '*,num-sell_num as num',
+            'col' => '*,num-sell_num as num|sku_id',
         ),
 
         # 获取单条数据
@@ -157,9 +160,10 @@ $config = array
             # 匹配的正则或函数 选填项
             'option' => array
             (
-                'shop_id' => 'yes',
+                'store_id' => 'yes',
                 'sku_id' => 'yes',
                 'goods_id' => 'yes',
+                'store_goods_id' => 'yes',
                 'state' => 1,
             ),
             'type' => 'one',