dever 3 years ago
parent
commit
4864d547f7
2 changed files with 7 additions and 3 deletions
  1. 5 1
      app/shop/lib/Goods.php
  2. 2 2
      app/store/admin/Factory_order.php

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

@@ -102,9 +102,13 @@ class Goods
     private function set($up, $order, $num, $table, $method, $otherMethod, $type, $col, $v)
     {
         # 先验证有没有信息吧
-        $w = $up;
+        foreach ($up as $k => $v) {
+            $k = str_replace('where_', '', $k);
+            $w[$k] = $v;
+        }
         $w['goods_id'] = $v['goods_id'];
         $info = Dever::db($table . '/goods')->one($w);
+        print_r($info);die;
         if (!$info) {
             Dever::db($table . '/goods')->insert($w);
         } else {

+ 2 - 2
app/store/admin/Factory_order.php

@@ -28,7 +28,7 @@ class Factory_order extends Core
         		$button .= '&nbsp;&nbsp;<a href="javascript:;" id="print_'.$v['id'].'" onclick="layer.alert(\'开发中\')"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 layui-btn layui-btn-xs">打印订单</button></a>';
         		
         		if ($v['status'] == 4) {
-        			$url = Dever::url('admin/factory_order.action&order_id='.$v['id'], 'store');
+        			$url = Dever::url('admin/factory_order.action_commit&order_id='.$v['id'], 'store');
         			$button .= '&nbsp;&nbsp;<a href="javascript:;" onclick="load(\''.$url.'\')"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 layui-btn layui-btn-xs">确认收货</button></a>';
         		}
 
@@ -96,7 +96,7 @@ class Factory_order extends Core
     }
 
     # 确认收货
-    public function action_api()
+    public function action_commit_api()
     {
     	$order_id = Dever::input('order_id');