dever 3 years ago
parent
commit
a7e54fb177
3 changed files with 10 additions and 1 deletions
  1. 1 1
      app/goods/database/info.php
  2. 3 0
      app/goods/lib/Sku.php
  3. 6 0
      app/shop/assets/pc/html/setGoods.html

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

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

+ 3 - 0
app/goods/lib/Sku.php

@@ -110,6 +110,9 @@ class Sku
             $update = $where;
             foreach ($config['set']['col'] as $k => $v) {
                 $update[$k] = Dever::input($k);
+                if (!$update[$k] && strstr($k, '_price')) {
+                    $update[$k] = 0;
+                }
                 if ($k == 'code') {
                     if (!$update[$k]) {
                         Dever::alert('商品条码号不能为空');

+ 6 - 0
app/shop/assets/pc/html/setGoods.html

@@ -27,6 +27,7 @@
                 <div class="left_main">
                     <input id="key" class="mini-textbox" placeholder="请输入商品名称" onenter="onKeyEnter"/>
                     <a class="mini-button" onclick="search()">查询</a> 
+                    <button class="layui-btn layui-btn-button" type="button" style="vertical-align: middle;margin-bottom: 2px;" onclick="addGoods()">一键添加</button>
                     <ul id="tree1" class="mini-tree" url="<{$url}>" showTreeIcon="true" textField="name" idField="id" expandOnLoad="true" onNodeClick="onNodeClick">
                     </ul>
                 </div>
@@ -185,6 +186,11 @@
         }
     }
 
+    function addGoods()
+    {
+        
+    }
+
     function setGoods(node)
     {
         if (node.id) {