|  | @@ -366,7 +366,7 @@ class Manage
 | 
	
		
			
				|  |  |                  $sku = Dever::db('goods/info_sku')->select(array('info_id' => $v['id']));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  if ($sku) {
 | 
	
		
			
				|  |  | -                    $other = Dever::db($table)->getOne(array($type => $id, 'goods_id' => $v['id'], 'key' => -1));
 | 
	
		
			
				|  |  | +                    $other = Dever::db($table)->one(array($type => $id, 'goods_id' => $v['id'], 'key' => -1));
 | 
	
		
			
				|  |  |                      $result[$k]['id'] = $v['id'];
 | 
	
		
			
				|  |  |                      $result[$k]['name'] = $v['name'];
 | 
	
		
			
				|  |  |                      $result[$k]['price'] = $v['price'];
 | 
	
	
		
			
				|  | @@ -374,7 +374,10 @@ class Manage
 | 
	
		
			
				|  |  |                      if ($type == 'factory_id') {
 | 
	
		
			
				|  |  |                          if ($other) {
 | 
	
		
			
				|  |  |                              $result[$k]['p_price'] = $other['p_price'];
 | 
	
		
			
				|  |  | -                            $result[$k]['select'] = 1;
 | 
	
		
			
				|  |  | +                            if ($other['state'] == 1) {
 | 
	
		
			
				|  |  | +                                $result[$k]['select'] = 1;
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  | +                            
 | 
	
		
			
				|  |  |                          } else {
 | 
	
		
			
				|  |  |                              $result[$k]['p_price'] = $v['price'];
 | 
	
		
			
				|  |  |                          }
 | 
	
	
		
			
				|  | @@ -392,14 +395,16 @@ class Manage
 | 
	
		
			
				|  |  |                                  $v1['sku_name'] = $v1['attr']['string'];
 | 
	
		
			
				|  |  |                              }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                            $other_sku = Dever::db($table)->getOne(array($type => $id, 'goods_id' => $v['id'], 'sku_id' => $v1['id']));
 | 
	
		
			
				|  |  | +                            $other_sku = Dever::db($table)->one(array($type => $id, 'goods_id' => $v['id'], 'sku_id' => $v1['id']));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                              $p_price = $v1['price'];
 | 
	
		
			
				|  |  |                              $select = 2;
 | 
	
		
			
				|  |  |                              if ($type == 'factory_id') {
 | 
	
		
			
				|  |  |                                  if ($other_sku) {
 | 
	
		
			
				|  |  |                                      $p_price = $other_sku['p_price'];
 | 
	
		
			
				|  |  | -                                    $select = 1;
 | 
	
		
			
				|  |  | +                                    if ($other_sku['state'] == 1) {
 | 
	
		
			
				|  |  | +                                        $select = 1;
 | 
	
		
			
				|  |  | +                                    }
 | 
	
		
			
				|  |  |                                  } 
 | 
	
		
			
				|  |  |                              }
 | 
	
		
			
				|  |  |  
 |